diff --git a/DCGEngine.sln b/DCGEngine.sln index 11e82b4..06ec634 100644 --- a/DCGEngine.sln +++ b/DCGEngine.sln @@ -11,6 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVSim.Bootstrap", "SVSim.Bo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVSim.BattleNode", "SVSim.BattleNode\SVSim.BattleNode.csproj", "{F4549DD3-566A-4155-8D52-3A4D2A7072F7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVSim.BattleEngine", "SVSim.BattleEngine\SVSim.BattleEngine.csproj", "{CCE23D9D-6A66-456B-9812-F09B1FDA3C81}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVSim.BattleEngine.Tests", "SVSim.BattleEngine.Tests\SVSim.BattleEngine.Tests.csproj", "{68F3F596-CAD5-4326-8779-AD8C7BD20CDA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -37,5 +41,13 @@ Global {F4549DD3-566A-4155-8D52-3A4D2A7072F7}.Debug|Any CPU.Build.0 = Debug|Any CPU {F4549DD3-566A-4155-8D52-3A4D2A7072F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {F4549DD3-566A-4155-8D52-3A4D2A7072F7}.Release|Any CPU.Build.0 = Release|Any CPU + {CCE23D9D-6A66-456B-9812-F09B1FDA3C81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCE23D9D-6A66-456B-9812-F09B1FDA3C81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCE23D9D-6A66-456B-9812-F09B1FDA3C81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCE23D9D-6A66-456B-9812-F09B1FDA3C81}.Release|Any CPU.Build.0 = Release|Any CPU + {68F3F596-CAD5-4326-8779-AD8C7BD20CDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {68F3F596-CAD5-4326-8779-AD8C7BD20CDA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {68F3F596-CAD5-4326-8779-AD8C7BD20CDA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {68F3F596-CAD5-4326-8779-AD8C7BD20CDA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/SVSim.BattleEngine.Tests/AssemblyAttributes.cs b/SVSim.BattleEngine.Tests/AssemblyAttributes.cs new file mode 100644 index 0000000..0d20151 --- /dev/null +++ b/SVSim.BattleEngine.Tests/AssemblyAttributes.cs @@ -0,0 +1,7 @@ +// Each engine-state fixture wraps its tests in a TestBattleScope, so AsyncLocal ambient +// isolates per-test state (mgr/GameMgr/IsForecast/IsRandomDraw/RecoveryInfo/etc.). The +// residual process-globals (Unity Resources shim cache, Wizard.LocalLog accumulators) are +// now thread-safe (ConcurrentDictionary / static lock), so fixtures can run in parallel. +using NUnit.Framework; + +[assembly: Parallelizable(ParallelScope.Fixtures)] diff --git a/SVSim.BattleEngine.Tests/BattleAmbientTests.cs b/SVSim.BattleEngine.Tests/BattleAmbientTests.cs new file mode 100644 index 0000000..6c01123 --- /dev/null +++ b/SVSim.BattleEngine.Tests/BattleAmbientTests.cs @@ -0,0 +1,246 @@ +#nullable enable +using SVSim.BattleEngine.Ambient; +using NUnit.Framework; +using System.Runtime.Serialization; +using System.Threading.Tasks; + +namespace SVSim.BattleEngine.Tests; + +[TestFixture, Parallelizable(ParallelScope.Self)] +public class BattleAmbientTests +{ + [Test] + public void Current_IsNull_WhenNoScope() + { + Assert.That(BattleAmbient.Current, Is.Null); + } + + [Test] + public void Require_Throws_WhenNoScope() + { + Assert.Throws(() => BattleAmbient.Require()); + } + + [Test] + public void Enter_SetsCurrent_RestoresOnDispose() + { + var ctx = new BattleAmbientContext { ViewerId = 42 }; + Assert.That(BattleAmbient.Current, Is.Null); + using (var _ = BattleAmbient.Enter(ctx)) + { + Assert.That(BattleAmbient.Current, Is.SameAs(ctx)); + Assert.That(BattleAmbient.Require().ViewerId, Is.EqualTo(42)); + } + Assert.That(BattleAmbient.Current, Is.Null); + } + + [Test] + public void Enter_Nested_RestoresPriorOnDispose() + { + var outer = new BattleAmbientContext { ViewerId = 1 }; + var inner = new BattleAmbientContext { ViewerId = 2 }; + using (var _o = BattleAmbient.Enter(outer)) + { + Assert.That(BattleAmbient.Current!.ViewerId, Is.EqualTo(1)); + using (var _i = BattleAmbient.Enter(inner)) + { + Assert.That(BattleAmbient.Current!.ViewerId, Is.EqualTo(2)); + } + Assert.That(BattleAmbient.Current!.ViewerId, Is.EqualTo(1)); + } + } + + [Test] + public async Task Enter_FlowsAcrossAwait() + { + var ctx = new BattleAmbientContext { ViewerId = 99 }; + using (var _ = BattleAmbient.Enter(ctx)) + { + await Task.Yield(); + Assert.That(BattleAmbient.Current, Is.SameAs(ctx)); + } + } + + [Test] + public async Task Enter_IsolatedBetweenConcurrentTasks() + { + var ctxA = new BattleAmbientContext { ViewerId = 100 }; + var ctxB = new BattleAmbientContext { ViewerId = 200 }; + + var taskA = Task.Run(async () => { + using var _ = BattleAmbient.Enter(ctxA); + await Task.Delay(20); + return BattleAmbient.Current!.ViewerId; + }); + var taskB = Task.Run(async () => { + using var _ = BattleAmbient.Enter(ctxB); + await Task.Delay(20); + return BattleAmbient.Current!.ViewerId; + }); + + var results = await Task.WhenAll(taskA, taskB); + Assert.That(results[0], Is.EqualTo(100)); + Assert.That(results[1], Is.EqualTo(200)); + } + + [Test] + public void IsForecast_ReadsAmbient_WhenScopeActive() + { + var ctx = new BattleAmbientContext { IsForecast = false }; + using var _ = BattleAmbient.Enter(ctx); + Assert.That(BattleManagerBase.IsForecast, Is.False); + ctx.IsForecast = true; + Assert.That(BattleManagerBase.IsForecast, Is.True); + } + + [Test] + public void IsForecast_WriteInsideScope_WritesAmbient_NotFallback() + { + var ctx = new BattleAmbientContext { IsForecast = false }; + using (var _ = BattleAmbient.Enter(ctx)) + { + BattleManagerBase.IsForecast = true; + Assert.That(ctx.IsForecast, Is.True); + } + } + + [Test] + public void IsForecast_OutsideScope_GetAndSetThrow() + { + // Post-Task-8: fallback is gone. Both get and set go through BattleAmbient.Require(), + // which throws when no scope is active. This is the forcing function — any unwrapped + // engine code that touches IsForecast fails fast instead of silently writing a static. + Assert.That(BattleAmbient.Current, Is.Null); + Assert.Throws(() => { var _ = BattleManagerBase.IsForecast; }); + Assert.Throws(() => BattleManagerBase.IsForecast = true); + } + + [Test] + public void IsRandomDraw_OutsideScope_GetAndSetThrow_InsideScope_Roundtrips() + { + // Post-Task-8: get/set both Require() a scope. Inside a scope, writes land on the ctx. + Assert.That(BattleAmbient.Current, Is.Null); + Assert.Throws(() => { var _ = BattleManagerBase.IsRandomDraw; }); + Assert.Throws(() => BattleManagerBase.IsRandomDraw = true); + + var ctx = new BattleAmbientContext { IsRandomDraw = false }; + using (var _ = BattleAmbient.Enter(ctx)) + { + Assert.That(BattleManagerBase.IsRandomDraw, Is.False); + BattleManagerBase.IsRandomDraw = true; + Assert.That(ctx.IsRandomDraw, Is.True); + } + + // Scope disposed -> back to throwing on access. + Assert.Throws(() => { var _ = BattleManagerBase.IsRandomDraw; }); + } + + [Test] + public void GetIns_ReadsAmbient_WhenScopeActive() + { + var fakeMgr = (BattleManagerBase)System.Runtime.Serialization + .FormatterServices.GetUninitializedObject(typeof(BattleManagerBase)); + var ctx = new BattleAmbientContext { Mgr = fakeMgr }; + using var _ = BattleAmbient.Enter(ctx); + Assert.That(BattleManagerBase.GetIns(), Is.SameAs(fakeMgr)); + } + + [Test] + public void GetIns_OutsideScope_ReturnsNull() + { + // Post-Task-8: fallback is gone. GetIns() reads Current?.Mgr (soft, kept null-tolerant so + // engine call sites that pattern `GetIns()?.Foo ?? default` still compose). With no scope + // active, Current is null, so GetIns() returns null. + Assert.That(BattleAmbient.Current, Is.Null); + Assert.That(BattleManagerBase.GetIns(), Is.Null); + } + + [Test] + public void ViewerId_ReadsAmbient_WhenScopeActive() + { + var ctx = new BattleAmbientContext { ViewerId = 12345 }; + using var _ = BattleAmbient.Enter(ctx); + Assert.That(Cute.Certification.ViewerId, Is.EqualTo(12345)); + } + + [Test] + public void RealTimeNetworkAgent_ReadsAmbient_WhenScopeActive() + { + var ctx = new BattleAmbientContext(); + using var _ = BattleAmbient.Enter(ctx); + Assert.That(Wizard.ToolboxGame.RealTimeNetworkAgent, Is.Null); + var agent = (RealTimeNetworkAgent)System.Runtime.Serialization + .FormatterServices.GetUninitializedObject(typeof(RealTimeNetworkAgent)); + ctx.NetworkAgent = agent; + Assert.That(Wizard.ToolboxGame.RealTimeNetworkAgent, Is.SameAs(agent)); + } + + [Test] + public void SetRealTimeNetworkBattle_InsideScope_WritesAmbient() + { + var ctx = new BattleAmbientContext(); + using var _ = BattleAmbient.Enter(ctx); + var agent = (RealTimeNetworkAgent)System.Runtime.Serialization + .FormatterServices.GetUninitializedObject(typeof(RealTimeNetworkAgent)); + Wizard.ToolboxGame.SetRealTimeNetworkBattle(agent); + Assert.That(ctx.NetworkAgent, Is.SameAs(agent)); + } + + [Test] + public void BattleRecoveryInfo_ReadsAmbient_WhenScopeActive() + { + var info = (Wizard.BattleRecoveryInfo)System.Runtime.Serialization + .FormatterServices.GetUninitializedObject(typeof(Wizard.BattleRecoveryInfo)); + var ctx = new BattleAmbientContext { RecoveryInfo = info }; + using var _ = BattleAmbient.Enter(ctx); + Assert.That(Wizard.Data.BattleRecoveryInfo, Is.SameAs(info)); + } + + [Test] + public void BattleRecoveryInfo_SetInsideScope_WritesAmbient() + { + var ctx = new BattleAmbientContext(); + using var _ = BattleAmbient.Enter(ctx); + var info = (Wizard.BattleRecoveryInfo)System.Runtime.Serialization + .FormatterServices.GetUninitializedObject(typeof(Wizard.BattleRecoveryInfo)); + Wizard.Data.BattleRecoveryInfo = info; + Assert.That(ctx.RecoveryInfo, Is.SameAs(info)); + } + + [Test] + public void GameMgr_GetIns_InsideScope_ReturnsScopeInstance() + { + var mgr = new GameMgr(); + var ctx = new BattleAmbientContext { GameMgr = mgr }; + using var _ = BattleAmbient.Enter(ctx); + Assert.That(GameMgr.GetIns(), Is.SameAs(mgr)); + } + + [Test] + public void GameMgr_GetIns_OutsideScope_Throws() + { + Assert.That(BattleAmbient.Current, Is.Null); + Assert.Throws(() => GameMgr.GetIns()); + } + + [Test] + public async Task GameMgr_GetIns_IsolatedBetweenConcurrentTasks() + { + var mgrA = new GameMgr(); + var mgrB = new GameMgr(); + + var taskA = Task.Run(async () => { + using var _ = BattleAmbient.Enter(new BattleAmbientContext { GameMgr = mgrA }); + await Task.Delay(20); + return GameMgr.GetIns(); + }); + var taskB = Task.Run(async () => { + using var _ = BattleAmbient.Enter(new BattleAmbientContext { GameMgr = mgrB }); + await Task.Delay(20); + return GameMgr.GetIns(); + }); + var results = await Task.WhenAll(taskA, taskB); + Assert.That(results[0], Is.SameAs(mgrA)); + Assert.That(results[1], Is.SameAs(mgrB)); + } +} diff --git a/SVSim.BattleEngine.Tests/BattleCardViewShimTests.cs b/SVSim.BattleEngine.Tests/BattleCardViewShimTests.cs new file mode 100644 index 0000000..c929b01 --- /dev/null +++ b/SVSim.BattleEngine.Tests/BattleCardViewShimTests.cs @@ -0,0 +1,56 @@ +using NUnit.Framework; +using UnityEngine; +using Wizard.Battle.View; + +namespace SVSim.BattleEngine.Tests +{ + // Regression for the in-play metamorphose NRE diagnosed 2026-06-07 (bid 283192092460). + // + // The IsRecovery card-create delegate (NetworkBattleManagerBase.cs:379) passes null for the + // cardGameObject, which left BattleCardView.GameObject null. Skill_metamorphose.cs:147 in the + // IsInplay branch then NRE'd on the unguarded + // metamorphosedCard.BattleCardView.GameObject.transform.rotation = Quaternion.identity + // — a purely cosmetic transform reset that has no corresponding state mutation, but tripped over + // null-GameObject before the surrounding mutations (ReplaceInPlay, SetUpInplay, + // FlagCardAsDestroyedBySkill, RemoveFromInPlay) could complete. + // + // Fix: ViewUiTouchStubs.cs's BattleCardView.GameObject is now lazily non-null (matches the + // existing Component.gameObject pattern at UnityShim.cs:94). The shim materializes a no-op + // GameObject on first read; the cosmetic touch resolves to a no-op assignment instead of NRE. + [TestFixture] + public class BattleCardViewShimTests + { + [Test] + public void GameObject_is_lazily_non_null_so_unguarded_recovery_touches_no_op() + { + var view = new BattleCardView(); + + Assert.That(view.GameObject, Is.Not.Null, + "BattleCardView.GameObject must be lazily non-null in the shim so unguarded " + + "Unity touches on the IsRecovery card-create path (which passes null cardGameObject) " + + "resolve to no-ops instead of NRE-ing."); + + Assert.That(view.GameObject.transform, Is.Not.Null, + "GameObject.transform must follow the shim's lazy non-null Component pattern (UnityShim.cs:94)."); + + Assert.DoesNotThrow(() => view.GameObject.transform.rotation = Quaternion.identity, + "Skill_metamorphose.cs:147's cosmetic transform.rotation reset on the in-play branch must " + + "not throw in the headless IsRecovery path (live bid 283192092460: A's Petrification " + + "on B's in-play card)."); + } + + [Test] + public void GameObject_is_stable_across_reads_so_a_set_followed_by_read_returns_the_same_instance() + { + // Lazy materialization caches the GameObject on first read, so subsequent reads return + // the same instance — required for any code path that reads .GameObject, mutates it, + // and reads again (e.g. follower position/rotation/scale set in sequence). + var view = new BattleCardView(); + var first = view.GameObject; + var second = view.GameObject; + Assert.That(second, Is.SameAs(first), + "lazy GameObject must cache; otherwise the second read returns a fresh instance " + + "and any mutation on the first read is lost."); + } + } +} diff --git a/SVSim.BattleEngine.Tests/BuffFollowerOracleTests.cs b/SVSim.BattleEngine.Tests/BuffFollowerOracleTests.cs new file mode 100644 index 0000000..830fb38 --- /dev/null +++ b/SVSim.BattleEngine.Tests/BuffFollowerOracleTests.cs @@ -0,0 +1,105 @@ +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M4 (next-hardest deterministic card): a when_play SELF-BUFF follower resolves to correct + // authoritative state HEADLESS via the same IsForecast/IsRecovery + ActionProcessor path the M2 + // vanilla follower and M3 fixed-damage spell proved (design §5 / DP4 + M3 resume recipe). The new + // oracle dimension over M2/M3 is the PLAYED CARD'S OWN STAT DELTA: the fanfare `powerup` + // `add_offense=1&add_life=1` to `target=self` must raise the follower's Atk and Life by exactly + // those amounts over its CardCSVData base — a self-buff, so no target selection is involved. + [TestFixture] + public class BuffFollowerOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Self_buff_fanfare_raises_own_atk_and_life() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (see M2/M3 oracles): opponent refs + active turn flag. The + // self-buff's target resolver (`character=me&target=self`) reads the active player's own + // in-play card, so the turn flag must be set before the fanfare sweeps. + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life so neither leader reads as a 0-life game-over state that silently blocks + // the play (M3 learning); this card deals no damage but the play-legality gate still checks it. + HeadlessEngineEnv.InitLeaderLife(mgr); + + // The card's fanfare is gated on `play_count>2` (cards.json skill_condition for 103111050). + // The engine reads this from BattlePlayerBase.GetCurrentTurnPlayCount(); seed it past the + // threshold via the public AddCurrentTrunPlayCount so the powerup actually fires. (Without + // this the card resolves to the board but takes no buff — the delta-vs-base oracle is what + // distinguishes "buff applied" from "fanfare silently gated out".) + player.AddCurrentTrunPlayCount(5); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.BuffFollowerId); + + // Place the self-buff follower in the active player's hand with PP to spare; empty board. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.BuffFollowerId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int inplayBefore = player.ClassAndInPlayCardList.Count; + int enemyHandBefore = enemy.HandCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + int enemyLeaderLifeBefore = enemy.ClassAndInPlayCardList[0].Life; + + // Resolve the play through the real engine. + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: null), + "ActionProcessor.PlayCard threw on a self-buff fanfare follower"); + + // Oracle: the own-stat delta is the new M4 dimension; the rest are the §5 follower invariants. + Assert.Multiple(() => + { + // Primary M4 assertion: the fanfare powerup raised the follower's own stats by exactly + // the buff amounts over its CardCSVData base (1/1 -> 2/2). + Assert.That(card.Atk, Is.EqualTo(cardParam.Atk + HeadlessEngineEnv.BuffAddOffense), + "follower atk != base + fanfare add_offense"); + Assert.That(card.Life, Is.EqualTo(cardParam.Life + HeadlessEngineEnv.BuffAddLife), + "follower life != base + fanfare add_life"); + // Cost paid. + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + // Follower moved hand -> board. + Assert.That(player.HandCardList, Does.Not.Contain(card), "card still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore - 1), "hand count not -1"); + Assert.That(player.ClassAndInPlayCardList, Contains.Item(card), "card not in play"); + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(inplayBefore + 1), "in-play count not +1"); + // Opponent unchanged (the buff targets self, not the opponent). + Assert.That(enemy.HandCardList.Count, Is.EqualTo(enemyHandBefore), "opponent hand changed"); + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore), "opponent board changed"); + Assert.That(enemy.ClassAndInPlayCardList[0].Life, Is.EqualTo(enemyLeaderLifeBefore), "opponent leader life changed"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/ConstructionProbeTests.cs b/SVSim.BattleEngine.Tests/ConstructionProbeTests.cs new file mode 100644 index 0000000..41521f4 --- /dev/null +++ b/SVSim.BattleEngine.Tests/ConstructionProbeTests.cs @@ -0,0 +1,48 @@ +using System; +using NUnit.Framework; + +namespace SVSim.BattleEngine.Tests +{ + // M2 probe (go/no-go step 1): can BattleManagerBase / the two-player pair be constructed + // HEADLESS at all? This drives the real practice init path + // (`new SingleBattleMgr(StandardBattleMgrContentsCreator)`), which internally builds the + // BattlePlayer + BattleEnemy pair, against the M1 shim — with NO Unity runtime. + // + // The point of this test is diagnostic: if construction throws, the stack trace tells us the + // first shim gap on the *resolution* path (vs the compile path M1 already proved). We assert + // success, but a failure here is the informative outcome we want surfaced. + [TestFixture] + public class ConstructionProbeTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + [Test] + public void SingleBattleMgr_constructs_headless() + { + // Mirror the forecast flags the design pins (DP4 / §3): suppress VFX registration and + // collapse wait delays. TestBattleScope already sets ctx.IsForecast=true; this line is a + // belt-and-suspenders write through the ambient setter. + BattleManagerBase.IsForecast = true; + + SingleBattleMgr mgr = null; + try + { + mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + } + catch (Exception ex) + { + Assert.Fail( + "Headless construction of SingleBattleMgr threw — first shim gap on the " + + "resolution path:\n" + ex); + } + + Assert.That(mgr, Is.Not.Null); + Assert.That(mgr.BattlePlayer, Is.Not.Null, "BattlePlayer (self) not created"); + Assert.That(mgr.BattleEnemy, Is.Not.Null, "BattleEnemy (opponent) not created"); + _scope.Ctx.Mgr = mgr; + } + } +} diff --git a/SVSim.BattleEngine.Tests/DrawSpellOracleTests.cs b/SVSim.BattleEngine.Tests/DrawSpellOracleTests.cs new file mode 100644 index 0000000..bafa87d --- /dev/null +++ b/SVSim.BattleEngine.Tests/DrawSpellOracleTests.cs @@ -0,0 +1,123 @@ +using System.Linq; +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M9 (the §5 draw oracle): a when_play DRAW spell resolves to correct authoritative state HEADLESS + // via the same IsForecast/IsRecovery + ActionProcessor path M2-M8 proved. The NEW oracle dimension + // is the HAND/DECK DELTA — the deck->hand transfer no prior milestone read: M3/M4/M6/M8 moved + // stats, M2/M5/M7 the board, M3 the leader. The spell's `draw 1` must pull the single seeded deck + // card into the caster's hand (deck -1, that exact card now in hand) while the spell itself pays + // its cost and leaves to the cemetery. + // + // RNG is neutralized structurally (see HeadlessEngineEnv.DrawSpellId): every real draw selects from + // the deck via a `random_count` filter, so the deck is seeded with EXACTLY ONE known card — a + // single-card pool makes `random_count=1` deterministic regardless of the RandomSeed. This rides + // the M5 prefab card-creation path (the deck card is engine-created off the null-view seam) the same + // way the summon-token milestone did. + [TestFixture] + public class DrawSpellOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Draw_spell_moves_the_seeded_deck_card_into_hand() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (see M2-M8 oracles): opponent refs + active turn flag. The + // draw resolves onto the active player's own hand/deck (the skill filter is character=me). + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life: this spell deals no damage, but the play-legality gate still rejects a + // play when a leader reads as a 0-life game-over state (M3 learning). + HeadlessEngineEnv.InitLeaderLife(mgr); + + // Seed the card-template prefabs the internal (createNullView:false) creation path clones — + // the draw VFX touches the drawn card's view layer, so keep the M5 prefab surface available. + HeadlessEngineEnv.InitCardTemplates(mgr); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.DrawSpellId); + + // Seed EXACTLY ONE known card on the caster's deck (forces the random_count=1 selection), + // and place the draw spell in hand with PP to spare. + var deckCard = HeadlessEngineEnv.SeedDeck(mgr, HeadlessEngineEnv.DeckSeedCardId, index: 2, isPlayer: true); + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.DrawSpellId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int deckBefore = player.DeckCardList.Count; + int cemeteryBefore = player.CemeteryList.Count; + int playerInplayBefore = player.ClassAndInPlayCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + + // Sanity: the to-be-drawn card starts in the deck, not the hand. + Assert.That(player.DeckCardList, Does.Contain(deckCard), "seeded card not in deck pre-play"); + Assert.That(player.HandCardList, Does.Not.Contain(deckCard), "seeded card already in hand pre-play"); + + // Resolve the play through the real engine. + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: null), + "ActionProcessor.PlayCard threw on a draw spell"); + + // Oracle: the deck->hand transfer is the new M9 dimension; the rest are the §5 spell-shaped + // invariants proven by M3. + Assert.Multiple(() => + { + // Primary M9 assertion: the seeded deck card moved into the caster's hand... + Assert.That(player.HandCardList, Does.Contain(deckCard), + "drawn card did not land in hand"); + Assert.That(player.HandCardList.Any(c => c.CardId == HeadlessEngineEnv.DeckSeedCardId), Is.True, + "no card with the seeded id is in hand"); + // ...and left the deck (deck -1, down to empty here). + Assert.That(player.DeckCardList, Does.Not.Contain(deckCard), "drawn card still in deck"); + Assert.That(player.DeckCardList.Count, Is.EqualTo(deckBefore - 1), "deck count not -1"); + // The drawn card is the engine's OWN seeded deck object, not a fresh creation. + Assert.That(deckCard.IsInHand, Is.True, "drawn card not marked in-hand"); + + // The spell itself: pays exactly its cost... + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + // ...leaves the hand (it is consumed, the drawn card replaces it -> net hand count flat)... + Assert.That(player.HandCardList, Does.Not.Contain(card), "spell still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore), "hand count changed (spell -1 + draw +1 should net flat)"); + // ...resolves to the cemetery (a spell is not a follower; it never occupies the board). + Assert.That(player.CemeteryList, Does.Contain(card), "spell did not resolve to the cemetery"); + Assert.That(player.CemeteryList.Count, Is.EqualTo(cemeteryBefore + 1), "cemetery count not +1"); + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(card), "spell wrongly placed on the board"); + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(deckCard), "drawn card wrongly placed on the board"); + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(playerInplayBefore), "player board count changed"); + + // Opponent untouched (the draw is character=me). + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore), "opponent board changed"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/DynamicValueSpellOracleTests.cs b/SVSim.BattleEngine.Tests/DynamicValueSpellOracleTests.cs new file mode 100644 index 0000000..c00c641 --- /dev/null +++ b/SVSim.BattleEngine.Tests/DynamicValueSpellOracleTests.cs @@ -0,0 +1,142 @@ +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M10 (the first DYNAMIC `{}`-VALUE card — the first deliberate step beyond the four §5-named + // oracle dimensions M2-M9 closed): a when_play spell whose effect MAGNITUDE is COMPUTED by the + // engine from live game state, not carried as a literal. 112134010's sole skill is + // `when_play damage={me.play_count}-1` to units; the `{}` resolves + // (SkillOptionValue.ParseInt -> SkillFilterVariable.Parse -> SkillEnvironmentalPlayCount.Filtering) + // to `GetCurrentTurnPlayCount() - 1`. That GetCurrentTurnPlayCount() is the SAME per-turn counter + // M4 seeded via the public AddCurrentTrunPlayCount to drive a play_count GATE — M10 proves the seam + // also feeds the effect VALUE. + // + // The new oracle dimension over every prior milestone is the ENGINE-COMPUTED VALUE: the asserted + // damage is derived from the engine's OWN live play-count accessor (GetCurrentTurnPlayCount() - 1), + // never a hardcoded literal. Per memory project_battle_relay_nontargeted_effects, a state-derived + // value that the wire could NOT carry (spellboost cost) is exactly what desynced the PvP relay; + // proving the engine resolves a `{}` value headless is the direct validation that the port (not a + // relay) is the necessary path. + // + // Timing note (the M10 first-unknown, RESOLVED empirically by the first RED): the per-play + // auto-increment AddCurrentTrunPlayCount(1) lives in ActionProcessor's OnBeforePlayCard + // (BattlePlayerBase.cs:1400), which is subscribed by SetupActionProcessorEvent — and that is only + // called on the OperateMgr / Prediction / OperationSimulator paths, NOT on the direct + // `new ActionProcessor(pair).PlayCard` (DP4) path this harness uses. So the headless play does NOT + // self-bump the per-turn play count: the skill reads EXACTLY the seeded GetCurrentTurnPlayCount() + // and the damage == seeded - 1. (The first RED expected a +1 that this path never applies; the + // state-derived primary assertion below was right regardless, and the concrete pins were corrected + // to the observed no-bump behavior.) + [TestFixture] + public class DynamicValueSpellOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Dynamic_damage_spell_deals_engine_computed_play_count_value() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (see M2-M6 oracles): opponent refs + active turn flag. The + // spell's target resolver walks player -> opponent -> opponent's in-play units; the + // `{me.play_count}` read keys on the active player's current turn. + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life so neither leader reads as a 0-life game-over state (blocks plays, M3). + HeadlessEngineEnv.InitLeaderLife(mgr); + + // Put ONE vanilla follower on the ENEMY board. The spell is `character=both` (AoE over both + // boards' units), but with no player-side units the only matched target is this enemy + // follower; its base life (13) exceeds any seeded play count so it SURVIVES -> clean + // life-delta read (no dependence on death/removal). card_type=unit excludes both leaders. + var target = HeadlessEngineEnv.PutFollowerInPlay(mgr, HeadlessEngineEnv.DynamicDamageTargetFollowerId, 0, isPlayer: false); + + // Seed the live game state the `{}` value reads: the active player's current-turn play + // count. This is the M4 seam (AddCurrentTrunPlayCount), here driving the VALUE not a gate. + player.AddCurrentTrunPlayCount(HeadlessEngineEnv.DynamicSeededPlayCount); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.DynamicDamageSpellId); + + // Place the dynamic-value spell in the active player's hand with PP to spare. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.DynamicDamageSpellId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int playerInplayBefore = player.ClassAndInPlayCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + int targetLifeBefore = target.Life; + int playerLeaderLifeBefore = player.ClassAndInPlayCardList[0].Life; + int enemyLeaderLifeBefore = enemy.ClassAndInPlayCardList[0].Life; + + // Resolve the play through the real engine (auto-targeted AoE -> selectedCards: null). + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: null), + "ActionProcessor.PlayCard threw on a dynamic {}-value damage spell"); + + // The engine-computed value, derived from the engine's OWN live play-count accessor (the + // direct-ActionProcessor path does not self-bump it, so this reads the seeded value) — + // exactly the value the skill's `{me.play_count}-1` resolved against. NOT a hardcoded + // literal: this is the M10 dimension (effect magnitude computed from state the wire can't + // carry). + int playCountAtResolution = player.GetCurrentTurnPlayCount(); + int expectedDamage = playCountAtResolution - 1; + int actualDamage = targetLifeBefore - target.Life; + + Assert.Multiple(() => + { + // PRIMARY M10 assertion: the damage dealt equals the engine-COMPUTED {me.play_count}-1, + // read from live state — proving the engine resolved the `{}` expression, not a literal. + Assert.That(actualDamage, Is.EqualTo(expectedDamage), + "damage dealt did not equal the engine-computed {me.play_count}-1 value"); + // Concrete pins (catch a silent state-read failure where play_count would default to 0, + // making damage -1 -> 0): the direct-ActionProcessor path applies no self-play bump, so + // the resolution-time count is exactly the seeded value and the damage is seeded - 1. + Assert.That(playCountAtResolution, Is.EqualTo(HeadlessEngineEnv.DynamicSeededPlayCount), + "play count was not read as the seeded current-turn value"); + Assert.That(actualDamage, Is.EqualTo(HeadlessEngineEnv.DynamicSeededPlayCount - 1), + "net damage did not equal seeded play_count - 1 ({me.play_count}-1 mis-resolved)"); + // Target survives (life > damage) and stays on the board; both leaders untouched + // (card_type=unit excludes class cards). + Assert.That(target.Life, Is.EqualTo(targetLifeBefore - expectedDamage), "target life delta wrong"); + Assert.That(enemy.ClassAndInPlayCardList, Does.Contain(target), "target unexpectedly left the board"); + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore), "enemy board count changed"); + Assert.That(player.ClassAndInPlayCardList[0].Life, Is.EqualTo(playerLeaderLifeBefore), "player leader damaged (unit-only AoE hit a leader)"); + Assert.That(enemy.ClassAndInPlayCardList[0].Life, Is.EqualTo(enemyLeaderLifeBefore), "enemy leader damaged (unit-only AoE hit a leader)"); + // §5 spell-shaped invariants: cost paid, spell leaves hand, does NOT occupy the board. + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + Assert.That(player.HandCardList, Does.Not.Contain(card), "spell still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore - 1), "hand count not -1"); + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(card), "spell wrongly placed on the board"); + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(playerInplayBefore), "player board count changed"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/EmitPathReadOracleTests.cs b/SVSim.BattleEngine.Tests/EmitPathReadOracleTests.cs new file mode 100644 index 0000000..9b6378f --- /dev/null +++ b/SVSim.BattleEngine.Tests/EmitPathReadOracleTests.cs @@ -0,0 +1,69 @@ +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M13 (hub O1, deterministic): the first headless observation of the EMIT path. Drive the proven M3 + // fixed-damage spell (900124030) through mgr.OperateMgr.PlayCard on a NetworkBattleManagerBase-derived + // mgr and confirm the engine reaches its emission path (RealTimeNetworkAgent.OnEmit fires PlayActions) + // without crashing, while the committed state still matches the M3 direct-ActionProcessor oracle. + // Liveness only (E4); structural frame decoding + the RNG rand-list (M14) are deferred. + [TestFixture] + public class EmitPathReadOracleTests : NetworkEmitFixtureBase + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + // The process-global reset (IsForecast=true + clear injected agent) now lives in the shared + // NetworkEmitFixtureBase.ResetNetworkEmitGlobals [TearDown], inherited here — see that file + // for why the leak matters. + + [Test] + public void M3_spell_driven_via_OperateMgr_reaches_emit_without_crashing() + { + var (mgr, emitted) = HeadlessEngineEnv.NewNetworkEmitBattle(); + _scope.Ctx.Mgr = mgr; + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + int leaderLifeBefore = enemy.Class.Life; + + var spell = HeadlessEngineEnv.CreateHeadlessHandCard( + HeadlessEngineEnv.SpellId, index: 1, isPlayer: true, mgr); + player.HandCardList.Add(spell); + int cost = spell.Cost; + player.Pp = 10; + + Assert.DoesNotThrow( + () => mgr.OperateMgr.PlayCard(spell, isPlayer: true, selectCards: null), + "OperateMgr.PlayCard threw driving the M3 spell through the emit path"); + + Assert.Multiple(() => + { + // Emit reached: OnEmit fired with PlayActions (the O1 liveness signal). + Assert.That(emitted, Does.Contain(NetworkBattleDefine.NetworkBattleURI.PlayActions), + "the engine did not reach a PlayActions emit"); + // State intact vs the M3 direct-path oracle. + Assert.That(enemy.Class.Life, Is.EqualTo(leaderLifeBefore - 3), "enemy leader should take 3"); + Assert.That(player.Pp, Is.EqualTo(10 - cost), "PP should be paid"); + Assert.That(player.HandCardList, Does.Not.Contain(spell), "spell should leave the hand"); + Assert.That(player.CemeteryList, Does.Contain(spell), "spell should land in the cemetery"); + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(spell), "a spell does not occupy the board"); + }); + + // Best-effort (F-E-7): with CurrentMatchingStatus seeded non-Disconnected (NewNetworkEmitBattle), + // the flow reaches stockEmitMessageMgr.StockData(info); read it back. If the stock machinery is + // not drivable headless this milestone, this assertion is DEFERRED to structural validation + // (spec §6) — the OnEmit + no-throw + state checks above are the decisive O1 read on their own. + var agent = Wizard.ToolboxGame.RealTimeNetworkAgent; + var stocked = HeadlessEngineEnv.TryReadStockedEmitData(agent); // returns null if unreachable + if (stocked != null) + Assert.That(stocked, Is.Not.Empty, "the emitted dict should be stocked non-empty"); + else + Assert.Inconclusive("payload-presence DEFERRED: stock-sequencer not drivable headless (spec §6)"); + } + } +} diff --git a/SVSim.BattleEngine.Tests/FixedDamageSpellOracleTests.cs b/SVSim.BattleEngine.Tests/FixedDamageSpellOracleTests.cs new file mode 100644 index 0000000..8af4196 --- /dev/null +++ b/SVSim.BattleEngine.Tests/FixedDamageSpellOracleTests.cs @@ -0,0 +1,96 @@ +using System.Collections.Generic; +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M3 (next-hardest deterministic card): a FIXED-DAMAGE SPELL resolves to correct authoritative + // state HEADLESS via the same IsForecast/IsRecovery + ActionProcessor path the M2 vanilla + // follower proved (design §5 / DP4 + M3 resume recipe). The new oracle dimension over M2 is the + // OPPONENT LEADER-LIFE DELTA: the spell's when_play `damage=3` to the enemy leader must reduce + // that leader's Life by exactly 3, with the spell consuming its cost and NOT entering the board. + [TestFixture] + public class FixedDamageSpellOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + // The spell's sole skill is `damage=3` to the enemy leader (cards.json skill_option for 900124030). + private const int ExpectedLeaderDamage = 3; + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Fixed_damage_spell_reduces_opponent_leader_life() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (see M2 oracle): opponent refs + active turn flag. The + // spell's target resolver walks player -> opponent -> opponent's class card (the leader). + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life (engine's InitializeClassLife subset) so the enemy leader is a live, + // damageable target rather than a 0-life game-over state that blocks the play. + HeadlessEngineEnv.InitLeaderLife(mgr); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.SpellId); + + // Place the spell in the active player's hand with PP to spare; empty board otherwise. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.SpellId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int playerInplayBefore = player.ClassAndInPlayCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + int enemyLeaderLifeBefore = enemy.ClassAndInPlayCardList[0].Life; + + // Resolve the play through the real engine. + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: null), + "ActionProcessor.PlayCard threw on a fixed-damage spell"); + + // Oracle: the leader-life delta is the new M3 dimension; the rest are the §5 spell-shaped invariants. + Assert.Multiple(() => + { + // Primary M3 assertion: opponent leader takes exactly the spell's fixed damage. + Assert.That(enemy.ClassAndInPlayCardList[0].Life, + Is.EqualTo(enemyLeaderLifeBefore - ExpectedLeaderDamage), + "opponent leader life not reduced by the spell's fixed damage"); + // Cost paid. + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + // Spell leaves hand. + Assert.That(player.HandCardList, Does.Not.Contain(card), "spell still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore - 1), "hand count not -1"); + // A spell is not a follower: it must NOT occupy the board (resolves to graveyard). + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(card), "spell wrongly placed on the board"); + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(playerInplayBefore), "player board count changed"); + // Opponent board (leader card only) count unchanged — only its life moved. + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore), "opponent board count changed"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/Fixtures/battle_test_cl1.ndjson b/SVSim.BattleEngine.Tests/Fixtures/battle_test_cl1.ndjson new file mode 100644 index 0000000..1b034e3 --- /dev/null +++ b/SVSim.BattleEngine.Tests/Fixtures/battle_test_cl1.ndjson @@ -0,0 +1,40 @@ +{"ts":"2026-06-05T16:36:19.3503474Z","direction":"receive","uri":null,"body":{"uri":"InitNetwork","viewerId":999999999,"uuid":"node-stub","try":0,"cat":99,"resultCode":1}} +{"ts":"2026-06-05T16:36:19.3573466Z","direction":"receive","uri":null,"body":{"uri":"Matched","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"bid":"889788596105","playSeq":1,"selfInfo":{"country_code":"KOR","userName":"SVSim1","sleeveId":"3000011","emblemId":"100000000","degreeId":"300003","fieldId":43,"isOfficial":0,"oppoId":6,"seed":508806643},"oppoInfo":{"country_code":"KOR","userName":"SVSim2","sleeveId":"3000011","emblemId":"100000000","degreeId":"300003","fieldId":43,"isOfficial":0,"oppoId":7,"seed":508806643,"oppoDeckCount":40},"selfDeck":[{"idx":1,"cardId":100314010},{"idx":2,"cardId":100314020},{"idx":3,"cardId":102324040},{"idx":4,"cardId":101324050},{"idx":5,"cardId":101024010},{"idx":6,"cardId":101314020},{"idx":7,"cardId":101311050},{"idx":8,"cardId":101311010},{"idx":9,"cardId":100314020},{"idx":10,"cardId":101321040},{"idx":11,"cardId":101024010},{"idx":12,"cardId":127011010},{"idx":13,"cardId":100314040},{"idx":14,"cardId":101314020},{"idx":15,"cardId":102331010},{"idx":16,"cardId":102324040},{"idx":17,"cardId":101334040},{"idx":18,"cardId":100321010},{"idx":19,"cardId":101324040},{"idx":20,"cardId":100314030},{"idx":21,"cardId":101324040},{"idx":22,"cardId":101311050},{"idx":23,"cardId":701341011},{"idx":24,"cardId":101324050},{"idx":25,"cardId":100314030},{"idx":26,"cardId":101311010},{"idx":27,"cardId":101321070},{"idx":28,"cardId":101024010},{"idx":29,"cardId":100314040},{"idx":30,"cardId":127011010},{"idx":31,"cardId":127011010},{"idx":32,"cardId":100314010},{"idx":33,"cardId":102334020},{"idx":34,"cardId":101334030},{"idx":35,"cardId":101341010},{"idx":36,"cardId":101321040},{"idx":37,"cardId":101314020},{"idx":38,"cardId":101321070},{"idx":39,"cardId":100321010},{"idx":40,"cardId":101334020}],"resultCode":1}} +{"ts":"2026-06-05T16:36:21.2805258Z","direction":"receive","uri":null,"body":{"uri":"BattleStart","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":2,"turnState":1,"battleType":11,"selfInfo":{"rank":"10","battlePoint":"6270","classId":"3","charaId":"3","cardMasterName":"card_master_node_10015"},"oppoInfo":{"rank":"1","isMasterRank":"0","battlePoint":0,"masterPoint":"0","classId":"1","charaId":"1","cardMasterName":"card_master_node_10015"},"resultCode":1}} +{"ts":"2026-06-05T16:36:21.2820523Z","direction":"receive","uri":null,"body":{"uri":"Deal","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":3,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"oppo":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"resultCode":1}} +{"ts":"2026-06-05T16:36:45.4884447Z","direction":"send","uri":"Swap","body":{"idxList":[3]}} +{"ts":"2026-06-05T16:36:45.4909435Z","direction":"receive","uri":null,"body":{"uri":"Swap","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":4,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":4}],"resultCode":1}} +{"ts":"2026-06-05T16:36:46.8360545Z","direction":"receive","uri":null,"body":{"uri":"Ready","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":5,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":4}],"oppo":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"idxChangeSeed":857671914,"spin":243,"resultCode":1}} +{"ts":"2026-06-05T16:36:46.9530582Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":5,"playSeq":6,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:36:49.0622004Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[39],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}]}} +{"ts":"2026-06-05T16:36:53.9257769Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":6,"playSeq":7}} +{"ts":"2026-06-05T16:36:53.9473080Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,2,3,39],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":0}}]}} +{"ts":"2026-06-05T16:36:54.4348349Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":7,"playSeq":8,"turnState":0,"resultCode":1}} +{"ts":"2026-06-05T16:36:54.4458360Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"143","key2":"17","key3":"0","key4":"141","key5":"170","key6":"0"}}} +{"ts":"2026-06-05T16:36:54.4643354Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":7,"playSeq":9,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:36:54.5198350Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[23,14],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"avarice":1}}],"actionSeq":2}} +{"ts":"2026-06-05T16:36:59.8031059Z","direction":"send","uri":"PlayActions","body":{"playIdx":1,"orderList":[{"move":{"idx":[1],"isSelf":1,"from":10,"to":30}},{"alter":{"idx":[2,4,23,14],"isSelf":1,"type":"add","spellboost":"a1","attachTarget":"0"}},{"move":{"idx":[8],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"type":30}} +{"ts":"2026-06-05T16:37:02.5213012Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[2,4,23,14,8],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":0}},{"trigger":{"isSelf":1,"avarice":0}}]}} +{"ts":"2026-06-05T16:37:03.0188508Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"141","key2":"175","key3":"0","key4":"141","key5":"170","key6":"0"},"type":0,"actionSeq":5,"cemetery":[1,0]}} +{"ts":"2026-06-05T16:37:03.1346446Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":12,"playSeq":10,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:03.1561609Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[37],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-05T16:37:07.8849014Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":13,"playSeq":11,"playIdx":37,"type":30,"knownList":[{"idx":37,"cardId":101121020,"to":20,"spellboost":0,"attachTarget":""}]}} +{"ts":"2026-06-05T16:37:08.1357329Z","direction":"send","uri":"Echo","body":{"playIdx":37,"orderList":[{"move":{"idx":[37],"isSelf":0,"from":10,"to":20}},{"playerParam":{"isSelf":0,"buffUnit":1}}],"type":30}} +{"ts":"2026-06-05T16:37:09.1078628Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":14,"playSeq":12}} +{"ts":"2026-06-05T16:37:09.6087702Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":15,"playSeq":13,"turnState":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:11.0449391Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,2,3,39],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":2}}]}} +{"ts":"2026-06-05T16:37:11.4765571Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"141","key2":"175","key3":"0","key4":"143","key5":"170","key6":"101121070"}}} +{"ts":"2026-06-05T16:37:11.4925578Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":15,"playSeq":14,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:11.5190593Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[24],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":8}} +{"ts":"2026-06-05T16:37:25.1553015Z","direction":"send","uri":"PlayActions","body":{"playIdx":2,"targetList":[{"targetIdx":37,"isSelf":0,"selectSkillIndex":[1]}],"orderList":[{"move":{"idx":[2],"isSelf":1,"from":10,"to":30}},{"alter":{"idx":[4,23,14,8,24],"isSelf":1,"type":"add","spellboost":"a1","attachTarget":"3"}},{"move":{"idx":[37],"isSelf":0,"from":20,"to":30}},{"move":{"idx":[15],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}},{"trigger":{"isSelf":1,"avarice":1}}],"type":31}} +{"ts":"2026-06-05T16:37:26.1829531Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[4,23,14,8,24,15],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":0}},{"trigger":{"isSelf":1,"avarice":0}}]}} +{"ts":"2026-06-05T16:37:26.6838102Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"142","key2":"334","key3":"0","key4":"145","key5":"170","key6":"0"},"type":0,"actionSeq":11,"cemetery":[2,1]}} +{"ts":"2026-06-05T16:37:28.3338739Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":20,"playSeq":15,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:28.3556277Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[19],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}]}} +{"ts":"2026-06-05T16:37:33.2699751Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":21,"playSeq":16}} +{"ts":"2026-06-05T16:37:33.2873251Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,2,3,39,19],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":0}}]}} +{"ts":"2026-06-05T16:37:33.7738440Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":22,"playSeq":17,"turnState":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:33.7898440Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"142","key2":"334","key3":"0","key4":"147","key5":"265","key6":"0"}}} +{"ts":"2026-06-05T16:37:33.8063464Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":24,"playSeq":18,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:33.8323438Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[37],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":13}} +{"ts":"2026-06-05T16:37:38.6691412Z","direction":"send","uri":"PlayActions","body":{"playIdx":14,"orderList":[{"move":{"idx":[14],"isSelf":1,"from":10,"to":30}},{"alter":{"idx":[4,23,8,24,15,37],"isSelf":1,"type":"add","spellboost":"a1","attachTarget":"6"}},{"move":{"idx":[36,18],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"avarice":1}}],"type":30}} diff --git a/SVSim.BattleEngine.Tests/Fixtures/battle_test_cl2.ndjson b/SVSim.BattleEngine.Tests/Fixtures/battle_test_cl2.ndjson new file mode 100644 index 0000000..55f45f8 --- /dev/null +++ b/SVSim.BattleEngine.Tests/Fixtures/battle_test_cl2.ndjson @@ -0,0 +1,38 @@ +{"ts":"2026-06-05T16:36:19.3388464Z","direction":"receive","uri":null,"body":{"uri":"InitNetwork","viewerId":999999999,"uuid":"node-stub","try":0,"cat":99,"resultCode":1}} +{"ts":"2026-06-05T16:36:19.3458471Z","direction":"receive","uri":null,"body":{"uri":"Matched","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"bid":"889788596105","playSeq":1,"selfInfo":{"country_code":"KOR","userName":"SVSim2","sleeveId":"3000011","emblemId":"100000000","degreeId":"300003","fieldId":43,"isOfficial":0,"oppoId":7,"seed":508806643},"oppoInfo":{"country_code":"KOR","userName":"SVSim1","sleeveId":"3000011","emblemId":"100000000","degreeId":"300003","fieldId":43,"isOfficial":0,"oppoId":6,"seed":508806643,"oppoDeckCount":40},"selfDeck":[{"idx":1,"cardId":100114010},{"idx":2,"cardId":101121080},{"idx":3,"cardId":101114010},{"idx":4,"cardId":113011010},{"idx":5,"cardId":101121020},{"idx":6,"cardId":100111010},{"idx":7,"cardId":102141010},{"idx":8,"cardId":102111060},{"idx":9,"cardId":100111070},{"idx":10,"cardId":113011010},{"idx":11,"cardId":101131050},{"idx":12,"cardId":101121080},{"idx":13,"cardId":100111010},{"idx":14,"cardId":102121010},{"idx":15,"cardId":701141011},{"idx":16,"cardId":100114010},{"idx":17,"cardId":101114050},{"idx":18,"cardId":102131020},{"idx":19,"cardId":102111060},{"idx":20,"cardId":100114010},{"idx":21,"cardId":102121030},{"idx":22,"cardId":102121030},{"idx":23,"cardId":101114050},{"idx":24,"cardId":100111070},{"idx":25,"cardId":100111020},{"idx":26,"cardId":101121110},{"idx":27,"cardId":102131030},{"idx":28,"cardId":113011010},{"idx":29,"cardId":102131010},{"idx":30,"cardId":100111020},{"idx":31,"cardId":101131020},{"idx":32,"cardId":101114050},{"idx":33,"cardId":101121010},{"idx":34,"cardId":101121080},{"idx":35,"cardId":101121110},{"idx":36,"cardId":101114010},{"idx":37,"cardId":101121020},{"idx":38,"cardId":100111020},{"idx":39,"cardId":102121010},{"idx":40,"cardId":101121010}],"resultCode":1}} +{"ts":"2026-06-05T16:36:21.2050506Z","direction":"receive","uri":null,"body":{"uri":"BattleStart","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":2,"turnState":0,"battleType":11,"selfInfo":{"rank":"10","battlePoint":"6270","classId":"1","charaId":"1","cardMasterName":"card_master_node_10015"},"oppoInfo":{"rank":"1","isMasterRank":"0","battlePoint":0,"masterPoint":"0","classId":"3","charaId":"3","cardMasterName":"card_master_node_10015"},"resultCode":1}} +{"ts":"2026-06-05T16:36:21.2065539Z","direction":"receive","uri":null,"body":{"uri":"Deal","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":3,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"oppo":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"resultCode":1}} +{"ts":"2026-06-05T16:36:46.8260552Z","direction":"send","uri":"Swap","body":{"idxList":[]}} +{"ts":"2026-06-05T16:36:46.8285526Z","direction":"receive","uri":null,"body":{"uri":"Swap","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":4,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"resultCode":1}} +{"ts":"2026-06-05T16:36:46.8295526Z","direction":"receive","uri":null,"body":{"uri":"Ready","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":5,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"oppo":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":4}],"idxChangeSeed":224055814,"spin":243,"resultCode":1}} +{"ts":"2026-06-05T16:36:46.9460536Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[39],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"actionSeq":0}} +{"ts":"2026-06-05T16:36:53.9137786Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,2,3,39],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":0}}]}} +{"ts":"2026-06-05T16:36:54.4108350Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"141","key2":"170","key3":"0","key4":"143","key5":"17","key6":"0"},"type":0,"actionSeq":2,"cemetery":[0,0]}} +{"ts":"2026-06-05T16:36:54.5258347Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":8,"playSeq":6,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:36:54.5523350Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[23,14],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"avarice":1}}]}} +{"ts":"2026-06-05T16:36:59.8136078Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":9,"playSeq":7,"playIdx":1,"type":30,"knownList":[{"idx":1,"cardId":100314010,"to":30,"spellboost":0,"attachTarget":""}]}} +{"ts":"2026-06-05T16:37:00.0026151Z","direction":"send","uri":"Echo","body":{"playIdx":1,"orderList":[{"move":{"idx":[1],"isSelf":0,"from":10,"to":30}},{"alter":{"idx":[2,4,23,14],"isSelf":0,"type":"add","spellboost":"a1","attachTarget":"0"}},{"move":{"idx":[8],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}],"type":30}} +{"ts":"2026-06-05T16:37:02.5313002Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":10,"playSeq":8}} +{"ts":"2026-06-05T16:37:02.5503289Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[2,4,23,14,8],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":0}},{"trigger":{"isSelf":0,"avarice":0}}]}} +{"ts":"2026-06-05T16:37:03.0339655Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":11,"playSeq":9,"turnState":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:03.0510647Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"141","key2":"170","key3":"0","key4":"141","key5":"175","key6":"0"}}} +{"ts":"2026-06-05T16:37:03.0670774Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":11,"playSeq":10,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:03.1321443Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[37],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":5}} +{"ts":"2026-06-05T16:37:07.8809043Z","direction":"send","uri":"PlayActions","body":{"playIdx":37,"orderList":[{"move":{"idx":[37],"isSelf":1,"from":10,"to":20}},{"playerParam":{"isSelf":1,"buffUnit":1}}],"type":30}} +{"ts":"2026-06-05T16:37:09.0943648Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,2,3,39],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":2}}]}} +{"ts":"2026-06-05T16:37:09.5927718Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"143","key2":"170","key3":"101121070","key4":"141","key5":"175","key6":"0"},"type":0,"actionSeq":8,"cemetery":[0,1]}} +{"ts":"2026-06-05T16:37:11.5305571Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":16,"playSeq":11,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:11.5519635Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[24],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-05T16:37:25.1769841Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":19,"playSeq":12,"playIdx":2,"type":31,"knownList":[{"idx":2,"cardId":100314020,"to":30,"spellboost":1,"attachTarget":""}],"oppoTargetList":[{"targetIdx":37,"isSelf":0}]}} +{"ts":"2026-06-05T16:37:25.3675799Z","direction":"send","uri":"Echo","body":{"playIdx":2,"orderList":[{"move":{"idx":[2],"isSelf":0,"from":10,"to":30}},{"alter":{"idx":[4,23,14,8,24],"isSelf":0,"type":"add","spellboost":"a1","attachTarget":"3"}},{"move":{"idx":[37],"isSelf":1,"from":20,"to":30}},{"move":{"idx":[15],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}},{"trigger":{"isSelf":0,"avarice":1}}],"type":31}} +{"ts":"2026-06-05T16:37:26.1899527Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":20,"playSeq":13}} +{"ts":"2026-06-05T16:37:26.6913132Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":21,"playSeq":14,"turnState":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:28.1438230Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[4,23,14,8,24,15],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":0}},{"trigger":{"isSelf":0,"avarice":0}}]}} +{"ts":"2026-06-05T16:37:28.2597994Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"145","key2":"170","key3":"0","key4":"142","key5":"334","key6":"0"}}} +{"ts":"2026-06-05T16:37:28.2755229Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"889788596105","pubSeq":19,"playSeq":15,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:28.3213347Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[19],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"actionSeq":11}} +{"ts":"2026-06-05T16:37:33.2604742Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,2,3,39,19],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":0}}]}} +{"ts":"2026-06-05T16:37:33.7603450Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"147","key2":"265","key3":"0","key4":"142","key5":"334","key6":"0"},"type":0,"actionSeq":13,"cemetery":[1,2]}} +{"ts":"2026-06-05T16:37:33.8438435Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":25,"playSeq":16,"spin":0,"resultCode":1}} +{"ts":"2026-06-05T16:37:33.8648584Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[37],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-05T16:37:38.6786420Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"889788596105","pubSeq":26,"playSeq":17,"playIdx":14,"type":30,"knownList":[{"idx":14,"cardId":101314020,"to":30,"spellboost":2,"attachTarget":""}]}} diff --git a/SVSim.BattleEngine.Tests/Fixtures/battle_test_fresh_cl1.ndjson b/SVSim.BattleEngine.Tests/Fixtures/battle_test_fresh_cl1.ndjson new file mode 100644 index 0000000..3542383 --- /dev/null +++ b/SVSim.BattleEngine.Tests/Fixtures/battle_test_fresh_cl1.ndjson @@ -0,0 +1,109 @@ +{"ts":"2026-06-07T12:05:10.0824442Z","direction":"receive","uri":null,"body":{"uri":"InitNetwork","viewerId":999999999,"uuid":"node-stub","try":0,"cat":99,"resultCode":1}} +{"ts":"2026-06-07T12:05:10.1134456Z","direction":"receive","uri":null,"body":{"uri":"Matched","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"bid":"907324319325","playSeq":1,"selfInfo":{"country_code":"KOR","userName":"SVSim1","sleeveId":"3000011","emblemId":"100000000","degreeId":"300003","fieldId":43,"isOfficial":0,"oppoId":6,"seed":742186477},"oppoInfo":{"country_code":"KOR","userName":"SVSim2","sleeveId":"3000011","emblemId":"100000000","degreeId":"300003","fieldId":43,"isOfficial":0,"oppoId":7,"seed":742186477,"oppoDeckCount":40},"selfDeck":[{"idx":1,"cardId":101324040},{"idx":2,"cardId":101321070},{"idx":3,"cardId":101321040},{"idx":4,"cardId":101324050},{"idx":5,"cardId":101334030},{"idx":6,"cardId":102334020},{"idx":7,"cardId":101024010},{"idx":8,"cardId":102331010},{"idx":9,"cardId":101324040},{"idx":10,"cardId":101314020},{"idx":11,"cardId":127011010},{"idx":12,"cardId":100314020},{"idx":13,"cardId":101024010},{"idx":14,"cardId":701341011},{"idx":15,"cardId":101311010},{"idx":16,"cardId":101311050},{"idx":17,"cardId":102324040},{"idx":18,"cardId":101341010},{"idx":19,"cardId":127011010},{"idx":20,"cardId":101311010},{"idx":21,"cardId":101314020},{"idx":22,"cardId":100321010},{"idx":23,"cardId":101321070},{"idx":24,"cardId":100314030},{"idx":25,"cardId":101314020},{"idx":26,"cardId":101311050},{"idx":27,"cardId":101024010},{"idx":28,"cardId":100314010},{"idx":29,"cardId":127011010},{"idx":30,"cardId":100314040},{"idx":31,"cardId":100321010},{"idx":32,"cardId":101334020},{"idx":33,"cardId":100314030},{"idx":34,"cardId":100314040},{"idx":35,"cardId":101321040},{"idx":36,"cardId":102324040},{"idx":37,"cardId":100314020},{"idx":38,"cardId":101334040},{"idx":39,"cardId":100314010},{"idx":40,"cardId":101324050}],"resultCode":1}} +{"ts":"2026-06-07T12:05:13.3684415Z","direction":"receive","uri":null,"body":{"uri":"BattleStart","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":2,"turnState":0,"battleType":11,"selfInfo":{"rank":"10","battlePoint":"6270","classId":"3","charaId":"3","cardMasterName":"card_master_node_10015"},"oppoInfo":{"rank":"1","isMasterRank":"0","battlePoint":0,"masterPoint":"0","classId":"1","charaId":"1","cardMasterName":"card_master_node_10015"},"resultCode":1}} +{"ts":"2026-06-07T12:05:13.3699431Z","direction":"receive","uri":null,"body":{"uri":"Deal","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":3,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"oppo":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"resultCode":1}} +{"ts":"2026-06-07T12:05:34.8570706Z","direction":"send","uri":"Swap","body":{"idxList":[2,3]}} +{"ts":"2026-06-07T12:05:34.8895711Z","direction":"receive","uri":null,"body":{"uri":"Swap","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":4,"self":[{"pos":0,"idx":1},{"pos":1,"idx":4},{"pos":2,"idx":5}],"resultCode":1}} +{"ts":"2026-06-07T12:05:34.8905684Z","direction":"receive","uri":null,"body":{"uri":"Ready","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":5,"self":[{"pos":0,"idx":1},{"pos":1,"idx":4},{"pos":2,"idx":5}],"oppo":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"idxChangeSeed":1430655717,"spin":243,"resultCode":1}} +{"ts":"2026-06-07T12:05:36.6990699Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[8],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"actionSeq":0}} +{"ts":"2026-06-07T12:05:42.2485694Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,4,5,8],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":0}}]}} +{"ts":"2026-06-07T12:05:42.7450678Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"141","key2":"56","key3":"0","key4":"143","key5":"14","key6":"0"},"type":0,"actionSeq":2,"cemetery":[0,0]}} +{"ts":"2026-06-07T12:05:42.8775704Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":8,"playSeq":6,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:42.9050694Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[10,16],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"avarice":1}}]}} +{"ts":"2026-06-07T12:05:46.4670675Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":9,"playSeq":7}} +{"ts":"2026-06-07T12:05:46.4855683Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,2,3,10,16],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":0}},{"trigger":{"isSelf":0,"avarice":0}}]}} +{"ts":"2026-06-07T12:05:46.9690709Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":10,"playSeq":8,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:46.9860711Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"141","key2":"56","key3":"0","key4":"142","key5":"134","key6":"0"}}} +{"ts":"2026-06-07T12:05:47.0020697Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":10,"playSeq":9,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:47.4990684Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[29],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":4}} +{"ts":"2026-06-07T12:05:54.6460692Z","direction":"send","uri":"PlayActions","body":{"playIdx":8,"orderList":[{"move":{"idx":[8],"isSelf":1,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:05:55.7140680Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,4,5,29],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":2}}]}} +{"ts":"2026-06-07T12:05:56.2210693Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"143","key2":"140","key3":"102331036","key4":"142","key5":"134","key6":"0"},"type":0,"actionSeq":7,"cemetery":[0,0]}} +{"ts":"2026-06-07T12:05:57.0875698Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":15,"playSeq":10,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:57.1090694Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[15],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}]}} +{"ts":"2026-06-07T12:06:12.6924224Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":16,"playSeq":11,"playIdx":1,"type":30,"knownList":[{"idx":1,"cardId":102131030,"to":20,"spellboost":0,"attachTarget":"","cost":2,"clan":1,"tribe":"0"}]}} +{"ts":"2026-06-07T12:06:12.9394251Z","direction":"send","uri":"Echo","body":{"playIdx":1,"orderList":[{"move":{"idx":[1],"isSelf":0,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:06:16.5024225Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":17,"playSeq":12}} +{"ts":"2026-06-07T12:06:16.5194264Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[2,3,10,16,15],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":2}}]}} +{"ts":"2026-06-07T12:06:16.9874227Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":18,"playSeq":13,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:17.0039250Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"143","key2":"140","key3":"102331036","key4":"144","key5":"177","key6":"102131049"}}} +{"ts":"2026-06-07T12:06:17.0209229Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":18,"playSeq":14,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:17.0494250Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[3],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"actionSeq":10}} +{"ts":"2026-06-07T12:06:28.8094232Z","direction":"send","uri":"PlayActions","body":{"playIdx":3,"orderList":[{"move":{"idx":[3],"isSelf":1,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:06:29.8539237Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,4,5,29],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":2}}]}} +{"ts":"2026-06-07T12:06:30.3519249Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"145","key2":"140","key3":"203652104","key4":"144","key5":"177","key6":"102131049"},"type":0,"actionSeq":13,"cemetery":[0,0]}} +{"ts":"2026-06-07T12:06:31.2029243Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":23,"playSeq":15,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:31.2239242Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[24],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-07T12:06:36.0499227Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":25,"playSeq":16,"playIdx":1,"type":10,"knownList":[{"idx":1,"cardId":102131030,"to":30,"spellboost":0,"attachTarget":"","cost":2,"clan":1,"tribe":"0"}],"oppoTargetList":[{"targetIdx":8,"isSelf":0}]}} +{"ts":"2026-06-07T12:06:36.0879224Z","direction":"send","uri":"Echo","body":{"playIdx":1,"orderList":[{"move":{"idx":[1],"isSelf":0,"from":20,"to":30}},{"move":{"idx":[8],"isSelf":1,"from":20,"to":30}}],"type":10}} +{"ts":"2026-06-07T12:06:36.7079231Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":26,"playSeq":17}} +{"ts":"2026-06-07T12:06:37.1924235Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":27,"playSeq":18,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:38.0604227Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[2,3,10,16,15,24],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":0}}]}} +{"ts":"2026-06-07T12:06:38.1769227Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"147","key2":"140","key3":"101321058","key4":"148","key5":"321","key6":"0"}}} +{"ts":"2026-06-07T12:06:38.1919253Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":26,"playSeq":19,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:38.2194225Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":2}},{"move":{"idx":[19],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":16}} +{"ts":"2026-06-07T12:06:46.5499241Z","direction":"send","uri":"PlayActions","body":{"playIdx":29,"keyAction":[{"type":1,"cardId":127011010,"selectCard":{"cardId":[121011010],"open":0}}],"orderList":[{"move":{"idx":[29],"isSelf":1,"from":10,"to":20}},{"add":{"idx":[41],"isSelf":1,"card":{"cardId":121011010},"isChoice":"1"}},{"move":{"idx":[41],"isSelf":1,"from":50,"to":10}}],"type":30}} +{"ts":"2026-06-07T12:06:50.3119230Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,4,5,19,41],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":2}}]}} +{"ts":"2026-06-07T12:06:50.8109234Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"149","key2":"305","key3":"228332150","key4":"148","key5":"321","key6":"0"},"type":0,"actionSeq":19,"cemetery":[1,1]}} +{"ts":"2026-06-07T12:06:50.9109252Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":32,"playSeq":20,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:50.9319252Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[11],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}]}} +{"ts":"2026-06-07T12:06:55.3344248Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":33,"playSeq":21,"playIdx":10,"type":30,"knownList":[{"idx":10,"cardId":101121080,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:06:55.5239284Z","direction":"send","uri":"Echo","body":{"playIdx":10,"orderList":[{"move":{"idx":[10],"isSelf":0,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:06:56.0979233Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":34,"playSeq":22}} +{"ts":"2026-06-07T12:06:56.5964232Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":35,"playSeq":23,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:57.4474248Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[2,3,16,15,24,11],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":3}}]}} +{"ts":"2026-06-07T12:06:57.5634280Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"149","key2":"305","key3":"228332150","key4":"150","key5":"302","key6":"101121116"}}} +{"ts":"2026-06-07T12:06:57.5794253Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":36,"playSeq":24,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:57.6139259Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[39],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"actionSeq":22}} +{"ts":"2026-06-07T12:07:02.6699249Z","direction":"send","uri":"PlayActions","body":{"playIdx":39,"orderList":[{"move":{"idx":[39],"isSelf":1,"from":10,"to":30}},{"alter":{"idx":[1,4,5,19,41],"isSelf":1,"type":"add","spellboost":"a1","attachTarget":"7"}},{"move":{"idx":[17],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}},{"trigger":{"isSelf":1,"avarice":1}}],"type":30}} +{"ts":"2026-06-07T12:07:10.2104225Z","direction":"send","uri":"PlayActions","body":{"playIdx":41,"orderList":[{"move":{"idx":[41],"isSelf":1,"from":10,"to":20}},{"move":{"idx":[6],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"type":30}} +{"ts":"2026-06-07T12:07:17.7444250Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,4,5,19,17,6],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":3}},{"trigger":{"isSelf":1,"avarice":0}}]}} +{"ts":"2026-06-07T12:07:18.2599231Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"147","key2":"221","key3":"349343345","key4":"150","key5":"302","key6":"101121116"},"type":0,"actionSeq":26,"cemetery":[2,1]}} +{"ts":"2026-06-07T12:07:18.3594228Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":41,"playSeq":25,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:18.3874231Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[6],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-07T12:07:22.0834250Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":42,"playSeq":26,"playIdx":6,"type":30,"knownList":[{"idx":6,"cardId":113011010,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}],"uList":[{"idxList":[34],"from":0,"to":10,"isSelf":1,"skill":"6|19|0"}]}} +{"ts":"2026-06-07T12:07:22.2814232Z","direction":"send","uri":"Echo","body":{"playIdx":6,"orderList":[{"move":{"idx":[6],"isSelf":0,"from":10,"to":20}},{"target":{"isSelf":0,"group":["g1"],"conditions":[{"state":0,"tribe":"eq7"}],"rand":[[0.739030951046865]]}},{"move":{"idx":"g1","isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}},{"trigger":{"isSelf":0,"avarice":1}}],"type":30}} +{"ts":"2026-06-07T12:07:25.6384231Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":43,"playSeq":27}} +{"ts":"2026-06-07T12:07:25.6554259Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[2,3,16,15,24,11,34],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":3}},{"trigger":{"isSelf":0,"avarice":0}}]}} +{"ts":"2026-06-07T12:07:26.1384241Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":44,"playSeq":28,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:26.1544243Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"147","key2":"221","key3":"349343345","key4":"149","key5":"540","key6":"214132162"}}} +{"ts":"2026-06-07T12:07:26.1709251Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":45,"playSeq":29,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:26.2184224Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[32],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":29}} +{"ts":"2026-06-07T12:07:34.2019228Z","direction":"send","uri":"PlayActions","body":{"playIdx":1,"targetList":[{"targetIdx":6,"isSelf":1,"selectSkillIndex":[1],"skillIndex":[1]}],"orderList":[{"move":{"idx":[1],"isSelf":1,"from":10,"to":30}},{"alter":{"idx":[4,5,19,17,6,32],"isSelf":1,"type":"add","spellboost":"a1","attachTarget":"20"}},{"alter":{"idx":[6],"isSelf":1,"type":"add","spellboost":"a2","attachTarget":"21"}},{"move":{"idx":[23],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}},{"trigger":{"isSelf":1,"avarice":1}}],"type":31}} +{"ts":"2026-06-07T12:07:41.2306722Z","direction":"send","uri":"PlayActions","body":{"playIdx":17,"orderList":[{"move":{"idx":[17],"isSelf":1,"from":10,"to":30}},{"alter":{"idx":[4,5,19,6,32,23],"isSelf":1,"type":"add","spellboost":"a1","attachTarget":"23"}},{"add":{"idx":[42],"isSelf":1,"card":{"cardId":900311050}}},{"move":{"idx":[42],"isSelf":1,"from":50,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:07:46.6846799Z","direction":"send","uri":"PlayActions","body":{"playIdx":41,"targetList":[{"targetIdx":10,"isSelf":0}],"type":10}} +{"ts":"2026-06-07T12:07:48.2356829Z","direction":"send","uri":"PlayActions","body":{"playIdx":29,"targetList":[{"targetIdx":10,"isSelf":0}],"orderList":[{"move":{"idx":[29],"isSelf":1,"from":20,"to":30}},{"move":{"idx":[10],"isSelf":0,"from":20,"to":30}}],"type":10}} +{"ts":"2026-06-07T12:07:49.9904200Z","direction":"send","uri":"PlayActions","body":{"playIdx":3,"targetList":[{"targetIdx":6,"isSelf":0}],"orderList":[{"move":{"idx":[3],"isSelf":1,"from":20,"to":30}},{"move":{"idx":[6],"isSelf":0,"from":20,"to":30}}],"type":10}} +{"ts":"2026-06-07T12:07:51.8734061Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[4,5,19,6,32,23],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":5}},{"trigger":{"isSelf":1,"avarice":0}}]}} +{"ts":"2026-06-07T12:07:52.3726572Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"154","key2":"393","key3":"1021322270","key4":"153","key5":"540","key6":"0"},"type":0,"actionSeq":36,"cemetery":[6,3]}} +{"ts":"2026-06-07T12:07:52.4729369Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":53,"playSeq":30,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:52.4946960Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":6}},{"move":{"idx":[18],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-07T12:07:57.1776003Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":54,"playSeq":31,"playIdx":34,"type":30,"knownList":[{"idx":34,"cardId":113011010,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}],"uList":[{"idxList":[5],"from":0,"to":10,"isSelf":1,"skill":"34|28|0"}]}} +{"ts":"2026-06-07T12:07:57.2503917Z","direction":"send","uri":"Echo","body":{"playIdx":34,"orderList":[{"move":{"idx":[34],"isSelf":0,"from":10,"to":20}},{"target":{"isSelf":0,"group":["g1"],"conditions":[{"state":0,"tribe":"eq7"}],"rand":[[0.668529128501438]]}},{"move":{"idx":"g1","isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}},{"trigger":{"isSelf":0,"avarice":1}}],"type":30}} +{"ts":"2026-06-07T12:07:58.2623261Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":55,"playSeq":32,"playIdx":18,"type":30,"knownList":[{"idx":18,"cardId":100111010,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:08:00.2645722Z","direction":"send","uri":"Echo","body":{"playIdx":18,"orderList":[{"move":{"idx":[18],"isSelf":0,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:08:02.7695981Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":56,"playSeq":33,"playIdx":5,"type":30,"knownList":[{"idx":5,"cardId":113011010,"to":20,"spellboost":0,"attachTarget":"","cost":2,"clan":0,"tribe":"7"}]}} +{"ts":"2026-06-07T12:08:02.8451199Z","direction":"send","uri":"Echo","body":{"playIdx":5,"orderList":[{"move":{"idx":[5],"isSelf":0,"from":10,"to":20}},{"scan":{"idx":[4,7,8,9,12,13,14,17,19,20,21,22,23,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40],"conditions":[{"tribe":"7"}]}}],"type":30}} +{"ts":"2026-06-07T12:08:05.7442862Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":57,"playSeq":34}} +{"ts":"2026-06-07T12:08:05.7667846Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[2,3,16,15,24,11],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":1}},{"move":{"idx":[42],"isSelf":1,"from":20,"to":30,"hasGuard":[42]}},{"trigger":{"isSelf":0,"avarice":0}}]}} +{"ts":"2026-06-07T12:08:06.2448192Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":58,"playSeq":35,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:06.2608181Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"156","key2":"393","key3":"121011060","key4":"152","key5":"302","key6":"326133205"}}} +{"ts":"2026-06-07T12:08:06.2778185Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":64,"playSeq":36,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:06.3228189Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[38],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":41}} +{"ts":"2026-06-07T12:08:17.8343721Z","direction":"send","uri":"PlayActions","body":{"playIdx":19,"keyAction":[{"type":1,"cardId":127011010,"selectCard":{"cardId":[120011010],"open":0}}],"orderList":[{"move":{"idx":[19],"isSelf":1,"from":10,"to":20}},{"add":{"idx":[43],"isSelf":1,"card":{"cardId":120011010},"isChoice":"1"}},{"move":{"idx":[43],"isSelf":1,"from":50,"to":10}}],"type":30}} +{"ts":"2026-06-07T12:08:21.3291075Z","direction":"send","uri":"PlayActions","body":{"playIdx":4,"targetList":[{"targetIdx":5,"isSelf":0,"selectSkillIndex":[1]}],"orderList":[{"move":{"idx":[4],"isSelf":1,"from":10,"to":30}},{"alter":{"idx":[5,6,32,23,38,43],"isSelf":1,"type":"add","spellboost":"a1","attachTarget":"33"}},{"metamorphose":{"idx":[5],"isSelf":0,"after":{"cardId":900311020}}}],"type":31}} +{"ts":"2026-06-07T12:08:25.9578557Z","direction":"send","uri":"PlayActions","body":{"playIdx":5,"targetList":[{"targetIdx":34,"isSelf":0,"selectSkillIndex":[1]}],"orderList":[{"move":{"idx":[5],"isSelf":1,"from":10,"to":30}},{"alter":{"idx":[6,32,23,38,43],"isSelf":1,"type":"add","spellboost":"a1","attachTarget":"36"}},{"move":{"idx":[34],"isSelf":0,"from":20,"to":30}},{"add":{"idx":[44],"isSelf":1,"card":{"cardId":900334010}}},{"move":{"idx":[44],"isSelf":1,"from":50,"to":10}}],"type":31}} +{"ts":"2026-06-07T12:08:29.5860517Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[6,32,23,38,43,44],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":3}}]}} +{"ts":"2026-06-07T12:08:30.0854894Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"162","key2":"770","key3":"248022140","key4":"154","key5":"302","key6":"1000422107"},"type":0,"actionSeq":46,"cemetery":[9,4]}} +{"ts":"2026-06-07T12:08:30.1853353Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":65,"playSeq":37,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:30.2078357Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[35],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-07T12:08:37.7255447Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":66,"playSeq":38,"playIdx":15,"type":30,"knownList":[{"idx":15,"cardId":101121110,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:08:37.9275599Z","direction":"send","uri":"Echo","body":{"playIdx":15,"orderList":[{"move":{"idx":[15],"isSelf":0,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:08:38.5997627Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":67,"playSeq":39}} +{"ts":"2026-06-07T12:08:39.0994174Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":68,"playSeq":40,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:39.8688009Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[2,3,16,24,11,35],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":5}}]}} +{"ts":"2026-06-07T12:08:39.9995393Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"162","key2":"770","key3":"248022140","key4":"156","key5":"417","key6":"1101543355"}}} +{"ts":"2026-06-07T12:08:40.0160656Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":80,"playSeq":41,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:40.0427529Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[20],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"actionSeq":49}} +{"ts":"2026-06-07T12:08:44.0590977Z","direction":"send","uri":"PlayActions","body":{"playIdx":20,"orderList":[{"move":{"idx":[20],"isSelf":1,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:08:49.2798814Z","direction":"send","uri":"PlayActions","body":{"playIdx":23,"orderList":[{"move":{"idx":[23],"isSelf":1,"from":10,"to":20}},{"playerParam":{"isSelf":1,"buffUnit":1}}],"type":30}} diff --git a/SVSim.BattleEngine.Tests/Fixtures/battle_test_fresh_cl2.ndjson b/SVSim.BattleEngine.Tests/Fixtures/battle_test_fresh_cl2.ndjson new file mode 100644 index 0000000..105bc48 --- /dev/null +++ b/SVSim.BattleEngine.Tests/Fixtures/battle_test_fresh_cl2.ndjson @@ -0,0 +1,118 @@ +{"ts":"2026-06-07T12:05:10.0764449Z","direction":"receive","uri":null,"body":{"uri":"InitNetwork","viewerId":999999999,"uuid":"node-stub","try":0,"cat":99,"resultCode":1}} +{"ts":"2026-06-07T12:05:10.1264431Z","direction":"receive","uri":null,"body":{"uri":"Matched","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"bid":"907324319325","playSeq":1,"selfInfo":{"country_code":"KOR","userName":"SVSim2","sleeveId":"3000011","emblemId":"100000000","degreeId":"300003","fieldId":43,"isOfficial":0,"oppoId":7,"seed":742186477},"oppoInfo":{"country_code":"KOR","userName":"SVSim1","sleeveId":"3000011","emblemId":"100000000","degreeId":"300003","fieldId":43,"isOfficial":0,"oppoId":6,"seed":742186477,"oppoDeckCount":40},"selfDeck":[{"idx":1,"cardId":102131030},{"idx":2,"cardId":101121080},{"idx":3,"cardId":101131050},{"idx":4,"cardId":101114010},{"idx":5,"cardId":113011010},{"idx":6,"cardId":113011010},{"idx":7,"cardId":101121020},{"idx":8,"cardId":101121010},{"idx":9,"cardId":102141010},{"idx":10,"cardId":101121080},{"idx":11,"cardId":101114010},{"idx":12,"cardId":102111060},{"idx":13,"cardId":102131020},{"idx":14,"cardId":102131010},{"idx":15,"cardId":101121110},{"idx":16,"cardId":101121110},{"idx":17,"cardId":100111020},{"idx":18,"cardId":100111010},{"idx":19,"cardId":102121030},{"idx":20,"cardId":100111020},{"idx":21,"cardId":101121080},{"idx":22,"cardId":101121020},{"idx":23,"cardId":100111070},{"idx":24,"cardId":102111060},{"idx":25,"cardId":101131020},{"idx":26,"cardId":101114050},{"idx":27,"cardId":101114050},{"idx":28,"cardId":101121010},{"idx":29,"cardId":701141011},{"idx":30,"cardId":102121010},{"idx":31,"cardId":100111010},{"idx":32,"cardId":100114010},{"idx":33,"cardId":101114050},{"idx":34,"cardId":113011010},{"idx":35,"cardId":100114010},{"idx":36,"cardId":100111020},{"idx":37,"cardId":102121030},{"idx":38,"cardId":102121010},{"idx":39,"cardId":100114010},{"idx":40,"cardId":100111070}],"resultCode":1}} +{"ts":"2026-06-07T12:05:13.3624432Z","direction":"receive","uri":null,"body":{"uri":"BattleStart","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":2,"turnState":1,"battleType":11,"selfInfo":{"rank":"10","battlePoint":"6270","classId":"1","charaId":"1","cardMasterName":"card_master_node_10015"},"oppoInfo":{"rank":"1","isMasterRank":"0","battlePoint":0,"masterPoint":"0","classId":"3","charaId":"3","cardMasterName":"card_master_node_10015"},"resultCode":1}} +{"ts":"2026-06-07T12:05:13.3644442Z","direction":"receive","uri":null,"body":{"uri":"Deal","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":3,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"oppo":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"resultCode":1}} +{"ts":"2026-06-07T12:05:29.7550686Z","direction":"send","uri":"Swap","body":{"idxList":[]}} +{"ts":"2026-06-07T12:05:29.7695695Z","direction":"receive","uri":null,"body":{"uri":"Swap","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":4,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"resultCode":1}} +{"ts":"2026-06-07T12:05:34.8895711Z","direction":"receive","uri":null,"body":{"uri":"Ready","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"playSeq":5,"self":[{"pos":0,"idx":1},{"pos":1,"idx":2},{"pos":2,"idx":3}],"oppo":[{"pos":0,"idx":1},{"pos":1,"idx":4},{"pos":2,"idx":5}],"idxChangeSeed":661650374,"spin":243,"resultCode":1}} +{"ts":"2026-06-07T12:05:36.7840686Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":5,"playSeq":6,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:37.9140709Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[8],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}]}} +{"ts":"2026-06-07T12:05:42.3100693Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":6,"playSeq":7}} +{"ts":"2026-06-07T12:05:42.3835692Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,4,5,8],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":0}}]}} +{"ts":"2026-06-07T12:05:42.7575705Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":7,"playSeq":8,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:42.7750675Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"143","key2":"14","key3":"0","key4":"141","key5":"56","key6":"0"}}} +{"ts":"2026-06-07T12:05:42.7905712Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":7,"playSeq":9,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:42.8590737Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[10,16],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"avarice":1}}],"actionSeq":2}} +{"ts":"2026-06-07T12:05:46.4565675Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[1,2,3,10,16],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":0}},{"trigger":{"isSelf":1,"avarice":0}}]}} +{"ts":"2026-06-07T12:05:46.9540693Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"142","key2":"134","key3":"0","key4":"141","key5":"56","key6":"0"},"type":0,"actionSeq":4,"cemetery":[0,0]}} +{"ts":"2026-06-07T12:05:47.5195696Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":11,"playSeq":10,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:47.5415707Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[29],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-07T12:05:54.7275709Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":12,"playSeq":11,"playIdx":8,"type":30,"knownList":[{"idx":8,"cardId":102331010,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:05:54.9510692Z","direction":"send","uri":"Echo","body":{"playIdx":8,"orderList":[{"move":{"idx":[8],"isSelf":0,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:05:55.7230693Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":13,"playSeq":12}} +{"ts":"2026-06-07T12:05:56.2255669Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":14,"playSeq":13,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:56.9100687Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,4,5,29],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":2}}]}} +{"ts":"2026-06-07T12:05:57.0275696Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"142","key2":"134","key3":"0","key4":"143","key5":"140","key6":"102331036"}}} +{"ts":"2026-06-07T12:05:57.0415684Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":14,"playSeq":14,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:05:57.0740682Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[15],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"actionSeq":7}} +{"ts":"2026-06-07T12:06:12.6129250Z","direction":"send","uri":"PlayActions","body":{"playIdx":1,"orderList":[{"move":{"idx":[1],"isSelf":1,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:06:16.4794226Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[2,3,10,16,15],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":2}}]}} +{"ts":"2026-06-07T12:06:16.9789227Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"144","key2":"177","key3":"102131049","key4":"143","key5":"140","key6":"102331036"},"type":0,"actionSeq":10,"cemetery":[0,0]}} +{"ts":"2026-06-07T12:06:17.0619236Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":19,"playSeq":15,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:17.0839228Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[3],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}]}} +{"ts":"2026-06-07T12:06:28.8204242Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":20,"playSeq":16,"playIdx":3,"type":30,"knownList":[{"idx":3,"cardId":101321040,"to":20,"spellboost":0,"attachTarget":"","cost":2,"clan":3,"tribe":"0"}]}} +{"ts":"2026-06-07T12:06:29.0409223Z","direction":"send","uri":"Echo","body":{"playIdx":3,"orderList":[{"move":{"idx":[3],"isSelf":0,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:06:29.8804238Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":21,"playSeq":17}} +{"ts":"2026-06-07T12:06:30.3639243Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":22,"playSeq":18,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:30.9664239Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,4,5,29],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":2}}]}} +{"ts":"2026-06-07T12:06:31.1154246Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"144","key2":"177","key3":"102131049","key4":"145","key5":"140","key6":"203652104"}}} +{"ts":"2026-06-07T12:06:31.1309231Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":22,"playSeq":19,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:31.1914245Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[24],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":13}} +{"ts":"2026-06-07T12:06:36.0239226Z","direction":"send","uri":"PlayActions","body":{"playIdx":1,"targetList":[{"targetIdx":8,"isSelf":0}],"orderList":[{"move":{"idx":[1],"isSelf":1,"from":20,"to":30}},{"move":{"idx":[8],"isSelf":0,"from":20,"to":30}}],"type":10}} +{"ts":"2026-06-07T12:06:36.6854243Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[2,3,10,16,15,24],"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":0}}]}} +{"ts":"2026-06-07T12:06:37.1859231Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"148","key2":"321","key3":"0","key4":"147","key5":"140","key6":"101321058"},"type":0,"actionSeq":16,"cemetery":[1,1]}} +{"ts":"2026-06-07T12:06:38.2359235Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":27,"playSeq":20,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:38.2569229Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":2}},{"move":{"idx":[19],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-07T12:06:46.5794252Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":30,"playSeq":21,"playIdx":29,"type":30,"knownList":[{"idx":29,"cardId":127011010,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}],"keyAction":[{"type":1,"cardId":127011010}]}} +{"ts":"2026-06-07T12:06:47.0374244Z","direction":"send","uri":"Echo","body":{"playIdx":29,"orderList":[{"move":{"idx":[29],"isSelf":0,"from":10,"to":20}},{"add":{"idx":[41],"isSelf":0,"card":{"candidates":[121011010,120011010]},"isChoice":"1"}},{"move":{"idx":[41],"isSelf":0,"from":50,"to":10}}],"type":30}} +{"ts":"2026-06-07T12:06:50.3279267Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":31,"playSeq":22}} +{"ts":"2026-06-07T12:06:50.3444241Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,4,5,19,41],"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":2}}]}} +{"ts":"2026-06-07T12:06:50.8274230Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":32,"playSeq":23,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:50.8434224Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"148","key2":"321","key3":"0","key4":"149","key5":"305","key6":"228332150"}}} +{"ts":"2026-06-07T12:06:50.8594230Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":31,"playSeq":24,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:50.9024228Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[11],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}}],"actionSeq":19}} +{"ts":"2026-06-07T12:06:55.3169242Z","direction":"send","uri":"PlayActions","body":{"playIdx":10,"orderList":[{"move":{"idx":[10],"isSelf":1,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:06:56.0779247Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[2,3,16,15,24,11],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":3}}]}} +{"ts":"2026-06-07T12:06:56.5774224Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"150","key2":"302","key3":"101121116","key4":"149","key5":"305","key6":"228332150"},"type":0,"actionSeq":22,"cemetery":[1,1]}} +{"ts":"2026-06-07T12:06:57.6284227Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":37,"playSeq":25,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:06:57.6504253Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[39],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}]}} +{"ts":"2026-06-07T12:07:02.6859240Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":38,"playSeq":26,"playIdx":39,"type":30,"knownList":[{"idx":39,"cardId":100314010,"to":30,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:07:02.8454236Z","direction":"send","uri":"Echo","body":{"playIdx":39,"orderList":[{"move":{"idx":[39],"isSelf":0,"from":10,"to":30}},{"alter":{"idx":[1,4,5,19,41],"isSelf":0,"type":"add","spellboost":"a1","attachTarget":"7"}},{"move":{"idx":[17],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}},{"trigger":{"isSelf":0,"avarice":1}}],"type":30}} +{"ts":"2026-06-07T12:07:10.2264230Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":39,"playSeq":27,"playIdx":41,"type":30,"knownList":[{"idx":41,"cardId":121011010,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:07:10.3164226Z","direction":"send","uri":"Echo","body":{"playIdx":41,"orderList":[{"move":{"idx":[41],"isSelf":0,"from":10,"to":20}},{"move":{"idx":[6],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}],"type":30}} +{"ts":"2026-06-07T12:07:17.7599274Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":40,"playSeq":28}} +{"ts":"2026-06-07T12:07:17.7789256Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[1,4,5,19,17,6],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":3}},{"trigger":{"isSelf":0,"avarice":0}}]}} +{"ts":"2026-06-07T12:07:18.2769237Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":41,"playSeq":29,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:18.2949243Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"150","key2":"302","key3":"101121116","key4":"147","key5":"221","key6":"349343345"}}} +{"ts":"2026-06-07T12:07:18.3089265Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":40,"playSeq":30,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:18.3409222Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[6],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":26}} +{"ts":"2026-06-07T12:07:22.0604232Z","direction":"send","uri":"PlayActions","body":{"playIdx":6,"orderList":[{"move":{"idx":[6],"isSelf":1,"from":10,"to":20}},{"move":{"idx":[34],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}},{"trigger":{"isSelf":1,"avarice":1}}],"uList":[{"idxList":[34],"from":0,"to":10,"isSelf":1,"skill":"6|19|0"}],"type":30}} +{"ts":"2026-06-07T12:07:25.6229734Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[2,3,16,15,24,11,34],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":3}},{"trigger":{"isSelf":1,"avarice":0}}]}} +{"ts":"2026-06-07T12:07:26.1224220Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"149","key2":"540","key3":"214132162","key4":"147","key5":"221","key6":"349343345"},"type":0,"actionSeq":29,"cemetery":[1,2]}} +{"ts":"2026-06-07T12:07:26.2219233Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":46,"playSeq":31,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:26.2444230Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[32],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-07T12:07:34.2504226Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":49,"playSeq":32,"playIdx":1,"type":31,"knownList":[{"idx":1,"cardId":101324040,"to":30,"spellboost":0,"attachTarget":"","cost":3,"clan":3,"tribe":"0"}],"oppoTargetList":[{"targetIdx":6,"isSelf":1}]}} +{"ts":"2026-06-07T12:07:34.4124257Z","direction":"send","uri":"Echo","body":{"playIdx":1,"orderList":[{"move":{"idx":[1],"isSelf":0,"from":10,"to":30}},{"alter":{"idx":[4,5,19,17,6,32],"isSelf":0,"type":"add","spellboost":"a1","attachTarget":"20"}},{"move":{"idx":[23],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}},{"trigger":{"isSelf":0,"avarice":1}}],"type":31}} +{"ts":"2026-06-07T12:07:41.2491729Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":50,"playSeq":33,"playIdx":17,"type":30,"knownList":[{"idx":17,"cardId":102324040,"to":30,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:07:41.4554809Z","direction":"send","uri":"Echo","body":{"playIdx":17,"orderList":[{"move":{"idx":[17],"isSelf":0,"from":10,"to":30}},{"alter":{"idx":[4,5,19,6,32,23],"isSelf":0,"type":"add","spellboost":"a1","attachTarget":"23"}},{"add":{"idx":[42],"isSelf":0,"card":{"cardId":900311050}}},{"move":{"idx":[42],"isSelf":0,"from":50,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:07:46.6891818Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":52,"playSeq":34,"playIdx":41,"type":10,"oppoTargetList":[{"targetIdx":10,"isSelf":0}]}} +{"ts":"2026-06-07T12:07:46.7161815Z","direction":"send","uri":"Echo","body":{"playIdx":41,"type":10}} +{"ts":"2026-06-07T12:07:48.2401820Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":54,"playSeq":35,"playIdx":29,"type":10,"knownList":[{"idx":29,"cardId":127011010,"to":30,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}],"oppoTargetList":[{"targetIdx":10,"isSelf":0}]}} +{"ts":"2026-06-07T12:07:48.3302904Z","direction":"send","uri":"Echo","body":{"playIdx":29,"orderList":[{"move":{"idx":[29],"isSelf":0,"from":20,"to":30}},{"move":{"idx":[10],"isSelf":1,"from":20,"to":30}}],"type":10}} +{"ts":"2026-06-07T12:07:50.0089639Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":56,"playSeq":36,"playIdx":3,"type":10,"knownList":[{"idx":3,"cardId":101321040,"to":30,"spellboost":0,"attachTarget":"","cost":2,"clan":3,"tribe":"0"}],"oppoTargetList":[{"targetIdx":6,"isSelf":0}]}} +{"ts":"2026-06-07T12:07:50.2322631Z","direction":"send","uri":"Echo","body":{"playIdx":3,"orderList":[{"move":{"idx":[3],"isSelf":0,"from":20,"to":30}},{"move":{"idx":[6],"isSelf":1,"from":20,"to":30}}],"type":10}} +{"ts":"2026-06-07T12:07:51.8934054Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":57,"playSeq":37}} +{"ts":"2026-06-07T12:07:52.0776073Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[4,5,19,6,32,23],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":5}},{"trigger":{"isSelf":0,"avarice":0}}]}} +{"ts":"2026-06-07T12:07:52.3771546Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":58,"playSeq":38,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:52.3931550Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"153","key2":"540","key3":"0","key4":"154","key5":"393","key6":"1021322270"}}} +{"ts":"2026-06-07T12:07:52.4097475Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":52,"playSeq":39,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:07:52.4689367Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":6}},{"move":{"idx":[18],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":36}} +{"ts":"2026-06-07T12:07:57.1625968Z","direction":"send","uri":"PlayActions","body":{"playIdx":34,"orderList":[{"move":{"idx":[34],"isSelf":1,"from":10,"to":20}},{"move":{"idx":[5],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":1}},{"trigger":{"isSelf":1,"avarice":1}}],"uList":[{"idxList":[5],"from":0,"to":10,"isSelf":1,"skill":"34|28|0"}],"type":30}} +{"ts":"2026-06-07T12:07:58.2473269Z","direction":"send","uri":"PlayActions","body":{"playIdx":18,"orderList":[{"move":{"idx":[18],"isSelf":1,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:08:02.7615951Z","direction":"send","uri":"PlayActions","body":{"playIdx":5,"orderList":[{"move":{"idx":[5],"isSelf":1,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:08:05.7352832Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[2,3,16,15,24,11],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":1}},{"move":{"idx":[42],"isSelf":0,"from":20,"to":30,"hasGuard":[42]}},{"trigger":{"isSelf":1,"avarice":0}}]}} +{"ts":"2026-06-07T12:08:06.2301214Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"152","key2":"302","key3":"326133205","key4":"156","key5":"393","key6":"121011060"},"type":0,"actionSeq":41,"cemetery":[3,7]}} +{"ts":"2026-06-07T12:08:06.3303197Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":65,"playSeq":40,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:06.3513355Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[38],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":0}}]}} +{"ts":"2026-06-07T12:08:17.8463749Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":68,"playSeq":41,"playIdx":19,"type":30,"knownList":[{"idx":19,"cardId":127011010,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}],"keyAction":[{"type":1,"cardId":127011010}]}} +{"ts":"2026-06-07T12:08:17.9224312Z","direction":"send","uri":"Echo","body":{"playIdx":19,"orderList":[{"move":{"idx":[19],"isSelf":0,"from":10,"to":20}},{"add":{"idx":[43],"isSelf":0,"card":{"candidates":[121011010,120011010]},"isChoice":"1"}},{"move":{"idx":[43],"isSelf":0,"from":50,"to":10}}],"type":30}} +{"ts":"2026-06-07T12:08:21.3856074Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":71,"playSeq":42,"playIdx":4,"type":31,"knownList":[{"idx":4,"cardId":101324050,"to":30,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}],"oppoTargetList":[{"targetIdx":5,"isSelf":0}]}} +{"ts":"2026-06-07T12:08:21.5844099Z","direction":"send","uri":"Echo","body":{"playIdx":4,"orderList":[{"move":{"idx":[4],"isSelf":0,"from":10,"to":30}},{"alter":{"idx":[5,6,32,23,38,43],"isSelf":0,"type":"add","spellboost":"a1","attachTarget":"33"}},{"metamorphose":{"idx":[5],"isSelf":1,"after":{"cardId":900311020}}}],"type":31}} +{"ts":"2026-06-07T12:08:25.9743530Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":74,"playSeq":43,"playIdx":5,"type":31,"knownList":[{"idx":5,"cardId":101334030,"to":30,"spellboost":2,"attachTarget":"","cost":3,"clan":3,"tribe":"0"}],"oppoTargetList":[{"targetIdx":34,"isSelf":0}]}} +{"ts":"2026-06-07T12:08:26.1638091Z","direction":"send","uri":"Echo","body":{"playIdx":5,"orderList":[{"move":{"idx":[5],"isSelf":0,"from":10,"to":30}},{"alter":{"idx":[6,32,23,38,43],"isSelf":0,"type":"add","spellboost":"a1","attachTarget":"36"}},{"move":{"idx":[34],"isSelf":1,"from":20,"to":30}},{"add":{"idx":[44],"isSelf":0,"card":{"cardId":900334010}}},{"move":{"idx":[44],"isSelf":0,"from":50,"to":10}}],"type":31}} +{"ts":"2026-06-07T12:08:29.6025555Z","direction":"receive","uri":null,"body":{"uri":"TurnEndActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":75,"playSeq":44}} +{"ts":"2026-06-07T12:08:29.6190527Z","direction":"send","uri":"Echo","body":{"orderList":[{"trigger":{"isSelf":0,"turnEndRestore":[6,32,23,38,43,44],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"maxAtk":3}}]}} +{"ts":"2026-06-07T12:08:30.1015223Z","direction":"receive","uri":null,"body":{"uri":"TurnEnd","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":76,"playSeq":45,"turnState":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:30.1180409Z","direction":"send","uri":"Judge","body":{"battleCode":{"key1":"154","key2":"302","key3":"1000422107","key4":"162","key5":"770","key6":"248022140"}}} +{"ts":"2026-06-07T12:08:30.1345601Z","direction":"receive","uri":null,"body":{"uri":"Judge","viewerId":6,"uuid":"10d8e723-ac93-47a5-b307-cf3a0d6026e4","try":1,"cat":1,"bid":"907324319325","pubSeq":64,"playSeq":46,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:30.1768361Z","direction":"send","uri":"TurnStart","body":{"orderList":[{"playerParam":{"isSelf":1,"maxPP":1}},{"trigger":{"isSelf":1,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":0,"turnDamageFromUnit":0}},{"move":{"idx":[35],"isSelf":1,"from":0,"to":10}},{"trigger":{"isSelf":1,"resonance":0}}],"actionSeq":46}} +{"ts":"2026-06-07T12:08:37.7130477Z","direction":"send","uri":"PlayActions","body":{"playIdx":15,"orderList":[{"move":{"idx":[15],"isSelf":1,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:08:38.5902629Z","direction":"send","uri":"TurnEndActions","body":{"orderList":[{"trigger":{"isSelf":1,"turnEndRestore":[2,3,16,24,11,35],"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"maxAtk":5}}]}} +{"ts":"2026-06-07T12:08:39.0894170Z","direction":"send","uri":"TurnEnd","body":{"battleCode":{"key1":"156","key2":"417","key3":"1101543355","key4":"162","key5":"770","key6":"248022140"},"type":0,"actionSeq":49,"cemetery":[4,9]}} +{"ts":"2026-06-07T12:08:40.0572510Z","direction":"receive","uri":null,"body":{"uri":"TurnStart","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":81,"playSeq":47,"spin":0,"resultCode":1}} +{"ts":"2026-06-07T12:08:40.0784574Z","direction":"send","uri":"Echo","body":{"orderList":[{"playerParam":{"isSelf":0,"maxPP":1}},{"trigger":{"isSelf":0,"turnStartRestore":1,"canEvolve":1,"isUnlimited":1}},{"trigger":{"isSelf":1,"turnDamageFromUnit":0}},{"move":{"idx":[20],"isSelf":0,"from":0,"to":10}},{"trigger":{"isSelf":0,"resonance":1}}]}} +{"ts":"2026-06-07T12:08:44.0705950Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":82,"playSeq":48,"playIdx":20,"type":30,"knownList":[{"idx":20,"cardId":101311010,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:08:44.2734716Z","direction":"send","uri":"Echo","body":{"playIdx":20,"orderList":[{"move":{"idx":[20],"isSelf":0,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:08:49.2868793Z","direction":"receive","uri":null,"body":{"uri":"PlayActions","viewerId":7,"uuid":"a7ee9b5f-b0c5-48de-82b1-1a2468cfc696","try":1,"cat":1,"bid":"907324319325","pubSeq":83,"playSeq":49,"playIdx":23,"type":30,"knownList":[{"idx":23,"cardId":101321070,"to":20,"spellboost":0,"attachTarget":"","cost":0,"clan":0,"tribe":"0"}]}} +{"ts":"2026-06-07T12:08:49.5008504Z","direction":"send","uri":"Echo","body":{"playIdx":23,"orderList":[{"move":{"idx":[23],"isSelf":0,"from":10,"to":20}}],"type":30}} +{"ts":"2026-06-07T12:09:11.1269227Z","direction":"receive","uri":null,"body":{"uri":"BattleFinish","viewerId":999999999,"uuid":"node-stub","try":0,"cat":1,"result":201,"resultCode":1}} diff --git a/SVSim.BattleEngine.Tests/GatedConditionalOracleTests.cs b/SVSim.BattleEngine.Tests/GatedConditionalOracleTests.cs new file mode 100644 index 0000000..abce40a --- /dev/null +++ b/SVSim.BattleEngine.Tests/GatedConditionalOracleTests.cs @@ -0,0 +1,151 @@ +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M11 (the GATE itself is the oracle): every prior milestone either had no skill_condition or + // seeded its gate TRUE so the effect fires (M4 seeded play_count>2; M10 seeded a play_count + // VALUE). None proved the engine SUPPRESSES an effect when a skill_condition evaluates FALSE — + // the dual of "effect fires". M11 proves conditional BRANCHING resolves headless by asserting + // BOTH directions of the SAME gated card in ONE fixture (design "M11 — NEXT" resume guide): + // + // * gate TRUE (play_count > 2, seeded via the public AddCurrentTrunPlayCount seam M4/M10 use) + // -> the when_play powerup fires -> the follower is buffed over its base stats. + // * gate FALSE (play_count <= 2, the bare-construction default) + // -> the powerup is a NO-OP: zero stat delta, BUT the card still pays its cost + // and still leaves hand -> board (the gate suppresses the EFFECT, not the PLAY). + // + // Card: 103111050 — the M4 self-buff follower (ELF clan-1 cost-1 base 1/1, sole non-evo skill + // `when_play` `powerup` `add_offense=1&add_life=1` to `character=me&target=self`), whose + // skill_condition is `character=me&target=self&play_count>2` (verified in cards.json). The gate + // reads BattlePlayerBase.GetCurrentTurnPlayCount(), seedable past/below the threshold via the + // public AddCurrentTrunPlayCount. Reusing the M4-proven buff DIMENSION means the only NEW thing + // under test is the CONDITIONAL — exactly the resume-guide's "proven effect dimension, gate is + // the oracle" prescription. + // + // Why one fixture, both branches, ONE card is decisive: the two assertions are jointly + // satisfiable ONLY by a correctly-gating engine. An "always-buffs" engine fails the FALSE branch + // (would buff with play_count=0); a "never-buffs" engine fails the TRUE branch (M4's gate seed + // wouldn't fire). M4 already demonstrated this split as a manual load-bearing probe (remove the + // seed -> buff vanishes); M11 promotes it to the PRIMARY assertion. + [TestFixture] + public class GatedConditionalOracleTests + { + // A clearly super-threshold seed (play_count 5 > 2): the gate evaluates TRUE, fanfare fires. + private const int GateTrueSeed = 5; + // The bare-construction default is play_count 0 (<= 2 -> gate FALSE); we seed nothing for the + // FALSE branch, exactly as M4's load-bearing probe did when it removed its seed. + private const int GateFalseSeed = 0; + + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + // Resolve the gated self-buff follower on a FRESH battle with the per-turn play count seeded + // to `seededPlayCount`, and report the play's outcome. A fresh mgr per branch is required: + // play_count is per-mgr state and a resolved play mutates the board, so the two branches must + // not share a battle. Mirrors the M4 BuffFollowerOracleTests setup verbatim, parameterized on + // the seed (which is the only thing M11 varies between branches). + private (BattleCardBase card, CardParameter param, int ppBefore, int ppAfter, + int handBefore, bool inHandAfter, int inplayBefore, bool onBoardAfter, int inplayAfter) + PlayGatedSelfBuff(int seededPlayCount) + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; // route GetIns() to this branch's mgr + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (M2/M3/M4 oracles): opponent refs + active turn flag. The + // self-buff target resolver (`character=me&target=self`) reads the active player's own + // in-play card, so the turn flag must be set before the fanfare sweeps. + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life so neither leader reads as a 0-life game-over that silently blocks the + // play (M3 learning). This card deals no damage but the play-legality gate still checks it. + HeadlessEngineEnv.InitLeaderLife(mgr); + + // THE GATE SEED — the one knob M11 turns between branches. The skill_condition + // `play_count>2` reads BattlePlayerBase.GetCurrentTurnPlayCount(); seed it via the public + // AddCurrentTrunPlayCount (M4/M10 seam). For the FALSE branch we leave the bare default 0. + if (seededPlayCount > 0) player.AddCurrentTrunPlayCount(seededPlayCount); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.BuffFollowerId); + + // Place the gated self-buff follower in the active player's hand with PP to spare; empty board. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.BuffFollowerId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int inplayBefore = player.ClassAndInPlayCardList.Count; + + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: null), + $"ActionProcessor.PlayCard threw on the gated self-buff (seed={seededPlayCount})"); + + return (card, cardParam, ppBefore, player.Pp, + handBefore, player.HandCardList.Contains(card), + inplayBefore, player.ClassAndInPlayCardList.Contains(card), + player.ClassAndInPlayCardList.Count); + } + + [Test] + public void Gated_fanfare_fires_when_seeded_true_and_is_suppressed_when_false() + { + // ----- Branch 1: gate TRUE (play_count 5 > 2) -> the fanfare FIRES (M4 dimension). ----- + var t = PlayGatedSelfBuff(GateTrueSeed); + + // ----- Branch 2: gate FALSE (play_count 0 <= 2) -> the fanfare is SUPPRESSED. ----- + var f = PlayGatedSelfBuff(GateFalseSeed); + + Assert.Multiple(() => + { + // PRIMARY M11 assertion — the gate itself: SAME card, opposite stat outcomes driven + // ONLY by the seeded condition. + // TRUE -> buffed: base 1/1 + 1/1 = 2/2. + Assert.That(t.card.Atk, Is.EqualTo(t.param.Atk + HeadlessEngineEnv.BuffAddOffense), + "[gate TRUE] atk != base + add_offense (fanfare should have fired)"); + Assert.That(t.card.Life, Is.EqualTo(t.param.Life + HeadlessEngineEnv.BuffAddLife), + "[gate TRUE] life != base + add_life (fanfare should have fired)"); + // FALSE -> unbuffed: stays at the CardCSVData base 1/1 (effect suppressed). + Assert.That(f.card.Atk, Is.EqualTo(f.param.Atk), + "[gate FALSE] atk != base (fanfare should have been gated out)"); + Assert.That(f.card.Life, Is.EqualTo(f.param.Life), + "[gate FALSE] life != base (fanfare should have been gated out)"); + + // The gate suppresses the EFFECT, not the PLAY: in BOTH branches the card still pays + // its cost and still moves hand -> board like any follower. + // TRUE branch: + Assert.That(t.ppAfter, Is.EqualTo(t.ppBefore - t.param.Cost), "[gate TRUE] PP not reduced by cost"); + Assert.That(t.inHandAfter, Is.False, "[gate TRUE] card still in hand"); + Assert.That(t.onBoardAfter, Is.True, "[gate TRUE] card not on board"); + Assert.That(t.inplayAfter, Is.EqualTo(t.inplayBefore + 1), "[gate TRUE] in-play count not +1"); + // FALSE branch — the M11 crux: cost STILL paid + card STILL resolves despite the no-op effect. + Assert.That(f.ppAfter, Is.EqualTo(f.ppBefore - f.param.Cost), "[gate FALSE] PP not reduced by cost"); + Assert.That(f.inHandAfter, Is.False, "[gate FALSE] card still in hand"); + Assert.That(f.onBoardAfter, Is.True, "[gate FALSE] card not on board"); + Assert.That(f.inplayAfter, Is.EqualTo(f.inplayBefore + 1), "[gate FALSE] in-play count not +1"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/HeadlessCardMaster.cs b/SVSim.BattleEngine.Tests/HeadlessCardMaster.cs new file mode 100644 index 0000000..3466845 --- /dev/null +++ b/SVSim.BattleEngine.Tests/HeadlessCardMaster.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text.Json; +using Wizard; + +namespace SVSim.BattleEngine.Tests +{ + // Populates the engine's static CardMaster headless, from the loader's cards.json dump + // (serialized CardCSVData objects). We bypass the network/Resources init path + // (CardMaster.InitializeCardMaster) and the private ctor/field via reflection — CardMaster + // exposes no public injection seam. Class cards (id < 100) resolve via the ctor's + // _classCardParam, so an empty load still satisfies construction; pass real ids for the oracle. + public static class HeadlessCardMaster + { + private static readonly string CardsJsonPath = + Path.Combine(AppContext.BaseDirectory, "Data", "cards.json"); + + // Every id ever requested this process. Load is CUMULATIVE: each call rebuilds the master from + // the union, so a later Load(subset) never evicts cards an earlier Load (e.g. EnsureProcessGlobals's + // oracle set) installed. Without this, the static CardMaster is shared mutable state across the + // whole NUnit run and a Load(deck) in one test silently breaks an oracle test that runs after. + private static readonly HashSet _everLoaded = new(); + // Serialise Load: assembly-level Parallelizable(Fixtures) means concurrent fixtures race here, + // and HashSet.Add + the static CardMaster install are not thread-safe. + private static readonly object _loadGate = new object(); + + // Load the given card ids (empty = none) into a CardMaster registered as Default, MERGED with all + // previously-loaded ids. + public static void Load(params int[] cardIds) + { + lock (_loadGate) + { + LoadCore(cardIds); + } + } + + private static void LoadCore(int[] cardIds) + { + foreach (var id in cardIds) _everLoaded.Add(id); + var want = new HashSet(_everLoaded); + var rows = new List(); + if (want.Count > 0) + { + using var doc = JsonDocument.Parse(File.ReadAllText(CardsJsonPath)); + int sort = 0; + foreach (var el in doc.RootElement.EnumerateArray()) + { + if (!el.TryGetProperty("card_id", out var idEl)) continue; + if (!int.TryParse(idEl.GetString(), out var id) || !want.Contains(id)) continue; + rows.Add(BuildCardCsvData(el, sort++)); + } + var missing = want.Except(rows.Select(r => int.Parse(r.card_id))).ToArray(); + if (missing.Length > 0) + throw new InvalidOperationException( + "cards.json missing requested ids: " + string.Join(",", missing)); + } + + var cm = NewCardMaster(rows); + InjectAsDefault(cm); + } + + // Construct a CardCSVData without running its CSV ctor; set each member from the JSON object + // by exact name match (cards.json keys == CardCSVData member names). + private static CardCSVData BuildCardCsvData(JsonElement el, int sortIndex) + { + var c = (CardCSVData)FormatterServices.GetUninitializedObject(typeof(CardCSVData)); + const BindingFlags bf = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; + foreach (var prop in el.EnumerateObject()) + { + string val = prop.Value.ValueKind == JsonValueKind.Null ? null : prop.Value.ToString(); + var f = typeof(CardCSVData).GetField(prop.Name, bf); + if (f != null) { SetMember(f.FieldType, val, v => f.SetValue(c, v)); continue; } + var p = typeof(CardCSVData).GetProperty(prop.Name, bf); + if (p != null && p.CanWrite) SetMember(p.PropertyType, val, v => p.SetValue(c, v)); + } + // SortIndex is normally set by the ctor; mirror it. + var si = typeof(CardCSVData).GetProperty("SortIndex", bf); + if (si != null && si.CanWrite) si.SetValue(c, sortIndex); + return c; + } + + private static void SetMember(Type t, string val, Action set) + { + if (t == typeof(string)) set(val); + else if (t == typeof(int)) set(int.TryParse(val, out var i) ? i : 0); + else if (t == typeof(bool)) set(val == "1" || string.Equals(val, "true", StringComparison.OrdinalIgnoreCase)); + // other types left at default + } + + private static CardMaster NewCardMaster(List rows) + { + var ctor = typeof(CardMaster).GetConstructor( + BindingFlags.Instance | BindingFlags.NonPublic, null, + new[] { typeof(List) }, null); + if (ctor == null) throw new InvalidOperationException("CardMaster(List) ctor not found"); + return (CardMaster)ctor.Invoke(new object[] { rows }); + } + + private static void InjectAsDefault(CardMaster cm) + { + var idType = typeof(CardMaster).GetNestedType("CardMasterId"); + var defaultId = Enum.Parse(idType, "Default"); + var dictType = typeof(Dictionary<,>).MakeGenericType(idType, typeof(CardMaster)); + var dict = (System.Collections.IDictionary)Activator.CreateInstance(dictType); + dict[defaultId] = cm; + var fld = typeof(CardMaster).GetField("_dictCardMaster", + BindingFlags.Static | BindingFlags.NonPublic); + fld.SetValue(null, dict); + } + } +} diff --git a/SVSim.BattleEngine.Tests/HeadlessFixture.cs b/SVSim.BattleEngine.Tests/HeadlessFixture.cs new file mode 100644 index 0000000..1309baa --- /dev/null +++ b/SVSim.BattleEngine.Tests/HeadlessFixture.cs @@ -0,0 +1,557 @@ +using System.Reflection; +using SVSim.BattleEngine.Rng; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Phase; +using Wizard.Battle.Recovery; +using Wizard.Battle.Replay; +using Wizard.Battle.Resource; +using Wizard.Battle.View.Vfx; +using Wizard.BattleMgr; + +namespace SVSim.BattleEngine.Tests +{ + // Initializes the global engine state a headless battle assumes exists. In the real client this + // is populated from /load/index at login; here we author the minimum the resolution path reads. + public static class HeadlessEngineEnv + { + // Simplest zero-skill vanilla follower in cards.json: neutral (clan 0), cost 1, 1/2, no skill. + public const int FollowerId = 100011010; + + // M3 next-hardest deterministic card: a fixed-damage spell. 900124030 is an ELF (clan 1, matches + // PlayerClassId) cost-3 spell whose sole skill is `when_play` `damage=3` to `card_type=class` + // (the enemy leader) — auto-targeted (no select_count), no RNG. Deterministic burn to the face. + public const int SpellId = 900124030; + + // M4 next-hardest deterministic card: a when_play SELF-BUFF follower. 103111050 is an ELF + // (clan 1) cost-1 1/1 whose sole non-evo skill is `when_play` `powerup` `add_offense=1&add_life=1` + // with skill_target `character=me&target=self` — it buffs ITSELF, so no target selection (the + // fanfare auto-resolves). Fixed +1/+1 => a deterministic stat-delta oracle. The skill is gated on + // `play_count>2`; the headless harness seeds that via the public AddCurrentTrunPlayCount (see the + // oracle test). Base 1/1 -> 2/2 after the fanfare. + public const int BuffFollowerId = 103111050; + public const int BuffAddOffense = 1; + public const int BuffAddLife = 1; + + // M5 next-hardest deterministic card: a when_play SUMMON_TOKEN spell. 800134010 is an ELF + // (clan 1) cost-1 spell whose sole skill is `when_play` `summon_token=100011020` with + // `skill_target=none` and an UNGATED condition (`character=me`, trivially the caster): it + // summons exactly ONE neutral 2/2 follower TOKEN onto the caster's board — no target + // selection, no RNG (Skill_summon_token's random branch is `num >= 0 && !IsForecast`, and + // this option carries no `random_count`, so num=-1 => the deterministic literal-id path). + // The new oracle dimension over M2/M3/M4 is a BOARD-COUNT DELTA from a SKILL-CREATED card: + // a token that was never in the hand/deck appears in play. This is also the first headless + // exercise of the PUBLIC prefab card-creation path (CardCreatorBase.CreateCard, + // createNullView:false, via BattlePlayerBase.CreateNextIndexCard) — class-card construction + // hits `default: return null` and the M2-M4 hand cards used the private null-view seam, so + // the view-building creation path is genuinely new here. + public const int TokenSpellId = 800134010; + public const int SummonedTokenId = 100011020; // neutral 2/2 follower token + public const int SummonedTokenAtk = 2; + public const int SummonedTokenLife = 2; + + // M6 next milestone: the first card requiring TARGET SELECTION — exercises the selectedCards + // path of ActionProcessor.PlayCard (dormant through M2-M5, all of which played + // selectedCards: null). 800134020 is an ELF (clan 1) cost-1 SPELL whose sole skill is + // `when_play` `damage=5` to a SELECTED enemy follower + // (skill_target=character=op&target=inplay&card_type=unit&select_count=1), ungated + // (character=me), no RNG, no dynamic `{}` value. The new oracle dimension is SELECTION + // ROUTING: with TWO followers on the enemy board and ONE passed as selectedCards, only the + // selected follower takes the 5 damage and the un-selected one is untouched. + public const int TargetSpellId = 800134020; + public const int TargetSpellDamage = 5; + + // Two zero-skill vanilla NEUTRAL followers placed on the ENEMY board. Both have life > the + // 5 damage so they SURVIVE — this gives a differential life-delta oracle (selected -5, + // un-selected -0) that reads the authoritative damage path M3 already proved, without + // depending on follower death/board-removal timing (a separate, unproven mechanic). Distinct + // base life (13 vs 7) so the two post-states can't coincidentally match. + public const int SelectTargetFollowerId = 900041010; // neutral 13/13 + public const int UnselectTargetFollowerId = 102011010; // neutral 6/7 + + // M7 next milestone: targeted DESTROY — the first card proving follower DEATH / board-removal + // resolves in the AUTHORITATIVE (committed) part of PlayCard headless, not the cosmetic + // post-Process tail. 800144120 is an ELF (clan 1) cost-0 SPELL whose sole skill is `when_play` + // `destroy` of a SELECTED enemy follower + // (skill_target=character=op&target=inplay&card_type=unit&select_count=1), ungated + // (skill_condition=character=me), no RNG, no dynamic value. `destroy` is UNCONDITIONAL removal + // (vs `damage` needing a >=life amount), so the oracle is the cleanest possible "card left the + // board": selected follower gone + enemy board count -1 + selected card in CemeteryList, while + // the un-selected follower stays (routing, M6's lesson, confirmed load-bearing by swapping the + // selection). Reuses the two M2/M6 vanilla followers as the target board (destroy is + // unconditional so their stats are irrelevant — distinct ids only so selected vs un-selected + // can't be confused). InitCardTemplates is NOT needed (destroy creates no card). + public const int DestroySpellId = 800144120; + public const int DestroyTargetFollowerId = FollowerId; // neutral 1/2 (the selected, destroyed one) + public const int DestroyOtherFollowerId = UnselectTargetFollowerId; // neutral 6/7 (the un-selected survivor) + + // M8 next milestone: LETHAL damage — proves follower DEATH VIA COMBAT MATH (damage >= life -> + // 0 life -> the same RemoveInplayCard/cemetery death path M7 lit up via `destroy`, but reached + // through the dominant real-card mechanic: "deal N damage"). Reuses the M6 damage=5 spell + // (800134020) but with target followers STRADDLING 5 life so the SAME spell kills one and merely + // chips the other in a single oracle: the SELECTED target has life <= 5 and dies (board -1 + + // cemetery +1, the M7 assertions), while the UN-SELECTED control has life > 5 and survives at + // reduced life (the M6 life-delta assertion). This combines M7's removal dimension with M6's + // life-delta + routing, and distinguishes death-via-damage from the unconditional `destroy`. + public const int LethalDamageSpellId = TargetSpellId; // 800134020, when_play damage=5 + public const int LethalDamage = TargetSpellDamage; // 5 + public const int LethalTargetFollowerId = FollowerId; // neutral 1/2 (life 2 <= 5 -> dies) + public const int SurvivorTargetFollowerId = UnselectTargetFollowerId; // neutral 6/7 (life 7 > 5 -> survives at 2) + + // M9 next milestone: when_play DRAW — proves the HAND/DECK DELTA dimension (design §5's draw + // oracle): the last deterministic, non-RNG card-effect class no prior milestone touched (M3/M4/ + // M6/M8 moved stats, M2/M5/M7 the board, M3 the leader — none read the deck->hand transfer). + // 800114010 is an ELF (clan 1) cost-1 SPELL whose sole skill is `when_play` `draw` of ONE card + // from the caster's own deck (skill_target=character=me&target=deck&card_type=all&random_count=1), + // ungated (skill_condition=character=me), no evo skill, no preprocess, no dynamic `{}` value. + // + // ADAPTATION FROM THE RESUME-GUIDE SHAPE: the guide asked for a `skill_target=none` draw with + // "no RNG", but no such card exists in cards.json — EVERY draw selects from the deck via a + // `random_count=N` target filter (skill_option is always literally `none`; the count lives in + // skill_target). The RNG is neutralized structurally instead: seed the deck with EXACTLY ONE + // known card, so `random_count=1` over a single-card pool is deterministic regardless of the + // RandomSeed. This keeps the oracle decisive (drawn id is forced) while exercising the real + // draw path. Like the summon token, a drawn card is engine-CREATED off the deck the M5 prefab + // way; unlike summon, the card already exists (we seed it) and the skill only MOVES it deck->hand. + public const int DrawSpellId = 800114010; + public const int DeckSeedCardId = FollowerId; // the single known deck card (neutral 1/2 vanilla) + + // M10 next milestone: the first DYNAMIC `{}`-VALUE card — proves the engine COMPUTES an effect + // magnitude from live game state (a value the wire can't carry; per memory + // project_battle_relay_nontargeted_effects this state-derived-value problem is exactly what + // broke the PvP relay, so proving the engine resolves it headless is the direct validation that + // the port — not a relay — is the necessary path). Still non-RNG: a seeded state makes the value + // deterministic. 112134010 is an ELF (clan 1) cost-2 SPELL whose sole skill is `when_play` + // `damage={me.play_count}-1` to `character=both&target=inplay&card_type=unit` (with a + // `base_card_id!=900111010|900111020` exclusion) — an AoE over BOTH boards' units, auto-targeted + // (no select_count, so selectedCards: null like M2-M5), ungated (skill_condition=character=me). + // + // The `{}` value resolves (SkillOptionValue.ParseInt) as + // `_filterVariable.Parse("me.play_count") - 1`, where Parse routes to + // SkillEnvironmentalPlayCount.Filtering -> playerInfo.GetCurrentTurnPlayCount() (the + // `isPrePlay=false` resolution path). That is the SAME per-turn counter the public + // AddCurrentTrunPlayCount feeds (M4 proved this seam drove the play_count>2 GATE; M10 proves it + // also feeds the `{}` VALUE). The per-play auto-increment AddCurrentTrunPlayCount(1) lives in + // ActionProcessor's OnBeforePlayCard (BattlePlayerBase.cs:1400), subscribed by + // SetupActionProcessorEvent — which is ONLY called on the OperateMgr/Prediction/OperationSimulator + // paths, NOT on the direct `new ActionProcessor(pair).PlayCard` (DP4) path this harness uses. So + // the headless play does NOT self-bump the per-turn count: the skill reads EXACTLY the seeded + // GetCurrentTurnPlayCount() and the damage == seeded - 1. The oracle derives the expected + // magnitude from the engine's OWN live GetCurrentTurnPlayCount(), not from a hardcoded literal, + // which is the M10 dimension (engine-computed value, not a wire-carried constant). + // + // The target is the M6 vanilla NEUTRAL 13/13 follower (SelectTargetFollowerId, already loaded): + // life 13 > any reasonable seeded count, so it SURVIVES for a clean life-delta read (reusing the + // M3/M6/M8 damage->life path), and `card_type=unit` excludes both leaders (asserted untouched). + public const int DynamicDamageSpellId = 112134010; + public const int DynamicDamageTargetFollowerId = SelectTargetFollowerId; // neutral 13/13 (survives, clean delta) + // A deliberately non-trivial seeded per-turn play count so the computed damage (== this value) + // is an obvious state read, not a coincidence with a small literal. The load-bearing probe + // (M4/M6/M8 discipline) varies this and watches the damage track it. + public const int DynamicSeededPlayCount = 4; + + // M12 (the design §5 RNG oracle): reuse the M9 draw spell (800114010, when_play `draw` 1 from the + // caster's deck via a random_count=1 filter) but over a MULTI-card deck with IsRandomDraw=true. + // M9 passed only because IsRandomDraw=false takes BattlePlayerBase.LotteryRandomDrawCard's + // top-of-deck `else` branch (BattlePlayerBase.cs:3174-3185) — a 1-card pool made index 0 the only + // card. With IsRandomDraw=true the selection runs through SkillRandomSelectFilter.Filtering, which + // calls BattleManagerBase.GetIns().StableRandom(poolCount) per pick (SkillRandomSelectFilter.cs:42, + // gated on IsRandomDraw) — the chokepoint HeadlessBattleMgr overrides. So the scripted source picks + // exactly which deck card is drawn, proving a GENUINE multi-outcome roll (the dimension M9's + // one-card pool deliberately avoided). + // + // Three distinguishable deck cards seeded at consecutive indices; SkillRandomSelectFilter orders + // the pool by Index (line 34), so the pick index maps to position in this order: + // index 0 -> RngDeckCardA (100011010), index 1 -> RngDeckCardB (103111050), index 2 -> RngDeckCardC (100011020) + // All three are already loaded by HeadlessCardMaster.Load via EnsureInitialized (FollowerId, + // BuffFollowerId, SummonedTokenId), so no Load change is needed. + public const int RngDrawSpellId = DrawSpellId; // 800114010, when_play draw 1 (random_count=1) + public const int RngDeckCardA = FollowerId; // neutral 1/2 -> Index-order position 0 + public const int RngDeckCardB = BuffFollowerId; // ELF 1/1 -> Index-order position 1 + public const int RngDeckCardC = SummonedTokenId; // neutral 2/2 -> Index-order position 2 + + private static bool _done; + private static readonly object _processGlobalsGate = new object(); + + // Process-globals only: load card master, install master data, seed LoadDetail/Crossover, + // seed Certification.udid. Per-battle/per-test state (IsForecast, chara ids on the DataMgr, + // NetworkUserInfoData) is now seeded inside TestBattleScope's ctor against the per-scope + // GameMgr — calling it here would crash because GameMgr.GetIns() Requires an ambient scope. + // Thread-safe (assembly-level Parallelizable(Fixtures) means many fixtures' [SetUp] race here). + public static void EnsureProcessGlobals() + { + if (_done) return; + lock (_processGlobalsGate) + { + if (_done) return; + EnsureProcessGlobalsCore(); + _done = true; + } + } + + private static void EnsureProcessGlobalsCore() + { + // Wizard.Data.Load: static /load/index snapshot. The ctor's CreateBackgroundId reads + // Data.Load.data._userTutorial (LoadDetail self-inits _userTutorial). Suppress VFX too. + Wizard.Data.Load = new Load { data = new LoadDetail() }; + // CardParameter(CardCSVData) reads Data.Crossover.RestrictedCard for deck-limit calc; + // an empty Crossover returns the default count (no restriction). Private setter -> reflect. + typeof(Wizard.Data).GetProperty("Crossover", + System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public) + .SetValue(null, new Wizard.Crossover()); + // CardMaster must be non-null before construction (the leader/class card looks up id 0). + // Load the M2 vanilla follower + the M3 fixed-damage spell + the M4 self-buff follower + + // the M5 summon-token spell AND the token it summons so each oracle can create + look up + // real stats. The summoned token id must be present: Skill_summon_token resolves it + // through CardMaster.GetCardParameterFromId during creation. + HeadlessCardMaster.Load(FollowerId, SpellId, BuffFollowerId, TokenSpellId, SummonedTokenId, + TargetSpellId, SelectTargetFollowerId, UnselectTargetFollowerId, DestroySpellId, DrawSpellId, + DynamicDamageSpellId); + // Master reference data (class-character list) for leader/class card resolution. + HeadlessMasterData.Install(); + + // The network emit path's payload builder (RealTimeNetworkAgent.CreateEmitData) reads + // Cute.Certification.Udid (RealTimeNetworkAgent.cs:1407). The Udid getter lazily decodes from + // Toolbox.SavedataManager (Certification.cs:35), which is null headless. Seed the private static + // backing field with a non-empty placeholder so the getter short-circuits before touching the + // savedata manager. The value is opaque to the engine (it's just echoed into the emit dict). + typeof(Cute.Certification) + .GetField("udid", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) + .SetValue(null, "headless-udid"); + } + + // Simple deterministic 40-card deck for multi-instance tests: every slot is the same vanilla + // FollowerId. Card 100011010 is loaded as part of EnsureProcessGlobals' HeadlessCardMaster.Load + // batch so SessionBattleEngine.Setup resolves each entry without re-loading. Kept a single + // shape — the multi-instance property being verified (per-session ambient isolation across + // parallel battles) is driven by distinct masterSeeds on the engines, not by deck variation. + public static long[] SampleDeck() + { + var deck = new long[40]; + for (int i = 0; i < 40; i++) deck[i] = FollowerId; + return deck; + } + + // Per-ambient seeder: writes the player/enemy chara ids onto the AMBIENT GameMgr's DataMgr. + // Called by TestBattleScope after the scope is entered so GameMgr.GetIns() routes to the + // per-test GameMgr, not whichever one happened to be ambient last. + public static void SeedCharaIdsOnCurrentAmbient() + { + // Player/enemy leaders (chara ids must map to a ClassCharacterMasterData in Master). + // Set the backing fields directly: the public SetPlayerCharaId() also pulls MyRotation/ + // AvatarBattle info (more null statics) which the resolution path doesn't need (the + // TryGet* accessors are null-tolerant). + var dm = GameMgr.GetIns().GetDataMgr(); + SetField(dm, "_playerCharaId", HeadlessMasterData.PlayerCharaId); + SetField(dm, "_enemyCharaId", HeadlessMasterData.EnemyCharaId); + } + + // Per-ambient seeder: installs a no-op NetworkUserInfoData on the AMBIENT GameMgr so + // NetworkBattleManagerBase.CreateBackgroundId()'s GetNetworkUserInfoData().GetFieldId() call + // resolves (M13). Field id 1 == ForestField, a valid background. + public static void SeedNetUserOnCurrentAmbient() + { + // NetworkBattleManagerBase.CreateBackgroundId() (M13) reads + // GameMgr.GetIns().GetNetworkUserInfoData().GetFieldId() when the RecoveryManager yields no + // bg id (NullRecoveryManager.BackGroundId == -1). In production RealTimeNetworkAgent seeds + // this NetworkUserInfoData at match start; the bare construction path leaves GameMgr's + // _netUser null (no lazy init, unlike the other GodObject getters). Seed a no-op instance + // whose _selfInfo carries just "fieldId" (GetFieldId reads _selfInfo["fieldId"]); field id 1 + // == ForestField, a valid background. Nothing here drives game state — it only satisfies the + // network mgr's background lookup, a background lookup the single-battle path + // (`SingleBattleMgr`) never performs. + var netUser = new NetworkUserInfoData(); + netUser.SetSelfInfo( + new System.Collections.Generic.Dictionary { ["fieldId"] = 1 }, + isWatchReplayRecovery: false); + GameMgr.GetIns().SetNetworkUserInfoData(netUser); + } + + // Seed each leader's starting life on a freshly-constructed mgr. The engine does this in + // BattleManagerBase.SetupInitialGameState -> InitializeClassLife (InitBaseMaxLife per leader), + // but the full SetupInitialGameState also cascades into rotation/avatar/turn-panel UI init + // that is irrelevant (and hostile) to a headless resolution test, so apply just the + // InitializeClassLife subset. Without this a leader's BaseMaxLife defaults to 0 — which reads + // as already-dead/game-over and silently blocks any card play (the M2 follower oracle never + // noticed because it only asserted leader life *unchanged*, and 0 == 0). + public const int DefaultLeaderLife = 20; + + public static void InitLeaderLife(BattleManagerBase mgr, int life = DefaultLeaderLife) + { + ((ClassBattleCardBase)mgr.BattlePlayer.Class).InitBaseMaxLife(life); + ((ClassBattleCardBase)mgr.BattleEnemy.Class).InitBaseMaxLife(life); + } + + // The PUBLIC prefab card-creation path (CardCreatorBase.CreateCard, createNullView:false) — + // used by anything the engine creates INTERNALLY (summons, token-draws, etc.), as opposed to + // the test's direct private null-view seam for hand cards — clones card-template prefabs held + // on BattleManagerBase.SBattleLoad. The real async battle load (CoLoad) builds these; the bare + // `new SingleBattleMgr(...)` construction path leaves SBattleLoad null (the M2 NRE was here). + // Seed it with non-null no-op CardTemplates: their `.gameObject` is a lazy shim no-op, and the + // shim's CloneObjectToParent + self-consistent object graph carry the rest. Nothing here + // computes game state — the token's authoritative stats come from CardCSVData, not the view. + public static void InitCardTemplates(BattleManagerBase mgr) + { + mgr.SBattleLoad = new SBattleLoad + { + UnitCardTemplate = new CardTemplate(), + SpellCardTemplate = new CardTemplate(), + FieldCardTemplate = new CardTemplate(), + }; + // The created card's transform is positioned/parented under the battle's 3D scene-graph + // containers (CardCreatorBase.CreateCardTypeBuildInfo reads ins.CardHolder/ECardHolder/ + // PCardPlace/Battle3DContainer). The real battle load instantiates these; seed non-null + // no-op GameObjects so the positioning resolves (no-op transforms; nothing rendered). + mgr.Battle3DContainer = new GameObject(); + mgr.CardHolder = new GameObject(); + mgr.ECardHolder = new GameObject(); + mgr.PCardPlace = new GameObject(); + mgr.ChoiceCardHolder = new GameObject(); + mgr.EvolveCardHolder = new GameObject(); + } + + // The shared headless card-creation primitive. CardCreatorBase.CreateCardWithoutResources is + // the engine's own null-view creation path (CreateBase -> new *BattleCard(buildInfo).Setup( + // createNullView:true)); it's private, so reflect it rather than reimplement the 14-arg + // BuildInfo wiring. The public CardCreatorBase.CreateCard goes through prefab cloning. + // + // The engine's CreateCard also calls owner.SetupCardEvent(card); the raw + // CreateCardWithoutResources seam skips it, so we fold it in here. SetupCardEvent wires the + // per-card play events (BattlePlayerBase.cs:1452): for a SPELL/amulet it attaches + // OnPlay -> RemoveSpellCardFromHand and OnFinishWhenPlaySkill -> AddSpellCardToCemetery, which + // are how a non-follower leaves the hand at all (a follower's hand->field move is intrinsic to + // SetUpInplay, not event-driven). For a follower SetupCardEvent only attaches an OnEvolve hook + // that never fires on a vanilla play, so folding it in is a no-op there — making this a single + // primitive both follower and non-follower oracles can share. + public static BattleCardBase CreateHeadlessHandCard(int cardId, int index, bool isPlayer, BattleManagerBase mgr) + { + var io = mgr.CreatePlayerInnerOptionsBuilder(); + var m = typeof(CardCreatorBase).GetMethod("CreateCardWithoutResources", + BindingFlags.NonPublic | BindingFlags.Static); + var card = (BattleCardBase)m.Invoke(null, new object[] { cardId, index, isPlayer, mgr, io }); + BattlePlayerBase owner = isPlayer ? (BattlePlayerBase)mgr.BattlePlayer : mgr.BattleEnemy; + owner.SetupCardEvent(card); + return card; + } + + // Put a follower DIRECTLY onto a player's board headless (vs as a side-effect of PlayCard), + // for setting up a target board state. Create it through the shared null-view seam, then drive + // the engine's own hand->field move: HandCardToField requires the card to be in HandCardList, + // then AddInplayCards it + removes it from hand (BattlePlayerBase.cs:2568). For a vanilla + // follower the OnAddPlayCard/StopBattleHandCard/OnSummonAfter events it fires are no-ops (no + // fanfare), so the follower lands on the board at its CardCSVData base stats. M2 proved the + // hand->field placement path resolves headless. + public static BattleCardBase PutFollowerInPlay(BattleManagerBase mgr, int cardId, int index, bool isPlayer) + { + var card = CreateHeadlessHandCard(cardId, index, isPlayer, mgr); + BattlePlayerBase owner = isPlayer ? (BattlePlayerBase)mgr.BattlePlayer : mgr.BattleEnemy; + owner.HandCardList.Add(card); + owner.HandCardToField(card); + return card; + } + + // Push a known card onto a player's DECK headless (the M9 draw oracle's setup primitive). The + // bare `new SingleBattleMgr(...)` construction leaves DeckCardList non-null-but-empty (ctor at + // BattlePlayerBase.cs:1050), and a card's deck membership IS its `IsInDeck` (BattleCardBase.cs:970 + // `=> SelfBattlePlayer.DeckCardList.Contains(this)`) — so no separate "in deck" flag is needed. + // Create the card through the same null-view seam hand/board cards use, then drive the engine's + // own AddToDeck (BattlePlayerBase.cs:3038): for a vanilla follower it is just DeckCardList.Add + // (HasDeckSelfSkill is false; the XorShiftRandom/IsMulliganEnd reshuffle bookkeeping short- + // circuits on the null/inactive headless RNG). The drawn card is then the engine's own deck + // object, so the oracle can assert deck->hand identity by reference, not just by id. + public static BattleCardBase SeedDeck(BattleManagerBase mgr, int cardId, int index, bool isPlayer) + { + var card = CreateHeadlessHandCard(cardId, index, isPlayer, mgr); + BattlePlayerBase owner = isPlayer ? (BattlePlayerBase)mgr.BattlePlayer : mgr.BattleEnemy; + owner.AddToDeck(card); + return card; + } + + // Build a headless battle wired for AUTHORITATIVE RNG: real rolls under IsForecast (via the + // injected source on HeadlessBattleMgr) AND IsRandomDraw=true (the second gate — without it the + // random-select filters bypass the roll and pick index 0; BattleManagerBase.cs:415, + // SkillRandomSelectFilter.cs:42). Mirrors the opponent/turn/leader-life wiring every oracle does. + // Returns the constructed HeadlessBattleMgr; the caller seeds hands/decks/boards and plays. + public static HeadlessBattleMgr NewAuthoritativeBattle(IRandomSource rng) + { + EnsureProcessGlobals(); // sets IsForecast = true among other globals + BattleManagerBase.IsRandomDraw = true; // the second RNG gate (F-RNG-2) + var mgr = new HeadlessBattleMgr(new HeadlessContentsCreator(), rng); + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + SetField(player, "_opponentBattlePlayer", enemy); + SetField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + InitLeaderLife(mgr); // a 0-life leader reads as game-over and blocks plays + InitCardTemplates(mgr); // the draw VFX touches the drawn card's view layer + return mgr; + } + + // M13 emit-path read. Builds a HeadlessNetworkBattleMgr (the emitting twin of the + // HeadlessBattleMgr NewAuthoritativeBattle returns) and stands up the OnEmit capture seam: the + // engine's own RealTimeNetworkAgent.OnEmit event (RealTimeNetworkAgent.cs:1270) fires the played + // URI before both emit guards, so capturing it needs no Engine/shim edit — just an injected agent. + // Returns (mgr, emitted-URI list). The caller seeds the hand and drives mgr.OperateMgr.PlayCard. + public static (HeadlessNetworkBattleMgr mgr, System.Collections.Generic.List emitted) + NewNetworkEmitBattle(IRandomSource rng = null) + { + EnsureProcessGlobals(); // sets IsForecast = true among other globals + var mgr = new HeadlessNetworkBattleMgr(new HeadlessContentsCreator(), rng); + // NOTE: IsRecovery is left FALSE here (unlike the solo NewAuthoritativeBattle). The network + // emit path is gated on !IsRecovery in BOTH places: NetworkStandardBattleMgr.SendPlayCard + // (NetworkStandardBattleMgr.cs:155) and the OnSetCardComplete->SendPlayCard subscription in + // SetUpNetworkOperateEvent (NetworkBattleManagerBase.cs:927, which early-returns under + // IsRecovery). With IsRecovery=true the play would resolve state but never emit. (The solo + // NewAuthoritativeBattle uses IsRecovery=true only to collapse VFX wait delays; here the no-op + // view shims absorb the real view layer instead — see the IsForecast=false block below.) + + // IsForecast MUST be false on the network emit path. BattleManagerBase.IsVirtualBattle is + // `=> IsForecast` (BattleManagerBase.cs:657), and NetworkStandardBattleMgr.SendPlayCard is gated + // on `!IsVirtualBattle` (NetworkStandardBattleMgr.cs:155) — under IsForecast=true the play + // resolves state but the emit is suppressed. EnsureInitialized leaves IsForecast=true (correct + // for the direct-ActionProcessor solo oracles, where it suppresses VFX); clear it here so the + // genuine emit fires. The cost is that VFX registration is no longer short-circuited, so the + // play exercises the real view layer — those view touches are satisfied by the no-op view shims + // (InitCardTemplates, the HandView/DetailPanel fills below). M3's damage is literal, immune to + // any play-count bump the OperateMgr path adds vs the direct path. + BattleManagerBase.IsForecast = false; + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + SetField(player, "_opponentBattlePlayer", enemy); + SetField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + InitLeaderLife(mgr); // a 0-life leader reads as game-over and blocks plays + InitCardTemplates(mgr); // play/draw VFX touches the card view layer + // The OperateMgr emit path runs SetupActionProcessorEvent (skipped by the direct-ActionProcessor + // solo oracles), which subscribes BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent + // to OnPlayComplete (BattlePlayerBase.cs:1431). DetailMgr is created in CreateManager but its + // DetailPanelControl (a UI control) is null headless. Seed the engine's own NullDetailPanelControl + // no-op so the play-complete event resolves without touching the UI. + mgr.DetailMgr.DetailPanelControl = new NullDetailPanelControl(); + + // Inject a headless RealTimeNetworkAgent so NetworkBattleSender's ToolboxGame.RealTimeNetworkAgent + // .* calls resolve, and subscribe OnEmit. GetUninitializedObject skips the MonoBehaviour Awake. + var agent = (RealTimeNetworkAgent)System.Runtime.Serialization.FormatterServices + .GetUninitializedObject(typeof(RealTimeNetworkAgent)); + // CurrentMatchingStatus has a protected setter; seed it non-Disconnected so EmitMsgPack does not + // early-return at RealTimeNetworkAgent.cs:1272 (needed only for the best-effort payload read, Task 4; + // OnEmit fires regardless). The default on the uninitialized object is OffLine (0), which clears the + // SetCurrentMatchingStatus guards; the only side effect is a static-StringBuilder trace log, so the + // public setter runs cleanly headless. Prepared (50) is the real enum member (RealTimeNetworkAgent.cs:35). + agent.SetCurrentMatchingStatus(RealTimeNetworkAgent.MatchingStatus.Prepared); + + // EmitMsgPack -> AddActionSequence (RealTimeNetworkAgent.cs:1773, fired for the PlayActions URI) + // does `_gungnir._actionSequenceNum++` and `NetworkLogger.LogInfo(...)`. On the + // GetUninitializedObject agent both are null (the real ctor builds them at :289/:301). Seed an + // uninitialized Gungnir (its ctor news a ConnectionReporter + Ticks — unneeded; AddActionSequence + // only touches the int counter) and the engine's own NetworkNullLogger no-op so the action-seq + // bookkeeping runs without crashing. Neither drives game state. + SetField(agent, "_gungnir", + System.Runtime.Serialization.FormatterServices.GetUninitializedObject(typeof(Gungnir))); + SetProperty(agent, "NetworkLogger", new NetworkNullLogger()); + + // Suppress the actual socket transmission. After OnEmit fires (RealTimeNetworkAgent.cs:1270, the + // O1 liveness signal), EmitMsgPack -> EmitMsgUriPack reaches the stockEmitMessageMgr / _manager.Socket + // network I/O (RealTimeNetworkAgent.cs:1444+/1487) — none of which exists headless. The engine's + // OWN _notEmit flag (set in recovery/replay) short-circuits EmitMsgUriPack at :1438 BEFORE any of + // that, so the emit stays genuine (OnEmit already fired through the real send path) while the + // byte-push is skipped. This is the only honest way to terminate the path headless: we are NOT + // faking OnEmit, only declining to open a socket we cannot open. + SetField(agent, "_notEmit", true); + + var emitted = new System.Collections.Generic.List(); + agent.OnEmit += uri => emitted.Add(uri); + Wizard.ToolboxGame.SetRealTimeNetworkBattle(agent); + + return (mgr, emitted); + } + + // M13 Task 4 best-effort: read the emit payload back out of the agent's stock sequencer. With + // _notEmit=true (NewNetworkEmitBattle terminates the path that way), EmitMsgUriPack short-circuits + // BEFORE stockEmitMessageMgr.StockData (RealTimeNetworkAgent.cs:1438 vs :1461), so the stock is + // expected to be null/empty — return null on any null/throw so the test degrades to Inconclusive + // rather than failing. Field `stockEmitMessageMgr` (:103) + `GetSequenceAllData()` + // (StockEmitMgr.cs:81, returns List>) verified against the copied engine. + // Precondition: this is expected-null ONLY while NewNetworkEmitBattle sets _notEmit=true and leaves + // stockEmitMessageMgr unconstructed. If that harness setup changes, revisit — a non-null stock should + // then make the test ASSERT on the payload rather than defer to Inconclusive. + public static System.Collections.IList TryReadStockedEmitData(RealTimeNetworkAgent agent) + { + try + { + var f = typeof(RealTimeNetworkAgent).GetField("stockEmitMessageMgr", + System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); + var stock = f?.GetValue(agent); + if (stock == null) return null; + var m = stock.GetType().GetMethod("GetSequenceAllData"); + return m?.Invoke(stock, null) as System.Collections.IList; + } + catch { return null; } + } + + private static void SetField(object obj, string name, object value) + { + var f = obj.GetType().GetField(name, + System.Reflection.BindingFlags.Instance | + System.Reflection.BindingFlags.NonPublic | + System.Reflection.BindingFlags.Public); + if (f == null) throw new System.InvalidOperationException( + $"{obj.GetType().Name} has no field '{name}'"); + f.SetValue(obj, value); + } + + // Set a property whose setter is non-public (e.g. RealTimeNetworkAgent.NetworkLogger has a + // protected setter). Walks the type hierarchy because the declaring type may be a base class. + private static void SetProperty(object obj, string name, object value) + { + var t = obj.GetType(); + System.Reflection.PropertyInfo p = null; + while (t != null && p == null) + { + p = t.GetProperty(name, + System.Reflection.BindingFlags.Instance | + System.Reflection.BindingFlags.NonPublic | + System.Reflection.BindingFlags.Public); + t = t.BaseType; + } + if (p == null) throw new System.InvalidOperationException( + $"{obj.GetType().Name} has no property '{name}'"); + p.SetValue(obj, value); + } + } + + // Test-side replica of the engine's own StandardBattleMgrContentsCreator (the practice/solo + // init path: GameMgr.cs:244 `new SingleBattleMgr(new StandardBattleMgrContentsCreator(null, null))`). + // Authored here (not copied) so we control the seed deterministically; uses the real engine + // managers verbatim. The real StandardBattleMgrContentsCreator + SingleBattlePhaseCreator were + // cut from the M1 copy set (entry-point constructors), so we reproduce them minimally. + public sealed class HeadlessContentsCreator : IBattleMgrContentsCreator + { + public int RandomSeed => 12345; // fixed; vanilla follower has no RNG so value is irrelevant + + // No-op managers (vs the practice path's file-backed SingleBattleRecoveryRecordManager): + // the ctor's FirstRecoverySetting/FirstReplaySetting dereference these, and recovery/replay + // recording is irrelevant to the M2 oracle, so use the engine's own null implementations. + public IRecoveryManager RecoveryManager { get; } = new NullRecoveryManager(); + public IRecoveryRecordManager RecoveryRecordManager { get; } = new NullRecoveryRecordManager(); + public IReplayRecordManager ReplayRecordManager { get; } = new NullReplayRecordManager(); + + public IBattleResourceMgr CreateResourceMgr() => new BattleResourceMgr(); + public VfxMgr CreateVfxMgr() => new VfxMgr(); + public IPhaseCreator CreatePhaseCreator(BattleManagerBase battleMgr) => + new HeadlessPhaseCreator(battleMgr); + } + + // Equivalent of the engine's SingleBattlePhaseCreator: inherits PhaseCreatorBase wholesale. + public sealed class HeadlessPhaseCreator : PhaseCreatorBase + { + public HeadlessPhaseCreator(BattleManagerBase battleMgr) : base(battleMgr) { } + } +} diff --git a/SVSim.BattleEngine.Tests/HeadlessHandViewStubTests.cs b/SVSim.BattleEngine.Tests/HeadlessHandViewStubTests.cs new file mode 100644 index 0000000..1f6598a --- /dev/null +++ b/SVSim.BattleEngine.Tests/HeadlessHandViewStubTests.cs @@ -0,0 +1,64 @@ +using NUnit.Framework; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +namespace SVSim.BattleEngine.Tests +{ + // Regression for the Heal-triggered Skill_heal NRE diagnosed 2026-06-07 (bid 799755786270). + // + // A follower with a `when_spell_play` Heal trigger fires on a spell play and routes through + // Skill_heal.Start → ClassBattleCardBase.ApplyHealing → CreatePullHandInVfx + // → HandViewBase.HandUnfocus (HandViewBase.cs:124-131) + // The base implementation does `_handControl.SetHandState(HandControl.HandState.Unfocus)`. + // HeadlessHandViewStub.CreateHandControl returns null in headless, so `_handControl` is null + // and the base method NREs unconditionally — even when the heal amount is 0. + // + // The fix overrides HandUnfocus/HandFocus/FocusRearrangeHandHand on the stub to return + // NullVfx without touching `_handControl`. These are PURE PRESENTATION methods (visual + // ease-in/ease-out of the hand cards) — no game-state implications — so no-op'ing them + // headless is safe; the surrounding state mutations in ApplyHealing (HealLife, skill triggers) + // still run. + // + // Pattern parity with the metamorphose-NRE shim fix in ViewUiTouchStubs.cs (BattleCardView.GameObject + // lazy non-null): production Unity touches that the headless engine must no-op rather than throw. + [TestFixture] + public class HeadlessHandViewStubTests + { + [Test] + public void HandUnfocus_does_not_throw_and_returns_non_null_vfx() + { + var stub = HeadlessHandViewStub.Instance; + + VfxBase vfx = null; + Assert.DoesNotThrow(() => vfx = stub.HandUnfocus(), + "HandUnfocus must no-op headlessly — the live regression (bid 799755786270) crashed " + + "Skill_heal.Start when a when_spell_play Heal trigger fired with heal:0 because the " + + "base HandUnfocus dereferences a null _handControl."); + Assert.That(vfx, Is.Not.Null, "must return a non-null Vfx (caller registers it on a sequential player)."); + } + + [Test] + public void HandFocus_does_not_throw_and_returns_non_null_vfx() + { + var stub = HeadlessHandViewStub.Instance; + + VfxBase vfx = null; + Assert.DoesNotThrow(() => vfx = stub.HandFocus(), + "HandFocus is the sister cosmetic touch (called from CreatePullHandOutVfx on the " + + "OWNER's turn). Same null _handControl, same headless no-op required."); + Assert.That(vfx, Is.Not.Null); + } + + [Test] + public void FocusRearrangeHandHand_does_not_throw_and_returns_non_null_vfx() + { + var stub = HeadlessHandViewStub.Instance; + + VfxBase vfx = null; + Assert.DoesNotThrow(() => vfx = stub.FocusRearrangeHandHand(), + "FocusRearrangeHandHand reads _handControl.IsHandStateFocus() before dispatching to " + + "HandFocus or HandUnfocus; the base implementation would NRE on the read."); + Assert.That(vfx, Is.Not.Null); + } + } +} diff --git a/SVSim.BattleEngine.Tests/HeadlessMasterData.cs b/SVSim.BattleEngine.Tests/HeadlessMasterData.cs new file mode 100644 index 0000000..9fff543 --- /dev/null +++ b/SVSim.BattleEngine.Tests/HeadlessMasterData.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.Serialization; +using Wizard; + +namespace SVSim.BattleEngine.Tests +{ + // Builds the minimal Data.Master reference context a headless battle reads. In the client this + // comes from the /load/index master section; here we author just enough for the resolution path + // (currently: ClassCharacterList, so the leader/class card can resolve player/enemy class_id). + // Entries are constructed without their CSV ctor (private setters set via reflection). + public static class HeadlessMasterData + { + public const int PlayerCharaId = 1; + public const int EnemyCharaId = 2; + public const int PlayerClassId = 1; // ClanType -> class card clan + public const int EnemyClassId = 2; + + public static void Install() + { + var master = (Master)FormatterServices.GetUninitializedObject(typeof(Master)); + // The resolution path reads many Master.* collections (e.g. WhenPlayEffectKeywordMaster) + // and calls LINQ on them unguarded. Default every collection member to an empty instance + // so those touches no-op instead of NRE; then override the ones we need with content. + EnsureEmptyCollections(master); + var list = new List + { + NewChara(PlayerCharaId, PlayerClassId), + NewChara(EnemyCharaId, EnemyClassId), + }; + SetMember(master, "ClassCharacterList", list); + Data.Master = master; + } + + // Initialize every List<>/array/Dictionary<> field/auto-property on the object to an empty + // non-null instance (only if currently null). + private static void EnsureEmptyCollections(object obj) + { + const BindingFlags bf = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; + foreach (var f in obj.GetType().GetFields(bf)) + { + if (f.GetValue(obj) != null) continue; + var empty = EmptyOf(f.FieldType); + if (empty != null) f.SetValue(obj, empty); + } + } + + private static object EmptyOf(Type t) + { + if (t.IsArray) return Array.CreateInstance(t.GetElementType(), 0); + if (t.IsGenericType) + { + var def = t.GetGenericTypeDefinition(); + if (def == typeof(List<>) || def == typeof(Dictionary<,>) || + def == typeof(HashSet<>) || def == typeof(IList<>) || + def == typeof(IDictionary<,>) || def == typeof(ICollection<>) || + def == typeof(IEnumerable<>)) + { + var concrete = def == typeof(List<>) || def == typeof(IList<>) || + def == typeof(ICollection<>) || def == typeof(IEnumerable<>) + ? typeof(List<>).MakeGenericType(t.GetGenericArguments()) + : def == typeof(HashSet<>) + ? typeof(HashSet<>).MakeGenericType(t.GetGenericArguments()) + : typeof(Dictionary<,>).MakeGenericType(t.GetGenericArguments()); + return Activator.CreateInstance(concrete); + } + } + return null; + } + + private static ClassCharacterMasterData NewChara(int charaId, int classId) + { + var c = (ClassCharacterMasterData)FormatterServices.GetUninitializedObject(typeof(ClassCharacterMasterData)); + SetMember(c, "chara_id", charaId); + SetMember(c, "class_id", classId); + SetMember(c, "skin_id", charaId); + SetMember(c, "is_usable", true); + return c; + } + + // Set a member (auto-property backing field or field) by name, tolerating private setters. + private static void SetMember(object obj, string name, object value) + { + var t = obj.GetType(); + const BindingFlags bf = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; + var p = t.GetProperty(name, bf); + if (p != null && p.SetMethod != null) { p.SetValue(obj, value); return; } + var f = t.GetField(name, bf) + ?? t.GetField($"<{name}>k__BackingField", bf); + if (f != null) { f.SetValue(obj, value); return; } + throw new InvalidOperationException($"{t.Name} has no settable member '{name}'"); + } + } +} diff --git a/SVSim.BattleEngine.Tests/LethalDamageSpellOracleTests.cs b/SVSim.BattleEngine.Tests/LethalDamageSpellOracleTests.cs new file mode 100644 index 0000000..17f5d35 --- /dev/null +++ b/SVSim.BattleEngine.Tests/LethalDamageSpellOracleTests.cs @@ -0,0 +1,134 @@ +using System.Collections.Generic; +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M8 (death VIA COMBAT MATH): a when_play TARGETED-DAMAGE spell whose amount is >= the target + // follower's life resolves to correct authoritative state HEADLESS via the same IsForecast/ + // IsRecovery + ActionProcessor + selectedCards path M6/M7 proved. M3 proved `damage` to the LEADER + // (life-delta, no death). M7 proved board-removal via UNCONDITIONAL `destroy`. M8 closes the gap + // between them: the follower dies as a CONSEQUENCE of damage -> life<=0 -> the dead-check + the same + // RemoveInplayCard/cemetery path M7 lit up — the dominant real-card removal mechanic (most "deal N + // damage" cards), reached through combat math rather than a `destroy` skill. + // + // The spell is select_count=1 (proven in M6 — it hits ONLY the selected target), so the oracle is: + // with two followers on the enemy board STRADDLING the 5 damage and the LETHAL one passed as + // `selectedCards`, the selected follower (life 2 <= 5) DIES from combat math (enemy board -1, gone, + // in CemeteryList — the M7 removal assertions, but reached via damage not `destroy`), while the + // un-selected control (life 7 > 5) is UNTOUCHED (life unchanged, still on board — the M6 routing + // assertion). The STRADDLE is what makes death-via-combat-math falsifiable: the load-bearing probe + // (swap the selection to the 6/7) makes that follower SURVIVE at 2 (7-5) and NOBODY die — proving + // the removal is gated on the SELECTED follower's life reaching <= 0 (combat math), not on + // "selected gets removed" (which would be M7's unconditional `destroy`) or a blanket wipe. + [TestFixture] + public class LethalDamageSpellOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Lethal_damage_spell_kills_the_selected_follower_and_chips_the_survivor() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (see M2-M7 oracles): opponent refs + active turn flag. The + // spell's target resolver walks player -> opponent -> opponent's in-play followers. + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life so neither leader reads as a 0-life game-over state (blocks plays, M3). + HeadlessEngineEnv.InitLeaderLife(mgr); + + // Put TWO vanilla followers on the ENEMY board STRADDLING the 5 damage: the SELECTED target + // has life 2 (<= 5) so it dies; the un-selected control has life 7 (> 5) and, being a + // select_count=1 spell's non-target, is untouched. (The straddle powers the load-bearing + // probe: selecting the 6/7 instead makes it survive at 2 and nobody die.) + var selected = HeadlessEngineEnv.PutFollowerInPlay(mgr, HeadlessEngineEnv.LethalTargetFollowerId, 0, isPlayer: false); + var survivor = HeadlessEngineEnv.PutFollowerInPlay(mgr, HeadlessEngineEnv.SurvivorTargetFollowerId, 1, isPlayer: false); + + // Sanity: the chosen ids actually straddle the damage (one lethal, one not) at setup. + Assert.That(selected.Life, Is.LessThanOrEqualTo(HeadlessEngineEnv.LethalDamage), + "selected follower's life is not <= the spell damage (it would not die)"); + Assert.That(survivor.Life, Is.GreaterThan(HeadlessEngineEnv.LethalDamage), + "survivor follower's life is not > the spell damage (it would not survive)"); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.LethalDamageSpellId); + + // Place the lethal-damage spell in the active player's hand with PP to spare. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.LethalDamageSpellId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int playerInplayBefore = player.ClassAndInPlayCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + int enemyCemeteryBefore = enemy.CemeteryList.Count; + int survivorLifeBefore = survivor.Life; + int enemyLeaderLifeBefore = enemy.ClassAndInPlayCardList[0].Life; + + // Resolve the play through the real engine, passing the chosen (lethal) target via selectedCards. + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: new List { selected }), + "ActionProcessor.PlayCard threw on a lethal targeted-damage spell"); + + Assert.Multiple(() => + { + // PRIMARY M8 — death via combat math: the SELECTED follower (life <= damage) is removed + // from the enemy board and lands in the cemetery (the M7 removal dimension, reached + // through damage rather than `destroy`). + Assert.That(enemy.ClassAndInPlayCardList, Does.Not.Contain(selected), + "lethal-damaged follower still on the enemy board (death-via-damage did not remove it)"); + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore - 1), + "enemy board count not -1 (lethal damage did not commit a removal, or hit the wrong count)"); + Assert.That(enemy.CemeteryList, Contains.Item(selected), + "lethal-damaged follower not in the enemy CemeteryList"); + Assert.That(enemy.CemeteryList.Count, Is.EqualTo(enemyCemeteryBefore + 1), + "enemy cemetery count not +1"); + + // PRIMARY M8 — routing: the UN-SELECTED control (life > damage) is UNTOUCHED and stays on + // the board (the M6 routing assertion; select_count=1 hits only the selected target, so + // this proves the lethal removal was routed to the selection and is not a blanket wipe). + Assert.That(enemy.ClassAndInPlayCardList, Contains.Item(survivor), + "un-selected follower was removed (effect not routed, or a blanket wipe)"); + Assert.That(survivor.Life, Is.EqualTo(survivorLifeBefore), + "un-selected follower took damage (effect not routed to the selection)"); + + // Leader untouched (the spell targets a follower, not the face). + Assert.That(enemy.ClassAndInPlayCardList[0].Life, Is.EqualTo(enemyLeaderLifeBefore), + "opponent leader life changed (damage hit the leader, not the selected follower)"); + + // Cost paid; spell leaves hand and (being a spell) does NOT occupy the board. + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + Assert.That(player.HandCardList, Does.Not.Contain(card), "spell still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore - 1), "hand count not -1"); + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(card), "spell wrongly placed on the board"); + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(playerInplayBefore), "player board count changed"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/MultiInstanceEngineTests.cs b/SVSim.BattleEngine.Tests/MultiInstanceEngineTests.cs new file mode 100644 index 0000000..62b55c3 --- /dev/null +++ b/SVSim.BattleEngine.Tests/MultiInstanceEngineTests.cs @@ -0,0 +1,99 @@ +#nullable enable +using System.Linq; +using System.Threading.Tasks; +using NUnit.Framework; +using SVSim.BattleEngine.Ambient; +using SVSim.BattleNode.Sessions.Engine; + +namespace SVSim.BattleEngine.Tests; + +/// The forcing-function tests for the multi-instancing migration (Task 8). Each engine +/// instance carries its OWN internally (SessionBattleEngine +/// constructs a per-session ctx in its field initializer and enters it on every Setup/Receive/ +/// read), so two engines on two tasks must resolve independently — no shared "current mgr", +/// "current GameMgr", or "current viewer id" state. The stress test pins +/// parallel-equals-sequential to catch any residual contamination (which would manifest as a +/// life/PP/hand-count mismatch between the parallel and sequential runs). +[TestFixture, Parallelizable(ParallelScope.All)] +public class MultiInstanceEngineTests +{ + [OneTimeSetUp] + public void OneTimeSetUp() => HeadlessEngineEnv.EnsureProcessGlobals(); + + [Test] + public async Task TwoBattles_ResolveIndependently_OnDifferentTasks() + { + var engineA = new SessionBattleEngine(); + var engineB = new SessionBattleEngine(); + engineA.Setup(masterSeed: 111, HeadlessEngineEnv.SampleDeck(), HeadlessEngineEnv.SampleDeck(), + seatAClass: 1, seatBClass: 2); + engineB.Setup(masterSeed: 222, HeadlessEngineEnv.SampleDeck(), HeadlessEngineEnv.SampleDeck(), + seatAClass: 5, seatBClass: 7); + + var taskA = Task.Run(() => DriveBasicTurns(engineA)); + var taskB = Task.Run(() => DriveBasicTurns(engineB)); + await Task.WhenAll(taskA, taskB); + + // Pin the engines' post-Setup state to concrete starting values: LeaderLife=20 (InitLeaderLife's + // DefaultLeaderLife, applied by SessionBattleEngine.Setup), Pp=0 (pre-first-turn, no PP refill + // has run), HandCount=0 (Setup builds the deck/leader graph but doesn't deal an opening hand — + // mulligan/draw happens once a turn-start phase runs, which DriveBasicTurns doesn't trigger). + // Both engines must report the SAME starting state regardless of distinct masterSeeds, which is + // the cross-contamination property under test: ambient isolation means neither engine's reads + // can leak into the other's seat lookups. + Assert.That(engineA.LeaderLife(true), Is.EqualTo(20)); + Assert.That(engineB.LeaderLife(true), Is.EqualTo(20)); + Assert.That(engineA.Pp(true), Is.EqualTo(0)); + Assert.That(engineB.Pp(true), Is.EqualTo(0)); + Assert.That(engineA.HandCount(true), Is.EqualTo(0)); + Assert.That(engineB.HandCount(true), Is.EqualTo(0)); + } + + [Test] + public async Task StressN_BaselineMatches([Values(4, 8, 16)] int n) + { + var inputs = new (int seed, long[] deckA, long[] deckB)[n]; + for (int i = 0; i < n; i++) + inputs[i] = (1000 + i, HeadlessEngineEnv.SampleDeck(), HeadlessEngineEnv.SampleDeck()); + + // Setup AND Drive both parallelize: the residual decomp-origin static accumulators + // (Wizard.LocalLog._lastTraceLogStringBuilder etc.) and the Unity Resources shim + // cache are now thread-safe (static lock / ConcurrentDictionary), so two engines + // constructing in parallel no longer corrupts shared scratch state. The full + // construct-then-read pipeline runs concurrently per task and the result still + // pins to the sequential baseline — that is the cross-contamination property + // under test (ambient isolation + safe shared statics). + var parallel = await Task.WhenAll(inputs.Select(input => Task.Run(() => + { + var e = new SessionBattleEngine(); + e.Setup(input.seed, input.deckA, input.deckB); + DriveBasicTurns(e); + return e.LeaderLife(true); + }))); + + var sequential = new int[n]; + for (int i = 0; i < n; i++) + { + var e = new SessionBattleEngine(); + e.Setup(inputs[i].seed, inputs[i].deckA, inputs[i].deckB); + DriveBasicTurns(e); + sequential[i] = e.LeaderLife(true); + } + + Assert.That(parallel, Is.EqualTo(sequential)); + } + + [Test] + public void GameMgr_GetIns_WithoutScope_Throws() + { + Assert.That(BattleAmbient.Current, Is.Null); + Assert.Throws(() => GameMgr.GetIns()); + } + + private static void DriveBasicTurns(SessionBattleEngine e) + { + _ = e.LeaderLife(true); + _ = e.Pp(true); + _ = e.HandCount(true); + } +} diff --git a/SVSim.BattleEngine.Tests/NetworkEmitFixtureBase.cs b/SVSim.BattleEngine.Tests/NetworkEmitFixtureBase.cs new file mode 100644 index 0000000..4efbb35 --- /dev/null +++ b/SVSim.BattleEngine.Tests/NetworkEmitFixtureBase.cs @@ -0,0 +1,19 @@ +namespace SVSim.BattleEngine.Tests +{ + // Shared base for every network-emit test fixture (M13 EmitPathReadOracleTests, the + // construction-probe's OnEmit seam test, and any M14+ network fixture to come). + // + // POST-TASK-8 (multi-instancing migration): now empty. The historical hygiene gap this class + // closed (HeadlessEngineEnv.NewNetworkEmitBattle leaving IsForecast=false + a stray injected + // agent visible to a later solo fixture) was a PROCESS-GLOBAL leak via the now-deleted + // BattleManagerBase._isForecastFallback + ToolboxGame._realTimeNetworkAgentFallback statics. + // Both fields are gone: IsForecast/RealTimeNetworkAgent live on the per-test ambient context + // (TestBattleScope's BattleAmbientContext), so scope Dispose drops them. A later fixture's + // new TestBattleScope starts a fresh ctx with IsForecast=true and a null NetworkAgent by + // default — exactly the EnsureInitialized invariant the old TearDown manually restored. + // + // Kept as a marker base class so derived fixtures don't churn; can be deleted in Task 9. + public abstract class NetworkEmitFixtureBase + { + } +} diff --git a/SVSim.BattleEngine.Tests/NetworkMgrConstructionProbeTests.cs b/SVSim.BattleEngine.Tests/NetworkMgrConstructionProbeTests.cs new file mode 100644 index 0000000..48584f4 --- /dev/null +++ b/SVSim.BattleEngine.Tests/NetworkMgrConstructionProbeTests.cs @@ -0,0 +1,41 @@ +using NUnit.Framework; +using SVSim.BattleEngine.Rng; +using Wizard.BattleMgr; + +namespace SVSim.BattleEngine.Tests +{ + // M13 step 1 (the M2 ConstructionProbe pattern): can a NetworkBattleManagerBase-derived mgr be + // built headless at all? NetworkBattleManagerSetup constructs NetworkTouchControl(this, + // _battleCamera, _backGround) + RegisterActionManager + OperateReceive — the largest new shim + // surface since M5's prefab path. Isolate "ctor runs" before any play is driven. + [TestFixture] + public class NetworkMgrConstructionProbeTests : NetworkEmitFixtureBase + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + [Test] + public void HeadlessNetworkBattleMgr_constructs_headless() + { + Assert.DoesNotThrow(() => + { + var mgr = new HeadlessNetworkBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + Assert.That(mgr, Is.Not.Null); + }); + } + + [Test] + public void OnEmit_capture_seam_is_wired_via_injected_agent() + { + var (mgr, emitted) = HeadlessEngineEnv.NewNetworkEmitBattle(); + _scope.Ctx.Mgr = mgr; + Assert.That(mgr, Is.Not.Null); + Assert.That(Wizard.ToolboxGame.RealTimeNetworkAgent, Is.Not.Null, + "agent must be injected so NetworkBattleSender's ToolboxGame.RealTimeNetworkAgent.* calls resolve"); + Assert.That(emitted, Is.Empty, "no emit yet — only the seam is wired"); + } + } +} diff --git a/SVSim.BattleEngine.Tests/RandomDrawOracleTests.cs b/SVSim.BattleEngine.Tests/RandomDrawOracleTests.cs new file mode 100644 index 0000000..7ddb2e6 --- /dev/null +++ b/SVSim.BattleEngine.Tests/RandomDrawOracleTests.cs @@ -0,0 +1,84 @@ +using System.Linq; +using NUnit.Framework; +using SVSim.BattleEngine.Rng; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M12: the first card whose outcome is a GENUINE RNG roll. The M9 draw spell over a 3-card deck with + // IsRandomDraw=true selects via SkillRandomSelectFilter -> GetIns().StableRandom(poolCount), which + // HeadlessBattleMgr routes to the injected ScriptedRandomSource. The oracle asserts the engine drew + // EXACTLY the card the scripted roll selects, and (load-bearing) that the pick TRACKS the script: + // a different scripted unit draws a different card. This is the multi-outcome roll M9's one-card pool + // deliberately neutralized — it requires the F2 decoupling (real rolls under IsForecast) AND the + // IsRandomDraw=true second gate, both delivered by NewAuthoritativeBattle. + [TestFixture] + public class RandomDrawOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + + [TearDown] + public void ResetRandomDrawGate() + { + // NewAuthoritativeBattle sets the process-global BattleManagerBase.IsRandomDraw = true; reset it + // so this fixture doesn't leak that state into later-running fixtures (which expect the default + // false / top-of-deck draw behavior). Prevents order-dependent flakes as more RNG oracles land. + // (Now an ambient write inside the scope; harmless either way.) + BattleManagerBase.IsRandomDraw = false; + _scope?.Dispose(); + _scope = null; + } + + // Draw with a single scripted unit; return (drawnCardId, deckCountAfter). The deck is seeded with + // three distinguishable cards at indices 2,3,4 -> Index-order positions 0,1,2 map to + // RngDeckCardA/B/C. The draw makes one StableRandom(3) call -> index = floor(3*unit). + private (int drawnId, int deckAfter) DrawWith(double unit) + { + var mgr = HeadlessEngineEnv.NewAuthoritativeBattle(new ScriptedRandomSource(new[] { unit })); + _scope.Ctx.Mgr = mgr; + var player = mgr.BattlePlayer; + + HeadlessEngineEnv.SeedDeck(mgr, HeadlessEngineEnv.RngDeckCardA, index: 2, isPlayer: true); + HeadlessEngineEnv.SeedDeck(mgr, HeadlessEngineEnv.RngDeckCardB, index: 3, isPlayer: true); + HeadlessEngineEnv.SeedDeck(mgr, HeadlessEngineEnv.RngDeckCardC, index: 4, isPlayer: true); + + var spell = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.RngDrawSpellId, 1, isPlayer: true, mgr); + player.HandCardList.Add(spell); + player.Pp = 10; + + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(spell, selectedCards: null), "PlayCard threw on the random draw"); + + // The drawn card is the new hand entry that is not the spell. + var drawn = player.HandCardList.Single(c => c.CardId != HeadlessEngineEnv.RngDrawSpellId); + return (drawn.CardId, player.DeckCardList.Count); + } + + [Test] + public void Random_draw_picks_the_scripted_card() + { + // unit 0.5 -> floor(3*0.5)=1 -> Index-order position 1 -> RngDeckCardB. + var (drawnId, deckAfter) = DrawWith(0.5); + Assert.Multiple(() => + { + Assert.That(drawnId, Is.EqualTo(HeadlessEngineEnv.RngDeckCardB), + "scripted roll 0.5 should draw the middle (Index-order position 1) deck card"); + Assert.That(deckAfter, Is.EqualTo(2), "deck should be 3 -> 2 after drawing one"); + }); + } + + [Test] + public void Random_draw_pick_tracks_the_scripted_roll() + { + // Load-bearing: varying the scripted unit must move the pick across all three positions. + // floor(3*0.0)=0 -> A ; floor(3*0.5)=1 -> B ; floor(3*0.9)=2 -> C. + Assert.That(DrawWith(0.0).drawnId, Is.EqualTo(HeadlessEngineEnv.RngDeckCardA), "0.0 -> position 0"); + Assert.That(DrawWith(0.5).drawnId, Is.EqualTo(HeadlessEngineEnv.RngDeckCardB), "0.5 -> position 1"); + Assert.That(DrawWith(0.9).drawnId, Is.EqualTo(HeadlessEngineEnv.RngDeckCardC), "0.9 -> position 2"); + } + } +} diff --git a/SVSim.BattleEngine.Tests/RngSeamTests.cs b/SVSim.BattleEngine.Tests/RngSeamTests.cs new file mode 100644 index 0000000..5a0f1e8 --- /dev/null +++ b/SVSim.BattleEngine.Tests/RngSeamTests.cs @@ -0,0 +1,105 @@ +using System; +using NUnit.Framework; +using SVSim.BattleEngine.Rng; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + [TestFixture] + public class RngSeamTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + // RandomSourceBridge.Range must mirror the engine's exact roll arithmetic: + // BattleManagerBase.StableRandom does `(int)Math.Floor((double)val * unit)`. + [Test] + public void Bridge_Range_mirrors_engine_floor_arithmetic() + { + Assert.That(RandomSourceBridge.Range(7, 0.0), Is.EqualTo(0)); // floor(7*0) = 0 + Assert.That(RandomSourceBridge.Range(7, 0.999), Is.EqualTo(6)); // floor(6.993) = 6 (never == val) + Assert.That(RandomSourceBridge.Range(3, 0.5), Is.EqualTo(1)); // floor(1.5) = 1 (middle of 3) + Assert.That(RandomSourceBridge.Range(1, 0.5), Is.EqualTo(0)); // floor(0.5) = 0 + } + + // SeededRandomSource(seed) must reproduce the engine's own generators EXACTLY: BattleManagerBase + // seeds both _stableRandom and _stableRandomOnlySelf as `new System.Random(RandomSeed)` + // (BattleManagerBase.cs:721-722). NextUnit() == synced.NextDouble(); NextSelf(max) == self.Next(max). + [Test] + public void SeededSource_reproduces_two_System_Random_streams() + { + const int seed = 12345; + var src = new SeededRandomSource(seed); + + var refSynced = new System.Random(seed); // mirrors _stableRandom + var refSelf = new System.Random(seed); // mirrors _stableRandomOnlySelf (separate stream) + + for (int i = 0; i < 8; i++) + Assert.That(src.NextUnit(), Is.EqualTo(refSynced.NextDouble()), $"NextUnit drift at {i}"); + for (int i = 0; i < 8; i++) + Assert.That(src.NextSelf(100), Is.EqualTo(refSelf.Next(100)), $"NextSelf drift at {i}"); + } + + // ScriptedRandomSource feeds a known sequence (the oracle's control + the Phase-3 replay seam). + // It MUST throw on overrun, not wrap: an unexpected extra roll should fail loudly so a test + // surfaces a miscount of engine RNG calls rather than silently reusing a value. + [Test] + public void ScriptedSource_returns_sequence_then_throws_on_overrun() + { + var src = new ScriptedRandomSource(new[] { 0.1, 0.5 }, new[] { 3 }); + + Assert.That(src.NextUnit(), Is.EqualTo(0.1)); + Assert.That(src.NextUnit(), Is.EqualTo(0.5)); + Assert.That(() => src.NextUnit(), Throws.InvalidOperationException, "should throw on unit overrun"); + + Assert.That(src.NextSelf(99), Is.EqualTo(3)); + Assert.That(() => src.NextSelf(99), Throws.InvalidOperationException, "should throw on self overrun"); + } + + // The decoupling (F2): the override must roll REAL values even though IsForecast == true (which + // forces the un-overridden engine methods to return 0). A ScriptedRandomSource proves the value + // came from the injected source, not the engine's zeroing. + [Test] + public void Override_rolls_real_values_under_IsForecast() + { + BattleManagerBase.IsForecast = true; // would zero the un-overridden engine RNG + + // 3 units; with RandomSourceBridge.Range(val, unit) = floor(val*unit): + // StableRandom(7) with 0.5 -> floor(3.5) = 3 + // StableRandomDouble() -> 0.25 + // StableRandomOnlySelf(10) -> scripted self pick 4 + var src = new ScriptedRandomSource(new[] { 0.5, 0.25 }, new[] { 4 }); + var mgr = new HeadlessBattleMgr(new HeadlessContentsCreator(), src); + _scope.Ctx.Mgr = mgr; + + Assert.That(mgr.StableRandom(7), Is.EqualTo(3), "StableRandom did not use the injected source"); + Assert.That(mgr.randomResult, Is.EqualTo(0.5), "StableRandom must set randomResult to the rolled unit"); + Assert.That(mgr.StableRandomDouble(), Is.EqualTo(0.25), "StableRandomDouble did not use the injected source"); + Assert.That(mgr.randomResult, Is.EqualTo(0.25), "StableRandomDouble must set randomResult"); + Assert.That(mgr.StableRandomOnlySelf(10), Is.EqualTo(4), "StableRandomOnlySelf did not use the injected source"); + } + + // Parity: with the DEFAULT (seeded) source, HeadlessBattleMgr.StableRandom must equal what the + // verbatim engine would compute — floor(val * new System.Random(seed).NextDouble()) — pinning the + // re-authored RandomSourceBridge arithmetic to the engine's own formula+generator. (The default + // source seeds from HeadlessContentsCreator.RandomSeed == 12345.) + [Test] + public void Default_source_matches_engine_generator_and_formula() + { + BattleManagerBase.IsForecast = true; + + var mgr = new HeadlessBattleMgr(new HeadlessContentsCreator()); // default SeededRandomSource(12345) + _scope.Ctx.Mgr = mgr; + var reference = new System.Random(12345); + + for (int i = 0; i < 10; i++) + { + int expected = (int)System.Math.Floor(7 * reference.NextDouble()); + Assert.That(mgr.StableRandom(7), Is.EqualTo(expected), $"parity drift at roll {i}"); + } + } + } +} diff --git a/SVSim.BattleEngine.Tests/SVSim.BattleEngine.Tests.csproj b/SVSim.BattleEngine.Tests/SVSim.BattleEngine.Tests.csproj new file mode 100644 index 0000000..80beec2 --- /dev/null +++ b/SVSim.BattleEngine.Tests/SVSim.BattleEngine.Tests.csproj @@ -0,0 +1,39 @@ + + + + net8.0 + + disable + disable + + 12.0 + false + true + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + diff --git a/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplay.cs b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplay.cs new file mode 100644 index 0000000..9710c6d --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplay.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Nodes; +using SVSim.BattleNode.Protocol; + +namespace SVSim.BattleEngine.Tests.SessionEngine +{ + internal sealed record CapturedFrame(DateTime Ts, string Direction, string Uri, MsgEnvelope Env, string RawBody); + + /// Parses a battle_test ndjson capture into MsgEnvelopes the engine can ingest. + /// + /// Capture quirk (verified against data_dumps/captures/battle_test): the authoritative URI lives at + /// the TOP LEVEL for SEND frames (the body omits uri/viewerId/uuid and carries only the play + /// payload) and in the BODY for RECEIVE frames (top-level uri is null). We resolve uri as + /// top ?? body, then normalize the body into a full envelope (injecting the fields a send-frame body + /// lacks) so MsgEnvelope.FromJson — which requires uri/viewerId/uuid — succeeds for both. + internal static class CaptureReplay + { + public static IReadOnlyList Load(string fixtureFileName) + { + var path = Path.Combine(AppContext.BaseDirectory, "Fixtures", fixtureFileName); + var frames = new List(); + foreach (var line in File.ReadLines(path)) + { + if (string.IsNullOrWhiteSpace(line)) continue; + using var doc = JsonDocument.Parse(line); + var root = doc.RootElement; + var direction = root.TryGetProperty("direction", out var dEl) ? dEl.GetString() ?? "" : ""; + var ts = root.TryGetProperty("ts", out var tsEl) && tsEl.ValueKind == JsonValueKind.String + ? DateTime.Parse(tsEl.GetString()!, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind) + : default; + if (!root.TryGetProperty("body", out var bodyEl) || bodyEl.ValueKind != JsonValueKind.Object) + continue; + + string uri = + root.TryGetProperty("uri", out var tu) && tu.ValueKind == JsonValueKind.String + ? tu.GetString()! + : bodyEl.TryGetProperty("uri", out var bu) && bu.ValueKind == JsonValueKind.String + ? bu.GetString()! + : "None"; + + // Normalize: send-frame bodies are bare payloads (no envelope fields). Inject the keys + // FromJson requires; set the resolved uri. + var obj = JsonNode.Parse(bodyEl.GetRawText())!.AsObject(); + obj["uri"] = uri; + if (!obj.ContainsKey("viewerId")) obj["viewerId"] = 0L; + if (!obj.ContainsKey("uuid")) obj["uuid"] = ""; + var normalized = obj.ToJsonString(); + + MsgEnvelope env; + try { env = MsgEnvelope.FromJson(normalized); } + catch { continue; } // out-of-model / unparseable line + frames.Add(new CapturedFrame(ts, direction, uri, env, normalized)); + } + return frames; + } + + /// Both clients' SENT frames interleaved in capture (ts) order, each tagged with its + /// seat: cl1 == seat A == player (true), cl2 == seat B == opponent (false). This is the node's + /// both-clients-sends ingest order — the same ts ordering the N1 shadow-replay test uses, here + /// extended to merge both sides' sends rather than replaying one client's full receive stream. + public static IEnumerable<(MsgEnvelope Env, bool Seat)> InterleavedSends( + IReadOnlyList cl1, IReadOnlyList cl2) + { + return cl1.Where(f => f.Direction == "send").Select(f => (f, Seat: true)) + .Concat(cl2.Where(f => f.Direction == "send").Select(f => (f, Seat: false))) + .OrderBy(x => x.f.Ts) + .Select(x => (x.f.Env, x.Seat)); + } + + /// The selfDeck idx->cardId order from the Matched frame (the order the node also + /// computed and handed the client). This is the deck the engine seats for that side. + public static IReadOnlyList SelfDeckFrom(IEnumerable frames) + { + var matched = frames.FirstOrDefault(f => f.Uri == nameof(NetworkBattleUri.Matched)); + if (matched is null) return Array.Empty(); + using var doc = JsonDocument.Parse(matched.RawBody); + if (!doc.RootElement.TryGetProperty("selfDeck", out var deck)) return Array.Empty(); + return deck.EnumerateArray() + .OrderBy(e => e.GetProperty("idx").GetInt32()) + .Select(e => e.GetProperty("cardId").GetInt64()) + .ToList(); + } + + /// The per-battle master seed the capture carries (Matched.selfInfo.seed) — the seed the + /// node generated and both clients used (F-N-5). Falls back to 0 if absent. + public static int SeedFrom(IEnumerable frames) + { + var matched = frames.FirstOrDefault(f => f.Uri == nameof(NetworkBattleUri.Matched)); + if (matched is null) return 0; + using var doc = JsonDocument.Parse(matched.RawBody); + if (doc.RootElement.TryGetProperty("selfInfo", out var si) + && si.TryGetProperty("seed", out var seed) + && seed.TryGetInt32(out var v)) + return v; + return 0; + } + } +} diff --git a/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayFullInputDivergenceExperimentTests.cs b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayFullInputDivergenceExperimentTests.cs new file mode 100644 index 0000000..c2f0924 --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayFullInputDivergenceExperimentTests.cs @@ -0,0 +1,275 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Nodes; +using NUnit.Framework; +using SVSim.BattleNode.Protocol; +using SVSim.BattleNode.Sessions.Engine; + +namespace SVSim.BattleEngine.Tests.SessionEngine +{ + /// + /// PHASE 4 — DECISIVE VERIFICATION (TEST-ONLY, no production fix, no Engine/*.cs edits). + /// + /// QUESTION: does feeding the headless shadow engine the FULL client inputs (server-authored + /// Deal/Swap/Ready setup frames for BOTH seats + the real per-seat idxChangeSeed) make its + /// recovery-mode draw recompute faithful, so the "Target card was not found in hand cards" + /// divergences vanish? + /// + /// This builds the explicit 2x2 {setup-frames ingested: yes/no} x {real seed: yes/no} divergence + /// table over the SAME fresh battle (907324319325, battle_test_fresh_cl1/cl2.ndjson), and — at the + /// FIRST remaining divergence — dumps the engine's hand indices/ids vs the wire's playIdx. + /// + /// SEEDING MECHANISM (clean, both seats): the seat-B Ready ingest throws an NRE headless (the + /// recovery deal path isn't headless-clean for the opponent seat), so the wire Ready cannot be + /// relied on to seat seat B's XorShift. To inject the real seed FAITHFULLY for BOTH seats without + /// depending on the throwing Ready, we call the test seam . + /// DebugSeedIdxChange(self, oppo) (-> BattleManagerBase.CreateXorShift) BEFORE the + /// mulligan-end frame, with the real per-seat seeds (seat A = cl1's Ready idxChangeSeed = 1430655717, + /// seat B = cl2's = 661650374). We ASSERT both SelfXorShiftActive and OppoXorShiftActive + /// are true after. + /// + /// SETUP-FRAME INGEST: identical mechanism to — a + /// single Deal (cl1's receive Deal seats BOTH hands), each seat's Swap (its mulligan), + /// each seat's Ready (mulligan-end). The {no-setup-frames} row SKIPS Deal/Swap/Ready entirely: + /// the engine's autonomous Setup hand stands, and we replay only the plays. + /// + [TestFixture] + [NonParallelizable] + public class CaptureReplayFullInputDivergenceExperimentTests + { + // Real per-seat idxChangeSeed carried by each client's Ready frame (given in the experiment brief; + // re-confirmed below against the captures). + private const int SeatASeed = 1430655717; // cl1 / seat A / player + private const int SeatBSeed = 661650374; // cl2 / seat B / opponent + + private static readonly HashSet SkipUris = new() + { + nameof(NetworkBattleUri.Echo), + nameof(NetworkBattleUri.ChatStamp), + nameof(NetworkBattleUri.Gungnir), + }; + + private static readonly HashSet MulliganUris = new() + { + nameof(NetworkBattleUri.Deal), + nameof(NetworkBattleUri.Swap), + nameof(NetworkBattleUri.Ready), + }; + + private sealed record HandDump(string Seat, int PlayIdx, string Uri, string Reason, + IReadOnlyList<(int Index, int CardId)> SelfHand, + IReadOnlyList<(int Index, int CardId)> OppoHand, + bool PlayIdxInSelfHand, bool PlayIdxInOppoHand); + + private sealed record Cell( + bool SetupFrames, bool RealSeed, + int Divergences, bool SelfXorActive, bool OppoXorActive, + HandDump? FirstNotFoundDump); + + private static int ReadPlayIdx(string rawBody) + { + using var doc = JsonDocument.Parse(rawBody); + return doc.RootElement.TryGetProperty("playIdx", out var p) && p.TryGetInt32(out var v) ? v : -1; + } + + // Snapshot a seat's hand as (engine Index, CardId) pairs. Reads through the SessionBattleEngine + // oracle accessors (HandCount/HandCardIndex/HandCardId). + private static List<(int, int)> HandSnapshot(SessionBattleEngine engine, bool seat) + { + var list = new List<(int, int)>(); + int n = engine.HandCount(seat); + for (int i = 0; i < n; i++) + list.Add((engine.HandCardIndex(seat, i), engine.HandCardId(seat, i))); + return list; + } + + private static Cell Run(bool setupFrames, bool realSeed) + { + var cl1 = CaptureReplay.Load("battle_test_fresh_cl1.ndjson"); + var cl2 = CaptureReplay.Load("battle_test_fresh_cl2.ndjson"); + + var deckA = CaptureReplay.SelfDeckFrom(cl1); + var deckB = CaptureReplay.SelfDeckFrom(cl2); + Assert.That(deckA, Is.Not.Empty); + Assert.That(deckB, Is.Not.Empty); + + var engine = new SessionBattleEngine(); + engine.Setup(masterSeed: CaptureReplay.SeedFrom(cl1), seatADeck: deckA, seatBDeck: deckB); + Assert.That(engine.IsReady, Is.True); + + // Inject the real per-seat seed BEFORE mulligan-end (Ready). Clean both-seat activation via the + // CreateXorShift seam, sidestepping the seat-B Ready NRE. + if (realSeed) + engine.DebugSeedIdxChange(SeatASeed, SeatBSeed); + + int divergences = 0; + HandDump? firstNotFound = null; + + void Ingest(MsgEnvelope env, bool seat, string uri, string rawBody) + { + var r = engine.Receive(env, isPlayerSeat: seat); + if (!r.Diverged) return; + divergences++; + if (firstNotFound is null && (r.RejectReason ?? "").Contains("not found in hand")) + { + int playIdx = ReadPlayIdx(rawBody); + var self = HandSnapshot(engine, seat); + var oppo = HandSnapshot(engine, !seat); + firstNotFound = new HandDump( + seat ? "A" : "B", playIdx, uri, Trim(r.RejectReason), + self, oppo, + self.Any(h => h.Item1 == playIdx), oppo.Any(h => h.Item1 == playIdx)); + } + } + + CapturedFrame Receive(IReadOnlyList frames, string uri) => + frames.First(f => f.Direction == "receive" && f.Uri == uri); + + // --- Phase 1: setup frames (optional) --------------------------------------------------------- + if (setupFrames) + { + var deal = Receive(cl1, nameof(NetworkBattleUri.Deal)); + Ingest(deal.Env, seat: true, nameof(NetworkBattleUri.Deal), deal.RawBody); + foreach (var (frames, seat) in new[] { (cl1, true), (cl2, false) }) + { + var swap = Receive(frames, nameof(NetworkBattleUri.Swap)); + Ingest(swap.Env, seat, nameof(NetworkBattleUri.Swap), swap.RawBody); + var ready = Receive(frames, nameof(NetworkBattleUri.Ready)); + Ingest(ready.Env, seat, nameof(NetworkBattleUri.Ready), ready.RawBody); + } + } + + bool selfActive = engine.SelfXorShiftActive; + bool oppoActive = engine.OppoXorShiftActive; + + // Snapshot the engine's post-setup hands (after Deal/Swap/Ready) for the full-inputs cell, so the + // report can compare the engine's mulligan-resolved hand against the wire's Swap/Ready move list. + if (setupFrames && realSeed) + { + TestContext.WriteLine(" [post-setup] engine SELF (seat A) hand: " + + string.Join(" ", HandSnapshot(engine, true).Select(h => $"(idx={h.Item1},cid={h.Item2})"))); + TestContext.WriteLine(" [post-setup] engine OPPO (seat B) hand: " + + string.Join(" ", HandSnapshot(engine, false).Select(h => $"(idx={h.Item1},cid={h.Item2})"))); + } + + // --- Phase 2: replay both clients' interleaved SENDS (the plays) ------------------------------ + var sends = SendsWithRawBody(cl1, cl2) + .Where(x => !SkipUris.Contains(x.Frame.Uri)) + .ToList(); + foreach (var x in sends) + Ingest(x.Frame.Env, x.Seat, x.Frame.Uri, x.Frame.RawBody); + + return new Cell(setupFrames, realSeed, divergences, selfActive, oppoActive, firstNotFound); + } + + private static IEnumerable<(CapturedFrame Frame, bool Seat)> SendsWithRawBody( + IReadOnlyList cl1, IReadOnlyList cl2) + { + return cl1.Where(f => f.Direction == "send").Select(f => (f, Seat: true)) + .Concat(cl2.Where(f => f.Direction == "send").Select(f => (f, Seat: false))) + .OrderBy(x => x.f.Ts) + .Select(x => (x.f, x.Seat)); + } + + private static string Trim(string? s) => (s ?? "").Split(" @ ")[0]; + + [Test] + public void Full_input_2x2_divergence_table_and_first_remaining_divergence_dump() + { + // Confirm the brief's per-seat seeds match the captures' Ready frames before relying on them. + ConfirmReadySeeds(); + + var cells = new[] + { + Run(setupFrames: false, realSeed: false), // baseline-ish: autonomous Setup hand, seed -1 + Run(setupFrames: false, realSeed: true), + Run(setupFrames: true, realSeed: false), + Run(setupFrames: true, realSeed: true), // FULL INPUTS + }; + + TestContext.WriteLine("=== 2x2 DIVERGENCE TABLE (setup-frames x real-seed) ==="); + TestContext.WriteLine("setupFrames | realSeed | divergences | selfXor | oppoXor"); + foreach (var c in cells) + TestContext.WriteLine( + $" {(c.SetupFrames ? "YES" : "no ")} | {(c.RealSeed ? "YES" : "no ")} | {c.Divergences,2} | {c.SelfXorActive,-5} | {c.OppoXorActive,-5}"); + + var full = cells.Single(c => c.SetupFrames && c.RealSeed); + TestContext.WriteLine(""); + TestContext.WriteLine($"FULL-INPUTS cell: setupFrames=YES realSeed=YES -> divergences={full.Divergences} " + + $"selfXorActive={full.SelfXorActive} oppoXorActive={full.OppoXorActive}"); + + if (full.FirstNotFoundDump is { } d) + { + TestContext.WriteLine(""); + TestContext.WriteLine("=== FIRST 'not found in hand' DIVERGENCE (full-inputs cell) ==="); + TestContext.WriteLine($" seat={d.Seat} uri={d.Uri} wire playIdx={d.PlayIdx} reason={d.Reason}"); + TestContext.WriteLine($" playIdx in self hand? {d.PlayIdxInSelfHand} in oppo hand? {d.PlayIdxInOppoHand}"); + TestContext.WriteLine($" engine SELF (seat {d.Seat}) hand [{d.SelfHand.Count}]: " + + string.Join(" ", d.SelfHand.Select(h => $"(idx={h.Index},cid={h.CardId})"))); + TestContext.WriteLine($" engine OPPO hand [{d.OppoHand.Count}]: " + + string.Join(" ", d.OppoHand.Select(h => $"(idx={h.Index},cid={h.CardId})"))); + } + else + { + TestContext.WriteLine(""); + TestContext.WriteLine("FULL-INPUTS cell produced NO 'not found in hand' divergence."); + } + + // EVIDENCE ASSERTIONS (pin the experiment's reproducibility, not a desired fix outcome): + Assert.Multiple(() => + { + // The seed seam activates BOTH seats' XorShift in every realSeed cell. + foreach (var c in cells.Where(c => c.RealSeed)) + { + Assert.That(c.SelfXorActive, Is.True, + $"realSeed cell (setup={c.SetupFrames}) must activate self XorShift"); + Assert.That(c.OppoXorActive, Is.True, + $"realSeed cell (setup={c.SetupFrames}) must activate oppo XorShift"); + } + // With NO seed seam AND NO setup frames (the live shadow's effective state — never + // ingests the seed-bearing Ready), BOTH seats' XorShift stay inactive. + var bare = cells.Single(c => !c.RealSeed && !c.SetupFrames); + Assert.That(bare.SelfXorActive, Is.False, "no-seed/no-setup leaves self XorShift inactive"); + Assert.That(bare.OppoXorActive, Is.False, "no-seed/no-setup leaves oppo XorShift inactive"); + + // With setup frames but no seam, the seat-A Ready frame's own idxChangeSeed activates the + // SELF XorShift (seat B's Ready NREs before it can seat oppo) — so self is active, oppo isn't. + var setupNoSeam = cells.Single(c => !c.RealSeed && c.SetupFrames); + Assert.That(setupNoSeam.SelfXorActive, Is.True, + "setup-frames cell: seat-A Ready idxChangeSeed activates self XorShift"); + Assert.That(setupNoSeam.OppoXorActive, Is.False, + "setup-frames cell: seat-B Ready NREs before seating oppo XorShift"); + + // THE DECISIVE FINDING: full inputs (setup frames + real seed, both seats' XorShift active) + // do NOT eliminate the divergences — they stay at the 14 baseline. + var full2 = cells.Single(c => c.SetupFrames && c.RealSeed); + Assert.That(full2.SelfXorActive && full2.OppoXorActive, Is.True, + "full-inputs cell has both seats' XorShift active"); + Assert.That(full2.Divergences, Is.GreaterThan(0), + "REFUTED: full inputs do NOT make the recovery recompute faithful — divergences remain"); + }); + } + + // Re-confirm the brief's per-seat seeds against the captured Ready frames (fail loudly if the + // fixtures ever drift from the assumed seeds). + private static void ConfirmReadySeeds() + { + var cl1 = CaptureReplay.Load("battle_test_fresh_cl1.ndjson"); + var cl2 = CaptureReplay.Load("battle_test_fresh_cl2.ndjson"); + int a = ReadReadySeed(cl1); + int b = ReadReadySeed(cl2); + TestContext.WriteLine($"Confirmed Ready idxChangeSeed: cl1(seatA)={a} cl2(seatB)={b}"); + Assert.That(a, Is.EqualTo(SeatASeed), "cl1 Ready idxChangeSeed must equal the brief's seat-A seed"); + Assert.That(b, Is.EqualTo(SeatBSeed), "cl2 Ready idxChangeSeed must equal the brief's seat-B seed"); + } + + private static int ReadReadySeed(IReadOnlyList frames) + { + var ready = frames.First(f => f.Direction == "receive" && f.Uri == nameof(NetworkBattleUri.Ready)); + var obj = JsonNode.Parse(ready.RawBody)!.AsObject(); + return (int)obj["idxChangeSeed"]!; + } + } +} diff --git a/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayRandomDrawSpinRootCauseTests.cs b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayRandomDrawSpinRootCauseTests.cs new file mode 100644 index 0000000..855518a --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayRandomDrawSpinRootCauseTests.cs @@ -0,0 +1,288 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Nodes; +using NUnit.Framework; +using SVSim.BattleNode.Protocol; +using SVSim.BattleNode.Sessions.Engine; + +namespace SVSim.BattleEngine.Tests.SessionEngine +{ + /// + /// PHASE 4 — DRAW-RECOMPUTE ROOT-CAUSE VALIDATION (TEST-ONLY; no production fix; no Engine/*.cs edits). + /// + /// HYPOTHESIS (from the experiment brief): the shadow diverges ("Target card was not found in hand + /// cards", post-mulligan) because the per-turn network DRAW is a SEEDED-RANDOM pick from the deck via + /// mgr.StableRandom(...) (SkillRandomSelectFilter.Filtering:49/58), gated by the process-global + /// BattleManagerBase.IsRandomDraw — which the real match-load sets true via + /// StartOpening → SetupInitialGameState(areCardsRandomlyDrawn:true) (BattleManagerBase.cs:1098/1110). + /// The headless .Setup never runs SetupInitialGameState, so IsRandomDraw + /// stays FALSE and the shadow draws TOP-OF-DECK while the clients draw seeded-random → mismatch. + /// AND the shared _stableRandom stream must be advanced by the wire spin pre-roll the Ready + /// frame carries (spin=243), which OperateReceive.StartOperate:80-83 applies but the shadow never + /// ingests — so without it the stream is offset. + /// + /// ISOLATION MATRIX (this is the report's headline): setup frames + real seed are held CONSTANT (the + /// faithful baseline the prior FullInput experiment pinned at 14); the two NEW variables are toggled: + /// • {IsRandomDraw=false, no spin} = baseline (top-of-deck draws; the live shadow's effective state) + /// • {IsRandomDraw=true, no spin} = random-draw active but stream MIS-aligned (expect WORSE) + /// • {IsRandomDraw=true, +spin} = random-draw active AND stream aligned (the hypothesised fix) + /// + /// SPIN APPLICATION: spin=243 appears on the Ready frame in BOTH captures (each client applies its own + /// once). Our shadow shares ONE _stableRandom across both seats (seated as both players), and a + /// single client's stream sits 243 draws in after ITS Ready — so we apply spin=243 ONCE, after the + /// Deal/Swap/Ready setup frames and before the plays, exactly where the real client's StartOperate would. + /// (A scan of both fixtures confirms Ready is the ONLY frame carrying a non-zero spin.) + /// + [TestFixture] + [NonParallelizable] + public class CaptureReplayRandomDrawSpinRootCauseTests + { + private const int SeatASeed = 1430655717; // cl1 / seat A / player (Ready idxChangeSeed) + private const int SeatBSeed = 661650374; // cl2 / seat B / opponent + private const int WireSpin = 243; // both captures' Ready frame spin + + private static readonly HashSet SkipUris = new() + { + nameof(NetworkBattleUri.Echo), + nameof(NetworkBattleUri.ChatStamp), + nameof(NetworkBattleUri.Gungnir), + }; + + private sealed record HandDump(string Seat, int PlayIdx, string Uri, string Reason, + int StableRandomCount, + IReadOnlyList<(int Index, int CardId)> SelfHand, + IReadOnlyList<(int Index, int CardId)> OppoHand, + bool PlayIdxInSelfHand, bool PlayIdxInOppoHand); + + private sealed record Cell(bool RandomDraw, bool Spin, int Divergences, HandDump? FirstNotFound); + + private static int ReadPlayIdx(string rawBody) + { + using var doc = JsonDocument.Parse(rawBody); + return doc.RootElement.TryGetProperty("playIdx", out var p) && p.TryGetInt32(out var v) ? v : -1; + } + + private static List<(int, int)> HandSnapshot(SessionBattleEngine engine, bool seat) + { + var list = new List<(int, int)>(); + int n = engine.HandCount(seat); + for (int i = 0; i < n; i++) + list.Add((engine.HandCardIndex(seat, i), engine.HandCardId(seat, i))); + return list; + } + + private static CapturedFrame Receive(IReadOnlyList frames, string uri) => + frames.First(f => f.Direction == "receive" && f.Uri == uri); + + private static Cell Run(bool randomDraw, bool spin) + { + var cl1 = CaptureReplay.Load("battle_test_fresh_cl1.ndjson"); + var cl2 = CaptureReplay.Load("battle_test_fresh_cl2.ndjson"); + + var deckA = CaptureReplay.SelfDeckFrom(cl1); + var deckB = CaptureReplay.SelfDeckFrom(cl2); + Assert.That(deckA, Is.Not.Empty); + Assert.That(deckB, Is.Not.Empty); + + var engine = new SessionBattleEngine(); + engine.Setup(masterSeed: CaptureReplay.SeedFrom(cl1), seatADeck: deckA, seatBDeck: deckB); + Assert.That(engine.IsReady, Is.True); + + // CONSTANT across all cells: faithful seed seam (both seats' XorShift active), sidestepping the + // seat-B Ready NRE — identical to the FullInput experiment's full-inputs cell. + engine.DebugSeedIdxChange(SeatASeed, SeatBSeed); + + // NEW VARIABLE 1: the IsRandomDraw gate. Set BEFORE any draw (deal is the first draw). + engine.DebugSetRandomDraw(randomDraw); + + int divergences = 0; + HandDump? firstNotFound = null; + + void Ingest(MsgEnvelope env, bool seat, string uri, string rawBody) + { + var r = engine.Receive(env, isPlayerSeat: seat); + if (!r.Diverged) return; + divergences++; + if (firstNotFound is null && (r.RejectReason ?? "").Contains("not found in hand")) + { + var self = HandSnapshot(engine, seat); + var oppo = HandSnapshot(engine, !seat); + int playIdx = ReadPlayIdx(rawBody); + firstNotFound = new HandDump( + seat ? "A" : "B", playIdx, uri, Trim(r.RejectReason), + engine.DebugStableRandomCount, self, oppo, + self.Any(h => h.Item1 == playIdx), oppo.Any(h => h.Item1 == playIdx)); + } + } + + // --- Phase 1: setup frames (CONSTANT: Deal once + each seat's Swap + Ready) ------------------- + var deal = Receive(cl1, nameof(NetworkBattleUri.Deal)); + Ingest(deal.Env, seat: true, nameof(NetworkBattleUri.Deal), deal.RawBody); + foreach (var (frames, seat) in new[] { (cl1, true), (cl2, false) }) + { + var swap = Receive(frames, nameof(NetworkBattleUri.Swap)); + Ingest(swap.Env, seat, nameof(NetworkBattleUri.Swap), swap.RawBody); + var ready = Receive(frames, nameof(NetworkBattleUri.Ready)); + Ingest(ready.Env, seat, nameof(NetworkBattleUri.Ready), ready.RawBody); + } + + // NEW VARIABLE 2: the spin pre-roll, applied at mulligan-end (after Ready, before the first + // turn-start draw) — where OperateReceive.StartOperate applies the Ready's spin in production. + // ONE application of 243 (shared stream, one client's worth of advance). + if (spin) + engine.DebugSpinPreroll(WireSpin); + + // --- Phase 2: replay both clients' interleaved SENDS (the plays) ------------------------------ + var sends = SendsWithRawBody(cl1, cl2) + .Where(x => !SkipUris.Contains(x.Frame.Uri)) + .ToList(); + foreach (var x in sends) + Ingest(x.Frame.Env, x.Seat, x.Frame.Uri, x.Frame.RawBody); + + return new Cell(randomDraw, spin, divergences, firstNotFound); + } + + private static IEnumerable<(CapturedFrame Frame, bool Seat)> SendsWithRawBody( + IReadOnlyList cl1, IReadOnlyList cl2) + { + return cl1.Where(f => f.Direction == "send").Select(f => (f, Seat: true)) + .Concat(cl2.Where(f => f.Direction == "send").Select(f => (f, Seat: false))) + .OrderBy(x => x.f.Ts) + .Select(x => (x.f, x.Seat)); + } + + private static string Trim(string? s) => (s ?? "").Split(" @ ")[0]; + + [Test] + public void IsRandomDraw_plus_spin_preroll_isolation_matrix() + { + try + { + ConfirmSpin(); + + var baseline = Run(randomDraw: false, spin: false); + var rdOnly = Run(randomDraw: true, spin: false); + var rdSpin = Run(randomDraw: true, spin: true); + + TestContext.WriteLine("=== ISOLATION MATRIX (setup-frames + real-seed held CONSTANT) ==="); + TestContext.WriteLine("IsRandomDraw | spin | divergences"); + TestContext.WriteLine($" false | no | {baseline.Divergences}"); + TestContext.WriteLine($" true | no | {rdOnly.Divergences}"); + TestContext.WriteLine($" true | +243 | {rdSpin.Divergences}"); + + DumpFirst("baseline {false,no}", baseline); + DumpFirst("rd-only {true,no}", rdOnly); + DumpFirst("rd+spin {true,+243}", rdSpin); + + Assert.Pass( + $"MATRIX baseline={baseline.Divergences} rdOnly={rdOnly.Divergences} rdSpin={rdSpin.Divergences}"); + } + catch (SuccessException) { throw; } + catch (Exception ex) + { + TestContext.WriteLine("EXPERIMENT THREW: " + ex); + throw; + } + } + + private static void DumpFirst(string label, Cell c) + { + if (c.FirstNotFound is not { } d) + { + TestContext.WriteLine($"[{label}] no 'not found in hand' divergence."); + return; + } + TestContext.WriteLine($"[{label}] FIRST 'not found in hand': seat={d.Seat} uri={d.Uri} " + + $"wire playIdx={d.PlayIdx} stableRandomCount={d.StableRandomCount} reason={d.Reason}"); + TestContext.WriteLine($" playIdx in self hand? {d.PlayIdxInSelfHand} in oppo hand? {d.PlayIdxInOppoHand}"); + TestContext.WriteLine($" SELF (seat {d.Seat}) hand [{d.SelfHand.Count}]: " + + string.Join(" ", d.SelfHand.Select(h => $"(idx={h.Index},cid={h.CardId})"))); + TestContext.WriteLine($" OPPO hand [{d.OppoHand.Count}]: " + + string.Join(" ", d.OppoHand.Select(h => $"(idx={h.Index},cid={h.CardId})"))); + } + + /// STEP 4 (payoff check): with the hypothesised fix applied {IsRandomDraw=true, +spin}, + /// does the engine reach and RESOLVE cl1's spellboost play so PlayedCardSpellboost/PlayedCardCost + /// return real (non-zero) values? cl1's deck carries the spellboost-scaling follower 101314020 at + /// deck idx 10/21/25. We replay the {true,+243} cell and, after each accepted seat-A PlayActions, + /// probe whether any in-play/cemetery card has that id with a resolved cost/spellboost. We report + /// whether the spellboost play was ever reached at all. + [Test] + public void Spellboost_play_resolution_under_random_draw_plus_spin() + { + const int SpellboostCardId = 101314020; + + var cl1 = CaptureReplay.Load("battle_test_fresh_cl1.ndjson"); + var cl2 = CaptureReplay.Load("battle_test_fresh_cl2.ndjson"); + var deckA = CaptureReplay.SelfDeckFrom(cl1); + var deckB = CaptureReplay.SelfDeckFrom(cl2); + + var engine = new SessionBattleEngine(); + engine.Setup(masterSeed: CaptureReplay.SeedFrom(cl1), seatADeck: deckA, seatBDeck: deckB); + engine.DebugSeedIdxChange(SeatASeed, SeatBSeed); + engine.DebugSetRandomDraw(true); + + // setup frames + engine.Receive(Receive(cl1, nameof(NetworkBattleUri.Deal)).Env, isPlayerSeat: true); + foreach (var (frames, seat) in new[] { (cl1, true), (cl2, false) }) + { + engine.Receive(Receive(frames, nameof(NetworkBattleUri.Swap)).Env, isPlayerSeat: seat); + engine.Receive(Receive(frames, nameof(NetworkBattleUri.Ready)).Env, isPlayerSeat: seat); + } + engine.DebugSpinPreroll(WireSpin); + + int acceptedSeatAPlays = 0, divergedBeforeFirstPlay = 0; + bool spellboostResolved = false; + int sbCost = -999, sbCharge = -999; + + var sends = SendsWithRawBody(cl1, cl2).Where(x => !SkipUris.Contains(x.Frame.Uri)).ToList(); + bool sawFirstPlay = false; + foreach (var x in sends) + { + bool isPlay = x.Frame.Uri == nameof(NetworkBattleUri.PlayActions); + var r = engine.Receive(x.Frame.Env, isPlayerSeat: x.Seat); + if (isPlay && !sawFirstPlay) { sawFirstPlay = true; if (r.Diverged) divergedBeforeFirstPlay++; } + if (isPlay && x.Seat && !r.Diverged) + { + acceptedSeatAPlays++; + int playIdx = ReadPlayIdx(x.Frame.RawBody); + long id = engine.PlayedCardId(true, playIdx, 0); + if (id == SpellboostCardId) + { + spellboostResolved = true; + sbCost = engine.PlayedCardCost(true, playIdx, -1); + sbCharge = engine.PlayedCardSpellboost(true, playIdx, -1); + break; + } + } + } + + TestContext.WriteLine($"[spellboost payoff] acceptedSeatAPlays={acceptedSeatAPlays} " + + $"divergedAtFirstPlay={divergedBeforeFirstPlay} spellboostResolved={spellboostResolved} " + + $"cost={sbCost} charge={sbCharge}"); + + // The replay diverges at the FIRST seat-A play (matrix shows playIdx=8 not in hand), so the + // engine never advances to the later spellboost play — the visible spellboost symptom is NOT + // fixed by {IsRandomDraw+spin} because the prerequisite (aligned draws) is not met. + Assert.That(divergedBeforeFirstPlay, Is.EqualTo(1), + "the FIRST seat-A play already diverges under {IsRandomDraw=true,+spin}"); + Assert.That(spellboostResolved, Is.False, + "the spellboost play is never reached because the replay diverges at the first play"); + } + + private static void ConfirmSpin() + { + foreach (var fn in new[] { "battle_test_fresh_cl1.ndjson", "battle_test_fresh_cl2.ndjson" }) + { + var frames = CaptureReplay.Load(fn); + var ready = Receive(frames, nameof(NetworkBattleUri.Ready)); + var obj = JsonNode.Parse(ready.RawBody)!.AsObject(); + int spin = obj.TryGetPropertyValue("spin", out var s) ? (int)s! : 0; + TestContext.WriteLine($"Confirmed {fn} Ready spin={spin}"); + Assert.That(spin, Is.EqualTo(WireSpin), $"{fn} Ready spin must equal {WireSpin}"); + } + } + } +} diff --git a/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayReshuffleRootCauseTests.cs b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayReshuffleRootCauseTests.cs new file mode 100644 index 0000000..f5bde5c --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayReshuffleRootCauseTests.cs @@ -0,0 +1,182 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text.Json.Nodes; +using NUnit.Framework; +using SVSim.BattleNode.Protocol; +using SVSim.BattleNode.Sessions.Engine; + +namespace SVSim.BattleEngine.Tests.SessionEngine +{ + /// + /// PHASE 4 STEP 1 — Tier 2 capture-replay root-cause VERIFICATION (NOT a fix). + /// + /// Replays the FRESH smoke captures (battle 907324319325) — battle_test_fresh_cl1/cl2.ndjson — + /// through a , then measures whether the per-seat idxChangeSeed + /// the real Ready frame carries is what controls the "Target card was not found in hand cards" + /// divergence symptom. + /// + /// FAITHFUL SETUP (the live ShadowIngest only feeds client SENDS, which contain NO Deal/Ready, so a + /// bare send-only replay can't even seat a hand — that conflates "missing Deal" with "missing + /// reshuffle"). To ISOLATE the reshuffle/seed effect we seat each seat's hand from its OWN client's + /// RECEIVE Deal + Swap + Ready (the frames that establish the hand and reach mulligan-end), then replay + /// both clients' interleaved SENDS (the plays). The Ready frame natively carries the real per-seat + /// idxChangeSeed (cl1=1430655717, cl2=661650374), and the engine's recovery receiver calls + /// CreateXorShift from it (NetworkBattleReceiver.cs:1125-1126). The A/B is then: + /// • WITH-SEED: ingest the Ready frame verbatim (idxChangeSeed present) -> XorShift active; + /// • SEED-STRIPPED: ingest the SAME Ready frame with idxChangeSeed forced to -1 -> XorShift inactive + /// (this is exactly the live shadow's effective state, since it never ingests the seed-bearing Ready). + /// The ONLY difference between the two runs is whether the seed reaches CreateXorShift. + /// + /// DECK SETUP MECHANISM (feasibility crux, RESOLVED): each side's deck is reconstructed from the + /// capture's Matched.selfDeck (idx->cardId, the exact shuffled order the node also handed the + /// client) via ; the master seed from Matched.selfInfo.seed. + /// The deck IS in the socket capture — no external fixture needed. + /// + [TestFixture] + [NonParallelizable] + public class CaptureReplayReshuffleRootCauseTests + { + private static readonly HashSet SkipUris = new() + { + nameof(NetworkBattleUri.Echo), + nameof(NetworkBattleUri.ChatStamp), + nameof(NetworkBattleUri.Gungnir), + }; + + private static readonly HashSet MulliganUris = new() + { + nameof(NetworkBattleUri.Deal), + nameof(NetworkBattleUri.Swap), + nameof(NetworkBattleUri.Ready), + }; + + private sealed record ReplayOutcome( + int FrameCount, List Divergences, bool AllDivergencesPostMulligan, bool SelfXorShiftActive); + + // Re-parse a captured frame, overriding the Ready body's idxChangeSeed (and oppoIdxChangeSeed if + // present). Used to STRIP the seed (-1) to model the live shadow's seed-less state. + private static MsgEnvelope OverrideReadySeed(CapturedFrame f, int newSeed) + { + var obj = JsonNode.Parse(f.RawBody)!.AsObject(); + obj["idxChangeSeed"] = newSeed; + if (obj.ContainsKey("oppoIdxChangeSeed")) obj["oppoIdxChangeSeed"] = newSeed; + return MsgEnvelope.FromJson(obj.ToJsonString()); + } + + /// Seat both hands from each client's receive Deal+Swap+Ready, then replay both clients' + /// interleaved SENDS. forces the Ready idxChangeSeed to -1 (the live + /// shadow's effective state). Returns divergences + the post-setup self XorShift state. + private static ReplayOutcome Replay(bool stripSeed) + { + var cl1 = CaptureReplay.Load("battle_test_fresh_cl1.ndjson"); + var cl2 = CaptureReplay.Load("battle_test_fresh_cl2.ndjson"); + + var deckA = CaptureReplay.SelfDeckFrom(cl1); + var deckB = CaptureReplay.SelfDeckFrom(cl2); + Assert.That(deckA, Is.Not.Empty, "cl1 Matched.selfDeck must reconstruct seat A's deck"); + Assert.That(deckB, Is.Not.Empty, "cl2 Matched.selfDeck must reconstruct seat B's deck"); + + var engine = new SessionBattleEngine(); + engine.Setup(masterSeed: CaptureReplay.SeedFrom(cl1), seatADeck: deckA, seatBDeck: deckB); + Assert.That(engine.IsReady, Is.True, "engine must seat from the captured decks + seed"); + + var divergences = new List(); + bool sawMulliganEnd = false; + bool anyDivergencePreMulligan = false; + + void Ingest(MsgEnvelope env, bool seat, string uri) + { + if (MulliganUris.Contains(uri)) sawMulliganEnd = true; + var r = engine.Receive(env, isPlayerSeat: seat); + if (r.Diverged) + { + divergences.Add($"seat={(seat ? "A" : "B")} {uri}: {Trim(r.RejectReason)}"); + if (!sawMulliganEnd) anyDivergencePreMulligan = true; + } + } + + // --- Phase 1: seat both hands from the receive setup frames ---------------------------------- + // A single Deal seats BOTH opening hands (cl1's receive Deal carries self=A + oppo=B), so we + // ingest Deal ONCE (as seat A) — ingesting both clients' Deals would double-deal (NRE / "Sequence + // contains more than one"). Each seat's Swap then applies that seat's mulligan, and each seat's + // Ready carries THAT seat's idxChangeSeed (cl1's for A, cl2's for B; the recovery receiver consumes + // only the SELF seed per ingest, NetworkBattleReceiver.cs:1126), reaching mulligan-end per seat. + CapturedFrame Receive(IReadOnlyList frames, string uri) => + frames.First(f => f.Direction == "receive" && f.Uri == uri); + + // Deal once (seat A's receive Deal seats both hands). + Ingest(Receive(cl1, nameof(NetworkBattleUri.Deal)).Env, seat: true, nameof(NetworkBattleUri.Deal)); + // Each seat's mulligan swap, then each seat's Ready (its own seed). + foreach (var (frames, seat) in new[] { (cl1, true), (cl2, false) }) + { + Ingest(Receive(frames, nameof(NetworkBattleUri.Swap)).Env, seat, nameof(NetworkBattleUri.Swap)); + var ready = Receive(frames, nameof(NetworkBattleUri.Ready)); + var readyEnv = stripSeed ? OverrideReadySeed(ready, -1) : ready.Env; + Ingest(readyEnv, seat, nameof(NetworkBattleUri.Ready)); + } + + bool selfActive = engine.SelfXorShiftActive; + + // --- Phase 2: replay both clients' interleaved SENDS (the plays / turn ops) ------------------- + var sends = CaptureReplay.InterleavedSends(cl1, cl2) + .Where(x => !SkipUris.Contains(x.Env.Uri.ToString())) + .ToList(); + foreach (var (env, seat) in sends) + Ingest(env, seat, env.Uri.ToString()); + + return new ReplayOutcome( + FrameCount: sends.Count, divergences, !anyDivergencePreMulligan, selfActive); + } + + private static string Trim(string? s) => + (s ?? "").Split(" @ ")[0]; + + [Test] + public void Capture_replay_reproduces_post_mulligan_divergence_and_pins_what_the_seed_does_not_fix() + { + var withSeed = Replay(stripSeed: false); + var stripped = Replay(stripSeed: true); + + TestContext.WriteLine($"WITH-SEED (Ready idxChangeSeed present): selfXorShiftActive={withSeed.SelfXorShiftActive} " + + $"playFrames={withSeed.FrameCount} divergences={withSeed.Divergences.Count}"); + foreach (var d in withSeed.Divergences) TestContext.WriteLine(" DIVERGE " + d); + TestContext.WriteLine($"SEED-STRIPPED (idxChangeSeed=-1, the live shadow state): selfXorShiftActive={stripped.SelfXorShiftActive} " + + $"playFrames={stripped.FrameCount} divergences={stripped.Divergences.Count}"); + foreach (var d in stripped.Divergences) TestContext.WriteLine(" DIVERGE " + d); + + Assert.Multiple(() => + { + // (1) The reported symptom reproduces DETERMINISTICALLY from the captures: the replay diverges, + // including the verbatim "Target card was not found in hand cards" exception. + Assert.That(withSeed.Divergences, Is.Not.Empty, + "the capture replay must reproduce the divergence symptom"); + Assert.That(withSeed.Divergences.Any(d => d.Contains("not found in hand")), Is.True, + "the reported 'Target card was not found in hand cards' symptom must reproduce"); + + // (2) All divergences occur AFTER the mulligan barrier — consistent with a post-mulligan cause. + Assert.That(withSeed.AllDivergencesPostMulligan, Is.True, "with-seed divergences are post-mulligan"); + Assert.That(stripped.AllDivergencesPostMulligan, Is.True, "stripped divergences are post-mulligan"); + + // (3) The wire seed DOES drive the engine's XorShift gate (NetworkBattleReceiver.cs:1126): + // present -> active, stripped (the live shadow's state) -> inactive. + Assert.That(withSeed.SelfXorShiftActive, Is.True, + "ingesting the real Ready (idxChangeSeed present) activates the engine's XorShift"); + Assert.That(stripped.SelfXorShiftActive, Is.False, + "stripping idxChangeSeed (the live shadow's state) leaves the XorShift inactive"); + + // (4) THE KEY VERIFICATION FINDING — activating the XorShift via the wire seed does NOT, on its + // own, change the divergence count. The engine's recovery/watch RECEIVE path never performs + // the post-mulligan full-deck reshuffle the live client does: the XorShift's GetChangeInt is + // consumed ONLY by AddToDeckCardIndexChange (BattlePlayerBase.cs:3079) for cards added to the + // deck AFTER mulligan-end, and the per-turn draw is engine-computed off the (un-reshuffled) + // deck order, not driven by the wire's `move idx`. So "feed the seed" alone does NOT fix the + // desync headless — the eventual fix must also make the engine reshuffle the deck post- + // mulligan to match the client (or drive the draw from the wire idx). We PIN this here. + Assert.That(stripped.Divergences.Count, Is.EqualTo(withSeed.Divergences.Count), + "VERIFIED: activating the XorShift via the wire seed alone does NOT change the divergence " + + "count — the engine's receive path does not reshuffle the deck, so the seed is necessary " + + "but NOT sufficient (the fix needs the reshuffle too, not just the seed)"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayRngSeatAttributionProbeTests.cs b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayRngSeatAttributionProbeTests.cs new file mode 100644 index 0000000..22ddb24 --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayRngSeatAttributionProbeTests.cs @@ -0,0 +1,215 @@ +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; +using SVSim.BattleNode.Protocol; +using SVSim.BattleNode.Sessions.Engine; + +namespace SVSim.BattleEngine.Tests.SessionEngine +{ + /// + /// PHASE 4 — OPTION-A VIABILITY PROBE (TEST-ONLY; no production fix; no Engine/*.cs edits). + /// + /// QUESTION: can a per-seat RNG router in the headless engine reliably attribute each StableRandom roll + /// to the correct seat — so two seats can draw from two independent same-seeded sub-streams (mirroring + /// two real clients, each with its OWN _stableRandom)? + /// + /// METHOD: replay battle_test_fresh_cl1/cl2 through a whose mgr RNG is + /// a logging source. On EVERY roll it records (a) the seat signals the mgr can read from its own state + /// (GetBattlePlayer(true/false).IsSelfTurn — the richest seat signal a mgr-level StableRandom override + /// sees; there is NO "current operating seat" field on the mgr), and (b) the live call stack (where the + /// acting seat is actually visible: MulliganCtrl._battlePlayer / BattlePlayerBase.LotteryRandomDrawCard / + /// OperateReceive.StartOperate spin pre-roll). We dump the rolls for the mulligan lotteries, the first + /// turn draws, and the spin pre-roll, and classify each — reporting whether the seat is UNAMBIGUOUS from + /// mgr STATE vs only from the STACK. + /// + [TestFixture] + [NonParallelizable] + public class CaptureReplayRngSeatAttributionProbeTests + { + private const int SeatASeed = 1430655717; // cl1 Ready idxChangeSeed + private const int SeatBSeed = 661650374; // cl2 Ready idxChangeSeed + private const int WireSpin = 243; + + private static readonly HashSet SkipUris = new() + { + nameof(NetworkBattleUri.Echo), + nameof(NetworkBattleUri.ChatStamp), + nameof(NetworkBattleUri.Gungnir), + }; + + private static CapturedFrame Receive(IReadOnlyList frames, string uri) => + frames.First(f => f.Direction == "receive" && f.Uri == uri); + + private static IEnumerable<(CapturedFrame Frame, bool Seat)> SendsInTsOrder( + IReadOnlyList cl1, IReadOnlyList cl2) => + cl1.Where(f => f.Direction == "send").Select(f => (f, Seat: true)) + .Concat(cl2.Where(f => f.Direction == "send").Select(f => (f, Seat: false))) + .OrderBy(x => x.f.Ts) + .Select(x => (x.f, x.Seat)); + + [Test] + public void Roll_log_reveals_whether_acting_seat_is_attributable_from_state_or_only_stack() + { + var cl1 = CaptureReplay.Load("battle_test_fresh_cl1.ndjson"); + var cl2 = CaptureReplay.Load("battle_test_fresh_cl2.ndjson"); + + var deckA = CaptureReplay.SelfDeckFrom(cl1); + var deckB = CaptureReplay.SelfDeckFrom(cl2); + + // (5) seeds + int seedA = CaptureReplay.SeedFrom(cl1); + int seedB = CaptureReplay.SeedFrom(cl2); + TestContext.WriteLine($"=== SEEDS (Matched.selfInfo.seed) ==="); + TestContext.WriteLine($" cl1 seed = {seedA}"); + TestContext.WriteLine($" cl2 seed = {seedB}"); + TestContext.WriteLine($" SAME? {seedA == seedB} (Ready idxChangeSeed cl1={SeatASeed} cl2={SeatBSeed} — DIFFERENT)"); + TestContext.WriteLine(""); + + var engine = new SessionBattleEngine(); + var log = engine.DebugSetupWithRollLog(masterSeed: seedA, seatADeck: deckA, seatBDeck: deckB); + Assert.That(engine.IsReady, Is.True); + + engine.DebugSeedIdxChange(SeatASeed, SeatBSeed); + engine.DebugSetRandomDraw(true); // the gate that makes draws actually ROLL + + // mark roll-log boundaries so we can bucket the rolls by phase + int Mark() => log.Count; + + int beforeDeal = Mark(); + engine.Receive(Receive(cl1, nameof(NetworkBattleUri.Deal)).Env, isPlayerSeat: true); + int afterDeal = Mark(); + + // seat A mulligan (Swap+Ready) then seat B mulligan + engine.Receive(Receive(cl1, nameof(NetworkBattleUri.Swap)).Env, isPlayerSeat: true); + int afterSwapA = Mark(); + engine.Receive(Receive(cl1, nameof(NetworkBattleUri.Ready)).Env, isPlayerSeat: true); + int afterReadyA = Mark(); + engine.Receive(Receive(cl2, nameof(NetworkBattleUri.Swap)).Env, isPlayerSeat: false); + int afterSwapB = Mark(); + engine.Receive(Receive(cl2, nameof(NetworkBattleUri.Ready)).Env, isPlayerSeat: false); + int afterReadyB = Mark(); + + // spin pre-roll (one client's 243 advance, applied once on the shared stream) + engine.DebugSpinPreroll(WireSpin); + int afterSpin = Mark(); + + // replay both clients' interleaved sends (the plays + turn ops -> turn-start draws fire here) + var sends = SendsInTsOrder(cl1, cl2).Where(x => !SkipUris.Contains(x.Frame.Uri)).ToList(); + foreach (var x in sends) + engine.Receive(x.Frame.Env, isPlayerSeat: x.Seat); + int afterSends = Mark(); + + TestContext.WriteLine("=== ROLL-COUNT BY PHASE (IsRandomDraw=true) ==="); + TestContext.WriteLine($" Deal : {afterDeal - beforeDeal}"); + TestContext.WriteLine($" Swap A : {afterSwapA - afterDeal}"); + TestContext.WriteLine($" Ready A (mulligan): {afterReadyA - afterSwapA}"); + TestContext.WriteLine($" Swap B : {afterSwapB - afterReadyA}"); + TestContext.WriteLine($" Ready B (mulligan): {afterReadyB - afterSwapB}"); + TestContext.WriteLine($" spin pre-roll : {afterSpin - afterReadyB} (expected {WireSpin})"); + TestContext.WriteLine($" all sends/plays : {afterSends - afterSpin}"); + TestContext.WriteLine($" TOTAL : {log.Count}"); + TestContext.WriteLine(""); + + DumpRange("DEAL", log, beforeDeal, afterDeal); + DumpRange("SWAP A (mulligan lottery, seat A)", log, afterDeal, afterSwapA); + DumpRange("READY A (mulligan, seat A)", log, afterSwapA, afterReadyA); + DumpRange("SWAP B (mulligan lottery, seat B)", log, afterReadyA, afterSwapB); + DumpRange("READY B (mulligan, seat B)", log, afterSwapB, afterReadyB); + DumpSpinSummary("SPIN PRE-ROLL", log, afterReadyB, afterSpin); + // first ~12 of the play phase covers the early turn-start draws for both seats + DumpRange("FIRST PLAY-PHASE ROLLS (turn draws + effects)", log, afterSpin, + System.Math.Min(afterSpin + 12, afterSends)); + + // === STATE-vs-STACK attribution analysis === + AnalyzeAttribution(log, afterSpin); + + Assert.Pass($"probe complete: {log.Count} rolls logged; see TestContext output for attribution analysis"); + } + + private static void DumpRange(string label, IReadOnlyList log, int from, int to) + { + TestContext.WriteLine($"--- {label} [rolls {from}..{to - 1}] ({to - from} rolls) ---"); + for (int i = from; i < to; i++) + { + var e = log[i]; + TestContext.WriteLine($" #{e.Index} {e.Api}(arg={e.Arg}) | mgrState: self.IsSelfTurn={e.SelfIsSelfTurn} oppo.IsSelfTurn={e.OppoIsSelfTurn} | classify={Classify(e)}"); + TestContext.WriteLine($" stack: {e.Stack}"); + } + if (to - from == 0) TestContext.WriteLine(" (none)"); + TestContext.WriteLine(""); + } + + private static void DumpSpinSummary(string label, IReadOnlyList log, int from, int to) + { + TestContext.WriteLine($"--- {label} [rolls {from}..{to - 1}] ({to - from} rolls) ---"); + if (to - from > 0) + { + var first = log[from]; + TestContext.WriteLine($" first spin roll #{first.Index}: self.IsSelfTurn={first.SelfIsSelfTurn} oppo.IsSelfTurn={first.OppoIsSelfTurn}"); + TestContext.WriteLine($" stack: {first.Stack}"); + bool allStateIdentical = log.Skip(from).Take(to - from) + .All(e => e.SelfIsSelfTurn == first.SelfIsSelfTurn && e.OppoIsSelfTurn == first.OppoIsSelfTurn); + bool allViaStartOperate = log.Skip(from).Take(to - from).All(e => e.Stack.Contains("StartOperate")); + TestContext.WriteLine($" all {to - from} spin rolls have identical mgr seat-state? {allStateIdentical}"); + TestContext.WriteLine($" all {to - from} spin rolls routed via OperateReceive.StartOperate? {allViaStartOperate}"); + } + TestContext.WriteLine(""); + } + + // Best-effort classification from the STACK (the ground truth of who is rolling). + private static string Classify(SessionBattleEngine.RollEntry e) + { + string s = e.Stack; + if (s.Contains("StartOperate")) return "SPIN-PREROLL"; + if (s.Contains("_LotMulliganCardIndex") || s.Contains("MulliganCtrl")) return "MULLIGAN-LOTTERY"; + if (s.Contains("LotteryRandomDrawCard") || s.Contains("RandomCardDraw")) return "TURN/EFFECT-DRAW"; + if (s.Contains("SkillRandomSelectFilter")) return "SKILL-FILTER-DRAW"; + return "OTHER-EFFECT"; + } + + private static void AnalyzeAttribution(IReadOnlyList log, int playPhaseStart) + { + TestContext.WriteLine("=== STATE-vs-STACK ATTRIBUTION ANALYSIS ==="); + + // 1) Does mgr-state (IsSelfTurn flags) ever change across the whole replay? If both flags are + // pinned at setup values (self=true/oppo=false) the entire time, mgr-state CANNOT distinguish + // seats — every roll looks identical from mgr state. + var distinctStates = log + .Select(e => (e.SelfIsSelfTurn, e.OppoIsSelfTurn)) + .Distinct() + .ToList(); + TestContext.WriteLine($" distinct mgr seat-states observed across ALL {log.Count} rolls: {distinctStates.Count}"); + foreach (var st in distinctStates) + TestContext.WriteLine($" (self.IsSelfTurn={st.Item1}, oppo.IsSelfTurn={st.Item2})"); + + // 2) For the mulligan lotteries: seat A's 6 rolls then seat B's 6 rolls happen back-to-back. Are + // their mgr-states distinguishable? (They should NOT be — IsSelfTurn isn't toggled during + // mulligan; both lotteries run with the same setup-time flags.) + var mulliganRolls = log.Where(e => Classify(e) == "MULLIGAN-LOTTERY").ToList(); + var mulliganStates = mulliganRolls.Select(e => (e.SelfIsSelfTurn, e.OppoIsSelfTurn)).Distinct().Count(); + TestContext.WriteLine($" mulligan-lottery rolls: {mulliganRolls.Count}; distinct mgr seat-states among them: {mulliganStates}"); + TestContext.WriteLine($" -> seat attributable from mgr STATE alone? {(mulliganStates >= 2 ? "MAYBE" : "NO (state identical for both seats' lotteries)")}"); + bool mulliganSeatInStack = mulliganRolls.All(e => e.Stack.Contains("Mulligan") || e.Stack.Contains("_LotMulligan")); + TestContext.WriteLine($" -> mulligan rolls carry a MulliganCtrl frame on the stack? {mulliganSeatInStack}"); + + // 3) For the play-phase draws: are turn-start draws present at all, and do their mgr-states track + // the acting seat (i.e. does IsSelfTurn flip to identify whose turn/draw it is)? + var drawRolls = log.Skip(playPhaseStart) + .Where(e => Classify(e) is "TURN/EFFECT-DRAW" or "SKILL-FILTER-DRAW") + .ToList(); + TestContext.WriteLine($" play-phase draw/filter rolls: {drawRolls.Count}"); + if (drawRolls.Count > 0) + { + var drawStates = drawRolls.Select(e => (e.SelfIsSelfTurn, e.OppoIsSelfTurn)).Distinct().Count(); + TestContext.WriteLine($" distinct mgr seat-states among draw rolls: {drawStates}"); + } + + TestContext.WriteLine(""); + TestContext.WriteLine(" INTERPRETATION:"); + TestContext.WriteLine(" * If distinct mgr seat-states == 1 for a phase, the StableRandom override CANNOT"); + TestContext.WriteLine(" attribute that phase's rolls to a seat from mgr state — only the call STACK"); + TestContext.WriteLine(" (MulliganCtrl._battlePlayer / BattlePlayerBase 'this' / OperateReceive._isPlayer)"); + TestContext.WriteLine(" names the acting seat."); + } + } +} diff --git a/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayTests.cs b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayTests.cs new file mode 100644 index 0000000..b1b0a01 --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/CaptureReplayTests.cs @@ -0,0 +1,27 @@ +using System.Linq; +using NUnit.Framework; + +namespace SVSim.BattleEngine.Tests.SessionEngine +{ + [TestFixture] + public class CaptureReplayTests + { + [Test] + public void Load_parses_frames_and_extracts_self_deck() + { + var frames = CaptureReplay.Load("battle_test_cl1.ndjson"); + Assert.That(frames, Is.Not.Empty); + + var deck = CaptureReplay.SelfDeckFrom(frames); + Assert.That(deck, Is.Not.Empty, "Matched.selfDeck should parse"); + Assert.That(deck.Count, Is.EqualTo(40), "a standard deck is 40 cards"); + + // Send PlayActions carry their URI at the top level (body.uri == None); the helper must + // resolve it correctly, not drop it to None. + Assert.That(frames.Any(f => f.Direction == "send" && f.Uri == "PlayActions"), + Is.True, "send PlayActions URI resolved from top level"); + + Assert.That(CaptureReplay.SeedFrom(frames), Is.GreaterThan(0), "Matched.selfInfo.seed parsed"); + } + } +} diff --git a/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineConstructionTests.cs b/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineConstructionTests.cs new file mode 100644 index 0000000..f851b3a --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineConstructionTests.cs @@ -0,0 +1,71 @@ +using System.Linq; +using NUnit.Framework; +using SVSim.BattleNode.Sessions.Engine; + +namespace SVSim.BattleEngine.Tests.SessionEngine +{ + [TestFixture] + public class SessionEngineConstructionTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + [Test] + public void SessionBattleEngine_instantiates_and_is_not_ready_before_setup() + { + var engine = new SessionBattleEngine(); + Assert.That(engine.IsReady, Is.False); + } + + [Test] + public void Setup_builds_two_seat_network_battle_headless() + { + // Load every card id the two test decks reference so CardMaster can resolve them. + var deckA = Enumerable.Repeat(100011010L, 40).ToList(); // vanilla 1/2 follower x40 + var deckB = Enumerable.Repeat(100011010L, 40).ToList(); + HeadlessCardMaster.Load(100011010); + + var engine = new SessionBattleEngine(); + Assert.DoesNotThrow(() => engine.Setup(masterSeed: 12345, seatADeck: deckA, seatBDeck: deckB)); + Assert.That(engine.IsReady, Is.True); + } + + [Test] + public void Receive_one_playactions_resolves_headless() + { + // SUPERSEDED by the node-native oracle (SVSim.UnitTests HeadlessConductorTests). This test + // predates the M-HC-0b view-untangle: before it, the receive conductor resolved NOTHING + // headless (every InstantVfx the conductor fused the mutation into was no-op'd by the shared + // VfxMgr, and OperateReceive.OnReceiveDeal was never wired), so a play "ingested" without + // touching state and trivially did not reject. Now the conductor RESOLVES (HeadlessConductor + // VfxMgr runs the InstantVfx; the deal seats the hand). This test feeds the first captured + // `send PlayActions` WITHOUT first replaying the capture's Deal/mulligan, so the played card + // is not in the seated hand and the now-live resolution correctly rejects + // (RemoveSpellCardFromHand: not found). Replaying the capture's Deal first does NOT fix it: + // the seated deck order can't reproduce the capture's post-mulligan idx references (the + // documented capture-replay draw-misalignment artifact — see memory + // project_battle_headless_conductor: "validate via node-native battles"). The valid headless + // play oracle is now HeadlessConductorTests.Vanilla_play_resolves_on_engine_state_headless. + Assert.Ignore("Superseded by node-native HeadlessConductorTests (M-HC-0b). Capture-replay " + + "draw-misalignment makes a captured play unresolvable against a node-seated deck; the " + + "node-native harness is the post-M-HC-0b oracle. Revive if capture-replay alignment lands."); + + var cl1 = CaptureReplay.Load("battle_test_cl1.ndjson"); + var deck = CaptureReplay.SelfDeckFrom(cl1); + // Load ALL deck ids in ONE call: HeadlessCardMaster.Load replaces the static CardMaster each + // call, so a per-id loop would leave only the last card resolvable. + HeadlessCardMaster.Load(deck.Select(x => (int)x).Distinct().ToArray()); + + var engine = new SessionBattleEngine(); + engine.Setup(CaptureReplay.SeedFrom(cl1), seatADeck: deck, seatBDeck: deck); + + var firstPlay = cl1.First(f => f.Direction == "send" && f.Uri == "PlayActions"); + var result = engine.Receive(firstPlay.Env, isPlayerSeat: true); + + Assert.That(result.RejectReason, Is.Null, $"ingest threw/rejected: {result.RejectReason}"); + Assert.That(result.Accepted, Is.True); + } + } +} diff --git a/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineShadowReplayTests.cs b/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineShadowReplayTests.cs new file mode 100644 index 0000000..e1210db --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineShadowReplayTests.cs @@ -0,0 +1,100 @@ +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; +using SVSim.BattleNode.Protocol; +using SVSim.BattleNode.Sessions.Engine; + +namespace SVSim.BattleEngine.Tests.SessionEngine +{ + [TestFixture] + public class SessionEngineShadowReplayTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + // Frames that are transport/keepalive, not game actions — not ingested. + private static readonly HashSet SkipUris = new() + { + nameof(NetworkBattleUri.Echo), + nameof(NetworkBattleUri.ChatStamp), + nameof(NetworkBattleUri.Gungnir), + }; + + [Test] + public void Shadow_replay_of_captured_battle_tracks_state_without_desync() + { + // SUPERSEDED by the node-native oracle (SVSim.UnitTests HeadlessConductorTests). This test's + // "0 rejects" used to pass VACUOUSLY: before the M-HC-0b view-untangle the receive conductor + // resolved NOTHING headless (InstantVfx mutations no-op'd; OnReceiveDeal unwired), so no + // captured frame could diverge because none was applied. The retracted "shadow tracks the + // capture" claim is documented in memory project_battle_node_engine_shadow / _headless_conductor. + // Now that the conductor RESOLVES, replaying a captured stream against a node-seated deck hits + // the documented capture-replay draw-misalignment: the seated deck order can't reproduce the + // capture's post-mulligan idx references, so played cards aren't in the seated hand + // (HandCardToField/RemoveSpellCardFromHand: not found). The decision (memory + // project_battle_headless_conductor) is to validate headless resolution via NODE-NATIVE + // battles, not capture replay. The node-native oracle now covers Deal+Play. + Assert.Ignore("Superseded by node-native HeadlessConductorTests (M-HC-0b). Capture-replay " + + "against a node-seated deck hits the documented draw-misalignment artifact once the " + + "receive path actually resolves. Revive if a capture-replay alignment path lands."); + + var cl1 = CaptureReplay.Load("battle_test_cl1.ndjson"); + var cl2 = CaptureReplay.Load("battle_test_cl2.ndjson"); + var deckA = CaptureReplay.SelfDeckFrom(cl1); + var deckB = CaptureReplay.SelfDeckFrom(cl2); + // One Load call with every id — Load replaces the static master each call. + HeadlessCardMaster.Load(deckA.Concat(deckB).Select(x => (int)x).Distinct().ToArray()); + + var engine = new SessionBattleEngine(); + engine.Setup(masterSeed: CaptureReplay.SeedFrom(cl1), seatADeck: deckA, seatBDeck: deckB); + + // Single-client full-stream replay (cl1 as the player seat): cl1's SENT frames are its own + // actions (seat=true); its RECEIVED frames are the opponent/server actions (seat=false), + // incl. the Deal that establishes both hands. This is exactly the stream cl1's receiver + // processed, in capture (ts) order. (The node-side both-clients-sends model is exercised + // live in Task 7; here we validate engine tracking against ground truth.) + var stream = cl1.Where(f => !SkipUris.Contains(f.Uri)) + .OrderBy(f => f.Ts) + .ToList(); + + var rejects = new List(); + var violations = new List(); + + foreach (var f in stream) + { + bool seat = f.Direction == "send"; + var r = engine.Receive(f.Env, isPlayerSeat: seat); + if (r.RejectReason is not null) + rejects.Add($"{f.Direction} {f.Uri}: {r.RejectReason}"); + + if (f.Uri == nameof(NetworkBattleUri.TurnEnd)) + CheckInvariants(engine, violations, atUri: f.Uri); + } + + foreach (var line in rejects) TestContext.WriteLine("REJECT " + line); + foreach (var line in violations) TestContext.WriteLine("VIOLATION " + line); + TestContext.WriteLine($"frames={stream.Count} rejects={rejects.Count} violations={violations.Count}"); + + Assert.Multiple(() => + { + Assert.That(rejects, Is.Empty, "engine diverged / rejected a captured frame"); + Assert.That(violations, Is.Empty, "engine state left a structural invariant"); + }); + } + + private static void CheckInvariants(SessionBattleEngine engine, List violations, string atUri) + { + foreach (var seat in new[] { true, false }) + { + int life = engine.LeaderLife(seat), pp = engine.Pp(seat); + int board = engine.BoardCount(seat), hand = engine.HandCount(seat); + if (life is < 0 or > 20) violations.Add($"{atUri} seat={seat} life={life}"); + if (pp is < 0 or > 10) violations.Add($"{atUri} seat={seat} pp={pp}"); + if (board is < 0 or > 7) violations.Add($"{atUri} seat={seat} board={board}"); + if (hand is < 0 or > 9) violations.Add($"{atUri} seat={seat} hand={hand}"); + } + } + } +} diff --git a/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineSpellboostTests.cs b/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineSpellboostTests.cs new file mode 100644 index 0000000..01daf4e --- /dev/null +++ b/SVSim.BattleEngine.Tests/SessionEngine/SessionEngineSpellboostTests.cs @@ -0,0 +1,33 @@ +using NUnit.Framework; +using SVSim.BattleNode.Sessions.Engine; +using System.Linq; +using SVSim.BattleEngine.Tests; + +namespace SVSim.BattleEngine.Tests.SessionEngine; + +[TestFixture] +public class SessionEngineSpellboostTests +{ + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + [Test] + public void EngineGlobalInit_makes_a_fresh_engine_ready() + { + EngineGlobalInit.EnsureInitialized(); + var cl1 = CaptureReplay.Load("battle_test_cl1.ndjson"); + var cl2 = CaptureReplay.Load("battle_test_cl2.ndjson"); + var deckA = CaptureReplay.SelfDeckFrom(cl1); + var deckB = CaptureReplay.SelfDeckFrom(cl2); + // Belt-and-suspenders (matches the sibling tests): load the decks into the harness master so + // this test never depends on global card-master contents. EnsureInitialized() above still + // proves EngineGlobalInit's own path works. + foreach (var id in deckA.Concat(deckB).Distinct()) HeadlessCardMaster.Load((int)id); + var engine = new SessionBattleEngine(); + Assert.DoesNotThrow(() => engine.Setup(masterSeed: 12345, seatADeck: deckA, seatBDeck: deckB)); + Assert.That(engine.IsReady, Is.True, "engine must be ready after EngineGlobalInit (carried-risk fix)"); + } + +} diff --git a/SVSim.BattleEngine.Tests/SummonTokenOracleTests.cs b/SVSim.BattleEngine.Tests/SummonTokenOracleTests.cs new file mode 100644 index 0000000..3586b70 --- /dev/null +++ b/SVSim.BattleEngine.Tests/SummonTokenOracleTests.cs @@ -0,0 +1,111 @@ +using System.Linq; +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M5 (next-hardest deterministic card): a when_play SUMMON_TOKEN spell resolves to correct + // authoritative state HEADLESS via the same IsForecast/IsRecovery + ActionProcessor path the + // M2 vanilla follower / M3 fixed-damage spell / M4 self-buff follower proved (design §5 / DP4 + + // M3+ resume recipe). The new oracle dimension over M2-M4 is a BOARD-COUNT DELTA from a + // SKILL-CREATED card: the spell's `summon_token=100011020` must place exactly one NEW follower + // token (id 100011020, a neutral 2/2) onto the caster's board — a card that was never in the + // hand or deck. This is the first headless run of the PUBLIC prefab card-creation path + // (CardCreatorBase.CreateCard, createNullView:false), so it stresses the view shim in a way the + // earlier null-view-seam milestones did not. + [TestFixture] + public class SummonTokenOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Summon_token_spell_places_a_new_token_on_the_board() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (see M2-M4 oracles): opponent refs + active turn flag. + // The summon resolves onto the active player's own board (`summon_side` defaults to self). + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life: this spell deals no damage, but the play-legality gate still rejects a + // play when a leader reads as a 0-life game-over state (M3 learning). + HeadlessEngineEnv.InitLeaderLife(mgr); + + // Seed the card-template prefabs the engine's internal (createNullView:false) summon + // creation path clones — the bare construction path leaves SBattleLoad null. + HeadlessEngineEnv.InitCardTemplates(mgr); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.TokenSpellId); + + // Place the summon-token spell in the active player's hand with PP to spare; empty board. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.TokenSpellId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. ClassAndInPlayCardList holds the leader (index 0) on an empty board. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int playerInplayBefore = player.ClassAndInPlayCardList.Count; + int enemyHandBefore = enemy.HandCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + int enemyLeaderLifeBefore = enemy.ClassAndInPlayCardList[0].Life; + + // Resolve the play through the real engine. + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: null), + "ActionProcessor.PlayCard threw on a summon-token spell"); + + // Oracle: the board-count delta + summoned token identity is the new M5 dimension; the rest + // are the §5 spell-shaped invariants proven by M3. + Assert.Multiple(() => + { + // Primary M5 assertion: exactly one NEW card is on the player's board (the summoned + // token), and it is the token id with its CardCSVData base stats — proving the skill + // CREATED a card, not just moved the played one. + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(playerInplayBefore + 1), + "player board count not +1 (the summoned token did not land)"); + var token = player.ClassAndInPlayCardList + .SingleOrDefault(c => c.CardId == HeadlessEngineEnv.SummonedTokenId); + Assert.That(token, Is.Not.Null, "summoned token (id 100011020) not found on the board"); + Assert.That(token.Atk, Is.EqualTo(HeadlessEngineEnv.SummonedTokenAtk), "token atk != base"); + Assert.That(token.Life, Is.EqualTo(HeadlessEngineEnv.SummonedTokenLife), "token life != base"); + // The summoned token is NOT the played card. + Assert.That(token, Is.Not.SameAs(card), "summoned token is the played spell itself"); + // Cost paid. + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + // The spell leaves hand and (being a spell) does NOT itself occupy the board. + Assert.That(player.HandCardList, Does.Not.Contain(card), "spell still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore - 1), "hand count not -1"); + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(card), "spell wrongly placed on the board"); + // Opponent unchanged (the summon targets the caster's own board). + Assert.That(enemy.HandCardList.Count, Is.EqualTo(enemyHandBefore), "opponent hand changed"); + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore), "opponent board changed"); + Assert.That(enemy.ClassAndInPlayCardList[0].Life, Is.EqualTo(enemyLeaderLifeBefore), "opponent leader life changed"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/TargetedDamageSpellOracleTests.cs b/SVSim.BattleEngine.Tests/TargetedDamageSpellOracleTests.cs new file mode 100644 index 0000000..86550ff --- /dev/null +++ b/SVSim.BattleEngine.Tests/TargetedDamageSpellOracleTests.cs @@ -0,0 +1,109 @@ +using System.Collections.Generic; +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M6 (the first TARGET-SELECTION card): a when_play TARGETED-DAMAGE spell resolves to correct + // authoritative state HEADLESS via the same IsForecast/IsRecovery + ActionProcessor path the + // M2-M5 cards proved — but for the FIRST time exercising the `selectedCards` path of + // ActionProcessor.PlayCard (Engine/Wizard.Battle/ActionProcessor.cs:401, dormant until now; + // M2-M5 all passed selectedCards: null). The new oracle dimension is SELECTION ROUTING: with + // TWO followers on the enemy board and ONE passed as `selectedCards`, the spell's `damage=5` + // must hit the SELECTED follower and leave the un-selected one untouched. A plain "a follower + // took damage" assertion would false-pass; reading the differential (selected -5, un-selected 0) + // is what proves the selectedCards path routes the effect to the chosen target. Load-bearing is + // confirmed by swapping which follower is selected and watching the damage follow the selection. + [TestFixture] + public class TargetedDamageSpellOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Targeted_damage_spell_hits_only_the_selected_enemy_follower() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (see M2-M5 oracles): opponent refs + active turn flag. The + // spell's target resolver walks player -> opponent -> opponent's in-play followers. + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life so neither leader reads as a 0-life game-over state (blocks plays, M3). + HeadlessEngineEnv.InitLeaderLife(mgr); + + // Put TWO vanilla followers on the ENEMY board (the new M6 setup). Both survive the 5 + // damage, so the oracle reads a differential life-delta rather than depending on death. + var selected = HeadlessEngineEnv.PutFollowerInPlay(mgr, HeadlessEngineEnv.SelectTargetFollowerId, 0, isPlayer: false); + var unselected = HeadlessEngineEnv.PutFollowerInPlay(mgr, HeadlessEngineEnv.UnselectTargetFollowerId, 1, isPlayer: false); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.TargetSpellId); + + // Place the targeted-damage spell in the active player's hand with PP to spare. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.TargetSpellId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int playerInplayBefore = player.ClassAndInPlayCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + int selectedLifeBefore = selected.Life; + int unselectedLifeBefore = unselected.Life; + int enemyLeaderLifeBefore = enemy.ClassAndInPlayCardList[0].Life; + + // Resolve the play through the real engine, passing the chosen target via selectedCards + // (the M6 first — every prior milestone passed null). + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: new List { selected }), + "ActionProcessor.PlayCard threw on a targeted-damage spell"); + + // Oracle: selection routing is the new M6 dimension; the rest are the §5 spell-shaped invariants. + Assert.Multiple(() => + { + // PRIMARY M6 assertions: the SELECTED follower takes exactly the spell's damage... + Assert.That(selected.Life, Is.EqualTo(selectedLifeBefore - HeadlessEngineEnv.TargetSpellDamage), + "selected follower did not take the spell's damage"); + // ...and the UN-SELECTED follower is untouched (proves routing, not a blanket hit). + Assert.That(unselected.Life, Is.EqualTo(unselectedLifeBefore), + "un-selected follower was damaged (effect not routed to the selection)"); + // Both followers survive => still on the enemy board; leader unchanged. + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore), + "enemy board count changed (a target unexpectedly left the board)"); + Assert.That(enemy.ClassAndInPlayCardList[0].Life, Is.EqualTo(enemyLeaderLifeBefore), + "opponent leader life changed (damage hit the leader, not the selected follower)"); + // Cost paid. + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + // Spell leaves hand and (being a spell) does NOT occupy the board. + Assert.That(player.HandCardList, Does.Not.Contain(card), "spell still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore - 1), "hand count not -1"); + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(card), "spell wrongly placed on the board"); + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(playerInplayBefore), "player board count changed"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/TargetedDestroySpellOracleTests.cs b/SVSim.BattleEngine.Tests/TargetedDestroySpellOracleTests.cs new file mode 100644 index 0000000..2698b92 --- /dev/null +++ b/SVSim.BattleEngine.Tests/TargetedDestroySpellOracleTests.cs @@ -0,0 +1,115 @@ +using System.Collections.Generic; +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M7 (the first card to prove follower DEATH / board-removal): a when_play TARGETED-DESTROY spell + // resolves to correct authoritative state HEADLESS via the same IsForecast/IsRecovery + + // ActionProcessor + selectedCards path M6 proved — but for the FIRST time exercising a mechanic + // that REMOVES a card from the board. M2-M6 only ever ADDED to / mutated stats of cards already in + // play; none proved the engine commits board REMOVAL inside the authoritative part of PlayCard + // (rather than the cosmetic post-Process tail the prior docs flag). The new oracle dimension is + // BOARD REMOVAL: with TWO followers on the enemy board and ONE passed as `selectedCards`, the + // `destroy` must remove exactly the SELECTED follower (enemy board count -1, selected gone, landed + // in the enemy CemeteryList) while leaving the un-selected follower on the board. The un-selected- + // survives assertion is load-bearing the same way M4's delta-vs-base and M6's differential were: + // it distinguishes "the destroy was routed to the selection" from "a blanket board wipe" — and is + // confirmed by the routing already proven in M6 (the effect follows the selectedCards entry). + [TestFixture] + public class TargetedDestroySpellOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var t = obj.GetType(); + var f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Targeted_destroy_spell_removes_only_the_selected_enemy_follower() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Minimal opponent/turn wiring (see M2-M6 oracles): opponent refs + active turn flag. The + // destroy's target resolver walks player -> opponent -> opponent's in-play followers. + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + // Seed leader life so neither leader reads as a 0-life game-over state (blocks plays, M3). + HeadlessEngineEnv.InitLeaderLife(mgr); + + // Put TWO vanilla followers on the ENEMY board (the M6 setup). destroy is unconditional, so + // their stats are irrelevant — distinct ids only so the selected vs un-selected can't be + // confused. The selected one is destroyed; the un-selected one must survive. + var selected = HeadlessEngineEnv.PutFollowerInPlay(mgr, HeadlessEngineEnv.DestroyTargetFollowerId, 0, isPlayer: false); + var unselected = HeadlessEngineEnv.PutFollowerInPlay(mgr, HeadlessEngineEnv.DestroyOtherFollowerId, 1, isPlayer: false); + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.DestroySpellId); + + // Place the targeted-destroy spell in the active player's hand with PP to spare. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.DestroySpellId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int playerInplayBefore = player.ClassAndInPlayCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + int enemyCemeteryBefore = enemy.CemeteryList.Count; + int enemyLeaderLifeBefore = enemy.ClassAndInPlayCardList[0].Life; + + // Resolve the play through the real engine, passing the chosen target via selectedCards. + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: new List { selected }), + "ActionProcessor.PlayCard threw on a targeted-destroy spell"); + + // Oracle: board removal is the new M7 dimension; the rest are the §5 spell-shaped invariants. + Assert.Multiple(() => + { + // PRIMARY M7 assertions: the SELECTED follower is removed from the enemy board... + Assert.That(enemy.ClassAndInPlayCardList, Does.Not.Contain(selected), + "selected follower still on the enemy board (destroy did not remove it)"); + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore - 1), + "enemy board count not -1 (a destroy did not commit, or hit the wrong number of cards)"); + // ...and it landed in the enemy's CemeteryList (the engine's destroy/death path). + Assert.That(enemy.CemeteryList, Contains.Item(selected), + "destroyed follower not in the enemy CemeteryList"); + Assert.That(enemy.CemeteryList.Count, Is.EqualTo(enemyCemeteryBefore + 1), + "enemy cemetery count not +1"); + // ...while the UN-SELECTED follower stays on the board (proves routing, not a board wipe). + Assert.That(enemy.ClassAndInPlayCardList, Contains.Item(unselected), + "un-selected follower was destroyed (effect not routed to the selection)"); + // Leader untouched (destroy targets a follower, not the face). + Assert.That(enemy.ClassAndInPlayCardList[0].Life, Is.EqualTo(enemyLeaderLifeBefore), + "opponent leader life changed (destroy hit the leader, not the selected follower)"); + // Cost paid. + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + // Spell leaves hand and (being a spell) does NOT occupy the board. + Assert.That(player.HandCardList, Does.Not.Contain(card), "spell still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore - 1), "hand count not -1"); + Assert.That(player.ClassAndInPlayCardList, Does.Not.Contain(card), "spell wrongly placed on the board"); + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(playerInplayBefore), "player board count changed"); + }); + } + } +} diff --git a/SVSim.BattleEngine.Tests/TestBattleScope.cs b/SVSim.BattleEngine.Tests/TestBattleScope.cs new file mode 100644 index 0000000..a229039 --- /dev/null +++ b/SVSim.BattleEngine.Tests/TestBattleScope.cs @@ -0,0 +1,50 @@ +#nullable enable +using System; +using System.Runtime.Serialization; +using SVSim.BattleEngine.Ambient; + +namespace SVSim.BattleEngine.Tests; + +/// Per-test ambient scope. Each test that touches engine statics wraps its body +/// in `using var scope = new TestBattleScope();` (or with an explicit Mgr/ViewerId). +/// +/// The constructor enters a fresh (carrying a brand-new +/// so per-test mgr/DataMgr writes never bleed across tests), then +/// runs the per-ambient seeders that +/// no longer does (chara ids on DataMgr, NetworkUserInfoData). Process-globals +/// (card master, LoadDetail, Crossover, Certification.udid) come from +/// which runs once per process. +/// +/// Public surface (vs. internal) so SVSim.UnitTests can reuse it via the same project +/// reference in Task 7. +public sealed class TestBattleScope : IDisposable +{ + private readonly BattleAmbient.Scope _scope; + public BattleAmbientContext Ctx { get; } + + public TestBattleScope(BattleManagerBase? mgr = null, int viewerId = 1001) + { + // Make sure process-globals are seeded before we enter; idempotent + cheap after first call. + HeadlessEngineEnv.EnsureProcessGlobals(); + + Ctx = new BattleAmbientContext + { + Mgr = mgr, + GameMgr = new GameMgr(), + ViewerId = viewerId, + IsForecast = true, + IsRandomDraw = true, + RecoveryInfo = (Wizard.BattleRecoveryInfo)FormatterServices + .GetUninitializedObject(typeof(Wizard.BattleRecoveryInfo)), + }; + _scope = BattleAmbient.Enter(Ctx); + + // Per-ambient seeders MUST run AFTER scope entry so GameMgr.GetIns() resolves to this + // scope's GameMgr (not a stray one). EnsureProcessGlobals used to do these writes against + // the global GameMgr; now they're scoped. + HeadlessEngineEnv.SeedCharaIdsOnCurrentAmbient(); + HeadlessEngineEnv.SeedNetUserOnCurrentAmbient(); + } + + public void Dispose() => _scope.Dispose(); +} diff --git a/SVSim.BattleEngine.Tests/VanillaFollowerOracleTests.cs b/SVSim.BattleEngine.Tests/VanillaFollowerOracleTests.cs new file mode 100644 index 0000000..cbd236a --- /dev/null +++ b/SVSim.BattleEngine.Tests/VanillaFollowerOracleTests.cs @@ -0,0 +1,93 @@ +using System.Collections.Generic; +using System.Reflection; +using NUnit.Framework; +using Wizard; +using Wizard.Battle; + +namespace SVSim.BattleEngine.Tests +{ + // M2 first-green (go/no-go step 2): a single zero-skill vanilla follower resolves to correct + // authoritative state HEADLESS via the proven IsForecast/IsRecovery + ActionProcessor path + // (design §5 / DP4). No Unity runtime, no VFX clock. + [TestFixture] + public class VanillaFollowerOracleTests + { + private TestBattleScope _scope; + + [SetUp] public void SetUpScope() { _scope = new TestBattleScope(); } + [TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; } + + private static void SetPrivateField(object obj, string name, object value) + { + var f = obj.GetType().GetField(name, + BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public); + // Walk up the hierarchy if declared on a base type. + var t = obj.GetType(); + while (f == null && t.BaseType != null) { t = t.BaseType; f = t.GetField(name, BindingFlags.Instance | BindingFlags.NonPublic); } + Assert.That(f, Is.Not.Null, $"field {name} not found on {obj.GetType().Name}"); + f.SetValue(obj, value); + } + + [Test] + public void Vanilla_follower_resolves_to_correct_state() + { + BattleManagerBase.IsForecast = true; // suppress VFX registration (F1) + var mgr = new SingleBattleMgr(new HeadlessContentsCreator()); + _scope.Ctx.Mgr = mgr; + mgr.IsRecovery = true; // collapse wait delays to 0 (F1) + + var player = mgr.BattlePlayer; + var enemy = mgr.BattleEnemy; + + // Wire the opponent links + active turn. The full BattlePlayerBase.Setup(opponent) does + // this but cascades into UI/manager init irrelevant to the resolution path, so set the + // minimal state directly: each player's opponent ref, and the active player's turn flag + // (the on-enter-play skill sweep reads opponent.IsSelfTurn / IsGameFirst). + SetPrivateField(player, "_opponentBattlePlayer", enemy); + SetPrivateField(enemy, "_opponentBattlePlayer", player); + player.IsSelfTurn = true; + enemy.IsSelfTurn = false; + + var cardParam = CardMaster.GetInstanceForBattle().GetCardParameterFromId(HeadlessEngineEnv.FollowerId); + + // Place the follower in the active player's hand with PP to spare; empty board otherwise. + var card = HeadlessEngineEnv.CreateHeadlessHandCard(HeadlessEngineEnv.FollowerId, 1, isPlayer: true, mgr); + player.HandCardList.Add(card); + player.Pp = 10; + + // Pre-state snapshot. + int ppBefore = player.Pp; + int handBefore = player.HandCardList.Count; + int inplayBefore = player.ClassAndInPlayCardList.Count; + int enemyHandBefore = enemy.HandCardList.Count; + int enemyInplayBefore = enemy.ClassAndInPlayCardList.Count; + int enemyLeaderLifeBefore = enemy.ClassAndInPlayCardList[0].Life; + + // Resolve the play through the real engine. + var pair = mgr.GetBattlePlayerPair(isPlayer: true); + var ap = new ActionProcessor(pair); + Assert.DoesNotThrow(() => ap.PlayCard(card, selectedCards: null), + "ActionProcessor.PlayCard threw on a vanilla follower"); + + // Oracle (§5 invariants). + Assert.Multiple(() => + { + Assert.That(player.Pp, Is.EqualTo(ppBefore - cardParam.Cost), "PP not reduced by exactly cost"); + Assert.That(player.HandCardList, Does.Not.Contain(card), "card still in hand"); + Assert.That(player.HandCardList.Count, Is.EqualTo(handBefore - 1), "hand count not -1"); + Assert.That(player.ClassAndInPlayCardList, Contains.Item(card), "card not in play"); + Assert.That(player.ClassAndInPlayCardList.Count, Is.EqualTo(inplayBefore + 1), "in-play count not +1"); + Assert.That(card.Atk, Is.EqualTo(cardParam.Atk), "follower atk != CardCSVData base"); + Assert.That(card.Life, Is.EqualTo(cardParam.Life), "follower life != CardCSVData base"); + // Opponent unchanged. + Assert.That(enemy.HandCardList.Count, Is.EqualTo(enemyHandBefore), "opponent hand changed"); + Assert.That(enemy.ClassAndInPlayCardList.Count, Is.EqualTo(enemyInplayBefore), "opponent board changed"); + Assert.That(enemy.ClassAndInPlayCardList[0].Life, Is.EqualTo(enemyLeaderLifeBefore), "opponent leader life changed"); + // §5 "zero VFX registered with VfxMgr": structural here — the shim VfxMgr is a pure + // no-op (RegisterImmediate/SequentialVfx do nothing) and IsForecast suppresses + // registration in the real engine, so no VFX is ever played headless. Covered by the + // DoesNotThrow above; there is no meaningful count to assert against the no-op shim. + }); + } + } +} diff --git a/SVSim.BattleEngine/COPIED.manifest.tsv b/SVSim.BattleEngine/COPIED.manifest.tsv new file mode 100644 index 0000000..0b09acb --- /dev/null +++ b/SVSim.BattleEngine/COPIED.manifest.tsv @@ -0,0 +1,3314 @@ +# engine-relpath source-relpath sha256 patched(0|1) +AISendIntervalTrigger.cs AISendIntervalTrigger.cs 9714dac65d9572af1caba2fccdd6426c579c68160dac461853b18216a290671d 0 +AITurnControl.cs AITurnControl.cs b243f134711fb0c93454ace4d1e0fd073159ed1f8ffb349b79ded53a8c062847 0 +AchievedInfo.cs AchievedInfo.cs ea4a48fc79056999864843575ad2158855147d67f610cf0da6bce7ac2fc8ec3a 0 +AchievementInfo.cs AchievementInfo.cs 822021c9dd75a53d1e85bb97871f53ee0fb8bd92924a3209d35458d381c76e7a 0 +AchievementInfoDetail.cs AchievementInfoDetail.cs 9e1b20906951b38e6b0bd58aef69a2446a034aad14654b5832897def3fcfbaf5 0 +AchievementWindowBase.cs AchievementWindowBase.cs ced3e84a9c3c7085d64769f68ed54edfca7e637d14934978dfe98c966c459048 0 +ActiveAnimation.cs ActiveAnimation.cs 9ed4752c84da57a2d43ecf9c4f2e4f38f919ec959926046c4789abe82bba9f25 0 +AddDamageInfo.cs AddDamageInfo.cs 064839ffc0cb82bdcd15d929f33cc09c9732f68e3f95e1566d4aa1db6c61b730 0 +AddHealModifierInfo.cs AddHealModifierInfo.cs 41efe6d37249c80ea0cf0588976d40349c5906f0c14cf77776616a1d8ffe5e90 0 +AddTargetInfo.cs AddTargetInfo.cs 622c5cdc7421909489a00b7017670cadce81b74d0860dedbc662ab4faf6fd82a 0 +AlleyField.cs AlleyField.cs 138c25529e56d11ec28a82ae570ccee4fb1df1f52a258faaff4705afbebf13dc 0 +AnimationOrTween/Direction.cs AnimationOrTween/Direction.cs 7c497cb72737f19f0a3ce12c5cceb3ad7d4ba5b9fb5c43c5abab047e8fe3c59c 0 +ApiType.cs ApiType.cs 36dd6f7ae87a7caa985eebb0de02f709f7276c48068b1db2f28dcfd1fdc826be 0 +ApplySkillTargetFilterCollection.cs ApplySkillTargetFilterCollection.cs 286c92d6dee5ffb49b9d62e5064bdd303fa5dc523e7e29b3ef8ec03f2e185b8b 0 +AreaBGInfo.cs AreaBGInfo.cs 7d1b5307511080f36019fe6286effe9960c4cebe4a3174668dd1988b2ebbe995 0 +AreaBGInfoSection20.cs AreaBGInfoSection20.cs d9d4a8ae71b5e7f7616d212509c43bf0a0014f4488582ca558555c4f394508ba 0 +AreaSelInfo.cs AreaSelInfo.cs ef8322fa8a622cb44b3e8ff1dc03b85f784d7397bfdf4b6018993489e5eeb35f 0 +AreaSelectBG.cs AreaSelectBG.cs 1b3df23385533e2fa487ac99b6f7663d9f3dcebf9d8ef5b59517a6c60029dd03 0 +AreaSelectChapterEffect.cs AreaSelectChapterEffect.cs 5fe6057da9763c57807cff59388f137a266436d82a9efe934c6ff4489f55e2b1 0 +AreaSelectEffectControlBase.cs AreaSelectEffectControlBase.cs 4a0507a8649c0ff5027fd798212d71ea50609c5913f15a036adf47b74e62e03c 0 +AreaSelectMapIcon.cs AreaSelectMapIcon.cs 8f53fba1e364974a1d0e2a74714fd75ad5b169a32227cd956d3178f3c0d631c5 0 +AreaSelectUI.cs AreaSelectUI.cs b60642a02eefc4fa87bcf260ec6690bf0d9c85fbbb9306df71512a6243fee584 0 +AreaSelectUtility.cs AreaSelectUtility.cs 790c1e8736b553b68092b149e09ae456338760de052a90e79738cd502cd0a546 0 +ArenaColosseum.cs ArenaColosseum.cs 66b067b705e632eae13711062dad303f645fefe0eb92c7ea53faca6e11c1b3f1 0 +ArenaCompetition.cs ArenaCompetition.cs b93a87591acb5ab3e3e56a477ffbd2e9fd6a22a9fc0b46e29ace3553bbf4f279 0 +ArenaData.cs ArenaData.cs 03b256eb428d73a1b51df1bbea80f883256bea98e97b7c6410a79f5097bd76e0 0 +ArenaEntryBase.cs ArenaEntryBase.cs 382a1386eda2b152ff0dc698a10c1c1d87de74d44e776e4fbe16d65021249088 0 +ArenaEntryDataBase.cs ArenaEntryDataBase.cs c952da76cb1ec0102c1f5b6ab3e858c59387811531043a489b5ef96b9286e01d 0 +ArenaEntryDialogBase.cs ArenaEntryDialogBase.cs e873492ef02e22395d8f2d6311792d26c4c5fbc286a21deb9dc83f95b74cc41f 0 +ArenaEntryDialogData.cs ArenaEntryDialogData.cs b72e3e49df92947f33295e50025226171ae8659c2141bae672fe59868a01f5f7 0 +ArenaField.cs ArenaField.cs ffd6e156fa2abe44f29e9f16304290fe8544e3f08a2d273f88823efec7e50d8c 0 +ArenaNextSceneSelector.cs ArenaNextSceneSelector.cs d9e4338e53fc085a892edb2cd7348764736ec35d475239d7b2a95ac67ede4e58 0 +ArenaResultAnimationAgent.cs ArenaResultAnimationAgent.cs 0d8142cdeb937bb6b2b37d9e34de3ddaeccf6c8ddfad7a15b49601e8ac154dea 0 +ArenaResultAnimationHandler.cs ArenaResultAnimationHandler.cs b24d6cff35b7521f83f362b5b8e44411ab33a19cb2b074bf64b4b18f4c8007d5 0 +ArenaResultReporter.cs ArenaResultReporter.cs 329f0ee53824a157dd9b240582f1bfa901da4d099856d47449bf3758d404d097 0 +ArenaTwoPickData.cs ArenaTwoPickData.cs d63a8dbd3ba6ff149bdfc5f651a23a0bcd02ee4cb03940460002cdeb22836c7f 0 +ArrowControl.cs ArrowControl.cs 884ed3b803390467ba85ed67ae9edb7c6ce13e9fb46dc4221f87f086bad6ef0d 0 +AspectCamera.cs AspectCamera.cs 31f9273af0f4de11118ee062d16e6fcc4cf8bf37012af1ec81b14d6d58377eb9 0 +AspectCameraPerspective.cs AspectCameraPerspective.cs 457950085a98cc3dddd6aa7157b3b7bb7c8e2acb1cb390cfdfc7ce0f88f47248 0 +AssetBundleEditorTag.cs AssetBundleEditorTag.cs 91b4c9fba5686199c94b5c41f09021675ec128d4b2c5124d749588d53ed2aba4 0 +AttachedSkillInformation.cs AttachedSkillInformation.cs 4596525861f9328a006ae767cb5687d37742ca4296f04446a715859705117435 0 +AttachingAbilityInfo.cs AttachingAbilityInfo.cs dc7a858f5db686f046ffb9b7d004c3d513d2f6bd87e62737db7af3dc97429ce5 0 +AttackSelectControl.cs AttackSelectControl.cs 11e98f485db0cf64820b945ae46e2b1d72d85a218ca899d41e7d24289cbc7ad0 0 +AudioList.cs AudioList.cs 1833b5583de1e9d467cde1e88ffc0a2d35360e42e4a2ebc83dd7eb21ed0b7418 0 +BMFont.cs BMFont.cs 1228c62e3a837d18284ce8047861a1f90cc7702df5b008fb4ce0b812f299b69a 0 +BMGlyph.cs BMGlyph.cs 24ed29cc0a20d8b9bc91f2cd5607efd7f992b7f64d2dd885e58b5bf21ff5cb46 0 +BMSymbol.cs BMSymbol.cs 0252903edf4666d2456e20c524783bf1647ce6ef559ac631ac287abc1ef4178d 0 +BackGroundBase.cs BackGroundBase.cs b45dfcd6593e604dfc630dbd09ed09003fbc03ce5d5ca3d9c10f021331647f7f 0 +BaseCardIDComp.cs BaseCardIDComp.cs 2732088664fcd4f1d01b80755756874b6a72308dd126461ae9a76f6520cf144d 0 +BattleCamera.cs BattleCamera.cs 35cd1b3cfb6d5c9932a5b9777983b01fede0c8638a4ade7637a18318048ff2d7 0 +BattleCardBase.cs BattleCardBase.cs b105aec032149ab0a1730c6e06e25530699851707150ad4b72e24fe6d17fd50f 0 +BattleCardBaseExtensions.cs BattleCardBaseExtensions.cs 7725c04514bbf74f8b9a020ea882cd69d1ec4b8dadc6ee1147379c434cc0d772 0 +BattleCardIconAnimations.cs BattleCardIconAnimations.cs b92ae5d235191bf076a2997b4cd85bb9bd9a7689a388014bdac7390d271f428d 0 +BattleControl.cs BattleControl.cs 1638d42a0eb5e0291da90b24a62db923c6ed66eca5a114010f39ba265b2e7bb2 0 +BattleCoroutine.cs BattleCoroutine.cs 52951b72da7d4605ff9ea8beb7e109b5634c0827bdcec30949c50fb36b75b6fa 0 +BattleEnemy.cs BattleEnemy.cs e2c1e600cfa860ec5472508d52313db65b1bf8abfa1c28716e75e52a206c1a0c 0 +BattleFinishParam.cs BattleFinishParam.cs 46ebca81cf025b911875d261bd9ab664392b66bbe0fcc86a48be93c80ed92d11 0 +BattleFinishResponsProcessing.cs BattleFinishResponsProcessing.cs c543f7e2941bc99f2325d7a88197390e5b676389d92297353797dda75a388fb1 0 +BattleFinishSendBase.cs BattleFinishSendBase.cs 47a2e85409008b9e39579f7da0c312be4179954336e7bbc9f68a922f93757d08 0 +BattleFinishToOpponentDisConnectChecker.cs BattleFinishToOpponentDisConnectChecker.cs ec4b9678aa85a1eaacef626a6e07c20274535a4fca97db841fefc53be7f5381e 0 +BattleKeywordInfoListMgr.cs BattleKeywordInfoListMgr.cs a014170d0b3f5499635bcc2e29755dc2f3125d5a5a28b1741a4abc74b4abcf86 0 +BattleLifeTimeSharedObject.cs BattleLifeTimeSharedObject.cs ab8bc3703d268752a1de56ab5d3e9ebd276980c20076eb0ca300838b3db13d5f 0 +BattleLogTextBuilderAttachSkill.cs BattleLogTextBuilderAttachSkill.cs 11c585ae931fa3dc734bb231d6da61df3b51b803516ca2c5d88a0c78bc7c0104 0 +BattleManagerBase.cs BattleManagerBase.cs c40684d0f3e3c11e603b374ee9ba64f1830052723ea183d0b90d76d4a646ad5c 1 +BattleMenuMgr.cs BattleMenuMgr.cs 7418699063e01641d0df1ed16773a9ac9418f418cc047fc18c5892eb7971d361 0 +BattlePlayer.cs BattlePlayer.cs 001409844b46ddaf0a5edbce4e015749ece61053adf725a978987d7063a02632 0 +BattlePlayerBase.cs BattlePlayerBase.cs 9d3a665158706460a52900008dcfcdf575dbe08cb6d3cc05e63e718b2885b51b 0 +BattlePlayerVfxCreatorBase.cs BattlePlayerVfxCreatorBase.cs abcacc4b7a020259aa01cd08e31c1dd1abd8f87e482a64f9610032c453fa9fc4 0 +BattlePlayersExtension.cs BattlePlayersExtension.cs 07ff352633a54b241ec153b811641f031bcfdccd0f157c6b3760d1e7a2377fa3 0 +BattleResultUIController.cs BattleResultUIController.cs d127088f56f60a0f3c3b5803e7254ecc3f966ad600aafad9cbd23683c45f4adb 0 +BattleSettingBaseData.cs BattleSettingBaseData.cs 57fdad819d3665fae83b35eb6b6d282461a92ed003dc618121e7a4f70b3152af 0 +BattleSettingData.cs BattleSettingData.cs dbf96af7489d434970b976ba065ddf8c9605754a9df727572e5c889404040291 0 +BattleStageChoiceObject.cs BattleStageChoiceObject.cs 1b474a12f067e6c9a05a7c9ec204d362f4e58f32eba6c9c947e7dc39c0d5eaa9 0 +BattleStageChoiceWindow.cs BattleStageChoiceWindow.cs 3fd7e4a2c933b9ab84b5148620dc510f89f95c4afb32814ad2e1cee98bbeff62 0 +BattleStartControl.cs BattleStartControl.cs 3a790ddfdc9a1e9e3852ad4dab830074e4bc09925d54d53955ad838a42729a81 0 +BattleStopChecker.cs BattleStopChecker.cs 63f2c45b9493528468030b0c92917c3ec14b1c1d15735dd8b9dd603acb9f66c8 0 +BattleUIContainer.cs BattleUIContainer.cs 3e6933c0efae7f1ea44f18faef01f77f187fa8af03ece36ccfc6dab3bb0d4b81 0 +BattleUtility.cs BattleUtility.cs 2fb4d029e53be602f954503ffbc0ebfadc62c8e6615a822a8a642bd07b179642 0 +BetterList.cs BetterList.cs 3fff32bb27bc6ed52ed8cebcebd1b70d0c83b8d49a008d15ad884237706e8471 0 +Bgm.cs Bgm.cs 0563a3cfd7d3496978c1e8118976e8e176010f260a09a6d5021d6fb2cd7fd424 0 +BingoBall.cs BingoBall.cs 936816ad8c2bc8f09e9e568fcbc274e6960b7a877e06c733b26b4c9c3c70dd09 0 +BingoSheetBlock.cs BingoSheetBlock.cs e98181555a9b2a9d2135d136e4316db85062c92983d181eb5a6540d9f8ede66b 0 +BothBattlePlayerFilter.cs BothBattlePlayerFilter.cs d9b5460d0154326c4bfd32227da8987e9410dd94fd31be079960167e4b78b9de 0 +BuffCountInfo.cs BuffCountInfo.cs a8ca34862f1d83c9c99a702eb5c4bd02e799ad2b9127f4c380b940029e884214 0 +BuffDetailInfoUI.cs BuffDetailInfoUI.cs bef5b52e085808e650d013187963b8a8bcfe6c6623a253cb9707d6fac740cab4 0 +BuffInfo.cs BuffInfo.cs 820575948ba2de316270e52a8009838b00ed7c6a834e37883372be24f6b07fdd 0 +BuyCrystal.cs BuyCrystal.cs d80aaab65b5238080764b20eaa853163104480c859868cbd01ad67f1197228ba 0 +ByteReader.cs ByteReader.cs 7a52a7fab89ef5915fab93560518b089d2e28b4a30ae9e1bfb145209ce1400a0 0 +CantPlayCardFilterInfo.cs CantPlayCardFilterInfo.cs d83ea7282348ee3cf8b391748ec6720fa8a928ddb27020f8ee0191ea242d073d 0 +CardBasePrm.cs CardBasePrm.cs e34d9f9bbf52dfe2a0b30cd56d5e900e711ac1423cd26d23dde627e6066c08c4 0 +CardCreatorBase.cs CardCreatorBase.cs 45a8375791df42ad905864765fe42d596e4d56614fe18f2d90df79b14e57f5c2 0 +CardDataModel.cs CardDataModel.cs 5414f42ee02aa9fe5ed6ad2d88352a13f95f8127b81445a97dbadcde4110263e 0 +CardDetailBase.cs CardDetailBase.cs 4759ffd1c1bf7dca9caa832224a498180d4c76366ff4a10866215eb748e5839c 0 +CardDetailFilterCategory.cs CardDetailFilterCategory.cs b1285bd337493dc31ed03fb32b4fff63470235fd90dcd57ca677f253bd47d0d5 0 +CardDetailFilterDialog.cs CardDetailFilterDialog.cs 05f30e4ef3e15cea7a90ff45345b92a69a68bb3eb0542fb551817bf46439c813 0 +CardDetailFilterKeyWord.cs CardDetailFilterKeyWord.cs 8acd5dcf468dd4929f652af1c387adc9ac7e9948375e775eea5f9fc826820449 0 +CardDetailFilterOffButton.cs CardDetailFilterOffButton.cs bbafe2b972e7fa916913011585a3e72adfc8dabb1c8e7590b19fa0b84c310198 0 +CardDetailUI.cs CardDetailUI.cs db47e28623ffe64d90d49efefee8067ca6ce6653aed7882b7dc609cbb4c99e44 0 +CardFilterKeyWordMaster.cs CardFilterKeyWordMaster.cs 2cb03086fa87e8135697828f96f8d839ce41f0a6b33d6028f8a985368c0e7b37 0 +CardKeyWordCache.cs CardKeyWordCache.cs 27a1609fe451c9544ba050cd5d475be4ed9d5a065bef7bae1665213e177dbf09 0 +CardMake.cs CardMake.cs 948dbc828d0501576c93029d14181acc497eedeb7bb79592256bdc5a6b5af6f7 0 +CardPack.cs CardPack.cs 193e08432c2dfb038c6eaff0b85f4dd50d39a8cb98d4f80583954b71a6919652 0 +CardPackManager.cs CardPackManager.cs 08e789fd9a2c673d1947a4681804177f53a02ec0402390df630ea57395974514 0 +CardPanelMaintenancePlate.cs CardPanelMaintenancePlate.cs 0e77e5bf178933540af910b41d0ce7b2900b7eb261500352658a1ad52899f77a 0 +CardSelectListUI_Positioning.cs CardSelectListUI_Positioning.cs 31cb2574730de1af9a45f5b4569bf98ed48294c92a4ba2f3d1c61139ebc18f77 0 +CardShaderDefine.cs CardShaderDefine.cs dcc5f9ffbaadd9b58e191799b9d2581a50347c064482ec750775ebfa6cd242ac 0 +CardTemplate.cs CardTemplate.cs 65399570d29ca06364b36aa0dece7591db03f01b6093a25c1e37eaa58a26a515 0 +CastleField.cs CastleField.cs cc7dda019991a151d0c6ef6f2044f72bda38528bf0a1b68a893ad15a1ceddcdd 0 +CausedDamageCardParameterModifier.cs CausedDamageCardParameterModifier.cs 0376e7579b73800801bc049d121018a3575950737c35f871b485714921bf0a94 0 +ChallengeConfig.cs ChallengeConfig.cs 1f4e462c80a278fb1337c3173db675dac465c3ec3aabe330c7cb5db3f22e3447 0 +ChallengeData.cs ChallengeData.cs 97d920e88d32a6250a70a8e28c9dc46b5a64ef2b7dfb68e09075667cda06b244 0 +ChangeAffiliationVfx.cs ChangeAffiliationVfx.cs 24b75de653446ad964a050f8c493c0128a068f92d592a030b24c77eb40dd2100 0 +ChantCountAddModifier.cs ChantCountAddModifier.cs 9ad3d307986ca7bdde52eacbeb6314741b1601b4d2f6c344552df1904d26186a 0 +ChantCountSetModifier.cs ChantCountSetModifier.cs f800ee0b26519e2b7362af2c7aeca2120f7205a600acf1c659d2993a1783afe7 0 +ChantFieldBattleCard.cs ChantFieldBattleCard.cs e4a822d3a612543f37d223dbe7a751e3a30eace2cc2d40f49159d5534c27156c 0 +ChapterExtraData.cs ChapterExtraData.cs 9b18e16ed7c0d1a312284696fdc52840db19f8653629454ea6a2e4518b01478c 0 +CharIdx.cs CharIdx.cs 7ff22de9e540d981db8eae5af20c74279edcc9f6526722a4783b253d4cdf96b8 0 +Charactor3dInformation.cs Charactor3dInformation.cs adf2decd42c9fbbb8d25001cb13c09daa3c5b5b966bb90c5e7e66b90685cf0b5 0 +ChateauField.cs ChateauField.cs baa59d3f23b02ab28c5ad5d262e41f01f812a4a771e63c647973d0ea5f898b6f 0 +Class3dPostImageEffect.cs Class3dPostImageEffect.cs f2bc26e2c6675c4be1daf97a625679aa6c89a86f5938e70c092584c8243061b7 0 +Class3dScreenOverlay.cs Class3dScreenOverlay.cs 21232996507eb29bd12c7f9d7530e8b3343a06b05260697038afc48c7530f019 0 +ClassBasicCardList.cs ClassBasicCardList.cs 53080dea764a289b9d59839efe525dcbd295260c2cc2fb128ef637b97ed59f67 0 +ClassBattleCardBase.cs ClassBattleCardBase.cs 3fcc1ab079f0b7d1b30873026971ef8bedb013e4f46ee49b4a9532968703b4f5 0 +ClassCardCreator.cs ClassCardCreator.cs 2d0762491a1d31a55260675f07b944a11474e48b2438e2e945ce927f0ccca688 0 +ClassCharaExp.cs ClassCharaExp.cs 716ff126337cb011392a0aa189a0122c3eaf0e0bd6552ac13cd72ef040925955 0 +ClassCharaPrm.cs ClassCharaPrm.cs 39f8c6b747beeb52b55996623c1ed36eee3c3bc27ea9955be9b257b845e0b2c6 0 +ClassInformationUIController.cs ClassInformationUIController.cs dd8ae4d1a449c6ee5c03ebdca8e609bd3201299f2d145f87e0886bd7ba47ac39 0 +ClassSkillApplyInformation.cs ClassSkillApplyInformation.cs e477066b4d2dc2eb69c6f258341616856726addd8548c2cffd5d3ee48ef50e4a 0 +ClassSkinPlate.cs ClassSkinPlate.cs 5aab70386f16f29066a8c4d03887e9d0429a016b529af259e543da425be3fa98 0 +ClassSkinPurchasePage.cs ClassSkinPurchasePage.cs 74edd9b280bb306476fe89678512915dfc377a5d86369dcbbf493f03dda2645a 0 +ClipboardHelper.cs ClipboardHelper.cs 7fc9dfa2a6a7e0fbc838896af8bcfbe3989e6b60c896646543adf5ed1a1e886e 0 +ColorOverwrite.cs ColorOverwrite.cs b105af901904731252ec84a9526074355a32b3e06c70ffa44ef7c0e8121207d3 0 +ColosseumBattleFinish.cs ColosseumBattleFinish.cs 18dbacfbfbe0b305d484fe97f57e75a8448e1833ce0d2f905258b3e08cc7e4da 0 +ColosseumBattleFinishDetail.cs ColosseumBattleFinishDetail.cs b666569fbebdaa212c977a907ae272dddbd8b34d76435acac2e03d4a4c6092b2 0 +ColosseumCardPanel.cs ColosseumCardPanel.cs 57ac21e9aea157c32ceeedcdf448d5cf25bfb4512c225c791136881cf97190ff 0 +ColosseumDetail.cs ColosseumDetail.cs 336f55ca78aa976520347ca4d1dffd2c03c41de5eb8afab8643ffedce1645ba9 0 +ColosseumEntry.cs ColosseumEntry.cs ee5af9a600edd2308b11682c9fa523931eed8a2c208b82d2ec4e9b2563f07074 0 +ColosseumEntryDialog.cs ColosseumEntryDialog.cs 72639f1b017747d65b7beafc941db3bd3aebf93347df8d288177bdbc1330a7de 0 +ColosseumHeadLine.cs ColosseumHeadLine.cs ef416babb05a866afc02451b41e891043e118796918eac9280c52301001a694f 0 +ColosseumResultAnimationAgent.cs ColosseumResultAnimationAgent.cs 94516a64af44aba18eb5104283aa0e41ef4bdb87423bd857742eec53fb57a916 0 +ColosseumResultAnimationHandler.cs ColosseumResultAnimationHandler.cs 7a2f79975efe09d891db158be9065a9edf2068af37d20ed02529109fd01300b5 0 +ColosseumResultReporter.cs ColosseumResultReporter.cs 6e9ca923733f01c6c20aeb544c5ce5c0e58284bb2d480b1b5faa65ce7f24e060 0 +CommonBackGround.cs CommonBackGround.cs df587cccb68b484f617cffa913bd3850d64f4f821abbde625b817499c25b35be 0 +ConditionSkillFilterCollection.cs ConditionSkillFilterCollection.cs b8fc3d9621a1f8ae7aaffbaac618bdaba36b63b036a37b611d9a798e2e68a8aa 0 +ConnectionReportTrigger.cs ConnectionReportTrigger.cs c78d2c39db8a484c95b7e47c7bbdd16d050942c012531f286a188d5df33d3ca6 0 +ConnectionReporter.cs ConnectionReporter.cs 64f1c1133af6cd674763ed612d837a14bbc5ce1908afc9f3a93ff6b6cc18577f 0 +ConsistencyReportButtonAction.cs ConsistencyReportButtonAction.cs dbbc03ab138e28617e8f4d6e409f2441d50d9da8da8f53009a6b356e5e5273ec 0 +ContentKeywordExt.cs ContentKeywordExt.cs 3e93b52de66c252f5225c0d8924e19c53852b3d9c9c46b5620702dc7b13e0986 0 +ConventionDeckDeleteTask.cs ConventionDeckDeleteTask.cs e142f9e79f8fb2405c0ab443e9ca97e90c371328751963335d91d94fc2919a3b 0 +ConventionInfo.cs ConventionInfo.cs f4199507123b62b5da1633608e877cf0d9ed4ecf26a1671d520dfa2c8ee3026a 0 +ConventionList.cs ConventionList.cs d0271cd5a5029c3ccf3fff460d093070d97fc13c1871573bd980733c6a21ad9c 0 +ConventionListPlate.cs ConventionListPlate.cs 367921469919006a00056b6899bad8ff06c7ffcebe0142abe71b40a206b61ac2 0 +ConventionListUI.cs ConventionListUI.cs 71ef763a92802844e97010920f4fe83430f2376b0349d5ce7333c0586a48d358 0 +Convention\Offline.cs Convention\Offline.cs 23b8a13c83c914a9fce9d3065e84e78df7e21404d5f3cb3d6e27d9c02d3a143c 0 +CostAddModifier.cs CostAddModifier.cs 0627378794b72cb0f38a5a0b14aa70b03a02de4335074f21836b248e16c35ea9 0 +CostCurveUI.cs CostCurveUI.cs 75c41420986c2e5acbce33837dd0d475a50fb5a1bb3e3abcf0d2b813984e4f9a 0 +CostHalfModifier.cs CostHalfModifier.cs 21e90484e832afa41ec4f9e6244762a32b0a162f1ab940329d7a994ecce73347 0 +CostHalfRoundDownModifier.cs CostHalfRoundDownModifier.cs d9acd090e82b61697e184e9e3481d595bb279e5827dcd95f3fb1b132b6724255 0 +CostHalfRoundUpModifier.cs CostHalfRoundUpModifier.cs 92e2a80e70e590d861036e69c77beb5a48c52012885e62876240bed3a059fa70 0 +CostSetModifier.cs CostSetModifier.cs f6821df3735ce643be552bb7b919ccb8c75a1c22135daf01ef28a6eed9bf7c02 0 +CreateItemList.cs CreateItemList.cs 37647f56ebad7156a219ffed1f755fbb8554656599f82b67962c1c1802bb80c7 0 +Cute.Payment/StringExtensions.cs Cute.Payment/StringExtensions.cs 3d0f43fd0995ee154c7b873f31ba87f916fc6ba8b21ebd8231363f7dace95f4b 0 +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 +Cute\AssetErrorState.cs Cute\AssetErrorState.cs b33ad3fb7e2ef3fe360dd4bfb4fa165c6545fea387978a19954be38534aafc5f 0 +Cute\AssetHandle.cs Cute\AssetHandle.cs 1d8a2e86416732f74946f33dcc83668475124040ac512495fb78581a21c6e504 0 +Cute\AssetManager.cs Cute\AssetManager.cs 05ccbc063b6465ab8e55e70b9fca9fea6a62b2f888dfac7ad8aaa9c57c6f5d47 0 +Cute\AssetObject.cs Cute\AssetObject.cs c739b1f221168cd883e8663a2680c487ea72e09d6612451184247bdc56a01b1e 0 +Cute\AssetRequestContext.cs Cute\AssetRequestContext.cs 6b2494166728d2c202cb050c3ce0a06b635295895e48f03c6fd9397ea07177b5 0 +Cute\AsyncJob.cs Cute\AsyncJob.cs 5e02641f0b1d264d5fc74a31652543d970ae65943d3cfd96e477a835520863a2 0 +Cute\AudioManager.cs Cute\AudioManager.cs 5e0cce94bcfad63266cd298aef89bb383e541f5802aa19dc9692db02047e6529 0 +Cute\BootApp.cs Cute\BootApp.cs 1a6b3066b6155aba225b9ca4e79655e428fc7b24cb16569717b53600b1f23bb5 0 +Cute\BootNetwork.cs Cute\BootNetwork.cs 99769dd6c38b2ee2ef7ad02e14530c658576e5c4a2188ed1cbcdd563f68443f6 0 +Cute\BootSystem.cs Cute\BootSystem.cs 61afa7a7c8df705504031629965440d491603dec531b047a36b9294f255ee04e 0 +Cute\Certification.cs Cute\Certification.cs 0491630cc02f155829e96d2a3624f13a81200b5a00fd253f54cefbe576371d70 1 +Cute\CryptAES.cs Cute\CryptAES.cs d3022b9e1be75bc07e57aef61093717a84b60383608eba5daa9b7dc6605b1e75 0 +Cute\Cryptographer.cs Cute\Cryptographer.cs f61bc1f4727d323004c443c9db30a4f221db3309be2cb14d6f51fc6a39590908 0 +Cute\CustomPreference.cs Cute\CustomPreference.cs ddc46cc13bf2728e4fcee7db550ec093ec3acf651ea48d3dbb5f5099d5a20f89 0 +Cute\CuteNetworkDefine.cs Cute\CuteNetworkDefine.cs 4d83e9f5fbd6546ff6d16568a41ff885eaf9406275cc033c015b2aeab7203074 0 +Cute\DataMigration.cs Cute\DataMigration.cs 33898de02ccfaf795788f56df87b06d99cae1e16ca8d22afbf6bf7a4b632a0bd 0 +Cute\DebugManager.cs Cute\DebugManager.cs 046c827677e5060f5a78b5d095b349e6956f3fe9a6183d51e411389755b37654 0 +Cute\DeviceManager.cs Cute\DeviceManager.cs 1cfdf166a10ee8c25d00d8aa8b4679d3aebf72bd98d50a1c465d55e357059734 0 +Cute\GameStartCheckTask.cs Cute\GameStartCheckTask.cs 549e76d44bb9692e45701c6bd09ea441a495e8f7e7fe7acdf508583c44e2b5a5 0 +Cute\GetGameDataByTransitionCode.cs Cute\GetGameDataByTransitionCode.cs 4b324780fb9f9af0cf4b292ad95e4ee32cb549ca0786dd3d0bb0e3992fa55554 0 +Cute\GetiCloudUserDataTask.cs Cute\GetiCloudUserDataTask.cs 2cb7e8beebe14a4507d57e6f5bb29ddc97c3fd8ccafbd903386f14aa679e9b41 0 +Cute\HangulManager.cs Cute\HangulManager.cs 5d49693ea1bc8e9c60c356f2495fe2d10f218861a7894197d6b4129dff4aebf9 0 +Cute\IAchievementCallback.cs Cute\IAchievementCallback.cs 2da279d18d01267260283e79c2962362a72e5612eb137c7f4cb6bd7aac60d661 0 +Cute\ILocalKVS.cs Cute\ILocalKVS.cs 9a335a9930a14555431a147bd25a10809dfba3d7fffea2a74354e0c36e4c356e 0 +Cute\INetworkUI.cs Cute\INetworkUI.cs f9c167ca8b2919b6a9a31518e9517a032aa67f6444239aa070e884c397c3b70b 0 +Cute\LeanThreadPool.cs Cute\LeanThreadPool.cs 6ee7d493e0fe784f58b46954311c486b08c7fa509de4e4ecc60c2ef40b6d0189 0 +Cute\LocalSqliteKVS.cs Cute\LocalSqliteKVS.cs 75f8091265f3795e846c9a6ad45f8e3e469f1012e0f8568bc21f7a5912357808 0 +Cute\ManifestDatahashKVS.cs Cute\ManifestDatahashKVS.cs 0eae9523c5fdafac69d67396e8b4b26bdca8749abe59feaf5775c1b92148602f 0 +Cute\MovieManager.cs Cute\MovieManager.cs afe69325463e327cf9875f8a310f1b3c410652a13b144a7313920229e49df112 0 +Cute\MoviePlayer.cs Cute\MoviePlayer.cs 146ae8ae35cedc1f977609b0dcb271ef46ef0def022b8c5de7720968bd7ca63f 0 +Cute\NativePluginWrapper.cs Cute\NativePluginWrapper.cs 0a343e7004cd6f8c06c5f34998587d909b6d73a3f2efccbcc9cb0d658a928e7e 0 +Cute\NetworkManager.cs Cute\NetworkManager.cs 0045133deabae1d9d7323c1496d1e373c5fe4a1b731a81ed01ecac3500826ae1 0 +Cute\NetworkTask.cs Cute\NetworkTask.cs dddf8a492571b5d0ae698a7e472c86f75a746d5ca0e7b34b08184cc820459acd 0 +Cute\PCPlatform.cs Cute\PCPlatform.cs a0810fcee0d4228d7043804b71bc631414235a136d31e62090c9886e157e8186 0 +Cute\PCPlatformSTEAM.cs Cute\PCPlatformSTEAM.cs d00b9316745b628d0bcb7ffd296e5ad3ee7e1e3dd006eabc652fd725b356bf2d 0 +Cute\ParallelJob.cs Cute\ParallelJob.cs a6008b18295410cefa08fc98b6b9c4010c9a424120c322d86a050c2999f1750e 0 +Cute\PaymentCancelTask.cs Cute\PaymentCancelTask.cs 34797dfe926fceacb6ff6d806b9abdbb1c90d0dab64888fd034f6dabdc3fbacd 0 +Cute\PaymentItemListTask.cs Cute\PaymentItemListTask.cs 699476facb1c893aa3b01d467f421bc6dc39cf3e6bd0fbed8fae11466815b3e8 0 +Cute\PaymentPCFinishTask.cs Cute\PaymentPCFinishTask.cs b8ec9fe1f1741a9525cb675d0b400b218c6d6b851f2eacaa104832afb44b627d 0 +Cute\PaymentPCItemListTask.cs Cute\PaymentPCItemListTask.cs 5bce671c6caa47d183cc8129bf1ae099d5c20e6c863ea5a90926878c7f09f13d 0 +Cute\PaymentPCStartParams.cs Cute\PaymentPCStartParams.cs be95fa062f1bca344ca011a73ea9e6f9eef6fa2c559d3064c8ed9b2ca6fda902 0 +Cute\PaymentPCStartParamsSTEAM.cs Cute\PaymentPCStartParamsSTEAM.cs fcaf910e2d5ab9f51703f7a9bdf959874059d42402e70984dacdf5d0dc5da459 0 +Cute\PaymentPCStartTask.cs Cute\PaymentPCStartTask.cs bf5501c824f3d59f5f18c8bb2361243a06395c9275b2d576d172c082b8a3250e 0 +Cute\PaymentStartCancelParams.cs Cute\PaymentStartCancelParams.cs 82bea2494bf88c3d7a8497ae5e5bef5311b1c28ab3c3160984a76a63e402225f 0 +Cute\PaymentStartTask.cs Cute\PaymentStartTask.cs 293b3b16e2f607500c731421405b452aaaca04ae953a473611ee3cbf69b87a1f 0 +Cute\PostParams.cs Cute\PostParams.cs 075f4ac38426adb7885083dd0638d902737d83d34c4b36befd8cef000ff4f2b1 0 +Cute\PublistTransitionCode.cs Cute\PublistTransitionCode.cs 51dd8386df4487dd6a24cd6a62ec0d875ca13f375d446061b803a07feaacf934 0 +Cute\QualityManager.cs Cute\QualityManager.cs c6bb9c24b798af63b951d77bf525604ad725c9f14eadccce016f0c91497beacf 0 +Cute\ResourcesManager.cs Cute\ResourcesManager.cs 71d3f4d1e0d685fcc86ecb163a7c0509fc8455329c16cdb6d2a8a6044207f924 0 +Cute\SavedataManager.cs Cute\SavedataManager.cs 5646f2abab140a3b680014dd7d642989be1b1e041292d0f60c814546a27d8130 0 +Cute\SceneType.cs Cute\SceneType.cs 2083fa25feabaf8fdadb5b76860cd3349cc41ce7dbedea1a6b976b71d1b97bd5 0 +Cute\SignUpTask.cs Cute\SignUpTask.cs 12bc4a5ca60ba8e2305e5a1aa786a85911d9684005f38dea5469b67f42fb69c1 0 +Cute\SkipCuteCheckResultCodes.cs Cute\SkipCuteCheckResultCodes.cs 9e61d6dca2c37a5cb99be5f4657fcd1789504cea08a9f234e35cfe5bc0c9b346 0 +Cute\SocialServiceUtility.cs Cute\SocialServiceUtility.cs 98a01ef8cc4020f8fe4b1517946e9baa59f100cfa03bc0ebcc0d7561219d42e5 0 +Cute\SoftwareResetBase.cs Cute\SoftwareResetBase.cs 3f12519bbe890a1cecb09928deb13e8f22ee6a4230884f63a53e7ec22d7114e0 0 +Cute\SoundData.cs Cute\SoundData.cs 48133c9aece96639bb8d52c28e0aeef4b9e41fcaefee31d11a75c34ba355c96e 0 +Cute\SteamMicroTxnInitTask.cs Cute\SteamMicroTxnInitTask.cs 6220a26fefca4c5fc3cd075e1597e658a20a9df7df8cb6d2a4dd414d7d2ea9d7 0 +Cute\TimeData.cs Cute\TimeData.cs d1bb7dbdb7c456739a7949b2348121660df2ca5fba8f7797df275133b5691ddf 0 +Cute\TimeUtil.cs Cute\TimeUtil.cs e1216cb3cf4bf4add6b239fa718ad5bfb62dcd704f66f4737b23461b03f70c9c 0 +Cute\Toolbox.cs Cute\Toolbox.cs 1f33c50878dd0f2f2947ee38040fba727212db75b0a4fd783709e1f63eeeaaa0 0 +Cute\TransitionCodeParams.cs Cute\TransitionCodeParams.cs e9356bc3e735e7a66c7ad384f1c51c8b540fb65f0e66115a00458a51cbce8a94 0 +Cute\URLScheme.cs Cute\URLScheme.cs e4a3c1b69dba941cda308d19b8c0e73af0c317c0834d8031d7702471a233cc11 0 +Cute\UpdateBirthTask.cs Cute\UpdateBirthTask.cs 044f9a7bdd08e345f4997f02a6f7917b447deb376173982e90e4a79ba7926b7f 0 +Cute\UpdateiCloudUserDataTask.cs Cute\UpdateiCloudUserDataTask.cs 51b42f384a60587c64b7fa4e73ad23b0122cc03ff297ffd0d806043cce84586a 0 +Cute\Utility.cs Cute\Utility.cs b81416aeee0d4e21d0793bf97ee0f88ab47d366f5cbd10207e402fe56fbb3554 0 +Cute\WebViewManager.cs Cute\WebViewManager.cs b2ffdc6e77cb1f7f391a7ee4a1e7829c70ba7330c1e5e587b4294e15e3da2bd0 0 +DamageCardParameterModifier.cs DamageCardParameterModifier.cs 18471abb1ceed9dadd836b4692b4e0ce1e0a5f1d89e66819de2b763b4d460fb9 0 +DamageClippingInfo.cs DamageClippingInfo.cs d13af6e8d482d4bd5d25e4f3cb66ab8dc03706e12dcd05576957c243cc9cefe8 0 +DamageCutInfo.cs DamageCutInfo.cs badd6bab1f1419beb65cb033261c7e6b6ff1b0fdb8b5cfbeaa5690de3d26d8c8 0 +DamageInfo.cs DamageInfo.cs 5c8ace7ed08f5a2b17b94041d029976515795a6521c62fae4c1017761ec1c256 0 +DamageModifier.cs DamageModifier.cs 3e5115d7fc848170b4a12b9e83e7b29d4eea9f8ad99dd1922d8fd548ec39d547 0 +DataMgr.cs DataMgr.cs e26d86f920c1c4fa975100bca4e120da223aa00fdf2c7afe55555685039de048 0 +Debug.cs Debug.cs b4f865824033417f743baa3ac8f75d9a6268aaff551b10a8c975797e52b9a774 0 +DeckCreateMenuUI.cs DeckCreateMenuUI.cs 9fd67898af43926bec460f903d17c46b6276ec76fbdf5279f82a89099f14f52c 0 +DeckData.cs DeckData.cs 6e55b1b948e5e0b023b2bcfda8ba3ba3349137ce7902bc954f448ea150ad8dff 0 +DeckDecisionColosseum.cs DeckDecisionColosseum.cs 1edab0c9684af6334efdff55da119b45e36281ef4023c977d0f568427ad2bf58 0 +DeckDecisionCompetition.cs DeckDecisionCompetition.cs f2bae2824426c51ab61195fc8ebfc9b3311d3b1a4ac3517eeeeb99424ae9d9c1 0 +DeckDecisionUI.cs DeckDecisionUI.cs c860e82f9d92cc1a6ca9569185947f949731136a14f6923844f0d4f869b9e4e3 0 +DeckDeleteTask.cs DeckDeleteTask.cs e529a70056afede663a335da72e4a1970e6a2f66e7edf46eea930b91fb65c0d9 0 +DeckFrame.cs DeckFrame.cs 10766591b689deda42f52312344641a216abea3bdd724cfb71b8e28861e0784e 0 +DeckIntroduction.cs DeckIntroduction.cs 072fd4f510f7fb191b20a900a3599462f1a432b0fb5a5e7fe0f41f94a0c9770e 0 +DeckIntroductionCopyDialog.cs DeckIntroductionCopyDialog.cs 3481c9bde5668f31b2cd110c38f5b1f37f23a01bc848dc97ab457e233ca7c27d 0 +DeckIntroductionItem.cs DeckIntroductionItem.cs 203e91a28d0fb94e9f56e3353f6d245b278ad6fb5437ed99ad647970d44ea4d7 0 +DeckListMenuUI.cs DeckListMenuUI.cs a3edab346b80866df72c2005c7a492f81c9a3da1bafd510fa6d6b205eedeb38f 0 +DeckSortDragDrop.cs DeckSortDragDrop.cs 021d2e2d02abd6552a89bf2a770197253dfc3a383e6826e2fadaf536d98fe28e 0 +DegreeInfo.cs DegreeInfo.cs 1bef2f1b36023d033923cac8f96972380ed7e20a42b7114c67b4a29515fd02a1 0 +DegreeInfoDetail.cs DegreeInfoDetail.cs 41c09ccb25ccd6a1628a1d56079767434a6fa5228bad103eaee88b12a8d00659 0 +DepthBlurAndBloom.cs DepthBlurAndBloom.cs fddb16fe8e4701ffa5687fa2f6e1d10e37e4713163e6c64ae2b1070b7bf7774b 0 +DetailMgr.cs DetailMgr.cs b9c05d782358a88ff7efe57f4d75c24bd9e8c11fb661f368c038e30a44293ba7 0 +DetailPanelControl.cs DetailPanelControl.cs f14d798412cb1e071966ed715d863c42a24b34993de3cc2235bc9780daedc0c5 0 +DialogBase.cs DialogBase.cs 29b1a74e1b413b9c7a6026a95855be50e17c9c9d9ded48fd29e50f1dddbe2bbf 0 +DialogRewardScroll.cs DialogRewardScroll.cs f2ce1417d54d7dd933b439639b4fb04980149681d4f4d78c7fb4d5df014a50f6 0 +DialogSupport.cs DialogSupport.cs 38ea3efbeca826ccfcdde55f4454987ee703c1bd70d3009f5914b8552d81e8e9 0 +DisconnectToDispChecker.cs DisconnectToDispChecker.cs eff0b9cffe1f860c52f1541d859903e7c04b0b9533e8e9fb17db419c111b20af 0 +DisconnectToLoseChecker.cs DisconnectToLoseChecker.cs 62eb9d5ba9924579904be303dd687dc472a7846abcf897eaa9d71dd8cf3c564e 0 +DoMatchingBase.cs DoMatchingBase.cs f859fc6b06d6152ae6b2d1c6133ad2ac88efb8c0f1fa042ec3ce756c8e4eec32 0 +DoMatchingData.cs DoMatchingData.cs 39c301c522c5c10656a1150e2d0dd41da276594109f0b3d936e8c585dedd4bc7 0 +DoMatchingDetail.cs DoMatchingDetail.cs 962c8b822ff950ae48fb3980dbfcfddfda3b4bc5d8ad9426685c0239d40927e4 0 +DofDiffusionBloomOverlayParam.cs DofDiffusionBloomOverlayParam.cs 80a1a215e14dc04a0206f2c8f7cdbbf6931e9b98d5e6ca4c61e54c01ff6192b9 0 +Effect.cs Effect.cs 3a262efdcdf78cd70cebc47f2e13c37d59121b0f65cd4425576dbff5e7c3ffe6 0 +Effect3dInformation.cs Effect3dInformation.cs cbc8e10d2755feed8707d5fcc98e14a1d152e3f21a9e519d5b3990b0a45335cb 0 +EffectBattle.cs EffectBattle.cs 948c157c1c662f13946de84a8d82a9e791eedc9d0e4033e260aa960b001ddbe6 0 +EffectIdx.cs EffectIdx.cs 5a1bb1179ec2ae8c4e552ab9dfb859718b54c683382bec84518f1ad437c9dfe1 0 +EffectSetUp.cs EffectSetUp.cs 7dab4041e1975ae265ceaafe160b5d4857d3518aaed277ec445a88077f590efa 0 +EmblemInfo.cs EmblemInfo.cs 21fb353975ce1e929d9a88bdab9a69c32c751768cb9148293e29a8a504f9b1ee 0 +EmblemInfoDetail.cs EmblemInfoDetail.cs a6f8597d09808fa9634e52ad8482f2c715e043cbda29b14d9fac2d59ec74d47c 0 +EmitHandUtility.cs EmitHandUtility.cs 1912ad3e82e968b5e0fce6fe1339bf9ae17bcfa3019558b7848a9df9d656b54d 0 +EnemyAICoroutine.cs EnemyAICoroutine.cs a199f7894f26de72a798cb8f66c853bb23dd761a98d70a9fdfc0c1049fc6c50e 0 +EnemyChoiceBraveButtonUI.cs EnemyChoiceBraveButtonUI.cs 458c85516196dd7f8debb3df114ec87093e5daa4cb01702a5543e94f92bc0510 0 +EnemyClassBattleCard.cs EnemyClassBattleCard.cs 5919e0aff71c63ab89cdd942261e776abd3a3882536bc036c20f1b89159c2d70 0 +EnemyStatusPanelControl.cs EnemyStatusPanelControl.cs 20b622b34f72ca08706c732d8a1dad90055d4e1cb4e3fa054e6b560061f69bd1 0 +EpSetModifier.cs EpSetModifier.cs 67421f56915c690a3fe034745b2a400f845ef20ffb4d19e4eab2e2253cc36776 0 +EventBattleResult.cs EventBattleResult.cs 4175af8625db01292947338f264c8aee51a48e9ef5785fc2c99ad19a5a546d85 0 +EventDelegate.cs EventDelegate.cs 46aac74b8f69ad3bbff976d609890b06d39bdcaac8d750dbc08edb7350fe20bd 0 +ExecutionInfoCreatorBase.cs ExecutionInfoCreatorBase.cs 66231c001020d1bd54233645c2462edefd3af69adb166a4230e738915687a4d3 0 +FadeUtility.cs FadeUtility.cs 21735efdf8f885c091421350cfaadd1b2eddc1a3ffe4f5ddc84784260636b04d 0 +FieldBattleCard.cs FieldBattleCard.cs d0cf47325d0374752ab098fd364b886e7fa9e9367d6d2c59da71d03f200cbb6d 0 +FieldCardCreator.cs FieldCardCreator.cs c8e2cd0ee4875841922ce3a6a24c0ae847c221ff525585989829124e66b469a4 0 +FilterController.cs FilterController.cs 383faac09c95684862201a8ee7cb0384bd00bad97e17b967a2e2a0e4babe3969 0 +FinishTaskBase.cs FinishTaskBase.cs bcce8f5f8457978804ac2b8142a5c038e8113a67c6ba081226355bb2b4aeb93c 0 +FlexibleGrid.cs FlexibleGrid.cs 5ae686e596cc48092f7c71a8d4dde5963b777c406372cf8a68d4b274ad7332a6 0 +FontChanger.cs FontChanger.cs 9955da2526e537b944363985d3ff4f478aafc0e70c579be5d86256bb02760b80 0 +ForestField.cs ForestField.cs 3b43cc5aa968be5293e7ecb0fb58d9d76345ebdcd60cb7b3cafcfbaa9a2d1000 0 +ForestNightField.cs ForestNightField.cs fab43d11be900120a1c2894254ad675835029d1b0fe477ee3eb3358343061d91 0 +FramerateProfiler.cs FramerateProfiler.cs 8491f82747ce03e65dfca19664face88e9ecad1bf0c5abf2895e2073a3293fa3 0 +FreeMatchFinish.cs FreeMatchFinish.cs 226857922d2601d5c1634cc9d841427abb4c60d71595f886ce61c2d155d86723 0 +FreeMatchFinishDetail.cs FreeMatchFinishDetail.cs e5609ec95ead85a50478586695b92f1f38e402f550447b158e4099284bfc1fac 0 +FreeMatchResultAnimationAgent.cs FreeMatchResultAnimationAgent.cs 82042a6173b89b23ebd811430d07f95e364226316db1d17955ac1f8b1c16532e 0 +FreeMatchResultAnimationHandler.cs FreeMatchResultAnimationHandler.cs b636ad47ac36e858a240814b07601e7eb0d320ad4f5e0c6b9a989de2c09609c8 0 +FreeMatchResultReporter.cs FreeMatchResultReporter.cs 64093ca40666419d15bcfeb44cd37d3b6615069c36b4210e807b8be5e9909ca4 0 +FriendApply.cs FriendApply.cs 301bbcbf3a488283fff97e6af6a764d576a34ae1dea8793420d7681b337fb490 0 +FriendInfo.cs FriendInfo.cs c6e448c307821d45c04840cf185e6ec64991514b7b5e9f0e33fd322e259a9db8 0 +FriendInfoDetail.cs FriendInfoDetail.cs 969b8b156330d258e54dd88747d22e24f8e691efb68d97204a2c0da7b1700586 0 +FusionIngredientInfo.cs FusionIngredientInfo.cs f27ea653c65be64dbf872e64dfca4ac1da361eb347a96b2d05836b79452c8510 0 +GachaObj.cs GachaObj.cs ed8ef737f4254948f1e99fa49487dda56893096d472cfceaf4d68593ee81c7f2 0 +GachaUI.cs GachaUI.cs 9a2717c4c7488d1ac985e3f297efc5a0d2b1f11154257f120db4716b9562a280 0 +GameObjectExtension.cs GameObjectExtension.cs c52b9f14cc4237846cad401e99a269de16bbaae57ceafd3aff88b4de48763032 0 +GameObjectExtensions.cs GameObjectExtensions.cs e2cfe625254133493242c2f67a77a16149115ce2148f56423c9e854c8074ff56 0 +GateField.cs GateField.cs 7e46608dfc593222fb0364424b87944064f061d736b93d69d2c531f1645b7d18 0 +GetDataTranslateTask.cs GetDataTranslateTask.cs 5fa1138ce9d3a7a94d1491ea21dd9d73d25f6456a851795ad5bdbec89e9f08f1 0 +Global.cs Global.cs 176c8351aa9f1c5529fa0ed3ae8514fef117d4274034ec358ac1b7ee4fafb782 0 +GuardInfo.cs GuardInfo.cs f90debeff49492f32e54241fe88120353c9e640c63e40e5368e37aca46cbe4d7 0 +Gungnir.cs Gungnir.cs f0a18179c8b88c4faaece7f01be63ddf3fdbeb922e47ec6f0eb12af590620d22 0 +HandControl.cs HandControl.cs 9aeab0b0a03df8cacdf83ad032bac91bf6ded7add818ab8df390b2204de9bb32 0 +HandTRSCalculatorBase.cs HandTRSCalculatorBase.cs 3bed5bc4be8df4ae6e175ea80edee9dddba777cf3e60a98beb3c330f3b276591 0 +HandViewBase.cs HandViewBase.cs cda88f849da13685b457e2d7d539ac39e2ac26b7cd3d1ac46f09af540f7d5be9 0 +HeaderData.cs HeaderData.cs a5698b093069f218b38ae292b57bf7f322b1130e4d6c8bb2b48d652833834a5f 0 +HealCardParameterModifier.cs HealCardParameterModifier.cs cebc61aded873da74065beee795a016e0c4eb41535457ab363a01ab7fbe7f491 0 +HealModifier.cs HealModifier.cs 688d22e29bfba314775da3a007292f615d7f1285ad65af67925189310755d7f2 0 +HillField.cs HillField.cs 4c8038db8752952e434e76f1b32c9899710bbd9e3220532bb9fa9e336f06f20e 0 +HillRiotingField.cs HillRiotingField.cs d3d663ce3ced642f955fc444a2e69f1b4b8fae0075a06c6a13d8d076250b7f28 0 +IBattlePlayerReadOnlyInfo.cs IBattlePlayerReadOnlyInfo.cs 92458acdee05e34f03501eb096f4f9a62e046bb23beab303feeda08a65b16a96 0 +IBattlePlayerSkill.cs IBattlePlayerSkill.cs 0f6483b6c68d14b3df16714d80e7a699fe77dd8364fd9a526ca4d71ea938ca93 0 +IBattlePlayerVfxCreator.cs IBattlePlayerVfxCreator.cs ede7ac5540d0302302ff09323aa610a7f0465de170696134fd9cda3b88625873 0 +IBattleResultReporter.cs IBattleResultReporter.cs 5738a394332b823ef418da707c61c13cbb479cdbe2b800af27f6ba5437fda887 0 +ICardChantCountModifier.cs ICardChantCountModifier.cs b5eafdd395d738c281ca7bc680a755ee2b011d24342cedf80687bcb7e29b3190 0 +ICardCostModifier.cs ICardCostModifier.cs 3d31fcd151290d609159adcd781c77eaa7309aed87369dd5fc5dd0651265d198 0 +ICardEpModifier.cs ICardEpModifier.cs 1e9f05e89b4df909a3a157bb50ec86b68ce33a3751da1cc7b9ee9bcd85b90ff8 0 +ICardLifeModifier.cs ICardLifeModifier.cs 18266d3d9a1705ebf40f4b88ed245d5b2c12cca0f3bc18deaa8968c81510129a 0 +ICardOffenseModifier.cs ICardOffenseModifier.cs d96faf26fcb1ae05e2625f1b20c69a920027ceb58aa95e94675b60d955caa56a 0 +ICardSkyboundArtCountModifier.cs ICardSkyboundArtCountModifier.cs 0b8d0621f791bb61046d66cdfdda2abd7a672e2fdc1d83732b715965746d4997 0 +ICardSuperSkyboundArtCountModifier.cs ICardSuperSkyboundArtCountModifier.cs 7e68ca567e78d46a21d036b965cde68182fe1070ea9d4f750e1eb236efd06556 0 +ICardUnionBurstCountModifier.cs ICardUnionBurstCountModifier.cs ba967c6dc5d5a202fc6ded3b788b4fbd14d2a840fb2ce0858c6dc9f332a4fbfc 0 +IDInput.cs IDInput.cs 6366e6c23d9c954bb08d8052040e04953528b02084c380a9f6004581758d8934 0 +IDetailPanelControl.cs IDetailPanelControl.cs f705759bfd1ee67cb2fd89727c9c5bc3fa339e1a45ecdba0f1deffa5d7464e71 0 +INetworkLogger.cs INetworkLogger.cs b7c350604afeec7b31078c254297785062ecdff88e65cb530d870d6b791f4a11 0 +INextSceneSelector.cs INextSceneSelector.cs 52d188563368337f2653d41f54ed6ba915911929134b6bef628f6cd72c820c95 0 +IPaymentCallback.cs IPaymentCallback.cs 49a700edd4e580c493f97fdc7328a2609630904bce2f2a6110b485d5958e7869 0 +IPpModifier.cs IPpModifier.cs 95a83890b06528d37c73dea24b75a3dcd23dfd532508bcb90463e34a5811d19e 0 +IResultAnimationHandler.cs IResultAnimationHandler.cs 0106c5eb9c8d912d47c5cc46336bffce1284cf5935088850fc0dc6c7ccfe3351 0 +ISkillApplyInformation.cs ISkillApplyInformation.cs 1082061304ea9099b2e144ac28aef691d138e0f8e09f4bac8109c8c359277fa1 0 +ISkillBattlePlayerFilter.cs ISkillBattlePlayerFilter.cs 1a1760e036b1ac60eb9fd837446c3b45daa03e9d5a80cce77a1ee601e6c7fed8 0 +ISkillCalcFilter.cs ISkillCalcFilter.cs aacc91c8f393db7296400160698e4ffa5e229170c1ebbc898abd1ee5b96e44a4 0 +ISkillCardCountExtensionsFilter.cs ISkillCardCountExtensionsFilter.cs dd3bae7e099bfd5ffef7a58cfc446c11cbd0c6b70c1a8633506f0a0762a1c0a9 0 +ISkillCardFilter.cs ISkillCardFilter.cs aa7d9a12ffa40988e4a2f9c0cbceb51dc41deb350490ffb29c20a027c04f7377 0 +ISkillConditionChecker.cs ISkillConditionChecker.cs d1e64e217456ace7bfd55bc226863af269d3a42a3b8bbae8eeb75e535de7931c 0 +ISkillCustomSelectFilter.cs ISkillCustomSelectFilter.cs 472aee97b778f66a3883ae49ef4a25dab079ec0471ef61212151a02edf0733da 0 +ISkillEnvironmentalFilter.cs ISkillEnvironmentalFilter.cs 4e35f3009689157bfc56a2a5beea40964bc1848294947b2f7b31206aa94acc0d 0 +ISkillExclutionFilter.cs ISkillExclutionFilter.cs b2c4a6db5438cf628a7f4e65e8f39e0859f90694ebfe31ae199c70e00fd97ae3 0 +ISkillOrFilter.cs ISkillOrFilter.cs 225154c7e77f5e83d2afd3d7b52e11588c722220eb795b7f0a54b9f609f42163 0 +ISkillParameterSelectFilter.cs ISkillParameterSelectFilter.cs 11451ea5bfbc1d4b7ef1a3229eb4e4ecf7bb5f7243abc769824f171ecbaa1e8b 0 +ISkillSelectFilter.cs ISkillSelectFilter.cs b3a88c0e99f60103a913c7de8f01798fc01036b950bf72cbb18e6aa7faab7f88 0 +ISkillTargetFilter.cs ISkillTargetFilter.cs 83e6544879ae037b683c722ef64a84eb11c5c25eec2d5f91ee3c305c35365875 0 +IStatusPanelControl.cs IStatusPanelControl.cs 0b3209f41c2c553a04ea57d686fa023ec1cccdbaebbc87a27796e5757f1820dd 0 +ITurnEndButtonUI.cs ITurnEndButtonUI.cs f56729cec651078c6ad204c92a465359206ec4099cc2089ab5075adcd130a401 0 +ITurnPanelControl.cs ITurnPanelControl.cs 92439feb3a6faf563e1d2673a4bf20c671be1300731d5594d1fb9d9947016036 0 +InPlayCardControl.cs InPlayCardControl.cs f7c85d9d8554057500bf89c7d299c88d42acdf004673489753e4c82e7c904363 0 +InPlayCardReflection.cs InPlayCardReflection.cs 230a498f9a9239da76fd43e1356c2420606b53ba4dc7fd74eee475d44ab2b39c 0 +InPlayViewBase.cs InPlayViewBase.cs a7de0b0b6ca4f4615b61d4614cc28a1761583cd9af3b7900b4ee7fabc8fac0e7 0 +InitializeRoomBattle.cs InitializeRoomBattle.cs b3263760af6e03fd808bd289ec482e575852567d4f1631503c63170b0bef7061 0 +InputDialog.cs InputDialog.cs cdca35d6b09423bd6995c573d775d05a5548b5fa5e9d29329f5e1883226e840d 0 +InputMgr.cs InputMgr.cs 581fa15080fb3a88827b415e1da7b27624df5b6990bc3901ab73fab64a2c22ba 0 +InviteFriendBattle.cs InviteFriendBattle.cs f1c14f9d25baffa1414175af2bdb9cee3188a3d914bd29d4c5925a08f9b3160b 0 +IronField.cs IronField.cs 689150823ae55cf49abda584ecbc7a41893e25f04f9fb5a390342f8be2de1ead 0 +JsonDataExtension.cs JsonDataExtension.cs aa81fbf84fb4479dc9e2ad2ea5970b62553454bb7de88101617a80db02c53c6c 0 +JudgeResultFailedToRetryChecker.cs JudgeResultFailedToRetryChecker.cs de1009153f15895bec6f0540db81859a4f57812ca5c44f5db9c2b3bd6d907f2d 0 +LaboratoryField.cs LaboratoryField.cs 294c70c4ba7ca09b01025a3494dbf1af61095babbc5dfb166489689cf5f7a2b8 0 +LaboratoryNightField.cs LaboratoryNightField.cs a4026bf07382df824e1745660551947413d56180a25b58af64428ee0850bd5c2 0 +LifeAddModifier.cs LifeAddModifier.cs 8b797af998bb65706eae297c265df3387bc98ee3c6542fbcd24412c9ca606725 0 +LifeMultiplyModifier.cs LifeMultiplyModifier.cs 4493ed744ece0bf47c795eda8fe983b96d78c17c0c6220703339475857010038 0 +LifeSetModifier.cs LifeSetModifier.cs 3d0f4eddc8fda00e181825bd5e72e1785af2a843ecf70b8f15a5b3df911a2a98 0 +LitJson/ArrayMetadata.cs LitJson/ArrayMetadata.cs c4b50df21d2e7d0f370282620da4e9635d278671020263aa2a0ab7acbd474e6a 0 +LitJson/Condition.cs LitJson/Condition.cs f89fd6405782b1b3ec746ca7fb687a0c906dd4443d6526f2960c9154259dce4e 0 +LitJson/ExporterFunc.cs LitJson/ExporterFunc.cs 01472fa8ae8870059385b2520fab5759bf6b1a2d3ce59f1b65f2c76759c03117 0 +LitJson/FsmContext.cs LitJson/FsmContext.cs 77581edfad3c6c8d9263374f8030ff56a393e6e3c17126e28006efac3fd4863d 0 +LitJson/IJsonWrapper.cs LitJson/IJsonWrapper.cs 38abdbb16581143c277054ce9bde6c9cc797e5f43dcffb748eb17a84c8252cf3 0 +LitJson/IOrderedDictionary.cs LitJson/IOrderedDictionary.cs 9e2efe63a3a0613fbf5de99106b633467cc97586ca14cd43dfc9016e2b4b45b8 0 +LitJson/ImporterFunc.cs LitJson/ImporterFunc.cs bfa950afdaeb0eb4ed730e89339f09c167f5b4dc788dba3a17921701350aa2b2 0 +LitJson/JsonData.cs LitJson/JsonData.cs 216a3e6fa34e583af9e88d0be662af774c8f911674902df7f56ddfe5ec94627b 0 +LitJson/JsonException.cs LitJson/JsonException.cs abfd12b161286d1a03fa0b7dfbf85c758fa22ad50c7e84dcf0c43bef9cc436f9 0 +LitJson/JsonMapper.cs LitJson/JsonMapper.cs 63d272e8d4e9f2bff8034be583a28767ca7a244b867d30b06676a772b2d0cf9b 0 +LitJson/JsonMockWrapper.cs LitJson/JsonMockWrapper.cs 3f211a3384ccb5804e581332d593c4c3322e9d5e1e0d5417b1bae7c61dc00a2f 0 +LitJson/JsonReader.cs LitJson/JsonReader.cs 3e7ddbe3459f7c08e3dce516f7243afcd7bcc9a579238b4959404bb7527bff65 0 +LitJson/JsonToken.cs LitJson/JsonToken.cs 921f25993dafa3e84b495d622a79d7e4402f859198ed1915493b52bd9fdf84e0 0 +LitJson/JsonType.cs LitJson/JsonType.cs aace2461ab45b84603de7ceaf1396ee7741c2c30d6254e234c14cb3faad339cc 0 +LitJson/JsonWriter.cs LitJson/JsonWriter.cs 0c65ee328b1484795a9b337648eedd243408d4edd641978fa6d7a29456d4d7d0 0 +LitJson/Lexer.cs LitJson/Lexer.cs f5899d48a748ddff8aa7fc72514405989290b1b46c2f213c656b15571fe36da7 0 +LitJson/ObjectMetadata.cs LitJson/ObjectMetadata.cs 238f8c4723bb0885e5aa85157596b59104ea089c06f7b1fa6ead0734753ffa36 0 +LitJson/OrderedDictionaryEnumerator.cs LitJson/OrderedDictionaryEnumerator.cs cbb2d3594bf217e103541de1853d49075e923fc58752d39416fed8c41f88a22c 0 +LitJson/ParserToken.cs LitJson/ParserToken.cs fbbaf4542df887b3301d5ada43c93f6f7748b1b28f75f04f6d3d7ab81a9169f9 0 +LitJson/PropertyMetadata.cs LitJson/PropertyMetadata.cs 3a305fbea81449f91d1d22a1e3482f7d5558ba9374b5345d3be50af3cc5437ca 0 +LitJson/WrapperFactory.cs LitJson/WrapperFactory.cs 2aafd3dbae34d41864abb0e84229e6163fa7a4fe857f3972f2949de1a0badcd7 0 +LitJson/WriterContext.cs LitJson/WriterContext.cs 39416dea3b7218c555f5988a5464a133ee34ec8c12739bd7e241abddd8932a47 0 +Load.cs Load.cs a68f95fd46d5b9961f8b40424d093ee3ab9a21e168992034c66f81adb66dcc1d 0 +LoadDetail.cs LoadDetail.cs aa01efaaaca68bd8899b41ba90ef228c3d5b7f9ccaf9e7937b476a1bc9886342 0 +LoadingBase.cs LoadingBase.cs 0f63fc8676b84b1b8c36bf51f41b241c74e236abbff1e07b2612233f3f4f04d2 0 +LoadingDownLoad.cs LoadingDownLoad.cs c6da17d0f0ee79b43446f4ee7134b3e212380ce30150a3e87e908e655b746d19 0 +LoadingDownLoadCardView.cs LoadingDownLoadCardView.cs 702c19ded4f568afdf58b16d30ad0d52c5c4567f549805d7b8bdf4b0b6ffadef 0 +LoadingInScene.cs LoadingInScene.cs 9ae449b0ba5668e3d3d8d1d0ae340514617ac705d364c9be8993efe6afe4ddb1 0 +LocalNotificationPriority.cs LocalNotificationPriority.cs ca3265d518980b3058603bcd1151b0ac7f934866f991ff967826870f4a9cb060 0 +Localization.cs Localization.cs 07d154439612a9a8e6e49ec7edd9f5fc0a7af965d231291c96c0057d991e4a48 0 +Mail.cs Mail.cs ba86653cb360de7bd79848e81757c76dbb7c067ade9e0f8b7c7721fff4095907 0 +MailData.cs MailData.cs 8229d3b651b4df09e52def59da26a70635224c3e8f80437d01c7a1012be8f942 0 +MailDataDetail.cs MailDataDetail.cs 61caaf9762aff044c3f675a4899b47a31af0872a70f1035d822755842fd2ad3e 0 +MailResult.cs MailResult.cs 373b73be1b55a04ddeaa492c150031556aa71144e4b662c609da6ac5f02aa75f 0 +MailTop.cs MailTop.cs d0a6aa8517f07f2faa06f0eab7925f48ffee5a88784a3fc23229e4a5a53ccaf5 0 +MasterLocalizeSetting.cs MasterLocalizeSetting.cs 99ee729dbe167dcd0435d6d30cbe2c19f52c6537900f83c822e32279dc93d9f0 0 +MatchFinishBase.cs MatchFinishBase.cs 03abdd14a4dbe15e4c489a2e21e39b0a87419ca3ab4f48e6cd195e3364fac8ad 0 +Matching.cs Matching.cs 29098aea9c23bd2902e2a8d873d17f28c10b8035d68958386737a8f74b46f278 0 +MatchingBase.cs MatchingBase.cs a7ab09602771607df180013c0b564aa561d0e71e6bbe06c294bd72163ccf290f 0 +MatchingCoroutine.cs MatchingCoroutine.cs 742e67e22f9bb1ac34e7828737ded1e709100091aadb9ddbb20ded863bc503b3 0 +MatchingIPv6Toggle.cs MatchingIPv6Toggle.cs 7d1f158ec6dbbb7f4c82bfc5e390248fc4b7e5c3688b303e5c0ad7a4686c5b5b 0 +MatchingIntervalActionBase.cs MatchingIntervalActionBase.cs 59e27d024cdf6fceac658a8610925f92df34622b5f9a3c1506185dabc6ead1bd 0 +MatchingNetworkConnectChecker.cs MatchingNetworkConnectChecker.cs 883ea96d00d6ce260920709ce14ccf3df66872a3718b318012291330c1188881 0 +MatchingRetryDomatching.cs MatchingRetryDomatching.cs 462d1f6cb226ab558be7a30f4e656ed50bbbc5db2b12768396d7a081020dbecf 0 +MatchingRetryLoaded.cs MatchingRetryLoaded.cs 25bded3bbbb7524ae5bdd4c8037bb5fb3bc6a9ddf940629e51b51147e1a9c77c 0 +MatchingTimeChecker.cs MatchingTimeChecker.cs 3c3d0428a3314139818552cbd6ced313fdf2de9fa326887cfe85a7213f3ebc34 0 +Matching_Colosseum.cs Matching_Colosseum.cs aa8b3b9d199ebbb3c0597b64bd7ae3bac97ee122a5a2c4ac456d14a615063035 0 +Matching_Free.cs Matching_Free.cs 69799da01a20bc9143e999d7fda9f407de49cebddf59266124c251810cfa92b6 0 +Matching_RankMatch.cs Matching_RankMatch.cs 34072abd51e1134cae5bb2ef3d4e8d992c58aec94f5bb845035f7c088bd92cc6 0 +Matching_Room.cs Matching_Room.cs 82e93f2493482a7107d00265b5025a51b9f05dfd6e1402eeb693622e4542e36c 0 +Matching_TwoPick.cs Matching_TwoPick.cs 8ad94923cf196a14235de02d7cbcb3eb1edd840158368afe2c92dc29ba872b55 0 +MaxLifeAddModifier.cs MaxLifeAddModifier.cs 410eb577b9e19074d555fdc89b773a0399f08e3b4d6513ddcfafe3c67dc5b467 0 +MaxLifeSetModifier.cs MaxLifeSetModifier.cs e4103f7d5abd5a91b83c08613a35d3da2b208ebc7655206c00fe2c7718fbd85a 0 +MecanimSceneBase.cs MecanimSceneBase.cs 92369606696d42d4a610216fd48e13aa1592bbfc5e0f98f53afc3e5264d3fbed 0 +MecanimStateBase.cs MecanimStateBase.cs 8aebc2fffebf571b953804cca24acf6a73902ffe3b35c53e8e8076691121039f 0 +Mission.cs Mission.cs 06fcb02410d114b2a2c64a0846941c62a286f44d22b7fdb92d650096a704a381 0 +MissionInfo.cs MissionInfo.cs 2577e5c3f988a6acc5810ff4642988b8324415e4e361fe54a37c593b0fe7b82b 0 +MissionInfoDetail.cs MissionInfoDetail.cs 4caacd77a98f00dbc81b5111933dcc5eccc86bd558a44f37485f2bd253b6bf87 0 +MotionUtils.cs MotionUtils.cs 59de592e4cf7fc0b7d210b22473fbec6484d175342bb8030165fdce550b75392 0 +MyPageBanner.cs MyPageBanner.cs 05fde135c8ebfb7565f3a126a617b9464db000ca698326c44b6fe688e7ddf020 0 +MyPageBannerBase.cs MyPageBannerBase.cs 5f28a583638d2a7d2d94846c631f8183728a6231b5017776695b66e09380b6b1 0 +MyPageBattleCampaign.cs MyPageBattleCampaign.cs cf0c74f3a1a8d6a5c8c3543576b2baf54fc35a74e942636c97f4dfccd144386f 0 +MyPageCardDetail.cs MyPageCardDetail.cs 4b548b516453c0c57b141b726ce2fdd2fa5afd46d41bd6c766c7034b2741ba6c 0 +MyPageCardPanel.cs MyPageCardPanel.cs 111ac76db5bca2338825e7c23a6de818d1f733c64f1095d0332e8bf16d74985e 0 +MyPageCardPanelAnimation.cs MyPageCardPanelAnimation.cs 32d7b814da547640a945234ef0acfdb650ec4b5077e2990168eb2b83ce981d8e 0 +MyPageCenterCard.cs MyPageCenterCard.cs 5d28300e7152fa4aee1da77a276fcb3ac85b34d626351fb7517867e0526fa83a 0 +MyPageCharaMenu.cs MyPageCharaMenu.cs 0826444ea3cfb5570782348870a7299383cc5221255e2347874373c1878864b9 0 +MyPageHomeStatic.cs MyPageHomeStatic.cs 3ca9ecb0d96a525764a94376fdf8e90753aec62af290b6e71e397e2a1f2d82d4 0 +MyPageItem.cs MyPageItem.cs 7e444a5a89806181e29f531252319964134a5e5eeff279571fd4c6e26648a6d5 0 +MyPageItemArena.cs MyPageItemArena.cs 234f20802ded5a336ebe8c5065ebb065d8ba66c77e88a18f0607d2ad1a01f6f8 0 +MyPageItemBattle.cs MyPageItemBattle.cs 7b4558a9961278e622422bff36fa62c33a768e50a253817ca86882dc2df7a101 0 +MyPageItemCard.cs MyPageItemCard.cs 5208e1a3b85f40dce4d15659b088187ce8cecd08c70e235a8192ed26b623f220 0 +MyPageItemHome.cs MyPageItemHome.cs 3371963cc4f46b440c2a1b9728efbee344f198bc0a7ad7c9facf289835310dac 0 +MyPageItemShop.cs MyPageItemShop.cs b79fe8a7eec72c12ad5a4d30af96f4267af7416b158e64e1bab0c85c1d7910df 0 +MyPageItemSoroPlay.cs MyPageItemSoroPlay.cs 4d8c66dadbfaf424a4d93433d649fdd5f62a212eda6bd0d742f477a27a6583e9 0 +MyPageMenu.cs MyPageMenu.cs 6f744dd9f5ed6757b3fd0eaac530d2f65294071eb8f07e3c96885d4cfa18473c 0 +MyPageShopCrystalApeal.cs MyPageShopCrystalApeal.cs e5c97ef9321cd21f0f785dd3226c1c6bd835fc0545dd694493122b022e20881c 0 +MyPageSubBanner.cs MyPageSubBanner.cs 213ce1f505160cd0b5f818888e21126f02dad87b309ece0cbe7c428712980b2d 0 +NGUIDebug.cs NGUIDebug.cs 05afba3513d85fd7ba2ddfc4371abf4ce3507a199b108ef6e4f7d91ababa48dd 0 +NGUIMath.cs NGUIMath.cs 94de0adbafc338c60718685c01cf41f35950617ed0e4fd6ad41b19af506c315b 0 +NGUIText.cs NGUIText.cs 559ef7a20fcde5f9598f3711079ec82573652e26f52d674cfc4ab375eafe78d1 0 +NGUITools.cs NGUITools.cs fd94664e614d4621b0db9492527aff89560bd60e97861d119231036c552586ec 0 +Nat2Field.cs Nat2Field.cs e88af89f0bf45a0b124aa0b2e9450fed9619402d343a570bfaf7df2e18c08be0 0 +Nat3Field.cs Nat3Field.cs 6b05e595b5a36ad4862461c02404c37194820d3ca96e77fc314e380fbddfdfab 0 +Nat4Field.cs Nat4Field.cs 582be3b3d22bed077a105861bdbcbd5e564bb709b771377f980aaed098e6ccec 0 +NateField.cs NateField.cs fea9100df495f60716a7e330e466ea94881e61789d606526c5aaadf4504b19e3 0 +NetworkAIBattleSetupCardEvent.cs NetworkAIBattleSetupCardEvent.cs 3a5294dfdd135a9f040af7bac6844a56b56faa81921199b77b809c4d4d549748 0 +NetworkBattleData.cs NetworkBattleData.cs 73c823febb4d40b508b72cc946fcc47211d89e93c4906cbeca43beab971d69d3 0 +NetworkBattleDefine.cs NetworkBattleDefine.cs 4d0a39b09dd5ad11786645dc4365148d945ea11e690f735d3eb541ebb7ce604a 0 +NetworkBattleGenericTool.cs NetworkBattleGenericTool.cs 38d7965e7e25aa31d7e56abd5797b1b02a99bfd96426ffd87a43ffc15ce9895a 0 +NetworkBattleIntervalCheckerBase.cs NetworkBattleIntervalCheckerBase.cs c0e67a2a6b7476342c4dd71eff51b8dfef322c719fd8b1ac6300223d71949170 0 +NetworkBattleManagerBase.cs NetworkBattleManagerBase.cs e0fd242d61995e9a667928f7c868fbe29abdfa7b57349229077b7f75a8607a97 0 +NetworkBattleReceiver.cs NetworkBattleReceiver.cs 9ef6c34fa7bae735988c7adcb455c0245b5d37bbee58a6b29f4484bad9cec3eb 0 +NetworkBattleSender.cs NetworkBattleSender.cs d0f2db29f75fd594abf47bb4c784754b27f128ee079dd962be42a0732d8f6ac8 0 +NetworkBattleSenderDefine.cs NetworkBattleSenderDefine.cs 29361da723e2f26f8717934068dde41b5437109b4df039b396a24967e9a19d6a 0 +NetworkBattleSetupBurialRitePlay.cs NetworkBattleSetupBurialRitePlay.cs 9bf090ee9a93e60cc2768b747144550296348e3bde55cf2fd492c74414adb664 0 +NetworkBattleSetupCardEvent.cs NetworkBattleSetupCardEvent.cs e3dbe93577757850ccd51596efff3df669fa2be43c7db86970fdd2f1aac1fad0 0 +NetworkBattleSetupValidateEvent.cs NetworkBattleSetupValidateEvent.cs 9bf2ecfd29a963530c88f58f6002e73154b80571438629cbf367e7a7a142928e 0 +NetworkConsistency.cs NetworkConsistency.cs 46c2b57e8b0a5bdb71b4a7020d729e528a4f02dca4bd039929df0ce8896d4795 0 +NetworkExecutionInfoCreator.cs NetworkExecutionInfoCreator.cs 89e65032a5504837b829716759802d32359100db4f5390b66a36bddc2f6010c9 0 +NetworkLog.cs NetworkLog.cs a1c5fcdb35a5ce00aceda3fd90062530770d917b9fd797b62a8f28c6eaa85f53 0 +NetworkMatchNextSceneSelector.cs NetworkMatchNextSceneSelector.cs 3f8708e5031523b308897c815e5ee5df12e2aefc43edb503bb94e3fbd763a7a9 0 +NetworkNullLogger.cs NetworkNullLogger.cs 98a335c7182b7bf7f815b16a5a6f5c67625aa7aef9cceeea1edf9669c049a9dc 0 +NetworkOperationCollection.cs NetworkOperationCollection.cs 021cdb1734ce14912b202d51e5da4f1954e89594cca5ca46b465a6b05a6453ba 0 +NetworkOperationCollectionBase.cs NetworkOperationCollectionBase.cs a360f399fb1d35b94e70b3578b446b373c1e465f9e12e05fac075c8643d7a305 0 +NetworkRecoveryBattleData.cs NetworkRecoveryBattleData.cs 78b0408c9459cde1b83a8e2916f4aba7638d4359dd415ef455bcd592b3189907 0 +NetworkReplayBattleMgr.cs NetworkReplayBattleMgr.cs 7d9c0df07f3e2f87c9206cefcff5d4a241241fdd466d335ff9daaf6dd3d1d93b 0 +NetworkReplayBattleReceiver.cs NetworkReplayBattleReceiver.cs 97bb893fe2bd72f8a76a32d7ba4b5f39560f2582746c6f79fc1731fc736ebf0b 0 +NetworkReplayBattleSetupCardEvent.cs NetworkReplayBattleSetupCardEvent.cs c47b22696e40047696a9930048b204c90fe3187b3f97e7be9a6738af21e07cdd 0 +NetworkSkillPreprocessConditionCheck.cs NetworkSkillPreprocessConditionCheck.cs cede49edf0902f168cea487e7f5177267209659cbcaf616ec4bfa51c73aaba63 0 +NetworkSkillRandomEachSameBaseCardIdFilter.cs NetworkSkillRandomEachSameBaseCardIdFilter.cs b9283ebdd92353c49d333762d342d970534463949df1a519a88f3aba41ccee2b 0 +NetworkSkillRandomSelectUntilFilter.cs NetworkSkillRandomSelectUntilFilter.cs 5b4bf744d3f5eee6671d210a56bdf7c1ae64a09b2e9e528acf6749316cbe7c56 0 +NetworkSkillTargetLastTargetFilter.cs NetworkSkillTargetLastTargetFilter.cs 37082ba3a6b88aeb5f07cc27aac568aa1b73c178a8de22691c358bc6cbd4e005 0 +NetworkSkill_attach_skill.cs NetworkSkill_attach_skill.cs eef295e050c324a9011ce40de9efe44e019545184a50fb4c842cd9b698e81fa2 0 +NetworkSkill_attack_by_life.cs NetworkSkill_attack_by_life.cs 3ac56869de89b76edad9345e5cb6ba2dd4f70599840f73227d48134afeb34433 0 +NetworkSkill_attack_count.cs NetworkSkill_attack_count.cs 7b1bd3d504ae5b3a07f3db2951ffdfa99174ed12e9378518ffb0f7f848acde32 0 +NetworkSkill_attract_skill_target.cs NetworkSkill_attract_skill_target.cs 9db684600da5964a43ca36618583db60d628e2a76379c68e482a528b432f3a42 0 +NetworkSkill_banish.cs NetworkSkill_banish.cs 7685e6e63cf48e50a1c4875b44c4041c846fe039ac53219f0c774843d70c7759 0 +NetworkSkill_bp_modifier.cs NetworkSkill_bp_modifier.cs bfdee5d490b1e14ce04ffb3d682bf80711a0f067b36debf4796c85f18837a0a6 0 +NetworkSkill_cant_activate_fanfare.cs NetworkSkill_cant_activate_fanfare.cs f1682edb92d9bf9e5f8fbbeacdf1c8ba3177755be0fe2a12d05aadde67ccb73a 0 +NetworkSkill_cant_attack.cs NetworkSkill_cant_attack.cs e0412aaaf9a4badf7ca16965ca77878eba824aca46181b027c7bb0a3ef5769a4 0 +NetworkSkill_cant_evolution.cs NetworkSkill_cant_evolution.cs 57326c49600183ed389a923533d15264158421b99c8b16974a8e8b01fb849339 0 +NetworkSkill_cant_play.cs NetworkSkill_cant_play.cs d2f7787b17e71ca4890b48230487aec3845d4f616d878d902663553c01a12c23 0 +NetworkSkill_change_affiliation.cs NetworkSkill_change_affiliation.cs 04bad21d9cc1793001fc4697d6539dd60e4d4b20fd0c7b68a5d377b4b1207401 0 +NetworkSkill_change_cemetery.cs NetworkSkill_change_cemetery.cs eac24a8a7863aea01a2b82eef53b1a74bfcccd38597285099cb6dce15bcb7902 0 +NetworkSkill_change_super_skybound_art_count.cs NetworkSkill_change_super_skybound_art_count.cs 03a2fd07b0f83517625ba4545cfa43d33d04573ed83253393450a6b3ae433cca 0 +NetworkSkill_change_union_burst_count.cs NetworkSkill_change_union_burst_count.cs 0ddc36f5eda5f6e7a2a0f5a010f95f17d396d987028024d79b4826f9e6fc2cfc 0 +NetworkSkill_change_white_ritual_stack.cs NetworkSkill_change_white_ritual_stack.cs a66d3ea8b29e7cd57a176cd7f2f71088f7b21ab3067beb794d7760fbd635f3a5 0 +NetworkSkill_chant_count_change.cs NetworkSkill_chant_count_change.cs 2ab65f35b05716b6d7db913bc671e84930cede77692a01bce3e0817d3862097c 0 +NetworkSkill_clear_destroyed_and_discarded_card_list.cs NetworkSkill_clear_destroyed_and_discarded_card_list.cs 21c69c9c632c069b1ae0fdf0254a79b883e65790c201c448d3d5ac449fdd43c1 0 +NetworkSkill_consume_ep_modifier.cs NetworkSkill_consume_ep_modifier.cs 66261c2c144c7077de197f21aa1615b25b81fd1548d01a28e6d318766813435f 0 +NetworkSkill_copy_skill.cs NetworkSkill_copy_skill.cs f4e7d13b59f19f0b7b248099db2d24629202f45abc12e63b414b3906ebbf42ce 0 +NetworkSkill_cost_change.cs NetworkSkill_cost_change.cs 90e547619022b7f670bd82506e2e9d8f909df5fa348b2c833d40c020743e88c3 0 +NetworkSkill_damage.cs NetworkSkill_damage.cs 802609478a691b7163fbe68a6326fb37aa076e57efe43b0db29a22b2a349305a 0 +NetworkSkill_damage_cut.cs NetworkSkill_damage_cut.cs 9e93410d4ef26c5a8c30cc8d37c0f13aa7db1e8de8472f4a2ac98646e3534763 0 +NetworkSkill_damage_modifier.cs NetworkSkill_damage_modifier.cs f9d7d4ef8c9c3acbf03490da3fe6260a149b2e816cb625cc4f36c986091e3cba 0 +NetworkSkill_destroy.cs NetworkSkill_destroy.cs 06b75e93f71f4d1b5ffb1a876d92eb92566bd2c69da00d190df9d2031e52ef2f 0 +NetworkSkill_discard.cs NetworkSkill_discard.cs a3bc1bebe796aabfc9669147426da28916ecfad08333421cad0bb4876936ce0f 0 +NetworkSkill_drain.cs NetworkSkill_drain.cs 30e78f22a63cea51d3ec63b7172b390fe22b1a282bd2b352124f5eb766a126b3 0 +NetworkSkill_evolve.cs NetworkSkill_evolve.cs aad49b25299849ddf8db8b99149167b5ab4d72b784f195a96e9520024c2b1a5b 0 +NetworkSkill_extra_turn.cs NetworkSkill_extra_turn.cs 120ebab828fedecd7453197a9e1987336e1e2ad57af069a02285f2b653842b5b 0 +NetworkSkill_force_avarice.cs NetworkSkill_force_avarice.cs 49b1430c02b92f92a00a04a6993c6fa90074707918cab12db02c7afe131d3988 0 +NetworkSkill_force_berserk.cs NetworkSkill_force_berserk.cs 92a2d734917e9780f8213a73f85817aef067f0091b1c971492edccb26d906849 0 +NetworkSkill_force_skill_target.cs NetworkSkill_force_skill_target.cs 90b933abd7cd9aae39b0efd22b76cfe7245739fdaf9970246b9604f4e6126232 0 +NetworkSkill_force_wrath.cs NetworkSkill_force_wrath.cs 552d9beed60ce47969c5b03e8c426204d9df78a4e5815148ccb7dcfcd2fd3d15 0 +NetworkSkill_fusion_metamorphose.cs NetworkSkill_fusion_metamorphose.cs 352fc69f83ac4d992cd7f675c425067268ae3b99b3ebd60c2cf0db89c1171877 0 +NetworkSkill_generic_value_modifier.cs NetworkSkill_generic_value_modifier.cs ae2362a723bcc8970088fdec73c3bae6848492cdbbeeacb10b51aee8d3abca3b 0 +NetworkSkill_guard.cs NetworkSkill_guard.cs 9c71aa57207fe77ef4b0f31b54b1a572c332c8009ca9512d756870c2fc041d4f 0 +NetworkSkill_heal.cs NetworkSkill_heal.cs afff106dfe153b376ea0430541bf00e4bd8b8b12961ff71eaf7e4e1878f4dda8 0 +NetworkSkill_ignore_guard.cs NetworkSkill_ignore_guard.cs 69243ec712cc7b0a013b4ebd419f31a2eb9fdadaff81926f6fc7ce9a372639d1 0 +NetworkSkill_independent.cs NetworkSkill_independent.cs 5e2a4a791487cfaf94daa08622598e8fdc96c4370a0ecb3e1ebf88b55b00a465 0 +NetworkSkill_indestructible.cs NetworkSkill_indestructible.cs 004cb298100c951da55c6f3d23d897e90e32ea0dbaf722e9adc7da9d36b4c095 0 +NetworkSkill_invoke_skill.cs NetworkSkill_invoke_skill.cs 38f3fe265bbcad278e5b50823e7be2b5298bbd70f0e3ccf87d58dedf4dc0612b 0 +NetworkSkill_killer.cs NetworkSkill_killer.cs 5403bb782ac858c23e0a58ce9a4108239525075088083ed05a515b66d3c0490d 0 +NetworkSkill_lose.cs NetworkSkill_lose.cs 8ca0e958f180c2ca2268219c2f639e90f236449a7b3ff2374fdc8e6df3fdbef7 0 +NetworkSkill_metamorphose.cs NetworkSkill_metamorphose.cs 040c4ee5577fd1ea1e1e844fb594552508e8ccbdfa95bb6e06dea3085cf3c04c 0 +NetworkSkill_not_be_attacked.cs NetworkSkill_not_be_attacked.cs a38e751a66b8d95cacda691e5f00f2d1f8caace78e0480713bcb640af1ada72c 0 +NetworkSkill_play_count_change.cs NetworkSkill_play_count_change.cs 81d540414fde3819fc138861fc5fb70071b07f6a09d94cfcb6e8e22ab9f5d2fc 0 +NetworkSkill_possess_ep_modifier.cs NetworkSkill_possess_ep_modifier.cs c6aa30874fa7d49f8c2bd2eaa0ad7cea466b2d4c8e134ae33d8f0bc7ea6bedd4 0 +NetworkSkill_power_down.cs NetworkSkill_power_down.cs 2c8e43314c35a1ba0df8a0ef0282ce2ad695c31f04ecef7531f2d731848242fa 0 +NetworkSkill_power_modifier.cs NetworkSkill_power_modifier.cs 2d024655b1d69109ff07a8b2a2a2d4e5e756f3d6ec4a85b5ef2ee2ad82f90dcc 0 +NetworkSkill_powerup.cs NetworkSkill_powerup.cs 80ca2b552631913a55dd6881e45cdb1b689b6fb3c53bffac16f844c49de3ceec 0 +NetworkSkill_pp_modifier.cs NetworkSkill_pp_modifier.cs 6d52b52cda57cfa41ddbd3bee8175f0e257b2a1a6e285ef6bfd8bf78056e9938 0 +NetworkSkill_quick.cs NetworkSkill_quick.cs da02a5aaa5e9a09b7a22930a1708341fcd91c7807350cbea511b544f0c205db8 0 +NetworkSkill_random_array.cs NetworkSkill_random_array.cs 7dcbe440f95ff2d2d03fe444e5b0541159965f8e79411046c6114b7bdbe7ed3b 0 +NetworkSkill_reflection.cs NetworkSkill_reflection.cs 860a27eef9a494c614d66cd1b03b4c8e3eef43ec8124c28b97a395a13c6e08b3 0 +NetworkSkill_remove_by_banish.cs NetworkSkill_remove_by_banish.cs 392119cb01a31e331d0a72f7833a99b5d8d75004bc7a376d1d52cd6fca399d91 0 +NetworkSkill_remove_by_destroy.cs NetworkSkill_remove_by_destroy.cs 1bbfa35c4bd64ceb4f1fb118b10847fb73645525828b67c51ede1ba546936bcd 0 +NetworkSkill_repeat_skill.cs NetworkSkill_repeat_skill.cs e9cf75a5e9d6d46bed5096bfa4e567850716dd9f97076d0f21e1796b845f0161 0 +NetworkSkill_return_card.cs NetworkSkill_return_card.cs 62ffc15fb69555e0fc6d5c0ac0365f4afa1171f620b803c22516f602446ad1db 0 +NetworkSkill_rob_skill.cs NetworkSkill_rob_skill.cs 735da050be50bb4852f5bd078570d29916789ce24ab3af68b54797f026f7db14 0 +NetworkSkill_rush.cs NetworkSkill_rush.cs 125f689c411c259522341711b05aeed548f7f955fcdf01d2836b4a21f4ddbdc7 0 +NetworkSkill_select.cs NetworkSkill_select.cs a61f53d362e8f8b983f124d521d9299fb3343c0e8e177dcbebbc3895047f1ecf 0 +NetworkSkill_shield.cs NetworkSkill_shield.cs 54ba7a2516f5aad3fdada7a3b3e3cce2942f939b5b7085f9b4b0a18d008c76d9 0 +NetworkSkill_shortage_deck_win.cs NetworkSkill_shortage_deck_win.cs 1d31d6f66c7f4a7fa6e13a6be74b308a71ac01fc24359c70fced88c1c887a2c2 0 +NetworkSkill_sneak.cs NetworkSkill_sneak.cs b7d7c08f603f59f16e5a47c9033dbde3d44ebab3ea99990deab8a4c8687e3310 0 +NetworkSkill_special_lose.cs NetworkSkill_special_lose.cs 0183c7d280e78506df1a5600a584e34ec614709f9679cc6946f3b1edb97969b4 0 +NetworkSkill_special_win.cs NetworkSkill_special_win.cs 563e541841c9d68af7bf84b706895eb8274591ba8657f275de6751a8a09d7fed 0 +NetworkSkill_stack_white_ritual.cs NetworkSkill_stack_white_ritual.cs 9d30be6b9963fb74dc8e0b29e60b705c98fc4451bac320ce3ba3ffe9d37cd2df 0 +NetworkSkill_summon_card.cs NetworkSkill_summon_card.cs e7aff097db443c197f25e2d9409f4196335ef80f263ceccb96595dbfb6fda64f 0 +NetworkSkill_summon_token.cs NetworkSkill_summon_token.cs d8afedbdd480a73ed2050913d81c5a5b89676fa5347e651d1ba01ccbaf1eb639 0 +NetworkSkill_token_draw.cs NetworkSkill_token_draw.cs cdb78c2b35905f4237bb26b8a910c3b2594e3a68e8174aa2751b3185fc01698b 0 +NetworkSkill_trigger.cs NetworkSkill_trigger.cs 0f5742055fe157236f2bb6d5fd93e09a747b41f846dc4054291c70dd89e60e59 0 +NetworkSkill_unite.cs NetworkSkill_unite.cs cdf3c7aeea2ab4d3326a5d007b107e80d842fa4d594ee571b2b4df3068f91285 0 +NetworkSkill_untouchable.cs NetworkSkill_untouchable.cs cb6f041c9048249efc64f8c1b51e5d49dae48d45d3669e535d1baf0ad54ae1da 0 +NetworkSkill_update_deck.cs NetworkSkill_update_deck.cs 999ac6d41a7d7e9e3c7606b4c821ea674093653f09d0384ca7a882af70742dd4 0 +NetworkStandardBattleMgr.cs NetworkStandardBattleMgr.cs 0992fee723419c4dad06d5428cf59df2289436c24c992f2abf54b268d04d9e7b 0 +NetworkStatus.cs NetworkStatus.cs 4ccd398bea16d02235ce58767ae6d338b86411dd5a8f30a0357fddecf8fad4d7 0 +NetworkTouchControl.cs NetworkTouchControl.cs fa433ec9d3570dc5916fa848f1f43a29da1a123a9dfe732b28ae8693938fc729 0 +NetworkUserInfoData.cs NetworkUserInfoData.cs 677c34802826f819ef211764a4dd33ee22e26b96f70c832cb5eb3925c9de4725 0 +NetworkUtility.cs NetworkUtility.cs 1f23a8c5b4e7c4d07a01f20efa71a198b3bdc72fd898e4a07f8afbd5ec2532ee 0 +NetworkWatchBattleData.cs NetworkWatchBattleData.cs 193aa36e40d3f3a09013a8589871a16f914214286942591eabcb0b97230c717d 0 +NetworkWatchBattleMgr.cs NetworkWatchBattleMgr.cs 9bebf4e2efd881d958b9ff30ef5a058f92843dce25adff104eb3186376216062 0 +NetworkWatchBattleReceiver.cs NetworkWatchBattleReceiver.cs 6a4cf1ad6b8c1f961716442805d37253d9cf7a154294499a93a101244a9412fd 0 +NetworkWatchBattleSetupCardEvent.cs NetworkWatchBattleSetupCardEvent.cs 8b1f497fb4119aba2f7104d82e0814dbf56b31311589d74f6dbfb076a52bd3ec 0 +NewReplayBattleMgr.cs NewReplayBattleMgr.cs d4feb1e6bea904b6e4f67228555b41b20f4b49d0a6117ed6b47071091d043844 0 +NewReplayOperateReceive.cs NewReplayOperateReceive.cs 35eaae0f7fd9bf69a615fc7db2daa66254588243a58470487412f8bbd06219c6 0 +NewReplayOperationCollection.cs NewReplayOperationCollection.cs d0c6dfefb02ec6ec66f202f1bc1bbfd05c63d66ad2038a766a6ce9a545a3bf9c 0 +NguiObjs.cs NguiObjs.cs efcf4f0ef3e881ef8a9a4c760c9b9e990ff5747f3c5450565ac7b08af2c7fe67 0 +NotBeAttackedInfo.cs NotBeAttackedInfo.cs cf27c240017e3c5276d3b065dca43373d346bb29043a203115f9c5f33fe41ed7 0 +NotConsumeEpModifierInfo.cs NotConsumeEpModifierInfo.cs 00aef49ba7e742cd19278a692954a92c8a5e872d0fb41bc54ed831242a86c745 0 +NotMulliganEndToJudgeChecker.cs NotMulliganEndToJudgeChecker.cs 80febf55e54e431a6cf8c3264baa180f1a48d57bbf4d97c020aa23d37dbaa90d 0 +NotTurnEndToLoseChecker.cs NotTurnEndToLoseChecker.cs a8874bbac8694e89090b0b13eb7ddaee90ff8f1d6e873873ac1e492b18a09814 0 +NotTurnStartToLoseChecker.cs NotTurnStartToLoseChecker.cs 346d048a258240b0943432ad93d305d26418debdc57e17c95ed6b2062f8eeecf 0 +NtDataTranslate.cs NtDataTranslate.cs d26fb3c7caec79b93ad840404cb531b266903c9d24958ab9a81d4f49f920e9a6 0 +NtDataTranslateInfo.cs NtDataTranslateInfo.cs 70f2e47dfd6a5e7302c116f2c58898e5518c74062b4295ac9ae07419499dee1d 0 +NtDataTranslateInput.cs NtDataTranslateInput.cs b1c30143f1c44c479520901aca66b3cae8eeb5f59f9796f6c86e5282b503ca17 0 +NtDataTranslateManager.cs NtDataTranslateManager.cs 4063c0681776b01e828e83f159b806804e22d0a4cef942420ad352f5891ebd5d 0 +NullBattleCard.cs NullBattleCard.cs 5cd7b46b3bd1a40c5ada04e175f331f4a885e0805a3ac221eaabe832820e3c1e 0 +NullBattlePlayerFilter.cs NullBattlePlayerFilter.cs 8529798e07d72f054b13bb680445d302992dde2828272066af7e46502104dd5b 0 +NullBattlePlayerVfxCreator.cs NullBattlePlayerVfxCreator.cs 11035dde02733eeb736037e86db605d1803892ca7cc75c9e59a0ca3bcb61b89f 0 +NullClassInfomationUI.cs NullClassInfomationUI.cs e28e080e8ddc10db48da58a81729699ccf05ed8b5977a2d72fdfd43d8697cdd8 0 +NullDetailPanelControl.cs NullDetailPanelControl.cs 23191faed4f557714b777369da21d97219e3f71ab6fad72ef21f2558b78b067b 0 +NullNextSceneSelector.cs NullNextSceneSelector.cs cd2669c1c2e3d84b2fcb31c2c670dc1beaa336ff2b460f52fa3d7e32b81bf00d 0 +NullNotMulliganEndToJudgeChecker.cs NullNotMulliganEndToJudgeChecker.cs 704879e8f79fe7dd0671829d1ab58c0ba4a231d842a709bec0bdf7925773c4dd 0 +NullNotTurnEndToLoseChecker.cs NullNotTurnEndToLoseChecker.cs 3c79113d3f1ffe5512d67c80f3233ce16b08533a5dc612ffe085c841c1cf3e37 0 +NullNotTurnStartToLoseChecker.cs NullNotTurnStartToLoseChecker.cs dc5540e6b383ac4ab52c6023c3f78afd29e3d7e8208a337f84daf070335eda15 0 +NullOperationCollection.cs NullOperationCollection.cs c3886781dcb423b1d045a7aee74fb139aa16fe927ed2ff4fb96a929a22969efb 0 +NullSkillApplyInformation.cs NullSkillApplyInformation.cs 22d0b0e5e341249065c4f256772d66f328da2bd390bbf89fc7a003625483dc0c 0 +NullStatusPanelControl.cs NullStatusPanelControl.cs 78238e8cbf895ca2513e74d23322a2a8fefa728ddf1407a110dbb0f02a53d271 0 +NullTurnPanelControl.cs NullTurnPanelControl.cs 4c65fd3cca218efa16563934404a0054026e915908f4bbbeea4f87d5a197c360 0 +OffenseAddModifier.cs OffenseAddModifier.cs 5f3150bfdb6cc9b4f581ca0d1e82b05d649a6eb86542aa8eaa777961e40f5fc2 0 +OffenseMultiplyModifier.cs OffenseMultiplyModifier.cs bbe0e1023839d6f97ce887615cada33d6c12eb9b1cd1ab09bc4ed3ff06c88317 0 +OffenseSetModifier.cs OffenseSetModifier.cs 2100c8a68ca22b7d74e79d62fbd378b83a9a053332b1f10163dd8fed1b7adda2 0 +OmoteLog.cs OmoteLog.cs ef0f64c5883c69c821a03e1e1c985f2af82dc934ec5f6f598ef34d597893d92e 0 +OmotePlugin.cs OmotePlugin.cs a70f953d064a1511a113f97403a03552e1db4622cf0941a41597efedfc529cd8 0 +OpenURLOnClick.cs OpenURLOnClick.cs d2d823441976fdb025023fb4f5605c95a5d7bde38f1869dd1b31fa0eae8dc389 0 +OperateMgr.cs OperateMgr.cs e850a929de25ffac21dc85de267235a530e4671ad5edf8652cca9c5be8418028 0 +OperateReceive.cs OperateReceive.cs cd94427cdfe2b43ccd2bb815dcf7373e2a3caa3f7dc23901b0abf2c6e312f742 0 +OperateReceiveChecker.cs OperateReceiveChecker.cs 990b8d1af1e29c852c7b3b8edabc5aa10be41f95ac8b9288a125918c1875a6ed 0 +OpponentBattlePlayerFilter.cs OpponentBattlePlayerFilter.cs e0459ce382416e8c30a02e56163a18436370e09749e70baefec9ffd775b839e1 0 +OpponentNotTurnEndToWinChecker.cs OpponentNotTurnEndToWinChecker.cs 002da6bb2303a75d863ad19c5a5bb6380abffcf4f7293f47200220f0fa703917 0 +OpponentNotTurnStartToWinChecker.cs OpponentNotTurnStartToWinChecker.cs 6413b3b356d23a1f3a39eca87e786c70c66b6c8483c058fba5e44756cb5d2905 0 +OpponentRecoveryToDispChecker.cs OpponentRecoveryToDispChecker.cs 6e8de98a40a364b5bc06b7bd0ee1c3a2202a1c7dc730e9afba4215770d096920 0 +PackOpen.cs PackOpen.cs 2ccd3afaff9e8a3365e56b357bf2daf3bab4df292002e0948c0981e31ea39f54 0 +PackOpenDetail.cs PackOpenDetail.cs 59540a83a0f103a8113e416485c1f2fe5495f0ab5d80899da778069a6ac26743 0 +PanelMgr.cs PanelMgr.cs 5b0d5fd19f49134ad0a708e7263f8d68ef636a33a0212776191602c4b9074dae 0 +Payment.cs Payment.cs cdbd5d9a0b888b5abca9fb8ec4a6ecdfcbd3e82bb7940cb7cb70cea96297c79c 0 +PaymentBase.cs PaymentBase.cs eb88ea4f0346458c49273e3291404e7f12668c76c2137ff658877924ddc1e7a6 0 +PaymentImpl.cs PaymentImpl.cs 265aebd2f63fd2e9beb9fa575950dede4db2a55f4c7b76ceec1c44752594c55c 0 +PaymentPC.cs PaymentPC.cs bc3fea7d796fc411f63c8459dcea00428a1e0e2142828ed7b026b44da1a54fc0 0 +PaymentPurchase.cs PaymentPurchase.cs e6ec297b7a424cd8a8b7afe8dd6c8ec317a69e8114a8eea4d30474de2e60cd0d 0 +PaymentSkuInfo.cs PaymentSkuInfo.cs 5150c2682bf354d4769e0c5a5f1abeca3804ded4ae30402419c70474b9567711 0 +PaymentUI.cs PaymentUI.cs 84b2c7e5e297d8f2dfd20ee865e44780217ade7193c13981f1c50d28441e5504 0 +PlayHandCardReflection.cs PlayHandCardReflection.cs 934c893708573d24787ba3ad9b678ea465b749715f68cbda53ca00d427fe70e0 0 +PlayQueueViewBase.cs PlayQueueViewBase.cs c6829c45500f1c4911e8fe41bb66711e61417521de911513042fe09fb55c50cd 0 +PlayerChoiceBraveButtonUI.cs PlayerChoiceBraveButtonUI.cs ea5e5c08389fb3bbda8c97235a7f3cc2ba5d09c291e5879e9186e923217955fd 0 +PlayerClassBattleCard.cs PlayerClassBattleCard.cs 1cab6fed6be2d2bfc08d2f2ce1c2f78fa5710a3d3000972619105da408392ae7 0 +PlayerDrawCardToHandVfx.cs PlayerDrawCardToHandVfx.cs 2fcb442801159327adda940d47a0d7cd9ea5ea77d4072fadaeea40cf6dfc57b0 0 +PlazField.cs PlazField.cs 5b1e5ade9d15cb05c2748944bb1fe44de3cf3a0e665c6b3d68fc0d0d67d853e6 0 +PlazRiotingField.cs PlazRiotingField.cs 47f33cc59e41c02777eba97c51d3d1df341d13ebef42f6f5b5156bfe870ef74b 0 +PpAddModifier.cs PpAddModifier.cs d7c541e03d3a6b6b4427c9156b4139d759ab3a6e8e5b896adf11acf854468735 0 +PracticeFinish.cs PracticeFinish.cs fa520381cabe07d5971ec8471c9fdcc79d5ba582c1d50d67d43c4546b9f2bbf0 0 +PracticeFinishDetail.cs PracticeFinishDetail.cs 47b753253f64bd4d862b462d9c323da76fb2b8f2775fc9bd5a181994a5acc37e 0 +PracticeNextSceneSelector.cs PracticeNextSceneSelector.cs d250b5c94fb8d5a87de906b8c3cf5bc1b7e1ff931b0ea13d08ef67603b60a25b 0 +PracticePuzzleFinishData.cs PracticePuzzleFinishData.cs 35dbad2dafcefc5871c9b36312cb1cb82128bdb66e160c6d6381f6ccd3fb124e 0 +PracticePuzzleNextSceneSelector.cs PracticePuzzleNextSceneSelector.cs 788a2a04042f93566fd580d7238754b5b57c884404196af6e382b83cba26bd70 0 +PracticePuzzleReportEndAgent.cs PracticePuzzleReportEndAgent.cs f7ee7ee538f1f18d6339208a47927c6609dff6b7db37e1b7c119cd547e73042b 0 +PracticePuzzleResultReporter.cs PracticePuzzleResultReporter.cs cdb89dc7bd2573d7ec19cf6c5a944dd28724fd22438f3fd1a0fff33567291913 0 +PracticeReportEndAgent.cs PracticeReportEndAgent.cs 5c8b61cd5040bb95f5742824d695cddab6991439c4cd3c26fadc36f28a8f9fd5 0 +PracticeResultAnimationAgent.cs PracticeResultAnimationAgent.cs 57f7191176a295bc4c17026aa408e589d7fa10643e4f68f3d9fee85233172a1f 0 +PracticeResultAnimationHandler.cs PracticeResultAnimationHandler.cs d600eb03d9b567e1072ad6420c75f36b17548680cb44a42ebf0e34cb573cd0ff 0 +PracticeResultReporter.cs PracticeResultReporter.cs 4fece157f0161a257e32ab2106f6d7db44d4bde0d2fef2b803cd2ca6260a0c22 0 +Prediction.cs Prediction.cs 536228a52cfca4db3c40d419472dc575278a0785a280040a33203c62691c7976 0 +PrefabMgr.cs PrefabMgr.cs 889ee1b9782467f82ef5ce88da54d55213d76bc7a044abff5837c10d562576cb 0 +PriConnField.cs PriConnField.cs c410f6b85dc9d94959caf1879f9d600be46fc880e6f2a3dd6f594c4b1aee5f2b 0 +PuzzleBattleManager.cs PuzzleBattleManager.cs f96e0a25d8e148a6704bf4624095cbf8453f800a73cc96f73bfc15e894536072 0 +PuzzleGenerator.cs PuzzleGenerator.cs fc55ddcf6dcfc9cef6b7d338bbbc1371971987cff7580626ce549bb6c080b307 0 +QuestFinish.cs QuestFinish.cs a64f425ff026f670b995b33c462b81aecb0d956f6c6e4da98e2d4d98b5d41220 0 +QuestFinishDetail.cs QuestFinishDetail.cs 488d190e160ff8dd616403fbf006ded58d40bd7e02a6d77b4df443283dfb11cb 0 +QuestNextSceneSelector.cs QuestNextSceneSelector.cs 765b1a0efd54ad7c15b70be5c74eb27e3bb67cb0d3cafb49af2712965af1ae47 0 +QuestReportEndAgent.cs QuestReportEndAgent.cs 41f821b8c5c7baecec8705288b01e4b59bdf99323f6470f587c19f22e02d4d40 0 +QuestResultReporter.cs QuestResultReporter.cs 51c2880f3a0494628b49f88cd7339efc02485063fc593f7a4d4f0ab0a17f6ada 0 +QuestSpecialBattleResult.cs QuestSpecialBattleResult.cs 44e08cfe0fd128f5e1bafe8a0a819a71225dbe3645bafd7f329f43c56a1acaf1 0 +QuestSpecialResultAnimationAgent.cs QuestSpecialResultAnimationAgent.cs 3a6b2f465e817442a592750da069d4cdcb1be2be8848ad1ad3d61c9465e13653 0 +QuestSpecialResultAnimationHandler.cs QuestSpecialResultAnimationHandler.cs bd38c76846501e9e6848cda0ad495ffa5b813ae84254d265ae5ebb2e9ef1cfe8 0 +QuestStageIdFilter.cs QuestStageIdFilter.cs 870380926e451311aa1c52c98d9c2538a8543b35ef2a77e41fb7ae37f65fef94 0 +RandomValueFilter.cs RandomValueFilter.cs 77593f5542a4bf70d0d5f65441b91503d2fd08ef82b6d7837404e47df9cbeaa7 0 +RankInfo.cs RankInfo.cs 1f79848feee9570d337bdd7a7779a716cbd05141ca901d1ef8667e44ecea672d 0 +RankMatchBattleResult.cs RankMatchBattleResult.cs f6c59a1c10cded1b4465bcb9a4ca3b26eb6de8c60db0b9437210001666cd5703 0 +RankMatchFinish.cs RankMatchFinish.cs 6a07d132875232efa0814504c4eecc9e8be3f58da2db52767818ee0806968ec5 0 +RankMatchFinishDetail.cs RankMatchFinishDetail.cs 35da07b82ae8bf3c651eb02f62d88695edb119592993a0daf50d0be71d150650 0 +RankMatchResultAnimationAgent.cs RankMatchResultAnimationAgent.cs b1811588cb086686785788b3d88efbe5493a3b57c81341ce64c903a34412fc4d 0 +RankMatchResultAnimationHandler.cs RankMatchResultAnimationHandler.cs 66a39d4c42bd87e3d8449e8f9071ddaaf7c94b23a3241e75ddc435df8a574ddb 0 +RankMatchResultReporter.cs RankMatchResultReporter.cs 957e37a3685c4f6377892befa871e60c8471b944dc8f76d80b7b08c7c8521a92 0 +ReadMail.cs ReadMail.cs c4821b3923bf6f8dbe88688c3246db024b4bc7781ac3d2b86c5c309ba2c1eb5f 0 +ReadMailDetail.cs ReadMailDetail.cs 199ca00be327e37b802772e09ace306bf588b5dcd3b9017bd8a580634ccf6882 0 +RealTime.cs RealTime.cs da424360abc0f0569c8da46271c2734ce5f514f802630a86ebf42fcba30fa75b 0 +RealTimeNetworkAgent.cs RealTimeNetworkAgent.cs ac4c8a6f6c8400736edb447aa4c4463cef8d1e6a19f15bcc7990603053cd719a 0 +ReceiveFriendApplyInfo.cs ReceiveFriendApplyInfo.cs ecee225b7bc644459695784dbbc20a97818f9ca7fb62bfa81577c5a2ae1d5de6 0 +ReceiveFriendApplyInfoDetail.cs ReceiveFriendApplyInfoDetail.cs d9f55b1ab75c25a702a930a6a50117ac4302cb6fdad96ca4f70b21a9478f0086 0 +ReceiveIntervalTrigger.cs ReceiveIntervalTrigger.cs 7a5b285c9acf441c4a97e08243228c9a55e3a81657911fe59d775db0956205a7 0 +ReceiveIntervalTriggerStandard.cs ReceiveIntervalTriggerStandard.cs 8dbab0f071139395d87ef98d990721986986c66131cde332ae57a82e4eef1ef8 0 +ReceivePlayActionsReflectionBase.cs ReceivePlayActionsReflectionBase.cs 6ffcef690e2a73d946b9af88612c18a819ff02013333d940ec958144b34e445d 0 +ReceiveReward.cs ReceiveReward.cs 1723b8a0c3ef3d6cba1336177b768855586dd49ac8b29e30f33e1e04a2b4254c 0 +ReceivedReward.cs ReceivedReward.cs 790befcadc8b35b0067eb88a127210a625dbf639ba1b5d5829d5e434569e9c1f 0 +RecoveryNetworkInPlayAction.cs RecoveryNetworkInPlayAction.cs 308fac616d0489cc2291325e597ec257047fc6815a925f7038481f3d070222ca 0 +RecoveryOperateMgr.cs RecoveryOperateMgr.cs 4a107e2bef7889ecffbf500ed3f4b56205c611e84f25a450f0ffa4cf40809504 0 +RecoveryOperateReceive.cs RecoveryOperateReceive.cs 84e33ae28bcd79e5376a0ef448881280e378a595614d3ec7038d360efb861eb9 0 +RecoveryOperationCollection.cs RecoveryOperationCollection.cs 57597229de28acdbd55d40699d95d4c8a4c470f681410a9d75ed6ffe4a45d1a5 0 +RecoveryReplaceReceivedCard.cs RecoveryReplaceReceivedCard.cs f6952b5de11fdb1e0a14c7586a889bc4c4ad06bdf0bbd6b245835646c3583e07 0 +RecoveryToDispChecker.cs RecoveryToDispChecker.cs e5f6b0b7a4ed72ae2fb7466083109da654797f0a53b0d956e7bcebc20de47423 0 +RedShellUnity\RedShell.cs RedShellUnity\RedShell.cs 2cb8e731beeef5be0ae839cf7155ee71b2cf4aa1cc15600035af5afffc8dd850 0 +ReflectionInfo.cs ReflectionInfo.cs 6c52f52fa1003907d7f37ac9cac83be02069791e91f47ce500dc686716c2600f 0 +RegisterActionBase.cs RegisterActionBase.cs 9e101ce8eeaed30cb02f8263d3b43f07bd57c40e868c291ca3dd8e5d6b9652a3 0 +RegisterActionManager.cs RegisterActionManager.cs dafa07d8b8beea14456ada306ffb47898391089361a04a7e56d9c01f6736a978 0 +RegisterAlter.cs RegisterAlter.cs 71f274fa4dc4a7e20aa2a7ec84259f24a8ff204e7d112d190715842c1607aed5 0 +RegisterAttach.cs RegisterAttach.cs a1073c9e0beb3403421f762b56752fc138f2eaf4efe0c9ce525e691f27835b47 0 +RegisterChangeUnionBurstCount.cs RegisterChangeUnionBurstCount.cs 6673cfe121344bb35b32eaf664738c9c05390089b52371b4470f4b6907db8eb0 0 +RegisterChoiceAdd.cs RegisterChoiceAdd.cs ebd7a55f46204db08be667eb3eb5716a88ea723e0515a63c5a9678513d584f81 0 +RegisterCopyToken.cs RegisterCopyToken.cs 0d18db819ca168a8f1c89bf4cdbe6472221510cf7029db1279c9b2c62352b43a 0 +RegisterCostChangeCard.cs RegisterCostChangeCard.cs 5a073f72104b3e1ddf9c636f25ac85f8ccab6c0fa3bcd46a3ce3fb75a67adb7c 0 +RegisterDeckOut.cs RegisterDeckOut.cs aacec98ddf2a97fec3c06f6fee3309251d17b3a3ef30ef7af5777241f110d7ef 0 +RegisterEnhanceTrigger.cs RegisterEnhanceTrigger.cs 6ae80e2e9274a5961d57e86a01756dfb851edfc38a5df6c7c1ac3b3f4b992a10 0 +RegisterEvolution.cs RegisterEvolution.cs 7913c5d94b10bfcfaea3eb3f3f52d2b505dd15fd6431e00307caa967c026987a 0 +RegisterExtraTurn.cs RegisterExtraTurn.cs 6f0cc3680798f417417f43879efd08fe376a31f24ac4fdb73858f1938cd3ea44 0 +RegisterExtract.cs RegisterExtract.cs 0511c2e0ce3516d627ce4284c46d6c83f5dbe0a0809d8563b51525d8feafaaea 0 +RegisterFilter.cs RegisterFilter.cs a4f323658602948e32a4b9ddef2e3b6a35540e1bd9f273dffa2bd06272b30bbd 0 +RegisterFusion.cs RegisterFusion.cs 9fad0a9cd989a74569aaee6bb29fb03aa8a5fc60c9a843bc2d40c14677f216d1 0 +RegisterLotCardBase.cs RegisterLotCardBase.cs 0eaa82c60bc5c3a4cda5f11e43b2046258be409435659981f9e28076585d4953 0 +RegisterMetamorphoseData.cs RegisterMetamorphoseData.cs d2da9001d5dba0107bb0e96d5cd5802ffdac10141d5346f46692226d325ccb43 0 +RegisterOpenMyCards.cs RegisterOpenMyCards.cs bbc85f37d83266f1bba8da24c4967831013a84688e5e822d1e1314aaca314665 0 +RegisterPlayCountChange.cs RegisterPlayCountChange.cs 20ab593bd14a9b3799520ba7b670a2753f1776a7d673faad7327d833f47b8261 0 +RegisterPlayerParameter.cs RegisterPlayerParameter.cs 7b1862b642c09e9bc47f8ba3897fe7878af52a984f9b5448cbb0f895e746e837 0 +RegisterScan.cs RegisterScan.cs 25cd0ba7c22b1c1bad9c8705346dd26e63d3fa87ec74c0005dae78f69834ad02 0 +RegisterShortageDeckWin.cs RegisterShortageDeckWin.cs 30369d01c40064ffc6eb5e2ddbb674af36f5f68a349438ed6e5eb293e98bf3d2 0 +RegisterSkillConditionCheck.cs RegisterSkillConditionCheck.cs 97e3189933a0a6f6cac86e228aa5629cda4fdd52a830adb2e295d8364d07f3c1 0 +RegisterSpecialWin.cs RegisterSpecialWin.cs 42aaa086b7a6f0b14538fc92347a832b4e432605bea4e3861218cfccc508bc82 0 +RegisterSpellboost.cs RegisterSpellboost.cs ec502aba5a966cd0afa7e40c714efc8feddc3b7251ecba8c7d3e642a83bad6c9 0 +RegisterStateChangeCard.cs RegisterStateChangeCard.cs ba906084130c2dd3b4c97c0d3aff81ec9b34002cbcfc95d7ecfe199b14f3d61a 0 +RegisterTargetBase.cs RegisterTargetBase.cs 8203159714f9b6739c4fe81aa59ad7989ec5e200495253e3f6303ad06a9069ea 0 +RegisterToken.cs RegisterToken.cs db7b950af0ed7b687763ac8b31df8e6ba8cd4a412a81166123a72652373b8e15 0 +RegisterTool.cs RegisterTool.cs 53ece2ae42a89cae85fc0c4a329208df9b3710f1796d12b580bb9f82d581e589 0 +RegisterUnapproved.cs RegisterUnapproved.cs 892dbaa7aa6b42439ba26596ffaf627ccce24a2c0607e288083ea03e6eec8d2c 0 +RegisterValidate.cs RegisterValidate.cs 7e340d1eb14223d5d737c65d671d621e569b07643088ac98fbcdbbf67185a6ae 0 +RepeatSkillEffectVfx.cs RepeatSkillEffectVfx.cs 9fcde080384545146771cefecdb340f7531557302c92935beae2c5ce1e58b2bc 0 +RepeatSkillInfo.cs RepeatSkillInfo.cs 77144681a151c5f93934b0fc16cca2265a30d4d36e955c6fd369b32aefb1bf07 0 +RepeatTimer.cs RepeatTimer.cs 43f45ef4bd6b0b0bc7e2e1a02029631bda78a932b62f71f151864596086c6253 0 +ReplaceReceivedCard.cs ReplaceReceivedCard.cs 99a47b992de88d1d9433c31d10a9bc438a06cf25d618fb36d37c2efe827b62e5 0 +ReplayBattleEnemy.cs ReplayBattleEnemy.cs 0cd9edf444148dcced5f0cad667456456882a921474f174ae287ba14438f51fa 0 +ReplayBattlePlayer.cs ReplayBattlePlayer.cs 09ebef15f39bb79b464433d2f046ef416a556dd2b2b59d4738e97b42cd20bcb6 0 +ReplayDetailInfo.cs ReplayDetailInfo.cs 49705ba9302bd646d306eb153ae870102b6a45cf51bc989d6ce7c65e77b5b816 0 +ReplayExecutionInfoCreator.cs ReplayExecutionInfoCreator.cs be484ac0171d68795e901539d17cd53168072c47e83f095959bb8eb9ac277f85 0 +ReplayInPlayAction.cs ReplayInPlayAction.cs c74e5c7e0a52217aafac9bde87f152c37b91753f83899589bb149f64886af0b9 0 +ReplayMoveTurnButton.cs ReplayMoveTurnButton.cs a4eff325fcfbbdedd9b6c3bbc6416190ee72a13ccf18e33eba417c3937ad8547 0 +ReplayMoveTurnItem.cs ReplayMoveTurnItem.cs 82c04d3244e3b6f46322d969ea080dc6c2ae5e82806125a3585519b961c068d5 0 +ReplayMoveTurnPanel.cs ReplayMoveTurnPanel.cs 4e9ce337088992a503cad1389c20d2ef699e2cc40b5bd35e64289f8ab493a33b 0 +ReplayOperateReceive.cs ReplayOperateReceive.cs 97f022471eebff107b95c1f2465fa3920761ef08601f27d7ad6a5366c16202f5 0 +ReplayOperationCollection.cs ReplayOperationCollection.cs 3a4aa5d5069982ad8e320ed954182f8d12bb4523cba27897539ca53eb25dc5c5 0 +ReplayPlayCardAction.cs ReplayPlayCardAction.cs 5874f79095b88f65b141b50b6363b7e878983fa4dc420980c53270149d59bfc3 0 +ResourceHandler.cs ResourceHandler.cs 4aee3875b0074af62154f817dd7042fe873830923e9b0d9a2099085641441e62 0 +ResultAnimationAgent.cs ResultAnimationAgent.cs b0cd2cae790fa1427c69e96cfcf164f38d4a58aff8fcd60f08d1a9a8273a9c15 0 +Reward.cs Reward.cs b5270d953033a0ecb0874e5721846dc4d797916bfcbd4973c0dea5d359b8ede7 0 +RewardObjectInfo.cs RewardObjectInfo.cs 7f8065f9dd3062ee8c31a3cdbde05ad4ae8880df2992263a316e7bee833211fe 0 +RivayleBackalleyField.cs RivayleBackalleyField.cs 52ff935248c68d70ec31e67d6f214789f9854c11ff175d12621bc0cd7fc4c9b7 0 +RivayleField.cs RivayleField.cs 9b69b1048560d224f4d3ddd17c582720b1b67fb9694ad30263575280166de234 0 +RoomBattleMatching.cs RoomBattleMatching.cs c45c33d2b1a471bd59943a860664bb145130c9b2d048103e7b5dc487acc4970e 0 +RoomBattleMatchingDetail.cs RoomBattleMatchingDetail.cs f3585e9c69dbb3549d7ba0c34b195fa95a92122534cab9d16d0b22a3c871f2af 0 +RoomInviteFriendColum.cs RoomInviteFriendColum.cs 920eaa65fd97dc29468c5c7a0319f482d7b5a4ea37c16d1840896bf85054dc59 0 +RoomInviteReceiveDialog.cs RoomInviteReceiveDialog.cs a199462c44acc0f178ff1d5c537de423dbe7d73b251b90f81dc534bc2e942d7f 0 +RoomMatchFinish.cs RoomMatchFinish.cs 03e6a59f109b8d6ae000bc899a882ee9bb64d4361406c727198dc619a0010209 0 +RoomMatchFinishDetail.cs RoomMatchFinishDetail.cs 3f80cc80214fe7f025c8d2c9378639ed5f81f9b086966fbe27bc6f5f0c74fba5 0 +RoomMatchReportEndAgent.cs RoomMatchReportEndAgent.cs 71940f832ce3ddb524ecb0a2c73b4cce3ff19085dbd083ec90cce48f763e281a 0 +RoomMatchResultAnimationAgent.cs RoomMatchResultAnimationAgent.cs 7abf3ac0a21cecfbcc077fb04e23a4f9018bd93e58a3c5a2526d9fcf8d8035ed 0 +RoomMatchResultAnimationHandler.cs RoomMatchResultAnimationHandler.cs bc5daed457f26684b513af0dec35cf3aa7914b6b1eff94b03b184732f7eb8399 0 +RoomMatchResultReporter.cs RoomMatchResultReporter.cs 49a82269147d91fb7bb0d81a373efa050938f6423bceb252a37f80f0089d588f 0 +RoomTwoPickBeforeBattleInfo.cs RoomTwoPickBeforeBattleInfo.cs bdddd9845f5376a14e363ec5e50e085015696210ba2fffccef9952046c9c4a5d 0 +RoomTwoPickInfo.cs RoomTwoPickInfo.cs f50c6d3d8fedcdef3955c965521fb8475ecd2604f3d68771f8a7a442f282d8f8 0 +RoyalPalaceField.cs RoyalPalaceField.cs 61ca2695cd743a780c38c7e57ef0baf601a7f804606a923740e1fdd8ef7a5001 0 +RoyalPalaceNightField.cs RoyalPalaceNightField.cs e8aafcaf579ea288e944f3a4c4327a544d0a8dc5cbe6e195b01ffe455f1651a0 0 +RushInfo.cs RushInfo.cs f1e143f55de9f46018d4b81e24cce86885019ea8a2777ca90a36573ee95645cd 0 +SBattleLoad.cs SBattleLoad.cs 8338806083822a3cb30f4f98c5906601ff2b9456ad11181468f529e3e3c289df 0 +Se.cs Se.cs 1e701d14d8c51f1522870ada9a2109a8f5e98d27de5ddfeb51f57241589356fb 0 +SearchUserInfo.cs SearchUserInfo.cs 3e851e9e9137c2a6f9309abbef95ca4d9ea1b63b05385fee31ae8fbc7f3c364f 0 +SearchUserInfoDetail.cs SearchUserInfoDetail.cs b4b7513b8ff37ff823127bf5eed72a3fa5faebb0fa95c3d2157c144904cf34f7 0 +SelfBattlePlayerFilter.cs SelfBattlePlayerFilter.cs 1276b12a289d59b36f2a037c1fbd20f7f2894f1f9dff674f3574e4c40b75502f 0 +SendCardDataMaker.cs SendCardDataMaker.cs 074a19f77a59be5859a486c9731f3f6df4e4960ff12245e8e3a9f92c071c30de 0 +SendFriendApplyInfo.cs SendFriendApplyInfo.cs 28a60bd3a4421a8cfe1531ceac2ecd78eec64ebc7de20736892d65cef1836579 0 +SendFriendApplyInfoDetail.cs SendFriendApplyInfoDetail.cs c6efa3a67633162dc822f528e60dd1a9aa6b4a48c0d2fd0d8fcd34b24417c2d2 0 +SendIntervalTrigger.cs SendIntervalTrigger.cs ac92d11f73c9cd58a08b07f2d852028a646ee049df17439d023f05ba627878b5 0 +SendIntervalTriggerStandard.cs SendIntervalTriggerStandard.cs 81a57bf38fc4f6a89b47535a3d0b7498458ac3be9d86214b6121eb2037208ddb 0 +SendKeyActionDataManager.cs SendKeyActionDataManager.cs b74f41da4e4f704e0300026d9af6e27a1374370214a6f77694db5dd01c726fd6 0 +SetDamageInfo.cs SetDamageInfo.cs c19138615d995e320a4877de90d4801127c7cd0db62ce38d794d5a214c9cd694 0 +SetDataTranslateTask.cs SetDataTranslateTask.cs 28b678e72e8cdf528f3ebc4c91bd37de2694fc597fef1731c3bc4ca919f99ddb 0 +SetHealModifierInfo.cs SetHealModifierInfo.cs ec923d2e56eac3a192da637eeef53fe587009fc60d76b27ff3cc7dc259e5d84c 0 +SetShaderGlobalColorBG.cs SetShaderGlobalColorBG.cs 605e1b276a8dc8cc0bdb083470de6fd462e168a827200f932aac8d5b67245934 0 +ShieldInfo.cs ShieldInfo.cs c7ca21d0fd446587d0e2ce1e80b29055ea4ef2f6c154a18eaa279543aba8eb1e 0 +ShopSupplyCardPanel.cs ShopSupplyCardPanel.cs b8f62fbaaccb2d9ab0260c8e9865d919646a10c197c4daeaedcff460ff50d29e 0 +SideLogControl.cs SideLogControl.cs fc18a896a557607eef7a5c103ef0baf6c61ddc52a099b905dc7ea1cd48896108 0 +SimpleCardDetail.cs SimpleCardDetail.cs 9ab323d687845ca53a27651b08d9747140a1f85ecf88d29c00274da105f894c9 0 +SingleBattleMgr.cs SingleBattleMgr.cs 777e5bbb7292df308fa612fed9883b4b10c24451a945e56fd741bf1fe2d9b4ad 0 +SingleExecutionInfoCreator.cs SingleExecutionInfoCreator.cs 1a64285907bf4fb29138cfcabeae99834a6730d2857de0cd82efb3e0ddf52f52 0 +SingleSkill_attach_skill.cs SingleSkill_attach_skill.cs 65e7581c82c4bf84cf738fbd1a605670b87f9623ad7ff561a3fc1c6713c80cb9 0 +SingletonMonoBehaviour.cs SingletonMonoBehaviour.cs a69a9a5d57dbf83f6fa5c875a2788dc78b3367de0f6c81cb903f887b9a67c226 0 +SkillAbilityAccelerateFilter.cs SkillAbilityAccelerateFilter.cs b13d84c14d8d8a6d3d58258b9f6c8525bf17063a7b0bdf48614c4ede1343ff91 0 +SkillAbilityBurialRiteFilter.cs SkillAbilityBurialRiteFilter.cs 003b61178157d70cc51128d79e163dde19631155c2c89f6656b98f28b63f2851 0 +SkillAbilityCantAttackAllFilter.cs SkillAbilityCantAttackAllFilter.cs 6998cc6f15d12ba49b5aea79d4f2e80620c998f23d82685ac7bda2164ca07ed6 0 +SkillAbilityCrystallizeFilter.cs SkillAbilityCrystallizeFilter.cs 71759194a6e8e971463f33932ecad64d986913755db05452cc4420d863a9657a 0 +SkillAbilityDestroyWhiteRitualFilter.cs SkillAbilityDestroyWhiteRitualFilter.cs 540873e176ec10d0f6f6ebab01dd33d12e7a6e76edddfb0334bfbf15d41b7782 0 +SkillAbilityDrainFilter.cs SkillAbilityDrainFilter.cs 57ce62879c799506a49720d4588cf1854056ab4ce8198ce5fb4b63195e3cd03a 0 +SkillAbilityEnhanceFilter.cs SkillAbilityEnhanceFilter.cs edc757221cbb3a68096802fce83434b62c06041c207d458197c4a878ffe97019 0 +SkillAbilityFusionFilter.cs SkillAbilityFusionFilter.cs 1b6f46083d16d2946ee73f27a07ac4d157f9500aa1516599a5ef44ee551d49f7 0 +SkillAbilityGuardFilter.cs SkillAbilityGuardFilter.cs 832b64f0c42796f9b53acee2ce2563e722b5ab3f597506d3cb221189c70cc4ee 0 +SkillAbilityKillerFilter.cs SkillAbilityKillerFilter.cs 9e675870660460bae90b870f05419cd9b2a9ca087950f4eaab6c0b82530fb0bb 0 +SkillAbilityNecromanceFilter.cs SkillAbilityNecromanceFilter.cs 690a3d2c899c21b04c878a0291dc017e9723863c50385665ea5298145a9026bd 0 +SkillAbilityQuickFilter.cs SkillAbilityQuickFilter.cs c471c14d5c9709b046b3cacd0b582fbc400976d27aee102248fa1e29033b6bc5 0 +SkillAbilityReanimateFilter.cs SkillAbilityReanimateFilter.cs f1016db8eb1fbc10ed5b4129370e1499212db5e0c5b7bb74de48d8570392b12a 0 +SkillAbilityRushFilter.cs SkillAbilityRushFilter.cs 0ce921a42ac94c5f10346e1bd38cdb56697c0015105c91d9210f5e5a95eb8221 0 +SkillAbilitySneakFilter.cs SkillAbilitySneakFilter.cs 2f87d8e288b972f2dd5aedbed8dea1efd8c9258609387720e77e1154a529690a 0 +SkillAbilitySpellChargeFilter.cs SkillAbilitySpellChargeFilter.cs 4918ae19eed3074c150226778cedc52061d25018b74180cad83f36dfd349a855 0 +SkillAbilityStackWhiteRitualFilter.cs SkillAbilityStackWhiteRitualFilter.cs 78aa99f4f78e2dc11b148c56f23aaf945a2c912bb1b7ca43fe47cb2609d65dbb 0 +SkillAbilitySuperSkyboundArtFilter.cs SkillAbilitySuperSkyboundArtFilter.cs b0f7c4dfc798f51285231bcf38c15712faf117baca8dfd7bc94ae64b01d41c51 0 +SkillAbilityUnionBurstFilter.cs SkillAbilityUnionBurstFilter.cs d2b9a821dbd6ff0a1840ae3aeada954a4895e84a5ff283e6b77ade298152876e 0 +SkillAbilityWhenAttackFilter.cs SkillAbilityWhenAttackFilter.cs d9209ed4a8ed5e74b7974f7eeb35d9e83cad87dfade7719c680e69194d9881c0 0 +SkillAbilityWhenDestroyFilter.cs SkillAbilityWhenDestroyFilter.cs cbf2373e2d2ef5546a27c86c5515332d245121a2b2786e54b2d8a6e832ad2972 0 +SkillAbilityWhenEvolveFilter.cs SkillAbilityWhenEvolveFilter.cs 70acbd0b265359626800acaf7653ebd4fdf0976c5e0471bdd2c4497f4f496230 0 +SkillAbilityWhenFightFilter.cs SkillAbilityWhenFightFilter.cs f691df6002268cc5ca18279a19d9dc055f2b6b2d21c48912b20914b518f60a6f 0 +SkillAbilityWhenPlayFilter.cs SkillAbilityWhenPlayFilter.cs ce3b01f8f86cfa2e2a9cc12e3e0e4d2cad18a1cf0291366a1b4a663050f55808 0 +SkillAbilityWhenPlayNoSelectAndBurialRiteFilter.cs SkillAbilityWhenPlayNoSelectAndBurialRiteFilter.cs 16d8ead66c9f26477dbe5d855d455c4ce99c8d997940cbc8c584f0a1ed0de869 0 +SkillAbilityWhiteRitualFilter.cs SkillAbilityWhiteRitualFilter.cs 9625126efca319109cc03ec8ab47e7d8eddf5eddef3c498c0a45963b07c4194f 0 +SkillAllCardFilter.cs SkillAllCardFilter.cs 2b6e3d2badb2bff860a2949a99fab0ce0d3303e8a7aacc5022a2dd663ac0350d 0 +SkillAnyConditionFilter.cs SkillAnyConditionFilter.cs 3fc4096e72dbbc726a9cc29c35d862f044fe2e71ced1f29a1828f0865f5cbf11 0 +SkillApplyInformation.cs SkillApplyInformation.cs 26e8eaaf3ae8e7580ff1f4e2f4a483fd31e916434bc3d73b6bf4f0fd7aaaa0eb 0 +SkillAttachingAbilityFilter.cs SkillAttachingAbilityFilter.cs ebee36d1613962e881bd1f6ca31aa3df2ec48f653fbc55d43c0e39af716397a6 0 +SkillAttackIsLarger.cs SkillAttackIsLarger.cs 26be7189429d6fddf88030500fd47e7d73c99e5a12f4872bcece34da94f36c73 0 +SkillAttackedCardFilter.cs SkillAttackedCardFilter.cs 7f88aee3f28a011b8b15a029abdada68b63bdb4388bf73dad50101e85c73179c 0 +SkillAvariceCardFilter.cs SkillAvariceCardFilter.cs 5c35923f668cdeb9b085baab3ea2d716987ccabe92a6ea28ac906ecec989b632 0 +SkillBase.cs SkillBase.cs bad47547ef24dd88e1c9144ff9de058ed614c639b4f2fa8ff32e6c901ae877f4 0 +SkillBaseCopy.cs SkillBaseCopy.cs 8fdedd8c85095d7179de8bba365e25c7603bd7ed126627b9e56a167d90c36636 0 +SkillBaseSummon.cs SkillBaseSummon.cs 0f8e928872f7faa449c2ca044ef344e930b32eae563a02eac46dd784dd238320 0 +SkillBothClanFilter.cs SkillBothClanFilter.cs 619a5e7237fd2fa270ab6623dec1a54a42d4b41ce73feda7013f898647e8ce7d 0 +SkillCalcFifthRoundDown.cs SkillCalcFifthRoundDown.cs 38b134a2884a4ce6e21f0a37c5b6831f9a0d3f9cfcf7a74fd7d8715bf309c5ac 0 +SkillCalcHalfRoundDown.cs SkillCalcHalfRoundDown.cs a2d20209d49771ffc3b05db648ce02ed3c1667edb5755dcce73db3e77d96af4e 0 +SkillCalcHalfRoundUp.cs SkillCalcHalfRoundUp.cs 93d19fc0d58e58418a9a27870b51d68c2e12b8cff3c8e37cf2617aed5f54a6be 0 +SkillCalcMaxFilter.cs SkillCalcMaxFilter.cs c3174c5bdb0d3dc390815dfd052c4439e24269e17ecaacdb3c1d82e2c99914d4 0 +SkillCalcMinFilter.cs SkillCalcMinFilter.cs 2093d5624f8d14547ab8bba56bc1cad1ce6f11ca3076464b0e1ca3391b229a3c 0 +SkillCalcQuarterRoundUp.cs SkillCalcQuarterRoundUp.cs 2e7f1a4f21d56ade23a8da2cb83d18ccc7ec15839999c5dec377b47772136065 0 +SkillCalcSumFilter.cs SkillCalcSumFilter.cs 7021c4bf6f14ddf4dc96a1c3dddabadfe4aa3cbb6d9c46a396478ca5125c4091 0 +SkillCardCountFilter.cs SkillCardCountFilter.cs 051f8cef087213aafd73d68eb30ab8e2537cecae22f67f858ac8b6ff855135f1 0 +SkillCardFilterBase.cs SkillCardFilterBase.cs dd3d02fe4a4a789f9fae0bf38683c64412bec638ab2f8b37f1bb05fab3c96118 0 +SkillCardLimitUpperCountFilter.cs SkillCardLimitUpperCountFilter.cs a93e29158387ac9c2bf136aad4adfd53ff5f8f11c9fe3fa4befb1bd64c913c99 0 +SkillCardTurnDestroyedFilter.cs SkillCardTurnDestroyedFilter.cs 6a0a1393aa3d7a072892860601aa2489cb345d65bb530168ad7ed255b41f3aaa 0 +SkillCemeteryFilter.cs SkillCemeteryFilter.cs 2a9a2534bc08f13237b44757a1a159c13073f36f56476a0e85bacdbe6d49c1d4 0 +SkillChantFieldFilter.cs SkillChantFieldFilter.cs e93382cad397d8f627d617915d3415c1463e56b7a84cfffa818155b77e06a1eb 0 +SkillChoiceSelectFilter.cs SkillChoiceSelectFilter.cs 99dd76f9bd1661a1ded15c1b71d60760aedad45a448e9c0145cd9cd0d44ee4c1 0 +SkillClanFilter.cs SkillClanFilter.cs d8496655bc4515bef819358ca750c0f208f91f8e518e9b2724058d2eac3d2fb9 0 +SkillClassFilter.cs SkillClassFilter.cs 85fe680f42ea892d73ac3553d0ae801559d889f45c763952db547389db536f4f 0 +SkillCollectionBase.cs SkillCollectionBase.cs 3d20acf096e5f879635a17005897b250eff32785e0c0abbca06353fe6c8318d4 0 +SkillCompareFuncCreator.cs SkillCompareFuncCreator.cs 70533207660884a8e261aff4b151f0b1c859fa80ec5699418e507eb0491a928c 0 +SkillConditionAttachingAbility.cs SkillConditionAttachingAbility.cs 71e011113524e7b8ab5fc9c7aaac1fee2404e690b01306efa79f57510e77dd82 0 +SkillConditionAttackerIsOther.cs SkillConditionAttackerIsOther.cs e93f0e1e9fd8e7001d46180e3ceb351b8be037d3385c6c61ca3c37b19e1ae108 0 +SkillConditionAttackerIsSelf.cs SkillConditionAttackerIsSelf.cs 704ea048939619e4e04e2731a6fc1ae0aa26062b1700bf2c66bb6bc6532b35f2 0 +SkillConditionAvarice.cs SkillConditionAvarice.cs aa4b667642beba5cbdbc93afb24e071dedd5325429e40ba45bff59cde118bd7c 0 +SkillConditionAwake.cs SkillConditionAwake.cs b34378fc7e7c5f9406764d48cecdc0f4db2a9539fb83bf8492eaa905e68d8463 0 +SkillConditionBeAttackedIsDestroy.cs SkillConditionBeAttackedIsDestroy.cs d65e32aaa786154cf7bbe664281bd8457c85c8e66ec5dbe793c289c0749e125a 0 +SkillConditionBeAttackedIsOther.cs SkillConditionBeAttackedIsOther.cs 14e1636d4c59f9f566209565aaecf4a6039a7ad7c6c5b1a323edf8e679daee99 0 +SkillConditionBeAttackedIsSelf.cs SkillConditionBeAttackedIsSelf.cs d0126eda459ad7536059f050a6c5ae0cdea9d90b72aee8535f4c2a1f95898515 0 +SkillConditionBurialRite.cs SkillConditionBurialRite.cs 2bd84088d2d195574d05744c9bb68a09a89684f1290f5a4cc52bcaa1346a3f41 0 +SkillConditionCheckerOption.cs SkillConditionCheckerOption.cs 6bb1f2c1abf0be55acda4c52272039d3d88e8af6c916517ae2218741a3b1ca36 0 +SkillConditionDeckSelfSummonedSelf.cs SkillConditionDeckSelfSummonedSelf.cs 32ad523514649d2820a67811c2a20ec6f5d926b14d8bcc2857705e15c04611e1 0 +SkillConditionDisplayOtherUsersMessage.cs SkillConditionDisplayOtherUsersMessage.cs 2d551f92dc7fc06472432cc98ce64b6ddca397d47168e8b9d46afaa8748185e0 0 +SkillConditionEvolvableTurn.cs SkillConditionEvolvableTurn.cs 23cd0c05392d348a90d52e63820a19d8260ff472400bd448d083a1f19e836c9f 0 +SkillConditionHalfLife.cs SkillConditionHalfLife.cs a8fdebf7a60e759664c03a1a540bf11972fb40e978de4a64b7e4642412f03777 0 +SkillConditionHealingCardIsClass.cs SkillConditionHealingCardIsClass.cs 83f13a4f4873139f2c7dd6b6fa7f5ac9f3807f508219c74fbd15c1c76ab8dd64 0 +SkillConditionInHandIsOther.cs SkillConditionInHandIsOther.cs 21c14f4ab18d07d70b556322bc74aaa3447e67214da82a46b279977596cad68c 0 +SkillConditionInHandIsSelf.cs SkillConditionInHandIsSelf.cs b66ceb7c8502f8324763646e6c276312d95a481fc081166b67d5fdbfdc2d40d7 0 +SkillConditionIsInplayCardFilter.cs SkillConditionIsInplayCardFilter.cs 9f9a9f51afd056e74aeb6ab859b5c3b14a24ba2cd150a7f23172042347ce9e91 0 +SkillConditionIsReanimateCardFilter.cs SkillConditionIsReanimateCardFilter.cs caa2909ff09b6f6eb01019401e9980499922731489d6c49c1a925e1cbe28dfe4 0 +SkillConditionMeLanguage.cs SkillConditionMeLanguage.cs 70acfc2c579c9c61f06a4e9482b6ad641eea9ec3f0efc503fa9752b670949ec9 0 +SkillConditionOddEvenOffense.cs SkillConditionOddEvenOffense.cs a1fd5e100fd4749aff17b4dc4592fdddfafb1d0bc9a18c4912cb42f5086f7ae6 0 +SkillConditionOddEvenSpellCharge.cs SkillConditionOddEvenSpellCharge.cs d6ec2d78b39a64c2214c7e823e3b5b9b0ff35595119968c2fee029e443de0085 0 +SkillConditionPP.cs SkillConditionPP.cs 2af89d07848c0d13dd45e0aec5a863b30541465b7cf3f9da695776e0c2de6c8c 0 +SkillConditionPlayCount.cs SkillConditionPlayCount.cs 96f6c32d446a16beda9d302f4f7aac8a2830bd9eec9f3b93a900cb8a0b626dd0 0 +SkillConditionReanimatedSelf.cs SkillConditionReanimatedSelf.cs edd883f67c912033722738b8efe2f9b63e0ae0c02251c2e0a3699aceb8a5f5c3 0 +SkillConditionResonance.cs SkillConditionResonance.cs 946c2149a15043c397f0bc285121108cd3dcfea9c761de4da132afe95dc7ae68 0 +SkillConditionShortageDeckWin.cs SkillConditionShortageDeckWin.cs 66288d3392b233c1d5b421a6e126cd16cccdfaded236a8fa53e42879d47a9259 0 +SkillConditionTrigger.cs SkillConditionTrigger.cs c74394dff692febf5b19adcb1355c7286c72e46d13721c0594fdac3aec68f83d 0 +SkillConditionTurn.cs SkillConditionTurn.cs ca3962c0836af1494969f63f46112ffd63b47ccf8df5c5bbe5abbaaa89c436ec 0 +SkillConditionWrath.cs SkillConditionWrath.cs cd03ac1c3faf43862c54274dd1888c3576fd249f04f0213e7472dd2038ec9cb6 0 +SkillCostNoDuplicationRandomSelectFilter.cs SkillCostNoDuplicationRandomSelectFilter.cs 5ac4f9efe63702cc14afbdff65b90fb88d09390ea0bee38a6957335df8f14169 0 +SkillCreator.cs SkillCreator.cs 6b90cd32dea619058e1cf942bdd288981495f7711a76bff8ccc9e2787e3f6439 0 +SkillEnvironmentalAttachedTurnFilter.cs SkillEnvironmentalAttachedTurnFilter.cs 39baba20fe5acbb45e3add067f5a45debadc8dabf546b437841566a31a310f77 0 +SkillEnvironmentalBpFilter.cs SkillEnvironmentalBpFilter.cs 53b3237b149fa520629fabdaf6035153cadbbd11c708d75ada746d9afa7d3394 0 +SkillEnvironmentalCemeteryCount.cs SkillEnvironmentalCemeteryCount.cs a53c09d22b1258860aba9ddf4b4aab585e52412423282b08fa72c7a78549dc28 0 +SkillEnvironmentalCharaIdFilter.cs SkillEnvironmentalCharaIdFilter.cs d45bd92ed94833ae1ab839c15be7a3bdeab340629ccdfb052f13439f2de8a82f 0 +SkillEnvironmentalDeckBanishCount.cs SkillEnvironmentalDeckBanishCount.cs 6942eee2cae6c9e45b7eb3e07f23487cc14f4d73ffc3eeb2ac5217827c589ac7 0 +SkillEnvironmentalDefaultDamageFilter.cs SkillEnvironmentalDefaultDamageFilter.cs 89e7600ddb8284a14ad95607313c8f6ae8ab595015f7cd934af8e0688c39804f 0 +SkillEnvironmentalEPFilter.cs SkillEnvironmentalEPFilter.cs d6a119dded51968c26deb8501ddd85765f39acf59a3b3e5994444455db801a30 0 +SkillEnvironmentalFirstPlayerTurnFilter.cs SkillEnvironmentalFirstPlayerTurnFilter.cs aa5f27270312e51bb39f8c9de6fa9bc360a7d740048eab37e658394f6e89dba0 0 +SkillEnvironmentalFixedDamageFilter.cs SkillEnvironmentalFixedDamageFilter.cs 3260d38460b08e8c8c2c9bc9c1d93c59d2c6d5f424084cf9210924174180e42d 0 +SkillEnvironmentalGameBuffCount.cs SkillEnvironmentalGameBuffCount.cs 9c3c4fec9403aab5284ab770a45fe61a49691445321d3a489a5dcbafa8d4b04a 0 +SkillEnvironmentalGameConditionFulfilledTurnPlaycount.cs SkillEnvironmentalGameConditionFulfilledTurnPlaycount.cs 398051e0c3a44d5fe82ded534f1bfe07b67de6f812bf196efe950fa31d5003c9 0 +SkillEnvironmentalGameDiscardSkillCount.cs SkillEnvironmentalGameDiscardSkillCount.cs 27f2b1a304a83053d46b888adf581ee1700f59688057a3954e5ee7f2c5391037 0 +SkillEnvironmentalGameFusionCountFilter.cs SkillEnvironmentalGameFusionCountFilter.cs 445ffbf2989f7bb7f0e92983214e57d34fe947a8f36e64523198aa200277af7d 0 +SkillEnvironmentalGameMetamorphoseSkillCount.cs SkillEnvironmentalGameMetamorphoseSkillCount.cs 10a250b2c38a0ef50435a5914acb4bfe9c247d57c81497cc17ef200f32af1e03 0 +SkillEnvironmentalGameNecromanceCount.cs SkillEnvironmentalGameNecromanceCount.cs 5190de7ac29637dbc9a776450641198b868f81a2feae0a6ba65e693cb7fce17f 0 +SkillEnvironmentalGamePlayCountFilter.cs SkillEnvironmentalGamePlayCountFilter.cs fc0304b22d2c5f4c42fcca9ff937a40eaea68b1ef89607a968bcf5e01e19d251 0 +SkillEnvironmentalGameResonanceStartCountFilter.cs SkillEnvironmentalGameResonanceStartCountFilter.cs cefb1004eb97460f1c164f266524e3eac167a626e2d1b29dd611a70ca99fb3f1 0 +SkillEnvironmentalGameReturnSkillCount.cs SkillEnvironmentalGameReturnSkillCount.cs cda4cacd09c06132ed39f4656c5b72eaa09bd0f5716c2677edd5297ce5f6dd46 0 +SkillEnvironmentalGameSuperSkyboundArtCount.cs SkillEnvironmentalGameSuperSkyboundArtCount.cs dd3d8d58944dc2064b524ac5364bf66d9d1e61d95fc0dbe31f47706a647a138e 0 +SkillEnvironmentalGameUsedEpCount.cs SkillEnvironmentalGameUsedEpCount.cs a2ad6e5403f3a87455609007e4235de1849e6b7c02e50625e682bd3b24a75a95 0 +SkillEnvironmentalGameUsedPpCount.cs SkillEnvironmentalGameUsedPpCount.cs 76b7ebdd3d831d6ea58f2913eaa33c197e2168f52a0cdb5d707853e711304da7 0 +SkillEnvironmentalGameUsedWhiteRitualCountFilter.cs SkillEnvironmentalGameUsedWhiteRitualCountFilter.cs b1c4598e13bfcfea5db643e7ff08866457722d5ea39fbb96d085617154047143 0 +SkillEnvironmentalJatelantBanishCountFilter.cs SkillEnvironmentalJatelantBanishCountFilter.cs cdbac439e0933ed0225e16490a3280e3449b073af8badcc5f09caba141687892 0 +SkillEnvironmentalJatelantDamageAndHealCountFilter.cs SkillEnvironmentalJatelantDamageAndHealCountFilter.cs e94a35be6fd99951703afb0c4fa8d50bd96cf8ebab8f67a6f573a33d3992ce54 0 +SkillEnvironmentalJatelantSummonTokenCountFilter.cs SkillEnvironmentalJatelantSummonTokenCountFilter.cs 0d9f88a9a5d992d04ea4fa4538ea33756232709e076acb0af50546a44fea2815 0 +SkillEnvironmentalLastInplayWhiteRitualStackFilter.cs SkillEnvironmentalLastInplayWhiteRitualStackFilter.cs 73283288e2ea756cb92e681fe67ddbc93a07d07cf7b0b1a4faa0d5a46c7b3504 0 +SkillEnvironmentalLastNecromanceCount.cs SkillEnvironmentalLastNecromanceCount.cs 7710b643cb5f9c2b47b1e254c81c4bb59fb7df75f226bd729991e91414c75b6b 0 +SkillEnvironmentalLastUsedWhiteRitualStackCountFilter.cs SkillEnvironmentalLastUsedWhiteRitualStackCountFilter.cs 0609ae3f0a39671aafba6842309f3ce5966cfe10b19ec9754151d5c01e167a98 0 +SkillEnvironmentalMaxEPFilter.cs SkillEnvironmentalMaxEPFilter.cs 9f67af166d697233bec1b81d95191a9e7fae4ec52112043ef3175858ed86b1b0 0 +SkillEnvironmentalMaxPPFilter.cs SkillEnvironmentalMaxPPFilter.cs d38ea57baad93702261efb4e0b828c920555eebda4062fd9b98e0fc7090c4eba 0 +SkillEnvironmentalPPFilter.cs SkillEnvironmentalPPFilter.cs 3d0be3d6809f4677a0ee7ce723179f35367ef9912d5bbc01ee36d8f352812e1b 0 +SkillEnvironmentalPlayCount.cs SkillEnvironmentalPlayCount.cs 2457f95ff90fbb994219cf365704f43267cb809afce75cdbab86d413f52dd77a 0 +SkillEnvironmentalRallyCount.cs SkillEnvironmentalRallyCount.cs 8b00991eafeb4b95f2b94d666e2449a177d40270683eb050715a0621b1ce1c46 0 +SkillEnvironmentalSecondPlayerTurnFilter.cs SkillEnvironmentalSecondPlayerTurnFilter.cs 4acb5aefc770909fc139b90b234d2ea575bd99ff58715835362d427fbd36f384 0 +SkillEnvironmentalShortageDeckLose.cs SkillEnvironmentalShortageDeckLose.cs a20607c176536e78eecbc50474a813d194cafbec1858df31282faa7b874837af 0 +SkillEnvironmentalTurnDiscardSkillCount.cs SkillEnvironmentalTurnDiscardSkillCount.cs 67508ebb8935003aa236fcf6490d0ceba9c5d637af91b0d2f1ab7ec30ea0617d 0 +SkillEnvironmentalTurnEnhanceCardCount.cs SkillEnvironmentalTurnEnhanceCardCount.cs 8dfb9c9ea36c05e2d12e3e90d27e1038143e60fa20262c44ee05d04d09fda110 0 +SkillEnvironmentalTurnEvolveCount.cs SkillEnvironmentalTurnEvolveCount.cs 19b72d5ad17ae4bf7a27a1f9eadd24958f1494c70d1a786d1fb68efc96f407a7 0 +SkillEnvironmentalTurnFilter.cs SkillEnvironmentalTurnFilter.cs a20833507347e78d37aa79323199f3d8875e02e07b5060802f47aee8185d5619 0 +SkillEnvironmentalTurnResonanceStartCountFilter.cs SkillEnvironmentalTurnResonanceStartCountFilter.cs f620b57b8a13ad3b0d546d9393d5c7de5408b7a9bea33735088a68a4fdf38000 0 +SkillEnvironmentalTurnReturnSkillCount.cs SkillEnvironmentalTurnReturnSkillCount.cs 944093b36e19deb661554b242c19c1ea30726a4f539f4196188cff68dc2fa2a4 0 +SkillEnvironmentalTurnUsedEpCount.cs SkillEnvironmentalTurnUsedEpCount.cs 63f060bd878c076d6e7f8f38a6e2539a03681bfe58bc2ee4e409212f6dc290ab 0 +SkillEnvironmentalTurnWhenHealingCount.cs SkillEnvironmentalTurnWhenHealingCount.cs fee0e9fc2e5759782be93d932d654d98e3efede2b4897f3e4a4db999355ee174 0 +SkillEnvironmentalUsableEPFilter.cs SkillEnvironmentalUsableEPFilter.cs ba383ecce69442829d20797a9100dabf9fd0559168539e2698ba5fd7d365f410 0 +SkillEvolutionCardFilter.cs SkillEvolutionCardFilter.cs abc82fb7e664ee6680e4dc49562160d0b770723b5f3dbc16397495f8204e3beb 0 +SkillExclutionApplyFilter.cs SkillExclutionApplyFilter.cs 8336af5b9f405d4456b21c5d3d398dabd89fa5d7890122f7952bdcdaa7eb42bf 0 +SkillExclutionNoneFilter.cs SkillExclutionNoneFilter.cs b0c0aceb80ed5df6052d3d99d4cd016d674c7711c67b10ebce36fd8442819c6d 0 +SkillFieldFilter.cs SkillFieldFilter.cs 8e17cd95c501a21f5015f521fbeb59d908217c2678607f5931dd51981461bc1e 0 +SkillFilterCollectionBase.cs SkillFilterCollectionBase.cs 3f89c34a04e4690ab3bbbdd14fd444c1d56787e6c806ac23e6725377e066db43 0 +SkillFilterCreator.cs SkillFilterCreator.cs c632b38c3d58fc93226ba2e2c331af3f193dbbb252073186ae3fd0940acc554b 0 +SkillFilterVariable.cs SkillFilterVariable.cs 8afc7dcc5b2bf19e9030a470c4f1cc02b900fa7300994460f473f82136359202 0 +SkillFusionIngredientCardListFilter.cs SkillFusionIngredientCardListFilter.cs 0235084c101137cf9bac5db21883a65e5d3da81e89d92350a5b21eee7e115f50 0 +SkillGetOffCardListFilter.cs SkillGetOffCardListFilter.cs e355a5bd0bb5ec8de0023380b857cf71eca51f738f5b5353be3d0f967594c317 0 +SkillGetOnCardListFilter.cs SkillGetOnCardListFilter.cs 0b0cebbcbceee16a9becc71e3cc039f9106fa0620c37fec9a71e1ec407f31b68 0 +SkillIdNoDuplicationRandomSelectFilter.cs SkillIdNoDuplicationRandomSelectFilter.cs 3458949c29ee0b64f607ee9e6cac81b3fbcbb2968426fab2f19de1724428edb4 0 +SkillInOrderFromOldestFilter.cs SkillInOrderFromOldestFilter.cs b2c34d2ab08e26db635b517d81fd5763dc3f576479fde5125e21031ecb7b7286 0 +SkillIncludeSelfCardFilter.cs SkillIncludeSelfCardFilter.cs 42aecc1b49a25c77c40aa7d18c7df224e6abc671c1dbcff8bf121d898c9fbb67 0 +SkillIsBuffDetailFilter.cs SkillIsBuffDetailFilter.cs 3e7bdd34966e9a4344f0dbbb63eee4962633aaea9d1fd9d96df93ce9f0604aee 0 +SkillIsFusionInfoOrIsNotSideLogFilter.cs SkillIsFusionInfoOrIsNotSideLogFilter.cs a2f0bf856abd9dc67b052ea5ffe5c2ffa450dcd228f43f83e4b89c9334cf81bb 0 +SkillIsInvokeSideLogorBuffDetailFilter.cs SkillIsInvokeSideLogorBuffDetailFilter.cs 748df1f1d7bb37afd9b009e05b85b5d625003475c706bf5b9283ecfc705b160b 0 +SkillIsOwnerFilter.cs SkillIsOwnerFilter.cs fd74f1e9b68c64ca489b9900f2f1522679e02a96e8b13cae2739fb5a8825e23b 0 +SkillIsWatchFilter.cs SkillIsWatchFilter.cs e2fe74ff425cea1e523de99bad8504335a0e9648ded0891a6f943608c167c817 0 +SkillKeywordInfo.cs SkillKeywordInfo.cs 6f9287194e614f834e34ab8442cd677cc1e8fb5dfbded48ccc2843628b33b53c 0 +SkillLastBurialRiteCardFilter.cs SkillLastBurialRiteCardFilter.cs 3947eea272a4ee44f2f8846dcef992f2f7d22c0321688763fe41b7bb01cf5309 0 +SkillLastFilter.cs SkillLastFilter.cs 8aa0e717f1a7e2cc390896ee5ceef5314e521b4600ef661aba92bac38fbe9bcb 0 +SkillLastTargetTribeFilter.cs SkillLastTargetTribeFilter.cs abb19cd49069e57b87486929bc19e6b574bb5bb2a1a563a530fd5960b11c5258 0 +SkillLeaderSkinIdFilter.cs SkillLeaderSkinIdFilter.cs 669c484423ca9d2a192a9ee2d25e09ae28f29121ba9b062b0aa11af4ef2e4824 0 +SkillLifeIsLarger.cs SkillLifeIsLarger.cs 1e6145afcd075a9f414360c39fda53b33a7dc219d2b9a4e5af3e4eb0778bb29c 0 +SkillLimitUpperCountFromNewestFilter.cs SkillLimitUpperCountFromNewestFilter.cs 34cbf7b2bd9a35bb507c9b6971c0b0303ca59ae1caf95aada075a8a75300ef9b 0 +SkillLimitUpperCountFromOldestFilter.cs SkillLimitUpperCountFromOldestFilter.cs b908d7842d545e23e8a9fb5308456c997ace4447f315bbdb56aba0aef97f1967 0 +SkillLoadTargetFilter.cs SkillLoadTargetFilter.cs 798c62b84f05eae5b1685d107f68930b3033f9e3872caca25fcdce05280085e2 0 +SkillMultiClanFilter.cs SkillMultiClanFilter.cs 327d215ad248cc9e0111ea010170b18354c3858bb0e3e0f0f633048c121f0cc4 0 +SkillNoDuplicationRandomSelectInOrderFilter.cs SkillNoDuplicationRandomSelectInOrderFilter.cs 8d4bb62d34c66a108e9e953e0aff9a5a6d5d18b5ca1fd1c2a8b098d00ad9cdbe 0 +SkillNotChantFieldFilter.cs SkillNotChantFieldFilter.cs 958edf8c2014f86873b37676bec5fa153ca806db5bce37a2b6dfd5439a6cf67b 0 +SkillNullFilter.cs SkillNullFilter.cs ec698204e3b030f2c37cefcce9cc233bdfe132201819e6060aba0e0d80854265 0 +SkillOnlyOneCardFilter.cs SkillOnlyOneCardFilter.cs 322cbcdaea00af76dc8bcdbdb370c713a3effc5255068955e484483f12f4efec 0 +SkillOnlyOneFilter.cs SkillOnlyOneFilter.cs b1033505e0b52ab71833eca60800b71de3361f59a60857b8e71d395ea3a51b7f 0 +SkillOptionValue.cs SkillOptionValue.cs 3cc7356d400b83acf6b5e8b26e752d52a9500607ede2e0ca46144f981b67b08b 0 +SkillOrFilter.cs SkillOrFilter.cs a7ae3aa228e461e2a961fdbc2abd98f7e733638eac38a11675394063002b8e8e 0 +SkillParameter.cs SkillParameter.cs 4f76863bf2f9e3beb45821fc02a8871ac818cc82b7893466a7e5ce45fde7cd53 0 +SkillParameterActivatedRandomArrayFilter.cs SkillParameterActivatedRandomArrayFilter.cs 4cc9ba69b0c7cb56d51669ca5ec48df3123a9b720667e07ec50e654418b1f9e3 0 +SkillParameterAttackCountFilter.cs SkillParameterAttackCountFilter.cs 68aeb7c87d61a4f7bd05230f44392c22fd461fc34c403ea91187627e3dc3d22d 0 +SkillParameterBaseCardIdFilter.cs SkillParameterBaseCardIdFilter.cs 03e1008573711655aedf352c7dbb88b34558b14089328142cb90410bc721576e 0 +SkillParameterBaseCostFilter.cs SkillParameterBaseCostFilter.cs ab4d42f1770a3b6a2a23874877fb0e4c8634df8de5cd2f502a17f1417fbb99e6 0 +SkillParameterBaseLifeFilter.cs SkillParameterBaseLifeFilter.cs a8d9f61ebe8e24f9dd5c59f18fe3f0c19c33075f2b03f2b04e9c1fb52e48c9b5 0 +SkillParameterBaseOffenseFilter.cs SkillParameterBaseOffenseFilter.cs 0eba4ec03bf7fac3c33dfec1c8f18fbf0184ddf1b7dd0af8ae20117325fbb602 0 +SkillParameterBuffCountFilter.cs SkillParameterBuffCountFilter.cs 28dff06c91341b2b42e9b3ed2d137a394534f362c6be9bc061dee86bdd31d343 0 +SkillParameterBuffLifeCountFilter.cs SkillParameterBuffLifeCountFilter.cs 036a01cb7fccd701b392bbd72f9561afd901e166b1c7b0bc6d18b2909fd0b4a8 0 +SkillParameterChangeMaxLifeCountFilter.cs SkillParameterChangeMaxLifeCountFilter.cs 8c87d09a205fc30618da017c04b201bb3f8a36e4281b61418853b33a61136690 0 +SkillParameterChantCountFilter.cs SkillParameterChantCountFilter.cs 1069a224165f738b384bdd9b34242982e5c20213d2214b4e09e965a8613f3b3b 0 +SkillParameterChargeCountFilter.cs SkillParameterChargeCountFilter.cs c7398650b6f708b280a005a19b441a424b99c558f273e07474a0244eee7d523a 0 +SkillParameterCostFilter.cs SkillParameterCostFilter.cs 044214ea8e3120d41f581f1cb533197110a59b215b154a4114744d8c1d8c444b 0 +SkillParameterDestroyFilter.cs SkillParameterDestroyFilter.cs 883df0291bf0ef692ac1ae687b725fa6b213f979f159a5ac0797793d00f56005 0 +SkillParameterDestroyedByAbilityFilter.cs SkillParameterDestroyedByAbilityFilter.cs 3ebb8f146304944ec3446f4b6a47edfb7f0e34287d60375da20c2fa94bc47497 0 +SkillParameterDestroyedByCardIdAndAbilityFilter.cs SkillParameterDestroyedByCardIdAndAbilityFilter.cs e2af6daefb164cf24059429055080c901577f37d2acf655002e7937ebf7b3598 0 +SkillParameterDestroyedByCardIdFilter.cs SkillParameterDestroyedByCardIdFilter.cs faad2046c10a45769b28b62041b8e6976fb3068726e5c732eabf4a56021951c0 0 +SkillParameterDestroyedByFilter.cs SkillParameterDestroyedByFilter.cs fd3f168625ce0791d9660f47f49624e8e481d1c8c95ecc4b927b8c8387605924 0 +SkillParameterDistinctRandomSelectedFilter.cs SkillParameterDistinctRandomSelectedFilter.cs dcc16c75ff49d0b147e7a270d9733b3f122f08c8cc4b0614c35590faf7e1770b 0 +SkillParameterFusionCountFilter.cs SkillParameterFusionCountFilter.cs 121613efbdbce29bc04a55bb2ddbb37cb270b25c0ec9ffb46706c9e40616ade3 0 +SkillParameterHasSkillFilter.cs SkillParameterHasSkillFilter.cs 7f6d6d2931e3241171fb83753ff4465cb4dfbdd5d127f1aa22058531ec305272 0 +SkillParameterHealCountFilter.cs SkillParameterHealCountFilter.cs 2adf008ed8eb6db6093756c6c2421366c5c49f0c5ef0cc0902587edda1076fae 0 +SkillParameterHealValueFilter.cs SkillParameterHealValueFilter.cs e94632d9a1414a45b85a1762c1326dc51515554351617358080c5042f13013a7 0 +SkillParameterIdFilter.cs SkillParameterIdFilter.cs f48526cec8cb1b5d1c5bd72f74d7f6d628e44f0707dba5afec9e89b12ed9f471 0 +SkillParameterIsChaosFilter.cs SkillParameterIsChaosFilter.cs db55e85cb4984e0f733b3f7b52180d429184124d26dbad1a86ee07edf7793fb0 0 +SkillParameterIsTurnFilter.cs SkillParameterIsTurnFilter.cs 763d51998f0f14ce04be1abf212a30a68b04db64e141091c97e17a2426acb707 0 +SkillParameterIsUnlimitedFilter.cs SkillParameterIsUnlimitedFilter.cs 7abe4ed828679f6f38c27fa24e6564b0db34c2efc0dbde4fce31e88e51520c70 0 +SkillParameterLastLifeFilter.cs SkillParameterLastLifeFilter.cs 7b3fab233313b98797bee3fcb22d00393b726723e42261fa6ba320e1c6d50e3c 0 +SkillParameterLifeFilter.cs SkillParameterLifeFilter.cs 567ed093343f855e927fed4a9b6b42df8104a26075c37d9bb6d24a84ce4adcb4 0 +SkillParameterLoadTargetCardId.cs SkillParameterLoadTargetCardId.cs 35bf812b7825445023702d85f3a8cbf825acce44e83db348651dea6b5823e9b8 0 +SkillParameterMaxAttackCountFilter.cs SkillParameterMaxAttackCountFilter.cs 22c8e30c4048e63e9d1f14a6bfa2d761b6749cfe02780a8345fd227db0907b7b 0 +SkillParameterMaxLifeFilter.cs SkillParameterMaxLifeFilter.cs c206c13030fb6407e266564502831239fa9d8ed36348479cb8c30ebc8a192f78 0 +SkillParameterOffenseFilter.cs SkillParameterOffenseFilter.cs d69ef663e0ab4f75da11807f80f2128710ba558e547d45d52cd2302c3ef6fbf4 0 +SkillParameterPreviousTurnAttackedFilter.cs SkillParameterPreviousTurnAttackedFilter.cs 01f026c68474b45723c39132e6d34bab907ce38200c6d97836a537dd966f1d43 0 +SkillParameterRandomArrayFilter.cs SkillParameterRandomArrayFilter.cs 6c2e7b885b754f4dd4ef837916d059fd64421c61d3729ffab05c0afbe06f57e8 0 +SkillParameterRarityFilter.cs SkillParameterRarityFilter.cs 5c74bafe6763a2427fe11e182af0a1e5b7b26a29c5c8cc39a6ba765cafe6ac1b 0 +SkillParameterReturnedByFilter.cs SkillParameterReturnedByFilter.cs e842514149549ea27b7ccb525f8cb19072eb947839c2fdd61147a90f7504611a 0 +SkillParameterSelectAttackCountFilter.cs SkillParameterSelectAttackCountFilter.cs 5228529021abac7a5097bd9765a1335124f2d1d849b8f582bbf16215453ebad0 0 +SkillParameterSelectBaseCardIdFilter.cs SkillParameterSelectBaseCardIdFilter.cs 7eb550c57f3c56c52ae61c6c2f21d25a05e3c397fc9035b971c3d5db334a5b23 0 +SkillParameterSelectBaseCostFilter.cs SkillParameterSelectBaseCostFilter.cs 805f7e9164498429efdab18efe53515a34838347783fc262c22f036dfe5f664b 0 +SkillParameterSelectBaseLifeFilter.cs SkillParameterSelectBaseLifeFilter.cs 30362fb2fbb93822d40f44a45e48370c0d44d0f2ba5aaf4557a829f1e0358e08 0 +SkillParameterSelectBaseOffenseFilter.cs SkillParameterSelectBaseOffenseFilter.cs 2cb5d3f70b3e1c1744f62650210fe6bf1b3ab0cc0b61eb4fb833945aa9f1164e 0 +SkillParameterSelectBuffCountFilter.cs SkillParameterSelectBuffCountFilter.cs c5659ef882b1c01d2c2d7372919f053c9de8a2a24d1e22b4103af84f87b1551e 0 +SkillParameterSelectChangeMaxLifeCountFilter.cs SkillParameterSelectChangeMaxLifeCountFilter.cs c952c16d719e017d23b5797b9e3d05a60f266db09f329ce397ba5acda26c230c 0 +SkillParameterSelectChantCountFilter.cs SkillParameterSelectChantCountFilter.cs af33d4c7180219304ea96624f92b1107763cc4021817a426835fb4e1dc67f882 0 +SkillParameterSelectChargeCountFilter.cs SkillParameterSelectChargeCountFilter.cs ccc6f4b628a34afb3b713180a6c0752170302a6bbe81b46e37818e217ca88466 0 +SkillParameterSelectCostFilter.cs SkillParameterSelectCostFilter.cs 1f744da024a2ab019fe914120e906f2f2d286b02e94134dcc49be48e99ce0efb 0 +SkillParameterSelectDamageCount.cs SkillParameterSelectDamageCount.cs bdc0f7637e749d1d4145027abc09e0204d38301c783b689fdd9593b0a66103d6 0 +SkillParameterSelectEvenChargeCountFilter.cs SkillParameterSelectEvenChargeCountFilter.cs bf0557362e91a6fa122b8c5a4871cd8710528bdc4d893c846ae374d99b031f3f 0 +SkillParameterSelectFixedGenericValueFilter.cs SkillParameterSelectFixedGenericValueFilter.cs a3e34ff6813da358aa71119cf5df6552e1ec0111ed0c8aab9cdb336602e37139 0 +SkillParameterSelectFixedGenericValueInitialFilter.cs SkillParameterSelectFixedGenericValueInitialFilter.cs a8e42faf8760e178bef147c95b873718757da8d0adbc44b3ec6e31cdbe4d2981 0 +SkillParameterSelectGenericValueFilter.cs SkillParameterSelectGenericValueFilter.cs e240a54112450512eb9fb941bf2a1d09e398c2c728e3dadeb74fbf8179566625 0 +SkillParameterSelectIdFilter.cs SkillParameterSelectIdFilter.cs 7f7276e8c699f2dc209892ef0c4d11580d1ec81eafad7dcf617dba2db3922d91 0 +SkillParameterSelectLastCostFilter.cs SkillParameterSelectLastCostFilter.cs b7cecd4466804084249f4e0b69d9d6afdd2d6047e4f4848532783f1bffaccd23 0 +SkillParameterSelectLastLifeFilter.cs SkillParameterSelectLastLifeFilter.cs 630f3b49aa605f20a5f5df5e5de7ff54ff8fe100c54c268aeb8cd525873e472f 0 +SkillParameterSelectLastUsedPpCountFilter.cs SkillParameterSelectLastUsedPpCountFilter.cs 833d6d398ed876e33573f834dc14d73bfd8f07b9b0ff6b33ba824e4f6a3091a8 0 +SkillParameterSelectLifeFilter.cs SkillParameterSelectLifeFilter.cs 890eb7eba88fd109233e6b508397011d57f6f0720d107751fa87b983fb4745cd 0 +SkillParameterSelectMaxAttackCountFilter.cs SkillParameterSelectMaxAttackCountFilter.cs 7025a246fc47958208f6d20a645e0e29fb6fab037157cd643e84a844f708a357 0 +SkillParameterSelectMaxLifeFilter.cs SkillParameterSelectMaxLifeFilter.cs f557e88df340150a289b956f7780dc6e5be63f917045530cc59da61e869816c8 0 +SkillParameterSelectOddChargeCountFilter.cs SkillParameterSelectOddChargeCountFilter.cs 485310e00eb24c9dbe0c8b85abf0dc1d5d541cb0587f845779f10c2446647029 0 +SkillParameterSelectOffenseFilter.cs SkillParameterSelectOffenseFilter.cs 56c9f6201f7f78af7bbfe53328a3b57443106f718f240ec8062e948e6e8fd154 0 +SkillParameterSelectRandomGenericValueFilter.cs SkillParameterSelectRandomGenericValueFilter.cs 79379b0f29db45e43ef535384c327e2fd708556bfa215842bcfd5e86a4568bca 0 +SkillParameterSelectRemainActionCountFilter.cs SkillParameterSelectRemainActionCountFilter.cs 12bace95f350b92835a76be223cae0ec7ecc1483d86f810169876df774edc4c7 0 +SkillParameterSelectRemainActionCountFromSelfFilter.cs SkillParameterSelectRemainActionCountFromSelfFilter.cs 471a3f88007614eb5f59bda83a2dcceb4eb95efd17cf7f457b705d5ac6fdd90f 0 +SkillParameterSelectSkyboundArtCountFilter.cs SkillParameterSelectSkyboundArtCountFilter.cs 6231bae23b784d33424280b1014adbda30edd21839c1c43ac55e37d343af79b2 0 +SkillParameterSelectSuperSkyboundArtCountFilter.cs SkillParameterSelectSuperSkyboundArtCountFilter.cs bcf7da624aefbe5e167993a9ae484e4aa44555977d2c759e78fea8e9869f01a6 0 +SkillParameterSelectUnionBurstCountFilter.cs SkillParameterSelectUnionBurstCountFilter.cs 04db936a13814a1f06dfede18001a71c9f28b4ac18a3f195a1af0bce211303c3 0 +SkillParameterSelectWhiteRitualCountFilter.cs SkillParameterSelectWhiteRitualCountFilter.cs 327bafdd153e370a13c38464a3784b57d225e9ddf07fd02aa5888926b15616cd 0 +SkillParameterSkillActivatedCountFilter.cs SkillParameterSkillActivatedCountFilter.cs 090509336d0a8c02034277a0c2a4ec6e207b834cb467d5313999a1e89895a868 0 +SkillParameterSkillHealValueFilter.cs SkillParameterSkillHealValueFilter.cs 1d8a4c771cca276106bae074ff9baad77cbf1933caf176ca82b7ae1fb36e08d2 0 +SkillParameterSkillIdActivatedCountFilter.cs SkillParameterSkillIdActivatedCountFilter.cs 60f879dea4a53ced3d2437a256a244dae720aedde45376d9cc4279b2b237b6a4 0 +SkillParameterStrictDestroyFilter.cs SkillParameterStrictDestroyFilter.cs 8261403d48421c3d0c8c3f6ec71ab0c8f7a5643ee2abe60715c4bf63113812b1 0 +SkillParameterThisTurnSkillActivatedCountFilter.cs SkillParameterThisTurnSkillActivatedCountFilter.cs d5a8c7c1380aaec8da4f33674f92082140047e829a4c14c398eda8d4d746367f 0 +SkillParameterTurnAcceleratedCardCountFilter.cs SkillParameterTurnAcceleratedCardCountFilter.cs f9a71daadb1bc53993b2a181be74e8767b27eacbf503ab0456970ec25a23f405 0 +SkillParameterTurnAcceleratedCardCountTextFilter.cs SkillParameterTurnAcceleratedCardCountTextFilter.cs 65fda0c7bfe401a47db945b4370c0faf89d9bd536d748c4e4972c9b73467840e 0 +SkillParameterTurnAmountValueFilter.cs SkillParameterTurnAmountValueFilter.cs 5acc85d742e7de3e9d7465252ba4cfbbb8a93ceb9fd91ae24411c5e8eddde918 0 +SkillParameterTurnBuffCountFilter.cs SkillParameterTurnBuffCountFilter.cs e5230e6b7d4df34af984aab7f8554cc1f01eaf89f604c8f5a8513b0881e2a027 0 +SkillParameterTurnCausedDamageFromUnitFilter.cs SkillParameterTurnCausedDamageFromUnitFilter.cs 39cfd0dd59e9a68b219b33716705fd198c7c6f3d4d7a29ff05d9aea85160b6fb 0 +SkillParameterTurnDamageCountFilter.cs SkillParameterTurnDamageCountFilter.cs 6b89fb05212fd5f27c8f5b20b2714932217a283a4affc7499a6d257f75cd3101 0 +SkillParameterTurnDamageCountTextFilter.cs SkillParameterTurnDamageCountTextFilter.cs 96e44f9b0424457884086749e380e394c17888e5b33f3f8ab21f7b6f7ce5d8bd 0 +SkillParameterTurnDamageValueFilter.cs SkillParameterTurnDamageValueFilter.cs 59e01e9f32a84de862a750b1a6ef128c36b7e8dd1880ef98b7ae768b578fe85f 0 +SkillParameterTurnFusionCountFilter.cs SkillParameterTurnFusionCountFilter.cs ecbd1868fb2c7fd20d73ab0390b82471807ecc60c1df0f6129ebd54e52890786 0 +SkillParameterTurnFusionCountTextFilter.cs SkillParameterTurnFusionCountTextFilter.cs ae0db5a5af834c8c4fe0b457f0f5174f9c8f040e1cbf7b38170bf276e15d05c8 0 +SkillParameterTurnHealCountFilter.cs SkillParameterTurnHealCountFilter.cs aa0ecbfa926288c0ee61d71c5f4130d0cf38d8f22a9fff9379c569f19ad233bc 0 +SkillParameterTurnHealCountTextFilter.cs SkillParameterTurnHealCountTextFilter.cs d1f505323c4aad873f23e1c57b2fc948fd128a81d268d74cba0396cb247c9b2b 0 +SkillParameterTurnHealValueFilter.cs SkillParameterTurnHealValueFilter.cs 1dd20697fdf4ea206a88c025b47a637e4aa3c48df999ce26e7096cd410bbda27 0 +SkillParameterTurnPlayOtherCountFilter.cs SkillParameterTurnPlayOtherCountFilter.cs fb90e3cd2ebd9ed034915630e9c7c8be1ee8d32939bcd18703a1291bf1b98371 0 +SkillParameterTurnPpAddCountFilter.cs SkillParameterTurnPpAddCountFilter.cs fcaa5e807afcc9f724dbbde6790611bfac9e8877bd2b08e7b0520182aeac035f 0 +SkillParameterTurnStartLife.cs SkillParameterTurnStartLife.cs 3f598db0b19b38f7d2dcae99a1deb38983c5bf8a844b2d1b74ca41e506d5d7cc 0 +SkillParameterTurnSummonCountFilter.cs SkillParameterTurnSummonCountFilter.cs 3e928e3cbf3bce470076a74d600e4a3f9628369c1109e3ef83288cd18a22a006 0 +SkillPlayCardTypeFilter.cs SkillPlayCardTypeFilter.cs 73d2913ff240f116a43c5f13245086ef74efc3008e9d20e22ba8a984fe76faff 0 +SkillPlayMomentSpellChargeFilter.cs SkillPlayMomentSpellChargeFilter.cs 5cb6a8f5c8b954a6c2a1874e27e36a4c81e92aadef5b8b85156c90a0495309d0 0 +SkillPlayMomentTribeFilter.cs SkillPlayMomentTribeFilter.cs fddaa3bdf4c32168ce0e5145d73b1b0b8a4f4c5dff02644c6b81622d82f4f800 0 +SkillPreprocessAnyCondition.cs SkillPreprocessAnyCondition.cs a33a1835e184e5e17ff808f13b444727315fd0cf99af24179019002727be00c6 0 +SkillPreprocessBase.cs SkillPreprocessBase.cs a91852ca6857a209f0784f092cf3ae86f1daf55f9f70b4fab6e89712811f4497 0 +SkillPreprocessBurialRite.cs SkillPreprocessBurialRite.cs d838b3a33c23102caadeccbb5086cc47d209d5a02d5f19df30af55d187f4b88f 0 +SkillPreprocessConditionCheck.cs SkillPreprocessConditionCheck.cs 6c61323767a0ee32e9afb0a48fffbb5dfbcfa18a8f81dba1665a45d275ea057d 0 +SkillPreprocessDamageAfterStop.cs SkillPreprocessDamageAfterStop.cs a9bae89db4941fc502010fe38d10e0970bbe3a716e48b989a3f709e9153a4475 0 +SkillPreprocessDamageGiveStop.cs SkillPreprocessDamageGiveStop.cs 6ea9900aef6d855d0dce474b90397dc14ed9ad7182c16b54c9baa753ada94d42 0 +SkillPreprocessDestroyTribe.cs SkillPreprocessDestroyTribe.cs 3ddcc280da34f14a95a095d6ebe470c8694d5423b66c700f4f9094d2502f2195 0 +SkillPreprocessDontActivate.cs SkillPreprocessDontActivate.cs ee031394e82630cda07cfed34a6498f542ae98abc3a1ea5ac565172b06b732ea 0 +SkillPreprocessDontSelectStart.cs SkillPreprocessDontSelectStart.cs 989d305bf8319f50642f3eec59e8687185cc3597d618613e62b5a39e4839135e 0 +SkillPreprocessEvolutionEndStop.cs SkillPreprocessEvolutionEndStop.cs 7234230b7eab0ecf51fa4e5ba4a460f751437dbb9232dcf4aae58fbd458e3bd4 0 +SkillPreprocessFixedGenericValue.cs SkillPreprocessFixedGenericValue.cs fce8887a83c599bc665b1c69a233f2fcdf53045917350e19e83d12d85dc795d5 0 +SkillPreprocessInPlayPeriodOfTime.cs SkillPreprocessInPlayPeriodOfTime.cs 2d190cbc723ca9b56cf295d976c7fded0c1a6a8c7eec1a28efdd30be61b3db8d 0 +SkillPreprocessIsActivateSummonCard.cs SkillPreprocessIsActivateSummonCard.cs d4da3540f656dfd45c2825a2446986961681fcde0b113285ddba90a3c2d69e51 0 +SkillPreprocessNecromance.cs SkillPreprocessNecromance.cs d11bcf498871f57f9eda0e2efb9882e9cd4da0ea96ca47e6433e67ea6f391c6d 0 +SkillPreprocessOncePerAction.cs SkillPreprocessOncePerAction.cs 24ae2a450500a11c2cb6bfee853e53afde5a78f664f2efcc1892646198678ad9 0 +SkillPreprocessOpenCard.cs SkillPreprocessOpenCard.cs 022d259b515a1a152b78de0c0fb2af73f01962b61d808926c0c62674ebd98630 0 +SkillPreprocessPeriodBase.cs SkillPreprocessPeriodBase.cs c67f2c92519ed300af22f404619dd025bd6aa204be373980934472d24df2d2fb 0 +SkillPreprocessRandomArrayIndex.cs SkillPreprocessRandomArrayIndex.cs b416cdfa41f083f0edcfe9e42d9eef3c790849aa2e9b3f5310d6cd5ac24f0223 0 +SkillPreprocessRandomCount.cs SkillPreprocessRandomCount.cs 41a16ebb68e7632cd78d3508f5216364632ca28fac6287b33c7abd19a81388ab 0 +SkillPreprocessReferencePrevious.cs SkillPreprocessReferencePrevious.cs d9f48bf59161d3967cbc6f1a46259cefb7cb57edfd91e9cf613c034c36494759 0 +SkillPreprocessReflectionAfterStop.cs SkillPreprocessReflectionAfterStop.cs 706c9d6e1e978efbaf996b422b14bbc914b3bca5b0aa161cb691b049ce4becb6 0 +SkillPreprocessRemoveAfterAction.cs SkillPreprocessRemoveAfterAction.cs 25c1743ccbcbe0c8a54836fcc44a4f4f16ab81b5ab3a0be0df9d7ba1a3561eee 0 +SkillPreprocessRemoveFromInPlayStop.cs SkillPreprocessRemoveFromInPlayStop.cs 7e1ae543a5ddf21802621cc3c5799f1c6cc118b93511db995ebeb4efc9fa179f 0 +SkillPreprocessSelfTurnEndRemove.cs SkillPreprocessSelfTurnEndRemove.cs d0d7efe3c53bf761514e5d6858953a644ef13e3a019f8bc7517aadec65ff60fe 0 +SkillPreprocessSkillActivateCountBySimultaneousBuffingCards.cs SkillPreprocessSkillActivateCountBySimultaneousBuffingCards.cs 3bafeda4792e30e082e4c3cb9d6fbfe5c630a3ba159e5190c1fb89368cbc5f2d 0 +SkillPreprocessSkillActivateCountBySimultaneousDestroyedCardList.cs SkillPreprocessSkillActivateCountBySimultaneousDestroyedCardList.cs 98980519b1e76db111c132424675a4cf74c24d08a3ae983d76c94ec9a3374f37 0 +SkillPreprocessSkillActivateCountBySimultaneousSummonedCard.cs SkillPreprocessSkillActivateCountBySimultaneousSummonedCard.cs 0a2ca7fd55cab7ea59fe3cd50e4f892ad82d8c2e7f4f32df0df516e9a3f74c75 0 +SkillPreprocessSkillAfterStopBase.cs SkillPreprocessSkillAfterStopBase.cs 4fc54de11d70774a8357304be4dd2864265727ffb182fe0a40c026fa0fea1016 0 +SkillPreprocessSkillId.cs SkillPreprocessSkillId.cs 062afa2d37f0821e95de45cac14bd5a91f0e40fbfda859f0e5d93c6aa8c88601 0 +SkillPreprocessSkillStopAndRemoveByWhenSummonOther.cs SkillPreprocessSkillStopAndRemoveByWhenSummonOther.cs f5347984f944cd12528c29ff8c0b25ddcfe4ae6d132770a2f8e11ee345a1c986 0 +SkillPreprocessTimesPerBase.cs SkillPreprocessTimesPerBase.cs da7bbf6c0dd996e23c71d246736494b8b6557b3907bf1887c2f76307f439dd5f 0 +SkillPreprocessTimesPerGame.cs SkillPreprocessTimesPerGame.cs 86495eab0914f6d87c3bbdedfc3d8b2b9a88e4480bda79d66b7ac33c5a8030b9 0 +SkillPreprocessTimesPerTurn.cs SkillPreprocessTimesPerTurn.cs 8295b5dd1d2146653e7d5cf456409fb0d7a3127eaa35b9497a99847f8077a746 0 +SkillPreprocessTurnEndPeriodOfStopTime.cs SkillPreprocessTurnEndPeriodOfStopTime.cs 60f3c9e94ba5b23980a9a98c11ca6b091e11c7b0e259a49adeee3f02f6fa0b17 0 +SkillPreprocessTurnEndRemove.cs SkillPreprocessTurnEndRemove.cs bdee75ed1688cdac7d99d2a46bc098d9f121e529d05eba001a2020084702a15f 0 +SkillPreprocessTurnEndSkillAfterStop.cs SkillPreprocessTurnEndSkillAfterStop.cs 2bc5a968092d60bf8c1bb2fa3d233c891d1bbf43dc3871f6a37699a06c902900 0 +SkillPreprocessTurnEndStop.cs SkillPreprocessTurnEndStop.cs 3c95fc7040be4060ea7f5b28b61e0a65bf82e04b9db9385c0d8fc85661cfe7ca 0 +SkillPreprocessTurnEndStopAndRemove.cs SkillPreprocessTurnEndStopAndRemove.cs 58afb39a582f6d2d9ca7fb879fec61700be7d1876ec9bab3d2f9a7754cfeafdb 0 +SkillPreprocessTurnStartSkill.cs SkillPreprocessTurnStartSkill.cs bce5bbf795a6788229eb5e5649c539f075b8acbe1abd802d92c43795182d9b01 0 +SkillPreprocessTurnStartSkillAfterPeriodOfStopTime.cs SkillPreprocessTurnStartSkillAfterPeriodOfStopTime.cs 1e7f05693608cb0a8755c6ce272decd8cd1e21d0c3b5c7c33e707b1068c36758 0 +SkillPreprocessTurnStartSkillAfterStop.cs SkillPreprocessTurnStartSkillAfterStop.cs 850697230ffd1ac484f091b69c23a72a5e2dee092576a40b60125b27dfedc2ff 0 +SkillPreprocessTurnStartStop.cs SkillPreprocessTurnStartStop.cs 92aa94717765f57b359e79ec445a0c39582427a873241c3acda197aa61da6c11 0 +SkillPreprocessUnitAttackStop.cs SkillPreprocessUnitAttackStop.cs 8d4cf572943e67861ea9b031e149c0712738bdb3ae49a102412ac6da5dfac73b 0 +SkillPreprocessUseEvolutionPoint.cs SkillPreprocessUseEvolutionPoint.cs 3b8717cbb4d193ed60d7c052710277c40a5f0947b178146ba3bc51548a5ad3ab 0 +SkillPreprocessUsePp.cs SkillPreprocessUsePp.cs d60a388ce354d83c87c63036db1dcee5a6adcf73c6d7280910a72ba2f8716466 0 +SkillPreprocessWhenEvolveEndRemove.cs SkillPreprocessWhenEvolveEndRemove.cs fa86b21ca304bec0590cb2f23e1b0c7ef9ab4217edb3789fca6cb89d36475ee5 0 +SkillPreprocessWrappingAndAddingSkillActivatedCount.cs SkillPreprocessWrappingAndAddingSkillActivatedCount.cs 3e8a1e39d96730366029c0d838e69c75e1d6803206ade94b80edccd4a6881058 0 +SkillProcessor.cs SkillProcessor.cs 902564f33d55b95dbe4774ffade51622403936e89d3cf1dffd5febe637ef8de1 0 +SkillRandomEachSameBaseCardIdFilter.cs SkillRandomEachSameBaseCardIdFilter.cs 78e17a97c5306f72cf9f1cf3082a166fd9bdc0237ada718d704dd296c3d61aed 0 +SkillRandomSelectFilter.cs SkillRandomSelectFilter.cs d7ff89f4d0af7b7b5fcded27b234568469ae790bbb18d562eab97e9110cfd671 0 +SkillRandomSelectUntilFilter.cs SkillRandomSelectUntilFilter.cs e64462b034662bfe2f27a7f618b13e88bb07e67aaeb8de8833c8ba65910bba75 0 +SkillResidentPreprocessReturnHandActiveReset.cs SkillResidentPreprocessReturnHandActiveReset.cs 8c209867c7e862e35e8d5bc8030c177cd9319ef8dc9aa37c773d8ebe878b2cc9 0 +SkillSelectAllFilter.cs SkillSelectAllFilter.cs 80fecf2fe8e3ca5eb5f2dffe7a7622e3530205b8e233e0acede47c70ed7619cd 0 +SkillSelectIndexFilter.cs SkillSelectIndexFilter.cs f4f8f93f2061956ff3f868b40c877529a17bd89bb2249c4ecbfb25b69ae9390a 0 +SkillSelectNullFilter.cs SkillSelectNullFilter.cs 4bfa6ae6724cb4a6593b0071794512ac6cd32baf8319dec6ba532b640162b2cc 0 +SkillSelectableCardFilter.cs SkillSelectableCardFilter.cs 7190e02013e260667b80bf6f57f19dcd530a38e3e3dd4dca63ed19223a801b9e 0 +SkillSpellAndFieldFilter.cs SkillSpellAndFieldFilter.cs ce2d69d56a413323f2c76fdf00d8e385da05a8b116908d173e1c0aab1be6b599 0 +SkillSpellFilter.cs SkillSpellFilter.cs cddca871f85eca2ec0e3a0756f03b347d0f14c145cfb5faffdde577e64078dd8 0 +SkillSummonMomentTribeFilter.cs SkillSummonMomentTribeFilter.cs 696f48f4e1adc7fbaf7fc95261d14540f6132403bbd89824e8446607e6458b77 0 +SkillTargetAcceleratedCardfilter.cs SkillTargetAcceleratedCardfilter.cs 76cdc15b00665276544a3555dda14f42e6cb6dc287ed3bcfade823c090765d78 0 +SkillTargetAttackerFilter.cs SkillTargetAttackerFilter.cs 7f4299dbe4e8232e1a48a35c5bcba77d475519bcf9b664fccc539b69bc1e6356 0 +SkillTargetBanishedCardFilter.cs SkillTargetBanishedCardFilter.cs ccafb933ab0efe326d18e10484818cdba1fef59946e5acadba7c15aea6865c87 0 +SkillTargetBanishedLastTargetFilter.cs SkillTargetBanishedLastTargetFilter.cs f85153525969b973498db95232d2a975e4fca23b4dc38b7f15eea6401414c411 0 +SkillTargetBattleStartDeckFilter.cs SkillTargetBattleStartDeckFilter.cs bccd1bdbe921129c355f9a19ffc4586e39d6f28e0a510baac87b073445184e22 0 +SkillTargetBeAttackedFilter.cs SkillTargetBeAttackedFilter.cs 59d2f981518f9fc82d866af015589a5cec8d098758a10a7ac5ba29113517f60d 0 +SkillTargetBeforeTransformCardFilter.cs SkillTargetBeforeTransformCardFilter.cs 42d8f9f14675340edc5241d77f2562824235b9b5988893d17550721e07cd1239 0 +SkillTargetBurialRiteCardFilter.cs SkillTargetBurialRiteCardFilter.cs 78224af2f8903e050cb776c0258d1448fa322c91bd61fba4f76645f8049b2f0b 0 +SkillTargetBurialRiteCardListFilter.cs SkillTargetBurialRiteCardListFilter.cs 978ad18a4672a82b6c73c4798c3cefbc866c90bdf7612002dfa821d59e2c567c 0 +SkillTargetBurialRiteThisTurnCardListFilter.cs SkillTargetBurialRiteThisTurnCardListFilter.cs 6b2fc5837cd065c53a5e72c12b22a4ebd06d3e1ce88b492ff4fe60284508838e 0 +SkillTargetCantAttackAllLastTargetFilter.cs SkillTargetCantAttackAllLastTargetFilter.cs 59cf1760a5ef2d2ab6049066a8213ef583aaf464b1f8ed7e7f8de3a7937a8ec7 0 +SkillTargetCantAttackAllReturnCardFilter.cs SkillTargetCantAttackAllReturnCardFilter.cs c6e60dc06367eb7083a5b861d33f74cf275cb4e87adeff993eb701ff2c0d0280 0 +SkillTargetCemeteryFilter.cs SkillTargetCemeteryFilter.cs b7363ca6ad4b371ec058fa55c9b7b8b61065eafcb9d28f5174e87fcc1ed4419d 0 +SkillTargetChantCountChangeCardsFilter.cs SkillTargetChantCountChangeCardsFilter.cs b6122d6c38064ad4014f01bb2bf652d1fa3d291de320ec19889faebb62a0d8e1 0 +SkillTargetChosenCardsFilter.cs SkillTargetChosenCardsFilter.cs c1ce3e83cd86f6ef3f8e94b71e837b6b1dbf2c89036d4397e4267cd2652191dc 0 +SkillTargetCrystallizedCardfilter.cs SkillTargetCrystallizedCardfilter.cs 12eeb8bbc98e36848358c4ae3da2ebb35b05b9290532f625aedd05479b285baa 0 +SkillTargetDamagedCardFilter.cs SkillTargetDamagedCardFilter.cs 473ecf0c5aa1691f0b970dae447e922ecc37ec1855ef9a2602d0623e3bb7e5c0 0 +SkillTargetDeckBanishedCardListFilter.cs SkillTargetDeckBanishedCardListFilter.cs 24aa9c24ce7c345a59c0da03ff961f13d49f2e6f0004b3fd47772f699fb0a7db 0 +SkillTargetDeckDrawCardFilter.cs SkillTargetDeckDrawCardFilter.cs 784fca3bde3b2b95bb8f21b88c60aa43929fb1bc94b3a585b2ded1d390374d43 0 +SkillTargetDeckFilter.cs SkillTargetDeckFilter.cs 9aa5c5ed118dc4d8071edae5643cbb9f07a8eb813982705b2c0fc356fbba228a 0 +SkillTargetDeckSelfFilter.cs SkillTargetDeckSelfFilter.cs 32004d3d9cf16379ee5ae88562ea7d6ff290d73a0678f5a01b2c48854f8a2cd4 0 +SkillTargetDestroyedCardFilter.cs SkillTargetDestroyedCardFilter.cs e208e52c74daf93e1b6d6a20d2bd1c406acaba0af9fd55b82542297371ca1b6c 0 +SkillTargetDestroyedCardListFilter.cs SkillTargetDestroyedCardListFilter.cs 54558c83262511758b19cbe08094064c920bfb01abb04ae63692038b634fae65 0 +SkillTargetDestroyedLastTargetFilter.cs SkillTargetDestroyedLastTargetFilter.cs 0135abeeecce983f28fb9d530596d493b880d4a5037909a910118c503fb483cd 0 +SkillTargetDestroyedThisTurnCardListFilter.cs SkillTargetDestroyedThisTurnCardListFilter.cs 2fc676957a10af37bfd631debb1ece6159ffcee2f46d5554e7aab4214a67c9e8 0 +SkillTargetDestroyedWhenDestroyCardListFilter.cs SkillTargetDestroyedWhenDestroyCardListFilter.cs dcf005e427827ae79c202aad1e4ae9588305b0bc3079c7fee63519269fedf7e5 0 +SkillTargetDiscardCardListFilter.cs SkillTargetDiscardCardListFilter.cs 3a92cdceac0ddb6de87352f9788c9172f881b1ce814af29b438a26c207c5286e 0 +SkillTargetDiscardFilter.cs SkillTargetDiscardFilter.cs e873324f9fff2facc2c81da18a61b57a46ebb777831d9869956779666eaa4fc3 0 +SkillTargetDiscardThisTurnCardListFilter.cs SkillTargetDiscardThisTurnCardListFilter.cs fd25af698e8c86ed2cca2384c220a0c1ae8705e5a8172b5728ddbf6e134f0508 0 +SkillTargetDiscardedCardFilter.cs SkillTargetDiscardedCardFilter.cs c1f08e41ee959fc1d0d0012d29f3bb138f14754e8b4d3359513de81c367c5f87 0 +SkillTargetDrewOverHandLimitFilter.cs SkillTargetDrewOverHandLimitFilter.cs 92e6c2b5f7cd8e197c5d7c9f83f1b07404617398f8cfe0225fe800ee3ee162fb 0 +SkillTargetDrewSkillFilter.cs SkillTargetDrewSkillFilter.cs f93d59e543ba97e77f0d9c08f1cad38708627acd193135a72cc0b361d52d68a7 0 +SkillTargetEnhanceCardfilter.cs SkillTargetEnhanceCardfilter.cs 4ee1bda330ac852678d7e4cfb96e88ebe4a9a2eea63d38a56fb1607d24771d13 0 +SkillTargetEqualOrLessCostFromLastTarget.cs SkillTargetEqualOrLessCostFromLastTarget.cs 68507fdde0e55e6eedb430071b3b7fbf6cb5d7f7cfc394c73e455c099fc63746 0 +SkillTargetEvolutionCardFilter.cs SkillTargetEvolutionCardFilter.cs 0362696fb1dc788d02517a7086ffdc4019f08703dcf3cc77610d06454c6e77fb 0 +SkillTargetEvolvedCardListFilter.cs SkillTargetEvolvedCardListFilter.cs b15c1303bd63cf992a32991bcb2667d08e8db5527e52f20df0e8954a2ed17b4a 0 +SkillTargetFightTargetFilter.cs SkillTargetFightTargetFilter.cs 9d40905ce3582f24c7edadc6cf96c03791d6a1abc7ba4b933aa24dc9e0ee3a6a 0 +SkillTargetFusionIngredientCardsFilter.cs SkillTargetFusionIngredientCardsFilter.cs c3131b03dab016f0a0e2406951bc22ae7dfe9dee0f0b2f36a2073f2d82c4784a 0 +SkillTargetFusionIngredientedCardListIncludeThisFusion.cs SkillTargetFusionIngredientedCardListIncludeThisFusion.cs e7768bd31e3389235916940ad575f0063929a364186126539ac8fa660ae7c447 0 +SkillTargetFusionIngredientedThisTurnCardList.cs SkillTargetFusionIngredientedThisTurnCardList.cs ec6aad9a4eb1ea2589e01e965b5bd8d4290252f49b548c747398680ff529691b 0 +SkillTargetFusionThisTurnCardList.cs SkillTargetFusionThisTurnCardList.cs 42adf7ccd869c86d3b4dc3f09c1f707baa793c36a5e2c09fe978e82987137067 0 +SkillTargetGameAcceleratedCardsFilter.cs SkillTargetGameAcceleratedCardsFilter.cs 23d2bbcb35bae2dc94fb597f6fa17a7329b83744c644ef246b20a635b6eff3f8 0 +SkillTargetGameAcceleratedCardsOtherSelfFilter.cs SkillTargetGameAcceleratedCardsOtherSelfFilter.cs eeb28730c3db5e3636fb81665d16e3eb2616b9b67f2e8f63d598b49ec95fe31a 0 +SkillTargetGameAddUpdateDeckCardsFilter.cs SkillTargetGameAddUpdateDeckCardsFilter.cs a4cc93baf0964019292c63fd955f53edadc77f9eb0d2104bd30202e942a0b5f9 0 +SkillTargetGameCrystallizedCardsFilter.cs SkillTargetGameCrystallizedCardsFilter.cs 20a3440a1863a77890c24c316768493ce628d807b7d34589aa9f06b20bdb2e40 0 +SkillTargetGameDeckDrawCardsFilter.cs SkillTargetGameDeckDrawCardsFilter.cs f8d50666a8859c8f167b2808f968d2be2bf8a54f71c347c0dff7f87140ff51cb 0 +SkillTargetGameDrawCardsFilter.cs SkillTargetGameDrawCardsFilter.cs 1ffdf32799da30cf12c0b385bbb7029cc6a9753a091390b52b57a122faffd464 0 +SkillTargetGameFusionIngredientedAndDiscardCards.cs SkillTargetGameFusionIngredientedAndDiscardCards.cs 144383ffd09897e853d46faac9f1f9afaa980ca1abe71314ce270610587f2b73 0 +SkillTargetGameFusionIngredientedCards.cs SkillTargetGameFusionIngredientedCards.cs 3cf5025255f0668a42afef82852da9821ac00449a3777bbd9714027f4098fd76 0 +SkillTargetGameLeftCardsFilter.cs SkillTargetGameLeftCardsFilter.cs 04ef8cedc5858e40443a9dbcf4cf71378082e724dbc8b1f8f1a9e2fe07a475be 0 +SkillTargetGamePlayCardsFilter.cs SkillTargetGamePlayCardsFilter.cs 29fff9a500552d9b4921c42de6d436e99e8d62afc32619b00348b28809b8dc12 0 +SkillTargetGamePlayCardsOtherSelfFilter.cs SkillTargetGamePlayCardsOtherSelfFilter.cs d15c6d3a5f9764616cc8e84b5a154007af5c9a95841c685175af2aa66f4c4cc1 0 +SkillTargetGameQuickAttackCardsFilter.cs SkillTargetGameQuickAttackCardsFilter.cs c09700dfcee9e154c89d0fcdc978650618463f21e93c3c0598bda5860289b974 0 +SkillTargetGameSkillActivatedFilter.cs SkillTargetGameSkillActivatedFilter.cs 686feaf45a98a5c819cba1aa2c76d86551d2daaa4f87b8902a5a7b087bfcca62 0 +SkillTargetGameSummonCardsFilter.cs SkillTargetGameSummonCardsFilter.cs 40fdea19cc7bb0304994f584c85ec76c1fbf06b21596d60901ac39bbe6836ee3 0 +SkillTargetGameSummonCardsOtherFilter.cs SkillTargetGameSummonCardsOtherFilter.cs 5cca7f820b8f2c2bba7a5c6162ccd4862c5960b537772f0e789fc1ea13b22668 0 +SkillTargetGiveDamageCardFilter.cs SkillTargetGiveDamageCardFilter.cs acf92af14adf205b06ece2f8779ac4961b61d96602bedb352eb906d8f4971fe5 0 +SkillTargetHandBanishedCardFilter.cs SkillTargetHandBanishedCardFilter.cs 39d18c23cfb9514d1bd668ecb2505d91af0b344128550d11a5af29d4717a7d12 0 +SkillTargetHandBanishedCardListFilter.cs SkillTargetHandBanishedCardListFilter.cs 58a9484affddccc52b765f9242c1d219318d43a291f552db8bc0082a30490a11 0 +SkillTargetHandBanishedThisTurnCardListFilter.cs SkillTargetHandBanishedThisTurnCardListFilter.cs b4832d5d8369871e2436bb300c9515af4f001bbaf4c0398490fd97371585fd0e 0 +SkillTargetHandFilter.cs SkillTargetHandFilter.cs 8ea8afa3c3c807bb4917723540d4d487c1fb13d93c4870c8b82b960362691d83 0 +SkillTargetHandOtherOldestFilter.cs SkillTargetHandOtherOldestFilter.cs a5cc797f744572ad95219c367fa74b2168843cf830e88c25902ae1a329b6242d 0 +SkillTargetHandOtherSelfFilter.cs SkillTargetHandOtherSelfFilter.cs e6d3ddd82ab515569ab9170769eb2f3fc3f5ea8a2e50c7fb8d6793273e087929 0 +SkillTargetHandSelfFilter.cs SkillTargetHandSelfFilter.cs 22cade9748f6d046eac6b933ee22d58b62c7d5ecbb6b8d0b70324379f81a7c8a 0 +SkillTargetHealingCardFilter.cs SkillTargetHealingCardFilter.cs 7b71765a65c4ae2070752f0e538a781eeec440702d57a7471681bdc662f0d5af 0 +SkillTargetInHandCardFilter.cs SkillTargetInHandCardFilter.cs 90f715bbe76f9f4c5156f135e4dd7b4054578d17e35fdd239c68316a2397b284 0 +SkillTargetInPlayFilter.cs SkillTargetInPlayFilter.cs 9b5217adb53ad3ca0bf31ee40ac1c1309cb16cff9f20e6f4b1b280a7f5d4693e 0 +SkillTargetInPlayOtherSelfFilter.cs SkillTargetInPlayOtherSelfFilter.cs 2d700d8e36402098ec0f0c3402c8d4af0f209482f19c2c6dd388c8e462380b0a 0 +SkillTargetInPlaySelfFilter.cs SkillTargetInPlaySelfFilter.cs 126ba8e376f98fd22d9ff3208745dd8397b540aa2942fc9b01f7a605fe9e9146 0 +SkillTargetInplayAndHandFilter.cs SkillTargetInplayAndHandFilter.cs d07f316375c7a5ce55743ad3d051af2157e7b4d222c635761c365b4763128948 0 +SkillTargetInplayBanishedCardFilter.cs SkillTargetInplayBanishedCardFilter.cs 27e4f2604f91a1f1e14f8747bb9d8219a0ca0a751226094f28da9fdcca10c2ad 0 +SkillTargetInplayBanishedCardListFilter.cs SkillTargetInplayBanishedCardListFilter.cs 64f22911ec75d097906413b76515f58c5f433556dcd6d03e2c9ebbb31d6b53b6 0 +SkillTargetInplayBanishedThisTurnCardListFilter.cs SkillTargetInplayBanishedThisTurnCardListFilter.cs cf5562a8a01f8522a6282a1ddba9268a983bc2d06d3b0b68c0333d9c886af040 0 +SkillTargetInplayBuffingCardsFilter.cs SkillTargetInplayBuffingCardsFilter.cs 19fb404f0e0873b5a157f8dba49824d66e194697cc556c2211e8b249aa84f671 0 +SkillTargetInplayDebuffingCardsFilter.cs SkillTargetInplayDebuffingCardsFilter.cs dd6f0242db2054cb6e0b3b403a4f59a13691bc304582c691d67b12b13da7e0ff 0 +SkillTargetInplayLastTargetFilter.cs SkillTargetInplayLastTargetFilter.cs b3182eb0c17f025939e21560c563d4f99e58dbd9c9aa5423461e7044ccc4b1ac 0 +SkillTargetInplayMetamorphosedCardsFilter.cs SkillTargetInplayMetamorphosedCardsFilter.cs dd6455716f5971e93d13d12e203ab1cbc117c01a558c9646dddb946b45498f3e 0 +SkillTargetInplaySelfAndClassFilter.cs SkillTargetInplaySelfAndClassFilter.cs 1c5d88e217df3b86cccf3f99eb25844d63f3f7d57dc187b4ce169c12097b272d 0 +SkillTargetLastTargetFilter.cs SkillTargetLastTargetFilter.cs 3b3bca46dc7b2e6eba53aaa6dcdcf4930187c89bcbc6d636f0efea8c9fc3e708 0 +SkillTargetLeftCardsFilter.cs SkillTargetLeftCardsFilter.cs eba901b7df4d22e39f4f30cac134b02cd8c2607d206535757758b42b0b7fbea6 0 +SkillTargetLeftThisTurnCardListFilter.cs SkillTargetLeftThisTurnCardListFilter.cs 68de8b9a86d2eefadf3dff07f33f25f4e7fc9606f666607014171983a2fee753 0 +SkillTargetLoadBurialRiteTargetFilter.cs SkillTargetLoadBurialRiteTargetFilter.cs e840f87b0aab2fc9cd1e62e08e98b846f07c3cb53df9c13aa0e84cf74dc0b4de 0 +SkillTargetLoadTargetFilter.cs SkillTargetLoadTargetFilter.cs 224dec42e3dbf059d6294a083865b53fd6b0f1ff180b159e82793e9d8bc3c678 0 +SkillTargetMainPlaceFilter.cs SkillTargetMainPlaceFilter.cs e48c2d7f25bf44cb39f28e3ecf13432f2cebc34c8f9fbd26f1a8db739b98d6d5 0 +SkillTargetNecromanceFilter.cs SkillTargetNecromanceFilter.cs 8d2ed11933657b98d7f1d87ab3fdb41e0727cb2ed1d1df74c54925ffe08ac0f6 0 +SkillTargetNewerInPlayOtherSelfFilter.cs SkillTargetNewerInPlayOtherSelfFilter.cs 50ca30cdf9d309a7e1f00d5181b037cffae4b42cf3287906ef4aee2fdd666d54 0 +SkillTargetNotDamagedCardFilter.cs SkillTargetNotDamagedCardFilter.cs 665adccbb7ae390e33fcbf02bd402c4a87ca9a2009a7ea4d1525368519ffecb3 0 +SkillTargetNotUniqueBaseCardIdFilter.cs SkillTargetNotUniqueBaseCardIdFilter.cs ceb29653a81b2240592754655f7e1459f9190482bf17bf670f9a89830dea8700 0 +SkillTargetNullFilter.cs SkillTargetNullFilter.cs 5240046e6a1e9abf7ff50721c3ba8f4c7411d92efc44983cfb8a110340fd4f4f 0 +SkillTargetOtherThanBeAttackedFilter.cs SkillTargetOtherThanBeAttackedFilter.cs fcbbfc18823b39c97523318cba45c1cb79f75c7f5050015426672d3c392de7a3 0 +SkillTargetOverCostFromLastTargetFilter.cs SkillTargetOverCostFromLastTargetFilter.cs 7add88836beb613998a7d61227f3b77d58959e6b436efcd619bd47c616c43b9e 0 +SkillTargetPastSummonCardsFilter.cs SkillTargetPastSummonCardsFilter.cs c8aa3c1cb5fc81e1b671201350dcbfd360a3d893933d544e721b9cc32142583f 0 +SkillTargetPlayedCardFilter.cs SkillTargetPlayedCardFilter.cs d6c62b248a1ca5ed19456306788b7171a634fb0f00bcbcc0bb1721bc3f852cc8 0 +SkillTargetReanimatedCardFilter.cs SkillTargetReanimatedCardFilter.cs b3ce0fcc743bc8230c0d4dc9fdbb00ae87be8cf4bde71560b8ee1878148bcd4e 0 +SkillTargetReanimatedThisTurnCardListFilter.cs SkillTargetReanimatedThisTurnCardListFilter.cs 580b5b53d99993043b8b84f5e68d359d0e86eae574e1f4673fd03093cf3df100 0 +SkillTargetReceivedDamageCardFilter.cs SkillTargetReceivedDamageCardFilter.cs 83cafce544d9b1cd871bddddd46e060109437a4efac1bad96874eaadc95bd9b7 0 +SkillTargetReturnCardFilter.cs SkillTargetReturnCardFilter.cs d1698be7fae1bd7652c9aea56dbe12e0c46e966e9bb9699d8002bd1fc09ce393 0 +SkillTargetReturnSkillFilter.cs SkillTargetReturnSkillFilter.cs f10bed3f3dcd3f2aea29e38b6dfc2634f96de6c17d731ab9204f19cbf04c4f16 0 +SkillTargetReturnThisTurnCardListFilter.cs SkillTargetReturnThisTurnCardListFilter.cs 3a516e663e47822caa28c17ff22e4e4c689de7efe1043374bfbad8273da8c1b2 0 +SkillTargetSelectedCardsFilter.cs SkillTargetSelectedCardsFilter.cs 91f0d34d1faf554a266366345e1e92716d2678b97ba4d9194156e91f6d9c6f9c 0 +SkillTargetSelfFilter.cs SkillTargetSelfFilter.cs 72a70cf93ee52c8fa44f93012b584c68f9326f5a5684e010cd45bdee8659f8f3 0 +SkillTargetShortageDeckWinCards.cs SkillTargetShortageDeckWinCards.cs 4058c3d884c8da73ed3dd73ff8d3907d2ec9227cb582ce622814f58244f4df36 0 +SkillTargetSkillDrawCardListFilter.cs SkillTargetSkillDrawCardListFilter.cs b2203df83391e250f846dce5661dcf9bd952bbdcfc18d92a46bca21e2e714e30 0 +SkillTargetSkillDrewCardFilter.cs SkillTargetSkillDrewCardFilter.cs befc1e597f7c3a6e6ad9c53daf2ce40d55fab0cc5f887a8ef5a08be46a197619 0 +SkillTargetSkillSummonedCardFilter.cs SkillTargetSkillSummonedCardFilter.cs 940f7664a6718aae9fbaf74e974862b7a0fb931f874a3a69da338b9008978df6 0 +SkillTargetSkillSummonedCardIdFilter.cs SkillTargetSkillSummonedCardIdFilter.cs e31ffed95d00dd2e8e8405b4f9743bcbe634b4aae5e83091b2ef86a71cdfffbe 0 +SkillTargetSkillUpdateDeckCardFilter.cs SkillTargetSkillUpdateDeckCardFilter.cs 8a3fa33947ebeda1dd1ea69e26baf3e4e0702d4fbc8f52353f2e546e1817d48e 0 +SkillTargetSummonedCardFilter.cs SkillTargetSummonedCardFilter.cs b164f56552bc13e42c449583aeffca2cecb01602e297b27ba2351672f3e26de1 0 +SkillTargetThroughFusionIngredientedCardFilter.cs SkillTargetThroughFusionIngredientedCardFilter.cs 7d483b7eda8e557b881e2b278dec4a1d3ecd71c579c1d612c277c12668ee6a5b 0 +SkillTargetTokenDrawCardFilter.cs SkillTargetTokenDrawCardFilter.cs 8d8c396b51f240c62784e5c7848bede2c70d73940e2f9a510cc40ca1285e800c 0 +SkillTargetTurnDrawCardsFilter.cs SkillTargetTurnDrawCardsFilter.cs a76e33a06c8b514792fa415bf22d4ff98d53f4cdd61de3c007d0bd20a433054d 0 +SkillTargetTurnPlayCardsFilter.cs SkillTargetTurnPlayCardsFilter.cs 42e610e79abb7f251bc1a2e6354b4caae3bb7f6e48d0d5dc2c4684398a355add 0 +SkillTargetTurnPlayCardsOtherSelfFilter.cs SkillTargetTurnPlayCardsOtherSelfFilter.cs 6334245856f1c3c8cbfd0412d3c0568160cc84dd37e9a4ef821d3192fb1dff48 0 +SkillTargetTurnSummonCardsFilter.cs SkillTargetTurnSummonCardsFilter.cs 406cc592000267038c52f209c95180e6cceb08841be45cc187dc0d5517719d43 0 +SkillTargetTurnTokenDrawSkillIdFilter.cs SkillTargetTurnTokenDrawSkillIdFilter.cs 2973875b246f9164c90e07be0715576e60c1284eab805e0f0e0be7de06432e48 0 +SkillTargetUniqueBaseCardIDCardFilter.cs SkillTargetUniqueBaseCardIDCardFilter.cs a877dfd8e3091f98cf96c3ca809eb2477e9dbebe944a14a48060e84674dad9e6 0 +SkillTextVariableComareFilter.cs SkillTextVariableComareFilter.cs 56d63e1011bccfec3eba16f914c4ca4e8655a0e524c007c55a937ed04869ee9b 0 +SkillTimingInfo.cs SkillTimingInfo.cs f3cb1e1f05af1a40dff198233cddaa9f60d90913e71a3f58909ab971f04fdb20 0 +SkillTribeFilter.cs SkillTribeFilter.cs f7549cef1e0e29be61462d060b0f66131daf8443af15712ce3b67505ce4725c6 0 +SkillTurnDestroyedFilter.cs SkillTurnDestroyedFilter.cs 4512ed0b8fd09f9735887e7b20773fa03249dce0eafff8cc0c0ba45a2c504bd2 0 +SkillUniqueBaseCardIDCardFilter.cs SkillUniqueBaseCardIDCardFilter.cs 58fff33fa42eb8db1f1bee8b9a1af50376ca3c17c5ee329e6d26b9839a235591 0 +SkillUniqueBaseCostCountFilter.cs SkillUniqueBaseCostCountFilter.cs 52171894422ff00d0d3f6e7d0ab82d7c6390bf870ba7d7b6d74e99303d94b362 0 +SkillUniqueTribeCountFilter.cs SkillUniqueTribeCountFilter.cs 79a0a134ec6e407c341a9b89f2394d55479679ef773889d94e1d06cca0c46252 0 +SkillUnitAndAllFieldFilter.cs SkillUnitAndAllFieldFilter.cs cd299b29deac95df89ff537c0485ec32bf8c34b6e0fa180460eee520e74e6e8f 0 +SkillUnitAndChantFieldFilter.cs SkillUnitAndChantFieldFilter.cs 178b57e393f6ebe0bd4e837a16e88480ea9e354e538e69be56fd03926f4c3eb9 0 +SkillUnitAndClassFilter.cs SkillUnitAndClassFilter.cs daa5c42cb5db3defa855ffe312c271be5a0855f4f6fd525dd182b274c8157cd6 0 +SkillUnitAndNotChantField.cs SkillUnitAndNotChantField.cs 60d21b529a21dbcb97631d7c2a0d2858720f7e5f0927f34907238192e989d031 0 +SkillUnitFilter.cs SkillUnitFilter.cs f00fd90b37154cb02bca44f1aabdc81ff50fd873222f3a787c4803f805f0dc06 0 +SkillUpdateDeckMomentTribeFilter.cs SkillUpdateDeckMomentTribeFilter.cs 1358f2811d051bd3bdd05b6d52ef3e03c8068c51dec47e6be31633b424263b15 0 +SkillUserSelectFilter.cs SkillUserSelectFilter.cs 32428dc620833291d1c29697a412fa3644d85306454e648d72bde42a1e524bb8 0 +SkillVariableComareFilter.cs SkillVariableComareFilter.cs 6a30683c7d15d3124bb12fae13f7a9b786f22fc18e7edbf3306cdcdc13b6bbda 0 +Skill_attach_skill.cs Skill_attach_skill.cs d7795060c18e8f2a66571446b56f1a0b4243d96b6bf4dc96db9f9f828c93f237 0 +Skill_attack_by_life.cs Skill_attack_by_life.cs 22e7064201123e6975a8802bac8c315ac0fc8373f183f5215159a91b32817d51 0 +Skill_attack_count.cs Skill_attack_count.cs 85897dfd651df0b538f2a9a46d92f210d59718533168417b6a0b36626986617c 0 +Skill_attract_skill_target.cs Skill_attract_skill_target.cs 019ff2551a24f52ba1e4eb4cb42b1c62c671550c8acea63cdd9101b63e750660 0 +Skill_banish.cs Skill_banish.cs e600b5d7d60b7df8b0fd06683f592c3ffa700eebf8d533f39fa42d3a8286c79a 0 +Skill_bp_modifier.cs Skill_bp_modifier.cs 5a47d18331fb11ed614c0b0ab3307f94fb4010149eb6603a7e79d3481f0c7a0e 0 +Skill_can_play_self.cs Skill_can_play_self.cs 8b384ac3eaeb030f026b2a41e9b8b93242cb86a077642466bef1138c2edc039f 0 +Skill_cant_activate_fanfare.cs Skill_cant_activate_fanfare.cs 00ceb728318e0bf3c648aded073885912cb86653e0bf76683ca0a0c3dc59e14b 0 +Skill_cant_activate_shortage_deck_win.cs Skill_cant_activate_shortage_deck_win.cs 2aa706faec683a9dc56c6a553e81a5402aebd59112910c0e6190d5202bae7dc6 0 +Skill_cant_attack.cs Skill_cant_attack.cs b3c84e5c6d49d91f25c48d47a3899dd8c0dbb217d31096bfa448d27ebbb0ff7d 0 +Skill_cant_evolution.cs Skill_cant_evolution.cs 4efbaf477bcb8faafa217155f87774563678d70b98cf4958990181c2fc5bdea0 0 +Skill_cant_play.cs Skill_cant_play.cs 81e411b089b1887fe71b15e11d4a5dcda827b551445465fdc5fca6268bb17133 0 +Skill_cant_summon.cs Skill_cant_summon.cs d5dc8b71ef1fe16c01e4fab59925db48d505eec343c341cc66258acf24132779 0 +Skill_change_affiliation.cs Skill_change_affiliation.cs 4122d41eb764df0f7a75e3c5010c201b9569213062b2a8256b025c7f3d2f14f4 0 +Skill_change_cemetery.cs Skill_change_cemetery.cs ede79d661afc4d2d69139a5aa1e61b154077a2c0a9615cce1c83195a79cc1bd7 0 +Skill_change_rally_count.cs Skill_change_rally_count.cs 9571019aabe673225320abe908745e679564ca2fba5c66df4f755f1c799607b6 0 +Skill_change_skybound_art_count.cs Skill_change_skybound_art_count.cs a2a3a897a6eeb0b0a8410a3d17e3ba754a03623cb4c6da4ba801db5617b96239 0 +Skill_change_super_skybound_art_count.cs Skill_change_super_skybound_art_count.cs 2949491a171496740ce975908614f27dff0934ae497f1f5e1f1da9ed21201148 0 +Skill_change_union_burst_count.cs Skill_change_union_burst_count.cs cf5711d42e95eada822fcca48b69a23a13036088061d2e2d6ace669d3386c6be 0 +Skill_change_white_ritual_stack.cs Skill_change_white_ritual_stack.cs a8886e4b31799752eba65ff81f9fb2648b9609ce316aeaf980cb0cc2f2bbea67 0 +Skill_chant_count_change.cs Skill_chant_count_change.cs cfdea2fd2e60ec0e07c307f0030003d98441d28f639d4c2cd7babf6bab03368a 0 +Skill_choice.cs Skill_choice.cs 178a4efaae3d70bc6291d3c4075c094846d5f6d10c4267195c796d036bcd7fd7 0 +Skill_clear_destroyed_and_discarded_card_list.cs Skill_clear_destroyed_and_discarded_card_list.cs f292ff39099fb4a9f34a33d363b02e6fab441c893170c201689f806765e4600b 0 +Skill_clear_summoned_card_list.cs Skill_clear_summoned_card_list.cs e75a35d2a1849756dca5cb4f1e8adc45ae4a74cab69a3d6a2d661e3cd59e2d58 0 +Skill_consume_ep_modifier.cs Skill_consume_ep_modifier.cs 11152ea58f9cf5add91878d13e0dedc8dfca225485b99f24177ddaa99f32eed5 0 +Skill_copy_skill.cs Skill_copy_skill.cs 8e76c8246ef4f7058e89467e097d36a1382661e9d96833817be2b72998e200c5 0 +Skill_cost_change.cs Skill_cost_change.cs 354976d096676bf05465345408665b36ecb9ff4fdaca5a79d9e56ffb133f0cca 0 +Skill_damage.cs Skill_damage.cs 34da81779391e0a7a6be87e039f69734c83efc988be95bce82731fb6fd495816 0 +Skill_damage_cut.cs Skill_damage_cut.cs 007060fa8052541af69c229a39af75ab1d76cea0b788a579193962995cd3f62a 0 +Skill_damage_modifier.cs Skill_damage_modifier.cs 6185e2d226a9d2d75c10e60126d0525cb73e8bfa116eb433df870033aed517db 0 +Skill_destroy.cs Skill_destroy.cs 8ba1f886a116c33e127a9d47cc9211f5b247787d82580036b023801738eb166f 0 +Skill_discard.cs Skill_discard.cs bd455702de8b14d860beec0ef688eba2d62b9ef7802aa6d5895b83db12df40f9 0 +Skill_drain.cs Skill_drain.cs fe765090b5e330f95e1c9c4bbe3eb95269d115d59129e56cfed34cc1bd72bbdc 0 +Skill_draw.cs Skill_draw.cs 762c0e0c629f142cdb35da87a939a6708f3e30f81ed1caec9a1368acaef22489 0 +Skill_evolve.cs Skill_evolve.cs 8856738acb3cc32ac9f025689d21476adbcd1c193c3ffe4d1d5e0f295b12d37d 0 +Skill_evolve_to_other.cs Skill_evolve_to_other.cs 17b9dcb76199cf05eaf9422a844b58c4ca663703c576cd645f9cde6ebea6e177 0 +Skill_extra_turn.cs Skill_extra_turn.cs 8ddea44e731276115cf81310a56361778e6c7082c272414346266cbe3c70cad3 0 +Skill_force_avarice.cs Skill_force_avarice.cs 124bb3009a035a34abc0dcbad5f5e349af0ffcdf40fa876a826da1825ffee2d7 0 +Skill_force_berserk.cs Skill_force_berserk.cs 0196691a90eb57653249558151315fd48bda9c5e0503384a97138ece7c3484ed 0 +Skill_force_skill_target.cs Skill_force_skill_target.cs f278984cd6fa25ab62dcf0a66d96c9cb9a27017a021010fd38d80d3a25646157 0 +Skill_force_wrath.cs Skill_force_wrath.cs 0591c2644aab18eca46eaa4f933f017a9155c6c2c4c2a959d8f4acd69db83c35 0 +Skill_fusion.cs Skill_fusion.cs 43dde99e3a1c0252ad8aba7a2b758eac0e34cff5fd384a9cd731d78226eda4b4 0 +Skill_fusion_metamorphose.cs Skill_fusion_metamorphose.cs 9ac83f3d5fd462e1c60516b01833032b29f92aea8397623b7402f92ecd176d05 0 +Skill_generic_value_modifier.cs Skill_generic_value_modifier.cs 7e6f74380bd12a39f13aca16ed149989a5c02603a1ba0e7fa9940e7f3614b165 0 +Skill_getoff.cs Skill_getoff.cs ea9d0237b0ee1aedf40dd2428fc1376a1058efb78c98b8d4b20dbd6a9c308fe1 0 +Skill_geton.cs Skill_geton.cs c50b4a647f34707c83335dbc0b9f4949e04c66139c4729f8babdd9833957bf17 0 +Skill_guard.cs Skill_guard.cs 2bb07d9bb449a1546fe75505a5cc123099c4a7705b34947fafdba8fa37b734fa 0 +Skill_heal.cs Skill_heal.cs fffb636f56a7b5679d98d0e5c3e769078f3f1bbd8132196bd63e59167bf8b3da 0 +Skill_heal_modifier.cs Skill_heal_modifier.cs 8534bd343cd47ccf2151c0c4cbf2dfcfd188b7395a770d744f0e13af84f6bd3e 0 +Skill_ignore_guard.cs Skill_ignore_guard.cs 09a32d67f56eb45f378a8cf54a3f653d2193dd4fa40e0c4cccf87d77f839d8ae 0 +Skill_independent.cs Skill_independent.cs 4b59f3e92d8ffa4003c242549766e4c5af66227d91ca5aea6396a9b47b6e0639 0 +Skill_indestructible.cs Skill_indestructible.cs c78ea619a32b9fa94ad6be7215bfd7adae1332373fc99e4087dd04e605a0456a 0 +Skill_invoke_emote.cs Skill_invoke_emote.cs 53f83a2ea5ba3a07b79d657996ad67cc7cc2e677396881d998a3e9187b2e9ad4 0 +Skill_invoke_skill.cs Skill_invoke_skill.cs 3d567aa767d470fd4a28a146e961af75eb08a5eaff9abfa0796a64f85bfa3233 0 +Skill_invoke_voice.cs Skill_invoke_voice.cs d4963aa6b70b00b511a73fdb22f463d631ee2c739524fbbe5f4a1338d348d9e2 0 +Skill_killer.cs Skill_killer.cs 98a3b7bddc3ec8eca742f3f416f61c0092bd08b4e8702347bdb5371ca473b6bd 0 +Skill_life_zero_activate_leon_skill.cs Skill_life_zero_activate_leon_skill.cs 682e6522750ecd4019b6ea3c730a7c3601ecfea1f25ede6788e86bab2323c9fb 0 +Skill_loop_skill.cs Skill_loop_skill.cs c0cc1e190e61a10e03b3bc650af91795db44b83b6cd9731e8d2199fe967f57b9 0 +Skill_lose.cs Skill_lose.cs dfde9886cc42f86156450c91903fb6583c4a0bb4004f7c112b7fada8291b6005 0 +Skill_metamorphose.cs Skill_metamorphose.cs 024a630261359a534f60ede3ea2a345409689558dbe9d9b4923fbf9502c241c0 0 +Skill_no_duplication_random_array.cs Skill_no_duplication_random_array.cs 1e16a18c7eae03f035e3fede6702dab6304f8304158af994ec318c48469941bb 0 +Skill_none.cs Skill_none.cs a931848c799738070c16a2213b332603ed24caeabc7220bf016f9299a73464fa 0 +Skill_not_attached_resident_chant_count_change.cs Skill_not_attached_resident_chant_count_change.cs 013c6da2aa9679a7877068ce8fade97d9956436b14f2b4f39228d4e600e65e81 0 +Skill_not_be_attacked.cs Skill_not_be_attacked.cs b0a5901f75340dacce3c3bafd62475211ce00b83da298267e6d1b4c1ff3f19d4 0 +Skill_not_be_debuffed.cs Skill_not_be_debuffed.cs 6b7ec9d9275cc3bb1984790c1830582ce2ec804e895c23c419605f6d788129f9 0 +Skill_not_decrease_pp.cs Skill_not_decrease_pp.cs 4e9a69cd64c9ac720423a127192e21e8622d53ec5670efaa036570017031138f 0 +Skill_play_count_change.cs Skill_play_count_change.cs a5528a57d4956b1fcb2df112d52e8a8475048bc19adce1eea5991b25d59957d2 0 +Skill_possess_ep_modifier.cs Skill_possess_ep_modifier.cs 29cb1cb37d38706ee747b6cff33a750bdbbd78e66367f09cccddcf33f2ffd1fe 0 +Skill_power_down.cs Skill_power_down.cs af9ba6852e6a4330bd5d1129009decb22561cfa92c42cd46e978c6a9a0387039 0 +Skill_power_modifier.cs Skill_power_modifier.cs de72ced4a69468ae068665d4cf8ec7025b3ae0fc0e70c1b198649580bcdf6eab 0 +Skill_powerup.cs Skill_powerup.cs d5d0d9afbc2832159c07bacff5151e876294fc700f22114e0560de4aed085b6c 0 +Skill_pp_fixeduse.cs Skill_pp_fixeduse.cs f44836e39a2ca74374a5a6a8b5a3a77c149fc9342dda3317f012431241406b4a 0 +Skill_pp_modifier.cs Skill_pp_modifier.cs be0ce3fa1554a3abef6fba552bef17569f6b38290590da7acb2203e6bd005814 0 +Skill_quick.cs Skill_quick.cs 1a42f980553e17ed82fcfb7dfecc22362a5350434787d318e0b9316be2a9d833 0 +Skill_random_array.cs Skill_random_array.cs 760a5a49917d73d5a5aea194d63401aa28a425da9846255fd91cf62cf7aa0765 0 +Skill_random_attack.cs Skill_random_attack.cs 440d8605d212566d991ef7896889e6178e62a152c2153191d29543321ee20367 0 +Skill_reflection.cs Skill_reflection.cs 3c35e0e26beea702a3e907f64210fcb79fc8ccde17efa53367178350e6559018 0 +Skill_remove_by_banish.cs Skill_remove_by_banish.cs 097f91456749e36cb3157c593c7e14eae682f71ca804ec3c681e405a949fdc64 0 +Skill_remove_by_destroy.cs Skill_remove_by_destroy.cs 09de63be641639ed86043d9dd74485346ae0bdf1a9e03c51c12087f56f04a04d 0 +Skill_repeat_skill.cs Skill_repeat_skill.cs 9b32e1a891421a5be36aadedbe08ca6923bceaebd360d39cd74ca747e806d78d 0 +Skill_return_card.cs Skill_return_card.cs df8cd7786d327e7c032deef89fd5afc269c6e8661177e231fb5a47ab3a7115dc 0 +Skill_rob_skill.cs Skill_rob_skill.cs 4e9f4dcaaaaabde4b3e6afaf6e050ad5f841587b15cbd5574a4d148911517f31 0 +Skill_rush.cs Skill_rush.cs 3850632c934f8c79c1d965f4c35ada1431798c9072c3d9c75c9c31f86976753d 0 +Skill_select.cs Skill_select.cs a4fb9db7465cc9169630fce5942b3543b22d09d2fd0034ee8c3216470978d789 0 +Skill_shield.cs Skill_shield.cs 3c1c8def0f8aeae0e66f1a9dbb5b208d571d21b7296c7a197c10b492f791d9bf 0 +Skill_shortage_deck_win.cs Skill_shortage_deck_win.cs 6dff9e2d1123dea0270457df18725db4fce9ca6f8fd0602a506da7d597630f62 0 +Skill_sneak.cs Skill_sneak.cs d3fc4c86ec500be86188af5b12c17dd15dc2b9d3b553a7e219a241d9bd6a919b 0 +Skill_special_lose.cs Skill_special_lose.cs 51d9738a8c0d1d0ad264217a1005265a15b6854b440d8c2ad0f0235dba9b97f4 0 +Skill_special_token_draw.cs Skill_special_token_draw.cs 176cd0f649b29bdac3bb359c766fb953b8b520bdd132cbce623a80a5d901240e 0 +Skill_special_win.cs Skill_special_win.cs a95961cbddb770c2d37d9e8f6fc96eb059e928c1e086fff97946b15f5022a1a8 0 +Skill_spell_charge.cs Skill_spell_charge.cs 197c127ba7d0f956da0bfb27acce3e7a2cbf65499efe4de556f80c5f2ffe1614 0 +Skill_stack_white_ritual.cs Skill_stack_white_ritual.cs 84dc8ab790674a51d38f30bc8e1e81b5f2edfc6ae185c11d3707a1c559b28e79 0 +Skill_summon_card.cs Skill_summon_card.cs 4f4fb4f1b8a8f1012a84e7f85052464b706fb4adf7a70c6f89641966537a5e98 0 +Skill_summon_token.cs Skill_summon_token.cs ec3d37e9e9f58d562fb59349dcd12809dcc43e74f59474fc4528f99614538497 0 +Skill_token_draw.cs Skill_token_draw.cs 7a13b65f22d91558fce594c462ff7f4198fbe0d6a05952a30b5ca924754d2f72 0 +Skill_token_draw_modifier.cs Skill_token_draw_modifier.cs f75b030c6f8d6366561363df8017580ca8064b1505cfeae30781aac04be93b68 0 +Skill_transform.cs Skill_transform.cs 3e2a56875f4ed9a892845d33a356c61ab1ea1a34a3c32ef10eb74ff12a8f87c6 0 +Skill_trigger.cs Skill_trigger.cs 6ef35ec9a145a566eb49c0ebbd89cdb1b252c326b654af922e6f55993b67476a 0 +Skill_turn_start_fixed_pp.cs Skill_turn_start_fixed_pp.cs 621e9379ba46b389078b78922d3bcd82330a4e5acb80cb2c4255d40641cb0f0c 0 +Skill_unite.cs Skill_unite.cs 75a3a207b777f170df27c903db81472a31c40df743479673c871d573038050e6 0 +Skill_untouchable.cs Skill_untouchable.cs 6aaac19ddeb14a6340dfb4b7fa0e72ec681e5b6f70d1edc1b3825f6c77085ef2 0 +Skill_update_deck.cs Skill_update_deck.cs 671b0dd680989b6082d7b84cb57b3e53bca8ac4988e7cc67ab9a6fe738da8945 0 +SkyboundArtCountAddModifier.cs SkyboundArtCountAddModifier.cs 253e896f5d73dc24930981144d0a147fd4073eb2704ff906b1679d237714d41d 0 +SlideObjectReceiveControl.cs SlideObjectReceiveControl.cs 25066b5bbcee488a0ae0d634e595354d194715895dd8f197c57740dc9a65d654 0 +SoundMgr.cs SoundMgr.cs 6446b13929ddfef0f1e421498e7e007e5f047fb0b9af01ad4cb155f10abb98c3 0 +SpecialArenaField.cs SpecialArenaField.cs 412c324799fcf5ba3b44f569fc38eb55ee839d19eac69d239f0aa36b613b9ffa 0 +SpecialCrystalBuyFinishDialog.cs SpecialCrystalBuyFinishDialog.cs 5588d01b6ac44fe141c48e39bd6115b0bc9016c9558ae182519cc443877634b7 0 +SpecialCrystalDialog.cs SpecialCrystalDialog.cs 15d2f53d2787f08015c1c962ad2a71349d8e97bd57f0a15833a83819de8deaeb 0 +SpecialCrystalInfo.cs SpecialCrystalInfo.cs 5f8544bfa60c28abe33c1241f998b843b3556abd78ad806e86f1d0f54207144a 0 +SpecialSkillBattleCard.cs SpecialSkillBattleCard.cs e48fbcea339fdf5bf613b12b2ff19ec67c3aa543c6bddb6b5054e1d2b92fa9bd 0 +SpecialSkillCardCreator.cs SpecialSkillCardCreator.cs e444fc5659d0dc30cf33c161dba1b9bdb8c17b8f70e6115cf5f9d01ee0f5b56e 0 +SpellBattleCard.cs SpellBattleCard.cs beeb2ee38181c49eb23a3a4a34d88712ab9e775a1d6325359c497c75a1d64916 0 +SpellCardCreator.cs SpellCardCreator.cs 52caefcbf8d495918c298d3d7eea1f4f089804ba2620ee6f44edfcfa210d22a1 0 +SpellSelectableCardFilter.cs SpellSelectableCardFilter.cs fe43393a84e3e8fd571b5ece0389e248f16a630c4d887b691b7005a090305cd6 0 +SpellSkillCollection.cs SpellSkillCollection.cs 0cd9860b4983c567f11749905a9746626b8192d6897d9cd1c374ed2370a9c530 0 +SpringPanel.cs SpringPanel.cs a017e4bda72cd7cf6f5afd49033ac1d7bc1e1723f7c9a2c47ed03275ab680470 0 +SpringPosition.cs SpringPosition.cs 95b7fe8038f93aefba651ab2ffc437bf067eda828d383ff8669768bc03fb6f7e 0 +Sqlite3Plugin\DBProxy.cs Sqlite3Plugin\DBProxy.cs 5ab0876de5301af3407c3340fcf569cf9465991accb81edbec51f68b056cd761 0 +Sqlite3Plugin\DatabaseCorruptionException.cs Sqlite3Plugin\DatabaseCorruptionException.cs bc96c0e67ce004d1673b758f7d489179dd97b61df6c9d46c3b19c72ae94efb82 0 +Sqlite3Plugin\PreparedQuery.cs Sqlite3Plugin\PreparedQuery.cs 9cd4ecc6dc386f9cedece748372992ac3eb56d4a6b372ab22e28ae7b24504577 0 +Sqlite3Plugin\Query.cs Sqlite3Plugin\Query.cs 1ca5b79273292fc248f5097567142422dbdea8cc372ebe7c9b07a90de3aefef2 0 +Sqlite3Plugin\ResultCode.cs Sqlite3Plugin\ResultCode.cs e3457f7f8dc63bbfe0fea257c86a402b75ace3268a4d49931bd3ab4f0931c68c 0 +Sqlite3Plugin\Sqlite3LibImport.cs Sqlite3Plugin\Sqlite3LibImport.cs 183751c9a34a0176f8943457d2f0fd2fb2c6bd2d1c5e9a1d3ce0fee523d5ab5c 0 +StageField.cs StageField.cs 00b4ce73ee0ecf03cd735eeaf3c92d88ff84d961545ce9a128fe276ca8a6bc20 0 +StartPickMultiCardVfx.cs StartPickMultiCardVfx.cs 5319d35407eb703a1ce1e62c8010ca48bbbdab28664801e44229742709856dc2 0 +StaticTextForUILabel.cs StaticTextForUILabel.cs 9436023ca36b366ede714d43732a219acd072f187f78f79c93f52d255a8ebc9e 0 +SteamManager.cs SteamManager.cs c788304a8880d9cafd3b5bb8244f77b433515585af0ab73d35204391939f2bae 0 +StockEmitMgr.cs StockEmitMgr.cs 652918ba621b02fc0141d1cce1e68847dbfb9d6be19cf9d2b87ee737c1fac742 0 +StockReceiveMgr.cs StockReceiveMgr.cs ca15f8d8c7a532558071dd010fcecff5e05ef69891f8f364db4537ddf8f08fdc 0 +StockSequenceMgr.cs StockSequenceMgr.cs ff64a78a351e6ed010b0bf9ef00e84d6540109fe578cdbf2772e17d6d66ada38 0 +StoryCardPanel.cs StoryCardPanel.cs cfd94847d286ae783c623d1dbe035ecd9d425afc30f9e8dc857f28c67cfa3270 0 +StoryChapterData.cs StoryChapterData.cs 01ade4dd98257c4360af148d3b27e1169012d0cc77da556fa3f3f2e07824b3bf 0 +StoryFinish.cs StoryFinish.cs 5fbebb41edd77454e7f84a7a554b5481f4a6b3927a779ed6f2cc885de2258052 0 +StoryFinishDetail.cs StoryFinishDetail.cs 69d4f7ea3fd2ae850c2c9f0761b206ed8cfa1131ec234f3847171f1ae92076e4 0 +StoryInfo.cs StoryInfo.cs 32b5563dca24e17e03ad86a4f4c32e5237249a29b1ca98cadf175f9f0929737d 0 +StoryLeaderSelect.cs StoryLeaderSelect.cs 1510dc9f50cdf22dcc7d666638f53a7043042c8b969184b7e65496c15077db20 0 +StoryLeaderSelectData.cs StoryLeaderSelectData.cs 1ac1eb3b8a1100393f5933fe298a926031f54ea06defb92fb9352b2c8852cd1e 0 +StoryNextSceneSelector.cs StoryNextSceneSelector.cs abb3d7f8bfdc4404463461f947b513b3221b121dd983bca4c86a6785ce15165e 0 +StoryReportEndAgent.cs StoryReportEndAgent.cs d2ea0cac09dc90b1fc0e163fa2e6117a45f7c61093edc22de698ae1873d8913f 0 +StoryResultAnimationAgent.cs StoryResultAnimationAgent.cs 67b5f484cd593a1c03f6116ae6c8eb2debf45f38671606478af7f0d12df06b59 0 +StoryResultAnimationHandler.cs StoryResultAnimationHandler.cs d5d0f28beddf0487e54c0652b3ec0af101543df4df63d8cc4847c9de0618b91a 0 +StoryResultReporter.cs StoryResultReporter.cs 21c77ea3cad8a8dd32ade349e68769bf3b09af224b919f29d09b958a1ac699c8 0 +StorySection.cs StorySection.cs 90bc36e5d786c592f5d668f69f2dd6044c311cdddee93c5056de37b19674aea6 0 +StorySectionData.cs StorySectionData.cs 2a9977f30e6a8c4d3dcb54696ffa9b84f30baad9435745b36bc071465c6fe5d7 0 +SuperSkyboundArtCountAddModifier.cs SuperSkyboundArtCountAddModifier.cs 6672f92e8d9fad08c10c7a441d1756d2baf9fc0d47f137cf8adc0498ddbd47b1 0 +SwitchLanguage.cs SwitchLanguage.cs 9362d44e73a33a7feadca7811e0c8f71b526f9c2653947ccce80bab7aa494ede 0 +TaskManager.cs TaskManager.cs d16af8956ca562f74241bd570a68e7f2dbd0d061039a22e4eb71207843b2735b 0 +TempleField.cs TempleField.cs 3e3cab0f9c8630e3b275c78a226712ab34eeb17f807c484652331aa0b2b17fe7 0 +TempleNightField.cs TempleNightField.cs 3d27607868382d47a14f17880cfd5e7a340112e9e23e376a91ced7269cc2912c 0 +TimeLeftUpdate.cs TimeLeftUpdate.cs 682a67e5ffaa1ab2e2f1ab05aed0caf5be8c2a228609b8325da1734a95ab3fa4 0 +Timer.cs Timer.cs 0ac4b1fc273798a587d38987cc7a353d8c071a81c4b7ba293fdc59a9c2e1c804 0 +TimerMgr.cs TimerMgr.cs cfe8eb9a3405153f46ae962772d23934c39daaa34336cf6b309484c511509d1e 0 +TitleMenu.cs TitleMenu.cs 538e67dc74b434cdfc31e9c802f0eea94006176f78d084183c2a17348bbd29b8 0 +TitleUI.cs TitleUI.cs 50c94d31b173fcb949c3c29a1c89f8d5735587d4a9da87e81dc8bb5771b16538 0 +TokenDrawModifier.cs TokenDrawModifier.cs ee94b1a849c7779f1c0fcaf0951c06cadcdfd0fe7c61182de4e1cc468af494cb 0 +TopBar.cs TopBar.cs e3365819277393c8892627127c124e72917b3c50e15a9bf549b44cf2e2fa8350 0 +TouchControl.cs TouchControl.cs 999089722cce89697ebef6b2da6cb20a4d33e10826160e6487f25282cc5713eb 0 +TurnAndIntValue.cs TurnAndIntValue.cs 1b08f6c6e7950738ea1be3b7910e62aa800eb945a1c5f17e910de63e040cabe9 0 +TurnEndButtonUI.cs TurnEndButtonUI.cs fd5682499e7764933d3d3d24c8b75e1bf6a863fc29fd7b75bdaf0f4df4efa8e3 0 +TurnEndTimeController.cs TurnEndTimeController.cs 3b516431616bcaac105e1c19c199fde08a74a4414ac2eb7264ecbf7aee4dc062 0 +TurnPanelControl.cs TurnPanelControl.cs d8b78ab4ec6b6b5e6ebfa8129679ef6dac38ac1e8285867c349c3e0c00881db7 0 +TurnPlayerInfo.cs TurnPlayerInfo.cs 57656b4a000e98f9d9a75bcfcf13b1703c33a1c64f8f36f78afb0771f3caf43b 0 +TutorialNextSceneSelector.cs TutorialNextSceneSelector.cs 83aaf60c3f7e0a6f36356d25ae7b7c2036c124a4887e199a90ebd8f133e341ea 0 +TutorialReportEndAgent.cs TutorialReportEndAgent.cs 9905613c59c9d50fa76e2539e094101d8e9a1f94025902fcbff11cb2c2feacff 0 +TutorialResultAnimationAgent.cs TutorialResultAnimationAgent.cs 4101f22dc613cd363267f3cb3eec76cad79cdef1b9ed168ea6b03debcd117cd8 0 +TutorialResultAnimationHandler.cs TutorialResultAnimationHandler.cs bc841acb23029a83b76f7f751b61b6e763fed8d0db6990a204b7a9984212efcd 0 +TutorialResultReporter.cs TutorialResultReporter.cs cec5f150092707940105b19a0fd27739dc5f0fa02c8d18e0ded38715bb7fdba2 0 +TweenAlpha.cs TweenAlpha.cs d1f530a59b492a34140f88c0fecb88406289cc37817e822d3a36cd141ec03e7e 0 +TweenAlphaExtension.cs TweenAlphaExtension.cs e4d361dd647ad1e83bb624050c26875d4be5d96a201b99c52853c6a4add3b2c7 0 +TweenColor.cs TweenColor.cs 27070a2f526015c8a9b68005be21e9235d46c72a35eb646b09e3d38fdaea8cb1 0 +TweenPosition.cs TweenPosition.cs 1426cfaf028ac956d7e1e286ad67189723116ca2dc4926a101ca1784c90ec22a 0 +TweenPositionX.cs TweenPositionX.cs d612a70acd8d1b45e9adbb01dc94a7649a4c05c7bfe0cea86728f8fd17e1a1de 0 +TweenPositionY.cs TweenPositionY.cs 526bfb20912ea1fe320ee386efcb268da8df01702d338800a34a5ddcd84bb418 0 +TweenRotation.cs TweenRotation.cs 840297b6cb3b51034b457fc3c4ae794ec3e76f9d75b2aeb9135ea2518e3a572e 0 +TweenScale.cs TweenScale.cs dd50401e8ffca06da1d2ccaa9d21cccfef2007d8f786f0690b79880d13b5007d 0 +Twitter.cs Twitter.cs 5abebbe6b3243fdd889d09fef67a248e683b1c84749789538a2a1a6d342d85b4 0 +TwoPickCardSelectBase.cs TwoPickCardSelectBase.cs f180f4e8798cc49a0bc516c9bd8f42cff26b5e95da3feefc617c6f6761717131 0 +TwoPickCardSelectView.cs TwoPickCardSelectView.cs adce68c3419ccd6c72bc84ee9cfc561f98929626b492aa65512c7947c8530a89 0 +UI2DSprite.cs UI2DSprite.cs c0c50a2c03e76ab7ee5fc7b0bb6ede7462ca98cb338a3ac93d3310d6016e660c 0 +UIAnchor.cs UIAnchor.cs ed46145415d1c7a0fef11d38de99b4b851e92044455ab3297d3e487c09e5f9b2 0 +UIAtlas.cs UIAtlas.cs 7b4a3539816d0568b2175af231466e58b30e60596b5f0ff095e6781c37b6b6e6 0 +UIBase.cs UIBase.cs dbb46aa38d676f4c4a63adc182a0002a1a5fd74d5d72002a4e1771bfa7b30830 0 +UIBase_CardManager.cs UIBase_CardManager.cs 5ef52362dda6c063389cc681f0ee48212ab113973807c4f062eae207c3658153 0 +UIBase_Textuer.cs UIBase_Textuer.cs 2a99abc5455d56dbd35db98494761d6ea07b7efcf0a35b4096af57d664dd49d6 0 +UIBasicSprite.cs UIBasicSprite.cs 82e6d31f92cdccf975a2113546968dd72737df67c94cb55015e8e808749b3446 0 +UIButton.cs UIButton.cs 6daadb36b071d0759d354c0368383bbc8fc7c7a419be5236a0a576e666b47ca8 0 +UIButtonColor.cs UIButtonColor.cs 527c1e1d9db0da61cdc0348e893b3df2bef7fadd046b9079abeb5641483da7b0 0 +UIButtonExtension.cs UIButtonExtension.cs d5388ce532378ccb676a8c16bc1656e2d9f2ca81097bba2195f59692c12f17b5 0 +UICamera.cs UICamera.cs 500eb9bb8f8bf4e7ed1f0073de80c5ccefe85273db00fc887295153d533c6525 0 +UICardList.cs UICardList.cs 1806cbaae01b88b8cb07c43c9c54e07eb4d726365755a03346308c0ffa8440d1 1 +UICenterOnChild.cs UICenterOnChild.cs 474da8b0e6bab01a59538a47351a71f3a3564f9242c37a9adb29419dcaf91ee1 0 +UICenterOnClick.cs UICenterOnClick.cs f6fd08e24ca2e897bcbd22568be224eb3d7bae06f898d66fcd34f5fc20419178 0 +UICurveLabel.cs UICurveLabel.cs e7eb2389c940c26327f302d9c11863726a359d46c85a5ad5a0d5d5e44cbe5d8d 0 +UIDragDropContainer.cs UIDragDropContainer.cs a07eb16f2b966d10e3e30c3f664b79d4f5eab211fccb0642d307056cb366958e 0 +UIDragDropItem.cs UIDragDropItem.cs fcf70d217a44f6c6c6c11d91d643a6777f3ef107e9688a758f9a5aa43d6b3e0e 0 +UIDragDropRoot.cs UIDragDropRoot.cs a8ae945ff310ae25b2033418cbbf857e6db057d3d874f6f87463702efa8a1ba5 0 +UIDragScrollView.cs UIDragScrollView.cs e5acfb873e2c58489438689c35fb49f9bc6a626e42b8210d99131027c5c614b4 0 +UIDrawCall.cs UIDrawCall.cs 9450bbb24af68f5949415fdaf4d172e87f3666f50d04cc349a63317ba3ce16c0 0 +UIEventListener.cs UIEventListener.cs 2e8420b6be9c0a4432e84df935bcd72a3d59ae68eb9cbcb7fbf7c37d22fa08d4 0 +UIFont.cs UIFont.cs 18e19978b3c278ab7231cb284df3cf82cebfeaea893297d5114d1c9302396599 0 +UIGeometry.cs UIGeometry.cs c21d252b5f58d70ab94150caf931f94be10e7298d1972cdcd00e55fa7f8f07a3 0 +UIGrid.cs UIGrid.cs be8a6c35e77ba46793e07ff442fc18296acae8ec35dd265269b55a594abd3c93 0 +UIInput.cs UIInput.cs 416afc67f7ccb2ce5013e0aa16a6f88e56835addc4f44119d20d6902e9a2f63d 0 +UIInputOnGUI.cs UIInputOnGUI.cs b2580c5f417880c2439ecc10cf2be990ce36cb5c5cdd31106206160432bb07e3 0 +UIInputWizard.cs UIInputWizard.cs 2cb970f67fca7f6b87ab2549c2afbc49641a15d2ae105d621a60a7c43246f3e9 0 +UIKeyNavigation.cs UIKeyNavigation.cs 07f92623077c4fe71abe087b62e8f66ff3d2542997dabd0f11c8e50b57714d15 0 +UILabel.cs UILabel.cs caf2353d46a4a538b696f1cc11ca0d987d99905db8789a507df4fc726a29cb47 0 +UIOrthoCamera.cs UIOrthoCamera.cs 7af22756b74e80e8d79ec65a1b8dcb4a780548152af5fe354fc8d7ba437ea8a8 0 +UIPanel.cs UIPanel.cs da0a82c5db60138e81e2fabbf0ed39adbe43f0d98a52ce5e7204e90c6378b8e6 0 +UIPlaySound.cs UIPlaySound.cs 6280f8f8f07a4fd699ab2abbfe08fb3ec82c43b5210b481f7ca71c04b0843f31 0 +UIPopupList.cs UIPopupList.cs a92be6b849fd09c1208562e37b483dda6e17a2ef7d7dbd4f9ee4db417b719306 0 +UIProgressBar.cs UIProgressBar.cs c528c65a6c4c5f0b99f16ee5d956ea45b0b2b50d5f99c82590ca11b39b1681dd 0 +UIRect.cs UIRect.cs 26b0ed3873a80eccb7b3e110fa54f7ad732cfaae698aa5cbd7aec4c0f7b01d7a 0 +UIRoot.cs UIRoot.cs 457040148de9a4cd8e2e4c8dec76da7db4f19fc424100b5bb93897a5ede815a0 0 +UIScrollBar.cs UIScrollBar.cs f978224bdadcc33681a2a7010ff3bb18076353cbdbab34e72c813ac4c3bd7f5b 0 +UIScrollBarWrapContent.cs UIScrollBarWrapContent.cs 993320b7ab1a3db9f19803086af1c63b933e260aea2b2f5d55d77476a9155cfc 0 +UIScrollView.cs UIScrollView.cs 3934d12e088d3908a2b563ed2f74c7890dff5b29c8619b9a3400232515b78626 0 +UISlider.cs UISlider.cs 1bb12ff32ade8946f153cab1a17dacc463744a210bbef560515f597e2f437c5e 0 +UISprite.cs UISprite.cs b810fda0ad0f38c06b5777913c404c4a1a4b669273c13c0466cca967157f8d34 0 +UISpriteData.cs UISpriteData.cs 5ef69b73779d7935627e4ce8e9875ef6ba8695dc872453f547301748a82c6c96 0 +UISpriteExtension.cs UISpriteExtension.cs 74637513fbe54314d961e39105dc0b6238cf210507ddbbe7a5e008b40695b9c1 0 +UITable.cs UITable.cs 7996e4ad3d48b3a05295671af25c135fdcb650cf7461e49a0d9e45ac2218771c 0 +UITexture.cs UITexture.cs 4a620309b4b36a2d217bd365427011fa40fbd3572105312c5e67cfd9cf52f811 0 +UIToggle.cs UIToggle.cs 4877e1f3dd9151b5dde182f2109999899d5ceaa3f390a8e0211424b77d8109dd 0 +UITweenAlpha.cs UITweenAlpha.cs d0b2af23184022caa70b8f027340330171f41c11a1f79a74370c452379b6c26f 0 +UITweenPosition.cs UITweenPosition.cs 84a9e153b3b12431de5d26172a83954e1c62758db7ae119cafcbb6dd69d64af4 0 +UITweener.cs UITweener.cs 639742c82b7b38d98215bb9852df84c92819b28dbb9dcf43d834ed615897cbb5 0 +UIWidget.cs UIWidget.cs bcc292adf33c73b6e1091e74df776dee7808b10f1e8a5b6296f3efe5eee1ac03 0 +UIWidgetContainer.cs UIWidgetContainer.cs 86cb92fd2fe067189987d823f21f7492355d99490a37d03d0ca4b98ef6b2d014 0 +UIWidgetExtension.cs UIWidgetExtension.cs 28aed5ab32d2ebc30b3dd568892f48549502d617a2ea5f08c563275e6fd83d26 0 +UIWrapContent.cs UIWrapContent.cs 59a7ac9b3b6a8774ff69869ccf8d0a013efc3999ac636ec43ed5d2a90cf5c301 0 +UIWrapContentWizard.cs UIWrapContentWizard.cs f6694492aa9658b0e36900c60dc317b048d44d01a2420e840dd808e5c332ce66 0 +UIWrapMuchContent.cs UIWrapMuchContent.cs fc9fc8a00a5073a46cb3bcf49af1bc1836c34e0f283c8a718630f09b0370c5de 0 +UIWrapVariableContentVertical.cs UIWrapVariableContentVertical.cs 56aedb3a083cd1d98b508939e0c3153c6c50e7ae70f1a12948861add7967eb5a 0 +UnionBurstCountAddModifier.cs UnionBurstCountAddModifier.cs 8beff11a43074eb1a3803dcfd0e5f9b094f5fd9967146439d6caf8c3fd468bb6 0 +UnitBattleCard.cs UnitBattleCard.cs 27dc1f653b825080ccfcc072236165148c25fbecf170d2b9fb9629cd330ba878 0 +UnitCardCreator.cs UnitCardCreator.cs 1fc13c2d1f5c3b52f6fc77e2a4c7f42c8efdf15ceab3f1d712d73f45b0ca152f 0 +UnitSkillApplyInformation.cs UnitSkillApplyInformation.cs d285ae08cb916a85e0a4ed5d41a524b27ffffd1a1527758860f17107b9f214c0 0 +UnityEventAgent.cs UnityEventAgent.cs 0712c1fa51f3a6ac91d26d42972c3b4c0bef81431ac7e4424ca222c18746f46c 0 +User.cs User.cs d0108788bc786b1852b9d9c9bce9011d14a7fa681c8dc5b18814912029c4bb1d 0 +UserAchievement.cs UserAchievement.cs 06f9a530d683c21c4c3697b0ae6b8c79e33197e504de7479d0ddfeb5b9c54014 0 +UserCard.cs UserCard.cs 54f5658a3d042ef394bfb3e36d5892a577ee24feec01ee5e26b10defb9a1b2c1 0 +UserConfig.cs UserConfig.cs 9ee05ccbfdb5531ac5fe35cbcb960470011664078f2cc33475cbeee82bc046e5 0 +UserCrystalCount.cs UserCrystalCount.cs 7170421dfb1e7bc4edb2a86ea486bb2b14fe4946ef9a03480c29293a23fa2e75 0 +UserDegree.cs UserDegree.cs d105820b88e629a652b77240674d3a35a479cb34118dfd67f317a58611c18abb 0 +UserEmblem.cs UserEmblem.cs 1171ddb12cdc4a2a64519e7d999c4e5f4826cc4412665fab513934ae4a3fda66 0 +UserFriend.cs UserFriend.cs ee231e46041027ad3f2f4f1b8859e655f2b6562562ed886933a2ec42d3435e39 0 +UserInfo.cs UserInfo.cs 5c073d43f4378f8629c524cc57e79097f67872fa898df84fa2e8b9e54630a4db 0 +UserMission.cs UserMission.cs 2516293322a85ea704c66c79789c5b026a41024802aa464f943c019822424c06 0 +UserPromotionMatch.cs UserPromotionMatch.cs 9456ac47ac4ae1050bf35e2c32556774053f2442c6d35f4029d635faceade38a 0 +UserRank.cs UserRank.cs 482eb25d49fe10180258f86c98e5d016d0b2ae97dd9a703550ab6b203d12f1c0 0 +UserTicketCountContents.cs UserTicketCountContents.cs b1aa60147b8c6d1056b5109cfe65eaab2e397fbec8bceede5a1af09a0943dfda 0 +UserTicketCountDialog.cs UserTicketCountDialog.cs 4d91e04b0d6b4429b8aaf996b7a59122ad03796a8655f3944b762adc8a674d42 0 +UserTutorial.cs UserTutorial.cs a9158fa4ed1954b5b0779acd6621f18d1046d1fcd196d0291ecf804c2f1733fb 0 +UtilityDrumrollItem.cs UtilityDrumrollItem.cs e312d53d716b1ec16a7a12d4fea285b42c5db7d36074cd705f3c700946584b06 0 +UtilityDrumrollScroll.cs UtilityDrumrollScroll.cs 33e4e607231f08df2286af7f8240407eab36a5c20139699f24a469e96a2f870a 0 +ValueWithOperator.cs ValueWithOperator.cs 8f7f0a6779b0acef60616d8b11397e9287a2fda5aabb5633931fe054d0488a95 0 +VariableSkillFilterCollection.cs VariableSkillFilterCollection.cs 81a4181b82be933b517204d193716c7b76af98f9c499635a1cded597b62dad30 0 +VellsarDesertField.cs VellsarDesertField.cs aa6332744db7946bc81a58cc9366b5aa12645510de417e387d952fa83fdb6723 0 +VideoHostingImplBase.cs VideoHostingImplBase.cs 5d306aeb8ed6ace236e7d47e577510b6d3bd70ab120d31a5880a650063b60672 0 +VideoHostingImplNull.cs VideoHostingImplNull.cs 5064b1d5e394c3925ef1b20d017450009d2296efbc193068e44d46280b9198b1 0 +VideoHostingManager.cs VideoHostingManager.cs 4ca315a66a50eeb4780c8c41bf7b0d5bf1be464182b54ac24b68e8adb556e420 0 +VideoHostingNicoNicoNotification.cs VideoHostingNicoNicoNotification.cs be17b4acb15f849f500dfb9e892250adb64c3c7c89e72488acd756e5b773bd09 0 +VideoHostingUtil.cs VideoHostingUtil.cs 70b20ef9a7e8187d33356d37bf74f0da02005bf26e2e7b33b0b60ca8feca5fb6 0 +VirtualBattleEnemy.cs VirtualBattleEnemy.cs 67a44fd924c8488a7a309162835d01f4a865481f1e6544d75cbf3ee28f151e34 0 +VirtualBattlePlayer.cs VirtualBattlePlayer.cs eb107ba07f87bf04337ca7958f545da20b211e0cf5c5aaa8ca5b5487ec4eef64 0 +Voice.cs Voice.cs bb5adff9c75fb04af122f784aabce3238626eca7ecf63b34e3f1de41eb54f4f2 0 +VoiceAndWaitTime.cs VoiceAndWaitTime.cs e2ae6dec5f198e44489e2f13a4149d0f6081da625f72d0e0f0d50a9740b0a156 0 +VoiceDictionaries.cs VoiceDictionaries.cs 845e20628eb0ef372bbfb8c7b55ae14ce6c57e11df24fcaa43668d9876ef6ed1 0 +VoiceDictionary.cs VoiceDictionary.cs 314e23ce11985b7f0b5e6a5753b4ba48813c4414972441cccc4c8efe15e81d21 0 +VolcanoField.cs VolcanoField.cs 3dfb1318b89b7b82f8a4ea2065f471417bb6004efc2319f32a86ac9c6476528b 0 +VoteData.cs VoteData.cs f91a040c073e36b7058a2fe866005c33b22f247fd61419c21c6af46669485d9e 0 +WatchInPlayAction.cs WatchInPlayAction.cs 54de3968aded18d6d6b9bb1f5e803d58294de6cf45c558aad2df902938d1fdb7 0 +WatchOperateReceive.cs WatchOperateReceive.cs e77378fd91ec257eba34448e0305e9608ae2bc29f8581c65167ac4c4cd829096 0 +WatchOperationCollection.cs WatchOperationCollection.cs a20deb14316a4f38ead77c4a4bf6d7d7b092dd1037bac54b3f4ebf26b01bccf9 0 +WatchPlayCardAction.cs WatchPlayCardAction.cs 9cf94b6d52239d0a5b92cdb8d8def9d0984c01204d62d9483269b572e47c30d5 0 +WatchTouchControl.cs WatchTouchControl.cs 7a8426ee3f178f05650eb4ccd5952eb5dcc1718ea8ec05be81715dcfbdfda529 0 +WatchTurnEndTimeController.cs WatchTurnEndTimeController.cs 50cd44122fe694f1003214c31a552ec9e899388166b4a495e5a03d5601fbfb1d 0 +WatcherDisconnectChecker.cs WatcherDisconnectChecker.cs b2ec9803c3ed9e473233cfd4e2f805195df1f607936f7dde9ae1b7a7028dd847 0 +WatcherLeaveChecker.cs WatcherLeaveChecker.cs 7b969aacc9670f319bd45d344528524a3001b0152cc96e99631e89fa69354466 0 +WindowResize.cs WindowResize.cs db6f56a3db9e6109bf9b44841081eb5281bb285fad9d76dc3cf2799ee2808d38 0 +Wizard.AutoTest/LitJsonExtention.cs Wizard.AutoTest/LitJsonExtention.cs 2c7f0f5931516292033479e8ef92631fdd72a27907c048ba77d3e287187fc504 0 +Wizard.AutoTest\AutoTestBattleMgr.cs Wizard.AutoTest\AutoTestBattleMgr.cs 42841daf11cb9b42e8d97f44f7ae24aebee089b7d9c7c6d8d39f21b32b49860d 0 +Wizard.Battle.Card.InnerOptions\CardInnerOptionsBase.cs Wizard.Battle.Card.InnerOptions\CardInnerOptionsBase.cs e0c9e0e503c55e536924b17f7b2948423a79b85bafaf0ffa0d02b053667d69f2 0 +Wizard.Battle.Card.InnerOptions\PlayerCardInnerOptions.cs Wizard.Battle.Card.InnerOptions\PlayerCardInnerOptions.cs 820fb10d151a049b103b5f7b0a15f697c76365a7b2fb3a53f78d81947df55a56 0 +Wizard.Battle.Card\IVirtualBattleCard.cs Wizard.Battle.Card\IVirtualBattleCard.cs 9446d58a4ab2ddd2097d3132b133c36780d7e9d36b83309a4dc12d7c8d441f40 0 +Wizard.Battle.Card\VirtualChantFieldBattleCard.cs Wizard.Battle.Card\VirtualChantFieldBattleCard.cs 1e05dff55c5c9bf722bb464b16ae763b03cd8a26ea02a41fa779461240f08982 0 +Wizard.Battle.Card\VirtualClassBattleCard.cs Wizard.Battle.Card\VirtualClassBattleCard.cs 586494135800d6e0bd7486b2dbbc09fa683c411aff74b54bbb70f87545df04c8 0 +Wizard.Battle.Card\VirtualFieldBattleCard.cs Wizard.Battle.Card\VirtualFieldBattleCard.cs 5f6212473f5a0c6a08ff1c21b9496a86281cd4bc4ddf1cf0697234f83a5c2dba 0 +Wizard.Battle.Card\VirtualSpecialSkillBattleCard.cs Wizard.Battle.Card\VirtualSpecialSkillBattleCard.cs a250e1c0a4dc782500eed1c3fbb1074dff6e730b2b722f29ee5c6b39c95b4c41 0 +Wizard.Battle.Card\VirtualSpellBattleCard.cs Wizard.Battle.Card\VirtualSpellBattleCard.cs 7172c61bf30b7ff5ab86da9d618ce7b2fcbc6aa0c50845422fb2122cc1ab1704 0 +Wizard.Battle.Card\VirtualUnitBattleCard.cs Wizard.Battle.Card\VirtualUnitBattleCard.cs ab7aa44de0f89f6dbc380b00e3657750ef8265eaaca459aef3f8376e3c6ff8a5 0 +Wizard.Battle.Mulligan\IMulliganMgr.cs Wizard.Battle.Mulligan\IMulliganMgr.cs d49640f1076af798e9114ff9058b7fdfe5d5a194ed2420a6ef95122fa10d8c0f 0 +Wizard.Battle.Mulligan\MulliganCtrl.cs Wizard.Battle.Mulligan\MulliganCtrl.cs dbb991240686c69313e36a6e7773acbf2e877eefb1153a7ee985379755ca36c7 0 +Wizard.Battle.Mulligan\MulliganInfoControl.cs Wizard.Battle.Mulligan\MulliganInfoControl.cs 96b05ee5e79977b06a9f8d3e2f027b350baf06cbb49dc5d569b0cd4ca8030fda 0 +Wizard.Battle.Mulligan\MulliganMgrBase.cs Wizard.Battle.Mulligan\MulliganMgrBase.cs 4541b41e812e14598f82f44852348503760c9889306ec4958749c775042daedd 0 +Wizard.Battle.Mulligan\MulliganOperateControl.cs Wizard.Battle.Mulligan\MulliganOperateControl.cs 4cfb95ea034953cd75b801f65f634a5bb92650bc4322ee9ea2621035fc618e2a 0 +Wizard.Battle.Mulligan\MulliganViewBase.cs Wizard.Battle.Mulligan\MulliganViewBase.cs 641fd480d2682454e5eee8bf149498ad23811752900dcc43de5b994c77b76b58 0 +Wizard.Battle.Mulligan\NetworkMulliganMgr.cs Wizard.Battle.Mulligan\NetworkMulliganMgr.cs e9d24af08954400b4e484871273ffecfe5ae76abb16cb0350b7ce16ac89b3c7d 0 +Wizard.Battle.Mulligan\NetworkOpponentMulliganCtrl.cs Wizard.Battle.Mulligan\NetworkOpponentMulliganCtrl.cs 897a078c122c68f79cf4d673480a687d0aea7c307f8fc483da9371700f336d6e 0 +Wizard.Battle.Mulligan\NetworkPlayerMulliganCtrl.cs Wizard.Battle.Mulligan\NetworkPlayerMulliganCtrl.cs 3897678fd2cc804c84b1e1d2ce6cba1677682a9ab902a55360a43181373d2cd1 0 +Wizard.Battle.Mulligan\OpponentMulliganCtrl.cs Wizard.Battle.Mulligan\OpponentMulliganCtrl.cs 68ad23dde55aaecf68521d861b4d61a5569caeb8b524058f2fafead7a79f727e 0 +Wizard.Battle.Mulligan\OpponentMulliganView.cs Wizard.Battle.Mulligan\OpponentMulliganView.cs 225bcec52a9768a233bf336efb8285b40f57ccc1ebbc7d63a47823c3bd3876bc 0 +Wizard.Battle.Mulligan\PlayerMulliganCardSortOutVfx.cs Wizard.Battle.Mulligan\PlayerMulliganCardSortOutVfx.cs 2592025f334540f261207c02c5a69032c4109eec8e3ad47c8037e224a29424b3 0 +Wizard.Battle.Mulligan\PlayerMulliganCtrl.cs Wizard.Battle.Mulligan\PlayerMulliganCtrl.cs 19da0c8f4d906a0151537e458feba897f497e0e58e98cc073af8ca17a46e992b 0 +Wizard.Battle.Mulligan\PlayerMulliganView.cs Wizard.Battle.Mulligan\PlayerMulliganView.cs 9ec7621e20fb7b26e60f532612dc2598bb6b19b8d5f6d10f9616a42ad203832a 0 +Wizard.Battle.Mulligan\SingleMulliganMgr.cs Wizard.Battle.Mulligan\SingleMulliganMgr.cs f885a0a4039b2cea9889f904d0af81129ec2b700672550e0f7988c061c8883a9 0 +Wizard.Battle.Operation\AttackOperationCommand.cs Wizard.Battle.Operation\AttackOperationCommand.cs 977380b85cc0b7e2eba35421a4bb00a795d137193591f126bf60c4a1db1e43a8 0 +Wizard.Battle.Operation\ChangeAIOperationCommand.cs Wizard.Battle.Operation\ChangeAIOperationCommand.cs b9c14e2d908e2c84fc0fdbe149cc49d8e92c057575feb708a6b672bb7f53514b 0 +Wizard.Battle.Operation\EvolveOperationCommand.cs Wizard.Battle.Operation\EvolveOperationCommand.cs 893db7b4077f9e94ed98d3d58fedbed113b2c4f95abde5bd92a18f2d92edd723 0 +Wizard.Battle.Operation\FusionOperationCommand.cs Wizard.Battle.Operation\FusionOperationCommand.cs c2d98ea4cae44e22b6b1433900256cfa819fcdc6dfd85c6939f44b8e6b853766 0 +Wizard.Battle.Operation\IOperationCommand.cs Wizard.Battle.Operation\IOperationCommand.cs 71d184f986afd2d5160a6f7121ef8f80e50c018b48c21d5e3b6c14086df8c494 0 +Wizard.Battle.Operation\OperationSimulator.cs Wizard.Battle.Operation\OperationSimulator.cs c97c6fdf16353d9d3aa5839528bc5832d00a85e27da8d786ad8274e1bf45708c 0 +Wizard.Battle.Operation\PlayOperationCommand.cs Wizard.Battle.Operation\PlayOperationCommand.cs 4359c79e97c900f043931d02cc34057a7920fa0655bdd2e7a294e23727519cd7 0 +Wizard.Battle.Operation\SimulateCostNoDuplicationRandomSelectFilter.cs Wizard.Battle.Operation\SimulateCostNoDuplicationRandomSelectFilter.cs 02ad7e0a254801641204e1557ace3ff15ecc38aa3e100f62fa88ca2ddd3dbf8f 0 +Wizard.Battle.Operation\SimulateIdNoDuplicationRandomSelectFilter.cs Wizard.Battle.Operation\SimulateIdNoDuplicationRandomSelectFilter.cs e4d98479c22999934f2a52d9e0da7ccc89b9473fe1b2eebbaadc27b4de00486e 0 +Wizard.Battle.Operation\SimulateRandomSelectFilter.cs Wizard.Battle.Operation\SimulateRandomSelectFilter.cs 2d15e18af41ec05545d8b1d6db64f5d25240828ce3284d81fd23f775fa8c00f2 0 +Wizard.Battle.Operation\SimulateSkillCreator.cs Wizard.Battle.Operation\SimulateSkillCreator.cs e382b7cc573333a8577d00ebbb4c980dfeaa7e211cc6906afb7f1428777406e5 0 +Wizard.Battle.Operation\SimulationSelection.cs Wizard.Battle.Operation\SimulationSelection.cs efe3abe803236d55e3594f15b65dafd9fff41a526e291a217ce63d1b89ecb475 0 +Wizard.Battle.Operation\SkillOperationCommandBase.cs Wizard.Battle.Operation\SkillOperationCommandBase.cs 6de20c71e94e1c620846cfb5decefdd8e345da027540ef66a834c715e3c40664 0 +Wizard.Battle.Operation\SkillTargetInfo.cs Wizard.Battle.Operation\SkillTargetInfo.cs e4a6b9b4e958284eeba861005523a0aabd366cdc427ca80078b180d565c6ffe0 0 +Wizard.Battle.Operation\TurnEndOperationCommand.cs Wizard.Battle.Operation\TurnEndOperationCommand.cs 2d89809870675e678f07161469602becac62efd9dcef35f5e185ccdbf9b43fa6 0 +Wizard.Battle.Phase\IPhase.cs Wizard.Battle.Phase\IPhase.cs dacb64f72e43ea5c900c2fba5abcae616e9243f2c80bd2129af54263636f5ad7 0 +Wizard.Battle.Phase\IPhaseCreator.cs Wizard.Battle.Phase\IPhaseCreator.cs 14fceafb7bfc643cc5022d38744b03926cda07bb67d1178b36a7ea614432259e 0 +Wizard.Battle.Phase\IResultPhase.cs Wizard.Battle.Phase\IResultPhase.cs ba6732b9a31dad0a47b298cc85e5ee8b067875189f0225b8abed93e3f059c442 0 +Wizard.Battle.Phase\LoadingPhase.cs Wizard.Battle.Phase\LoadingPhase.cs 60b11afc14b20ed0960ea55fd5c8e3d006ad1d12cbc907679cbbfcb8127eaee5 0 +Wizard.Battle.Phase\MainPhase.cs Wizard.Battle.Phase\MainPhase.cs 7463c025866b5196219eeeb0132d69d91b45f4b6a80fb964471e23c96863937b 0 +Wizard.Battle.Phase\MulliganPhaseBase.cs Wizard.Battle.Phase\MulliganPhaseBase.cs 2676daa3204e99605dc74d3bde3999e6f3a44af65d9081bef3fedf824904068f 0 +Wizard.Battle.Phase\NetworkBattlePhaseCreator.cs Wizard.Battle.Phase\NetworkBattlePhaseCreator.cs b5fc54b6da62a6f2774a5104a4e7102bf1f5ac91a5b81bf2816127445e063754 0 +Wizard.Battle.Phase\NetworkMulliganPhase.cs Wizard.Battle.Phase\NetworkMulliganPhase.cs b5eb259294c4851654647b3e6d482667686bf7f28c6d97dcfa86032a6c9660eb 0 +Wizard.Battle.Phase\OpeningPhase.cs Wizard.Battle.Phase\OpeningPhase.cs c47c033633cf5b813eb8384323c313a8b8ba2edfd91c1368fb1f5df9e4e73391 0 +Wizard.Battle.Phase\PhaseCreatorBase.cs Wizard.Battle.Phase\PhaseCreatorBase.cs a5641cd3ac277cb47bd0d2e2ee904bc17155ecb18f2e4c2b60a3d643be9ed06d 0 +Wizard.Battle.Phase\RecoveryAfterMulliganPhase.cs Wizard.Battle.Phase\RecoveryAfterMulliganPhase.cs 8b75c76e7a0122bff7e06a1bfe0817f1ce84585dea460e0d99225fb20d5fe4f5 0 +Wizard.Battle.Phase\RecoveryNetworkAfterSubmitMulliganPhase.cs Wizard.Battle.Phase\RecoveryNetworkAfterSubmitMulliganPhase.cs 61e806e680951d3ccf6121791c394fa262cd7a48c8f906fe16f6f7cd3d9d8396 0 +Wizard.Battle.Phase\RecoveryNetworkBattleMainPhaseCreator.cs Wizard.Battle.Phase\RecoveryNetworkBattleMainPhaseCreator.cs 79eef2223f6de01026063bb94ee89fc7c47c69c64838687af58a17b8cbd1397f 0 +Wizard.Battle.Phase\RecoveryNetworkBattleMulliganPhaseCreator.cs Wizard.Battle.Phase\RecoveryNetworkBattleMulliganPhaseCreator.cs 2161d3228cc97967a5bc16983341eb7a190f15307cbd0728967963634e637553 0 +Wizard.Battle.Phase\RecoveryNetworkBeforeSubmitMulliganPhase.cs Wizard.Battle.Phase\RecoveryNetworkBeforeSubmitMulliganPhase.cs 6f16e1181f83f47de29f27017d1ecfd8aa6963f55524ee3457cc1a428778fb1e 0 +Wizard.Battle.Phase\ResultPhase.cs Wizard.Battle.Phase\ResultPhase.cs 82729c54c9b19486a199fa40f6fc43d74092ac457e4c2e3bcff73b7113adbb25 0 +Wizard.Battle.Phase\SingleMulliganPhase.cs Wizard.Battle.Phase\SingleMulliganPhase.cs 949ba3c58a0cb59f6ed337a46c3b949a60387390c0b310f545465dc09e7d6e48 0 +Wizard.Battle.Player.ClassCharacter\Class3dCharacterBase.cs Wizard.Battle.Player.ClassCharacter\Class3dCharacterBase.cs e30cc0fc68c1164411d0420f753d2597c166db94670eb8959bbfca401d7088ca 0 +Wizard.Battle.Player.ClassCharacter\ClassCharacterBase.cs Wizard.Battle.Player.ClassCharacter\ClassCharacterBase.cs 76c74e23c52d36176339dfb50f6885660ef587601b80cc2a882682bf0332429c 0 +Wizard.Battle.Player.ClassCharacter\Enemy3dClassCharacter.cs Wizard.Battle.Player.ClassCharacter\Enemy3dClassCharacter.cs 008552369d7cb9b211b2e716720426c08d90bce73cadccd3f7aed604073a38ab 0 +Wizard.Battle.Player.ClassCharacter\EnemyHighRankSpineClassCharacter.cs Wizard.Battle.Player.ClassCharacter\EnemyHighRankSpineClassCharacter.cs 80b845a7d684ad11650a7f0d1e53cf58a7a77a3e2e67cabee57bcc13f9ffdeda 0 +Wizard.Battle.Player.ClassCharacter\EnemySpineClassCharacter.cs Wizard.Battle.Player.ClassCharacter\EnemySpineClassCharacter.cs 29d31783eae046241a610d19915e376c22fed76935ff2077035dd22350e3ee4d 0 +Wizard.Battle.Player.ClassCharacter\HighRankSpineClassCharacter.cs Wizard.Battle.Player.ClassCharacter\HighRankSpineClassCharacter.cs 17f31270da67508f21987a11ad6978745cade12c9dec53249b6a508a58a2e773 0 +Wizard.Battle.Player.ClassCharacter\IClassCharacter.cs Wizard.Battle.Player.ClassCharacter\IClassCharacter.cs c1a985539e3b304260d87f4af6ec249d939dc0385e7cd902634296c4127d991f 0 +Wizard.Battle.Player.ClassCharacter\Player3dClassCharacter.cs Wizard.Battle.Player.ClassCharacter\Player3dClassCharacter.cs 51fd37fe40a0b1a2227d3108c993f5b508290624825be65a3055e09729877860 0 +Wizard.Battle.Player.ClassCharacter\PlayerClassCharacter.cs Wizard.Battle.Player.ClassCharacter\PlayerClassCharacter.cs 79c4a5b7b34b79abf748ba421fcba213eecc04c789ee5ea8e5903abea2c05fa2 0 +Wizard.Battle.Player.ClassCharacter\PlayerHighRankSpineClassCharacter.cs Wizard.Battle.Player.ClassCharacter\PlayerHighRankSpineClassCharacter.cs fd0ac732efff8feee43aabf86cfc089e93f874ad8e4a40e60e538cf092b4e821 0 +Wizard.Battle.Player.ClassCharacter\PlayerSpineClassCharacter.cs Wizard.Battle.Player.ClassCharacter\PlayerSpineClassCharacter.cs dada07b44ca77565d464f8b06c2e6e50bd5bbf46308c0b25042551cc2dfe5b30 0 +Wizard.Battle.Player.ClassCharacter\SkinEffectVfx.cs Wizard.Battle.Player.ClassCharacter\SkinEffectVfx.cs 615c275919ee29473983b6a5386e64ebfb2bff959d9231863f8b72506da5756e 0 +Wizard.Battle.Player.ClassCharacter\SpineClassCharacter.cs Wizard.Battle.Player.ClassCharacter\SpineClassCharacter.cs fa478f3dc08ddf42951add4bc12ce65f6588d8974ac1941bd2ef88beb564fb55 0 +Wizard.Battle.Player.ClassCharacter\SpineObject.cs Wizard.Battle.Player.ClassCharacter\SpineObject.cs bd325662311d523dc9948557b3ddf899ed5a72fe18430f69e307360f7fa6758f 0 +Wizard.Battle.Player.Emotion\Debug722006NullVfx.cs Wizard.Battle.Player.Emotion\Debug722006NullVfx.cs 65801eb05b7c9ee4c6514faa6d67f2d632ee95a47a74836a2f34072fe19a30db 0 +Wizard.Battle.Player.Emotion\EmotionBase.cs Wizard.Battle.Player.Emotion\EmotionBase.cs 8a8edb24dbf845b07acf74e70658335d8fe23f67105e1e70e814153b836d4fad 0 +Wizard.Battle.Player.Emotion\EnemyAIEmotion.cs Wizard.Battle.Player.Emotion\EnemyAIEmotion.cs da412c54c553497108cf02172d041ef893420d9e495b1d017ea0f8dd70360c7f 0 +Wizard.Battle.Player.Emotion\EnemyEmotionBase.cs Wizard.Battle.Player.Emotion\EnemyEmotionBase.cs 35c86dd528fcab638f076c4bf0ef4f4b96737b83bba5450d117abe5024aaec6c 0 +Wizard.Battle.Player.Emotion\IEmotion.cs Wizard.Battle.Player.Emotion\IEmotion.cs 289e34823e07e0fa97f0259e3eeeeb1e0475f5c78aff8f6515f4208c7ad2f2e5 0 +Wizard.Battle.Player.Emotion\IPlayerEmotion.cs Wizard.Battle.Player.Emotion\IPlayerEmotion.cs fe56394e17ad9a097aa1ef3da9df965c05e62c9850c21601b49b6eb87841d1d8 0 +Wizard.Battle.Player.Emotion\NetworkOpponentEmotion.cs Wizard.Battle.Player.Emotion\NetworkOpponentEmotion.cs 25657cf1f6415c83bc58885dc513d76ccf7985933773feb8dd39d47b3c1be6a8 0 +Wizard.Battle.Player.Emotion\NullEmotion.cs Wizard.Battle.Player.Emotion\NullEmotion.cs c1318df605e2d6091d061ae7ab2912086641339782ce7772ccdb69e6017751d6 0 +Wizard.Battle.Player.Emotion\NullPlayerEmotion.cs Wizard.Battle.Player.Emotion\NullPlayerEmotion.cs 06b4b9904bff94caec65f7ac4787c26e8a5a1d8c7bf011d71c9ee72206d3795c 0 +Wizard.Battle.Player.Emotion\PlayerEmotion.cs Wizard.Battle.Player.Emotion\PlayerEmotion.cs f5c02d38012cea684c668d7db6b07cdeaecd31072a6d2bc727fc2ddbbb5689ca 0 +Wizard.Battle.Recovery\AINetworkBattleOperationRecorder.cs Wizard.Battle.Recovery\AINetworkBattleOperationRecorder.cs 6379b1f57a1a9e15956b55c3eee5da0fe0d2f1c94d2a0c5125a7d1b1aee9e0a4 0 +Wizard.Battle.Recovery\AINetworkBattleRecoveryRecordManager.cs Wizard.Battle.Recovery\AINetworkBattleRecoveryRecordManager.cs fd3735653061b2d2e25f1bb27f88cb394cfc5fa130235849e411ccf154417c77 0 +Wizard.Battle.Recovery\BattleConditionEnemyInfo.cs Wizard.Battle.Recovery\BattleConditionEnemyInfo.cs 35f6c55a91314ee7cda4d1c93658aaafa972118ef0363c736dcd752bcaaaaaf0 0 +Wizard.Battle.Recovery\BattleConditionInfo.cs Wizard.Battle.Recovery\BattleConditionInfo.cs d24a150006f866efadf537fd45c760cfed23d3373be6c7fcf39438827e00226f 0 +Wizard.Battle.Recovery\BattleConditionPlayerInfo.cs Wizard.Battle.Recovery\BattleConditionPlayerInfo.cs 82270e49e674a227d787fca1094c22e7a658b20defb16c97aede6277b37687c6 0 +Wizard.Battle.Recovery\CardInfoBase.cs Wizard.Battle.Recovery\CardInfoBase.cs 3f0fae0f3f349df4971545fd110ca59e54f61fba2b12561e5bc2c7b7cbe480a7 0 +Wizard.Battle.Recovery\CemeteryCardInfo.cs Wizard.Battle.Recovery\CemeteryCardInfo.cs 46ce6f2b9545c53125d01c675a73b68d3bd15657043ade82d12faf4d164879ef 0 +Wizard.Battle.Recovery\DeckCardInfo.cs Wizard.Battle.Recovery\DeckCardInfo.cs 39d2175e71f975b31bd61541a1fdfc71ed23bc1d65c8975d144af84c36afefd5 0 +Wizard.Battle.Recovery\HandCardInfo.cs Wizard.Battle.Recovery\HandCardInfo.cs b0415ca48e21a5a7d9c5d71b0540155bddf640512bedfb61ce76b23eb6b3c477 0 +Wizard.Battle.Recovery\IRecoveryManager.cs Wizard.Battle.Recovery\IRecoveryManager.cs 183fafee041522a2c67f6e3c0b50751e4591e507f8f2950658fbc29ad3cbc78d 0 +Wizard.Battle.Recovery\IRecoveryRecordManager.cs Wizard.Battle.Recovery\IRecoveryRecordManager.cs f8f95b3c268918fd18b849616a576e763819bf3d376dbbdb4a60393370a2d4e7 0 +Wizard.Battle.Recovery\InPlayCardInfo.cs Wizard.Battle.Recovery\InPlayCardInfo.cs 63491906ad4c2e18fd2e7eadec2ee92d15eda18b8f726ec38f969da79e30155c 0 +Wizard.Battle.Recovery\NetworkBattleOperationRecorder.cs Wizard.Battle.Recovery\NetworkBattleOperationRecorder.cs 187f991004d911e84ff0c8dbbb97d38cb06e754b58283b13debfbe33a53f95f2 0 +Wizard.Battle.Recovery\NetworkBattleRecoveryManager.cs Wizard.Battle.Recovery\NetworkBattleRecoveryManager.cs 23cd6c9938774455f9960ee06296cd2a56a1fc0f61014a07caccec86603bcc72 0 +Wizard.Battle.Recovery\NetworkBattleRecoveryRecordManager.cs Wizard.Battle.Recovery\NetworkBattleRecoveryRecordManager.cs 83771ee98a8092c33bfdbebe4271a3a28829d23ceaec8d9bb4e1933d0755a20f 0 +Wizard.Battle.Recovery\NullRecoveryManager.cs Wizard.Battle.Recovery\NullRecoveryManager.cs cda3f270ddd3fd686a0c2c97fe4cf2db18c7355456edf2f8c35f60caff753f32 0 +Wizard.Battle.Recovery\NullRecoveryRecordManager.cs Wizard.Battle.Recovery\NullRecoveryRecordManager.cs d9fc4f9bbf285d820fd6e4346de1f23986428383ef791aed731adcdc8b168480 0 +Wizard.Battle.Recovery\OperationRecorderBase.cs Wizard.Battle.Recovery\OperationRecorderBase.cs 1291b862fc0bccd5cc9c96af41498e36e2521a1c0f0655a81f78b4d4eef02877 0 +Wizard.Battle.Recovery\RecoveryController.cs Wizard.Battle.Recovery\RecoveryController.cs b433838072979be22767455344a4529b74ec0cc4261c4606ec2100897b7e8889 0 +Wizard.Battle.Recovery\RecoveryDataHandler.cs Wizard.Battle.Recovery\RecoveryDataHandler.cs 972832014b77ce9a1f5fff1df87a2222b8c62aedc2057bb931646e85bee24c08 0 +Wizard.Battle.Recovery\RecoveryManagerBase.cs Wizard.Battle.Recovery\RecoveryManagerBase.cs 84aabcfd0acf652a15099057957432676384f0db3227953917208403c3cb8a2e 0 +Wizard.Battle.Recovery\RecoveryNetworkManagerBase.cs Wizard.Battle.Recovery\RecoveryNetworkManagerBase.cs cf7750bc684a93e208345a7b2294386e2b9c347385a49ed6303ad6ff3b1e7e0c 0 +Wizard.Battle.Recovery\RecoveryOperationInfo.cs Wizard.Battle.Recovery\RecoveryOperationInfo.cs 37787cc77b98e18d1d4b9727d6bb640c04f47adf15ac463aab7b609e80a756ac 0 +Wizard.Battle.Recovery\RecoveryRecordManagerBase.cs Wizard.Battle.Recovery\RecoveryRecordManagerBase.cs 272f5bf53d47ca90c2ad69377eab055c2e6f47fac6421a4864c0f414383ff973 0 +Wizard.Battle.Recovery\ResultConditionInfo.cs Wizard.Battle.Recovery\ResultConditionInfo.cs 52d21760da08ba7b0e6e067cb7dc7a3890638ed6949305d3ad42a1fdf04e4743 0 +Wizard.Battle.Recovery\SetupConditionInfo.cs Wizard.Battle.Recovery\SetupConditionInfo.cs a5b78784312eb08496ef6db3b2c61a53957cf288c93c53714674972f5f4d2b9e 0 +Wizard.Battle.Recovery\SingleBattleOperationRecorder.cs Wizard.Battle.Recovery\SingleBattleOperationRecorder.cs 79fcd07bd2f7f3be32376856db6525b0c1f358ba06b7e249dce97bea8bc933e8 0 +Wizard.Battle.Recovery\SingleBattleRecoveryManager.cs Wizard.Battle.Recovery\SingleBattleRecoveryManager.cs 25db0435c1699768e94c47a781a343fcb610d6fff36d07d8f761e0f00e776957 0 +Wizard.Battle.Recovery\SingleBattleRecoveryRecordManager.cs Wizard.Battle.Recovery\SingleBattleRecoveryRecordManager.cs ab5cd4adaf2efa49f19cf91da2892271a730eb764a2024c0c5694aa7752c15b3 0 +Wizard.Battle.Resource\BattleResourceMgr.cs Wizard.Battle.Resource\BattleResourceMgr.cs 3b4f7a78710d82e763164ca8bdf257a4c238b9986120e4d560be27574c179e57 0 +Wizard.Battle.Resource\IBattleResourceMgr.cs Wizard.Battle.Resource\IBattleResourceMgr.cs 59e39c39afa8186f237fa879f5cdb043aa2dc99e5117eb0e1204df77b563d607 0 +Wizard.Battle.Resource\NullBattleResourceMgr.cs Wizard.Battle.Resource\NullBattleResourceMgr.cs 492b03d15cadeb08296bc74eb1a1b0c887756d1d87071ca1486a49f848a29a15 0 +Wizard.Battle.Resource\RecoveryBattleResourceMgr.cs Wizard.Battle.Resource\RecoveryBattleResourceMgr.cs 871da5e5d941195e8a07db734202dfc2fb45e7067dee882ae7d41e2c9e28721a 0 +Wizard.Battle.Sound\LeaderSoundManager.cs Wizard.Battle.Sound\LeaderSoundManager.cs 50eb5262cd65deb22c5eb5ea3b47735844e8282d3e9b2ac064f520a9e12d397f 0 +Wizard.Battle.Touch/ITouchProcessor.cs Wizard.Battle.Touch/ITouchProcessor.cs 6343a8aa50461bcb5e99f9cc9a689d81bd62516266456f7821da962ab93bd369 0 +Wizard.Battle.UI/IClassInfomationUI.cs Wizard.Battle.UI/IClassInfomationUI.cs 05831a370255fda7e5f0091a278fb0c35ce7dd81c504395127589505e9cce4ee 0 +Wizard.Battle.UI/LogType.cs Wizard.Battle.UI/LogType.cs a8de41a8d5d8f2289f75b9b9fc25d277e74c42723e78d09762fc72ae5f5e9e34 0 +Wizard.Battle.UI/SkillGainType.cs Wizard.Battle.UI/SkillGainType.cs 7b12e7d3982bbf23dfeebbd90ea5fb045d801ff47d7713a3fb835db9642d05a5 0 +Wizard.Battle.View.Vfx/VfxResultEventExtension.cs Wizard.Battle.View.Vfx/VfxResultEventExtension.cs e34ff65e9a0df76f24f17185b3a80ebab326f4e413bccc18f084efea9a4094ac 0 +Wizard.Battle.View/HandCardFrameEffectType.cs Wizard.Battle.View/HandCardFrameEffectType.cs 0457f58fe09057aa9f32c8b131186d1a252aaf30930e4269ef204d6429188ff5 0 +Wizard.Battle.View/HandParameter.cs Wizard.Battle.View/HandParameter.cs e55287d3bdf32b98849f626ef833c347311a3483ffca92a73c70c9598955ec40 0 +Wizard.Battle.View/IBattleCardView.cs Wizard.Battle.View/IBattleCardView.cs 79657bc2b1a864d548e9929640d5f2322561041114119ff3f6ce987c1a073f68 0 +Wizard.Battle.View/IBattlePlayerView.cs Wizard.Battle.View/IBattlePlayerView.cs 8b131ef553141fb3ee9d17732d373e7b7422f870a10cba68e2bde6ef3311096e 0 +Wizard.Battle.View/IClassBattleCardView.cs Wizard.Battle.View/IClassBattleCardView.cs 15fa11b56a919f4f04a2429ed7b31d92839ae228356ae4fa805b23d867a6e750 0 +Wizard.Battle.View/IPlayerView.cs Wizard.Battle.View/IPlayerView.cs d0f937abd9dfa4130e0d0ea2892c539aef0023df1eeb0d0dbe13a4f80ee26f50 0 +Wizard.Battle/ActionProcessor.cs Wizard.Battle/ActionProcessor.cs 7c8b40454a4948dd48a58c0efc240703eab9a77aea0add64e542f6b06c7323af 0 +Wizard.Battle/IBattleCardUniqueIDExtension.cs Wizard.Battle/IBattleCardUniqueIDExtension.cs efa2bdc5fb017ca2a83be8bbe04c45d61108677bc19a6e755798153426270191 0 +Wizard.BattleMgr\IBattleMgrContentsCreator.cs Wizard.BattleMgr\IBattleMgrContentsCreator.cs 7f1410027b146fe028bfadf5940599f1e576063dfa764e0be2754dfd7d19e30f 0 +Wizard.BattleMgr\RecoveryNetworkBattleMgrContentsCreator.cs Wizard.BattleMgr\RecoveryNetworkBattleMgrContentsCreator.cs e99bea259ffacb5780693918571ecd548b01c567b2266aa9a1ac9d17423a242a 0 +Wizard.Battle\EnemyAIInnerOptionsBuilder.cs Wizard.Battle\EnemyAIInnerOptionsBuilder.cs caaecda6f73da8c458bee8f4e67dd5ea1bfaf8cf17c2cf1636e98fff84a927b0 0 +Wizard.Battle\IBattleCardUniqueID.cs Wizard.Battle\IBattleCardUniqueID.cs 0b1559e61bfd02f584b4830ad53aa6ce521665c00ff44ee89dda2953c9c3d781 0 +Wizard.Battle\IInnerOptionsBuilder.cs Wizard.Battle\IInnerOptionsBuilder.cs 38160d48e9b01d686c0fd51a5743ee97afb742c97c1fda347460047a7d17b928 0 +Wizard.Battle\IReadOnlyBattleCardInfo.cs Wizard.Battle\IReadOnlyBattleCardInfo.cs 1b3456595cf0664d7b1e3324268f84cf913c3e2778ecbacc63b0c0ba72ab2e8c 0 +Wizard.Battle\NetworkOpponentInnerOptionsBuilder.cs Wizard.Battle\NetworkOpponentInnerOptionsBuilder.cs 146590588d04b2c86dca19207a14ed0f9510db6385d808310700a396ffb97928 0 +Wizard.Battle\NullInnerOptionsBuilder.cs Wizard.Battle\NullInnerOptionsBuilder.cs 549ee05b3ef2b986949be196806ba58c411d82f84d2fcd5537c2824caeb4bf49 0 +Wizard.Battle\PlayerInnerOptionsBuilder.cs Wizard.Battle\PlayerInnerOptionsBuilder.cs 0ed76b5df3e18db737576bc6a4c8f06dbdaf227a67d8ca07d39cbbc10947e970 0 +Wizard.Bingo\BingoDrawTask.cs Wizard.Bingo\BingoDrawTask.cs 9c235721777d20d8d0bf0eba785c92b794881142c4904ead3fbb73bd9c28d995 0 +Wizard.Bingo\BingoInfoTask.cs Wizard.Bingo\BingoInfoTask.cs 3c651be0075b3dfdf781286166ddcffa16771a6a73eff7ae7d76a8a9e7a8d315 0 +Wizard.Bingo\BingoMissionDialog.cs Wizard.Bingo\BingoMissionDialog.cs 979377d116e53fbb2b126eee2d2ee6b27856ebbc6305e0c04ea651d4e7c98e09 0 +Wizard.Bingo\BingoPage.cs Wizard.Bingo\BingoPage.cs 5e806667bd74fcd0ba59bdd9506d53a3395b4a76f0607518579a3c2022e01fc5 0 +Wizard.Bingo\BingoRewardsDialog.cs Wizard.Bingo\BingoRewardsDialog.cs 286d731b08070587ff651349c51f80a1b195f99d2020d52f379d3d6463f4781a 0 +Wizard.DeckCardEdit\CachingCardBundle.cs Wizard.DeckCardEdit\CachingCardBundle.cs 3efcb163e9be8d023e12394684c83745081c500cf13a84b91674aab0eeace113 0 +Wizard.DeckCardEdit\CardBundle.cs Wizard.DeckCardEdit\CardBundle.cs ae56efeea60e2288b595d57f6b48bc83661ff8f22b0607746a39b080714e439e 0 +Wizard.DeckCardEdit\CardBundleController.cs Wizard.DeckCardEdit\CardBundleController.cs fa0cf42cf3d42e56dbcf0702ba21f15ccf4f4f38a7318472cbf8f473f7d97a61 0 +Wizard.DeckCardEdit\CardBundleControllerBase.cs Wizard.DeckCardEdit\CardBundleControllerBase.cs 2b782fafb3043b1c67799228bf41ce3997bfa7c0a23492e090512c3677c62820 0 +Wizard.DeckCardEdit\CardCreator.cs Wizard.DeckCardEdit\CardCreator.cs e0c36db83ca43934ae4220f914a5da027cf8cf8d7a81e593bc6782ae5fa7dde1 0 +Wizard.DeckCardEdit\CardObject.cs Wizard.DeckCardEdit\CardObject.cs 602634f96d9c4c897465a2d3cebca885c7696135cfd4ebe9881bdd70fb97bf88 0 +Wizard.DeckCardEdit\CardSelectListUIBase.cs Wizard.DeckCardEdit\CardSelectListUIBase.cs cceeab0e7c06de1d414c846c9b75132ee35a7487a17b0ef89b0f6b1056683f13 0 +Wizard.DeckCardEdit\CardSelectListUI_State_CardDrag.cs Wizard.DeckCardEdit\CardSelectListUI_State_CardDrag.cs a4272875e7031b3d6c6b28c2133c4cbfe95532bc78984621ee569612c7559b91 0 +Wizard.DeckCardEdit\CardSelectListUI_State_Edit.cs Wizard.DeckCardEdit\CardSelectListUI_State_Edit.cs 2ceb554e8695117380ffbb8d8d653eec9d117a25325f4a11a828a1daf0e7e4df 0 +Wizard.DeckCardEdit\DeckCardEditUI.cs Wizard.DeckCardEdit\DeckCardEditUI.cs ac6172c070e028adf71839ba2a607383dcd58168077e68243ae53e4dc618abac 0 +Wizard.DeckCardEdit\DeckSave.cs Wizard.DeckCardEdit\DeckSave.cs 1fd5f1ef0fcb288eb9e28a0dce4796cce3afd61d7d2692e931f83111516825e1 0 +Wizard.DeckCardEdit\FilteringCardBundle.cs Wizard.DeckCardEdit\FilteringCardBundle.cs 920e6cb5399277f6f2e2825e6cd5610b5d4dffb50d4c87b540a1d4b53b5d97ca 0 +Wizard.DeckSelect.FirstDisplayPageIndexGetter\DefaultFirstDisplayPageIndexGetter.cs Wizard.DeckSelect.FirstDisplayPageIndexGetter\DefaultFirstDisplayPageIndexGetter.cs e0c65bb6b43540c9021988f3517a05eb138134aa5b8fd16b74e9010eccf81f35 0 +Wizard.DeckSelect.FirstDisplayPageIndexGetter\FirstDisplayPageIndexGetterBase.cs Wizard.DeckSelect.FirstDisplayPageIndexGetter\FirstDisplayPageIndexGetterBase.cs 40d49191845c1ef7511756a754e18726428eb4a14a4c3e2216cf8f04f4b0b95b 0 +Wizard.DeckSelect.FirstDisplayPageIndexGetter\IFirstDisplayPageIndexGetter.cs Wizard.DeckSelect.FirstDisplayPageIndexGetter\IFirstDisplayPageIndexGetter.cs c0964e222f42a338369b5b77bfa65080dc7cf3b89cf384ae3f6068d982cd2b6c 0 +Wizard.DeckSelect.FirstDisplayPageIndexGetter\QuestFirstDisplayPageIndexGetter.cs Wizard.DeckSelect.FirstDisplayPageIndexGetter\QuestFirstDisplayPageIndexGetter.cs 5e9ccf095c3d5aaa4e48b1de47ca7fc2f933e622ef4463d0861a90b5e1a7be99 0 +Wizard.Dialog.DataLink\IdPasswordInput.cs Wizard.Dialog.DataLink\IdPasswordInput.cs f36fd526687d2a0578a508ff43a9227c96b4846eee909e33ba410f99740eee73 0 +Wizard.Dialog.DataLink\PasswordSetting.cs Wizard.Dialog.DataLink\PasswordSetting.cs 7e92885af115503f47fde51f9f6d8f761137fddf511d9a30860b60a46e8f0fb5 0 +Wizard.Dialog.Setting\ItemButton.cs Wizard.Dialog.Setting\ItemButton.cs 534a6040f8beee1a07181aecefb984c7968f12e262332c650f079e3d900443a8 0 +Wizard.Dialog.Setting\ItemGrid.cs Wizard.Dialog.Setting\ItemGrid.cs dcf11b1527c573daea9cbf7cfbb8c10a589ef6c68bed7af13dd21175299f8fed 0 +Wizard.Dialog.Setting\ItemLabel.cs Wizard.Dialog.Setting\ItemLabel.cs 6d738f7192ed4d48e3f6d976282e8c6b61d7de89df0d274109eb52b0d5b55cd9 0 +Wizard.Dialog.Setting\ItemSelect.cs Wizard.Dialog.Setting\ItemSelect.cs 8476cc133b1245660f95957542919f8141711a7f8643fb9bf9847bbce2acf4d0 0 +Wizard.Dialog.Setting\ItemSlider.cs Wizard.Dialog.Setting\ItemSlider.cs cba121f524678e029764be0dc6e5f1d4a4e5962d3db547dcc8d9756f44a6290f 0 +Wizard.Dialog.Setting\ItemToggle.cs Wizard.Dialog.Setting\ItemToggle.cs f4e3ab638edcd310a56da40c48c578fb2d1419836f631fc51927687e9df7c4fb 0 +Wizard.Dialog.Setting\SettingBase.cs Wizard.Dialog.Setting\SettingBase.cs 57bb82b20bdeca249e6991783268f707de706f2e456bfb063714be3af75c3cf6 0 +Wizard.ErrorDialog\Dialog.cs Wizard.ErrorDialog\Dialog.cs 19ca6f8150bbec122121a53c1166ad4fb5634e58c7e233b5be79d3865a2c23b7 0 +Wizard.Lottery\DoubleChanceData.cs Wizard.Lottery\DoubleChanceData.cs 45ae69b003caf8018be47699ccd21d4979cd0ef83a84e46acc50e6425f247c34 0 +Wizard.Lottery\LotteryApplyData.cs Wizard.Lottery\LotteryApplyData.cs a1f736b119c42db936962ef4b57821e5f0aaf4ab1458b6c2f92f25c727e4efcc 0 +Wizard.Lottery\LotteryApplyDialog.cs Wizard.Lottery\LotteryApplyDialog.cs 8787f2ff7ae2f2b65a3b8c67419ccaa7bde8cef3345f5b439c5947dec470904d 0 +Wizard.Lottery\LotteryBigChanceTreasureBox.cs Wizard.Lottery\LotteryBigChanceTreasureBox.cs f3e3b6b80a29fced104dd21bea65d21ca30dc7debf429193cebec97f2b94de7e 0 +Wizard.Lottery\LotteryInfoTask.cs Wizard.Lottery\LotteryInfoTask.cs 9ffdf996f9d23511427a2d19f85056187ed619fcc057f2d5a5f982f2cff48f6e 0 +Wizard.Lottery\LotteryLoadTaskData.cs Wizard.Lottery\LotteryLoadTaskData.cs 4c935c7750aed7c86abc7984c465c869b5f3b6535e0c62925b74e0f9dac5d5c0 0 +Wizard.Lottery\LotteryMissionData.cs Wizard.Lottery\LotteryMissionData.cs 2844dfd64d868c6ee758e9a32c986cdc2ffe9c3d7cefba74f151b3248569a9a0 0 +Wizard.Lottery\LotteryMissionDialog.cs Wizard.Lottery\LotteryMissionDialog.cs 002c660ba2174e63c5a198ff16656843eb4d1d9734383bcb4da1c1528965af2f 0 +Wizard.Lottery\LotteryMissionTreasureBox.cs Wizard.Lottery\LotteryMissionTreasureBox.cs 2dd2831bce979e9cfaf1b0c4bef4514d2f1048e3ba22533a9ebf931462c908e6 0 +Wizard.Lottery\LotteryPage.cs Wizard.Lottery\LotteryPage.cs a5a97a7b28946779d4ebea31cccd2b6277bbbbae945823110f3f23541ba07977 0 +Wizard.Lottery\LotteryReceiveBigChanceTask.cs Wizard.Lottery\LotteryReceiveBigChanceTask.cs 0010ea6f71467290e35e5355db17af8e65ad8270aa71e1211414a393db262dd6 0 +Wizard.Lottery\LotteryReceiveDoubleChanceTask.cs Wizard.Lottery\LotteryReceiveDoubleChanceTask.cs 4ad932089f01371ffcfd8517a4d85515a5b59e3f2a886c5232aaf0c11f43063f 0 +Wizard.Lottery\LotteryReceiveTask.cs Wizard.Lottery\LotteryReceiveTask.cs 583a8c70272db900446ab96c3f47578b8b837c8326a4697e6847a4391e30a737 0 +Wizard.Lottery\LotteryRewardData.cs Wizard.Lottery\LotteryRewardData.cs 27fadecd62fe1cb28a699bd3c50d1524810c60f9e12bb1ffdacda4bba8f51281 0 +Wizard.Lottery\LotterySpecialRewardDialog.cs Wizard.Lottery\LotterySpecialRewardDialog.cs e0081b816349f36c61bf8f82f4a4dc461258da6dd89f9877a15bf43942677792 0 +Wizard.Lottery\LotteryTreasureBox.cs Wizard.Lottery\LotteryTreasureBox.cs 9eafd4ea6ea090d35cfa571b6e9b0f86d28a5f9515cdc5365588b32789bee88c 0 +Wizard.QuestSpecialResult\QuestAssetManager.cs Wizard.QuestSpecialResult\QuestAssetManager.cs 13ae6dae3eb9d98368e13a0435e061fa70f0b8a5965c591e3bd41ff16d452947 0 +Wizard.RoomMatch/RoomParamKey.cs Wizard.RoomMatch/RoomParamKey.cs 3379dd5de06cd1d204f97118b9a24697776a1301bf842f1301675d4f4d86c936 0 +Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateCard.cs Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateCard.cs b89c513435bb4d68607d6d0e5ee95a76144fd0fccb5abdb58b1a73ffed9a7309 0 +Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateChaos.cs Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateChaos.cs cfb1306d5d36d0221864b7302fa4f4949faa16c8cd0c4a6421b681e6326b0d96 0 +Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateClass.cs Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateClass.cs 1f202e563482a99757b7d6755f8358f7a5efb618eb4efc000b679fc17c7558a1 0 +Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\Deck.cs Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\Deck.cs ba318f314b1dfaf7a4f91cba398751d50aec815246f09500fe8ac6a89f792f8b 0 +Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\EntryInfo.cs Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\EntryInfo.cs 240f12c8b4c21db4e85fcb52da2f13ab106feb581ee0486c350085c9a8bb5336 0 +Wizard.Scripts.Network.Data.TableData.Ranking\MyMasterRanking.cs Wizard.Scripts.Network.Data.TableData.Ranking\MyMasterRanking.cs 242bbba9319329461178b7566f78bc8539daa2f0635afdd81b96d218c33044e7 0 +Wizard.Scripts.Network.Data.TableData.Ranking\RankingPeriod.cs Wizard.Scripts.Network.Data.TableData.Ranking\RankingPeriod.cs c4c4336df8f558569a32bb3286b6c2db262cf1e91a41bf9e7d388981b74db82b 0 +Wizard.Scripts.Network.Data.TableData.Ranking\RankingPeriodList.cs Wizard.Scripts.Network.Data.TableData.Ranking\RankingPeriodList.cs c5b2cb5a25a9f47b2e4b1276b0aa84f60b9136ce60e3ecb40bb0792c46ca2294 0 +Wizard.Scripts.Network.Data.TableData.Ranking\RankingUser.cs Wizard.Scripts.Network.Data.TableData.Ranking\RankingUser.cs bf8b182dc325ae02dd3b9faa88376a2b3d9ebd71720e0c72e6c5300cfac06581 0 +Wizard.Scripts.Network.Data.TableData\ItemAcquireHistory.cs Wizard.Scripts.Network.Data.TableData\ItemAcquireHistory.cs d6af52c75aa667b6e66fc74a8d871c6e611088c3023dbcde5b8a2af70607a5c2 0 +Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick\BattleResult.cs Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick\BattleResult.cs f14525b028d6a24a05d061b11d7a7c5e516340d3c185b0d66fbe559d0fbf0913 0 +Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick\CandidateCardInfo.cs Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick\CandidateCardInfo.cs 4fe633f3232f5a039d12dc15f4344e2f7c010f2f5e10fd846e13464d5679bc17 0 +Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick\Entry.cs Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick\Entry.cs 4b9078e65a0f36aa12ab8285a0d15ea4edeb531c745aacd6a29f0051baa988f8 0 +Wizard.Scripts.Network.Data.TaskData.Arena\Finish.cs Wizard.Scripts.Network.Data.TaskData.Arena\Finish.cs b7cbcb0e8a7113cfb7b7b2fc2921c7049543b5ef8ea14e775afddc44f1b593bb 0 +Wizard.Scripts.Network.Data.TaskData.Arena\FinishDetail.cs Wizard.Scripts.Network.Data.TaskData.Arena\FinishDetail.cs ebe125e8b5c023d06bc825225e77f9688d455bb681efdd156fb808f7223504b2 0 +Wizard.Scripts.Network.Data.TaskData.Arena\TwoPickInfo.cs Wizard.Scripts.Network.Data.TaskData.Arena\TwoPickInfo.cs 8e76e6eca0a1bfae75aace89bb9e3bcd9edba9d5536e2ddc19e88e9b088e3ac1 0 +Wizard.Scripts.Network.Data.TaskData.Battle\DoMatchingResponse.cs Wizard.Scripts.Network.Data.TaskData.Battle\DoMatchingResponse.cs 0333da0ebce1e8f6fec5d43ae0995ed62490be9536dde8868d4e70e0015b7879 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckBuyTask.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckBuyTask.cs bf259e4e745e2e7ca90860e31d9cdafdf3f1b0b81bea289a66c781588007998c 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckDetailWindow.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckDetailWindow.cs 4a9c050e5aac15a4bc941d11ff7742db9053ae28104695633de6f9fb39e195b9 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPlate.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPlate.cs bd9c91055c8a8f1568d52aa151905a4b2f48bbdae67ce8e220d5d6e2d926bf08 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckProductInfo.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckProductInfo.cs 2db317cebfbedee935a6035145c5c580ce1f4f9ea1b054485c16b8697f4fea6b 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchaseInfo.cs 045817a97fbc695eaa151ed8bba8878f1296ff764f3c7967c7f7aa762cb386c6 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchaseInfoTask.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchaseInfoTask.cs 4354baf3caae53349994512d02bf7279a1e9670c1cf57336a6160e8afac02aa7 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchasePage.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckPurchasePage.cs 9195762e8890b62bac3795bbae963a167aa494df9704b1cc1f394ebe332def4c 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckSelectBuyMeansDialog.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckSelectBuyMeansDialog.cs 505e70d4cbf0c22591efd8a324b5cac980bb6ec1297d9fa88348f571f95e6b5e 0 +Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckSeriesPurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase\BuildDeckSeriesPurchaseInfo.cs d8aba20b16e641ba45718dafa95bb5bcd20c65417572dcad4a4e6f97fc96d7b4 0 +Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseBuyTask.cs Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseBuyTask.cs 5efb8b505dfdce8f140a7272da996a88f88f6689bce8fa1cc1a7e849ceeedca2 0 +Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseData.cs Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseData.cs 0804c342fc51f32cc6960cf06b9fb48de29b7c63cfe6f97b52b6c0144c872f02 0 +Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseInfo.cs 6a7f437d68999ac72e72ee3b2770792118bc3831d0186e1848885ad863fde0f6 0 +Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseInfoTask.cs Wizard.Scripts.Network.Data.TaskData.ItemPurchase\ItemPurchaseInfoTask.cs 3a3a316f5c0c9690d79e6971397ec4733db43a5181756bdc4f470ffafe3b068c 0 +Wizard.Scripts.Network.Data.TaskData.Ranking\MonthlyRanking.cs Wizard.Scripts.Network.Data.TaskData.Ranking\MonthlyRanking.cs ee7df866956e2aedc6236294098a235b1298543040bdb39edfb90d850fb15363 0 +Wizard.Scripts.Network.Data.TaskData.Ranking\MyMasterPointHistories.cs Wizard.Scripts.Network.Data.TaskData.Ranking\MyMasterPointHistories.cs cbe5266fc37e82bdb0c3c094e4cd82681f187e83a6ad8adebdc88a29680deb6c 0 +Wizard.Scripts.Network.Data.TaskData.Ranking\Ranking.cs Wizard.Scripts.Network.Data.TaskData.Ranking\Ranking.cs ec842ab5aac1dad72bba1e0e4722d17648d7ac568cb5795f9cd6703726853f15 0 +Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinBuyMultiRewardTask.cs Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinBuyMultiRewardTask.cs 46be5d0d3110f7fc0e5f5dc018a89e5780941a759bb6bb4de465756fb124ce03 0 +Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinBuyMultiTask.cs Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinBuyMultiTask.cs 4af078ea2d4cb897257d781a4a2338f678a95d5a813c705d27bb33540e4f8909 0 +Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinBuySingleTask.cs Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinBuySingleTask.cs 2cabd30e7d9548558bb3f987a6f99510112896a78e695dc32b89800e0ad1d515 0 +Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinProductInfo.cs Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinProductInfo.cs c555ffcdaba0fd3a23cce2489064cba939a1757bb56889688ae85c804570e035 0 +Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinPurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinPurchaseInfo.cs cd255fc4b2072fbcdfdf57e2c42572fb14fd130cb868cd8125afa457ef9575c0 0 +Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinSeriesPurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.SkinPurchase\SkinSeriesPurchaseInfo.cs 577ccb55ec4ee7509c800664f8ac7cb3896be2d80ca2cd6e3da547da57f7d4ef 0 +Wizard.Scripts.Network.Data.TaskData.SleevePurchase\SleeveProductInfo.cs Wizard.Scripts.Network.Data.TaskData.SleevePurchase\SleeveProductInfo.cs c6dfa9ab00a60bba685246b865a7990c81ab1ad1142cc12763faf28241bdc210 0 +Wizard.Scripts.Network.Data.TaskData.SleevePurchase\SleevePurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.SleevePurchase\SleevePurchaseInfo.cs dbe4f16b4d7d70531028579c04041a95afbff55c3a21256140b94f014eea04b0 0 +Wizard.Scripts.Network.Data.TaskData.SleevePurchase\SleeveSeriesPurchaseInfo.cs Wizard.Scripts.Network.Data.TaskData.SleevePurchase\SleeveSeriesPurchaseInfo.cs 249c364f08a6f3e574f4b44030aa7c8886abe5538468d75152ae4943e395ef66 0 +Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\GachaPointExchangeInfoTask.cs Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\GachaPointExchangeInfoTask.cs f118ce761c23f0a672ec16dc46d42da486c0950c39edb3e9b21cc02b54262e14 0 +Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\GachaPointExchangeTask.cs Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\GachaPointExchangeTask.cs cd723ac9658b8f5f15bc609f500fd08791734593815ee7f542b949c36eaadad2 0 +Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\SpotCardExchangeInfoTask.cs Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\SpotCardExchangeInfoTask.cs bec97c8be6a014ee2d01e4855dc090022b70119e51856978c8bbe15608336d7c 0 +Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\SpotCardExchangeTask.cs Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\SpotCardExchangeTask.cs 53581da430a338cb178b66c999b918e94ad9910b1f3a817fef051cdd779aecd2 0 +Wizard.Scripts.Network.Data.TaskData\ItemAcquireHistoryInfo.cs Wizard.Scripts.Network.Data.TaskData\ItemAcquireHistoryInfo.cs 4c472401abcddb81bf2cdaaddc6ed0ade73d7da1dfb9f67c3452ee5a4c969723 0 +Wizard.Scripts.Network.Task.Arena.Competition\CardChooseTask.cs Wizard.Scripts.Network.Task.Arena.Competition\CardChooseTask.cs 93ccfceafd67e9942a7b317b90451bd68c55797e495216c6b44bb1e8638938f4 0 +Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs 90813f49ebcdbd86c744c0314fa8c33cfecf1ac3b25654a6bc9bd1d42efe8a2f 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\ClassCharaChooseTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\ClassCharaChooseTask.cs 8bcdf7ed2a08f985de5f275fa170b78dfb1a8e2476dfca944dd7247d6af7d8bd 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\EntryTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\EntryTask.cs de7966ee9b54fcd6253410cdd68fd4a77913ac149f28855041c751927e424dcd 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\FinishTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\FinishTask.cs 681c3bdb8be55a1f506cccdfd59b3e7f0af81516678797449e868fdef781d96a 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\RetireTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\RetireTask.cs 30ad231683ad77b44f0a2af37576b8a9606ca6fa88397b08be9e50b9f15f75d4 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\TopTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\TopTask.cs dfc082986790a4b486316a8ff97e36667373b9ea6948040dbbdc1280f515efdf 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\TwoPickDoMatchingTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\TwoPickDoMatchingTask.cs 19f1b7e448c04ffd7adc9c67159fbe9267f56d69befe0de0bec64d32110bd785 0 +Wizard.Scripts.Network.Task.Arena.TwoPick\TwoPickFinishBattleTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\TwoPickFinishBattleTask.cs 53ed74a982e1b150d4529cbe599e4d78956e6c8553a9587c2eab2b740e2cdfe4 0 +Wizard.Scripts.Network.Task.Arena\ArenaEntryTaskBase.cs Wizard.Scripts.Network.Task.Arena\ArenaEntryTaskBase.cs c90dd25ddbe958f1b7dd5232fc1fb0869c633aa8f5479a254eca74e9b8caf21a 0 +Wizard.Scripts.Network.Task.Arena\ArenaRetireTaskBase.cs Wizard.Scripts.Network.Task.Arena\ArenaRetireTaskBase.cs 360c197720496476b74663417abc4fe0566aa80ec367b6b78e53873de3e9382c 0 +Wizard.Scripts.Network.Task.Arena\ArenaTopTaskBase.cs Wizard.Scripts.Network.Task.Arena\ArenaTopTaskBase.cs fbe64a62489560079041134eec8e483370391d4196c0cb405cb96d999a22a442 0 +Wizard.Scripts.Network.Task.ItemAcquireHistory\ItemAcquireHistoryInfoTask.cs Wizard.Scripts.Network.Task.ItemAcquireHistory\ItemAcquireHistoryInfoTask.cs ba8d78e8b960c6584c4734739b9d20eeb4200cc7928f55096dda2ac772859fe4 0 +Wizard/AIAccelerateUtility.cs Wizard/AIAccelerateUtility.cs 3cc7d0196d1b8264fa1acc64f15cd394d9278fe3432de268f7860db041ebbb9f 0 +Wizard/AIAttachTagSimulationUtility.cs Wizard/AIAttachTagSimulationUtility.cs 642ab3d7c5215294dca2b0340cde2ac4d10f2a51eb4dc08821dfdb2154e750fb 0 +Wizard/AIAttachedTagRemoveTiming.cs Wizard/AIAttachedTagRemoveTiming.cs 8e9fcb21eb1ef0d5eaa4f3e7baab1b7074b930b8cbeedf2205632c759716e381 0 +Wizard/AIAttackableCountSimulationUtility.cs Wizard/AIAttackableCountSimulationUtility.cs 52565094c93508241f9c63266ffb8f2995f5f5662ff88431922674e5726b53df 0 +Wizard/AIBanAttackSimulationUtility.cs Wizard/AIBanAttackSimulationUtility.cs 2ff8a7514a804143901f369c14bbe4dbbb19b68fb040623202ab051503e4dbd2 0 +Wizard/AIBanishSelectLogicArgument.cs Wizard/AIBanishSelectLogicArgument.cs 14f0aab679d51d6d80f0da96d42ee7ae0cc43d95fa49ac6f438ed6466c165f06 0 +Wizard/AIBanishSimulationUtility.cs Wizard/AIBanishSimulationUtility.cs f74d601995fb6bbd292dcbc2d70214756a265b21e938b3bbf7f85a1e7e0546d8 0 +Wizard/AIBarrierGlobal.cs Wizard/AIBarrierGlobal.cs 55686ebf9a77cc69d8fd3a19e2a2e4c527cd6ff0edbc5a431397d7f9124a7bdb 0 +Wizard/AIBasicTargetSelectUtility.cs Wizard/AIBasicTargetSelectUtility.cs 75525d16629b77f4f27ddfea6cee68059109c98ea618e2c8d4b161fc30e6e68b 0 +Wizard/AIBerserkUtility.cs Wizard/AIBerserkUtility.cs 94c6827ae773205374ecb80b82e47080d765696c3fd382cdec1a038a4d470254 0 +Wizard/AIBounceSelectLogicArgument.cs Wizard/AIBounceSelectLogicArgument.cs 8866f8448a80272d3ae32eb5e27656aefc86397b3d461e141f571f88cbe9fc5b 0 +Wizard/AIBounceSimulationUtility.cs Wizard/AIBounceSimulationUtility.cs 969780defa02f2240d956a12a1aa3ac0d7175dcaf6ecb232dc6bdf547a4d1b89 0 +Wizard/AIBrokenCostSumUtility.cs Wizard/AIBrokenCostSumUtility.cs 0122cdb6fea1a02733575b495b9b8c133e2dea3387b4dbe5a1d317785cae29d3 0 +Wizard/AIBuffCountUtility.cs Wizard/AIBuffCountUtility.cs e2da1d0a309dcdb701d22bdc3bb372436fef59a4b2b2914c0998059c01a9ab2d 0 +Wizard/AIBuffEvaluationUtility.cs Wizard/AIBuffEvaluationUtility.cs 923a4fe2434a48e467166bb6724b5a0deb81aaa9dcf1d8e505b979ffada9f716 0 +Wizard/AIBurialUtility.cs Wizard/AIBurialUtility.cs 74c699d1ecf996fb91e850825e5cf81ff1faea80ec9933aad85b8c4e3d854eac 0 +Wizard/AICannotPlaySimulationUtility.cs Wizard/AICannotPlaySimulationUtility.cs 34c15c417b18dc0f2cad90c0a37fc768027f4351b17500fa5f57dbe99930db0b 0 +Wizard/AIChangeClassSimulationUtility.cs Wizard/AIChangeClassSimulationUtility.cs add3d57f93089afc2a444c0d62544ae4adadc9931b9fa375f110d5294996c6ab 0 +Wizard/AIChangeCostSimulationUtility.cs Wizard/AIChangeCostSimulationUtility.cs 7c3320d4812e9a28469cbf1638e5e06c87bf49054a72154df1ded4ea622cd9d5 0 +Wizard/AIClashHeal.cs Wizard/AIClashHeal.cs 475805f471153a7dbd8a6acc2d4c845f58d592a6718d2713eff61433bbfe9837 0 +Wizard/AICopyTagSimulationUtility.cs Wizard/AICopyTagSimulationUtility.cs b8c2deaa29de4f39aaa02234e98a4f7fd340fef70719e98ca1a38ab3ea5fd047 0 +Wizard/AICountdownChangeUtility.cs Wizard/AICountdownChangeUtility.cs c2494aa8456455f3e02330fd561f57d29bad570416d726997f94fc8e318970fc 0 +Wizard/AICrystalizeUtility.cs Wizard/AICrystalizeUtility.cs f1e26520421a44f51907703feb043d473ec1efb33720eb85e60c067b5765083e 0 +Wizard/AIDamageClippingInfo.cs Wizard/AIDamageClippingInfo.cs 0dc2c03a3c31cae76198b3a978687cf0cb718dd5cfb22e9cefa0f0d71535a7ae 0 +Wizard/AIDamageCutInfo.cs Wizard/AIDamageCutInfo.cs 6b4c030a670ce5e60685ff3c9d3ef27b028217b15f795258e793bc5311f96b7e 0 +Wizard/AIDamageSelectLogicArgument.cs Wizard/AIDamageSelectLogicArgument.cs 041432b05d8068061e4795bb4e0486373c95d456e39d16576eec37eb633722b5 0 +Wizard/AIDamageSimulationUtility.cs Wizard/AIDamageSimulationUtility.cs f3b5f51924691f9e64b486277d59f37629fa44e8b076a61d09ea8e745de41c37 0 +Wizard/AIDeckSimulationUtility.cs Wizard/AIDeckSimulationUtility.cs b957947f7d0f7a37c11e0646863687820ed76bdd5d996bc571778b177ea90679 0 +Wizard/AIDefaultSelectLogicArgument.cs Wizard/AIDefaultSelectLogicArgument.cs c45df870462317321cce0a1f952b50b16e35a82c31138f286ec645c4cff736b0 0 +Wizard/AIDestroySelectLogicArgument.cs Wizard/AIDestroySelectLogicArgument.cs 4ea804180fb1966c5f7eb2dff8e94a9682d35e812cb25e8aa4692226b6bb4dfb 0 +Wizard/AIDestroySimulationUtility.cs Wizard/AIDestroySimulationUtility.cs dfaa3fae772cefecb4e5b67cfb16e3a29fdcb68efb5b917a12618833d75c01d9 0 +Wizard/AIDrawCountUtility.cs Wizard/AIDrawCountUtility.cs 5947b948544fd4af48637c0e2bf4b9b08f52f99d518b4609151895036b6e3c90 0 +Wizard/AIEmoteCtrlNull.cs Wizard/AIEmoteCtrlNull.cs 2b3f870faaa22a4c729a45ae99a60c180d2d4eadff8b36a8b620f54a7135d816 0 +Wizard/AIEnemyHandTagCollectionContainer.cs Wizard/AIEnemyHandTagCollectionContainer.cs bb8efc8abf69a65d80e007aa9b6e99f530d1da6f108ac161dd04b3c44e7f740c 0 +Wizard/AIEnhanceUtility.cs Wizard/AIEnhanceUtility.cs 7481cd0104af9faf09cf068a50137922ca661259580ddfcdaa01ab777d30db95 0 +Wizard/AIEvalAttackRemoveUtility.cs Wizard/AIEvalAttackRemoveUtility.cs dcb6b18227f53689161bf9e602653b7ad3d36d22ad6c8c42c26e344ca38ce180 0 +Wizard/AIEvalReanimateUtility.cs Wizard/AIEvalReanimateUtility.cs 0503a13ceb88e7beac859202819f480821b5cb75c7bd1469fb45d12710ac910f 0 +Wizard/AIEvaluateTagExtension.cs Wizard/AIEvaluateTagExtension.cs 7704ec34bf0e9d20d262f539203644563e068835014b5e3258646f4828192152 0 +Wizard/AIFusionCountUtility.cs Wizard/AIFusionCountUtility.cs 381e67bde5c8873fc74b20ee19d6799c1767c0a4a24ede4a55e12dfed3cb10cc 0 +Wizard/AIGenerateTagUtility.cs Wizard/AIGenerateTagUtility.cs 17fab802cc06ff63c274b8c9fac589b97564ca7cca73719508dc5a40f908983d 0 +Wizard/AIGetPreprocessInformationUtility.cs Wizard/AIGetPreprocessInformationUtility.cs e09fb1fd4c38f382c4341543ca872801e9c6ed54890b278b70fac544f45118e3 0 +Wizard/AIGetStatusUtility.cs Wizard/AIGetStatusUtility.cs 4aa4757c3b233a92e568540155fd96d6a8a9e7e655a115afd626f2b4dca2cfca 0 +Wizard/AIHandBuffSimulationUtility.cs Wizard/AIHandBuffSimulationUtility.cs 3315a797f5f349057bc2a23c7d1ad0e425362a36653634510f7fbb9b4ae5b771 0 +Wizard/AIHandCountUtility.cs Wizard/AIHandCountUtility.cs 2d94217494ab839b77d30b4927af515fa97a81ff5b27766b78fe3c4d265de114 0 +Wizard/AIHealCountUtility.cs Wizard/AIHealCountUtility.cs d08e694f0d5f2409e9fef30e37bd21922462dde5a5121c9e80ff3a932d4dafe9 0 +Wizard/AIHealSimulationUtility.cs Wizard/AIHealSimulationUtility.cs 078d7bdbecf77edcc2d8b0c8959722f27c72eb1a1410e448e49be75905c6da9d 0 +Wizard/AIIsSelectableUtility.cs Wizard/AIIsSelectableUtility.cs 38778a80c91cfe89dd56c4e66b7acc17f85cde17929cd48e176ea98fd8d906e8 0 +Wizard/AILethalTargetSelectUtility.cs Wizard/AILethalTargetSelectUtility.cs 15d744de8077c7338fccd76f2600ae4f222322eb1ce28d6dccff81139c6fa740 0 +Wizard/AILifeLowerLimitInfo.cs Wizard/AILifeLowerLimitInfo.cs 909e1157b80bb065f09d24f58bf5579d63787fd77b7904c471fb7b51781329b6 0 +Wizard/AIMaxAttackSelectLogicArgument.cs Wizard/AIMaxAttackSelectLogicArgument.cs 90fa7bf788888731608fb0cc62fea8f5330f4e9f140ed69b1be96206e3495a4c 0 +Wizard/AIMetamorphoseSelectLogicArgument.cs Wizard/AIMetamorphoseSelectLogicArgument.cs a42dfb26869b886ddc0262c8d343dea5f0fff0519cabe311c34ecbaa41e524cd 0 +Wizard/AIMetamorphoseSimulationUtility.cs Wizard/AIMetamorphoseSimulationUtility.cs 82ad59688a127f66b55336a6405725d36e5d2e6e95ad38e8f8a76d4ea0111d3d 0 +Wizard/AINetworkBattleManager.cs Wizard/AINetworkBattleManager.cs 9cc054fb2f7cb322fe977db6b07e4b2b48ae107f82b5dd1e25acd8504bf46c4b 0 +Wizard/AINotBeAttackedSimulationUtility.cs Wizard/AINotBeAttackedSimulationUtility.cs 8fc972df511b04ad92a8df0fb838d0ccd0ba64e74e8230e2bb56187100793676 0 +Wizard/AIOneMoreLastwordUtility.cs Wizard/AIOneMoreLastwordUtility.cs a314f9f0c5f88685fb4c65d832537c9310205c6a1f5c76b5b23392d1844f7a16 0 +Wizard/AIPlayBounce.cs Wizard/AIPlayBounce.cs b7deb06b21138a3d1eeedc4bff2749907b4a257f52976965bfc96f4a4a7b7f3b 0 +Wizard/AIPlayReanimate.cs Wizard/AIPlayReanimate.cs 998dba73d7dafa58d44669913fae805bdf961898daad628d1c9292e87ac350c4 0 +Wizard/AIPlayerLifeSimulationUtility.cs Wizard/AIPlayerLifeSimulationUtility.cs 5db5e8b840d670562d1fb798f600d61863a3259fadc63bd428c7bf022674b8ec 0 +Wizard/AIPlayoutAttackerCountUtility.cs Wizard/AIPlayoutAttackerCountUtility.cs feba9821435a91c6c7fc43566f17544fb21b397f1636e009a4f5f6a80a01b7a7 0 +Wizard/AIRallySimulationUtility.cs Wizard/AIRallySimulationUtility.cs f3bab3dfcb0c805391191b9c8ea649f3ef5cedb9c1448dad53221864acc1d879 0 +Wizard/AIRandomMultiDamageEvaluator.cs Wizard/AIRandomMultiDamageEvaluator.cs c052288bdf7056c8ca59c4277b30a4c5c164096e05408a31b815f313403c6d48 0 +Wizard/AIReanimateSimulationUtility.cs Wizard/AIReanimateSimulationUtility.cs 0412bb4d143b14a3d04cc4c54f7c06f6d5287b39121a67d9dc257038f4492a5c 0 +Wizard/AIRecoverAttackableCountUtility.cs Wizard/AIRecoverAttackableCountUtility.cs a38e7cbc81a836fd1049d5d6bc124506628bb9b38c80dd3e9951da0aa9c99c6f 0 +Wizard/AIRemovalEvaluationOption.cs Wizard/AIRemovalEvaluationOption.cs 326a951d66f7a7faead9258a13eab84879b8e6a2b1a06a54faab9554ba63ec2f 0 +Wizard/AIRemoveSkillSimulationUtility.cs Wizard/AIRemoveSkillSimulationUtility.cs 548c9db516d6b615ad52258e8f93c18af44b25fbc8b662e1428c249f28d1c2ed 0 +Wizard/AIReverseDiscardSelectLogicArgument.cs Wizard/AIReverseDiscardSelectLogicArgument.cs ed9abf7de3fadc653c2489a72e41c949e1cb03b0cb9a707ac202cf78ea61f283 0 +Wizard/AIReverseEvaluateValueListOrder.cs Wizard/AIReverseEvaluateValueListOrder.cs 256331e1b4a04de841f7ded6895d1dd5403b9b00c09ab3ab5e76f06b3e3ac161 0 +Wizard/AISelectLogicSimulationUtility.cs Wizard/AISelectLogicSimulationUtility.cs 6f937f9163a0c85c16e44cd700188b5fb71cb263c04c9361c4028cd9aca2ace2 0 +Wizard/AISetStatusSimulationUtility.cs Wizard/AISetStatusSimulationUtility.cs cf3be428b0b63c12d282eabfdc26d55723cd76cfacd7e2b0445295b46171b767 0 +Wizard/AIShieldInfo.cs Wizard/AIShieldInfo.cs 362ac60ea17695256734ef46d89791c6d10b8fdf6fffbb7064cb389cd0bd065f 0 +Wizard/AISimulationRemovalUtility.cs Wizard/AISimulationRemovalUtility.cs a788a2ca422b069fcdc1d7abd191537ceed966c06b00bdc2bd5b2c75ed3c4522 0 +Wizard/AISituationCurrentProcessAccessExtension.cs Wizard/AISituationCurrentProcessAccessExtension.cs b0126b9aa32c1230cdacdd5eb30cf533701ff884877d1187117b2ebb5fff7c17 0 +Wizard/AISkillActivateCountUtility.cs Wizard/AISkillActivateCountUtility.cs eb49fc2ce0c90f7129d6ca8dbdc75451be49f669e0ffec318d98c9f99e4b4faa 0 +Wizard/AISkillCountFromIdUtility.cs Wizard/AISkillCountFromIdUtility.cs 0f2fb854375d88702aeaf73857a37d5ec471491e651fe23e52af43aef0f22251 0 +Wizard/AISpellboostSimulationUtility.cs Wizard/AISpellboostSimulationUtility.cs 2cd04a1c60a16a2e95106b9ebb8c8ec87dfa5e2bdf8fc8f2eb04a201832c0ff8 0 +Wizard/AISubtractCountdownSimulationUtility.cs Wizard/AISubtractCountdownSimulationUtility.cs 547102c30d69f23e55119ae2a846f7a76a45ebb079c822ee035c71829de07379 0 +Wizard/AISummonCountUtility.cs Wizard/AISummonCountUtility.cs 4a15008906646dea908842ba9fef40ba3a6470a5fbab9d17c5af0ad983665249 0 +Wizard/AITagCountFromIdUtility.cs Wizard/AITagCountFromIdUtility.cs b4454056e099561d3c41d259bef12f3a9f03d394676912d8f8f554dd4bf1caef 0 +Wizard/AITurnEndMove.cs Wizard/AITurnEndMove.cs e36f779a7a013de24d997f73f92fee8c24d027449598dee77cc35965a7599a38 0 +Wizard/AITyrantOrderSelectLogicArgument.cs Wizard/AITyrantOrderSelectLogicArgument.cs bb6ddbbc525b90ae543a0d89f1fd2c7dfc0cd017502018953ac7f56cd50f0e98 0 +Wizard/AIUntouchableStopPreprocessOption.cs Wizard/AIUntouchableStopPreprocessOption.cs eca55f02cb7dc695f3c01b99e477b80564be1f0d6d68a2eee1784083f001fa9e 0 +Wizard/AIVirtualCardUpdateInformationExtension.cs Wizard/AIVirtualCardUpdateInformationExtension.cs 12e5491c2b53081b4f67c0386917af8efef7e5c3ee18345aaa0ef6a1b50e6758 0 +Wizard/AIVirtualFieldInitializeUtility.cs Wizard/AIVirtualFieldInitializeUtility.cs 74d9cc5bed25a8b5307e9a4cc64e82944e471870311fe1de5005a88b8b52e1d9 0 +Wizard/AIVirtualFieldTagProcessExtension.cs Wizard/AIVirtualFieldTagProcessExtension.cs f16ccaa76b951bf0d0856ffb734c6b0d551915c18ce213b50365203e9e4b16db 0 +Wizard/AIVirtualFusionSimulator.cs Wizard/AIVirtualFusionSimulator.cs 216b30526c1c20f6f68ca442a8a91f3f8b4bf6c5288c4e7d8244a2655d0e562c 0 +Wizard/AIVirtualRemovalInfo.cs Wizard/AIVirtualRemovalInfo.cs 465ad9429d71e91b8362474f8b924915fbcd7473c26ec1499d577e18083e5d4f 0 +Wizard/AIVirtualTurnStartSimulator.cs Wizard/AIVirtualTurnStartSimulator.cs 4ffeb3dc76517ba36c9fe2d026a06b9a4581f2b3b9496b9d88f27906adb3c230 0 +Wizard/AIWhiteRitualSimulationUtility.cs Wizard/AIWhiteRitualSimulationUtility.cs cb99377bc63f81d69390e6407848b54eef775827771bb0b4a56cea25908c3dbc 0 +Wizard/AIWhitefrostWhisperLogicArgument.cs Wizard/AIWhitefrostWhisperLogicArgument.cs 1174b61be1377624e74801d9d68834ad8dc0985e6c732f50dbe1da35fb3fde06 0 +Wizard/Tuple.cs Wizard/Tuple.cs 2626ed192e620d909de28610153912dcb36f602c54a5a4eda943a2b12bf7fe88 0 +Wizard\AIAccelerate.cs Wizard\AIAccelerate.cs b968700bf63fb47d263662e812270a805011fa53b4b026a5ad15f056d24c1d5d 0 +Wizard\AIAccelerateInformation.cs Wizard\AIAccelerateInformation.cs 0b2558c3d4b87221a849f6e5a6622b517c9fad31e500f2f1f04ac1b20545fadc 0 +Wizard\AIActivateCountTagArgument.cs Wizard\AIActivateCountTagArgument.cs e834197ddb81a1369cbd4f7ed3e3e5cd265809d0afe7a7e8f5e6313d9c7824d2 0 +Wizard\AIActivateCounter.cs Wizard\AIActivateCounter.cs 8cb3ed5c7d1d9ca266ce52425be67168a742605f949c7e60f68b4e728b1fa43c 0 +Wizard\AIAfterAttackBanish.cs Wizard\AIAfterAttackBanish.cs c3104d8bb412cfd2c029eb3899bf6b057d5006b35c466f807e812912437d4031 0 +Wizard\AIAfterAttackDraw.cs Wizard\AIAfterAttackDraw.cs fc68e0b8633582d561d5bec40a74258f4e884dd668c70ff7fe8cd7029eb9f856 0 +Wizard\AIAfterAttackEvo.cs Wizard\AIAfterAttackEvo.cs 249444a75c7dfa090885a1d12f4ff71bf3ac79ea57c64f3c64ffcd89250d0aeb 0 +Wizard\AIAfterAttackHeal.cs Wizard\AIAfterAttackHeal.cs d57e252e03c131f8f53b142287788b69c5d7021dafe5d638866de682fc47e454 0 +Wizard\AIAfterClashDamage.cs Wizard\AIAfterClashDamage.cs 8ef198d626129f3d99f42f05069d26b977fdbe995ce2b378838e710ecf86c35e 0 +Wizard\AIAfterClashHeal.cs Wizard\AIAfterClashHeal.cs c427d5743be7b87f443ba8aabee6d1fbdbc5b25cf6ca43b2c1b06801d85fcf57 0 +Wizard\AIAfterDamageStopCollection.cs Wizard\AIAfterDamageStopCollection.cs b98d31ef1308d6261f4c783fabf0a9a5b01e22b034986559c155c0fb81a2b247 0 +Wizard\AIAfterDamageStopInformation.cs Wizard\AIAfterDamageStopInformation.cs fb0e9d053208527fcda7d2b11e8e1488a3ce970519c2b132d0579011c57a7fe1 0 +Wizard\AIAllyDiscardBonus.cs Wizard\AIAllyDiscardBonus.cs 196fa75baa918cac67dc23a28af4feb70a13409b09922c0840a2b53844aa2d62 0 +Wizard\AIAttachEventToBattleModuleUtility.cs Wizard\AIAttachEventToBattleModuleUtility.cs d48a79e6e2e81299804af7c8267ec0add85194aebc85fbf024345c407012139e 0 +Wizard\AIAttachOperateMgrBattleEventCache.cs Wizard\AIAttachOperateMgrBattleEventCache.cs 53f76574938d64f03f0adc0964cb8de4a133a37276c2643f81bec99ca932d27c 0 +Wizard\AIAttachPlayerBattleEventCache.cs Wizard\AIAttachPlayerBattleEventCache.cs 787f446c803ef676c8c4a7532228a57f65077d515c7e90eb787de3d3db728662 0 +Wizard\AIAttachedTagCollection.cs Wizard\AIAttachedTagCollection.cs 6a93e39cf4f6135437938199c00a4c5a6824b7a874d4a1b4f520a74978890dde 0 +Wizard\AIAttachedTagInformation.cs Wizard\AIAttachedTagInformation.cs 28169a7a9572155b3cf4da0238c4f9cdc00f07f0bbced0d310b7c1fdb6429846 0 +Wizard\AIAttachedTagLeaveStopInformation.cs Wizard\AIAttachedTagLeaveStopInformation.cs aee4d87a07619a81e3dfe382758779fa63fbb5fedac1cf1248b42aed407cc303 0 +Wizard\AIAttachedTagStopPreprocessOption.cs Wizard\AIAttachedTagStopPreprocessOption.cs 49861cec432487f26c2f0b964e2f988a9d79182dab8e619933a67d1a99efb03c 0 +Wizard\AIAttachedTagTurnEndStopInformation.cs Wizard\AIAttachedTagTurnEndStopInformation.cs c746fb138d1c8ea3c8a6f7775c2d1c6518256f661fcf6a3c0be61b99b3ba75b4 0 +Wizard\AIAttachedTagTurnStartStopInformation.cs Wizard\AIAttachedTagTurnStartStopInformation.cs f26f68ea5ec78036693ea4eabfb518424ba97501eb6a6e271b6d0ce6b920363b 0 +Wizard\AIAttackAddDeck.cs Wizard\AIAttackAddDeck.cs 679db2aa9bcb29bff4de837ee2a93d5449b7e82c6a31e61665f6c6c3a8d8fc0a 0 +Wizard\AIAttackAttachTag.cs Wizard\AIAttackAttachTag.cs 01d7aedc13f739be7ace10d2ef4ba0a0871a355b79db8819d3c4b2162540345f 0 +Wizard\AIAttackAttackableCount.cs Wizard\AIAttackAttackableCount.cs d37946f15d3a5b2e4f0080a875ac3ffe3cafb5b5ade2346d23ba1f4ae18143b3 0 +Wizard\AIAttackBreakAttackTwice.cs Wizard\AIAttackBreakAttackTwice.cs a1b71ec5a31b4c91d9d3928764deb30346db4fcd0b1cdddd9ef203723786c0e0 0 +Wizard\AIAttackBreakDamage.cs Wizard\AIAttackBreakDamage.cs 606606e0660a1823e271e8e385ccbde29139a99ccb82f91c6470fc82373d490f 0 +Wizard\AIAttackBreakEvo.cs Wizard\AIAttackBreakEvo.cs 52954b1c903cf6ea0d15eebe066a9f925d20acfa30427a77a857e81300afff56 0 +Wizard\AIAttackBreakRecoverPp.cs Wizard\AIAttackBreakRecoverPp.cs b12aec447bd811b506ba9bc5adaaa854f06fdb2894bcf72f6839186b324b2d01 0 +Wizard\AIAttackBuff.cs Wizard\AIAttackBuff.cs 699c251c55b77448ebed0f7b4b20b1a97d3ddb95d7a03288ddc714f0113620ed 0 +Wizard\AIAttackDamage.cs Wizard\AIAttackDamage.cs a5e1210bb8f80e703e44635a0599cf7efa940ded1647cf6ac2ef69d0a3fc8ad7 0 +Wizard\AIAttackDestroy.cs Wizard\AIAttackDestroy.cs 992c6ddcdd3e247918eb7b378d8eae3f505567f3950a2006b836fbcf05a8d442 0 +Wizard\AIAttackDiscard.cs Wizard\AIAttackDiscard.cs 50bbc5a3a87e3e6d41c445fa4d59dc265397509da9a0fccd9e2316110cf5895d 0 +Wizard\AIAttackEvo.cs Wizard\AIAttackEvo.cs b31c69e6dba35a05f730eb7ba7f4a5792e9958b1f5ef5a13fcda70ecf5a91b60 0 +Wizard\AIAttackHandBuff.cs Wizard\AIAttackHandBuff.cs 33e198f48ddf9b92985547738d624da6dadf19783735145e7c7bf2dbc475c109 0 +Wizard\AIAttackMove.cs Wizard\AIAttackMove.cs d939cfd365789f2d7ccab802c9ded5eced396c18f12ce8f7348912c22fdc0425 0 +Wizard\AIAttackOrClashBanish.cs Wizard\AIAttackOrClashBanish.cs fe208924c5ce2b022afa6b35e7b1b1eda8e7eed4c14b6300ff5efaad2c560816 0 +Wizard\AIAttackOrClashBarrierBase.cs Wizard\AIAttackOrClashBarrierBase.cs 7e42c36c5926e4d5c2e982516f24671f01c56b27b3e16a474c31c6af5e4ad5e1 0 +Wizard\AIAttackOrClashDamageClip.cs Wizard\AIAttackOrClashDamageClip.cs 49f8bbf454c97407c9613a50ea1587a575e3dd56fa37c0b00027192e7f9b9098 0 +Wizard\AIAttackOrClashHeal.cs Wizard\AIAttackOrClashHeal.cs 0b1b87694d3e118a14ce386f279aea253f98e749f7a813931a00c8879408d508 0 +Wizard\AIAttackOrClashKeywordSkill.cs Wizard\AIAttackOrClashKeywordSkill.cs 55126b33491466e606671856e500e3879d709dd176c21970b11c361275755772 0 +Wizard\AIAttackOrClashRemoveSkill.cs Wizard\AIAttackOrClashRemoveSkill.cs 0bdb4581b042a81cead22998f61202b08195a2511da5c6a563e2b6b08b92f296 0 +Wizard\AIAttackOrClashRemoveTag.cs Wizard\AIAttackOrClashRemoveTag.cs 3d2fafe1c8e8fa901ef413ac03cc39929c8d812178e2dbb0c3b24d963be6b76f 0 +Wizard\AIAttackOrClashShield.cs Wizard\AIAttackOrClashShield.cs 73f30bfdf0a4e020c8ace60f99b1b570f492f7be0222c842d428757ecf376ee4 0 +Wizard\AIAttackOrClashSpellboost.cs Wizard\AIAttackOrClashSpellboost.cs 5fafa0a2b32bf947fa20fbd0218d35d8f0b2d1f42bff6819c1cea591afcf20b9 0 +Wizard\AIAttackOrClashToken.cs Wizard\AIAttackOrClashToken.cs 6443ab61b95ae82a7ce168935f1e988b6985e93f06a3268971990ed805539496 0 +Wizard\AIAttackPreCheckInformation.cs Wizard\AIAttackPreCheckInformation.cs 763002d0cbfa6c60fdaabe638adebd991b731619cb317f038301519c55881b12 0 +Wizard\AIAttackSetStatus.cs Wizard\AIAttackSetStatus.cs 736682150d64d0d8e6ecc900ec8448cac0d41e71a835eed8e7d68c557309443b 0 +Wizard\AIAttackSimulationUtility.cs Wizard\AIAttackSimulationUtility.cs 0aa8c77eed1de633fb98c069e5db89724ee6b3cefa808b350a33f5b05a1ac509 0 +Wizard\AIAttackSubtractCountdown.cs Wizard\AIAttackSubtractCountdown.cs 035772aca15d7f5adc5846a3fd9fd186b9a9588681c2234bd20cb60ae4182cad 0 +Wizard\AIAttackTagSimulator.cs Wizard\AIAttackTagSimulator.cs 3b086bc42857efdea4eb3568feb288219d0015646db736970bbcba4b86a623d2 0 +Wizard\AIAutoEvolutionSimulationUtility.cs Wizard\AIAutoEvolutionSimulationUtility.cs c34536971c0496eb7381353f92da164f6c4cec3c15ab41c74c9e5ea0d2bbc9cb 0 +Wizard\AIBanishAttachTag.cs Wizard\AIBanishAttachTag.cs 57811f7c612b1c2b5db229d590a4f588b5d7220bc481d39c08f1e941f4c7ce19 0 +Wizard\AIBarrierAfterDamageStopInformation.cs Wizard\AIBarrierAfterDamageStopInformation.cs e6289342559d0e92ca5dc09d610a4e0483b61fd41808ee3bccc5519664cd5ac7 0 +Wizard\AIBarrierInfoBase.cs Wizard\AIBarrierInfoBase.cs ba0998c9b29c1e158df7e649c52c4611fa820905840a89afc79e6a966f7290c9 0 +Wizard\AIBarrierInfoCollection.cs Wizard\AIBarrierInfoCollection.cs 373046001ab854a988dd8e6e18b0d7727650bf5fa334ae83de77322265ef7e5c 0 +Wizard\AIBarrierLeaveStopInformation.cs Wizard\AIBarrierLeaveStopInformation.cs 0e1fefc666e2c62875378838c117a70c448b2ac350be5ecff4be3cab5cd79d52 0 +Wizard\AIBarrierPseudoSimulationInfo.cs Wizard\AIBarrierPseudoSimulationInfo.cs cb2f36694001eda21a03ca2292914d8c75c43ed2cf50b950c46d9409599c3866 0 +Wizard\AIBarrierSimulationUtility.cs Wizard\AIBarrierSimulationUtility.cs 25f4adb422e76b939cc2e2bff8c15274a48f866df0357d30e0c7052c78c3f4e5 0 +Wizard\AIBarrierStopPreprocessOption.cs Wizard\AIBarrierStopPreprocessOption.cs 9c3dc62c46672911ebecfc76fe5632d171636131795bbb06f882b91cee205c5f 0 +Wizard\AIBarrierStopTiming.cs Wizard\AIBarrierStopTiming.cs e0f3f5691214baa3bfa42b7d2333d05cbeaa43b962f6e58ba94e347173fec931 0 +Wizard\AIBarrierTurnEndStopInformation.cs Wizard\AIBarrierTurnEndStopInformation.cs 4b6dc18461b2143dd40f16cb9623e2142d5dacd5ecd5ba7e355fc408524f1440 0 +Wizard\AIBarrierTurnStartStopInformation.cs Wizard\AIBarrierTurnStartStopInformation.cs 3426c5d64e8df071247ed8443ae80e372c93d4ca52612209e999c232747c3536 0 +Wizard\AIBarrierType.cs Wizard\AIBarrierType.cs 7e0ddaa801358ddeea09c87eb884102628547554b021d3e8bf307de506e0211b 0 +Wizard\AIBattleInfoReceivedData.cs Wizard\AIBattleInfoReceivedData.cs 48ba9398d89504579620ab39ac385ccda44e78d0b2b224a0ba76302cc5630b0c 0 +Wizard\AIBattleInfoReceiver.cs Wizard\AIBattleInfoReceiver.cs 4a52d7928b4a3fe7c7458d246f5533c2ddc6e7d47d0cf4dae88226d425e847fd 0 +Wizard\AIBattleSimulationLauncher.cs Wizard\AIBattleSimulationLauncher.cs 1bd420df5a8a23adcfc63b28b0ba2551aec18d549ca9eea2d8cf38ec015fa23a 0 +Wizard\AIBattleStartData.cs Wizard\AIBattleStartData.cs 321bee5cb5a1307e6f2da4e1487505aecdfbe9287c27d219dea4e8badcc733c0 0 +Wizard\AIBattleStartDetail.cs Wizard\AIBattleStartDetail.cs 060079ca989403316030a71186260e941acd28483f1f53e2e9c6b69b2b56ab05 0 +Wizard\AIBattleStartTask.cs Wizard\AIBattleStartTask.cs 3edb64aa5b558f98d14dcc2c955c30040b582ce1b55df0c5eec4d7536e105304 0 +Wizard\AIBestFusionPatternCalculator.cs Wizard\AIBestFusionPatternCalculator.cs 7f7abb65ee082eb6088e9c9af62125c67b4a8ae1fc328d78d13d95fe1e9d83d4 0 +Wizard\AIBonusArgumentWithIgnoreInBattle.cs Wizard\AIBonusArgumentWithIgnoreInBattle.cs 30f2046fa75d14d9c5b6d79c635f6a843e14927f84cac331166cd9311668a643 0 +Wizard\AIBounceDamage.cs Wizard\AIBounceDamage.cs 7518199405f37f3c45a1ea7ce843011a6724ace751e01d416916028eb234e414 0 +Wizard\AIBreakAddStack.cs Wizard\AIBreakAddStack.cs ea721e2f1253f7cb3c3119a90ee844738c6e3caed814e2b17e70daaf01e3a146 0 +Wizard\AIBreakAttachTag.cs Wizard\AIBreakAttachTag.cs 5307ac9768a0a1b12229a8125d38b1f4fd2376ba754dd8d9703c74d344f86edb 0 +Wizard\AIBreakBuff.cs Wizard\AIBreakBuff.cs 6d47b098d9782f7ee639473a201ec2e31f95ce6efcb9d8b1d955e04d8d2081dc 0 +Wizard\AIBreakDamage.cs Wizard\AIBreakDamage.cs 9e54b9d2b1d411c551db7d9f9071c56bab00b8ec838a83e8d6b83fa3dc53065a 0 +Wizard\AIBreakDestroy.cs Wizard\AIBreakDestroy.cs 3d0e27eb5aba855dcc76aa8cff219cc9bcdf19955c0e429edd28251b6b0aa441 0 +Wizard\AIBreakHeal.cs Wizard\AIBreakHeal.cs 770375c56c5f9fd3a42b13d25732e5c5853f10186a0addeca4ffd91f3b4135dd 0 +Wizard\AIBreakRecoverAttackableCount.cs Wizard\AIBreakRecoverAttackableCount.cs f86af23cb2477c8ddeba56c88588d2bad7a1beb7296b10c3aaab80bfed1b84ec 0 +Wizard\AIBreakRecoverPp.cs Wizard\AIBreakRecoverPp.cs 3333bb5e65c041b666ad6088fc0b08d429d9a68b7ba01e1a01481fbadcae46e5 0 +Wizard\AIBreakSetLeaderMaxLife.cs Wizard\AIBreakSetLeaderMaxLife.cs 4e6630d1068282ed735ae241962ef51f7749b9e19943b09d65c2b115697c09a2 0 +Wizard\AIBuffBuff.cs Wizard\AIBuffBuff.cs 0f2ccca224ce09de170fcf2bc0e5fde4f069ccbc7fd44725623e29723751e22e 0 +Wizard\AIBuffDamage.cs Wizard\AIBuffDamage.cs 7ee38cc3732653719265bf1593daacb0b0d2fb5dd4ab376c60e3eb71c9fd2b28 0 +Wizard\AIBuffDestroy.cs Wizard\AIBuffDestroy.cs bf850f2d3f00c07409fb4b970ec207901805efb79b2ed323aefdff89496a3a6a 0 +Wizard\AIBuffDraw.cs Wizard\AIBuffDraw.cs 8b5334986c650674a2c49270fa872513699067d2eb4103e29cb53f996170408e 0 +Wizard\AIBuffEvo.cs Wizard\AIBuffEvo.cs 82caa790a4743982529a599270b980c1689b0b57e4c6f817dd0d3bb5787f6b98 0 +Wizard\AIBuffExecutingInfo_old.cs Wizard\AIBuffExecutingInfo_old.cs 402c325b09513f06789bd7ef919604d6e8274bbaf5b79693ab2c00962faff18e 0 +Wizard\AIBuffHeal.cs Wizard\AIBuffHeal.cs d211245ba4d4dd4924fc7667d442f92542e64e3eb8a7dacc111b9b178c35efc2 0 +Wizard\AIBuffRecorderCollection.cs Wizard\AIBuffRecorderCollection.cs 6c61fc8962bef66dc3002e46fe7eeccabdb0e05a5cc3866ed548380da1e1f784 0 +Wizard\AIBuffRecoverPp.cs Wizard\AIBuffRecoverPp.cs 20caf8d39bbe4320fb1233a59162a45751352ce41f3d80b64d8713b3f189efa4 0 +Wizard\AIBuffRush.cs Wizard\AIBuffRush.cs 6c82e72d90630b7f70197ee3a1cf1d4a7f5e3dcf4b62d70280c949536ae3b4be 0 +Wizard\AIBuffShield.cs Wizard\AIBuffShield.cs fdd68d9ecb56f81c1722e7218b7c77785192d9f339c3c92e7d9de3e9ab647a60 0 +Wizard\AIBuffSimulationUtility.cs Wizard\AIBuffSimulationUtility.cs b7195680120dd60a8625718db7bbef995e323cdad970f3697ea9cd69af4290c4 0 +Wizard\AIBuffStopPreprocessOption.cs Wizard\AIBuffStopPreprocessOption.cs 98cee29a3c83d30cdee435b6fd424074ef33c5b35d08a47217c82a448448fbb8 0 +Wizard\AIBuffToken.cs Wizard\AIBuffToken.cs 694c9ca4c8d9047b0f97d72d0ad56ed8b74fe15c334767057532c59ac8f41b9c 0 +Wizard\AIBuffTurnEndStopInformation.cs Wizard\AIBuffTurnEndStopInformation.cs e7493368d46683b05f3940c95865f153b0c92babd84ad8575905dc53434865d4 0 +Wizard\AIBuffWithTargetsInformation.cs Wizard\AIBuffWithTargetsInformation.cs 8badcf2dafc38e5b49cec01b5dfd253c04477e313844a624ddff26168a195bc9 0 +Wizard\AIBurialRite.cs Wizard\AIBurialRite.cs 4b7dc32e0ed2f804e4ba881945af9c0ba79601ed17025fc242c61c4bc30bcd00 0 +Wizard\AIBurialRiteSimulationUtility.cs Wizard\AIBurialRiteSimulationUtility.cs fd8af5f6948161b46876858d62160db6f541bdd7f622b4e7d3d860784e6c0e7f 0 +Wizard\AICannotAttackInformation.cs Wizard\AICannotAttackInformation.cs 338fdbc7e7a727c3c0ebfda141698d0bc19c3958d303f21bf92d188925c4b1ba 0 +Wizard\AICannotPlayInformation.cs Wizard\AICannotPlayInformation.cs 640571c76dd20a995018041244934a9f71d33e766bb4f6067f49a327028b4f9a 0 +Wizard\AICardData.cs Wizard\AICardData.cs 7ef51bfa266263adb76e3b8e75ca6de4f607cb669ea29c778a2482cac8cc1e93 0 +Wizard\AICardDataAsset.cs Wizard\AICardDataAsset.cs 39d4e3ac7e97b8b32b337eb696c8fca45a04a9cfcfbd0239a86d0a3dbd41b1c9 0 +Wizard\AICardDataAssetSet.cs Wizard\AICardDataAssetSet.cs 49bccb382d26f636277f90f5e0d638ff4c3a0a784c327885f5d5c9930098bbfc 0 +Wizard\AICategory.cs Wizard\AICategory.cs b4da86a28aac7ddb1151eb23521329e068b48274a6c4ca657975be7eb3e1be97 0 +Wizard\AIChangeInplayAttachTag.cs Wizard\AIChangeInplayAttachTag.cs 03284c1fb64f8b8dafa4e2f4aa0ab89d7318ac9f35aa6bf3f7d76715cc1f3d9d 0 +Wizard\AIChangeInplayCannotAttack.cs Wizard\AIChangeInplayCannotAttack.cs 9263120fece290ef5721e409b44b0f7565e76990b6384db04b41a94f95c7e025 0 +Wizard\AIChangeInplayCannotPlay.cs Wizard\AIChangeInplayCannotPlay.cs ea0f6b06dc4d3e1848de34c48ca2661ece00dee8bc8377a9b1e45808f08290ac 0 +Wizard\AIChangeInplayFixRemoveType.cs Wizard\AIChangeInplayFixRemoveType.cs a89d34ab78211c5982b01a8b1a9184758d6e42967eac06de8476e23e6f85d7ff 0 +Wizard\AIChangeInplayImmediateBarrierBase.cs Wizard\AIChangeInplayImmediateBarrierBase.cs f9996fad09197c6ebaa7d9652ff06597d9e260f25d23b9411bc1fe0b27b2468e 0 +Wizard\AIChangeInplayImmediateDamageClip.cs Wizard\AIChangeInplayImmediateDamageClip.cs 2eb533231ccaaa1faa13af9610a33a1f5a63eb00247f52efd48237c5247d68bf 0 +Wizard\AIChangeInplayImmediateDamageCut.cs Wizard\AIChangeInplayImmediateDamageCut.cs 3859762c77e590198831f3d5791c18d5fed1b0b0493b10e11a0ef566c493d7f4 0 +Wizard\AIChangeInplayImmediateDamageModifier.cs Wizard\AIChangeInplayImmediateDamageModifier.cs b9c0a56043bede3e20186b94ae2caa14c7bb89fb9b6774c13a4fe575cf2da6a6 0 +Wizard\AIChangeInplayImmediateIndestructible.cs Wizard\AIChangeInplayImmediateIndestructible.cs 5d4a5b7ad333253b21310144fa46b5f5a630f610768e60850f79453f87c8f0eb 0 +Wizard\AIChangeInplayImmediateKeywordSkill.cs Wizard\AIChangeInplayImmediateKeywordSkill.cs 4998575f2863f6e054a2398646c10fdd475a3bd02fab7fe1c21967a27c97dfb6 0 +Wizard\AIChangeInplayImmediateLifeLowerLimit.cs Wizard\AIChangeInplayImmediateLifeLowerLimit.cs d7a7077b3d381743d12b2c72c24a34acc3a8b837b74a6515cd86d0ff7fc59987 0 +Wizard\AIChangeInplayImmediateShield.cs Wizard\AIChangeInplayImmediateShield.cs 614b4506e5069f85bf74fb26b65807cd1529a5932fe82e6add22c8504c06635f 0 +Wizard\AIChangePpTotalBuff.cs Wizard\AIChangePpTotalBuff.cs 61afdbebd05f5d474510448737a6ee0f5aae8705402669e631f909c36cc5a72a 0 +Wizard\AIChoiceBrave.cs Wizard\AIChoiceBrave.cs 5fb029119fae61e8cbe203ef39fdede10123781a5b90401293aaf8312d35f2d9 0 +Wizard\AIChoiceTagArgument.cs Wizard\AIChoiceTagArgument.cs 58ea361f0584153c52a6c467e478d788047f82569359328d8d6171afc06c5018 0 +Wizard\AIChoiceTransform.cs Wizard\AIChoiceTransform.cs 9e65d0b7ab4ba4e1fa0b7d3cc707f05c28d0c9dfc7e89a2fb629b1f9a4a1aaad 0 +Wizard\AIChoiceTransformCostInformation.cs Wizard\AIChoiceTransformCostInformation.cs 1e2066a8f30d209f4bb9c3902346130fc52125acca52ace2f56f5cad02bca05c 0 +Wizard\AIChoiceTransformUtility.cs Wizard\AIChoiceTransformUtility.cs e605fe9fd76f360bd021aba4ac25b6b7f72aea0bc3794da40c2caa09e3520034 0 +Wizard\AIClashBuff.cs Wizard\AIClashBuff.cs 3f7683b4dc1248eabbe9302dfafff5ea3a9eaca4d1c9bb635846a903cc47c1e0 0 +Wizard\AIClashDamage.cs Wizard\AIClashDamage.cs f1fdf591443cfaa0aabf59c62366998ee7cf00e831db6ac80cf6995833d408fc 0 +Wizard\AIClashDestroy.cs Wizard\AIClashDestroy.cs f0a94ed3646cd3970aef93d73a59fbd74b4656699e5dde837e418d93690a8e5a 0 +Wizard\AIConditionExpressions.cs Wizard\AIConditionExpressions.cs da8d0450cbe4022236a9d2ca429812bed7f595d357d70564c53a69b0dec9b600 0 +Wizard\AIConsoleUtility.cs Wizard\AIConsoleUtility.cs a859968ba37940f6e856df57c437f23be3184d520c5ac1a73d556dfe7e7b6adb 0 +Wizard\AICrystalize.cs Wizard\AICrystalize.cs c8e0ae57029f6ab4dcaf4975bab5d2b951a90e43c0f5fcbb050e489d91a0ab76 0 +Wizard\AICrystalizeInformation.cs Wizard\AICrystalizeInformation.cs 6375ba72325ef0be913a9f10efa7f67ede4ec67d01f1df5d44e2f4f05a12d959 0 +Wizard\AICsvLoadingInfo.cs Wizard\AICsvLoadingInfo.cs 0800e6d793b8c2c9d157d67a31aef7e4df2e954e46c07afbbe2f5e481c521f20 0 +Wizard\AIDamageModifierCollection.cs Wizard\AIDamageModifierCollection.cs 37e1407dd6350d13fc1ace8f1c7a447603d5d2c1ead2241a945ff91cebfd7622 0 +Wizard\AIDamageModifierInfo.cs Wizard\AIDamageModifierInfo.cs db83f7ebc48e6b921c7124f5a01b8ac3b94fef4576f4ca05a1c8c9bf4fb0908a 0 +Wizard\AIDamageType.cs Wizard\AIDamageType.cs 53e9b9bb6ff6f24b08e3a417f891d03e03c4d410a00593aea5cdc61e43d65508 0 +Wizard\AIDamagedBonus.cs Wizard\AIDamagedBonus.cs 9134ab8fb84118f55682a75f39015503c44132560ed39798e9fbfccb435f12f3 0 +Wizard\AIDamagedBuff.cs Wizard\AIDamagedBuff.cs 057d87109592a4b24e309b7403f09e5424c50b62c1e1852ede206a76a29619d4 0 +Wizard\AIDamagedCantUnderAttack.cs Wizard\AIDamagedCantUnderAttack.cs 162a0adeeb76af3979528401f6c89e1efca26d328ffddc33f4caa69dd3b4fa45 0 +Wizard\AIDamagedDamage.cs Wizard\AIDamagedDamage.cs ad68679f571568115384b4464674f3ba784166caf0a6c97a26794f89ad6fde59 0 +Wizard\AIDamagedHeal.cs Wizard\AIDamagedHeal.cs 1544b066c01ea05ff20b74e1e1b25e14cdf166bb50507fd25c63c763429bf4dd 0 +Wizard\AIDamagedToken.cs Wizard\AIDamagedToken.cs 214c603b590c92add11225962f08311a83343d98b52be7c94415fd1c21494d4d 0 +Wizard\AIDataLibrary.cs Wizard\AIDataLibrary.cs 6d7575b5f6fb9598ad0756fa07fab30804d846a8efc0a6290f7156f2b0f2aac7 0 +Wizard\AIDeckAcccessor.cs Wizard\AIDeckAcccessor.cs cb0ec83c0cea9f3fe95f8f6cdd3cd5bb5e52338dd3e095dc89685782c7b34ef1 0 +Wizard\AIDeckData.cs Wizard\AIDeckData.cs 6b07e0390a656f1e9d4cdf8127f5ab1a68fa1b99633b60ec8c6ea416b84a597a 0 +Wizard\AIDeckFileNameList.cs Wizard\AIDeckFileNameList.cs e04bd8c0739e473ed6cc8d6ed7d5058ced48647f143b46fe7b8fbcd98335485d 0 +Wizard\AIDelayTurnEndTime.cs Wizard\AIDelayTurnEndTime.cs e15eafcc0ec1c99d21f3a03538f5cc237c14967a5d3178b40fece0168bd292a2 0 +Wizard\AIDelayTurnEndTimePolicyCollection.cs Wizard\AIDelayTurnEndTimePolicyCollection.cs fbd30d31b3b4972abbdef8bf7b8e156ba7b73b7ed0e024d5e0a8708c956ec612 0 +Wizard\AIDiscardDamage.cs Wizard\AIDiscardDamage.cs e6b852686c5ce2915390e4e44abfa43363020b369a1eb13e1d78143fd179871b 0 +Wizard\AIDiscardHeal.cs Wizard\AIDiscardHeal.cs af7b72472155d064cedead3ad6b7872fcd3a420ae80328ca78f6e3dfed81bb20 0 +Wizard\AIDiscardInfo.cs Wizard\AIDiscardInfo.cs 8d26fd1c9bb13f6684bf7be6e44ca974728a6c8b072fbc731c5068727a533c83 0 +Wizard\AIDiscardUtility.cs Wizard\AIDiscardUtility.cs 02fb62c479a4154fe15ab2c07e1aca3c042881895de255cdc5a01b866d75b430 0 +Wizard\AIDiscardedToken.cs Wizard\AIDiscardedToken.cs d3e7e33406d9d502816145eb7cfe1be75d498a5e78f4a432224d2e38df32c705 0 +Wizard\AIDummyDeckContainer.cs Wizard\AIDummyDeckContainer.cs 4dce0c7e7933f388a5c3c60d2a03c6df318f0c60c9fa5a49007decd5dde63e0e 0 +Wizard\AIEarthRite.cs Wizard\AIEarthRite.cs 248c094baae5a18c6605cef2209a90cd10e5323ee9ec64ef599c5612057a4667 0 +Wizard\AIEmoteCmd.cs Wizard\AIEmoteCmd.cs d71aa0e4310ad191cad59c02944644559e215e9bf5294fe58664484e6b9301cb 0 +Wizard\AIEmoteCmdType.cs Wizard\AIEmoteCmdType.cs b756e835578b5964ae2bc82abdb0271223d91864199ba2bce00d3bf5d35ac7db 0 +Wizard\AIEmoteCtrl.cs Wizard\AIEmoteCtrl.cs a98c88d9fc68bea88b332865348091d6b1b9afa489316dca836f091952d93d24 0 +Wizard\AIEmoteDataAsset.cs Wizard\AIEmoteDataAsset.cs 2019e29004374a2cfc31de144e218b219e2b4463fcbf212c83fc3f1c23ed4359 0 +Wizard\AIEmoteFileNameList.cs Wizard\AIEmoteFileNameList.cs de751646c462492238ec484d68e12e9fdf3445ca5d7891c6c13e5f5ccbfef6c2 0 +Wizard\AIEmoteMng.cs Wizard\AIEmoteMng.cs 9903c0649369f0ce0868056982734601c85d807c1b967b2450f964c5de8d3c76 0 +Wizard\AIEmoteOnTurnTransition.cs Wizard\AIEmoteOnTurnTransition.cs 4dacdc512161efb4603f2323eedbb0e8a0f98d8f72ced7ca9fe78388831f249b 0 +Wizard\AIEmoteQuery.cs Wizard\AIEmoteQuery.cs 07980237bee820ce3f47d46ae92ccecee4c9dc322e6633be878f5f611e41a720 0 +Wizard\AIEmoteSet.cs Wizard\AIEmoteSet.cs 45a051f97c432fa36e6f9fc545c59a086e9e5537fb040c62da8418870eeeb967 0 +Wizard\AIEmoteUtility.cs Wizard\AIEmoteUtility.cs 4c00dc9aac6f900f239d54a228c6c7e47c6ac38f0d3566667773e14b0c8aab5b 0 +Wizard\AIEnhance.cs Wizard\AIEnhance.cs 4a63aceb5e794cfe4027ca6ddd7c2115757f8251ca9d6ebcfa271b900776d8b9 0 +Wizard\AIEvaluateBonusFromOhterUtility.cs Wizard\AIEvaluateBonusFromOhterUtility.cs 04f2c2238706195efba507979301c5425bb4bf859d27e8bf285cdc3fa48243dd 0 +Wizard\AIEvoAddDeck.cs Wizard\AIEvoAddDeck.cs 73d24f4e7ff1c018e12577d3a2edef042bd93d91bf23697999e20a969cbd896e 0 +Wizard\AIEvoAddStack.cs Wizard\AIEvoAddStack.cs 509352d63728ccef9a6a8391a6771891f4af39eeed7a0c3c4522b4f2138e004b 0 +Wizard\AIEvoAttachTag.cs Wizard\AIEvoAttachTag.cs 018c10dd399948d61a737df4463d0de9f342ca58b74d0e3b5d834351e1b62485 0 +Wizard\AIEvoAttackableCount.cs Wizard\AIEvoAttackableCount.cs fdd273597041407819f00209d1e3df83eea058cd8e457d703950f18942353c9d 0 +Wizard\AIEvoBanish.cs Wizard\AIEvoBanish.cs 0dc65005579efb7b6aa02d11c1585e1d8fae02d55d90379e7d348861fa1e77f1 0 +Wizard\AIEvoBounce.cs Wizard\AIEvoBounce.cs 6c01f18886125b5034709226e59866b88bb75dc50311e57ad233fa384ab2bd6f 0 +Wizard\AIEvoBuff.cs Wizard\AIEvoBuff.cs f0da5bc41b20bdd3de5f9d0e58a1b0947d4ef942486981105fb3a9b263ff76d7 0 +Wizard\AIEvoChangeCost.cs Wizard\AIEvoChangeCost.cs 957e4264c768226b447635647a9ed5e3c74ad162c42e4e81be0db99a54e6a271 0 +Wizard\AIEvoDamage.cs Wizard\AIEvoDamage.cs 8b4f4d07d970af3bb01d41d72ae16d4a50380497386416e94f371226d1592214 0 +Wizard\AIEvoDamageCut.cs Wizard\AIEvoDamageCut.cs de790fb47894b2ab65f7eb45657cb3f60a7047eb024508ec54d648cfcdf2fcc3 0 +Wizard\AIEvoDestroy.cs Wizard\AIEvoDestroy.cs 68ec438bdcb1b88cc3b79dadb58cc7e8b2104b49c01a50554580e52a1bace0ba 0 +Wizard\AIEvoDiscard.cs Wizard\AIEvoDiscard.cs 9cfe58f38a1e564094ec1131ae81681b1a4d57c3ee3f97244f794b383aafb897 0 +Wizard\AIEvoEvo.cs Wizard\AIEvoEvo.cs dd13ef6c44b9db3d6d435d23db22967f022853a777a592c595c6e96df622bdc0 0 +Wizard\AIEvoGiveBasicSkill.cs Wizard\AIEvoGiveBasicSkill.cs 9f102f719876db5d7a8727332273131c83732752f9759da5aeeed60888d53fa8 0 +Wizard\AIEvoHandBuff.cs Wizard\AIEvoHandBuff.cs afbcad7611a8d7c46cc98434bd0edf6c50e918c2ce4352996ef721455c277a8c 0 +Wizard\AIEvoHandMetamorphose.cs Wizard\AIEvoHandMetamorphose.cs d93c42ae05f222c81e992f58a88a6ad93235731d39fdaf435752a648f252d282 0 +Wizard\AIEvoHandSelect.cs Wizard\AIEvoHandSelect.cs be98337fdf9ab1b22f2ebff9d767e66d0c7dc986b186d00ca042ed6665e94594 0 +Wizard\AIEvoHeal.cs Wizard\AIEvoHeal.cs 6e14ae588efeef734f7273eb89c02fe6ac45ffa7ed16c8a983708935c46a9efd 0 +Wizard\AIEvoMetamorphose.cs Wizard\AIEvoMetamorphose.cs cddd2944e901b3d8634d25752c4caf4b438a91aba337d5f33a06bb6434be87db 0 +Wizard\AIEvoReanimate.cs Wizard\AIEvoReanimate.cs 59b4e87cfdd425d6962f25ba08c40d903bcaa738f227c6d21d04863b3d3e5dfe 0 +Wizard\AIEvoRecoverPp.cs Wizard\AIEvoRecoverPp.cs bf07a99fca941c3a2e7789311a98a78523312ac49906a3889493f94ef3829f02 0 +Wizard\AIEvoSetLeaderMaxLife.cs Wizard\AIEvoSetLeaderMaxLife.cs 80cc8a03b6a7d3376d098f935492bd24ce935d10a076241d70e08423969b58d9 0 +Wizard\AIEvoSetStatus.cs Wizard\AIEvoSetStatus.cs 952b8eeab9de1f238926d785b3b6876fdc552c221e7a9522e8c931b17e7d1a4c 0 +Wizard\AIEvoShield.cs Wizard\AIEvoShield.cs 0f7dd50f0c1ea4895b24f7125f0466626cda6490c1f5436a493ae0e4f7597fed 0 +Wizard\AIEvoSubtractCountdown.cs Wizard\AIEvoSubtractCountdown.cs eb6571b7b7fddbcb800e718dd7be015109091960b1d0f70c33f6a521919ef84e 0 +Wizard\AIEvoTagArgument.cs Wizard\AIEvoTagArgument.cs d86b36c2bf128c0ce2d7d73c50786015a6049904be01bff9aeefb0cbfda842e8 0 +Wizard\AIEvoToken.cs Wizard\AIEvoToken.cs a62481aa2e7a6214558ea0f49fca52be76c5381c97976ae1d632eac4dc9a8dc2 0 +Wizard\AIEvoTokenDraw.cs Wizard\AIEvoTokenDraw.cs dbbbe3125a7db1d2c9fa33d7a7471d2851eeb72ca0ebf164b477ce1dff765510 0 +Wizard\AIEvolMove.cs Wizard\AIEvolMove.cs 7055ccae3d2c422ed12be1d7cce499c9c87aa07131e8bbc6aa349cf503f0bedf 0 +Wizard\AIEvolveToOtherTagArgument.cs Wizard\AIEvolveToOtherTagArgument.cs acd00ec4b144c9c10c1403f76cbff1e523589533106fc4564c940c67af1d3d14 0 +Wizard\AIEvolvedAttackable.cs Wizard\AIEvolvedAttackable.cs 70aa6e92cc26cb3a4546606f8acef5b091186796cae63ff9f74676a72f20a221 0 +Wizard\AIEvolvedAttackableCount.cs Wizard\AIEvolvedAttackableCount.cs 5e436ad0b7733b999018f31d3fe320ff682414cedeb03e65d4d3dc06a149420a 0 +Wizard\AIEvolvedSkill.cs Wizard\AIEvolvedSkill.cs 4c867d8e8846b811be0dd5babd16bb59f3c3498681c706b47f5e2c6915985099 0 +Wizard\AIFilteringActivateCountArgument.cs Wizard\AIFilteringActivateCountArgument.cs 724cb7f85b1908d69996cc2e63d089caf78c19b33da073a61daaede4aba40eaf 0 +Wizard\AIFilteringUtility.cs Wizard\AIFilteringUtility.cs 94bb1baeeeccd3ad349964816bbf3edf3fca8a887d81779170bdd910604614db 0 +Wizard\AIFiltersAndSelectTypeArgument.cs Wizard\AIFiltersAndSelectTypeArgument.cs 875dc63fceb15e8b0474dba69fce6d8516e1f38eac36e8497d71565b471c5c2b 0 +Wizard\AIFiltersArgument.cs Wizard\AIFiltersArgument.cs 5dc3274c200fd18c7d2e4d96a4b133bb28195c386fe52f95d88ae8604f644776 0 +Wizard\AIFirstMoveBonus.cs Wizard\AIFirstMoveBonus.cs 638d3f68351d455e0c1dbcc50d579251eb1fd7bd21e5307387623f16011649d8 0 +Wizard\AIFunctionResultContainer.cs Wizard\AIFunctionResultContainer.cs 32c12c6a5326f256b7e50d83c7d1f2709b4e208b9a932255476f71e297dfa5a4 0 +Wizard\AIFunctionResultHashCalculator.cs Wizard\AIFunctionResultHashCalculator.cs 4f6fbb7465cc2fb2ea6cf808f3b466c69d0e500c42b019428999ca1b5b69d128 0 +Wizard\AIFusion.cs Wizard\AIFusion.cs 197b1fd5b6e982b5dde95c870c4928f06b03c54b6500b9e4ef6dc34955ea1d88 0 +Wizard\AIFusionDraw.cs Wizard\AIFusionDraw.cs 02e8d6e49db6734743322d3fee2e405d10e56e3cddecc18345f15326a1b93d68 0 +Wizard\AIFusionMetamorphose.cs Wizard\AIFusionMetamorphose.cs 4a1d8f4e359e5f60fd4ac325319d0d2883e2b32d8591dfab18a7c3d5b3c7a403 0 +Wizard\AIFusionMove.cs Wizard\AIFusionMove.cs 4f707ff2053c36cef6e43aed9f3d2ea72fcec3a6874691541db074d7c6022044 0 +Wizard\AIFusionSituationInfo.cs Wizard\AIFusionSituationInfo.cs abf01be029bd5fe69ec109d3541d452c92c21ebe849eea4ce5127165bc790360 0 +Wizard\AIGameStartAttachTag.cs Wizard\AIGameStartAttachTag.cs e71655bf3ffa71272da6459a9f6ee40dd5aa63115d11fd62987cc283f2f8453d 0 +Wizard\AIGenerateTag.cs Wizard\AIGenerateTag.cs e618715d718de81f3b92ed8b26a7784130aa251a1289ec4145328bbede425515 0 +Wizard\AIGenerateTagOwnerTable.cs Wizard\AIGenerateTagOwnerTable.cs 5ef0628f2c7f6ba87e5ad684a92e79f2e29c8a9415bcc581890fca4efced4343 0 +Wizard\AIGetOffEvo.cs Wizard\AIGetOffEvo.cs 02d356b7aaa96be63bf73dbbecfbacc61ae5069d88690d49087cea8aa99b09f3 0 +Wizard\AIGetOffMetamorphose.cs Wizard\AIGetOffMetamorphose.cs 532d1213ace8d0d29b9e3d94866a58e7ad3e78093e6c65802b2f7a6580ef49d5 0 +Wizard\AIGetOn.cs Wizard\AIGetOn.cs 2c9542aca8f705e47064fc500710eb22360b2d95ae74ee64999ba2a07367f4c0 0 +Wizard\AIGetOnBanish.cs Wizard\AIGetOnBanish.cs ae7c11664492c6f48b30f4bacb82b946b672607e7764ff8d9f4c3aace616aa8c 0 +Wizard\AIGetOnDamage.cs Wizard\AIGetOnDamage.cs 9f9196aa4d1e86e27a16534efbaf08daaa218cee56045faae6812a094f98f421 0 +Wizard\AIGetOnEvo.cs Wizard\AIGetOnEvo.cs e45ece01952622ee1f633f6078b1b26963c694a67580e9ae6f31c4288aa7333b 0 +Wizard\AIGetOnSimulationUtility.cs Wizard\AIGetOnSimulationUtility.cs 81a4006a1c566e826c0a383994b37de5668d0b14ac65d701c802d20a1f068ad2 0 +Wizard\AIGiveSkill.cs Wizard\AIGiveSkill.cs 1c0490349175ea3f16871a8d82cd6048fd9ce83f6078eea151eccb3716bf52e2 0 +Wizard\AIGlobalEmptyList.cs Wizard\AIGlobalEmptyList.cs 610cb34c9780228eafdf18d2b20485601e1b4c5281a6da5dbdb8e964241319bc 0 +Wizard\AIHandPlayEstimator.cs Wizard\AIHandPlayEstimator.cs a784c18d6db69769630084960b90572613ec6f35b20fa322bb5e77375f915639 0 +Wizard\AIHandPtnCalculator.cs Wizard\AIHandPtnCalculator.cs 48b51c3a5f6beb3d53410e1dd9b00e8270aa18942c94f441e497c65789a97bb7 0 +Wizard\AIHealAttachTag.cs Wizard\AIHealAttachTag.cs 28ebf08b93a1472934c9af9a44d77a0a93bacb6e50ed5ddd9241029853e0bf7d 0 +Wizard\AIHealBuff.cs Wizard\AIHealBuff.cs f40ab56afbdb5f4607a9ab0cf62dbf075299942e2330ab8ae4984b8fd00ffe78 0 +Wizard\AIHealDamage.cs Wizard\AIHealDamage.cs 6b7996cd60609c99c805ff019cef44506e07491702cf44884689b58ab0e42343 0 +Wizard\AIHealEvo.cs Wizard\AIHealEvo.cs 08c80712cd5cbffa74a0e89ee6239cefe367da34283871964ea46eb8d99e5319 0 +Wizard\AIHealHeal.cs Wizard\AIHealHeal.cs 7ffb34e7794547b231b612f35a3ae727e337e8e73a287e3cfd3023225e1d423d 0 +Wizard\AIHealRecorderCollection.cs Wizard\AIHealRecorderCollection.cs 87ceb977aa25f08c175da7c59d74f7f5fb9911402f10bdf4cafc783e7184f9a9 0 +Wizard\AIHealToken.cs Wizard\AIHealToken.cs 144c7f5ed450b0fa4a8e4cd7b331be157f46215c126f719e1cd1a624d2711c23 0 +Wizard\AIInstantAttackUtility.cs Wizard\AIInstantAttackUtility.cs a640ddff12fcb974826993d224e52d7241cfaf282ce464319f3a8807d1462aab 0 +Wizard\AILastwordAddCemetery.cs Wizard\AILastwordAddCemetery.cs 6a474d4246b7cc781e9b89d24f16cf0c655dc1fb76229a39bb2f50c4b2b1d335 0 +Wizard\AILastwordAddDeck.cs Wizard\AILastwordAddDeck.cs 96e052c096eba27661887408fbaef45342d61771fa2a520306502dfc59ba8fc2 0 +Wizard\AILastwordAttachTag.cs Wizard\AILastwordAttachTag.cs 54ba68ec7b1bec1bd937982844d4ee1f904b167687eea66ff19dcfed92de0c3a 0 +Wizard\AILastwordBanish.cs Wizard\AILastwordBanish.cs 68e20e16e92c1bf00b45bcd8510122e62fcd1b101e7dc7491128e9f18ffc947a 0 +Wizard\AILastwordBuff.cs Wizard\AILastwordBuff.cs c0976e6fb3d00b9e74aa932b7cb77cfc8c25572a63b79c9de5a05c20fbec8126 0 +Wizard\AILastwordDamage.cs Wizard\AILastwordDamage.cs 516bef0734693e90d6db38421cbc76b15469be6e98833533536b13066f2b1ccb 0 +Wizard\AILastwordDamageClip.cs Wizard\AILastwordDamageClip.cs 6ad6ba5366b7293697034179255d91d88d6a76fb35989291ab5366d446427cf0 0 +Wizard\AILastwordDestroy.cs Wizard\AILastwordDestroy.cs 31abeb4504d5f9564eeb9e451ec90649e1931c240e6fc46f673ac9d8fd88471a 0 +Wizard\AILastwordDraw.cs Wizard\AILastwordDraw.cs 3899e93c77229cd5e4823d42abda677a4a32ccd1526bdc6b947e5c1826ef8842 0 +Wizard\AILastwordEvo.cs Wizard\AILastwordEvo.cs 367ccab00c7a52db3da531896be7dce4419e2769e445fe55e8fca7c4e947d2d4 0 +Wizard\AILastwordHeal.cs Wizard\AILastwordHeal.cs dc32777feea211937da707d26368588be065840f1dc82da29dcb1f174e7501c7 0 +Wizard\AILastwordMetamorphose.cs Wizard\AILastwordMetamorphose.cs f6d341bdced6586ca06d7dcaf7227dc77d2fc8467bc03b02d56df4801b290e4c 0 +Wizard\AILastwordReanimate.cs Wizard\AILastwordReanimate.cs c606f3a8c33aa201de5d050d87fd53f97d5fc62e5ed02c435058b09871e5aba6 0 +Wizard\AILastwordRemoveSkill.cs Wizard\AILastwordRemoveSkill.cs 8dfb7e9dce235aac07aa3fa58845fb3b01f968c3dd5593972a9a8f26bc27c18b 0 +Wizard\AILastwordSetStatus.cs Wizard\AILastwordSetStatus.cs eeb384b10d5eae90928b718812963f76fd36fc5b8497a397b365d6d9c94e2e21 0 +Wizard\AILastwordShield.cs Wizard\AILastwordShield.cs c98166370f5630a2ab867d5a2cc7c43f2f2f8449b6492af2a39ebcd96045cd67 0 +Wizard\AILastwordSubtractCountdown.cs Wizard\AILastwordSubtractCountdown.cs 2ed1756e367df202ef8091e1dbe49c913ec904dc31b88b533c898c956146156a 0 +Wizard\AILastwordToken.cs Wizard\AILastwordToken.cs b85f90e75ef28cdd628cd121c789173044d45030c239851f146a489cbbba2623 0 +Wizard\AILeaderLifeEvaluationUtility.cs Wizard\AILeaderLifeEvaluationUtility.cs 25219c347ee322d8e60361fe46dc3d07fcbc66c727102f905bc924551ca5d70a 0 +Wizard\AILeaveAttachTag.cs Wizard\AILeaveAttachTag.cs 15bd065089329ad0ba829ac238a7cef81475d8aef02a35d9d7db703d12b98fcd 0 +Wizard\AILeaveBanish.cs Wizard\AILeaveBanish.cs 9602a13893fbab3ebb998046888e201647f0cdd5efafee187680f586cc7abfc0 0 +Wizard\AILeaveDamage.cs Wizard\AILeaveDamage.cs a2181b925c404c39ef3b566b39a8aed598628b4ca5233591f3ef3646e83d9cf4 0 +Wizard\AILeaveHeal.cs Wizard\AILeaveHeal.cs 5d46844a5f350e2d230d1ba5780042bda5773f4ae5f9e5d05e9f4c75923257a2 0 +Wizard\AILeaveStopCollection.cs Wizard\AILeaveStopCollection.cs aa64e33458c0ba01c24f82fb26f8fe830456dd17e1c62ca194526331bd2f45ec 0 +Wizard\AILeaveStopInformation.cs Wizard\AILeaveStopInformation.cs 4cfdbf2de116f487cfdb8c7922db6ffd753e424004de18d7393ede500b945f80 0 +Wizard\AILeaveToken.cs Wizard\AILeaveToken.cs 644162f03289345c5f93e56f8332c06786e4de1af6db79c501169ab19935d352 0 +Wizard\AILethalPlan.cs Wizard\AILethalPlan.cs 248a596eb9e5af3c8df3d3c71676fd69409b231771b72bf004ccf4def7d11ca1 0 +Wizard\AILethalSimulator.cs Wizard\AILethalSimulator.cs 1f122e02c65dfd76d6b02b5564c0008f94f17f0bf4ba1ca8d3c9609eab08138e 0 +Wizard\AIMathematicsLibrary.cs Wizard\AIMathematicsLibrary.cs 5654cca15a3e038551a484e2f2b7d0c200c9f8c5c0bbfb263f5293514a693aac 0 +Wizard\AIModifyValue.cs Wizard\AIModifyValue.cs 749762c075b3eb17651d0b1c370d24dc3e3fe38540006c0215bca6d0469e9209 0 +Wizard\AIMove.cs Wizard\AIMove.cs b970c8c0dac58f304f89b8922a5e4708bd285df3f67cd653d0fb496a7b0c94c5 0 +Wizard\AINecromance.cs Wizard\AINecromance.cs 458a04f500301f022a758465e399dfd2fcc00fda25c858021978a7a540811704 0 +Wizard\AINecromanceAddCemetery.cs Wizard\AINecromanceAddCemetery.cs 292f7cb165f821e217601040dbbc668aded4c8207f2931c211e7773c5138e089 0 +Wizard\AINecromanceAttachTag.cs Wizard\AINecromanceAttachTag.cs 8b1d0c93e3cf6d0fae2d19c555b5b5fbb1bc7a7404157a961442668cdd90c1b9 0 +Wizard\AINecromanceDamage.cs Wizard\AINecromanceDamage.cs 680578cfcaf71c45a6047dc12ec588de368458c4439697aaadd75acda807e3c6 0 +Wizard\AINecromanceHeal.cs Wizard\AINecromanceHeal.cs 90c16ec4b4ddc5e8b48ee505e19ea8f2b08e145a0d742bfd499bd4051b1f0427 0 +Wizard\AIOperationProcessor.cs Wizard\AIOperationProcessor.cs 987a69fce793dded4c54d03f52dfe9be47eddc6695b7d99ed6447ec632a13eb3 0 +Wizard\AIOperationSimulatorAccessor.cs Wizard\AIOperationSimulatorAccessor.cs 7b129b65a6fead48a9ab950b3bfe7cc0dc80559a6022b2f2a51a6ed9bfefa501 0 +Wizard\AIOperationType.cs Wizard\AIOperationType.cs 2e26a9ca0d4c3a57710ec8d19f6f1481ae54c0e3f7a5510080e6bb2bdcfcea81 0 +Wizard\AIOtherAttackAttachTag.cs Wizard\AIOtherAttackAttachTag.cs 958ba21c297ae33b6b5fee792ec65a27deabfd0eca4272210de714465df66a43 0 +Wizard\AIOtherAttackBuff.cs Wizard\AIOtherAttackBuff.cs 9081aa220267040f20ddbaf4f318b41a401eb76e229e670cf6756e672b291279 0 +Wizard\AIOtherAttackDamage.cs Wizard\AIOtherAttackDamage.cs 28c64b2e9219aab33a38845028d04d492dbea0aed8d8761c8546eeacc90ddee9 0 +Wizard\AIOtherAttackHeal.cs Wizard\AIOtherAttackHeal.cs e54f04540730ed28e409822f1488a3c39864e22d823eec2bf3f7e32499da44d0 0 +Wizard\AIOtherAttackRemoveTag.cs Wizard\AIOtherAttackRemoveTag.cs 74d0f91068999ebbed7943debc3d3d06019f29133f7bdfd20218e5ca953a24ea 0 +Wizard\AIOtherAttackToken.cs Wizard\AIOtherAttackToken.cs 829f76bbabf0ff1602930e43c5450fdc2b6bfec0043e7bdd19ef786328b49002 0 +Wizard\AIOtherBanishAddCemetery.cs Wizard\AIOtherBanishAddCemetery.cs db7822fa75c7a693e230d9bab85f333383ce1c8aa5fa6e9b18c7005d605d1326 0 +Wizard\AIOtherBanishToken.cs Wizard\AIOtherBanishToken.cs 80551b6a2749b538b4ad88bd0c091a95dad8eaf34d948e664c64169e52fd35df 0 +Wizard\AIOtherBattleBonusRate.cs Wizard\AIOtherBattleBonusRate.cs 3263dba41428dee3bf70bdcfb8f59572bf5368ef6cd1d12e1ee290e948c198f0 0 +Wizard\AIOtherBreakBonus.cs Wizard\AIOtherBreakBonus.cs 9664b9abad16dcda3bf8e4a25f93ad6808f6107dff59332d55cda9ffa3aaf1a3 0 +Wizard\AIOtherDamagedBanish.cs Wizard\AIOtherDamagedBanish.cs 6ab6256147947eecac13482c5e1a825ca3b17b58007d0f30e3bb133895f41d18 0 +Wizard\AIOtherDamagedDamage.cs Wizard\AIOtherDamagedDamage.cs daf6f02c8e3765a3619b233e09cea0e79f2e3d6da9d66e4a759b613d918baaa5 0 +Wizard\AIOtherDamagedHeal.cs Wizard\AIOtherDamagedHeal.cs 340055088317cbea6188a57d37473d45ec62d518ac3d22989b981bb228278b94 0 +Wizard\AIOtherDamagedSetLeaderMaxLife.cs Wizard\AIOtherDamagedSetLeaderMaxLife.cs 6e89ea5b405b52a9b769d60e29d42305333720f46b661c67af1d845c7e8ebeeb 0 +Wizard\AIOtherDamagedSubtractCountdown.cs Wizard\AIOtherDamagedSubtractCountdown.cs 04dd253bbadccc7b2016163aa7c3a15a0400a4020d962fef6b3ca2ede33dd624 0 +Wizard\AIOtherEvoAddCemetery.cs Wizard\AIOtherEvoAddCemetery.cs 23517419722ac45d31068a40ed312c6d5a26b9473c73ed5ed9a7523bace2009c 0 +Wizard\AIOtherEvoAttachTag.cs Wizard\AIOtherEvoAttachTag.cs 7cdf589230424e3ee8c826b81fdc13b3a14b4ddff394668183567f6ad80aced2 0 +Wizard\AIOtherEvoBanish.cs Wizard\AIOtherEvoBanish.cs 9e14e0c35e7909d5dd1b6d1687ab284d98be9f76282346d0dd9b798c6977669f 0 +Wizard\AIOtherEvoBonus.cs Wizard\AIOtherEvoBonus.cs b9d70a19bbba1bf042d823263f4d2f0b7b21133fa324eca6513e6abaa5baddad 0 +Wizard\AIOtherEvoBounce.cs Wizard\AIOtherEvoBounce.cs bb14b8063da91823284b53b3e40937562aca19797f8dd243c2f4a2bf20c2eb1b 0 +Wizard\AIOtherEvoBuff.cs Wizard\AIOtherEvoBuff.cs 42c1fa9d3072d66f9357f37d6d7e5fb96630fcb0e0008928b02e4b0b23ab0303 0 +Wizard\AIOtherEvoDamage.cs Wizard\AIOtherEvoDamage.cs 152ead59f42873ac7db29b7f81f866a21e7d4beee6496411d208394ca5de4ddf 0 +Wizard\AIOtherEvoDestroy.cs Wizard\AIOtherEvoDestroy.cs 1865bb507e88318408bf2bcd70d6ba3327f51a30bf225bd3b8a975650c9816b7 0 +Wizard\AIOtherEvoDraw.cs Wizard\AIOtherEvoDraw.cs 456472394be0ea567f90cf83ecf9945e9cf1c7f1d6f3012ee43a002402652ca7 0 +Wizard\AIOtherEvoEvo.cs Wizard\AIOtherEvoEvo.cs 18b789ccc877d88584f7ef888937ed0b3b948838ec664989b29242202ed4bc39 0 +Wizard\AIOtherEvoHeal.cs Wizard\AIOtherEvoHeal.cs 044727f897b81d5152288139fe43913b5c2a69c6c94a536f075930eac8fa77ad 0 +Wizard\AIOtherEvoShield.cs Wizard\AIOtherEvoShield.cs 3addf274a9c80f6bb479f30f1cc1127ca64dbaf7c22e73b3ec381a394ebe9d5e 0 +Wizard\AIOtherEvoSubtractCountdown.cs Wizard\AIOtherEvoSubtractCountdown.cs 4c602a21eb3ffd117a35dfa58733987a4ff0539e0487f20a8316b23543bc5726 0 +Wizard\AIOtherEvoTagArgument.cs Wizard\AIOtherEvoTagArgument.cs d4bfb329dd35250ea0864b5547c9e231ef6ad3643776d66012b772044fc7b879 0 +Wizard\AIOtherEvoToken.cs Wizard\AIOtherEvoToken.cs 82745a9cf6a39e3528982c3ac50ae044ad16da437ebeb2f313e05847d64f79fc 0 +Wizard\AIOtherEvoTokenDraw.cs Wizard\AIOtherEvoTokenDraw.cs adbd214c47c253e13c82d86fb4641f019e27849a042dac91a2fccda4ad864f92 0 +Wizard\AIOtherLeaveDamage.cs Wizard\AIOtherLeaveDamage.cs 85e62821cab97454473fd60dbc3e33b280788e2161c2bc60c955ab7cb887590c 0 +Wizard\AIOtherLeaveToken.cs Wizard\AIOtherLeaveToken.cs 4deb4a39ce7071056fc4dd63e8052eadd9304dd3a004a2a30baf528729de3207 0 +Wizard\AIOtherPlayBonus.cs Wizard\AIOtherPlayBonus.cs 83b43f391d6c212d7c594e153fa698422d8797446a603443ceae6ce3dd96e393 0 +Wizard\AIOtherPlayBonusRate.cs Wizard\AIOtherPlayBonusRate.cs 8ddf0beac3557499c1b00726fcf55f8da09f8f9a471954831080d67677853991 0 +Wizard\AIOtherPlayoutDamageBonus.cs Wizard\AIOtherPlayoutDamageBonus.cs cf6898f830fcb2cf48c78fe3bb68e7cc869994bbe3ee0d862e099cccac2dee0c 0 +Wizard\AIOtherSummonAddCemetery.cs Wizard\AIOtherSummonAddCemetery.cs ed36cb27d7774cc9e9a210e3c51eafe307c686f141459885a29fc46077bb9c3a 0 +Wizard\AIOtherSummonAttachTag.cs Wizard\AIOtherSummonAttachTag.cs 98648a07559ffed361576ad252eaf016feb36e537323d9924c887c5111ad6b03 0 +Wizard\AIOtherSummonBanish.cs Wizard\AIOtherSummonBanish.cs ab2531ee1251b0ac05cd08781fe5508b911db6bd9f38192840a6cf84fe0dd0b6 0 +Wizard\AIOtherSummonBarrierBase.cs Wizard\AIOtherSummonBarrierBase.cs cce9e686a03d787eb35fc1ee9e9d1ed01f3dc9fb7c393b15e862f9380dbc4d56 0 +Wizard\AIOtherSummonBuff.cs Wizard\AIOtherSummonBuff.cs 3eeb747763d3737812591b50295479d641db4e0e1bcfe072ff8cfe9f4a548ee0 0 +Wizard\AIOtherSummonDamage.cs Wizard\AIOtherSummonDamage.cs 3bca86eb93154e3c4ec5c0d305403954c1bd7375db2a0caf4b88c58c85c26cd3 0 +Wizard\AIOtherSummonDamageClip.cs Wizard\AIOtherSummonDamageClip.cs 37361a7cce750b679b854667c46ff178e67a4b0f0c09b25a75e3eeee7e69a265 0 +Wizard\AIOtherSummonDamageCut.cs Wizard\AIOtherSummonDamageCut.cs 5a8aefaff9dac3c1e33308d43805af02e55c31edd76cb1ac122c2faec840822e 0 +Wizard\AIOtherSummonDestroy.cs Wizard\AIOtherSummonDestroy.cs 7d333417fafe264eab03b45051768913cc671e2727ce0639c7b0ce3e844de78b 0 +Wizard\AIOtherSummonDraw.cs Wizard\AIOtherSummonDraw.cs 66d34326e0b6c76b90a3390efba60402144fd321da7921b906ba9f8d32d04e1f 0 +Wizard\AIOtherSummonEvo.cs Wizard\AIOtherSummonEvo.cs a09799162402e049e24992e709b890f8b4a20056418b821ed59278fbbed2fd64 0 +Wizard\AIOtherSummonHeal.cs Wizard\AIOtherSummonHeal.cs 8bc933aa0e58a08ec4eeabd9e875792e159f0e85d85b947dfb7b1389865341da 0 +Wizard\AIOtherSummonKeywordSkill.cs Wizard\AIOtherSummonKeywordSkill.cs 4893c832e8fe0fe68091b7f6cbf6b18cc97a7c7c377af4fb8de903e9970fdfb9 0 +Wizard\AIOtherSummonSubtractCountdown.cs Wizard\AIOtherSummonSubtractCountdown.cs d87870be3d36f0bc7b1a8d7d84d636d0a6703b31f731cbf4e745a6f435acb596 0 +Wizard\AIOtherWhenPlayAttachTag.cs Wizard\AIOtherWhenPlayAttachTag.cs 3491c805bb13168ed919dfa68b41567eb5ec968ea277521b0b57d8e624516237 0 +Wizard\AIOtherWhenPlayBounce.cs Wizard\AIOtherWhenPlayBounce.cs c8dbbaca6600de582fb359eec2c26282d1993ae4d1685a2318e4c8de287d5eff 0 +Wizard\AIOtherWhenPlayBuff.cs Wizard\AIOtherWhenPlayBuff.cs 4ecd96aea02925d366848724a406d6ef2c71ca119a2aebaee1651d4074767e88 0 +Wizard\AIOtherWhenPlayDamage.cs Wizard\AIOtherWhenPlayDamage.cs 456734809fe86b6c425debd782356153180ea194a4df62329d38c08012d8ea12 0 +Wizard\AIOtherWhenPlayDestroy.cs Wizard\AIOtherWhenPlayDestroy.cs 80f5991b664574cca371d72c1ab84fce0094650f5d8a562d5648fe3d83b9e849 0 +Wizard\AIOtherWhenPlayEvo.cs Wizard\AIOtherWhenPlayEvo.cs 79d676adf61ae5b80a71f353e7c62046a3b67d492c61b214336bea6b0f26dcff 0 +Wizard\AIOtherWhenPlayKeywordSkill.cs Wizard\AIOtherWhenPlayKeywordSkill.cs aa79da6e4f588c307e1bf029d6acdd788459ea8ea7dc435eadf96c0efa26c131 0 +Wizard\AIOtherWhenPlayRecoverPp.cs Wizard\AIOtherWhenPlayRecoverPp.cs 4d87c0cbf8edd6ac4fbb6db39d9a932171df74b81e3f6bdd6b26a4016ec8f846 0 +Wizard\AIOtherWhenPlayRemoveTag.cs Wizard\AIOtherWhenPlayRemoveTag.cs dce8eec81cb815211ab8b8145263e0fbfe45191e899374f0ed480426dce3bbc5 0 +Wizard\AIOtherWhenPlayTagArgument.cs Wizard\AIOtherWhenPlayTagArgument.cs 01c0912988326bbce76f77f35fc951e1c5cdb0d210e4f052e341a4a825594d2b 0 +Wizard\AIOtherWhenPlayToken.cs Wizard\AIOtherWhenPlayToken.cs b3fc883273b62a1de6b8f2116232cc146ed9ffaf5e77c05818836b71f95e6ef5 0 +Wizard\AIOwnSkillProcessRecord.cs Wizard\AIOwnSkillProcessRecord.cs 6dfc068e5c01160fec9067d925c28fca631593303a37eb01a73f572826127110 0 +Wizard\AIParamQuery.cs Wizard\AIParamQuery.cs f72f4e7957b25eaf73fd016678ff0a359cf290570c43307d4d557e4c0848cbf2 0 +Wizard\AIPlayBreak.cs Wizard\AIPlayBreak.cs 88a9d014fee6d9395f3274686acf1f9e3f60e95fb645239f895f6f7c584ea708 0 +Wizard\AIPlayCardSimulationUtility.cs Wizard\AIPlayCardSimulationUtility.cs 778ca26874bfcb362f60b72c05cf4e628aec0cec8a759089d0768db62be0f8d1 0 +Wizard\AIPlayMove.cs Wizard\AIPlayMove.cs 1c90c48a15d7e41e8a6787641c94e6b96fa1c8f7cfd844ffcbfd50535ffb07f5 0 +Wizard\AIPlayOnSkillUtility.cs Wizard\AIPlayOnSkillUtility.cs 02e594b025412f266ac5f04e73507c095d1b91db354f3c75a268d8c1f3f0ccc1 0 +Wizard\AIPlayOutAction.cs Wizard\AIPlayOutAction.cs d92398f58ff03224c5a3b4d3c11bb8a3e271c29f940801ca0fa2635897d52c57 0 +Wizard\AIPlayOutChecker.cs Wizard\AIPlayOutChecker.cs a4dbc1c7299ec7f51314b027f9e9e5324b2f5f513502a353d18e8bbcaf4e5301 0 +Wizard\AIPlayPtnUtility.cs Wizard\AIPlayPtnUtility.cs 48d21fc52d48585e96dded2c597cd75620a4583896c14655a83a68887b0b672b 0 +Wizard\AIPlaySkipIfEvo.cs Wizard\AIPlaySkipIfEvo.cs 0ff928e897d4a73cac9fb5c03eba60b0214abffb043cdc867c3f86794e431ac5 0 +Wizard\AIPlaySkipTagArgument.cs Wizard\AIPlaySkipTagArgument.cs b701b082bfec67fd011768f28689cb21c5a98a83e65fbee6008c867b595b32bd 0 +Wizard\AIPlaySkipWithAction.cs Wizard\AIPlaySkipWithAction.cs e6dbc8b262501a8bd41bc68fc2c4aeaa17f3eba2dfe3909351e62224f37be43f 0 +Wizard\AIPlaySkipWithActionIfEvo.cs Wizard\AIPlaySkipWithActionIfEvo.cs a6582fea3ddbaf291e487b58c3081ba14994ef2785b1d0e4eef6ef6f0fdcbee8 0 +Wizard\AIPlaySkipWithEvo.cs Wizard\AIPlaySkipWithEvo.cs 523727974b3eb31e8e84a8d226a6e2aa23c06f5e556ca42d2faadc5efc490285 0 +Wizard\AIPlaySkipWithFilteredTargets.cs Wizard\AIPlaySkipWithFilteredTargets.cs b15bd62490e587b2e306d2dc0addbd76c3d41f76b213902ce1f2646fa43946c0 0 +Wizard\AIPlayTag.cs Wizard\AIPlayTag.cs 2dba08af840cde17384636259c1a8736220d48ca61a94716db6d0ee5e6ed5e25 0 +Wizard\AIPlayTagAsset.cs Wizard\AIPlayTagAsset.cs 1b87a0193f4cf8653bafd6daaddddf662c91a7c956e2d98955b9d2c252aa2a93 0 +Wizard\AIPlayTagInitializingUtility.cs Wizard\AIPlayTagInitializingUtility.cs 715459516cbaba707ff4dc255fe4062e0432c040018fcb106a45cc796d47ce47 0 +Wizard\AIPlayTagType.cs Wizard\AIPlayTagType.cs 98a5f5b22a3f7efe66cd9bfc9314bb71cd25d28d06a660a0dba542cbd62dd62d 0 +Wizard\AIPlayTokenSimulationUtility.cs Wizard\AIPlayTokenSimulationUtility.cs e5e5f0d7ed2807b7a023b5321ba51d4c9036ef351fa25e9b800d2125142c34ff 0 +Wizard\AIPlayedCardContainer.cs Wizard\AIPlayedCardContainer.cs bfa459b95817c77dfdc3b14d445ed256c17b3f4fcdf902ed19ce08b408c8673c 0 +Wizard\AIPlayptnBaseStatsRate.cs Wizard\AIPlayptnBaseStatsRate.cs e1dbf76c8d88f210be967c11f5dfe2770b7ba40a259ee3f571b7a0a3e9c85c9f 0 +Wizard\AIPlayptnBaseStatsRateUtility.cs Wizard\AIPlayptnBaseStatsRateUtility.cs 06bf1e0cda623fed621fb7a65fa2d5580c5a91dff8348f13658a38c68c091d9c 0 +Wizard\AIPlayptnRecorder.cs Wizard\AIPlayptnRecorder.cs 12efcd9a633f4d916a07b032e457c371a34e62e624d6d65a44ec11b24b6a652c 0 +Wizard\AIPolicyCollection.cs Wizard\AIPolicyCollection.cs b5971a463a61c052b287a24e544367117555d0572989de2dbeaf5f27bd845384 0 +Wizard\AIPolicyCollectionContainer.cs Wizard\AIPolicyCollectionContainer.cs cb2fb55f80cfef1254b5d7fa9587b9b80f3f46d7106146b62039bb5dfa19607d 0 +Wizard\AIPolicyData.cs Wizard\AIPolicyData.cs d121c5671ed8921f300da67ff87ce400673848c8884998b558c87622d474b12d 0 +Wizard\AIPolicyDataAsset.cs Wizard\AIPolicyDataAsset.cs 9eb4a2b26aaa831c0c24845ab2484f7647172bb1cd7d9619e67b235a5cdf03d9 0 +Wizard\AIPolicyType.cs Wizard\AIPolicyType.cs 139ba46866994d03e271e10351bae6960a724f4e14e2efe7ca7567bf0ff96567 0 +Wizard\AIPolishConvertedExpression.cs Wizard\AIPolishConvertedExpression.cs 2c37d1665811937b1103d742d6154a88d9d6549e926c842bc4461456ea63efb4 0 +Wizard\AIPreprocessSimulationUtility.cs Wizard\AIPreprocessSimulationUtility.cs e8dab36f853e23a6f47dd593eb2893e2b96d5f014e9acacdbd1f846712d9e15a 0 +Wizard\AIRealActionInformation.cs Wizard\AIRealActionInformation.cs bace0d857b7345017e6d76cd2485d5d12bde4c7357046e04b483d19f4a37e502 0 +Wizard\AIRealBattleCardSearcher.cs Wizard\AIRealBattleCardSearcher.cs 5bb09911e97d22f5558048ca0fa8dceb1eb265bce3eda5a9ade88010f050c611 0 +Wizard\AIReincarnationUtility.cs Wizard\AIReincarnationUtility.cs 8c6f8d7019844fa4af5acb89c9f9bd3509f44bfadde0de6af4ed783b54d04546 0 +Wizard\AIRemovalType.cs Wizard\AIRemovalType.cs a21dcef29cd2a5b50cac7ddc4e6dc046049a94cf0b607985fd211216c0f46ec4 0 +Wizard\AIRemoveByDestroy.cs Wizard\AIRemoveByDestroy.cs eaaa88f8fd1ce4992857ffccdb59bf5c78fc4c99ee6399198d3ed3508cd8d889 0 +Wizard\AIRemoveSkill.cs Wizard\AIRemoveSkill.cs 37ad93e8d0f2d36d7b8a7c2b3f52dacb7d8a2bd37cfed44b0d61a3abe158adb5 0 +Wizard\AIRemoveTagUtility.cs Wizard\AIRemoveTagUtility.cs 9611b9a087ab55879ab1ef610a26bae4f4f7e6507e9b7cfeca2ba4f5497e8ae9 0 +Wizard\AIRemovedTagCollection.cs Wizard\AIRemovedTagCollection.cs 9131b82dd4626aacbc8b85fe09e1c93049e2fe4f1dc0d748e6dc99965731de66 0 +Wizard\AIRemovedTagInformation.cs Wizard\AIRemovedTagInformation.cs 02359747ab3ef0417f6d9a57b675e1cc76f0d7739acf37c81c1fa0d4f4d9675d 0 +Wizard\AIResonanceDamage.cs Wizard\AIResonanceDamage.cs 31d3b5a74b4e369f3ffc15ed5745ebf8fd6b590f2efc737a1b7e6ed94317d8e1 0 +Wizard\AIResonanceGiveBasicSkill.cs Wizard\AIResonanceGiveBasicSkill.cs 00b4960af8ef45d3a59393988907b05856977fffa11dc91e276f6f0507e9488e 0 +Wizard\AIResonanceHeal.cs Wizard\AIResonanceHeal.cs b32a5ad217fd1bdac07b84b28cc25f84519c3dafb1d85e08120a46f8c1119cc6 0 +Wizard\AIRuleBaseBattleSimulator.cs Wizard\AIRuleBaseBattleSimulator.cs 2ec1cf8dd989a2779f214673107991995e2509d8b074fae2c06691ec9222d50e 0 +Wizard\AIScriptArgumentExpressions.cs Wizard\AIScriptArgumentExpressions.cs f84b6e5cd8c7ace4cca42f83ef307ce9ec20b98b7518aecec372f4eb36d2cd0d 0 +Wizard\AIScriptArgumentToken.cs Wizard\AIScriptArgumentToken.cs 81ee7fc8bdd4868a26c01e47282c6395b31b4e0213816bef4d2c1b11ae434163 0 +Wizard\AIScriptCalculationToken.cs Wizard\AIScriptCalculationToken.cs 6ab1018faf72d60041c56cc77c4d0bf5aa656a014f82223df64280660e6d963d 0 +Wizard\AIScriptExpressionCalculator.cs Wizard\AIScriptExpressionCalculator.cs de7922c107d2e436339a4c28939dd5322579e31a970e82ebd7c74e47e7160339 0 +Wizard\AIScriptFunctionToken.cs Wizard\AIScriptFunctionToken.cs 592b2829fef7646952eb3c20ec580cfb24a3e4ed4cf835416fd78a4ed10442c9 0 +Wizard\AIScriptIDToken.cs Wizard\AIScriptIDToken.cs e17a3f97d5cd633705db26e15f22f441941248ec85bdc73c5e4c046b4b95fb61 0 +Wizard\AIScriptNumericToken.cs Wizard\AIScriptNumericToken.cs 125ed19bd0fe13b3f256ca1dcd3af06b437d7fcc24f60c53301cd45991601748 0 +Wizard\AIScriptOperatorSymbolToken.cs Wizard\AIScriptOperatorSymbolToken.cs 29a0ea9d88ab4d2a57c602da929ea571854d7cd69f6cb0ad040fda0fe278590a 0 +Wizard\AIScriptParser.cs Wizard\AIScriptParser.cs 5caba7e096041245559d1706eaae50accfe7038f21f1339ed938424751b641fc 0 +Wizard\AIScriptTextToken.cs Wizard\AIScriptTextToken.cs 07f68a085af3e59e49e7baf997352b91133108e5db308c2a7e7c5a76816c203a 0 +Wizard\AIScriptTokenArgType.cs Wizard\AIScriptTokenArgType.cs dac60cafacf16e8be5d4152f77e601c78380fc45ee18ea50a5249141fcd7a26d 0 +Wizard\AIScriptTokenBase.cs Wizard\AIScriptTokenBase.cs 1e170b08af4926101bb84e7a907b25b95315d30c391e3f90578ad6d649f015ce 0 +Wizard\AIScriptTokenFuncType.cs Wizard\AIScriptTokenFuncType.cs 2a67c3c917fc92479a1d0d65407bbe9cde91517d70d149bf97133095af3c5dc6 0 +Wizard\AIScriptTokenType.cs Wizard\AIScriptTokenType.cs 25fa54f16c1a614e75888da9b01bf82c48484f221e34135f54ed45f2f594c128 0 +Wizard\AIScriptTokenVariableType.cs Wizard\AIScriptTokenVariableType.cs 31a17a1a1892b28d1836475adb5f5fb6d8371579c4e117b8e934d1520394734f 0 +Wizard\AIScriptVariableToken.cs Wizard\AIScriptVariableToken.cs 95fc72412573367cae024e27f97ab824d303b3720a402950ebcc034018a5ce47 0 +Wizard\AISelectLogicArgumentBase.cs Wizard\AISelectLogicArgumentBase.cs 3cf1c8712e77f2e89bcda1e4e4f7e7578a561adbc484313420f0b37fbe6c608d 0 +Wizard\AISelectTargetPattern.cs Wizard\AISelectTargetPattern.cs e6ec9297ce867d018de96e073513995853987134f565599e52ca8f0b73a69aee 0 +Wizard\AISelectedTargetInfo.cs Wizard\AISelectedTargetInfo.cs e5bd0b74bb61210fb74c7e32ea756c210b11606ff3ee8fd50db2eb3410b594b6 0 +Wizard\AISelectedTargetInfoSet.cs Wizard\AISelectedTargetInfoSet.cs 7ce8704230b0e3845ab6fca518d57fed7014bc865be3d0068e6e1b6e0dfbf3cd 0 +Wizard\AISetTribe.cs Wizard\AISetTribe.cs f60347f263449db078058bbac9ad6b57b2069bfd16d602be61d2878c82fd5088 0 +Wizard\AISetUpData.cs Wizard\AISetUpData.cs 40fd759ff03db75b0ce7037a189ea5f5a9b41ebde0e7a534f7af001765922f2a 0 +Wizard\AISimulationBuffInfo.cs Wizard\AISimulationBuffInfo.cs a1220a11d4f07b0136353ee043781445021ecc4a2c20280010c063202eade9d8 0 +Wizard\AISimulationBuffInfoCollection.cs Wizard\AISimulationBuffInfoCollection.cs 5566d56d5ddfec6b112435eb625be7182bb2c8c7c5cd749f482034df6aff84c9 0 +Wizard\AISimulationPreprocessRecorder.cs Wizard\AISimulationPreprocessRecorder.cs 488c557427ce2e33b752cdf7dd4df6fedbc6b84f18009deddccd653f95211cdf 0 +Wizard\AISimulationUtility.cs Wizard\AISimulationUtility.cs 861880dc81dcbf5d637a438a9a6e5f0d6320aead2622ac5a285d7367aa2fe5d9 0 +Wizard\AISinglePlayptnRecord.cs Wizard\AISinglePlayptnRecord.cs c627b1e1f8f0bff9d872b97ceecb111bc827346fae29517ca4a52fc96c3a78b5 0 +Wizard\AISinglePreprocessRecord.cs Wizard\AISinglePreprocessRecord.cs 665cdff4396f8628d7a4c237bf68060376bb95f3b8497efc0dadcfce5e4ccd1e 0 +Wizard\AISituationInfo.cs Wizard\AISituationInfo.cs a2c623dcb04b510aa1040a03c881a2653f1c8daf03965e605f72936eb1326e00 0 +Wizard\AISituationTriggerInformation.cs Wizard\AISituationTriggerInformation.cs d555644f8f6aeaadf504f8cb75790d39e5cc767a17d0b570d78428e13cc6487a 0 +Wizard\AISkillProcessInfoCollection.cs Wizard\AISkillProcessInfoCollection.cs e879231368bfccdddd19c35581434aa64bb098c54568f26badde1e7eb63af762 0 +Wizard\AISkillProcessInformation.cs Wizard\AISkillProcessInformation.cs 363a1cde610924a277d4fd8fe2f3bec987092303f925ddd15b9aefc0da3fcc23 0 +Wizard\AISkillSimulationUtility.cs Wizard\AISkillSimulationUtility.cs 4559e4425b9d303aa8eb75f359b238a14973139f41c3402b940335320b71e620 0 +Wizard\AIStack.cs Wizard\AIStack.cs 683c5d650c1bb5fe8bf9d1e759968da523a14d2629ca8cbe3aec36723f0e5cdb 0 +Wizard\AIStackCountUtility.cs Wizard\AIStackCountUtility.cs ccbc006affb19a24630fedd07036764ce74c16a27bfec82cca8d6f122072ea8e 0 +Wizard\AIStyleData.cs Wizard\AIStyleData.cs b75cc3deb327eae14e96b093b08f66eab487dec8b59a30c64cee250bf7529f28 0 +Wizard\AIStyleFileNameList.cs Wizard\AIStyleFileNameList.cs 1a15d2ba07c655c979cbf8834db7bafda84903e6acc1b26f5bedcce4237f8154 0 +Wizard\AIStyleKey.cs Wizard\AIStyleKey.cs 6de01f9b6e4e7facd907e2d36e12a8a2313645438595bf25f36dc7fc67276470 0 +Wizard\AIStyleQuery.cs Wizard\AIStyleQuery.cs 6169604f23901d24f1bf2781c25d17284e52b21a1cf85795e3ea89b5fe017031 0 +Wizard\AISummonAttachTag.cs Wizard\AISummonAttachTag.cs 9dfbd28ccf548a3944d9bc43a55a49e47d241749e94e8d3ceee84cc53821ca0b 0 +Wizard\AISummonBanAttack.cs Wizard\AISummonBanAttack.cs c415ca03a172b490733e41354b7a2fc81fbeb460abfabc33c5e6b733a0024e42 0 +Wizard\AISummonBanish.cs Wizard\AISummonBanish.cs 2aef8da72e9fdd4cb509b1c35602e8144fc4a315163538f21bd8aa97420d3f15 0 +Wizard\AISummonBuff.cs Wizard\AISummonBuff.cs 234c45562a061bcde89da1b8cab5ae4fe31930b2cbf3171a8c3e7e42b535a60d 0 +Wizard\AISummonDamage.cs Wizard\AISummonDamage.cs 24481dd1bca2c80dff6986f5745499fc3c4c9fd2b9398a842f7799c70dd2cc61 0 +Wizard\AISummonDestroy.cs Wizard\AISummonDestroy.cs 72d6aa7fb6f698d5e7793d4fd87ced13b7f1f4e8c0e672be8e4dcba91f685ea3 0 +Wizard\AISummonEvo.cs Wizard\AISummonEvo.cs 7b13de04204ee846b7ab6c38c177e86e679a27f71b87d849360882833a7623d2 0 +Wizard\AISummonHeal.cs Wizard\AISummonHeal.cs 22b2a87ce6550981b93a6ba052ada51250037da8ded7abe2c1c3c1537b4c481c 0 +Wizard\AISummonKeywordSkill.cs Wizard\AISummonKeywordSkill.cs f5cb13b541d9e396f960174bf9cf89cbe6f9d0f2029f4ec7c619676852b9a6de 0 +Wizard\AISummonTokenUtility.cs Wizard\AISummonTokenUtility.cs 845a9eacdf2b4ed8f95226faffdc27f9ed455df1d198d1a0d8d71e5feb57f2a8 0 +Wizard\AISummonedCardContainer.cs Wizard\AISummonedCardContainer.cs d0bfb2ed4b33f3945b9e04fdf8c55695164c4c16612c1e488794afce79f7601c 0 +Wizard\AITagCollectionContainer.cs Wizard\AITagCollectionContainer.cs 27d58c22dca581c88747a8638279d60ab08d3171ba99e2e090e9633299c0196d 0 +Wizard\AITagPreprocessCollectionBase.cs Wizard\AITagPreprocessCollectionBase.cs e34637b6e62216a23657c91a3f1ee73e97e59da9d9bd081efd4ca6d4e34f1e1d 0 +Wizard\AITagPreprocessCollectionContainer.cs Wizard\AITagPreprocessCollectionContainer.cs 00084fc071bdfb48b7e631456f962be85c8118c6e5bef2a45b9c93593a1e8f74 0 +Wizard\AITagPreprocessCreationOptionBase.cs Wizard\AITagPreprocessCreationOptionBase.cs eb9315ebfb1987f84580adca2a88e8dc15133aa04db4d561621246deb65ac87e 0 +Wizard\AITagPreprocessInfoType.cs Wizard\AITagPreprocessInfoType.cs 665eae10681ddf1d887f7a74238f34547fc03e16525b423b420a29e994059611 0 +Wizard\AITagPreprocessInformationBase.cs Wizard\AITagPreprocessInformationBase.cs e18a087047b3036f679ae974be8b2a50a5ddf88203ff29d6b626c9ae25db0002 0 +Wizard\AITargetSelectFilteringUtility.cs Wizard\AITargetSelectFilteringUtility.cs 8757e4a3b3f598d0b6cd9f22fa9f07c435a9736f8765ff221d8168256fa8f726 0 +Wizard\AITargetSelectTagArgument.cs Wizard\AITargetSelectTagArgument.cs 0c0e6c7aef949e8a0faf2e1f801dbf5b845acf861c4853d8147745aaa6952a85 0 +Wizard\AITargetSelectUtility.cs Wizard\AITargetSelectUtility.cs 5f549dcc4d55e0f4cf3cd985da3509c16ede9da96697be910719befb5083024f 0 +Wizard\AITestGlobal.cs Wizard\AITestGlobal.cs de9e6c279378b0b572d4711021c57806343879ddb63b58f690062092fc7b6f87 0 +Wizard\AITimeOverAttackSimulator.cs Wizard\AITimeOverAttackSimulator.cs 4109f7c9c14ada1d326e788923a8aad30d056201465fcddf3fd7b1465894a7a5 0 +Wizard\AITokenDrawUtility.cs Wizard\AITokenDrawUtility.cs 2d321e831d5d8dfb62acc3c0753300d7e7bf931e580aa3342079abc0b06c37c9 0 +Wizard\AITokenIdCollection.cs Wizard\AITokenIdCollection.cs dbf0f2fd026e6d20846c02ffec5fa32f1c659fb4f00b3a1c6e1f30638499b74e 0 +Wizard\AITokenIdHolderCandidateRangeInformation.cs Wizard\AITokenIdHolderCandidateRangeInformation.cs adcba8870fda5fcf81f5f746fe12e8f07fe8ff2df4062a975e327d0bfa5e6281 0 +Wizard\AITokenInformation.cs Wizard\AITokenInformation.cs 911f946fad7fb683cd339c1d3582cc13e81e96c17eb241f260aebf584c8a8914 0 +Wizard\AITokenManager.cs Wizard\AITokenManager.cs f0ce94639584c1b363526168b4fd389f53a55736dd6638eeafa03d2d5d7aa670 0 +Wizard\AITokenPool.cs Wizard\AITokenPool.cs 7168cc127e6d2d3f8fb71f084ec127d1df61ed7c146aa7180702b7056c747320 0 +Wizard\AITokenType.cs Wizard\AITokenType.cs ce54ae877e3ca2b888bcf80ff8b8494165fec70e7a4f13feea2e8fe03dfd09ee 0 +Wizard\AITribeSimulationUtility.cs Wizard\AITribeSimulationUtility.cs 82b68a7cd3ed189e04ea6bc6a3a52ac4b4d9d7b4a3cb081943bd01a28bfdc2a3 0 +Wizard\AITriggerAndTargetFiltersTagBase.cs Wizard\AITriggerAndTargetFiltersTagBase.cs 026d4aecc5dc6a81ac119525845a229522da50839ae8d51d8e3305513026a422 0 +Wizard\AITurnEndAddDeck.cs Wizard\AITurnEndAddDeck.cs 191157108dbb150e5d75b09edb4ea510e0bc093160d532aede308c5bc60e39dc 0 +Wizard\AITurnEndAttachTag.cs Wizard\AITurnEndAttachTag.cs b76c2d27b2a23727a54e8dc80b27ccef86522476be18646b189b1655567201fd 0 +Wizard\AITurnEndBanAttack.cs Wizard\AITurnEndBanAttack.cs 48abdb55cce7a0a547fddc873b124ee91d7551ef4b26fd3340b81b6991285ee3 0 +Wizard\AITurnEndBanish.cs Wizard\AITurnEndBanish.cs 60106ef86508303a9ec75c5614dfad17f5ff1f1d0251b08fb868d1ecad8fe820 0 +Wizard\AITurnEndBarrierBase.cs Wizard\AITurnEndBarrierBase.cs 6f7fe86b8b850855440aee5dda1786aca64d6a9f81c6a4b4f34d0461a12b186a 0 +Wizard\AITurnEndBounce.cs Wizard\AITurnEndBounce.cs 50f2f12f5eb85bc1afd9468972334a2aec72dccd091a18fbf3b9fdf4ecb92226 0 +Wizard\AITurnEndBuff.cs Wizard\AITurnEndBuff.cs 846a0077c69cf5b5765da39aafd7eeb9f4c2c3d8154469452bcb108cb3262516 0 +Wizard\AITurnEndDamage.cs Wizard\AITurnEndDamage.cs 812d7c3005a15fd8d52a779f5d988cd2ed0ffd5eda450bb367ca1b095e2a4f94 0 +Wizard\AITurnEndDamageClip.cs Wizard\AITurnEndDamageClip.cs 46125e93869975cddb05dc0c99685bdf0422172faf09224c54a558e616315c2b 0 +Wizard\AITurnEndDamageCut.cs Wizard\AITurnEndDamageCut.cs 91d04463d782f459a15ab205bf49ba0d76a16d21acb27c7aff4577612942fc04 0 +Wizard\AITurnEndDestroy.cs Wizard\AITurnEndDestroy.cs 7eead5a86b52b8135b8ecc5e94ffd8ca9f17eea405fb012898219e2c6f1292b0 0 +Wizard\AITurnEndDiscard.cs Wizard\AITurnEndDiscard.cs 129b493420b50ac98bd8449263673ee9028d801fa262a55e459c9b75d3a24497 0 +Wizard\AITurnEndDraw.cs Wizard\AITurnEndDraw.cs 9c131a8da161b835c68601b098a8648f7f5bb06873d09acffc8434ec67cf0923 0 +Wizard\AITurnEndEvo.cs Wizard\AITurnEndEvo.cs c38a9d1b494465ff3bf86dd81a34615f4b146041be0864b177738da470988f9f 0 +Wizard\AITurnEndHeal.cs Wizard\AITurnEndHeal.cs eab24857803482237853af06e983743cac0e4edb530a829856b550a02ae761aa 0 +Wizard\AITurnEndKeywordSkill.cs Wizard\AITurnEndKeywordSkill.cs ab17c78a6cdc42f2163c67c77a3fde10a1d8a11c7ff125870832304d091428f2 0 +Wizard\AITurnEndMetamorphose.cs Wizard\AITurnEndMetamorphose.cs 230be7340722365c169680caa70758c3c8511935a855971d5dbf2f58f3e296f2 0 +Wizard\AITurnEndRemoveTag.cs Wizard\AITurnEndRemoveTag.cs 396f2c699e39f62a3a39ad65e8fa279edca065699c5fff732723e582c2185f9b 0 +Wizard\AITurnEndSetLeaderMaxLife.cs Wizard\AITurnEndSetLeaderMaxLife.cs a590c41645dea9666d9f2c60494d43633d2ff1faac5a684e1bec475d732b550e 0 +Wizard\AITurnEndShield.cs Wizard\AITurnEndShield.cs 97cfd288f54a72bf0d2a2704f57b516a5ba800399afa76e94b6e88b8154d0b07 0 +Wizard\AITurnEndStopCollection.cs Wizard\AITurnEndStopCollection.cs 136f36ed4e72e510181ac0402fcf399bb5f535fd7d31561be7f518b50e8f51f0 0 +Wizard\AITurnEndStopInformation.cs Wizard\AITurnEndStopInformation.cs 281335cf192a4366bd3199b0da5efaec06580652e644dd6b7c2c268cc51aa37c 0 +Wizard\AITurnEndSubtractCountdown.cs Wizard\AITurnEndSubtractCountdown.cs 8854aa8b0b6c79a9a6faee76ff7e5b0687565fa61973fbdcc29993acc5d13fa0 0 +Wizard\AITurnEndToken.cs Wizard\AITurnEndToken.cs d80b08f879c5b3273e6ab172832b6b45e16db06f7532df680f301760416cd5d6 0 +Wizard\AITurnStartAttachTag.cs Wizard\AITurnStartAttachTag.cs 7039759b95b59ff90e3882408fd20d817df0e536f0ffe1727786e2433be06eb6 0 +Wizard\AITurnStartBarrierBase.cs Wizard\AITurnStartBarrierBase.cs cb6597e9d362b06f0c399005ade74b18b26273338840cc6daa119daf62ecf849 0 +Wizard\AITurnStartDamage.cs Wizard\AITurnStartDamage.cs e12c31596eafd8967bb7e97ce5f232e26121c9ad9294cc64cb44927cdfdb8f68 0 +Wizard\AITurnStartDamageCut.cs Wizard\AITurnStartDamageCut.cs a58405f144711352088d24e2904195392c78f71b398e69f49a3ebd85ec08531a 0 +Wizard\AITurnStartShield.cs Wizard\AITurnStartShield.cs 9f373c0ef89a514b81cfcdf5addf7be380190387847da179138314467ccd2c65 0 +Wizard\AITurnStartStopCollection.cs Wizard\AITurnStartStopCollection.cs 7dd089da37cc3d173715402a51a39f48f0292d8e203c027901f87f23fe4311ba 0 +Wizard\AITurnStartStopInformation.cs Wizard\AITurnStartStopInformation.cs 76e8db6a6a26c267e5b8e07d9160ad9dad0576f0e79450829a709ae388dd231c 0 +Wizard\AITurnStartSubtractCountdown.cs Wizard\AITurnStartSubtractCountdown.cs f4f126b4c4b7f4c9237f1b95de696d5789c874a3cca283c5fc43562d5ad5f3bd 0 +Wizard\AITurnStartTagArgument.cs Wizard\AITurnStartTagArgument.cs 7e7955f3db5977e2bc50bafc1b11973aa0a2adaf1138ff9e7ab84a79b25c25d2 0 +Wizard\AIUnknownAction.cs Wizard\AIUnknownAction.cs 16cdfe9b32664cd9fbf2cb14fe3eecbfcd4af21e6a809f8b55f80e833fb16b1f 0 +Wizard\AIUntouchableLeaveStopInformation.cs Wizard\AIUntouchableLeaveStopInformation.cs 203beb5200503259ff212f32210f658f680d3fcbfac20b872470af20f671788c 0 +Wizard\AIUseMinArgument.cs Wizard\AIUseMinArgument.cs 3fd829133058234c4655f21e177aba7df5bc1ebf3b3f6fa63bf3024e6a6cf54c 0 +Wizard\AIUseMinTagCollection.cs Wizard\AIUseMinTagCollection.cs 49be88a6eed6e2dfbf241579edcc26289cc55b2c44b69c20741a4331a1378318 0 +Wizard\AIVariableResultContainer.cs Wizard\AIVariableResultContainer.cs 56033f00c8e3140cbd10eb664754c95023508f39bea9feea9d23304207494ff6 0 +Wizard\AIVirtualActionInfo.cs Wizard\AIVirtualActionInfo.cs 801c6b5e247be407dcdeec45bc9a2f5f2410f3a29e011a17cb8d07ebf9ed62ba 0 +Wizard\AIVirtualAttackInfo.cs Wizard\AIVirtualAttackInfo.cs 16138524d2911ef07eae4739930e82dc39ea7a9602b9e52799ff1e8ea1fc3b94 0 +Wizard\AIVirtualAttackSimulator.cs Wizard\AIVirtualAttackSimulator.cs c3236d0263b9e8ce21e820cf434e475fcda4f16235372b15567a2a005493c326 0 +Wizard\AIVirtualCard.cs Wizard\AIVirtualCard.cs f37b7687359543b67e6934292a0d187326ed1ac3dd097e3e124f938832fa675e 0 +Wizard\AIVirtualCardBuildParameterCollectionBase.cs Wizard\AIVirtualCardBuildParameterCollectionBase.cs 14896f9714593475b4d33269f56967d442796011b453f667db13d97178ca33c9 0 +Wizard\AIVirtualCardParameter.cs Wizard\AIVirtualCardParameter.cs 0efb3001f156f1c6361b6794f06dd87bea04cc38c7b745d8df5f0b9d36c59ec6 0 +Wizard\AIVirtualCardRealTargetInformation.cs Wizard\AIVirtualCardRealTargetInformation.cs 4a234fd97705c34f3dda6849640115395632aaff4d354696cd8c35afa07be181 0 +Wizard\AIVirtualCardStatusInfo.cs Wizard\AIVirtualCardStatusInfo.cs 9cb8040efc2704b8ce4afe7e087032d8f68ab26c68eaecdb4b370922b045d588 0 +Wizard\AIVirtualCemetery.cs Wizard\AIVirtualCemetery.cs c2707eeca2eb4d065b4b056abf85843509bd3dbb82b91d4747437f2887e89df2 0 +Wizard\AIVirtualEvolutionSimulator.cs Wizard\AIVirtualEvolutionSimulator.cs 20e2f60a30715c207fa2364d6e511b4fa4f4fe2473f25bf21b29d4eaac50b3d9 0 +Wizard\AIVirtualField.cs Wizard\AIVirtualField.cs 0219d29471a281bbbfa4f60c07749a9e7d34077cff8221880fb96ec5b4977fae 0 +Wizard\AIVirtualFieldBuildParameterCollction.cs Wizard\AIVirtualFieldBuildParameterCollction.cs b3254b56ce4ee183df65a293880648998f8d909ca753d1f9db9acaba57c9256c 0 +Wizard\AIVirtualFieldRollBackBasicProcessor.cs Wizard\AIVirtualFieldRollBackBasicProcessor.cs 81541ea41b43625a1a7a52eebed6ebb76a8557fcdba4e3ca77849a5139ae4057 0 +Wizard\AIVirtualFieldRollBackRecord.cs Wizard\AIVirtualFieldRollBackRecord.cs e4be2b685c75a93716faae94ab5a6ad2577436bcd9296490fc1ccc396ae57d60 0 +Wizard\AIVirtualFieldRollBackStackProcessor.cs Wizard\AIVirtualFieldRollBackStackProcessor.cs 91c7aa2ad8aa81b00a9546775e5c877c7fd952050363b4d04ff236c401b8d6db 0 +Wizard\AIVirtualFusionIngredientsInfo.cs Wizard\AIVirtualFusionIngredientsInfo.cs 2139b7abc3dda0c64b9ef32312249e699f7420d46192a1213552c04bdf015497 0 +Wizard\AIVirtualPlaySimulator.cs Wizard\AIVirtualPlaySimulator.cs e260579db3a1f8f2d239f8fbbbd5cf77db7059fce61e3c8d60875b81891cf0a5 0 +Wizard\AIVirtualTargetSelectAction.cs Wizard\AIVirtualTargetSelectAction.cs 23df015a493f920e8f0eaf3e88aafb0f8397fac75d7b17d131ac30f2b5404733 0 +Wizard\AIVirtualTargetSelectInfo.cs Wizard\AIVirtualTargetSelectInfo.cs c579901ee72ff4da84d5cdbc379897060ef0a7d2dbf6d03cafbf75585d47adb6 0 +Wizard\AIVirtualTargetSelectSimulationInfo.cs Wizard\AIVirtualTargetSelectSimulationInfo.cs 97d7e9e0a4902bf83a54ae4c08ee941309ac15ba17364c6671d8d8511948c28b 0 +Wizard\AIVirtualTargetSelectSimulator.cs Wizard\AIVirtualTargetSelectSimulator.cs 6d3b89da8e3b578c562c3abd4a89a62d194b14e39bef07dd2cbc369c5a3a56db 0 +Wizard\AIVirtualTurnEndInfo.cs Wizard\AIVirtualTurnEndInfo.cs 57004c97cdbcd0a560ef3e3053a28391e92e99ace0ccd2ff631f27a1180950dc 0 +Wizard\AIVirtualTurnEndSimulator.cs Wizard\AIVirtualTurnEndSimulator.cs 3d978a9862daf02faff309fae4e6fac80591e2ba19eeda700b551060a2749697 0 +Wizard\AIVirtualTurnStartInfo.cs Wizard\AIVirtualTurnStartInfo.cs c5bab0e979a9a11eedcdd3178b608f22f0db55ab9dd0d3b46532a64028945eef 0 +Wizard\AIWhenAttackOrWhenFightTagArgument.cs Wizard\AIWhenAttackOrWhenFightTagArgument.cs f96ca8d94b92660d5c0f8df132af620ec09f5fce1b38d9b7ea0be734fd596856 0 +Wizard\AIWhenAttackSelfAndOtherTagArgument.cs Wizard\AIWhenAttackSelfAndOtherTagArgument.cs 6665add8baa1adba40c929d367e3c21dce5e0b08c42b635356d6dcde17a47d4a 0 +Wizard\AIWhenChangeInplayTagArgument.cs Wizard\AIWhenChangeInplayTagArgument.cs 4b7c4ee4252f7be9171c6ad9bc6aedfbd2cfc1348e3a4db6a13e4ef1c3c5bbc0 0 +Wizard\AIWhenPlayAddCemetery.cs Wizard\AIWhenPlayAddCemetery.cs 4d183e6f493fca5d8372463eb735f9cb41b71784ceb86d620a2d97e21a62d048 0 +Wizard\AIWhenPlayAddDeck.cs Wizard\AIWhenPlayAddDeck.cs 3bdb2db078e1d875d872141a8e5e550f1dccfc8f8ef6a01c30a65a9d22b2d549 0 +Wizard\AIWhenPlayAttachStyle.cs Wizard\AIWhenPlayAttachStyle.cs cbf54b40c1e05f101e46a658690a9ee65ccef411a09be96f71d5fa1ac0628a8b 0 +Wizard\AIWhenPlayAttachTag.cs Wizard\AIWhenPlayAttachTag.cs 9a61c380dc61d8be31c277d800e39af6ead5a2fbe37277109d74dd4bb61cd795 0 +Wizard\AIWhenPlayAttackableCount.cs Wizard\AIWhenPlayAttackableCount.cs 8800d55f1091765d1414c03ebf417084cce3733cd9546e7defab34d4e879513d 0 +Wizard\AIWhenPlayBanAttack.cs Wizard\AIWhenPlayBanAttack.cs a4f243694e6b6465ffd417ed2bf8f6bb4d0ed904ccc6cc5ed0b2cf68fcca5255 0 +Wizard\AIWhenPlayBanish.cs Wizard\AIWhenPlayBanish.cs d05927ddaa8b01ffac57cda2bc104aee4dad718bf3588e42fd41697d65906c6f 0 +Wizard\AIWhenPlayBarrierBase.cs Wizard\AIWhenPlayBarrierBase.cs 014e9890549ec2dbb16a607863e113c7a5ae4d8417d286a9f12230e18693b40a 0 +Wizard\AIWhenPlayBonusInSimulation.cs Wizard\AIWhenPlayBonusInSimulation.cs e8a3c9a510afe7178f5be4a85450afe40b9cd6e8bae1ee10583c2fa0d914d695 0 +Wizard\AIWhenPlayBounce.cs Wizard\AIWhenPlayBounce.cs a8f6f0283c9e62f397c746e03d0386a9fc37269558f13280eb3f718600484225 0 +Wizard\AIWhenPlayBuff.cs Wizard\AIWhenPlayBuff.cs 1fd8071a98420fce42d085455b17e78bfab56d0c1a80100b39fd8c24bc525d37 0 +Wizard\AIWhenPlayChangeClass.cs Wizard\AIWhenPlayChangeClass.cs 727ae3a54e42232bc98d8e934a4e9bbd3a425a6c4f714d65a3d317019eb1cc0d 0 +Wizard\AIWhenPlayChangeCost.cs Wizard\AIWhenPlayChangeCost.cs 6dd2d34e65e460ce463ecfb86da4c7af511a17143da750511112914aeb054421 0 +Wizard\AIWhenPlayChangeTribe.cs Wizard\AIWhenPlayChangeTribe.cs 3df43f60c01b651610601db8c4eb964a79499333d86176ecb1eb204907c0f584 0 +Wizard\AIWhenPlayCopyTag.cs Wizard\AIWhenPlayCopyTag.cs 628e25bce3d3e0218541c3ade72e6edad3672a55bf6bc47a80f5eada08dfeecb 0 +Wizard\AIWhenPlayDamage.cs Wizard\AIWhenPlayDamage.cs 218cbafdbaed6c83d5bdd1aec3392ec999324b22b38f03297ea8ce569a6be0c5 0 +Wizard\AIWhenPlayDamageClip.cs Wizard\AIWhenPlayDamageClip.cs 5c3fe6dc28063e8dc0c05c654ab0c4c53005c9d86bbc3f1147177c413e63e9b3 0 +Wizard\AIWhenPlayDamageCut.cs Wizard\AIWhenPlayDamageCut.cs 40fd6d089320ad75a886bc1b5bda6634369b01296c3cec7653c2ae65c4504feb 0 +Wizard\AIWhenPlayDestroy.cs Wizard\AIWhenPlayDestroy.cs 15bc0f758a2a46c0e2aeed06e170beff862bead1626dbe95ba7d4c9385832f6b 0 +Wizard\AIWhenPlayDiscard.cs Wizard\AIWhenPlayDiscard.cs 0e6041da94760be246e56c43cc0570291228a7638fe4c61c69ab97ccead22870 0 +Wizard\AIWhenPlayEvo.cs Wizard\AIWhenPlayEvo.cs ea42ef3997360335ff5c2aacbffffd2fb4b77eb50c6abe51bb14c1f93d62f9e6 0 +Wizard\AIWhenPlayHandBuff.cs Wizard\AIWhenPlayHandBuff.cs b8b7604c0d7be1177deff7a2ef5238cc92f3fd233e92fce2ecc3f069c6949138 0 +Wizard\AIWhenPlayHandMetamorphose.cs Wizard\AIWhenPlayHandMetamorphose.cs 5a04d681fae694932cd871f29b69e49ac3599aeb058899559a404b9695aa642f 0 +Wizard\AIWhenPlayHandSelect.cs Wizard\AIWhenPlayHandSelect.cs 6df478f1146f5626102517e7f3a8d5e5a426550d83d10e64058e4844fc81e86d 0 +Wizard\AIWhenPlayHeal.cs Wizard\AIWhenPlayHeal.cs 075b468870319ffba66b721b5750cba7e5166e5d1bb4fb463b122b28d77198dd 0 +Wizard\AIWhenPlayKeywordSkill.cs Wizard\AIWhenPlayKeywordSkill.cs aad155504b365354097c6a970af797c962f1fb6fd79c5fb32ac7218e0ce5bf59 0 +Wizard\AIWhenPlayMetamorphose.cs Wizard\AIWhenPlayMetamorphose.cs 7577ca26bacb1cc0ca9133c33b0647fbac066d7984faf19be132ef8c0e2d7761 0 +Wizard\AIWhenPlayModifyConsumeEp.cs Wizard\AIWhenPlayModifyConsumeEp.cs f4a7ea66959ad9b77c9e9883259644bc4392f8b75d228a11f4178bbac85d7f91 0 +Wizard\AIWhenPlayNotBeAttacked.cs Wizard\AIWhenPlayNotBeAttacked.cs 6bfd68b2b0f4b04526e6eec54f4e6850a33fca54cbc8c36decdd6af5a685a340 0 +Wizard\AIWhenPlayReanimate.cs Wizard\AIWhenPlayReanimate.cs 69eb133662a917d8428a47786609b99bafaa44514fee1e9d5378ad43110074eb 0 +Wizard\AIWhenPlayRecoverAttackableCount.cs Wizard\AIWhenPlayRecoverAttackableCount.cs a5b7a7683cebe94eacac0d3bdcecff493891014f42c0c1f8cfd972fd628a438c 0 +Wizard\AIWhenPlayRecoverPp.cs Wizard\AIWhenPlayRecoverPp.cs 561852d83c11174c30ee87e36ae179195cbe7d49cdc0ed1def086e48510bb3e5 0 +Wizard\AIWhenPlayRemoveKeywordSkill.cs Wizard\AIWhenPlayRemoveKeywordSkill.cs 00c464dd2472ec7641334398ecb65cc91b91d4c670ef57abce11e1ad619d84c5 0 +Wizard\AIWhenPlayRemoveSkill.cs Wizard\AIWhenPlayRemoveSkill.cs ad9d9536aa5ca983696d219ad02db0198821b430e0996709abe5d3cfe4cef7a2 0 +Wizard\AIWhenPlaySelect.cs Wizard\AIWhenPlaySelect.cs 2897ae363869267e7ff5669cab90a51dfa63fd21cbf595e5be6a55de78814eb6 0 +Wizard\AIWhenPlaySetLeaderMaxLife.cs Wizard\AIWhenPlaySetLeaderMaxLife.cs b64101aa379550d8b91176d84973a50386ff8e234e6d64fe1d02cee790d4364b 0 +Wizard\AIWhenPlaySetMaxStatus.cs Wizard\AIWhenPlaySetMaxStatus.cs 6b4e7dbaf469c282adc80c555988ef266bfd08e993e26e4c56d6718137d4d30b 0 +Wizard\AIWhenPlayShield.cs Wizard\AIWhenPlayShield.cs 05a9eb8babd7477e0f18cb29733849c101950f0ef46e7c6d2486dd7ee0ba1d65 0 +Wizard\AIWhenPlaySpellboost.cs Wizard\AIWhenPlaySpellboost.cs 4d61b8e8c9f8eb35629b5790a0b500758e9a385aff302c636a2bf831925e238e 0 +Wizard\AIWhenPlaySubtractCountdown.cs Wizard\AIWhenPlaySubtractCountdown.cs 4715e2c03539860820044dbc17624eba9372fac94241cdb4f753f13c9056801f 0 +Wizard\AIWhenPlaySummonHandCard.cs Wizard\AIWhenPlaySummonHandCard.cs 2d67e7fad7cbb2d8279c2043d7fa94bc70451efdb76ba83098fbefc9f850fd79 0 +Wizard\AIWhenPlaySummonToken.cs Wizard\AIWhenPlaySummonToken.cs d87039563bae9d4abe524dc3f76df63063925ed420fef72507b0d66550fddfca 0 +Wizard\AIWhenPlayTagArgument.cs Wizard\AIWhenPlayTagArgument.cs 374f17523d8266b87644faef9bfe8c6e2f7cd5004f851f0448c3d8a10fc1b429 0 +Wizard\AIWhenPlayTokenArgumentBase.cs Wizard\AIWhenPlayTokenArgumentBase.cs 0b94d1ff02bb4cc8a87ba200cc16dcdcf20146293d448f86dbf4d43dae61a22f 0 +Wizard\AIWhenPlayTokenDraw.cs Wizard\AIWhenPlayTokenDraw.cs e61b4aaba2515f7e5968930f248e16dbf1e4126cf01433d12d82bc68a13708ea 0 +Wizard\AI_LOGIC_LV.cs Wizard\AI_LOGIC_LV.cs e6a97a7f33f421973293eff0f046a0a8422ddc4103f3fb7b77a114c0f6b7b9d6 0 +Wizard\AbortSoloPlayRecoveryTask.cs Wizard\AbortSoloPlayRecoveryTask.cs 983b900d2b180dcbd61032ecec688b66e8ab98504e7cb58250e4069f6040ad13 0 +Wizard\AcceptAgreementTask.cs Wizard\AcceptAgreementTask.cs 0868aac7735e2826cff2db423a3de42943fe4fe2ca16d2e9f9f219f05cf7f5d3 0 +Wizard\AccountBase.cs Wizard\AccountBase.cs 34e53a3e027337ab0ec601f4c0b89c67c70f0ec0a3e3250eea6c81f5ca4498ff 0 +Wizard\AchievementImpl.cs Wizard\AchievementImpl.cs f7e7690b1c5f5ed7e6d08e2ebb6624ac1c175a874b83806b16fd0fd89d857030 0 +Wizard\AchievementReceiveRewardTask.cs Wizard\AchievementReceiveRewardTask.cs a12a24d0b68ea814ac403cf63490fab86443321b174e434ed93c76e5e328da3b 0 +Wizard\ActivateCountTagCollection.cs Wizard\ActivateCountTagCollection.cs fb0b8de915750511da274995871c184582f447c1b1d5a6569960db243bf1f482 0 +Wizard\AddCardToPlayoutPlayPtnTagCollection.cs Wizard\AddCardToPlayoutPlayPtnTagCollection.cs be590b8fc0998c928f0130913b0aa923eaff662f21368401ab13ea2d763f349b 0 +Wizard\AdjustSendSettingDialog.cs Wizard\AdjustSendSettingDialog.cs d0380674a5565223a3068fec0881d161a6d424adf3e3d7945c52730cc14de915 0 +Wizard\AdjustSettingUpdateTask.cs Wizard\AdjustSettingUpdateTask.cs 1e49dfc860fc4e4ea898e3efb60aff766e8bba4fec10c72fd0d16626461256d5 0 +Wizard\AfterAttackTagCollection.cs Wizard\AfterAttackTagCollection.cs 399655aabb4fb431693df63b42794178c30765b5e3e708214bc55a7a1a6b9236 0 +Wizard\AfterClashTagCollection.cs Wizard\AfterClashTagCollection.cs 7e4c59ef671559d3a1be6e9b7745fd67ff19afcdf2b37c8eb3eaa042596ef1ea 0 +Wizard\AfterDiscardTagCollection.cs Wizard\AfterDiscardTagCollection.cs 076f64ad48ce2473fe5aacbe16790488872c5c1992577ba9cfb7d1472ade0d27 0 +Wizard\AllLabelColorChanger.cs Wizard\AllLabelColorChanger.cs 9b542c07fbe67066b958313e2220d5943550a9ff443b9700e7f2aec8c7e0c601 0 +Wizard\AllyPlayBonusPolicyCollection.cs Wizard\AllyPlayBonusPolicyCollection.cs d7e0242716e16cf65624181e1f3c2c7b21cd2d450863368009c4cf9475f4db35 0 +Wizard\AllyPlayBonusRatePolicyCollection.cs Wizard\AllyPlayBonusRatePolicyCollection.cs d33ddef3ce145c7b8acd943c451ba8657c25f0c98f243ee7a4f21d9f1857f32a 0 +Wizard\AllyPlayBonusTagCollection.cs Wizard\AllyPlayBonusTagCollection.cs 04260820f1240296416afe9d579b64e16c953293375bd26d7b956a0f37341d16 0 +Wizard\AreaSelectClearReward.cs Wizard\AreaSelectClearReward.cs 6e11173e7b2d4d16b18e4f8ce7e7c5f588e754cd013ac4e0cc58176537736f83 0 +Wizard\ArenaBuyDialog.cs Wizard\ArenaBuyDialog.cs 2efed7203ad425c2e9c4cf0a75888164321484ef78124bfdca16a1e70b468bf7 0 +Wizard\ArenaCommonLobby.cs Wizard\ArenaCommonLobby.cs 3c46adae1758b23226f89e84e69187905119579d21edc1aabca6abce86273750 0 +Wizard\ArenaCommonLobbyBattleInfo.cs Wizard\ArenaCommonLobbyBattleInfo.cs 2562cdbce205a7c3dc5699d086c1de69dce1d92922f8144cc45a1d9d5402dd14 0 +Wizard\ArenaCommonLobbyBattleStateObject.cs Wizard\ArenaCommonLobbyBattleStateObject.cs f29606af21c34c8fe143bb421a3d3ae9069530ec9aa36faaf606a2b91418f61d 0 +Wizard\ArenaCommonLobbyInitParam.cs Wizard\ArenaCommonLobbyInitParam.cs cb54afea02c865e2fc41f7595a4103f1318941db807f4ed15bd3789db6a7b272 0 +Wizard\ArenaCommonLobbyLoadRequest.cs Wizard\ArenaCommonLobbyLoadRequest.cs 345fecff05cede96f68f40c5e97d1d46ed3f3b0267e8fe1cbef2726c47ac4bc7 0 +Wizard\ArenaCommonLobbyTreasureBoxInfo.cs Wizard\ArenaCommonLobbyTreasureBoxInfo.cs d152019349b71fc6016f5bc9da66939fc2a5db4f81c098e3e254ee058cdf8b17 0 +Wizard\ArenaConfigDialog.cs Wizard\ArenaConfigDialog.cs 95172ffd65a3e90cb63f7d9368dd662721f74fa5526f6397a82eb56a182081c0 0 +Wizard\ArenaConfigUpdateTask.cs Wizard\ArenaConfigUpdateTask.cs 0cead1a6b0865ce506094bea9a6083f6089d2dbbd02b08966bb3592253839730 0 +Wizard\AttachedSkillInfoReceiveData.cs Wizard\AttachedSkillInfoReceiveData.cs 40db29bd9eeb41d3a0e15aab0a91ddee7a24709d5742d05584b8a76100522aaa 0 +Wizard\AttachedSkillInfoReceiveDataCollection.cs Wizard\AttachedSkillInfoReceiveDataCollection.cs 9fccf7143e59065644b7cb96f1bb56f52ef4a5353eae76c1a161846544222c6a 0 +Wizard\AttackBonusTagCollection.cs Wizard\AttackBonusTagCollection.cs ead7de323b51ab6321e12b5ce37616db9d75cb4ba1c8b5887fd929383cd16586 0 +Wizard\AttackByLifeTagCollection.cs Wizard\AttackByLifeTagCollection.cs a67f23b492a670013588dee1fd854d9bcb9ae3c3a62a9b8020a57e40e2578a5c 0 +Wizard\AttackTagCollection.cs Wizard\AttackTagCollection.cs dfd6643aae0b0677bdd31fd52845c995bf14d4a78b4818d272f20f39e7c6340e 0 +Wizard\AttackableClassTagCollection.cs Wizard\AttackableClassTagCollection.cs 87f2a7fc4a2cca3d35ad802fbf745b621c94eb9b19e4f4414b763902064303cc 0 +Wizard\AvatarAbilityDetailDialog.cs Wizard\AvatarAbilityDetailDialog.cs bd39de010ee3169a531c9eb1c30402455e5fce5af0fa97d0cb676f786649c8e8 0 +Wizard\AvatarBattleAllInfo.cs Wizard\AvatarBattleAllInfo.cs aa81432dab0e99a84a4aadceec6db2c859c5ef15d5112d0c2e8872ffcaed7745 0 +Wizard\AvatarBattleInfo.cs Wizard\AvatarBattleInfo.cs d3417046e0acea3e6806fee941f30ee543f122d34956412ba61f5822e42c6a95 0 +Wizard\AvatarFormatBehavior.cs Wizard\AvatarFormatBehavior.cs f773138b62dbc5e5c4e2c11a853f4a400d02f029badc0153be4bb0cc8671116f 0 +Wizard\BGMManager.cs Wizard\BGMManager.cs ed3557a935cc6c62a205c94d46fddec5b1d4769f17855a6b3927760a28f60153 0 +Wizard\BanishBonusTagCollection.cs Wizard\BanishBonusTagCollection.cs 02d6a7110fe4433971e2499430f5bb929d665c70805a9c148f4b4108324bcb9c 0 +Wizard\BanishTagCollection.cs Wizard\BanishTagCollection.cs 9e9bfded276a6d2cdd2f21775da1d55d1b744b5a950d52ad369a0fac152f68b4 0 +Wizard\BannerDialog.cs Wizard\BannerDialog.cs 4c2e9f967bb9166bb2891bc9f01e16be05bad5a4734da3dcac094ec9419dcc9b 0 +Wizard\BarrierBonusPolicyCollection.cs Wizard\BarrierBonusPolicyCollection.cs b0c4650dd4c3aecdd39b732f72a999762c493b0e89ed5187e223093f3f6923b7 0 +Wizard\BaseParam.cs Wizard\BaseParam.cs aafba52c5b868cb4b3c9736c6706113d8d521c754bdc9b955c8b9deda221c722 0 +Wizard\BaseProductDetail.cs Wizard\BaseProductDetail.cs 5d15337781bcac5656c95a9e42ea8dd5c77032851255a423251308a505fb801e 0 +Wizard\BaseRoomBattleEnterRoomTask.cs Wizard\BaseRoomBattleEnterRoomTask.cs c08b379b94b6d9084e3eb73d63661d4f97bb68b3427d128685bf0d845ae022fa 0 +Wizard\BaseSelectBuyMeansDialog.cs Wizard\BaseSelectBuyMeansDialog.cs a7bda9d4d11277a7da5d4e25ec7addd5f4bd330172212a08bf6ad12f732507ff 0 +Wizard\BaseSeriesData.cs Wizard\BaseSeriesData.cs b5f6431a7d175f16784a36d07707c81d6f4ad0942135a0ee636de3de5caac758 0 +Wizard\BaseShopPurchasePage.cs Wizard\BaseShopPurchasePage.cs f158ce39f34b47b46ea2fe27605e7fa4a4ebc14db87b9240e47189066cbda891 0 +Wizard\BaseTask.cs Wizard\BaseTask.cs f6e3ff4403c4ec32bf1d37807c1f8b51e419caa7feb6fd81887ae09c6d7e1348 0 +Wizard\BattleBonusRateTagCollection.cs Wizard\BattleBonusRateTagCollection.cs cb619934e00027224da854ecdaae8e8c28757db722bfa2047f4cae761eb251db 0 +Wizard\BattleBonusTagCollection.cs Wizard\BattleBonusTagCollection.cs eef79191a777a20d78afb363f8e18cc4f3a82767b7aff749ef1322e9041a4842 0 +Wizard\BattleButtonControl.cs Wizard\BattleButtonControl.cs c01b03426b6150426c112d89cd9f21153dcf4bd7b587b6e6ff2dcbd954e9ddfc 0 +Wizard\BattleCardRealTargetInformation.cs Wizard\BattleCardRealTargetInformation.cs c42a18e1aa2e252cca98136dca1350cf4a6a3c0314e7362691ceceb4a2375c23 0 +Wizard\BattleInformation.cs Wizard\BattleInformation.cs 85808cdf3afae2207317b68833c14d5e65c10de6b630e7f5ed436ce4bfbe55cb 0 +Wizard\BattleMenuUserPanel.cs Wizard\BattleMenuUserPanel.cs 15180328be642d73316aa50844f52541cb4596249c7982344fb419811dc05101 0 +Wizard\BattleParameter.cs Wizard\BattleParameter.cs a034f5db7cd37a8d8fc3e4b14a0e575694e236dbd6ca307d9ab1f827b99258c7 0 +Wizard\BattlePassBuyTask.cs Wizard\BattlePassBuyTask.cs f5bdedcceb3493711109ca78540a01421b717ba39ec8536f8e7773fa33adac81 0 +Wizard\BattlePassGaugeInfo.cs Wizard\BattlePassGaugeInfo.cs b4940b7f064149a0137e7b0a61a9df21eb20b5e8cc885769979f91ee45059cc9 0 +Wizard\BattlePassGuage.cs Wizard\BattlePassGuage.cs fe0d550cbe5afc8acd6364b1a8966bdc08f1bcedf9467c32cc06e3d3b8c099b5 0 +Wizard\BattlePassLevelInfo.cs Wizard\BattlePassLevelInfo.cs 8c2484b47fb952aeb2e32134999644dc78babcb03e2f1a482c3f340135918c8f 0 +Wizard\BattlePassMonthlyMission.cs Wizard\BattlePassMonthlyMission.cs 2fe16dceba2cbaa3391d1e91821149c5eb45c64841478212dcbe59034724d8ae 0 +Wizard\BattlePassProduct.cs Wizard\BattlePassProduct.cs fce42097d88e4c4dc131d415d67cf0ff38f2ffa0bb961bbcadd387eb0a865ff5 0 +Wizard\BattlePassProductDetailDialog.cs Wizard\BattlePassProductDetailDialog.cs 9f3582c8ab420112ebece5c75b18990edbafd1bca0fff54dfd8f1e4af2014d7e 0 +Wizard\BattlePassPurchaseDialog.cs Wizard\BattlePassPurchaseDialog.cs 5be1730794cfe0edf290708880facbf66705762f3f7ab98e81207aa1f38152bd 0 +Wizard\BattlePassPurchaseInfo.cs Wizard\BattlePassPurchaseInfo.cs 9e32041f4ef31a7e93998c17d87727417d2796eecef7eccc9ec09185fab25aac 0 +Wizard\BattlePassPurchaseInfoTask.cs Wizard\BattlePassPurchaseInfoTask.cs 5f3858243f55e8dfe990ea76f8e07305fd420a43fc7a653835c631ac1b77e248 0 +Wizard\BattlePassPurchaseProductView.cs Wizard\BattlePassPurchaseProductView.cs 44bd65c0f0a0bb1060b91200e2dfe5f7c383c1e2997b9c76c159f2dae2fb9d30 0 +Wizard\BattlePassResultPanel.cs Wizard\BattlePassResultPanel.cs 332992ec3f44533c9f99f06d577f6a6834e815859c09a54d4264807d8b946eb4 0 +Wizard\BattlePassUtility.cs Wizard\BattlePassUtility.cs b3ca009f983e460691c482b98dec53341c517ad2c057366cc09c4b9665e6aeda 0 +Wizard\BattlePlayerPair.cs Wizard\BattlePlayerPair.cs ff8d3eb14f7bb8386d29f2891a1c5665ea857171bdae23493033729180b21bec 0 +Wizard\BattlePlayerReadOnlyInfoPair.cs Wizard\BattlePlayerReadOnlyInfoPair.cs da9aacfc922101e0b5d741b0233dc3f8597fd07d339a5366d037745b8c2a0a09 0 +Wizard\BattleRecoveryInfo.cs Wizard\BattleRecoveryInfo.cs 0a148f60eb5689ef33f58d98f43ea7f437702750dce77d9fbd7dc261118d44f4 0 +Wizard\BattleSequencer.cs Wizard\BattleSequencer.cs 91b1272eb25921ee6bae09cd08140d4d96496ada5b050aadab81f3a81623b070 0 +Wizard\BattleStartUserPanel.cs Wizard\BattleStartUserPanel.cs 9af3ec3df078b3f7996f0deabbe7bfce3275c8dfb81fba0e69e8d0e3e3d8ac18 0 +Wizard\BeforeTransformVirtualCard.cs Wizard\BeforeTransformVirtualCard.cs 96c43888d9a72d8bc8b4dcb86439e635fd5919f9b9499e4ba92035ca0bebd4bd 0 +Wizard\BestInPlayMoveAI.cs Wizard\BestInPlayMoveAI.cs 7ca9982d80f65a598aaf66565055787d968ddb041fbe64e2a832f6079145b202 0 +Wizard\BestOpenSpaceAttackAI.cs Wizard\BestOpenSpaceAttackAI.cs 6be9bd37837ee5e84d7df230ca5c7d001f8f46bcf2f852ab4015a7ed2aa7595e 0 +Wizard\BingoSelectBuyNumPopup.cs Wizard\BingoSelectBuyNumPopup.cs 76e20fa43e4589e0de46e35c8b3cfced522440538f5253bce01da314dcc6ccbc 0 +Wizard\BossRushBattleData.cs Wizard\BossRushBattleData.cs 5b9afe850670e86c4721cb59e61d3bba4cf78d99e66c328ef778d183c4c06084 0 +Wizard\BossRushClearDeckListTask.cs Wizard\BossRushClearDeckListTask.cs a81b18447afe0f3fd5adc172a82968f1318cc9842e2f6989131e41c05a905bb0 0 +Wizard\BossRushFinishTask.cs Wizard\BossRushFinishTask.cs d9050b3e56a575e552b5728a9237aed8aba7a9aa54e82dad99c7abe116d03682 0 +Wizard\BossRushHiddenBattleFinishTask.cs Wizard\BossRushHiddenBattleFinishTask.cs 42b99e7d0888fec9264afb9ee7aaea63b7f79a549cdcb00bfb6b0ff0b3618329 0 +Wizard\BossRushHiddenBattleStartTask.cs Wizard\BossRushHiddenBattleStartTask.cs b4a6068cff7ac9309c8e3158acd37dccf6f67b410a91c3fde84a0e47e82ab49f 0 +Wizard\BossRushInfo.cs Wizard\BossRushInfo.cs 5e0c725f4d19e75b060bc8545f857c0f91dab77e994dcf1fbdbc67b2554a627f 0 +Wizard\BossRushLobbyAbilityCandidateData.cs Wizard\BossRushLobbyAbilityCandidateData.cs eeae65a4867ad4514df39f64edb586c9c3b5fe31ea9b58ac1f86e7b9baf66e7a 0 +Wizard\BossRushLobbyAbilityData.cs Wizard\BossRushLobbyAbilityData.cs 3a508f41271c634e404f7e84dfcb817d670ed03d919a551af7b79da062726ef8 0 +Wizard\BossRushLobbyAbilityDetailDialog.cs Wizard\BossRushLobbyAbilityDetailDialog.cs 3ddb4707d8201279eb74fd95e37ce22213a810d5ca7af0ca02c7a57cf84aaefb 0 +Wizard\BossRushLobbyBossData.cs Wizard\BossRushLobbyBossData.cs 9d6a1803f125be2c656e260e12634a466f074527daca5ef74c6130e24bbf6463 0 +Wizard\BossRushLobbyData.cs Wizard\BossRushLobbyData.cs c146839c5aec76d23cc93048a16b4f14e918611567810d669b7e1be840d582d1 0 +Wizard\BossRushSpecialSkill.cs Wizard\BossRushSpecialSkill.cs 13a0cc8b52ad626bbbb230cc07ffdda3c9ce695110c06a99c7e1e96006eaed88 0 +Wizard\BounceBonusTagCollection.cs Wizard\BounceBonusTagCollection.cs 8435ca19e8c937f1ad5c432048c453274e04bbb6dcf10bc0212787a78757cb91 0 +Wizard\BounceTagCollection.cs Wizard\BounceTagCollection.cs 39c3e32cf78aa1b7bf3679c40c7b1ce6f1d5b4f5775bfde82f35c14a94771f00 0 +Wizard\BreakBeforePlayTagCollection.cs Wizard\BreakBeforePlayTagCollection.cs ae0b615a06fb58b1b042669ee413e009fe00e22ed26e6a60fd7c08f4173e4631 0 +Wizard\BreakBonusTagCollection.cs Wizard\BreakBonusTagCollection.cs 45a5349698ea333a002e57bc55224cd6b418573ba64daa15443e42c811fe9250 0 +Wizard\BreakFirstTagCollection.cs Wizard\BreakFirstTagCollection.cs 96ba8fc479d7660a14317152215ec7c0580751851cc31fdf0eac439ee7f6dab8 0 +Wizard\BreakLastTagCollection.cs Wizard\BreakLastTagCollection.cs d60299bc656680461cbb2281b6c67f06bc988c6383ffcad6d91ff3e4c504d39f 0 +Wizard\BreakTagCollection.cs Wizard\BreakTagCollection.cs 5e6cdeacf56abe9077830a5baa5e0771c9df0286699365589fb097df4fa8e65a 0 +Wizard\BrowserURL.cs Wizard\BrowserURL.cs 1d4323f80f3d9a2cf492bbe5ad06a3f07edbfcabeef53990fe7b7ec46e0e9ced 0 +Wizard\BuffBonusTagCollection.cs Wizard\BuffBonusTagCollection.cs 1ba4e258a1b6c2aa9c823d8ff70bdc0712fc407d9e831272a81f9244271eae16 0 +Wizard\BuffTriggerTagCollection.cs Wizard\BuffTriggerTagCollection.cs 99d3a0179a6b33a85efaca75a7e2632fa0c0fc0073be168c83d7116e1b37602a 0 +Wizard\BuildDeckCard.cs Wizard\BuildDeckCard.cs 2f49148b8472e0a45edf5d4360902605658057db7c34abe6d3e8e46f7f299367 0 +Wizard\BuildDeckProductDetail.cs Wizard\BuildDeckProductDetail.cs b409987653155e54d2f2f868f37dafadf3536e63f9c919667fb3bd1d7d1ab222 0 +Wizard\BuildDeckSeries.cs Wizard\BuildDeckSeries.cs 8f6144e6cb43e2a4924b3a5ebc06795d67461ea029bbc76126e97300532ba159 0 +Wizard\CampaignBattleWin.cs Wizard\CampaignBattleWin.cs 1608aa1db4226d5928be000b720dd0cc691dcea190d34c4f2f0fdece90e8609d 0 +Wizard\CampaignRewardInfo.cs Wizard\CampaignRewardInfo.cs 038717992648b3a4475456630a00f1a296113d304675e936a2a80b7a60de6fec 0 +Wizard\CantBeAttackedTagCollection.cs Wizard\CantBeAttackedTagCollection.cs f7460a54faa7c37f3ba07645ac6d65995eee549127907ca1e77d5aecef4ea6b0 0 +Wizard\CardCSVData.cs Wizard\CardCSVData.cs 228543612535910f39c39c273c6b55ab65214e2545bd77f97b38a6926ebc1ae4 0 +Wizard\CardCraftPanel.cs Wizard\CardCraftPanel.cs ae136c5d1bfae1ea48d57669c114d0aa03f248a0bf7cef70c35e6371f9a44123 0 +Wizard\CardCreateTask.cs Wizard\CardCreateTask.cs a6293652488c0d0fe8149f883fb36e7effd670d619f53316650c46c010e297f1 0 +Wizard\CardDestructTask.cs Wizard\CardDestructTask.cs a896598ca607d49cd68cc02ed797e0d4a041ab41574b7d9eb8994844a8bb12b7 0 +Wizard\CardImageHelpder.cs Wizard\CardImageHelpder.cs d7145108a61a669a9377af5eb021afeb0eb6a8e76a8311c6e7140abec0fe9725 0 +Wizard\CardKeyWordCommonCache.cs Wizard\CardKeyWordCommonCache.cs a729b53da036c709d41b0dfc6a3c242ca336cda412ec538bb8296305c5123a9f 0 +Wizard\CardListTemplate.cs Wizard\CardListTemplate.cs b41f32001b001470ac9aff768b4be92c3579999fe24f5de7646af80f31185fd1 0 +Wizard\CardListsForReference.cs Wizard\CardListsForReference.cs 71df5335307ff56a2db97fe44bddd70d1e33425314de3ea15e35a74a8a48cfd7 0 +Wizard\CardMaster.cs Wizard\CardMaster.cs 12b77985327a1e117d6af30c02a617c8de06203e73c77d1e16b86bdc2b312011 0 +Wizard\CardMasterLocalFileUtility.cs Wizard\CardMasterLocalFileUtility.cs 81527d4d49360eb86d71246678d34ab40373b705a6aa651c85d25611699de5ec 0 +Wizard\CardParameter.cs Wizard\CardParameter.cs a7ea3ce6d2efad06697ea5e9ea2ce0b38280139b2e55a55f0c48aca2c99109fc 0 +Wizard\CardPrm.cs Wizard\CardPrm.cs 41697c1ed692386772dfed98690e9a3471cbc295460b8fef2c7b5cbdfd223247 0 +Wizard\CardProtectTask.cs Wizard\CardProtectTask.cs 1b700bc1a2b75cecd4b8460cd90eddcb6e5de64c8cacc5ffe009786fe345f7a9 0 +Wizard\CardSelectDialog.cs Wizard\CardSelectDialog.cs 235c9952bb1fa49974a682a05756b8c61b37196f738d61f08cc75034c62f5f1f 0 +Wizard\CardSelectDialogObject.cs Wizard\CardSelectDialogObject.cs 915c0944957d7510c1aa7940015e9b5855bfc6308bbc99a300eb720b9ec4d4e5 0 +Wizard\CardSelectListConfirmPagerView.cs Wizard\CardSelectListConfirmPagerView.cs 93ed1b34d2ed8b3f868bded81f89fd6ec1a2f63b607a6b553dac15ac8ccb86a0 0 +Wizard\CardSetName.cs Wizard\CardSetName.cs 943b0083d367048c7cdebcfdc2780aee27f6d9f1adfafec7cb720830bb614f6f 0 +Wizard\CardSetNameMgr.cs Wizard\CardSetNameMgr.cs 146a4a804055f9c3341301c3823bda3cf3f560e8032b5df46e1b7fca87009649 0 +Wizard\CardSkillHashUtility.cs Wizard\CardSkillHashUtility.cs ad5fba74351ce510165f83273391762c3cb57e96ff605e13cf3d5e544a2e6edd 0 +Wizard\CardSleeveDetailWindow.cs Wizard\CardSleeveDetailWindow.cs b74705d70564b25e3972d121591c55be39437df0dfa16cf0e14db3501761fd02 0 +Wizard\CardSleeveRewardItem.cs Wizard\CardSleeveRewardItem.cs 9cf753ca79d8e25f1aaec1af3f4d9e0f565c3e1b6827ced3479fb86cb824b5cd 0 +Wizard\CardSleeveRewardView.cs Wizard\CardSleeveRewardView.cs 239ffd404400fe94dbfc08cc48d0591bcef769a5081a389134d5409275c84180 0 +Wizard\CenteringUIWidget.cs Wizard\CenteringUIWidget.cs 1ddc0ddbbfcd6638010dc6889706b3a5944ac5b122103cf24f9c0d7adde66efc 0 +Wizard\ChangeInplayTagCollection.cs Wizard\ChangeInplayTagCollection.cs 0e52c7c354104e962110f89f72971455b6d1835ee41c01e07886fee28491dcd0 0 +Wizard\ChangeableTitleUIParts.cs Wizard\ChangeableTitleUIParts.cs cb7bdf8645fd1094dcb3e81c01bee88ccd2a8b7c6b0cb5847a75093b5508eefa 0 +Wizard\ChaosUtil.cs Wizard\ChaosUtil.cs 152adff597f552c9e74f44fe8c2bf41708055dc1c80e85410eea6aa04f0ad82c 0 +Wizard\ChapterObjectCenteringSupporter.cs Wizard\ChapterObjectCenteringSupporter.cs 43ae389f01e2a45d87767adfab44caaccb10d590e0509e4dcd54ee4d6787e7d9 0 +Wizard\ChapterSelectButton.cs Wizard\ChapterSelectButton.cs 94510cf6d704e60588b1239da078fd5ccc02cb37efa4b3e27edf429fdd9dbd1e 0 +Wizard\ChapterSelectSphere.cs Wizard\ChapterSelectSphere.cs dfad54b585ff199b6fd6def8f79a55306e4d1c5aee9a6e9c3aae6ebfc753468b 0 +Wizard\Chat.cs Wizard\Chat.cs e2376b5c58c19422a0f99ad05e74437e983847398f904dd2ce80ecb8ffaf66dc 0 +Wizard\ChatAddDeckTask.cs Wizard\ChatAddDeckTask.cs c0204c1e1114351438d3d87751dc485624de3c675aa63eea27d0aed3495f3401 0 +Wizard\ChatAddReplayTask.cs Wizard\ChatAddReplayTask.cs c0bc09a90c810749e4a87b15a266b4f54e1294afc2180580cd4e29bc99cbb7d8 0 +Wizard\ChatConnectController.cs Wizard\ChatConnectController.cs 014c3d0c59f4e794b9105613e290a10548ee43fdf4951fef04d981dcd74bbff6 0 +Wizard\ChatDeckLogTask.cs Wizard\ChatDeckLogTask.cs 9a6b7a7bce57dc6e0f3c67f63823b4505208f9945755ace9713b5c1f6c3f81a5 0 +Wizard\ChatDeckView.cs Wizard\ChatDeckView.cs 91a037627c00c5a88e2f2626051c9e8a97e4ec6bca015ca3c0bb7ab21ca41605 0 +Wizard\ChatDeleteDeckTask.cs Wizard\ChatDeleteDeckTask.cs c15aa3125367e0990d3135ff5d6467d3f3949e9ee04030e18abd03fc43521006 0 +Wizard\ChatGetMessagesTask.cs Wizard\ChatGetMessagesTask.cs c9aac6f4ca24248b688b47c6db2ed20017a33b45e3ca53cef7d0bb10ea60d4ad 0 +Wizard\ChatInfo.cs Wizard\ChatInfo.cs 39a9ae7e4df948fccb0f3f1024b8fbba06603c7e608af8218147074aab1b72c7 0 +Wizard\ChatLogContentBase.cs Wizard\ChatLogContentBase.cs 84d8752970bccfef5a9d0cf14196a3f1ebca41bf3883ddd8a75f832596a20a7a 0 +Wizard\ChatLogPartsNotice.cs Wizard\ChatLogPartsNotice.cs 0691379a2bb1d279ed9777dde5468880e84d9bdb2af67f37e3a1aa72f665dd31 0 +Wizard\ChatLogPlate.cs Wizard\ChatLogPlate.cs f13c0874299c45def434b3ece7594365d6939078c37504e79522ab2683f9e98f 0 +Wizard\ChatLogPlateLayoutBase.cs Wizard\ChatLogPlateLayoutBase.cs 5ba9faac23285f6b7011bb455b64e9167a96642e383c059ee15d7902361134f9 0 +Wizard\ChatLogPlateLayoutMember.cs Wizard\ChatLogPlateLayoutMember.cs 6a65a67042da7c152ca004903078c58cd52aa5c098d12e85ad2dde661d76e006 0 +Wizard\ChatLogPlateLayoutNoMember.cs Wizard\ChatLogPlateLayoutNoMember.cs 9768cc7a11665dfdc94743d882f0a2115efac8a80dea6e249d951b173b7bae2d 0 +Wizard\ChatLogUI.cs Wizard\ChatLogUI.cs 0b9af050bbf823b6367cdec09ad970423a3ab5245a86907201e30139c08883d0 0 +Wizard\ChatMessageInfo.cs Wizard\ChatMessageInfo.cs c414c78903b6045ce4d88c76381d9bc1bdf1c02ecb23cc62c9acb4d27794c7aa 0 +Wizard\ChatOpenCloseAnimation.cs Wizard\ChatOpenCloseAnimation.cs bc7683671e62091da2d54ba63ef146ad4881b74d8afdae41799f585a3a0e98bb 0 +Wizard\ChatPostTask.cs Wizard\ChatPostTask.cs 66e37f0c496691e81d50783424d14cdfd31706b10f782109b9b13e6889c661a7 0 +Wizard\ChatReplayListDialog.cs Wizard\ChatReplayListDialog.cs 821eec442279d4101141b8117cb21db6779284f232eb7a943c94d442e0b5fc8b 0 +Wizard\ChatReplayListDialogContent.cs Wizard\ChatReplayListDialogContent.cs 23a3fba4a11cfd63677ab6f5affd9f28a1595bed1925fecf6fc67a8696227706 0 +Wizard\ChatReplaySendConfirmDialog.cs Wizard\ChatReplaySendConfirmDialog.cs c94be67ae4c487eb107626d133e99b60e49bd3211d6f8cce1146004e9ac1ef4f 0 +Wizard\ChatSendDeckUI.cs Wizard\ChatSendDeckUI.cs 1da32342f2f25220f56dc054075c3477736ab00f455494621e221d365b82488e 0 +Wizard\ChatSendReplayListUI.cs Wizard\ChatSendReplayListUI.cs 94fd68696d7eb05eb569bbeabc0a360d4d824740a5875ea43018eab5e1b81915 0 +Wizard\ChatSendReplayUI.cs Wizard\ChatSendReplayUI.cs ebece60b7151f53191e0cebaaa8d0be602a581dadf3777ec342f37cdf72516c3 0 +Wizard\ChatSendStampUI.cs Wizard\ChatSendStampUI.cs 5c250e7f72ac018a0ad18f6f6458fc1f2ee8a3a1ccb0df7a32fccfc2293f5d46 0 +Wizard\ChatSendTextUI.cs Wizard\ChatSendTextUI.cs 24113a55d13772c8aad68a5374b260b8aa38cc8ee84bbe2cabe1cb5bb0a57b83 0 +Wizard\ChatShareDeckUI.cs Wizard\ChatShareDeckUI.cs bef70391826b009a453b4e250efa972e0fd7121d6e5a18e8e2b89a0ca321e925 0 +Wizard\ChatUserInfo.cs Wizard\ChatUserInfo.cs 782e1f2982c9c8dd641e2b2f320e5769541a9634fa53bb7678b520884e2ae5f4 0 +Wizard\CheckSpecialTitleTask.cs Wizard\CheckSpecialTitleTask.cs 191c82c69c744c93682a3516d15a7eefe0153962e47df48b88be507ed0d26095 0 +Wizard\CheckTimeSlipRotationPeriodTask.cs Wizard\CheckTimeSlipRotationPeriodTask.cs dc3007b64143e02fad056a87ef9f0c3e93f443499a851c802fb85a05a1525c65 0 +Wizard\ChoiceTagCollection.cs Wizard\ChoiceTagCollection.cs ee83f8d599d0592e679c11c5c208841c1d044088b38e12604016e5f673f77cf9 0 +Wizard\ChoiceVirtualCard.cs Wizard\ChoiceVirtualCard.cs 8c1d30ba976b4c2f78da58bd6d53b38bbe255e39de2320ea2ff629d24d2800d6 0 +Wizard\ClashBonusTagCollection.cs Wizard\ClashBonusTagCollection.cs 2290a26a5cf6378f6dbaaa730edc33893fe4b3a19257f6f0a69e297ff3f07a71 0 +Wizard\ClassCharacterMasterData.cs Wizard\ClassCharacterMasterData.cs ccf929714e0900b6f422d46da6de8cb3c0702258ceb314509b6d7beac112fa93 0 +Wizard\ClassIconName.cs Wizard\ClassIconName.cs 772d7f4192b116e8e1ef6def1557db1dd6fd4311c877e7fe7d5d65a9c38e386f 0 +Wizard\ClassInfoParts.cs Wizard\ClassInfoParts.cs 75b6923688f22d49ddc97db55ecb6daae2c8c4d444ccfaae66625d85ce35e208 0 +Wizard\ClassInfomationOrder.cs Wizard\ClassInfomationOrder.cs 885f4c62c3d6f3e026f95c4f83830f634bbbcfe4c74352d763bfb992ce21e4e8 0 +Wizard\ClassSelectionButton.cs Wizard\ClassSelectionButton.cs e54b6667dcf47f83bdb242337ba8d6744ddef3d8a7111201da5e83fa62475450 0 +Wizard\ClassSelectionPage.cs Wizard\ClassSelectionPage.cs 9824d4d179df52757687f5c6e9a3aa6a403997f140d036f805105742146d51e3 0 +Wizard\ClassSelectionPageParam.cs Wizard\ClassSelectionPageParam.cs 11c33bf47223789c7ab191b2d048a04ae324485be18f86a3f9aa2ce28fa4680c 0 +Wizard\ClassSet.cs Wizard\ClassSet.cs 37d444f7109e8637da98bc721c35286d6f0c45c49dbcf552603e26e453908e32 0 +Wizard\ClassSkinDetailWindow.cs Wizard\ClassSkinDetailWindow.cs 05f8f178d4cbec20554dcfbae3f9f62c22f55cadda61528334284c38185a0aae 0 +Wizard\ClassSkinSelectBuyMeansDialog.cs Wizard\ClassSkinSelectBuyMeansDialog.cs 769c2c46a5c7fab555acfd53982eeac368e3f0452eef8a34ecaca0402196cf0d 0 +Wizard\ClassType.cs Wizard\ClassType.cs c0be0ce00bb64ad28a85f1f1edfafa0216b67a47fa8d744a1b69c19b78c786ce 0 +Wizard\ClassUtil.cs Wizard\ClassUtil.cs fbfe755aff08092de955f89e8cc0494b289d74cf09eab426a239dcb2aca78a27 0 +Wizard\ClientCacheClearTask.cs Wizard\ClientCacheClearTask.cs 8c41f91c33321607d912f804a1a28df80b22eeb3d0c0196e24c7923e1f799462 0 +Wizard\CloneActualFlags.cs Wizard\CloneActualFlags.cs feadf48e251d85e8d9b76ce2a973f56102a2c753d788ad21055e577d1788f8dd 0 +Wizard\ColorCode.cs Wizard\ColorCode.cs c009240287a148d30c3fb249cf85ead5a885b76455dd42f79aaedc43d0b3b393 0 +Wizard\ColosseumBattleFinishTask.cs Wizard\ColosseumBattleFinishTask.cs ef1c9eb75c4aea0a055af34dffff276283d7e6a4421351dc62921dbdd4acefd3 0 +Wizard\ColosseumDeckEntryAvatarTask.cs Wizard\ColosseumDeckEntryAvatarTask.cs dd0223aedf430ae7786bd6589a36d8ef97391d51c0fd711c58b711648e8eb5de 0 +Wizard\ColosseumDeckEntryHOFTask.cs Wizard\ColosseumDeckEntryHOFTask.cs df524cb66794d9bb323f4fd4c95686f8966f0f9b7f5c3a1fa3db2c55a61236c4 0 +Wizard\ColosseumDeckEntryTask.cs Wizard\ColosseumDeckEntryTask.cs e726973b4da919824104de8d7fe1e1f19ab16cb701410b938fa7ed611c8b1d90 0 +Wizard\ColosseumDetailTask.cs Wizard\ColosseumDetailTask.cs 329e490dd97517178656c5c547d2a74b89435001fd997737ec7074c4f213dc8b 0 +Wizard\ColosseumDoMatchingTask.cs Wizard\ColosseumDoMatchingTask.cs bb9748c3e243e10959d05bb928f3fb3ebfc619d98ec1b5f584df7298c22cf7cf 0 +Wizard\ColosseumEntryInfoTask.cs Wizard\ColosseumEntryInfoTask.cs a91e9a568dd5d734b8e21200735e9d5ef3ca21f985ceddeb86c8b34671b1793f 0 +Wizard\ColosseumEntryTask.cs Wizard\ColosseumEntryTask.cs ded9f76419dff211bdb5f8d64fc10ee7bb7dfa087276c615a7fbfdec222b1b84 0 +Wizard\ColosseumHOFDeckInfoTask.cs Wizard\ColosseumHOFDeckInfoTask.cs bb04deaf1a2523d0a8839188359aa941bf2a5929a7f02bf511967560e373e544 0 +Wizard\ColosseumWindFallDeckEntry.cs Wizard\ColosseumWindFallDeckEntry.cs 56efbfcc68a8b04630e0c8ab10b10baca60618e3d1a96e1bc58a9fc9979e7222 0 +Wizard\ColosseumWindFallDeckInfoTask.cs Wizard\ColosseumWindFallDeckInfoTask.cs 81b592e70de0fbe5e184740544bab6c5c10afad2240288a75e4e5c5c33971eb9 0 +Wizard\CompetitionBattleDoMatchingTask.cs Wizard\CompetitionBattleDoMatchingTask.cs 2faadde3f3cd37235fb69e525903e01fbc5165a5958eda8f87679c9ed12c7bfc 0 +Wizard\CompetitionBattleFinish.cs Wizard\CompetitionBattleFinish.cs 9c57fa74b82bb7cbb69253ebc959b03e4629cf6f600e17de6c2408ffc87664a3 0 +Wizard\CompetitionBattleFinishDetail.cs Wizard\CompetitionBattleFinishDetail.cs 8fe99f2a423fd36c67a12e32f1efa60ea8c6229adaa6a19964a9b1bf6728ef3e 0 +Wizard\CompetitionBattleFinishTask.cs Wizard\CompetitionBattleFinishTask.cs c9d0952c1d0b8f41d7d165f3e398accf16139341b5c9d77bc75d1936c970abcc 0 +Wizard\CompetitionCardPanel.cs Wizard\CompetitionCardPanel.cs f7e68a3c5565a7b5379eae34148f63226cbaf5a943fcc9c675fc9b7f7e7caa39 0 +Wizard\CompetitionCheckPeriodTask.cs Wizard\CompetitionCheckPeriodTask.cs d6721f2411b1d094508177e68b0178dfee7bc57ebaef2b345f8518ffb9977c55 0 +Wizard\CompetitionDetail.cs Wizard\CompetitionDetail.cs 071c83e5a47a35f1f10ecf59814567131e944eb4845480ea433fa753d8ace487 0 +Wizard\CompetitionEntry.cs Wizard\CompetitionEntry.cs 87cc3080389dfa9f7293b7028ec058c0161cbc8f05e341dbacfe1a12da05d0bb 0 +Wizard\CompetitionEntryDialog.cs Wizard\CompetitionEntryDialog.cs aed3caa3ff1a66c8d1ccafd3395e997b8a250c6311a60da86bf8ebd21df89d67 0 +Wizard\CompetitionEntryTask.cs Wizard\CompetitionEntryTask.cs d47db9339e308e5962dd7924d04a06dabab60a2085af16430b5e888da2f576a0 0 +Wizard\CompetitionJoinTask.cs Wizard\CompetitionJoinTask.cs e979d61adddd303836992344e821176d7a31dccb689347c75bb8b38fe9f58eb1 0 +Wizard\CompetitionPermanentEntryTask.cs Wizard\CompetitionPermanentEntryTask.cs 3e329b8cd262d6060114c927e5944a2358cd517e53d384276038d3e16059245f 0 +Wizard\CompetitionRegisterDeckTask.cs Wizard\CompetitionRegisterDeckTask.cs ae9d2f397c9cb5b8d16f5d0ade6ab5bb1bb56586f5caf7421efc3b479cd71379 0 +Wizard\CompetitionResultAnimationAgent.cs Wizard\CompetitionResultAnimationAgent.cs 75b8a263a2ef3999b4abbcc79aeb8027457521e7cc84ee5de27b09d34810acf5 0 +Wizard\CompetitionResultAnimationHandler.cs Wizard\CompetitionResultAnimationHandler.cs b881b9efd770b87585bf3d059976ffd97e5ea23e4cfcf9501d9ac45fe96f8994 0 +Wizard\CompetitionResultReporter.cs Wizard\CompetitionResultReporter.cs c6e601412cc55d33f4136c71e11d1f92aede9f2bf4cc12e3154a8d526bbd62ed 0 +Wizard\CompetitionUtility.cs Wizard\CompetitionUtility.cs d22c4eabe3e4e8942d8ad54558ed972e8ff77ce2a4eeae9126846d9793419ce1 0 +Wizard\CompleteDeckDecideDialog.cs Wizard\CompleteDeckDecideDialog.cs 13989e70a3de839fc5932bf3e87eb15edc889c6a22bad05294c232e75e192255 0 +Wizard\CondChoiceTagCollection.cs Wizard\CondChoiceTagCollection.cs e2cbd37890595adbf142aebaca58885a87788ad81dc9a78c7f9d6628d2147169 0 +Wizard\ConfigUpdateFoilPreferredTask.cs Wizard\ConfigUpdateFoilPreferredTask.cs 85a43a7b27da7aef91ec1e1f21abe0985aac1cf89c695e44fdb7a55faabc3aa4 0 +Wizard\ConfigUpdatePrizePreferredTask.cs Wizard\ConfigUpdatePrizePreferredTask.cs 284c2f0cfa477d0e789b67094dc0d127fd9ea7ed28d66a7a1a036154dbf1b9bd 0 +Wizard\ConventionCrossoverFormatBehavior.cs Wizard\ConventionCrossoverFormatBehavior.cs 66e89ced56b6978e69f48d4636e98381e1db3d97557ddeda5ca431eadfb1ef77 0 +Wizard\ConventionDeckList.cs Wizard\ConventionDeckList.cs 8653b2d3cfd9d69413b0483bf384e05e18e0ca3b52f6239a212c5e5f01f2aceb 0 +Wizard\ConventionDeckOrderTask.cs Wizard\ConventionDeckOrderTask.cs a2ff41debca8b963c935e1a09671d24e597613cb7feeb73966a1339190574c98 0 +Wizard\ConventionInfoTask.cs Wizard\ConventionInfoTask.cs 81ccf3c9eef5ee417b4e3f7e3c981f994f99933a4174219a6a884842395c5a45 0 +Wizard\ConventionMyRotationFormatBehavior.cs Wizard\ConventionMyRotationFormatBehavior.cs ab7de41e7d5f64121605db416350e56b48833080cbcc685de4f21d3da774888b 0 +Wizard\ConventionRotationFormatBehavior.cs Wizard\ConventionRotationFormatBehavior.cs ca2a9ab98335b94ae8b2f522ac626e422367ebac2766c2ff2d4baebe4cf82927 0 +Wizard\ConventionUnlimitedFormatBehavior.cs Wizard\ConventionUnlimitedFormatBehavior.cs 1de3e843ee13ad288de18976bafef1077a3964b8dc1410cbb8121719bde5aeea 0 +Wizard\ConvertTime.cs Wizard\ConvertTime.cs e4b66d476871adf4e6d5a62c07335a98c8ae8edbe2acad9c50c4a348520dafaf 0 +Wizard\ConvertValue.cs Wizard\ConvertValue.cs a6a99081a91ed05900618a9a0e702891b7601d43e015832bdb170338c647b76c 0 +Wizard\CostBonusTagCollection.cs Wizard\CostBonusTagCollection.cs 8c6d5e7a4b886334eecb7e70ef787bc39de32eb5c5f0c2715f4eefd209ea71a9 0 +Wizard\Country.cs Wizard\Country.cs 833d76a4fa24fe50248cad54e6aa5eb6f4f20cf42afd17326638827e0380f133 0 +Wizard\CrossOverClassInfomationOrder.cs Wizard\CrossOverClassInfomationOrder.cs 09161540d7eba3406e5c30ebe4c9e1debf9d40ec4d1cd3484d6d71ad357955e0 0 +Wizard\Crossover.cs Wizard\Crossover.cs 20a74b69be74e89d8eef25a2b8fe5971b653566b418675a2a2b056a9500dfb7c 0 +Wizard\CrossoverFormatBehavior.cs Wizard\CrossoverFormatBehavior.cs fa6ad8d1871e7ada30582e1de1227592a53c9cc651aedcde6e1db91f7a959f6f 0 +Wizard\CrossoverPortalParam.cs Wizard\CrossoverPortalParam.cs d0d751f5c901ed6c7b18cf4189c6e0ae2d3de4184cb05d8c770770d16f58f6bd 0 +Wizard\CrossoverReceiveRankRewardTask.cs Wizard\CrossoverReceiveRankRewardTask.cs a3e37dbd0112cd4e9f81f8d69dc5980ade6f13e50c342dc52ccaf2cbbc13f856 0 +Wizard\CrossoverRestrictedCard.cs Wizard\CrossoverRestrictedCard.cs 663c0ac1cabef1716b979c3ec4bdafa47ced26420eaaa08bd6b97e90acf1d815 0 +Wizard\CrossoverRewardInfo.cs Wizard\CrossoverRewardInfo.cs bb3763306d0e7d3feefb748b1bf461a114a363d36703edb8a8a5d2b5734128ee 0 +Wizard\CsvColumns.cs Wizard\CsvColumns.cs d113f92e1f0145adb323c093deca81aab1889e8de34ed78c852b8e5a764c1c4c 0 +Wizard\CustomEasing.cs Wizard\CustomEasing.cs c7ac36e40e66f046d42e1d688db22f2acc2567399ce23c0512e3e2c8beefa598 0 +Wizard\DamagedTagCollection.cs Wizard\DamagedTagCollection.cs 8e6ecf677b4da8e16a68d3336959cd6d08af4830a0214297d65e96243f777c3f 0 +Wizard\Data.cs Wizard\Data.cs 46db6a70b06a6ebf89f7210e32385a63ab82a8ae196518a684a3a632ff5dea69 1 +Wizard\DeckAttributeType.cs Wizard\DeckAttributeType.cs 006bb4c04d8a60c9caf04873dde6c962366348db03ec40a8bbc0071392f656dd 0 +Wizard\DeckAutoCreateTask.cs Wizard\DeckAutoCreateTask.cs e8c21d513114d2c42ad85a28da4adb48642bd36dc012f6029fbc8a8d72b78d6c 0 +Wizard\DeckBuildShortageCardView.cs Wizard\DeckBuildShortageCardView.cs 34428e4efb614c4fd59136d1bb87485ce117a97b2c6668f0481fff4b510a31d3 0 +Wizard\DeckConventionInfoTask.cs Wizard\DeckConventionInfoTask.cs 039f36879846589dc72f55ec47dc5446b737945f4ed67e76b1cf4b2df06f1b14 0 +Wizard\DeckConventionLeaderSkinUpdateTask.cs Wizard\DeckConventionLeaderSkinUpdateTask.cs 896b758a2d0d37c8251dc406bd190e2d792cbbb3b641019d42c7aa0d41be53c7 0 +Wizard\DeckConventionNameUpdateTask.cs Wizard\DeckConventionNameUpdateTask.cs 6b4414e4a5d63a2c721ed380d2d242d0db6007d6a8c5a87f84640130738632b7 0 +Wizard\DeckConventionRandomLeaderSkinUpdateTask.cs Wizard\DeckConventionRandomLeaderSkinUpdateTask.cs 4d02ed499b12d2854607eb19ae5ef9318eb116263a83a28da40de73221ffab77 0 +Wizard\DeckConventionUpdateSleeveTask.cs Wizard\DeckConventionUpdateSleeveTask.cs c6bd86775e4d4ddd932406cffbfd422617e46df5ecf072fe640524947584f548 0 +Wizard\DeckConventionUpdateTask.cs Wizard\DeckConventionUpdateTask.cs a3166a78167c695c8a109a9581e59e2aa9145cfaf9af71815256034e99a7e89e 0 +Wizard\DeckCopyDialog.cs Wizard\DeckCopyDialog.cs 32d95553dc268017f7d0345914c1f83243c928376e418f78d48615b568551957 0 +Wizard\DeckDetailDialog.cs Wizard\DeckDetailDialog.cs f3af592eee584a5dab2cc31ac8668ac77f37cc97fac68bfd1f2edcba65da6848 0 +Wizard\DeckGroup.cs Wizard\DeckGroup.cs c5334b68f875f193b100950fba847271ae5fe12e94c79aabd4a8220551066964 0 +Wizard\DeckGroupListData.cs Wizard\DeckGroupListData.cs d107ef3fc0cae879fe755256b94e8cc7ddcaa64d3cffa1143246dfe68a185150 0 +Wizard\DeckInfoTask.cs Wizard\DeckInfoTask.cs 4256d53231dfd8f243c47c9e94810d749c9542fb4c540f0ad486918dec5f3b3a 0 +Wizard\DeckIntroductionPeriodSelectDialog.cs Wizard\DeckIntroductionPeriodSelectDialog.cs 8c64a8b8c911bc266e67d01f22b02b50517b93347fdc2ed6d53c6a83de7ecf06 0 +Wizard\DeckIntroductionTask.cs Wizard\DeckIntroductionTask.cs 3b03a5c38563b466f72fa956252693d5fc0b35c110d3b9c9ccc3e23057865587 0 +Wizard\DeckLeaderSkinUpdateTask.cs Wizard\DeckLeaderSkinUpdateTask.cs 8c2dc9ee848008241e91ef4fb6a5801d5df4e7413323f84575e03584405e2f1f 0 +Wizard\DeckListUI.cs Wizard\DeckListUI.cs 358bf4fcf970e714fbe1bfa67db36794271d63f0b93d9f3fff38c5ecfec2b7e1 0 +Wizard\DeckListUIParam.cs Wizard\DeckListUIParam.cs fa39362bce104dfb54eb1bdf781e9cd973157da9ad76aa33c0595f8934e1af6a 0 +Wizard\DeckListUtility.cs Wizard\DeckListUtility.cs 353c79754fd9a0967d88439c3793c7759e75f6dccc99aaa506c63c263bc40ca7 0 +Wizard\DeckMyListTask.cs Wizard\DeckMyListTask.cs 0d7c1a216a20ac1aa47080e769ab1f5c3ce218243626ca32d6da32963733331f 0 +Wizard\DeckNameUpdateTask.cs Wizard\DeckNameUpdateTask.cs b96e148582ad92c01e978bbcc091c9ce2ab59df6d73309005fdeddfc095b1b7f 0 +Wizard\DeckOrderTask.cs Wizard\DeckOrderTask.cs b82f0d36352649e906517835f6f6b0a2a40861226be288e326987d90d57c129d 0 +Wizard\DeckRandomLeaderSkinUpdateTask.cs Wizard\DeckRandomLeaderSkinUpdateTask.cs d241a6b6bd2fce093788023993a562099da0358b6b56a7c54db3e03ad19bb37a 0 +Wizard\DeckSelectUI.cs Wizard\DeckSelectUI.cs 2988481745cf6011c71470173e750d0d53e049eae0fd0222fdd58426552e4ea5 0 +Wizard\DeckSelectUIDialog.cs Wizard\DeckSelectUIDialog.cs 57d268defebb1b9e21d26eb5d83eb0e6a017dfbef062ee03279a17c81707ce57 0 +Wizard\DeckSelectUIDialogTitle.cs Wizard\DeckSelectUIDialogTitle.cs a392d397f6f7b885440ceedee71ee93e8acefe1e7cfb1508bc44a311a43567a0 0 +Wizard\DeckUI.cs Wizard\DeckUI.cs f99d5d852a206e73ee5c25406ae03380225bfea8c68ce24b69de8347e220af59 0 +Wizard\DeckUpdateSleeveTask.cs Wizard\DeckUpdateSleeveTask.cs e94fbccc3c651e24fe9dd2be00ab13ab17eee2d5d134e317e98a54694638bdc9 0 +Wizard\DeckUtil.cs Wizard\DeckUtil.cs 7a8e6c204f5312eabdb6c56cc8dfa366db3a9aa55584ede83c7cfec225b4d5a5 0 +Wizard\DeckViewHelper.cs Wizard\DeckViewHelper.cs c364b815cd91be517d658f93ddf3a7ba7428261c156ee2162a17e211f4e294c2 0 +Wizard\DeckVirtualCard.cs Wizard\DeckVirtualCard.cs 00c7e8d2ebae0dac6af30eb018cd1390a3ceba87b1348c93fe0c7c99eebf275d 0 +Wizard\Degree.cs Wizard\Degree.cs 0f3cf092884c7d4c5a4479ce9f887c3b93e77c2c1fd205379c785b4ec095dd22 0 +Wizard\DegreeCategory.cs Wizard\DegreeCategory.cs f68c21dc08c6bf0b20af52a33792e14d680c5dab5abb1f2d78eba08e418f7806 0 +Wizard\DegreeHelper.cs Wizard\DegreeHelper.cs 374834564120f9fada359f4d1c8ecb2fec73d9d9e8e0dff4d049c10459f94bcb 0 +Wizard\DegreeMgr.cs Wizard\DegreeMgr.cs 556894217a0903686b0c2c1b4895d0585a3b85863617e5f97dfe49edb02b2c73 0 +Wizard\DeleteUserDataTask.cs Wizard\DeleteUserDataTask.cs c0c0f8f2fc97b9e20907adc5b8e08a36696c9d3f79ef24da92e11c9888fa2760 0 +Wizard\DialogCreator.cs Wizard\DialogCreator.cs a48d5ef01c479732f8e1638ce589904cddae1ecfea80526321e5ab2c0ff29b32 0 +Wizard\DialogItemPurchase.cs Wizard\DialogItemPurchase.cs 3b35164adbc25cb9075a6fdf4e605ba9b08e7272ba9ebbafae381c0e6206ba2d 0 +Wizard\DialogSubText.cs Wizard\DialogSubText.cs 0f2c313c63527cab0897631df179960ffe766102c250fdb392cb9baccb819dc4 0 +Wizard\DisableLethalCheckPolicyCollection.cs Wizard\DisableLethalCheckPolicyCollection.cs e1d291cfda348b5487ef0a1ae0978724891ee40e2fcb9a84b26b652e3a913322 0 +Wizard\DiscardedBonusTagCollection.cs Wizard\DiscardedBonusTagCollection.cs ca8a302ba3e3d8a55b1608812514a733458db7b819237308953fd33856178c72 0 +Wizard\DiscardedTagCollection.cs Wizard\DiscardedTagCollection.cs a69512ecef80fb292401593bb6d84436806d82d1e291283bfa239fc986fe070d 0 +Wizard\DiscardedVirtualCard.cs Wizard\DiscardedVirtualCard.cs ce499add4b5b3c54e9a4ae151f2d2d741734ba69c4b16feab87534b7e167f3c1 0 +Wizard\DrumrollDialog.cs Wizard\DrumrollDialog.cs 544e1507787ce68a55161efa6d297fd631c24ecdb7d3c0cd57001c2cb159bf9d 0 +Wizard\DrumrollScrollManager.cs Wizard\DrumrollScrollManager.cs e6737ba53a22d1ad16fb5b37d9dca3c550b4be58c442d5f0b1a628bed6c6fbbb 0 +Wizard\EarthRiteRecordContainer.cs Wizard\EarthRiteRecordContainer.cs 24174a54eaff51ffe79ac07b9093c7f4c60a17d5553cb35ad079e2f0b6544c38 0 +Wizard\Effect2dCreateParam.cs Wizard\Effect2dCreateParam.cs 99b02a3cf6255dcb255104d2a59a65d806fff8676e372dbc430066850cd77fc8 0 +Wizard\EffectUtility.cs Wizard\EffectUtility.cs a5385e357d288c22fdff05e8a7a37f6b4e58b3d5351b2b98d9587e149e7b509a 0 +Wizard\Emblem.cs Wizard\Emblem.cs 40fa3d4362ff82c882153f1974a24109c15843b7b293e3568c71dfe11c6647b6 0 +Wizard\EmblemCategory.cs Wizard\EmblemCategory.cs 983147bf89405c54d6270ed65d619138b8d86dbfc85080a2488d62497768ccdb 0 +Wizard\EmblemMgr.cs Wizard\EmblemMgr.cs 87285534a13166dca261b1bfb4bed260a7aedad0bb0bc544e10a157db47d3473 0 +Wizard\EmoOnLeaderDamagedPolicyCollection.cs Wizard\EmoOnLeaderDamagedPolicyCollection.cs f4f26880b3b29578eba687247efeaef485660a78129be0d9d139b9cc6685842a 0 +Wizard\EmoOnTurnEndPolicyCollection.cs Wizard\EmoOnTurnEndPolicyCollection.cs a945bc0e9691eeeb635ad4ddf4eb3ffc7241c42254b5de5d76d9c33ade17cc9e 0 +Wizard\EmoOnTurnStartPolicyCollection.cs Wizard\EmoOnTurnStartPolicyCollection.cs 87ba871d30c87c8d1eb4dfec188e3292b0162d5d66a6e7e0744ff9405ace2e52 0 +Wizard\EmoteTagCollection.cs Wizard\EmoteTagCollection.cs ea18ac5bcf19f541d6feda09f7eb299a00c48c3b70081fbacc67ed8da7226ac6 0 +Wizard\EmoteUI.cs Wizard\EmoteUI.cs c312c9110380793bd972cd6641177b21ac99b356ce3e06862f278f13f10d1586 0 +Wizard\Emotion.cs Wizard\Emotion.cs 0cffcacfe1eb54bd02b66fb4ad54a3a146722e89b824ebb4c126904c87dfca8d 0 +Wizard\EmptyDeckInfo.cs Wizard\EmptyDeckInfo.cs aa954d6e0b6b699500ff9a7db06408c35ae2c48314dafbf058c4d3edd5566bcd 0 +Wizard\EmptyDeckInfoTask.cs Wizard\EmptyDeckInfoTask.cs ac943ae638b0d7ff12ac839f0245ed0021ed55407d517769c0d33584cd65d3a4 0 +Wizard\EncryptData.cs Wizard\EncryptData.cs e7afc82bfc5e7b796ecf5b0ec1fa0afd4be0e3c4ee9dee1d37e1c99cdddf3fad 0 +Wizard\EnemyAI.cs Wizard\EnemyAI.cs d264983ee917e4b6268e30f01e49b5cfc278cd5c5d91e085f8bbeb148cbdd3af 0 +Wizard\EnemyAIFusion.cs Wizard\EnemyAIFusion.cs d3dd6db16807beb214c1c42481567a3bff6f729c3b793c8017771d23c6628f98 0 +Wizard\EnemyAINull.cs Wizard\EnemyAINull.cs acc40c89939d36b843119e12bc973369acd3e1e9e8f800f99a0c34369381ee56 0 +Wizard\EnemyAIUtil.cs Wizard\EnemyAIUtil.cs b7e20a730e2c69134bd1da46f1fa61edf8666b72da35c12b6bb2f505b8f0d2ab 0 +Wizard\EnemyAI_Attack.cs Wizard\EnemyAI_Attack.cs 95b484d3ae841051e1ebbb83273c566ba52016c44158ee1b41c43b22acf7fdb2 0 +Wizard\EnemyAI_Play.cs Wizard\EnemyAI_Play.cs 26a62d83a770858b8b5dfb9f1bdf33917ecea9b456cbc2b43d59daa64ad5fd13 0 +Wizard\EnemyAI_Skill.cs Wizard\EnemyAI_Skill.cs d3eb3694c301a0b3ababf1561a9da1279fb1c97c01f9113a51095dc4c647a555 0 +Wizard\EnemyAI_WeakLogic.cs Wizard\EnemyAI_WeakLogic.cs ffcb5020b4387b6ef560e0f7564dd4c7565699b3a219e6f74d886319b0eceaf6 0 +Wizard\EnemyBattleBonusRateTagCollection.cs Wizard\EnemyBattleBonusRateTagCollection.cs ea09eb8f465a35b65cc89809aba3093ecbc1c51abaa1129eba5f1a68d2cf810c 0 +Wizard\EnemyBattleBonusTagCollection.cs Wizard\EnemyBattleBonusTagCollection.cs 071b163d0f713514ca6ce70a88a89fa36d7b53178d38ab1b31c3ef20150d1f2e 0 +Wizard\EnemyEvoBonusTagCollection.cs Wizard\EnemyEvoBonusTagCollection.cs 9e7770cc32c64ac0e598b675d30cb68783e204ee4961bdd2e791f0b78327b155 0 +Wizard\EnemyHandVirtualCard.cs Wizard\EnemyHandVirtualCard.cs 92a00eb3a4efea0fde1bcf48026d1d79ce20d08aa94035d589723fb1586fdc0a 0 +Wizard\EnemyPlayBonusTagCollection.cs Wizard\EnemyPlayBonusTagCollection.cs e14aba377958be3a1481118f94da0486a522f3c5ab0db196a9b2b6c2ec8faca9 0 +Wizard\EpValuePolicyCollection.cs Wizard\EpValuePolicyCollection.cs c24e10a8972fa18e111fc8673e3f7c33537c41a8297dffcb90501f80f36fcdd8 0 +Wizard\EvalInstantAttackInformation.cs Wizard\EvalInstantAttackInformation.cs 9d2898f1e88381cd29e39cafa4de5e4d6a7ee85b806158f368871726ae742bb7 0 +Wizard\EvaluationType.cs Wizard\EvaluationType.cs 8dc122fa6bb282b18c448b31b0ec7ab3d4195f9dcac564a060648b14474f771e 0 +Wizard\EventStoryQuestInfo.cs Wizard\EventStoryQuestInfo.cs 1b664258a746d028f14816b3cd186d6fd1d4041ebf6e78b8e80ab1c0c72a3dfa 0 +Wizard\EvoBonusTagCollection.cs Wizard\EvoBonusTagCollection.cs f77e10af5d6d59cbc8d36b38916ea507278ab139ca869a22a3274d8e91cdb134 0 +Wizard\EvoHandPlusTagCollection.cs Wizard\EvoHandPlusTagCollection.cs 8d91fd61550cfd87d92885fe34ca5b1399400f8c0eb3f7f446494804e5179a6b 0 +Wizard\EvoTagCollection.cs Wizard\EvoTagCollection.cs f5d4674174526797f1ca154ea7d6b2975514e11de24d919593f7397b2810fd41 0 +Wizard\EvolveToOtherTagCollection.cs Wizard\EvolveToOtherTagCollection.cs 51a978c4aca7c80e6d03f5e1602516c48e4c5361fc38a95d598128c058f17a8c 0 +Wizard\EvolvedResidentTagCollection.cs Wizard\EvolvedResidentTagCollection.cs 357f1718ee170049c6e86488bc0ec4ca9fb659a3e68195e8b70c2ea538c96584 0 +Wizard\ExchangeConfirmDialog.cs Wizard\ExchangeConfirmDialog.cs 44ca8362ea686a7619595a73302bd43d167ce44e92a3bb3e427964d0c28af73b 0 +Wizard\FanfareBonusTagCollection.cs Wizard\FanfareBonusTagCollection.cs d21e2af67aeca95420438f140aaec1445a9dc0be829231c4d50771f4ae807c64 0 +Wizard\FanfareTagCollection.cs Wizard\FanfareTagCollection.cs c5c99a0437a507b360bf6247fa823bb9f56a2f39746b3a251f918e0f85e5a945 0 +Wizard\FavoriteTask.cs Wizard\FavoriteTask.cs e7e846e293142749f1d30a88b83506ab04a17df3c3d182dd59af49fedefde445 0 +Wizard\Field1005.cs Wizard\Field1005.cs 43af1fc9739e97b1a274b15f5387a56a5638b31c548bcc504e9f8522b9a21a2e 0 +Wizard\Field1006.cs Wizard\Field1006.cs 8379ef92d723cd16b1cf7a92cfc5c2c88c12745a892a9f84452e85a8d62d9d64 0 +Wizard\Field1007.cs Wizard\Field1007.cs c21e595714ae3d9f2c8c22e5b119214b91794da95cb7e2a57fbda6a7f8c8fd46 0 +Wizard\Field1008.cs Wizard\Field1008.cs f92a31ae90eeccc19923d97081304e528fc0bbd064a34b08b6c74c5a28fd5279 0 +Wizard\Field1009.cs Wizard\Field1009.cs b5f310fbf3de27c27866872a7dd4e1a0b1be5fbf0525b53a1acb74e4531c6191 0 +Wizard\Field1010.cs Wizard\Field1010.cs c980d4f972d26350bcab98727fad035b273031f4a6546fc71802dff3ff49d08a 0 +Wizard\Field1011.cs Wizard\Field1011.cs 3fef105d434f7ba4b6c41815f2f137db224caef19336c183e36907aa71a059f2 0 +Wizard\Field1012.cs Wizard\Field1012.cs a6d76d7dc419f11c6a25f2c2abc0c3019c28b622641e1d63dc78810fe8c2c1d9 0 +Wizard\Field51.cs Wizard\Field51.cs 8eb1151086d84558abd67cc035f06ec4d080852c90366e34a097b45540699e59 0 +Wizard\Field52.cs Wizard\Field52.cs fbee2b1615db4b1ab0b5ffc50fadc3e565d8c5dde726487310f7f9fafe5131c0 0 +Wizard\Field61.cs Wizard\Field61.cs bad451ac040f173803577d41a7ff8748dc6997979c4b6695c9812529a579655b 0 +Wizard\Field62.cs Wizard\Field62.cs 332fb0be684fa18e03ba258cb83163c56ab8b53dad2332c2fca8fb5a93728ad5 0 +Wizard\Field71.cs Wizard\Field71.cs c867d1493541720f5d50efde08b4eeb43c6fcee67ac32482852cb3422f4cb725 0 +Wizard\Field72.cs Wizard\Field72.cs 5057a0b5546cf13ffffaf2618021c8aa77edf009a5daafb8534acbcf34369162 0 +Wizard\Field73.cs Wizard\Field73.cs 2d64a4f34182f5e8b5e9d8c9e08ac14f8ef55c58badb0c7377cd38c8b1b10e52 0 +Wizard\Field74.cs Wizard\Field74.cs c0a12ea2ae33f3b1be6570f5701a98794325477b4934501d8b12db92d0dc8b3b 0 +Wizard\Field75.cs Wizard\Field75.cs c901d7508bed898ca19a15f2a19058e2b7cf41c371326d539b1c9be7b0ced982 0 +Wizard\Field76.cs Wizard\Field76.cs e4adeec81bcb45ba4a3b4ac0b74d29d7fa4a7e99bd596227b2d5a41d94ff9ed4 0 +Wizard\FilteringImageSelection.cs Wizard\FilteringImageSelection.cs 6b8cab1cf1cac1d724a28e5b5fdedd08c9ae1131565cf709c49c0d65e072a3f8 0 +Wizard\FilteringImageSelectionItem.cs Wizard\FilteringImageSelectionItem.cs 42da761519d7ea0b58f684ffc3382a7c912a08db2dbaa04b89f10103ef43b62a 0 +Wizard\FilteringSleeveSelection.cs Wizard\FilteringSleeveSelection.cs 01bc7473c395d533706ec261c887c7eb46e3f40d3f0c19c7ecdb481ab2a943a1 0 +Wizard\FirstEvoTagCollection.cs Wizard\FirstEvoTagCollection.cs 86154576e6fa624f9d379ca20bf760683b2b274d908e3ebbe99ea70666c68482 0 +Wizard\FirstTips.cs Wizard\FirstTips.cs e3b1f858c2a065411ec281eb31d5144cda59dc83af455972d4efcfcd6a01f66c 0 +Wizard\FixedCostTagCollection.cs Wizard\FixedCostTagCollection.cs ac1393292c3c1abc3af3d2668b13c51f9cf01e0315117f1e5dcd341fd45c7856 0 +Wizard\FixedRemoveType.cs Wizard\FixedRemoveType.cs 18521692ab83dd624c64921bcad7e851fadab86fb89b29469e0890011b0a1da7 0 +Wizard\Font.cs Wizard\Font.cs c84085ad2ce2a33ed50ad8183c9a635970a3067a109feae6227ad76c85c7de84 0 +Wizard\Footer.cs Wizard\Footer.cs 4e9fcb3268393c346e6b61687320f57b3316c96bbbd50e1b10cb7d661530f708 0 +Wizard\ForceBerserkTagCollection.cs Wizard\ForceBerserkTagCollection.cs 386d3f9150076989b6a3ad3b8ed6ecd2ca4ba475be4c4dffae9cacdb8cb89b43 0 +Wizard\ForceImmediateAttackTagCollection.cs Wizard\ForceImmediateAttackTagCollection.cs 6d8c4aae8881f2395ac57450bcd0364b8bd0c1ed28700c3d65c0a44f6bbf5555 0 +Wizard\Format.cs Wizard\Format.cs da3bc270aeb1fce63610b6bd1857ef6e07019c7840ba3a549f607170a957b3ce 0 +Wizard\FormatBehaviorManager.cs Wizard\FormatBehaviorManager.cs 6605b28d99c969cc08551568ae47b3c494dfae376ffc04a60c814ce993958bf2 0 +Wizard\FormatChangeUI.cs Wizard\FormatChangeUI.cs 4488f75727d57aff2b56bd18dfa5b67566189114c7120041fb4edc081f72e667 0 +Wizard\FreeAndRankMatchDeckSelectConfirmDialog.cs Wizard\FreeAndRankMatchDeckSelectConfirmDialog.cs 6583f613bc1f0853e1906a5392279f4f95c1f16b4035f29c8d1fb7d5d1fd73cb 0 +Wizard\FreeBattleDoMatchingTask.cs Wizard\FreeBattleDoMatchingTask.cs 5fff06ecb3477c0b585b72e75c7c6e6127ff870957d04b066b34a4eea596c86c 0 +Wizard\FreeBattleFinishTask.cs Wizard\FreeBattleFinishTask.cs 751980db78c6eacc00c9d7622fc92ae1df8c87c36b2dfe58424798ddf40f5c34 0 +Wizard\FreeCardPackCampaignFinishTask.cs Wizard\FreeCardPackCampaignFinishTask.cs 1dd31ef77f9940b479c211692c1d8301712bc5df8cf21de3224e0dda8eed203f 0 +Wizard\FriendApplySendTask.cs Wizard\FriendApplySendTask.cs 63b93148e7ff4914827d64d9cf303750262f140471f09629454b524c7a0a4d6e 0 +Wizard\FriendUserSearchTask.cs Wizard\FriendUserSearchTask.cs 942b615c4d5d494151e839f92ba75be296d14881e3ba05a8d865c9726ad4bedb 0 +Wizard\FullSimulationAI.cs Wizard\FullSimulationAI.cs 39e5b70761aeaab89f7d8d5423e73debab490171e72a2bb8a75a013c2dc9c8f0 0 +Wizard\FusionBonusTagCollection.cs Wizard\FusionBonusTagCollection.cs 4903288da869da61c7a10520fd0815a168c5a1b1f00dc1fb011e509e88f69464 0 +Wizard\FusionDrawTagCollection.cs Wizard\FusionDrawTagCollection.cs fc333ea01f0840ce80d000384f65285513185a37eafe3c5b3999fb5fcb37c3ae 0 +Wizard\FusionMetamorphoseTagCollection.cs Wizard\FusionMetamorphoseTagCollection.cs adb96cf8a406a435815e619005cc27635dae060ebff295455ddb9a7a61223b39 0 +Wizard\FusionTagCollection.cs Wizard\FusionTagCollection.cs 82b1a33c1a0e089d9ee1ae621b5d16475d2634652d30138cd80decd193dd6d0e 0 +Wizard\GachaLayoutEffect.cs Wizard\GachaLayoutEffect.cs 35aa3a10942d329af9e9dadc2413879dd350541642778983efc5ae7ec2eaa1d2 0 +Wizard\GachaLayoutPurchaseButton.cs Wizard\GachaLayoutPurchaseButton.cs 9ea3aea8236729c9b3b762d6cd68bd0c67e78ce79c63e7aa6988998e690227ba 0 +Wizard\GachaPackAreaLayout.cs Wizard\GachaPackAreaLayout.cs 5cdd7fbab58cb0f95427544ac405ada5616d718931f457dcae29e5d3a70a72a7 0 +Wizard\GachaPackPointLayout.cs Wizard\GachaPackPointLayout.cs 9f87bbf8c8952ecbe27115ceacd731dba694e112b9d130b988f0a96235c57132 0 +Wizard\GachaPointData.cs Wizard\GachaPointData.cs 26bae09ef1c6707cd1135a6ccdcb9a26b3f5f39bddcb4c411710851ecc47b91e 0 +Wizard\GachaPointExchange.cs Wizard\GachaPointExchange.cs a6f8e1822b4c2d76ebc3ce173365b6e930ec2b41f820eaa46230f8d83a1521ef 0 +Wizard\GachaPointExchangeDialog.cs Wizard\GachaPointExchangeDialog.cs aa0b1cbd3e4e677be1af91558c774ea0366219bc067db8c56e83d7dc45b40fab 0 +Wizard\GachaPointExchangeInfo.cs Wizard\GachaPointExchangeInfo.cs 604786e3888b9898415f0aa27b9fec2f0e22bb0e925829ae9749fea03aa26f65 0 +Wizard\GachaPointExchangePlate.cs Wizard\GachaPointExchangePlate.cs 5fd7f08d6424e4ed3a385fb683a849ea7ed66b70cad9fde5b55a543241934d9d 0 +Wizard\GachaResultBuyCardPack.cs Wizard\GachaResultBuyCardPack.cs c38ca1737830907080640a6144de5e67e5bfce8880c51b73a7fb829775c47c0e 0 +Wizard\GachaResultBuyCardPackDialog.cs Wizard\GachaResultBuyCardPackDialog.cs e0b7d915f4c8c7e1b20cf88c44dd01a6325d58afc1e7df9be45cb0fb19c75d55 0 +Wizard\GachaSelectBuyNumPopup.cs Wizard\GachaSelectBuyNumPopup.cs 2aa4ee4381bd6ffda29d4c4c8ee8ce7899722d361089037ebeb8c626c4091c13 0 +Wizard\GachaUIParam.cs Wizard\GachaUIParam.cs 0b3d1a8dea33c121c44ad2d11b4d3329811913ddaeff65abd0e388ebdd566a2a 0 +Wizard\GachaUtil.cs Wizard\GachaUtil.cs bcbe7800864a035b5f6ed151b417a52bdfb44f6ab75061220b1488ac19b05217 0 +Wizard\GameStartAttachTagPolicyCollection.cs Wizard\GameStartAttachTagPolicyCollection.cs c4e1108a4e06f5cc00b27cfed24cd5556490e08cd912acdb504db349ec47d6c6 0 +Wizard\Gathering.cs Wizard\Gathering.cs f5160cbc2e6a75d616b31603269666b0876ca36cd23458eb1fa769d9dc0fad04 0 +Wizard\GatheringAutoJoinTaskInfo.cs Wizard\GatheringAutoJoinTaskInfo.cs fc170ce4677f14fc4a9c2ead3d1818726a17a01d2defd0e8a34dbfb4da89e509 0 +Wizard\GatheringChat.cs Wizard\GatheringChat.cs fde29e1f249d32a60a52c2db003f4b447c084ac27ee03f74acf1b2d093280f40 0 +Wizard\GatheringChatApiSettings.cs Wizard\GatheringChatApiSettings.cs 4ba131fccc0a9a14f7d6b630bf94f1e65f8cf5e742bcd990d85ea57125aeb2bf 0 +Wizard\GatheringChatAutoJoinRoomMatch.cs Wizard\GatheringChatAutoJoinRoomMatch.cs 225266a9051831905157567681db05c36b3da18fabc55ea0eee7d78216c17cb4 0 +Wizard\GatheringChatDeckList.cs Wizard\GatheringChatDeckList.cs 90f6d0c84fbf91a9577fc8bcd228a3fefbd74e45e54ca1c8ad493f0938049dbc 0 +Wizard\GatheringChatInterruptOrLeave.cs Wizard\GatheringChatInterruptOrLeave.cs b8b940139f08fa99c5292bc657bc7d7aba7e5194826fe604a960fec262a65e7b 0 +Wizard\GatheringChatSendRoomMatchUI.cs Wizard\GatheringChatSendRoomMatchUI.cs d0a0ddce3d5f464a5b642b0e80bd01ef1389893e40b91ddfffd8f45a9ce1f610 0 +Wizard\GatheringChatSettings.cs Wizard\GatheringChatSettings.cs ea1d8e522d03131e4b885b4bc4943707e710e6758292ab0d9140dfc0096c4a15 0 +Wizard\GatheringConfirmDeckListTask.cs Wizard\GatheringConfirmDeckListTask.cs 1120ecff28adc0f07bdc4c55475d74005d8297025045f9809666f1bd4334f6d1 0 +Wizard\GatheringCreateDialog.cs Wizard\GatheringCreateDialog.cs bfd5438b12dca19b991584ee3488d0355871f16b9a362dbbd26d56d5ae829b6a 0 +Wizard\GatheringCreateTask.cs Wizard\GatheringCreateTask.cs 83b33e80d485f4f544510d8829537b9841d8f337afdc30e495a9ea40299f2134 0 +Wizard\GatheringEntry.cs Wizard\GatheringEntry.cs 317ea8b25031936502ca7315e620a96cd61c0a6f15b0dce0a14877258bdb7a98 0 +Wizard\GatheringEntryConfirm.cs Wizard\GatheringEntryConfirm.cs 98d8ca6aaec22465fff1bcec9363f040f429d3fa77c9a0f474588621e39644d3 0 +Wizard\GatheringEntrySetting.cs Wizard\GatheringEntrySetting.cs 476bfbf70aad87c0909d546d10250b11c82b056d7460b19ba859464d764d9344 0 +Wizard\GatheringEntryTask.cs Wizard\GatheringEntryTask.cs 7653fd87d4827c30bd3061fe7aa84765ac7f073ebfa05bebbcdef146b5707656 0 +Wizard\GatheringFriendInviteListPlate.cs Wizard\GatheringFriendInviteListPlate.cs 7e963f326c9eeca7466d5e82c9bafbe32fe8cb5672766ab14927bc85549f6504 0 +Wizard\GatheringFriendListTask.cs Wizard\GatheringFriendListTask.cs 074948f46767ad157b41634bcbfbfa66baba91d4ff4e039523f5d88cf7fa482a 0 +Wizard\GatheringGetInfoTask.cs Wizard\GatheringGetInfoTask.cs de63b5ac7f5bf0cb4336192c5f116e0158fb32a48790c2a9cc948861706f7d2d 0 +Wizard\GatheringGetReceiveInviteTask.cs Wizard\GatheringGetReceiveInviteTask.cs 9bcfb3ca8fbfd974681c2b5dfc166a7d1905dc593ef30d79469ef7dedbdabd96 0 +Wizard\GatheringGetSelfInfoTask.cs Wizard\GatheringGetSelfInfoTask.cs 2b09b93b8a61d42d94f2eba0b3e628e0d0714c196df600cdea657bf9fba6f6ac 0 +Wizard\GatheringIDInput.cs Wizard\GatheringIDInput.cs 3504a7cf7cd5e7cd640006b4cb7455cb0899bcd183ca1abdf36677ee5ad483d0 0 +Wizard\GatheringInfo.cs Wizard\GatheringInfo.cs 7614c505d5604ad78e39e70d5ed3b5ff5bc84d634312bafb10b6e9037861d6df 0 +Wizard\GatheringInterruptTask.cs Wizard\GatheringInterruptTask.cs 92c144bf58a3d1563ab4afd1f942089e49a8910dd0c24eaad770ff6a57c4e35a 0 +Wizard\GatheringInvite.cs Wizard\GatheringInvite.cs e3a38ed3c87edc06deaba43443497b65b27618cbcd08337b24ac4a750d3ff8e8 0 +Wizard\GatheringInviteCancelTask.cs Wizard\GatheringInviteCancelTask.cs 2b0db3d3f17e3b5d59cf4cdbfa6f8412b0e8a21252e8984768baa315fab81e84 0 +Wizard\GatheringInviteRejectTask.cs Wizard\GatheringInviteRejectTask.cs 32abcf8dbf44fd183193314e3d125f081bba7a8d6c9188461829af4f71e361e5 0 +Wizard\GatheringInviteTask.cs Wizard\GatheringInviteTask.cs 0902f933b7558456641a135da87bbbc9ce969eeec82a9e37b646fb963b9f07f6 0 +Wizard\GatheringInviteUserListTask.cs Wizard\GatheringInviteUserListTask.cs abfc56a0dd376ca0dc233a5f75eb0e3fd3a8cad13d7a931960b881a0b44b81bf 0 +Wizard\GatheringJoining.cs Wizard\GatheringJoining.cs 5ff03014dc5c2ef76aff6f8509ddff78bd3957b0d9ab3368a8528145bb276d25 0 +Wizard\GatheringJoiningCategorySelect.cs Wizard\GatheringJoiningCategorySelect.cs cde01d6d8e8aec3a1608acc1529f4c07dc324d4b6dc77362bac8aa5016c0b1b5 0 +Wizard\GatheringJoiningInfo.cs Wizard\GatheringJoiningInfo.cs 98c8fc870f69519307db9e178cfb7e02c6167d96ae3e7277262ddc29eaf94256 0 +Wizard\GatheringKickConfirm.cs Wizard\GatheringKickConfirm.cs d4d62fdc5bbfc8b0b6ed5cd145453d3fdfc136077d6c8e6c203cc9d7d6c94e85 0 +Wizard\GatheringKickTask.cs Wizard\GatheringKickTask.cs 4b8ea2ee844ea449e043a98c746d725d7c2a5348fe398b323fb0741e16ebcbea 0 +Wizard\GatheringLeaveTask.cs Wizard\GatheringLeaveTask.cs 23c6e808e151a5513390c561da63a224bea5a4f0fceebb1d92a8365a0d6f163b 0 +Wizard\GatheringMatchedRoom.cs Wizard\GatheringMatchedRoom.cs 1531b714bd8ba8bc782ab35b68fa9bde01229f1705099fb9671c72d9ebc70db8 0 +Wizard\GatheringMemberList.cs Wizard\GatheringMemberList.cs 6c9e90fa64f98dc2e42b3dc901a153eb301ec58dcf86d655e17e72982f829568 0 +Wizard\GatheringMemberPlate.cs Wizard\GatheringMemberPlate.cs 264dfbcd2856335f7f3a1348b371fc434263bc4ed05e929f36923f09b5cd7529 0 +Wizard\GatheringMyPageInfo.cs Wizard\GatheringMyPageInfo.cs c28baddfaafc8ef7685abfdf6ac6318f822524a30006247625391fd7b6568fd2 0 +Wizard\GatheringRanking.cs Wizard\GatheringRanking.cs f56e7728f13379007d7580d769a3aaab1999140b404e587cb01d8d1ab99b3c6b 0 +Wizard\GatheringRankingPlate.cs Wizard\GatheringRankingPlate.cs 400945f05a5873739029429be1a599584db9348d454d14cdd8e62e6864b99dd5 0 +Wizard\GatheringRankingTask.cs Wizard\GatheringRankingTask.cs 000dd1e97df104d45801b2c6d610c4f47f0656a373c27b048c5ea3e43b406e3c 0 +Wizard\GatheringReceiveInfoDialog.cs Wizard\GatheringReceiveInfoDialog.cs 34a7b4144a6039b9542de2eafb0d86a87f1e43437c80c86834ddbabf0e0b9438 0 +Wizard\GatheringReceiveInviteList.cs Wizard\GatheringReceiveInviteList.cs 584ecc5fb0b0d770bb37755bf14c9f8a25093175b02dc0fe8843b327c91e6a86 0 +Wizard\GatheringRoomEnterTournamentRoomTask.cs Wizard\GatheringRoomEnterTournamentRoomTask.cs 167e6f58f8ab1a9b182a4ac8f5178ed4c92c6bbd9feac6ef240deff757a14d2c 0 +Wizard\GatheringRoomEnterVacancyRoomTask.cs Wizard\GatheringRoomEnterVacancyRoomTask.cs cc645ab3c33905b5b187b27d8fcbca95bff35742726f1ebc4c9aebd24c435a09 0 +Wizard\GatheringRule.cs Wizard\GatheringRule.cs ee446b445c77d6d0a1e6e0f64b54cbe2a8b15974376ebc7fefa65331bd42ce51 0 +Wizard\GatheringRuleView.cs Wizard\GatheringRuleView.cs d537ffdb1606fd8a080ee569c6a43f35189f160d39b84ff1245261339977e226 0 +Wizard\GatheringSettingDialog.cs Wizard\GatheringSettingDialog.cs 0f6e45ca52fd20a1984194990032ba44e6c361f4b76cc1abce388216fbc2e9e9 0 +Wizard\GatheringStartTimeSelectDialog.cs Wizard\GatheringStartTimeSelectDialog.cs fa3c7f79d74984bb1b42760c01ec937c2c1b4c14266459004b4789db8697e09b 0 +Wizard\GatheringTornamentCreateTask.cs Wizard\GatheringTornamentCreateTask.cs 868e1e194981f75a91f070752033b408c400e1226fd5eb34bfa8b5d983057157 0 +Wizard\GatheringTournament.cs Wizard\GatheringTournament.cs e17736944fe7f6d74bf3e761433719d3f90d76089e4cabc32ea6b0b07b16295f 0 +Wizard\GatheringTournamentInfoTask.cs Wizard\GatheringTournamentInfoTask.cs da515a69f5f3602b7796dbeb3ffa0c4eb9e55e6acda6853c8181108fd44d5abc 0 +Wizard\GatheringUpdateDeckLeaderSkin.cs Wizard\GatheringUpdateDeckLeaderSkin.cs 56e37229981c9e4415e4f60c9c7dec80b2ec4ec3b90c41acd4d14e41f7d46791 0 +Wizard\GatheringUpdateDeckName.cs Wizard\GatheringUpdateDeckName.cs cf11ca9e8dbd07c26cbe2cb8b165b1eefe2446f123d938edbdcabd516bcf3735 0 +Wizard\GatheringUpdateDeckRandomLeaderSkinTask.cs Wizard\GatheringUpdateDeckRandomLeaderSkinTask.cs 29cd6ff458645c5cbb37ac9b32f8e3720d0bb9c3e4273c62b8750ff5a2d21092 0 +Wizard\GatheringUpdateDeckSleeve.cs Wizard\GatheringUpdateDeckSleeve.cs 81b5296ae4b8c44b4801126dd02ad2ab0b55d10caca967b7ae064c3c82046a20 0 +Wizard\GatheringUpdateDescriptionTask.cs Wizard\GatheringUpdateDescriptionTask.cs ba8e0123159418cf672e28d4f23e2a55b9f10da9e33dd0bb053ce74f88d5aea6 0 +Wizard\GatheringUserInfo.cs Wizard\GatheringUserInfo.cs fc67c9a20b37d66061a42e83e25b059f5342c936ab45d5d3e0c76132e8b08e04 0 +Wizard\GatheringUtility.cs Wizard\GatheringUtility.cs bf3292e3e5a29dcbd25e25fa60eac4976ca06736de83eeea7cff5beb232f7517 0 +Wizard\GenerateDeckCodeTask.cs Wizard\GenerateDeckCodeTask.cs 9f32c9513ec63d8b19e36d402c1adfec123b7f5774b86369391ce5fcb3996e1b 0 +Wizard\GenerateDeckImageMaintenanceTask.cs Wizard\GenerateDeckImageMaintenanceTask.cs 93ab8840c0ea594c3d46d72a677d8c0ed8c620b7a4e7df5694eb4d6c5bb394ef 0 +Wizard\GenerateDeckImageTask.cs Wizard\GenerateDeckImageTask.cs 0707c62e24e24b776145e4c81a1a4f4c6a2483c674333e2a40205646e541a5aa 0 +Wizard\GenerateTagCollection.cs Wizard\GenerateTagCollection.cs c8a76fe65207f3e3ce6c06bfeb0317ea98796bf8f093dfa710b05547e8b8cfad 0 +Wizard\GetCardMasterTask.cs Wizard\GetCardMasterTask.cs 76242fa1bce00c5820fb35ba1e7abd984841a2b12971987d7300384c23a9eb01 0 +Wizard\GetDeckDataFromCodeTask.cs Wizard\GetDeckDataFromCodeTask.cs c1ada3b7518e2346f4bad662e7f93708f4e9271b57221dd3a15ecc8a244826b4 0 +Wizard\GetOnTagCollection.cs Wizard\GetOnTagCollection.cs 53dd75747aca1d11c8dde8703971ca327b36076ac25d7a4980cf21255835148f 0 +Wizard\GetOnTriggerTagCollection.cs Wizard\GetOnTriggerTagCollection.cs 2b7b7621f4483bd52ca49e2c3294a56ff25e29ff7bf32baa1ff76d86111f2fb3 0 +Wizard\GetSelectSkinOwnedStatusTask.cs Wizard\GetSelectSkinOwnedStatusTask.cs 2e704c9343f59ac2d42d26eda7db77045ef144b45b16b581a6316d9cae5d177a 0 +Wizard\GiftTransition.cs Wizard\GiftTransition.cs 6fa6e6166dbfff9e8eb6abc43f26f011e8f681a0f3a443fd82aa78d2832b9d96 0 +Wizard\GiveSkillTagCollection.cs Wizard\GiveSkillTagCollection.cs fc0b094247ed98cee05d1e781c3e0f2d0f56db4f4b89affd2b805859dc040ed4 0 +Wizard\GuildInputDescriptionDialog.cs Wizard\GuildInputDescriptionDialog.cs a4a4fd57d926fde67c6c44805aabe7b78f0ac203e65236091746fadc5a656a1b 0 +Wizard\GuildInputViewerIdDialog.cs Wizard\GuildInputViewerIdDialog.cs ccd20678b887f8c02219e931ed2723b6d0ccd6d96aa0748ac0a813b068742b28 0 +Wizard\GuildNotification.cs Wizard\GuildNotification.cs 167b667c4475f5ea1aab301f70a0dc52b5ae273d6c4a00209ec515cf90978323 0 +Wizard\GuildUserDataDialog.cs Wizard\GuildUserDataDialog.cs 22fb13704fffc364b7c8c26690209beb08f3a60466139d67e11c494a05451f74 0 +Wizard\HandBonusTagCollection.cs Wizard\HandBonusTagCollection.cs 254828268b50bd500739de4715e07548f94d8e315e298cf83d123b9704575721 0 +Wizard\HandPlusTagCollection.cs Wizard\HandPlusTagCollection.cs 6e7c69ade97cea12534f1308a8a1b47170ac1078b3efe5e0613c38a742d9eca9 0 +Wizard\HealTagCollection.cs Wizard\HealTagCollection.cs 913557e82f49d9beb64a02bbae3555ace4b4ab633580411e14dd6ded61f46ef5 0 +Wizard\HighRankEffectInfo.cs Wizard\HighRankEffectInfo.cs d902f77261b58377e093cc7305827c087b4af6fda9d39c0470afe75ae1e7e1f7 0 +Wizard\HofFormatBehavior.cs Wizard\HofFormatBehavior.cs a0a20f0b5c52c5b4b3c8325645fdc27de9fb370dcead8d96990694cb75d8b269 0 +Wizard\IAIEmoteCtrl.cs Wizard\IAIEmoteCtrl.cs 7a10392831ba1389e0d690d49fd563b9de356e8199e9cb2c252edb5d7b2442a3 0 +Wizard\IAIRemoveTagArgument.cs Wizard\IAIRemoveTagArgument.cs b1b55e01c9542773c5fda04e23e2692c9c1f2abe8d7f5e49832eecd32e1c4770 0 +Wizard\IAITargetSelectTagCollection.cs Wizard\IAITargetSelectTagCollection.cs 9f5213399c3590ccf5519da98308384c07a960c6c8e79721169a854218ad3416 0 +Wizard\IAITurnEndArgument.cs Wizard\IAITurnEndArgument.cs fecc0c0f390376939e0aa5993b4ef7efe2c68457b3b7a76b8c7203b53b4853af 0 +Wizard\IBattleSimulationAI.cs Wizard\IBattleSimulationAI.cs 4ae9b2993be434a5b76d822de8d56977d7c15d0108e7446a19dcabc785976470 0 +Wizard\IChatActionUI.cs Wizard\IChatActionUI.cs 5cc278a75d5c0525e8cac93ad131dcad9cc35cf6bb62668d6212fcb5b9dd21b9 0 +Wizard\IChatApiSettings.cs Wizard\IChatApiSettings.cs 0d99b1ef99ec1035e7bd1d30f2f1545e12851df6b06b0cf604b0a340e77c8a77 0 +Wizard\IChatSettings.cs Wizard\IChatSettings.cs 26b5ef8dd132ab5cacce7c0e2b682f1ddede64f5e2e7311b8231d357bf6b34ff 0 +Wizard\IEnemyAI.cs Wizard\IEnemyAI.cs e4fc8be7e4dfb93145e0dda9a6c8935813b54ca7f46b156a784e1c24e0b07c41 0 +Wizard\IEnemyAIBattleInfoRecieveDataAccessor.cs Wizard\IEnemyAIBattleInfoRecieveDataAccessor.cs 0f24830f9f5c99068d1eaded636815b8010c1056883b3ce7fc2fac1867e66574 0 +Wizard\IFormatBehavior.cs Wizard\IFormatBehavior.cs b11e696685f19dcd75be555aaab5121b54b2c70fe1af72caa468ec5e80c6947e 0 +Wizard\IgnoreBreakTagCollection.cs Wizard\IgnoreBreakTagCollection.cs 95fa4a8aea7a980dd225d37f80c8ebeed3d2984507ce6a83c8411a70398fe816 0 +Wizard\IgnoreFanfareBonusTagCollection.cs Wizard\IgnoreFanfareBonusTagCollection.cs cf22a06695c7b33920b0ee6caa9ab62a8f541306167074860bc105fb3f713126 0 +Wizard\IgnoreTargetTagCollection.cs Wizard\IgnoreTargetTagCollection.cs 792b1c640a8978a7f69d9d295480780e18c250ea874a655ab55dc1c99d535542 0 +Wizard\InCompleteDeckDecideDialog.cs Wizard\InCompleteDeckDecideDialog.cs 81c448ba1d0e0d9614c0c7b6941a396e03ed0bc460b4419c79d2e88155835eb5 0 +Wizard\InplayMovePatternFilter.cs Wizard\InplayMovePatternFilter.cs 99b4635adc0978eacd30a4eab54eedf0185b23b29f2824b7a66071566ff34737 0 +Wizard\InviteAcceptTask.cs Wizard\InviteAcceptTask.cs f06814ff9397bb193919ed86715914cc6bd5ec5e7a0842ac61a8258fdcea5633 0 +Wizard\InviteConfigUpdateTask.cs Wizard\InviteConfigUpdateTask.cs 61a0624c5a9fda20507973901d5218d7bedafe21ed4eb355af8601dd64b8621f 0 +Wizard\InviteGetListTask.cs Wizard\InviteGetListTask.cs e977b97383bd14e766ffe3997242099a9f0f619d47aaefac8f5cf0dc18139499 0 +Wizard\Item.cs Wizard\Item.cs 1f08b86cf607be02d6083243247d28fb89bfae5ba9595f1cf74562680caa9025 0 +Wizard\ItemPurchase.cs Wizard\ItemPurchase.cs 6f7d4c77170059b5418fb2aeb0749abc735bd141a116e5e612b028455964159a 0 +Wizard\ItemPurchasePlate.cs Wizard\ItemPurchasePlate.cs 7ad6b0abd541371ba4184602105b3de849ac547452f5ab594de2f75dcea69e13 0 +Wizard\LabelDefine.cs Wizard\LabelDefine.cs 073931ece990c5defc6b745f739221ae742552579055257c5c1fc179b1b07807 0 +Wizard\LastwordTagCollection.cs Wizard\LastwordTagCollection.cs 35a8bf05a748f8cc1811bf419a5e19cbe8058bc76e3f54d9f2160c584436a59f 0 +Wizard\LeaderSkinSeries.cs Wizard\LeaderSkinSeries.cs 8273cd6831408f1e74e7e2f7b3db3074d41b102e557941ee3c1f0afecaed71e5 0 +Wizard\LeaderSkinUpdateTask.cs Wizard\LeaderSkinUpdateTask.cs cfd0aef8a3674e3332ff9c0bd243d828dd5f31307cfc62ec39498076318bc9e7 0 +Wizard\LeaveBonusTagCollection.cs Wizard\LeaveBonusTagCollection.cs 30e0c56bbe6b1418a166762a88660ce41b13facd173f1b00e500066e84e699fd 0 +Wizard\LeaveTagCollection.cs Wizard\LeaveTagCollection.cs 11d8c7a49a83ae6032f77183b7e2e32d38ac4a9def2413cf64558a00fe53750e 0 +Wizard\LifeRecord.cs Wizard\LifeRecord.cs dbb7e7c6532bf24174d3d958147309b1eb87faac12c57754e7282cf8ac5d8b50 0 +Wizard\LoadQueue.cs Wizard\LoadQueue.cs a3bd987174d57f1e63dc59f67a02235addb16bd515d9d4fc995054949f4c898d 0 +Wizard\LoadSceneStoryData.cs Wizard\LoadSceneStoryData.cs 28456cdcdbc3a76e45d48f88133b868006e40ee12a26509e35707de3c5a0b18a 0 +Wizard\LoadTask.cs Wizard\LoadTask.cs 6a096260ee3c7b9351e065adb1d491055638bd1646e04d90b203d803434de76e 0 +Wizard\LoadingDownLoadStoryView.cs Wizard\LoadingDownLoadStoryView.cs fce928ee1d58540944ceeeb774e8fad892bb968a3265d7a7bde5474574f63c8c 0 +Wizard\LocalLog.cs Wizard\LocalLog.cs b2ab4a0d1b1025a8a575652cf809b1be4de51ca3a1e5a10314d699516abe2f70 1 +Wizard\LocalizeJson.cs Wizard\LocalizeJson.cs 4adf1a47af054dc08971d7e8d1574e8b8d7692c027182ff6c3d167164240f4ea 0 +Wizard\LootBoxDialogUtility.cs Wizard\LootBoxDialogUtility.cs 8277f2e7dfbe98bc4e8790630c338d50a0e635f7566e9d1ee1cd22cd6b199237 0 +Wizard\MailReadTask.cs Wizard\MailReadTask.cs cf7a15cf5efb729c839d0ff374d9077dd62151055fc149b44108743efe6d583c 0 +Wizard\Master.cs Wizard\Master.cs dc58e2aacb78cd813aa7c7e8db2ba18268b3ca62188e0ef36d9f8445a58486ce 0 +Wizard\MasterResetMonthTask.cs Wizard\MasterResetMonthTask.cs 0e7830760327c23b708bfce1ec62a27e9484aac191b54c1b594f43d20ecc9d1d 0 +Wizard\Mastershop.cs Wizard\Mastershop.cs ed5828427f2fe31272830b4ab3dfe0c70d1caae570cf7145f96e9cb402eb90f5 0 +Wizard\Matching_Competition.cs Wizard\Matching_Competition.cs 5a28b9f3ed26f46c28b9b41ea26557cb56a13a424f8279a3e6e7ecccf47cd1e5 0 +Wizard\Matching_Sealed.cs Wizard\Matching_Sealed.cs fe051fbc6117cc48b6ba9d48226d5735bde55b220e558cdbbf7d13dbe3f888e6 0 +Wizard\MaterialDefine.cs Wizard\MaterialDefine.cs c0e77fd2b296289d26960a188e1dde9d24c5aa0538b2a237b8e5d3d177c2b0e0 0 +Wizard\MemberBattleBonusRateTagCollection.cs Wizard\MemberBattleBonusRateTagCollection.cs af0f9eb215dfdba042be2663c3485e0330a2da5cf1c64b001fbeb958f9c40f77 0 +Wizard\MemberBattleBonusTagCollection.cs Wizard\MemberBattleBonusTagCollection.cs 7d5c866fa706411b0eef538feb6b10551066b0e552d757a081c9a2b1bf5a5107 0 +Wizard\MemberEvoBonusTagCollection.cs Wizard\MemberEvoBonusTagCollection.cs 94fa4f95290b222605bc4c01b68d38d8f3bd64568887f0764034bd1a1ab429e5 0 +Wizard\MissionChangeReceiveSettingTask.cs Wizard\MissionChangeReceiveSettingTask.cs 69e3cc6fcacbd3aad6cc1e82453223eb64409f04e8daa698b10f8591cab4c89d 0 +Wizard\MissionInfoTask.cs Wizard\MissionInfoTask.cs 68c13aa4f0b37a1e1f29c30ba2b2b3e9809be3a69b40fa7990c577521ebe082a 0 +Wizard\MissionRetireTask.cs Wizard\MissionRetireTask.cs 4277fd692632db4c7d396bb9b2474e6a68ed738817e1d698c9cfc0fb7e4d6c06 0 +Wizard\ModUnitRatePolicyCollection.cs Wizard\ModUnitRatePolicyCollection.cs 51ee8a8ca31e3fb5eef773271b95e463c8fe376f9b16e9f537aaf8ab1b03e4c7 0 +Wizard\ModifyHealTagCollection.cs Wizard\ModifyHealTagCollection.cs b8451ec819776ddfec09c4027fad85ee2d2e9d7c77970aef414949841b8a034d 0 +Wizard\MoveFirstBonusPolicyCollection.cs Wizard\MoveFirstBonusPolicyCollection.cs fc3fa7944f42245732f94eb03228bf5b88fa886fb290f58edf4b2c6f6e7735aa 0 +Wizard\MovieSubtitles.cs Wizard\MovieSubtitles.cs 6704fb258932c439dd0c56b3fe2e4fd4bde4331bc214b94d9e4511e2e523deaf 0 +Wizard\MultiDeckSelectDialog.cs Wizard\MultiDeckSelectDialog.cs 9a9b3b0532ab9ac8654b027254d8b4bd85e9801ec462e1f5d86659c5fefa153e 0 +Wizard\MyPage.cs Wizard\MyPage.cs 75afa5c09e9866a0f5a59ffd85f4cb7977975700b88d318238b675440cb7c1e2 0 +Wizard\MyPageBGCustomDialog.cs Wizard\MyPageBGCustomDialog.cs 38a7ac3519303533e1d3df0c06e22fec9d12bb9c20bf2f5801bf0785f3a43d6a 0 +Wizard\MyPageBGInfo.cs Wizard\MyPageBGInfo.cs 2a4a4b373afc76709bc4fe338c9cda07e9a9928403e14544aa866ba1b20cfd33 0 +Wizard\MyPageBGRandomSelectDialog.cs Wizard\MyPageBGRandomSelectDialog.cs 52f2e6fa028208c5b807fa57cb92800f569b4aad868dfe9fb27bce22f9b888fc 0 +Wizard\MyPageCodeInputTask.cs Wizard\MyPageCodeInputTask.cs 08caac8e962f404c909fc35af58e4ce074af84fee4ceb00c537466f9ed0a24ca 0 +Wizard\MyPageCustomBGControl.cs Wizard\MyPageCustomBGControl.cs 6dcda3459b2867c5cecfed12306c6546d704104d72050625c5445fe3dcc4f996 0 +Wizard\MyPageCustomBGMasterData.cs Wizard\MyPageCustomBGMasterData.cs f804b67196ba049ab2bca36abbcb98246d603c7e9035901c75b40a3eda954326 0 +Wizard\MyPageDetail.cs Wizard\MyPageDetail.cs a34a11602c1741e48c51da86e5376c92e2c51e711ff32818cc328f4c046bed41 0 +Wizard\MyPageFinishBattleTask.cs Wizard\MyPageFinishBattleTask.cs 2b6a054c8cfa51d5d390e9642e0441b579dee6b982259f5d618f70b3a1e11835 0 +Wizard\MyPageHomeDialog.cs Wizard\MyPageHomeDialog.cs 07a1744a7e94b1e5656868608968a1e70e7b5293d098dee5a6d61cd1fca2135d 0 +Wizard\MyPageHomeDialogData.cs Wizard\MyPageHomeDialogData.cs 8a340ba114a70c5546bba0d727cb9a9257efea3ae656417566882f3101a3578f 0 +Wizard\MyPageMaintenanceNotification.cs Wizard\MyPageMaintenanceNotification.cs 64149488be27c560203a11731d10539772adaab7c7e342991027b71af1af47f6 0 +Wizard\MyPageMyPageNotificationDetail.cs Wizard\MyPageMyPageNotificationDetail.cs 4e8495da3fda6ebd51be3d0f16582659a5c1084113c8ccc53d36a951053238b5 0 +Wizard\MyPageNotifications.cs Wizard\MyPageNotifications.cs 25336aac677f52bf5e9d5be2963cba52b1889ebe288fdce4c7ddd21b41b6b84b 0 +Wizard\MyPageOtherButtons.cs Wizard\MyPageOtherButtons.cs 494a2042ca360483e7d4f42a5e9f32c1624e0f7e1a1fc2ff665d21f15d605618 0 +Wizard\MyPageRefreshTask.cs Wizard\MyPageRefreshTask.cs f5e55531a94b6055f1dda47ef44c3f00de3c2bad9d86754e4604df0c8686c2d0 0 +Wizard\MyPageRewardDialogBoxCount.cs Wizard\MyPageRewardDialogBoxCount.cs c7dc2f5080d1aff9a61c393316886f8985d9ba795433ddb8ee3bb61c3cd794a9 0 +Wizard\MyPageSettingUpdateTask.cs Wizard\MyPageSettingUpdateTask.cs a14c3d92d9c166bc065073edcb3c9eef4c63aa89fc0bc706bb4c0b5b8755872f 0 +Wizard\MyPageSpecialWinRewardDialog.cs Wizard\MyPageSpecialWinRewardDialog.cs 71c3c9eea55e30d345a15e82b1bd271285b1401adb6b58c28dcbbfed62671bfa 0 +Wizard\MyRotationAbilityDetailDialog.cs Wizard\MyRotationAbilityDetailDialog.cs e4631c3e968aa8513320b7b483f74be935228c639f9a888a850e9357f5bb3898 0 +Wizard\MyRotationAbilityDetailDialogItem.cs Wizard\MyRotationAbilityDetailDialogItem.cs 6e140f24e4084617b9550add16bbf39521e2b394e3b92ba8a57d03ed7e62f13c 0 +Wizard\MyRotationAbilityGroup.cs Wizard\MyRotationAbilityGroup.cs 221427bd0628660a209d850d6e01274d00ceadba7c5a951a3dd98e87d1c30653 0 +Wizard\MyRotationAllInfo.cs Wizard\MyRotationAllInfo.cs 88ae58ae0352d620d94bfc461b28f50a3c6f9cc1cb015954748a32c8db3efde7 0 +Wizard\MyRotationFormatBehavior.cs Wizard\MyRotationFormatBehavior.cs d99bf365ea3083a5f67df25071e655e6aedd2f11bd70f08c1242a558f3024e33 0 +Wizard\MyRotationInfo.cs Wizard\MyRotationInfo.cs 4d9090e0e4b81cbd5c0e2ad5542da9577a5dade1a6a5211ebeb9dfd1ce91961b 0 +Wizard\MyRotationParts.cs Wizard\MyRotationParts.cs 2469f8b192fe03cec39e4519002031872790662048e61305a63802a48f1cd6df 0 +Wizard\MyRotationPeriodSelectDialog.cs Wizard\MyRotationPeriodSelectDialog.cs bb995629efd4da2dd3059154f131275623f6004d6328e40b22cdce0c2f032227 0 +Wizard\MyRotationRePrintInfo.cs Wizard\MyRotationRePrintInfo.cs 2bb1fdfcc60af40afcf6fdd11b36edeca0ced9c4765b226c6f62cca1ed5f0da1 0 +Wizard\MypageReceiveSpecialTreasureTask.cs Wizard\MypageReceiveSpecialTreasureTask.cs 5d5f018ada4f5139b2521adfef9930dabef7937602d7854d5599341792eb814e 0 +Wizard\MypageTreasureBoxCpOpenTask.cs Wizard\MypageTreasureBoxCpOpenTask.cs 25b6a4ae001a6f38a505a1e1d291fcdbad8172e0ea0680b2fb78a9d9565a5e92 0 +Wizard\NetworkDefine.cs Wizard\NetworkDefine.cs 44050f0b6eb56b29d05ddf9834a10b05553de9659dc4eb3619cd1a50660f7ef3 0 +Wizard\NetworkSkill_spell_charge.cs Wizard\NetworkSkill_spell_charge.cs 1cb5d6df2b3003362996e93b9ae95237a4ac5bda8af850b6b5a8122849e9b36e 0 +Wizard\NetworkUI.cs Wizard\NetworkUI.cs 28d19cff575b3fed81703487770dbcde958b7a2267e921d480c2f24c6b5720f7 0 +Wizard\NoInstantAttackTagCollection.cs Wizard\NoInstantAttackTagCollection.cs db3d8479c9e03b4fd7d6d58d9ff763564a7ff4b9e2ce1c8b7b2f5219f245bcd4 0 +Wizard\NoNormalEvoTagCollection.cs Wizard\NoNormalEvoTagCollection.cs 92c16f64f48fc8d643dcc29addd4c77adbc8a92bd9ccee830560190344e789ef 0 +Wizard\NoSkipAttackTagCollection.cs Wizard\NoSkipAttackTagCollection.cs 107152d8cb5b57a6c8e2682d6ba73cb90662fbbd7ac749def7e841101b5462e8 0 +Wizard\NonReferableVirtualCardBuildParameterCollection.cs Wizard\NonReferableVirtualCardBuildParameterCollection.cs 23251af778a55d3bd995d72adf74616b1d9679a6178c35e19e0466f748fb3210 0 +Wizard\NoneFormatBehavior.cs Wizard\NoneFormatBehavior.cs 885cfa3a6bc7896ecb67ca7ca95ddd5e7e4dfba4877d3c0441c09db327bc1887 0 +Wizard\NotificatonAnimation.cs Wizard\NotificatonAnimation.cs 86079fa67434ccd594837728872c521648a01111dc6917ecc9b100b892556c99 0 +Wizard\NullReceiveTurnEndToJudgeResult.cs Wizard\NullReceiveTurnEndToJudgeResult.cs 6d6ef2f3f0e2e43c47b58fcbc3f0aea7b139cc156df84fa6a93d14349534aa6c 0 +Wizard\OneMoreLastwordTagCollection.cs Wizard\OneMoreLastwordTagCollection.cs 43ded6b3ecf0cea6d0880bb9e6a0294fecf17eacca1f27bdfdbf4073a9f36661 0 +Wizard\OptionSettingWindow.cs Wizard\OptionSettingWindow.cs ddca8fc3a8fa399d2a19e143de82647c9a7dc3e849ae4538b9f42c5e4987f79a 0 +Wizard\OtherAttackTagCollection.cs Wizard\OtherAttackTagCollection.cs 01abdfb334ad2c7a75244ce40aa76963123120b1311b55d9f72b30eb602dcf45 0 +Wizard\OtherBanishBonusTagCollection.cs Wizard\OtherBanishBonusTagCollection.cs 9cc66ef3cb7e38fb9c393c8a827942003083062f1a704374c9adc600317c445d 0 +Wizard\OtherBanishTagCollection.cs Wizard\OtherBanishTagCollection.cs b0b834a06e5e3c202233667ea591c26fb8ddfcc1d3f04a05cf5530cbb6629aab 0 +Wizard\OtherBreakBonusTagCollection.cs Wizard\OtherBreakBonusTagCollection.cs 93136af3cbcbc5fbe886e01b61d73655e62c22af25a6ae3012d3bb68f2c895b1 0 +Wizard\OtherDamagedTagCollection.cs Wizard\OtherDamagedTagCollection.cs 1322687c298d19356e9c0bdb2a0412f0b1998d19d079627918623a5345e93085 0 +Wizard\OtherEvoTagCollection.cs Wizard\OtherEvoTagCollection.cs 155202d2b626c307690f8379be26c103d40d1b27cc4a5fed9e57ac9a26f5d912 0 +Wizard\OtherLeaveBonusTagCollection.cs Wizard\OtherLeaveBonusTagCollection.cs 32117e946ec6180cf917781cafa0ed64a9b08e504d52972da88cc878151752ae 0 +Wizard\OtherLeaveTagCollection.cs Wizard\OtherLeaveTagCollection.cs 42cfe082336baf4944c28824a67beba13a3550114f78151b06fa394c17275efb 0 +Wizard\OtherPlayTagCollection.cs Wizard\OtherPlayTagCollection.cs 48e0ada3fca7ac1e7ab4fa3fc253649df81c3d5599d63805883d6168b123044a 0 +Wizard\OtherPlayoutBonusTagCollection.cs Wizard\OtherPlayoutBonusTagCollection.cs 8e7dab4a4a8d31ddea357e269f0e25f43f7bb52f094d2c3db1ee98a0d5c990de 0 +Wizard\OtherSummonTagCollection.cs Wizard\OtherSummonTagCollection.cs 08bd5692d0fce51fe7087136fb302c1b0ce17c7b6b18ab25b90fee52e2dbef05 0 +Wizard\OutOfService.cs Wizard\OutOfService.cs 9951148c3174914d5c780eb058cbf4643a5b0bf5046de5466fa6898465405903 0 +Wizard\PackBannerData.cs Wizard\PackBannerData.cs 19a49488cc25566d51d172cdaaf5ea6194a0c6121ab2c78eaea5f6b2ca71de09 0 +Wizard\PackCategory.cs Wizard\PackCategory.cs 9335bf51da46cc25f51040bd04c543bad6686858802d3ded1c9ab857bef69995 0 +Wizard\PackChildGachaInfo.cs Wizard\PackChildGachaInfo.cs 40d10fdd911009cd6dfb780e2111a16cb7914cb7f1e8680130f9ab255a5a0801 0 +Wizard\PackConfig.cs Wizard\PackConfig.cs 01a5fcd6c5d39e3c08d6b820f8a062f16d65105e6f1a3fbe085f752b389cc45b 0 +Wizard\PackInfo.cs Wizard\PackInfo.cs 2bc15a5a218249074b306483866f20441ecb88d3ade2e2d363c19fb5633da0b7 0 +Wizard\PackInfoTask.cs Wizard\PackInfoTask.cs 361bde0ab56dfe307c887d472f2187971583a7bc9f706e70c9557fd8cd1b8039 0 +Wizard\PackOpenTask.cs Wizard\PackOpenTask.cs f640c02451e49da979f8d11388ae35549961a1076fb7faf277f267fcc4d4b9f8 0 +Wizard\PackSetRotationStarterClassTask.cs Wizard\PackSetRotationStarterClassTask.cs 98aa07a50d8f9291c3b8ebd61847b1c054c8a945837a494198ed41f89e49ae61 0 +Wizard\PaginationDots.cs Wizard\PaginationDots.cs 3a110b30e3a00834795f601512868899d167fe9ae6c579b98c92d75470a9dff0 0 +Wizard\ParameterOverwriterBase.cs Wizard\ParameterOverwriterBase.cs 0966e18f7e514ddaff7567c3d845b6cc98d10d7ee49f6130156ed46eace56cf0 0 +Wizard\PlagueCityTagCollection.cs Wizard\PlagueCityTagCollection.cs 3213ddc7ae26058dc28be578bd19b4342914324bdf761ebbc5f74e640e5155d6 0 +Wizard\PlayBonusRateTagCollection.cs Wizard\PlayBonusRateTagCollection.cs 32b5ae7c6fe5998aa1dfac3fac64bc08c36cc127408b983667e85d98bcca76af 0 +Wizard\PlayBonusTagCollection.cs Wizard\PlayBonusTagCollection.cs aae0f75c19388e975da4abf671c5082fd5e8d9bb0efc81cba0723a37d164dbf4 0 +Wizard\PlayBreakPolicyCollection.cs Wizard\PlayBreakPolicyCollection.cs a57c0e1a895b01fd4724657bb9b0f87cbf3515cb4bd2a73512b1c7f0f42d3283 0 +Wizard\PlayDrawTagCollection.cs Wizard\PlayDrawTagCollection.cs 26c9c14e820f24b7c42e7aa0945863875eb8340962537d041188f36c45082aa0 0 +Wizard\PlayLimitTagCollection.cs Wizard\PlayLimitTagCollection.cs 54dcdce8c2df53f4ed802b106411bafab77fdd3880676c3e36dfe3920fa67698 0 +Wizard\PlayPlusTagCollection.cs Wizard\PlayPlusTagCollection.cs b83296a9abf6a081036c9230b335e6c3380ee9018386faa72dc9cb65cde47933 0 +Wizard\PlayPtnBonusTagCollection.cs Wizard\PlayPtnBonusTagCollection.cs e77524431abd386597302bac81a6e6996a36b685ceef89804d66de9c313ea8be 0 +Wizard\PlayPtnWithToken.cs Wizard\PlayPtnWithToken.cs 080747dd4f88ceaceb395817efa0db08360b9d59924525452e967d3d1edefecf 0 +Wizard\PlaySimulationInfo.cs Wizard\PlaySimulationInfo.cs 63ede0dc409161412d03de1d31bf6d8687a3486ec7c5ad28f5a71a781e1b60e8 0 +Wizard\PlaySimulationType.cs Wizard\PlaySimulationType.cs 004b802fea1bc338f85fb2cde43544d13257f25238454bb4906e872c14b7c233 0 +Wizard\PlaySkipIfEvoInformation.cs Wizard\PlaySkipIfEvoInformation.cs c9661e2f6bb246f2e8aa6d587fff3c3cd056345485f01488a5e5636caf46c6e6 0 +Wizard\PlaySkipInformation.cs Wizard\PlaySkipInformation.cs 991da0ec87aeb9d1d4283ccb7f315db875d14aa63c494a05ea97df452c14ae9d 0 +Wizard\PlaySkipTagCollection.cs Wizard\PlaySkipTagCollection.cs b5a8ef396806b07493e98d47000f4519868355ff37432aa94d59ecec87306cb8 0 +Wizard\PlaySkipWithActionIfEvoInformation.cs Wizard\PlaySkipWithActionIfEvoInformation.cs 161af11f1248d88fb5b0eac67b043c8e6df9668a1008632660b4fed0c506720d 0 +Wizard\PlaySkipWithActionInformation.cs Wizard\PlaySkipWithActionInformation.cs 444852c31fc756f4e09231c2993261bc2feb600deb6f1eca2f687bfd25c45939 0 +Wizard\PlaySkipWithEvoInformation.cs Wizard\PlaySkipWithEvoInformation.cs ab1f8c1e0a656b97fb240e2094d7189958d278aafd48cc1aa50b09769e9cdecb 0 +Wizard\PlayTagCollection.cs Wizard\PlayTagCollection.cs 68c84ed4598bdef107d093b7662ddd4a51cfcdeecc73c72cb40db08fd6d01fa3 0 +Wizard\PlayedCardInfo.cs Wizard\PlayedCardInfo.cs 4f5236fb71867c8607bc4f3aacee3e5355080a4d5a4a79bc6521f564b7994e6e 0 +Wizard\PlayedTogetherHistory.cs Wizard\PlayedTogetherHistory.cs 4539c3f65d8eeec93a128d35d03162aa0920584fd6c0572819926d650f1bf1d4 0 +Wizard\PlayedTogetherInfo.cs Wizard\PlayedTogetherInfo.cs 2ad8297287d54111f23f6e230f428b1ef8c4cab8901049dd5dd86ddf6d870ecd 0 +Wizard\PlayerEmoOnLeaderDamagedPolicyCollection.cs Wizard\PlayerEmoOnLeaderDamagedPolicyCollection.cs c184b3bcdee48da727b852c93144b682dd012190bb9a6a2cdf15a71d78c305c2 0 +Wizard\PlayerEmoOnTurnEndPolicyCollection.cs Wizard\PlayerEmoOnTurnEndPolicyCollection.cs 8bcdde120838b245bdae2c8b2f0f980ea5e6ae9f6cb82f408ee2818f6889d874 0 +Wizard\PlayerEmoOnTurnStartPolicyCollection.cs Wizard\PlayerEmoOnTurnStartPolicyCollection.cs 1820ab12d06d0480f691e6e27c845fe7d714dc89520bd49c07d298d5217964bc 0 +Wizard\PlayerPrefsCache.cs Wizard\PlayerPrefsCache.cs 2b8c03328e4c85f7900af6d163b6e51253c58ab04c0c44fe3860affcb310b831 0 +Wizard\PlayerPrefsWrapper.cs Wizard\PlayerPrefsWrapper.cs 55326eeae1bd6269244e81c561851a486cedf959b981caea8f4de3bb80f01b67 0 +Wizard\PlayerStaticData.cs Wizard\PlayerStaticData.cs 7928b47254bacd87b53525bc22a5401e4471860e6d62d12b3c1fcfb420625a54 0 +Wizard\PlayoutBonusTagCollection.cs Wizard\PlayoutBonusTagCollection.cs e09f770ddfeb7644d0d836a9d9747944a76a1ca464e4301b7469c52433d69051 0 +Wizard\PlayoutNextTurnTagCollection.cs Wizard\PlayoutNextTurnTagCollection.cs 6f5c85cc3a8d3b12c68a8b70769025783e6058bf518eb6467053d986ad2b0200 0 +Wizard\PlayptnBaseStatsRateInfo.cs Wizard\PlayptnBaseStatsRateInfo.cs 43d28ea1977f721d3b106f12bcfb601fd69816fe8fcfd0717a8fa8691ec95fa2 0 +Wizard\PlayptnBaseStatsRateTagCollection.cs Wizard\PlayptnBaseStatsRateTagCollection.cs 4ed539fff8051a4474c1114bcd0c6892cf1b255d1ce5c60129657081c2cc0d60 0 +Wizard\PlayptnBonusPolicyCollection.cs Wizard\PlayptnBonusPolicyCollection.cs 0cf86b51c43acbe5842171a923af9b9099e1e8745d6122fbf7ea1d8465ae41d6 0 +Wizard\PolicyCollectionWithSingleType.cs Wizard\PolicyCollectionWithSingleType.cs 028f14bf344c0b269887d79b497b5ec43c232b6dfc88facf5190c5d29f8f2ed9 0 +Wizard\PolicyCollectionWithTypeBase.cs Wizard\PolicyCollectionWithTypeBase.cs d6e70cd2c96ad62d6dfadff5a3c6fc8318c31e8661f0a1abce61165156136aa4 0 +Wizard\PolicyCollectionWithTypeCreator.cs Wizard\PolicyCollectionWithTypeCreator.cs 8836a3b0826ed5b0120e3353aa755a146f037e989b76d70e534aea595817bdba 0 +Wizard\PracticeAISettingData.cs Wizard\PracticeAISettingData.cs 59f4b1180f859de742f31f4af61dd7997d9f5d0e09d0f15c605586a9d6d732f0 0 +Wizard\PracticeAISettingDataSet.cs Wizard\PracticeAISettingDataSet.cs d718d5d948ff6fb0a57614b84d7f11a04c99bfcf099c6f3916e56522017f22fc 0 +Wizard\PracticeData.cs Wizard\PracticeData.cs 46f8546a0b0ad4fa7e383db8ebae71f94f8e7489336e2cc49150984086ea02a1 0 +Wizard\PracticeDataMgr.cs Wizard\PracticeDataMgr.cs 8807b1c5f3579893c86becdab6748170b0f0d421645b3786291a70eccf7651ba 0 +Wizard\PracticeDeckInfoTask.cs Wizard\PracticeDeckInfoTask.cs 38fa87c840d197ad9aa94bd147f129c4a3f5799b1187d51b39ed770971b6433c 0 +Wizard\PracticeDeckSelectConfirmDialog.cs Wizard\PracticeDeckSelectConfirmDialog.cs 13f8bbdef277832992bdeb7600f8d0bfa2dee1e4d60e3585b182b72c35fa725c 0 +Wizard\PracticeFinishTask.cs Wizard\PracticeFinishTask.cs d10192570f5b7a64781d5e092dc30b83c6959fea2af08b630521977ae9c6b197 0 +Wizard\PracticeInfoTask.cs Wizard\PracticeInfoTask.cs 9ae35a2d3365fe424242204dadc54f4238f4adffdfe630a16d81126cabeb91db 0 +Wizard\PracticePuzzleBattleFinish.cs Wizard\PracticePuzzleBattleFinish.cs ed2e79308d9c0bf875285fae6dd3e7c0008d348f70b8b9b4515823bb30f7a046 0 +Wizard\PracticePuzzleBattleStartTask.cs Wizard\PracticePuzzleBattleStartTask.cs bdcbb6d0b03d007e52ef3119fbee18375348aa9d3a1d45437d700978c63eaa35 0 +Wizard\PracticePuzzleData.cs Wizard\PracticePuzzleData.cs dd1450b0ad2e2fe40e000e13a683e2a16e6a1e16e7713918dc609916c841e526 0 +Wizard\PracticePuzzleInfoTask.cs Wizard\PracticePuzzleInfoTask.cs c373278cddc19d7fb58a31f787ab0a8d62944ec3da434ee9ab597109a4e832ad 0 +Wizard\PracticePuzzleListTask.cs Wizard\PracticePuzzleListTask.cs bef9de12e7f2e7d682dc8d5cfe6e53b47b2244c28672d69ad9c0fa34775b8797 0 +Wizard\PracticePuzzleMissionData.cs Wizard\PracticePuzzleMissionData.cs 47003f300e5cf92034b000af42ec55b6d8797551ff78779f988cf4fb444b3969 0 +Wizard\PracticePuzzleMissionDialog.cs Wizard\PracticePuzzleMissionDialog.cs b6472a0aa64ff4caa64a1d4198e2f23d1cc76f3772d6814643660eaad3dbc116 0 +Wizard\PracticePuzzleMissionListTask.cs Wizard\PracticePuzzleMissionListTask.cs 3733a8ea34036488c322f4d3f625c67587be1a1b37e17ae8638cd2ec4e7d998c 0 +Wizard\PracticePuzzlePlate.cs Wizard\PracticePuzzlePlate.cs 8e6354d1ae67cf1e5e6b1556c105e182fe69ef764d71fc2eec3dc4d12afdbb95 0 +Wizard\PracticePuzzleUI.cs Wizard\PracticePuzzleUI.cs aeadd06a59ad34917b6d49b08b7e588d6418b60c480854b398f83f1ab089a1bf 0 +Wizard\PracticeStartTask.cs Wizard\PracticeStartTask.cs b21e7c3a415255790de896ca890c7ed72dd47a325b77e6e5d1d6d7190a068e7e 0 +Wizard\PreRotationFormatBehavior.cs Wizard\PreRotationFormatBehavior.cs da6d17ff9cab5d432f8c421d9a52ebb059ceae41c37920f366b2262e5a1e9592 0 +Wizard\PremiumCardConversionDialogParts.cs Wizard\PremiumCardConversionDialogParts.cs ef813540d655bcf33bcdf994acfdae8185dc8dcf85976520da2f394c6125733a 0 +Wizard\PremiumCardConversionTask.cs Wizard\PremiumCardConversionTask.cs bd38fcf046c19a6950f9dd0857065a55e01e6defd496a53413bc0aa2aa8d2142 0 +Wizard\PreprocessTagCollection.cs Wizard\PreprocessTagCollection.cs 2f22016f344bf7a05815f0d60d7721a9ecaa1094dced3c3007c77b4372cb2368 0 +Wizard\Prerelease.cs Wizard\Prerelease.cs f23633dee2b1e4a45df176a8c31f1beb888e1ed536b7b3cd8dfb050c51612595 0 +Wizard\PrereleasePurchaseInfo.cs Wizard\PrereleasePurchaseInfo.cs 8876aa1902f358c9eda8c46c5911a45e8d9a836a900d9a4b0d437149112dcf37 0 +Wizard\PriorityTagCollection.cs Wizard\PriorityTagCollection.cs 1c9656863a2740157fd0737e77528180d66e246cd672a820d6a94c2d38429693 0 +Wizard\ProductDetailPlate.cs Wizard\ProductDetailPlate.cs 5195aeeae2fdb5f0cb9675643a7b4cfc6766fcaf62ea295d289db63c213bf35e 0 +Wizard\PuppetAttackParam.cs Wizard\PuppetAttackParam.cs dbfa38756de17fa26e09165c070c91640812540465c66dac3592aa0582594127 0 +Wizard\PuppetAttackTagCollection.cs Wizard\PuppetAttackTagCollection.cs e284ebdeb61706237dbf83d8b7fb0145f703aa375cd170e5f39b7af2d43db446 0 +Wizard\PurchaseConfirm.cs Wizard\PurchaseConfirm.cs 91ab7d0a239b6ddf305b5395e8cb058c5714a0b6a5d4e1534990e912ec2af0d2 0 +Wizard\PurchaseRewardDialog.cs Wizard\PurchaseRewardDialog.cs 66c1260e844322ac7c786ebc6ef10dcd3390fea3724c38abd2898aa4961917cb 0 +Wizard\PurchaseRewardInfo.cs Wizard\PurchaseRewardInfo.cs 68266e03484b149bbe1ec5d0d26ca99f5377e33cf6194af6c332ae021d96c925 0 +Wizard\PurchaseRewardItem.cs Wizard\PurchaseRewardItem.cs dd7e30d290725cf9a7f1daca7a5228c09c0191f32a9078f224a33564f651b2e5 0 +Wizard\PuzzleAnimation.cs Wizard\PuzzleAnimation.cs d39d28b1116f056e57c19e9e18249f9989c6907b6e6413451d343e2127fe1746 0 +Wizard\PuzzleBattleMasterData.cs Wizard\PuzzleBattleMasterData.cs d1724a7755e6ffd48ced04db5853dbfec787b6190c235471eb96b8ababf766c0 0 +Wizard\PuzzleHintDialog.cs Wizard\PuzzleHintDialog.cs 0366b1c5e455351352c856dbd371920d954ed4d6a922560bbebef0eabefcecb5 0 +Wizard\PuzzleQuestData.cs Wizard\PuzzleQuestData.cs da6724883671e227cfd3b5b8eb64af071bed3ffec7ecb95e84710b18db96b901 0 +Wizard\PuzzleQuestInfo.cs Wizard\PuzzleQuestInfo.cs 17e215c00ac4d2ec648d5a3c7a70393fea406889685c88434b6d526571811f7b 0 +Wizard\PuzzleQuestSelectDialog.cs Wizard\PuzzleQuestSelectDialog.cs 2f297d0ea4730615c2657a05777994e224732fe8003c9e231b307d5eb8b500ba 0 +Wizard\PuzzleQuestSelectGroup.cs Wizard\PuzzleQuestSelectGroup.cs 825f716ed1886765d08cdc9d43e623e98fc1db4a092f0b27c418e2af744fba6f 0 +Wizard\PuzzleQuestSelectItem.cs Wizard\PuzzleQuestSelectItem.cs c0b5b5b27d90e719673e39c46ff500c503e0516c439c0bfe088804d511bb7687 0 +Wizard\PuzzleQuestStatus.cs Wizard\PuzzleQuestStatus.cs 080f93e95b6fb21f06ca4e7874ef9050bd4bcb62338f5c0e12b05de722cecca9 0 +Wizard\PuzzleUtil.cs Wizard\PuzzleUtil.cs bafb6cdbfa6a9e1878ac22eecbe6c6fab77c4998dba4f4a7893813cfbb39e5a7 0 +Wizard\PuzzleWinConditionDisplay.cs Wizard\PuzzleWinConditionDisplay.cs 7239697f83889fdb99f607e6ebdf7236178cf02a6c0f07b4d038e95b7f35a546 0 +Wizard\QRCodeUtility.cs Wizard\QRCodeUtility.cs c8af515564303b95a73435f9cc6e227eab7869005b298fde2a9792aca85efbc4 0 +Wizard\QrCamera.cs Wizard\QrCamera.cs 9c0525dd8f9b1aadaf191037f88055d5c65b3724def453aa8e700845a8e20b53 0 +Wizard\QuestAllConfirmDialog.cs Wizard\QuestAllConfirmDialog.cs 797160bab5654b592f9bd5e9390e42008336c0ba9e0aeea1aabdab7a0e435bed 0 +Wizard\QuestBattleData.cs Wizard\QuestBattleData.cs 2c7b710d636f9f2112f6216b78f6516f17e573803db9277c03e2d04200b2e23a 0 +Wizard\QuestBossData.cs Wizard\QuestBossData.cs 54bea11a04848ecbba06458cc3fb23ee38eb80ffe096871a490c3c3e10730f7a 0 +Wizard\QuestCampaignDialog.cs Wizard\QuestCampaignDialog.cs ac77934edc832b5b3d82459ea80b834bcbb2448c26882d1c8bcf2510c4a881aa 0 +Wizard\QuestDeckListTask.cs Wizard\QuestDeckListTask.cs 7c35ec8edc89aaefdab8f908cdf6ec9067a7635d9d89fd135783e8226d348f1c 0 +Wizard\QuestDeckSelectConfirmDialog.cs Wizard\QuestDeckSelectConfirmDialog.cs 34de87600a1350e054bb2a695fc14cfe75babbf8c368ec4f722a261199ff3891 0 +Wizard\QuestFinishTask.cs Wizard\QuestFinishTask.cs df06faf4d119a9aaccbefe6a28b34215e975e134cb59a8a5e22da5505e21e1ed 0 +Wizard\QuestGaugeItem.cs Wizard\QuestGaugeItem.cs dd1dc88a5b96dcf53a47bfead6786c42c20b7b422547f9946b5213d534309b7f 0 +Wizard\QuestInfoTask.cs Wizard\QuestInfoTask.cs b6da4bc6326ab5b8a11367cd77cc00a563847486bd62528ec1badcd71451e271 0 +Wizard\QuestItem.cs Wizard\QuestItem.cs 6f873d6290ba0122b8c6789fb23e5ba9ec1a602bbe11e8fe50dad5eff8b712cd 0 +Wizard\QuestItemBase.cs Wizard\QuestItemBase.cs 8f6330477afc45f7c23044fb7fb0aa5309a26cac11e74c3c70c76cdffcc7c664 0 +Wizard\QuestItemTitle.cs Wizard\QuestItemTitle.cs d0f78fd42450feff168cc3777d1fbb4009d4ca135884099df42b4ebacb86d9b0 0 +Wizard\QuestLastUsedDeckSaveDataManager.cs Wizard\QuestLastUsedDeckSaveDataManager.cs 2e6bd310224e1f19565a6d151065abfe15b42e7de0501843728061bc5de63c07 0 +Wizard\QuestMissionData.cs Wizard\QuestMissionData.cs 66851df2ee770b75efee5a16e28a3e0dc23fda420f4c5888746af055c258a2e9 0 +Wizard\QuestMissionDetail.cs Wizard\QuestMissionDetail.cs cb9bca006c7b2cf01d8b52f79bb8309cf2df03b52b0fd9ba989e811343cf3938 0 +Wizard\QuestMissionInfo.cs Wizard\QuestMissionInfo.cs b053f2da261b643f34f07b3407ae56fe46d52303c179badc9fc93a4d0a153170 0 +Wizard\QuestMissionInfoTask.cs Wizard\QuestMissionInfoTask.cs 16dddc339f90798b09b3293c9251b541f4c826f2c27b52536d3cf46d624fa744 0 +Wizard\QuestOpenInfo.cs Wizard\QuestOpenInfo.cs c64408d97e06f18f99917bdccf9065eb80124544e412b2bb35c16e33e419f6ce 0 +Wizard\QuestOpenPuzzleDialogTask.cs Wizard\QuestOpenPuzzleDialogTask.cs 3aed83f56b6aeebb345d6836cdc86fac3ae19cae47223f3ae8c7bd9e91d9c740 0 +Wizard\QuestOpponentData.cs Wizard\QuestOpponentData.cs 85b29720e35ba0937b5bbd8bfc28dee787a7945bb0aa1cc829c668069f633daf 0 +Wizard\QuestPointConfirmDialog.cs Wizard\QuestPointConfirmDialog.cs c5c4b1e31fe40f7de6fa17f9d16ef66074d1fdcd6ddfc4128a57dc6e8d274f38 0 +Wizard\QuestPointInfoTask.cs Wizard\QuestPointInfoTask.cs d536b67d78c30f75ac3727c4b07d9aa06ab53121ffebe9c45c1f00e6f75eee5b 0 +Wizard\QuestPuzzleSelectionButton.cs Wizard\QuestPuzzleSelectionButton.cs 856cba9ac3c534d254d3d3f444cc0c6c489e6146984a12b7fb870a6d98a881e7 0 +Wizard\QuestRewardInfo.cs Wizard\QuestRewardInfo.cs c0d8c01dd78824d62c5f145bea4141a576db63d39ca2230e35eb41fe48342e97 0 +Wizard\QuestRewardReceiveAllTask.cs Wizard\QuestRewardReceiveAllTask.cs 8a176374c8b8e0de2c80c6baf26cb7a13435dc036c82ad4f3afd528126478d75 0 +Wizard\QuestRewardReceiveTask.cs Wizard\QuestRewardReceiveTask.cs f3e8b6c06cf492740d439122e2fbb137c1e3a98d046d1f8ad57badabd4e86046 0 +Wizard\QuestSelectionButtonBase.cs Wizard\QuestSelectionButtonBase.cs a6376f737ad9c5e89199eb572562d3e85f8537bf4b0e349df1d95462cb8f2230 0 +Wizard\QuestSelectionButtonData.cs Wizard\QuestSelectionButtonData.cs 63f83ab58371f7a90664d831e88932b1c6ef39b5e93b99308aecd0d87fe381ab 0 +Wizard\QuestSelectionPage.cs Wizard\QuestSelectionPage.cs 4a4a0e23ca749a3e634e45fd0edab5c1a4902651f56b982a057136a705940685 0 +Wizard\QuestStartTask.cs Wizard\QuestStartTask.cs 9bf4ab93c0616d945f16995bd3c0426b1b21766091e7e459f2cccf488b645b53 0 +Wizard\QuestTweetTask.cs Wizard\QuestTweetTask.cs 19335e16a89c3ab8033ff682a36210c12772a6de1b14b56139e69842d22897fa 0 +Wizard\RallyCountPlusTagCollection.cs Wizard\RallyCountPlusTagCollection.cs 4925407e467310dbb38e525aa9a90f4dede317572f982adf5d8fc273bb6ade51 0 +Wizard\Rank.cs Wizard\Rank.cs 1bbdd3efaf38a8a9e587ae8094b0db792cb81d1df7cf63252f739347b1803cba 0 +Wizard\RankBattleDoMatchingTask.cs Wizard\RankBattleDoMatchingTask.cs b111a9e8df73fc71fe09e65e120ff482075f9591e7bdb500e632cbc021dc3ddd 0 +Wizard\RankBattleFinishTask.cs Wizard\RankBattleFinishTask.cs 4a7bb61041265a910d2324bde0435b0def1b3acbea47570b25b019c1ddc34e99 0 +Wizard\RankMatchAISettingData.cs Wizard\RankMatchAISettingData.cs 210b88babcc6daff656bdc2fe24edcd0a9556351f2b147d5f04a37f52a770f42 0 +Wizard\RankMatchAISettingDataSet.cs Wizard\RankMatchAISettingDataSet.cs a0dd289c49ede4aac584291fdeeb060cc0c9b70c4e1a123cad6cab216ea2de55 0 +Wizard\RankMatchEnemyAI.cs Wizard\RankMatchEnemyAI.cs 6f70b2ad24fb6f304d55db4791ce68fc2ea4359648eba2c0d609075d4fd7b7d4 0 +Wizard\RankWinnerReward.cs Wizard\RankWinnerReward.cs eaca300be07defdbf22c9792d9697997fbbf9b0f162a3fabc535498f7c28e0da 0 +Wizard\ReanimateBonusTagCollection.cs Wizard\ReanimateBonusTagCollection.cs 6ac7d8043c9a315e74aa1533f36f00468f432fb4043367c6c7f6881ca06b9e34 0 +Wizard\ReanimateEvoTagCollection.cs Wizard\ReanimateEvoTagCollection.cs a266712e3ded29167a94fd881ee344b35eaf3eaad8f1359736d2c76ee0e02881 0 +Wizard\ReceiveTurnEndToJudgeResult.cs Wizard\ReceiveTurnEndToJudgeResult.cs ef2f76201ccef6b81ce3b2ff37016bc839e7126f5772524f74d114d3d826e6b9 0 +Wizard\RedEtherCampaignMissionLabel.cs Wizard\RedEtherCampaignMissionLabel.cs c6d10bcb57880225ae980b403b360e6bd58afd27be12395617fd07191d0b5c0e 0 +Wizard\RedEtherCampaignPanel.cs Wizard\RedEtherCampaignPanel.cs 0e5e7c126acad45c93499b9b2279a684b556f0157179d563c051cb2c3cabcc88 0 +Wizard\RedEtherCampaignResultData.cs Wizard\RedEtherCampaignResultData.cs 83dcda42b623e04deaad677b7a127eb8fc5a3b762d8969ed3d32e2bd4ec92a90 0 +Wizard\RedEtherCampaignRewardData.cs Wizard\RedEtherCampaignRewardData.cs ee29767b469b128fd64232d415baf1a34b315478dd268f4fa59a9774b5789d3b 0 +Wizard\ReferableVirtualCardBuildParameterCollection.cs Wizard\ReferableVirtualCardBuildParameterCollection.cs b04760995eddf63a9f8f7dcc1ca3064092bc880a67eb1ba7f808e77dfd7cf829 0 +Wizard\RefundWarningDialog.cs Wizard\RefundWarningDialog.cs 042a3919eb4fd59c607622b816a36703f76e81423feb9d886f1bf13435ca1ca3 0 +Wizard\RegionCodeUpdateTask.cs Wizard\RegionCodeUpdateTask.cs adb67c257ea42e034ce5f0b6e0c3d9595bc6bd0fe1326fbd9350e3c309dc1fcd 0 +Wizard\ReincarnationSimulationTagCollection.cs Wizard\ReincarnationSimulationTagCollection.cs 863e9c6fd3b131c9564048419b2af5967689b9389fb803c8bc4b079185a578b0 0 +Wizard\RemainTime.cs Wizard\RemainTime.cs cad4a6d7241987deccf91cab20b07146a393262888f556743b959d015c58c7cb 0 +Wizard\RemoveByDestroyTagCollection.cs Wizard\RemoveByDestroyTagCollection.cs 6bb0f29c81a74b7bab7c062244773c4a7c366ea76836db7ca5abe860d097c38b 0 +Wizard\RemoveSkillTagCollection.cs Wizard\RemoveSkillTagCollection.cs 4b31000c33a964929a361f964499aeddd2e884862600c4488c86d49e8a21120f 0 +Wizard\ReplayContentView.cs Wizard\ReplayContentView.cs 60ca9b5671ddd42e7fc6845b9504d09b415ebae5bbb4e35a5c833bc1b4941a8d 0 +Wizard\ReplayDetailTask.cs Wizard\ReplayDetailTask.cs 8cd27487c60b2d8afe6de2f2775198d0e1a7300364ed9eacd6403fc29c9f1d2c 0 +Wizard\ReplayDialog.cs Wizard\ReplayDialog.cs 9a367698f7e594b3a63f9b3422c61b6899ade748e1af06e4379f2b61dec52f80 0 +Wizard\ReplayDialogContent.cs Wizard\ReplayDialogContent.cs 9daf2784330e077402fdfadacdb13f4b54ec13b4f2125c8e1a81fc38833db219 0 +Wizard\ReplayInfo.cs Wizard\ReplayInfo.cs c1a4ac59b3c2867dee7d40b8756492ddb6418bb5895a96e663eb0ec73b36bea4 0 +Wizard\ReplayInfoItem.cs Wizard\ReplayInfoItem.cs f33d8625be78c3ff5edad57e4a9350f2721677352b1e637dde6f604c37db2471 0 +Wizard\ReplayInfoTask.cs Wizard\ReplayInfoTask.cs c3a2dd28d4b414bfb496d977c1caa207c9b8c12b3d2e601d001ca0868094d96c 0 +Wizard\ReplaySkipAnimation.cs Wizard\ReplaySkipAnimation.cs 028d4fbc5d2ac366f5a90c86245482b36f37990c22eedd1f9b1109b5e673d346 0 +Wizard\ResonanceTagCollection.cs Wizard\ResonanceTagCollection.cs 18e5ba29b08bf24bdf9b6f2078c6180099c9d468b1ab5c1fa05a0452199169ad 0 +Wizard\ResourceDownloadCardFactory.cs Wizard\ResourceDownloadCardFactory.cs d7685410348d88f3c7bbe387fe792432236a3e34c5a49da9519d64a04ee13080 0 +Wizard\RewardBase.cs Wizard\RewardBase.cs ea35849169b3987c450abbaece54578234821d644bf3289fc0307fd8ca14fe23 0 +Wizard\RewardConfirmDialog.cs Wizard\RewardConfirmDialog.cs 021ab951cdc0d5415fa633e3ae3baa4d455d7f58effe7cc50ab607cd366cc111 0 +Wizard\RewardConfirmView.cs Wizard\RewardConfirmView.cs 10b0861af3584726436dbc8f2d1881984455c98878e9fe32731e5d73e2966e8b 0 +Wizard\RewardConfirmViewItem.cs Wizard\RewardConfirmViewItem.cs a610a6e1717c0e451e02d3aa855904d94cf7402180f65380e09ff8ef9119b623 0 +Wizard\RoomBattle2PickDoMatchingTask.cs Wizard\RoomBattle2PickDoMatchingTask.cs 97c2eeaa9c42d136a24fb6a1887aa61231a8ee16698e9c90bf98090d0b0dab36 0 +Wizard\RoomBattle2PickFinishTask.cs Wizard\RoomBattle2PickFinishTask.cs 916d9096fe82c2e9b7c50bcddb74713a1812a98c0a9b7c5972f04c67dbc8f8ba 0 +Wizard\RoomBattleDoMatchingTask.cs Wizard\RoomBattleDoMatchingTask.cs 9fb411d45b8c8e4f9858cc7ec9903fccc06f87ddbee0b923cbaf4730c3240bf0 0 +Wizard\RoomBattleDoMatchingTaskAvatar.cs Wizard\RoomBattleDoMatchingTaskAvatar.cs 0dff84a1eff96c8b810cb853bcb02fabb9f979471792e711510cd68686e49132 0 +Wizard\RoomBattleDoMatchingTaskHOF.cs Wizard\RoomBattleDoMatchingTaskHOF.cs 7686d29846b7c8da4b4ebc4915761081f4f712a7583e2b06d221bc88a66b64d1 0 +Wizard\RoomBattleDoMatchingTaskWindFall.cs Wizard\RoomBattleDoMatchingTaskWindFall.cs 1da0a8d237decf92e5c9a678b805391aea8684978e7e15b0992b239db2b2e5a3 0 +Wizard\RoomBattleFinishTask.cs Wizard\RoomBattleFinishTask.cs c4fc3101dbb2ded83ca554ceeea63a14c04812bb71cc3ce04b19fde32fb623c4 0 +Wizard\RoomBattleFinishTaskAvatar.cs Wizard\RoomBattleFinishTaskAvatar.cs 6ba849d2b1e50fca155fa795774bab8674a3036922ce4d8b4669b376ef1c0ab2 0 +Wizard\RoomBattleFinishTaskHOF.cs Wizard\RoomBattleFinishTaskHOF.cs e023260976a1856c0387cd9a55d025c557e7df4a833220095708885c672e6ec6 0 +Wizard\RoomBattleFinishTaskWindFall.cs Wizard\RoomBattleFinishTaskWindFall.cs 76b15e866a28db1664f4116da0ddb459071e11146b99f89b292bae34b2a7618d 0 +Wizard\RoomBattleWatchTaskBase.cs Wizard\RoomBattleWatchTaskBase.cs cb37a3042a58d48a995f8bc37a39aa4f6bac980477f59eefe7817cea052b56d1 0 +Wizard\RoomNonPossessionCardCampaign.cs Wizard\RoomNonPossessionCardCampaign.cs c2a0ac27c8f58890764c6733cac8d4c73ecb67b27ebf4a4d18db2022980b0de4 0 +Wizard\RoomRuleInfo.cs Wizard\RoomRuleInfo.cs 6ba79e521eaeba627b6ef48ac714180b870049479ed8690533f780c27c07cfcf 0 +Wizard\RoomTwoPickApiVariation.cs Wizard\RoomTwoPickApiVariation.cs 5799f31e14cab116c99dbb6e694270075d0a4345fd03a21c84596e93d79991c7 0 +Wizard\RoomTwoPickMultiDeckInfo.cs Wizard\RoomTwoPickMultiDeckInfo.cs 162e9f436a85bbde551fe7b19f140aa0e2535c62a92a1736ba4aa5b7e6d502a5 0 +Wizard\RotationFormatBehavior.cs Wizard\RotationFormatBehavior.cs b844d354970ff3f6967aca80a4dcb835831592dcecf7ea309081d373f5310eb9 0 +Wizard\RubyText.cs Wizard\RubyText.cs 603c0127a9a30f36afd18e894bd0f14eb47c07dcbf2dc70795aee7febc873466 0 +Wizard\ScenarioPart.cs Wizard\ScenarioPart.cs db5f86ccf89a525b0b23a19f5e23f7d3b924d56c185ddb5dffba30ea6da18e67 0 +Wizard\ScenarioSummary.cs Wizard\ScenarioSummary.cs fc6d5aeac36bf313b09f4c52bdf0e288286f9abc641f5598bf27b7813b212302 0 +Wizard\SceneTransition.cs Wizard\SceneTransition.cs 3858aa170b79fe0d46824439ee34bd85865732bc0c96dfa9bc8b37f5a28a0670 0 +Wizard\SealedBattleDoMatchingTask.cs Wizard\SealedBattleDoMatchingTask.cs 7d146127c5d37576d6ec7a85b8012305b29cb72fcbf409b06e547bec75b5de11 0 +Wizard\SealedBattleFinishTask.cs Wizard\SealedBattleFinishTask.cs 16482a698b71345f8077e131c9896377cab92856a2c31f8b4e584a5c4ab25ac3 0 +Wizard\SealedCardInfo.cs Wizard\SealedCardInfo.cs cce1286ee19cba2f723c2ccc551dd0d86ce57e4cfe48dc17364166cb94f84cd7 0 +Wizard\SealedClassInfo.cs Wizard\SealedClassInfo.cs b767bc9d34b118b82729ce158dc1f52ab666abde3c80336bad1c6d4268ab1f22 0 +Wizard\SealedClassSelect.cs Wizard\SealedClassSelect.cs 9c654ebff2da9191e3b32d8f5df4ad9db3d74d9ea08e05d5a7e57c6e116711a5 0 +Wizard\SealedClassSelectConfirmDialog.cs Wizard\SealedClassSelectConfirmDialog.cs 4732bca48b8de65649356eebca0e62782dcb816fc428bb8d3c7855677a8b8a18 0 +Wizard\SealedClassSelectLoadRequest.cs Wizard\SealedClassSelectLoadRequest.cs 20442e8e544239342ab6b250e1dc6b6c67eef312198539c34e76a4ec0e748476 0 +Wizard\SealedClassSelectObject.cs Wizard\SealedClassSelectObject.cs bf7c8699e094f8ada96dc42dbee4fa0f0adc9aff3c97f57fb96475028cd342ab 0 +Wizard\SealedClassSelectObjectInitParam.cs Wizard\SealedClassSelectObjectInitParam.cs c9c1822be5a6c449365af24c723993ff07b9a03f061200be3f696997c1b9ebc7 0 +Wizard\SealedController.cs Wizard\SealedController.cs 36eecb63551f28a57b21ba01b38cf385d241af0d89c9ea4d6bd2cde359cdfc8d 0 +Wizard\SealedData.cs Wizard\SealedData.cs 64eef0afbb678d29b18696e41cf2ea13b2950eb9392154f9123ac1d6a554ec70 0 +Wizard\SealedEntryData.cs Wizard\SealedEntryData.cs c8bbd9d82b200f0d2ce15fbc40fb52f4a369ebbdcab415fee9a2f33b4334dfc5 0 +Wizard\SealedFinishTask.cs Wizard\SealedFinishTask.cs 7fa003f442f64df3c89f2185af01e4fa7b58fbc72958b62cefd2e3f9f5b2913e 0 +Wizard\SealedFormatBehavior.cs Wizard\SealedFormatBehavior.cs 22997985fd859e05aac4f25a208fdfcfda552e144ad99477c1217ec042d1c62c 0 +Wizard\SealedGetMaintCardListTask.cs Wizard\SealedGetMaintCardListTask.cs ccdd5a30df122c458c1cdcc8279bcacb6a578caee2f9facb3265f10da8abdfdd 0 +Wizard\SealedLobby.cs Wizard\SealedLobby.cs 79a79c33dfb0c600d1b06b52a91a643de97d0db5491963c34fb89d04b093d41f 0 +Wizard\SealedMyPageResponseData.cs Wizard\SealedMyPageResponseData.cs e4532941557173ee81bd1262fd7883720e7170ec80d739943d719c11c9ec0ff5 0 +Wizard\SealedRetireTask.cs Wizard\SealedRetireTask.cs cf6d405f2fb1313ac510338ae3c707153f8f11d5de310bbcd0f642ce57d6820c 0 +Wizard\SealedSelectClassTask.cs Wizard\SealedSelectClassTask.cs 1c2094251d6fe9c41355add5bc6dc874c3ddcab729049fa2180f4e0682db147c 0 +Wizard\SealedSelectPhantomCardTask.cs Wizard\SealedSelectPhantomCardTask.cs 956f88ad7a58fe5e32fc06d41feaa49a1d7b4a115bf73fd30e42d25be191d041 0 +Wizard\SealedStepFuncs.cs Wizard\SealedStepFuncs.cs 681c73c79ee719bccbbe71160299bfdafa2ba531d8b73f6bf2efb1a37d2a87d3 0 +Wizard\SealedTopTask.cs Wizard\SealedTopTask.cs 89b8266bb15da762899461ad77502b6da0783adcdd85ff8bc4f3415e7a977993 0 +Wizard\SealedUpdateDeckTask.cs Wizard\SealedUpdateDeckTask.cs 0a0d61bf2bdb7a42e42a14eb9011819386b067b02c8bc5fb3d1f335e9a2ad36e 0 +Wizard\SecretBossDeckConfirmDialog.cs Wizard\SecretBossDeckConfirmDialog.cs 278f242c93552a8308d4f2e7d3c87fa7fbaa35d4e99e7a079462cbc6a8791fec 0 +Wizard\SecretBossInfo.cs Wizard\SecretBossInfo.cs 5ee84152be88797d9d5147965973aad8011e7ad23e07bf2c2a4df512012f99b9 0 +Wizard\SelectBuyNumPopupBase.cs Wizard\SelectBuyNumPopupBase.cs ecea78a81f059d7e3d7bf18e05ef61bfa39a85e0b72b0f53991e8edbf498c90e 0 +Wizard\SelectCardPurchaseConfirmDialog.cs Wizard\SelectCardPurchaseConfirmDialog.cs d903d5c304091a75730d89c2762f51c1c1f9bc8d4b6de53405e6a037a08c7e40 0 +Wizard\SelectRandomSkinButton.cs Wizard\SelectRandomSkinButton.cs 2a24f318941b32bd94e126c86a6f4821552be30fb57e177d369be5f845e70c86 0 +Wizard\SelectRandomSkinDialog.cs Wizard\SelectRandomSkinDialog.cs 8b623a5b03901b780465b88bd660fd5c5bcd46c5f6d5cf0ab7629e88390f035c 0 +Wizard\SelectSkinCardDialog.cs Wizard\SelectSkinCardDialog.cs b4843278a392d9b14c898f0918ebdd7d5ad3e76eec457071d2c91739d611cdfb 0 +Wizard\SelectSkinCardInfo.cs Wizard\SelectSkinCardInfo.cs 6011046eb19f8a1d354683c144f769a09f56ff42f43a4d4245aeb1beaac72fa2 0 +Wizard\SelectSkinCardPlate.cs Wizard\SelectSkinCardPlate.cs b2f7078b56691bb3b8f2829af9d48e52c4ecd077fef2f705a63d27412749a125 0 +Wizard\SelfAndOtherEvoTagCollection.cs Wizard\SelfAndOtherEvoTagCollection.cs dcd522c9567e370f36d467501d30d5f7e8f0e570f6ba60272c95b014705198de 0 +Wizard\SendTraceLogTask.cs Wizard\SendTraceLogTask.cs 60f0d6ff3011c0a5248d1e1b189584ba4c285d9d4d789ebc527c317c241dbe74 0 +Wizard\SetAITribeTagCollection.cs Wizard\SetAITribeTagCollection.cs 69b942da626b35c3f41096f752dc2456adf3315ed15777644baea2fe80f87f7a 0 +Wizard\SetReferenceIdPolicyCollection.cs Wizard\SetReferenceIdPolicyCollection.cs 8cf3171c99f0bfea8fb69de902e587a5ea113a49c935b269be49f001c7f4c288 0 +Wizard\SetReferenceTribePolicyCollection.cs Wizard\SetReferenceTribePolicyCollection.cs 38b4892c251736b3b2aa706a8d6d96d6584b25f83a5764345ff57f4399a1cff3 0 +Wizard\SetUp.cs Wizard\SetUp.cs 200f871c2f6ca9c5f4cfa4b32615ce99505c38edd26ec36d6250e2a7869b6bce 0 +Wizard\ShopCommonRewardInfo.cs Wizard\ShopCommonRewardInfo.cs 1362db5cce7666eec06fa52b47a631df8de00dfaf4c89a8b329f4c5d081f3b75 0 +Wizard\ShopCommonSaleInfo.cs Wizard\ShopCommonSaleInfo.cs 11a36e1059fc7b22670cdd2358bbe89a80ff5d12cef5363535af0f1817b694cc 0 +Wizard\ShopCommonUtility.cs Wizard\ShopCommonUtility.cs 922f6d01f9b3c5dcaa093dc1e58d68e3a009998de49b130989e85611bf6f4546 0 +Wizard\ShopDrumrollScrollItem.cs Wizard\ShopDrumrollScrollItem.cs c929abe0ab0633c4a1d3c9db2502b7d599ef47cd50146a17b566d598ab939b93 0 +Wizard\ShopDrumrollScrollManager.cs Wizard\ShopDrumrollScrollManager.cs 74fb76307264f57d77e4d68ae067a6c94e544c1a36f799649be1871f61ec51de 0 +Wizard\ShopExpirtyInfo.cs Wizard\ShopExpirtyInfo.cs 93d265032ad665bb5b1752f8891e40cf0b2b7380def77a83298c9d7ef344ffd9 0 +Wizard\ShopNotification.cs Wizard\ShopNotification.cs 966f8941c585502d2468cc62839e4d230f4d27d7ca4cf157f47a3582afd4208e 0 +Wizard\ShopPanelAppealItem.cs Wizard\ShopPanelAppealItem.cs 91938915d1596a81669ad732ccf0ab85ca7588fe3b884193475e778c4f7a19f4 0 +Wizard\SimpleScrollViewUI.cs Wizard\SimpleScrollViewUI.cs c09d0cd5935fa0157c07d98226df86270f51d94cccc6e66d0fca4a901f868899 0 +Wizard\SimulationAdditionalActionInfoSet.cs Wizard\SimulationAdditionalActionInfoSet.cs c20debde6f1f635e218fc5027f7b2939a6160e86a13c2166efac15732e1bee81 0 +Wizard\SimulationResult.cs Wizard\SimulationResult.cs e7664bfdf29cce647808d1fa5989de992affa051e552a2fbe4c627ccc37c55f4 0 +Wizard\SimulationSetting.cs Wizard\SimulationSetting.cs 77cdc42ebe248d32c80459d163910035dd3b2a20383025b8fbd4099697926f45 0 +Wizard\SkinProductDetail.cs Wizard\SkinProductDetail.cs 62ba878fd680385058defd2b206b2a194f21f2eeebbebf21bef478afb0d9aef5 0 +Wizard\SkinPurchaseInfoTask.cs Wizard\SkinPurchaseInfoTask.cs 3454d2cf87c68b916cb0f31f007cc06b3a06c3548eee7899c177d90c36e357d3 0 +Wizard\Sleeve.cs Wizard\Sleeve.cs 7f871310a61810e786bb5daeb65e994c5deb2f1c2f6269065892a4d325553e80 0 +Wizard\SleeveBuyTask.cs Wizard\SleeveBuyTask.cs 0d00a58104bd404cfb18e3a8354186f94adc71158f214b52c388b08e808d4470 0 +Wizard\SleeveCategory.cs Wizard\SleeveCategory.cs d636241391f0421028aec23fa83b44af32beb01a3af5bc14469fe076b8016a38 0 +Wizard\SleeveMgr.cs Wizard\SleeveMgr.cs 65624ba278a3238a02189445cf03fdf423d1e8985338d938a389c002e5bbf497 0 +Wizard\SleeveSeries.cs Wizard\SleeveSeries.cs 9a3658f9b77625a36c9ce51c8797c3fec4f8a9d48b541e828a372b71490b45ba 0 +Wizard\SmallResourceSelectDialog.cs Wizard\SmallResourceSelectDialog.cs bc259a0a322e2a85f27efc8e8e0639b84eb72d0cf1937426d0a2101ce82bb6d0 0 +Wizard\SoftwareReset.cs Wizard\SoftwareReset.cs 34b932e97699b44f002a33ef3d500a42d2c91473bc726c7a5e1baed65a44d2af 0 +Wizard\SoloBattleEnemyAI.cs Wizard\SoloBattleEnemyAI.cs c6816cba54b636abfb717276a9dc7b11a020e032552e8d81e724d377e87459f9 0 +Wizard\SpecialCrystalTaskInfo.cs Wizard\SpecialCrystalTaskInfo.cs c6bd836740e10fb7c1747712caa4751c052f753c9b35dfe6362d7d36f1c2cec8 0 +Wizard\SpecialTitleAssetBundle.cs Wizard\SpecialTitleAssetBundle.cs e66f46da8066697b5f1ad0ae64808ca6bbbdbd93d0a17cabd5bebebe7c635c13 0 +Wizard\SpecialTreasureInfo.cs Wizard\SpecialTreasureInfo.cs 7a11bde523e27e58b1ed032703c755e76da0a85e0b1919f7cdff673f440731d1 0 +Wizard\SpeedChallengeInfo.cs Wizard\SpeedChallengeInfo.cs 9fd6697d1c55746b451fa07809d610d6ba1251ad6b723ece688a3b04fc996876 0 +Wizard\SpineDisplay.cs Wizard\SpineDisplay.cs ea318e1a3fc12d23581101ef989a9d32d7dadcbb33a1104526b2cd7c9b8008b6 0 +Wizard\SpotCardData.cs Wizard\SpotCardData.cs ac20fd44447242b9ecc761f3b4acf3bb407f3ea542f48fb56926d2385cd3e814 0 +Wizard\SpotCardExchange.cs Wizard\SpotCardExchange.cs 40ab6e8cfa601cac24d61ee262c4715f40fdecb81f3b705b9458db57540c9592 0 +Wizard\SpotCardExchangeDialog.cs Wizard\SpotCardExchangeDialog.cs bb9eb3bed731bb46701d97f1951f7a10bfe8af3ce51cf88a87b1728b285bcc51 0 +Wizard\SpotCardExchangeInfo.cs Wizard\SpotCardExchangeInfo.cs f8441842f1c264887158a5e5fa5305830a11308af593bd4049893b9a9f54d17a 0 +Wizard\SpotCardExchangePlate.cs Wizard\SpotCardExchangePlate.cs 943fac1cde750532368f107b98903c6eeb5b6dfed972d2ac3b35692ee2111c1b 0 +Wizard\SpringPanelWithUpdate.cs Wizard\SpringPanelWithUpdate.cs c3d8b5959e4e102c40ae912beff6a25396811c1ae8453684ec48458a365fa509 0 +Wizard\StarterClassSelectDialog.cs Wizard\StarterClassSelectDialog.cs 3522461bbc4d0f73d1beb639b37213f68a9691ea3a344df56e34ff7ba75b2e4b 0 +Wizard\StarterPurchaseConfirmationDialog.cs Wizard\StarterPurchaseConfirmationDialog.cs b71ac292410e536bbdf302395b6b8584d500a40746167ad1ab885229cbfe2ecc 0 +Wizard\StoryAISettingData.cs Wizard\StoryAISettingData.cs 14402dc36fa4ae13f154c8110141087145efb387c94292f7a5102dd3b671151d 0 +Wizard\StoryAISettingDataSet.cs Wizard\StoryAISettingDataSet.cs 76693a53b4022593dd67cd8d08b41c2ab7647d8b3663176b13909ca0e6c11900 0 +Wizard\StoryChapterSelectDialog.cs Wizard\StoryChapterSelectDialog.cs 8641e53edaddaa635c44318d5969d85bde8ce3ed4e49bb801d5a9a962bbe97da 0 +Wizard\StoryFinishTask.cs Wizard\StoryFinishTask.cs dbf0508b3638ac87b55872f060f672960b38de3c2cabcf6d8bdd3499047d4643 0 +Wizard\StoryLeaderSelectSummaryDialog.cs Wizard\StoryLeaderSelectSummaryDialog.cs 3e366ec91739ae387804c5f6212c1dd98934fb3da94fe069a99b629a46895712 0 +Wizard\StoryLeaderSelectTask.cs Wizard\StoryLeaderSelectTask.cs d2b54bde8e3ef4f32c07e68b05f30e09991ebc9b59578110603d29374130be44 0 +Wizard\StoryNotification.cs Wizard\StoryNotification.cs 2031e97ce2caa711e695a8ca6b372e9c43c4957e890d274a857887d387eb2808 0 +Wizard\StorySectionBtn.cs Wizard\StorySectionBtn.cs 4c5017f7a46c2aadf025f170455524a7fbcdaf230357f103411171a21d2e67b9 0 +Wizard\StorySectionSummaryDialog.cs Wizard\StorySectionSummaryDialog.cs 2592e979478669a865bccc1f2dcfd8943d38248f4f93e842c58cac1fc2125455 0 +Wizard\StorySectionTask.cs Wizard\StorySectionTask.cs f0bb589fd600a447d375f42b1653ccc12c6225016bc00a53e6977520ee648653 0 +Wizard\StorySelectPage.cs Wizard\StorySelectPage.cs 9f24b2f8f98fd01b416272fbd6653d2a4394e94276813dbe4392144e459c831e 0 +Wizard\StorySummaryDialog.cs Wizard\StorySummaryDialog.cs bb46317567e6879b90f7752051b09039c5795bcf25af63fadfdcbcfcca99e80b 0 +Wizard\SubClassSelectDialog.cs Wizard\SubClassSelectDialog.cs ce9eed6444e38ddd10eb305755b400808395d861621442d60553e91e46b6351f 0 +Wizard\SummonTagCollection.cs Wizard\SummonTagCollection.cs 584ee636f3d8826973893728e77f5a72cc4c4b608357b6bccb993f17abf46976 0 +Wizard\SummonedVirtualCard.cs Wizard\SummonedVirtualCard.cs 26483c1445ad0f95167e6cfd6cc8d719e87fb20d231d2215ee13d6adc1e3c145 0 +Wizard\SupplyLabelPlate.cs Wizard\SupplyLabelPlate.cs f4dc3274f670ef78b6c9bf7518e074df7c9477792af420caf6e0d16518df73df 0 +Wizard\SupplyLabelPlateListUI.cs Wizard\SupplyLabelPlateListUI.cs 9c49cffa2ff008f6b20d08109dd3eaee2a75d5f062fb3b538a331a26e1d8747c 0 +Wizard\SystemText.cs Wizard\SystemText.cs 1450cdaf4d2f61346fb8743ca0be089647c64f328b825d2e1f9d9ce667655dc3 0 +Wizard\TagCollection.cs Wizard\TagCollection.cs 16016406df9b7e9287ba64d32b57297059ee1a1fe2f3b57845ec7ad4588630ea 0 +Wizard\TagCollectionType.cs Wizard\TagCollectionType.cs 6723cd1be89e3669a02e640d2b4528d8908b0322f25fef413e8b147e3aea3101 0 +Wizard\TagCollectionWithMultipleTypes.cs Wizard\TagCollectionWithMultipleTypes.cs cbaa5e18e5c01e87510d40f27ca88332bb11ee17313a4503e68dfe877c0fb6e7 0 +Wizard\TagCollectionWithSingleType.cs Wizard\TagCollectionWithSingleType.cs 13828b771705d65b2626fda575be6d2de1057d1b91b26917d20c96e9b3179371 0 +Wizard\TagCollectionWithTypeBase.cs Wizard\TagCollectionWithTypeBase.cs 9ba0688d57518d19a3ed80819ae1501bd59c911e7749388aff097dfae8f46aee 0 +Wizard\TagCollectionWithTypeCreator.cs Wizard\TagCollectionWithTypeCreator.cs ba793e436b0c9b4f4ec2e4d0b8cdb6d0572c1285556baf0068fb6d330d0d7cbc 0 +Wizard\TargetSelectType.cs Wizard\TargetSelectType.cs 91ab18f9c069784e1140a187eabd8248761618a577811296f36db07f9b87265b 0 +Wizard\TargetTagCollection.cs Wizard\TargetTagCollection.cs 1bd2fb66e58c9fae3d23fbce351972577da664c2b959ee92e0547e2396c82eb9 0 +Wizard\TextLineCreater.cs Wizard\TextLineCreater.cs fdb7f0a918c2f5b92268954b3980724f29cb16a8098ea67c2d99633ae5bd1e92 0 +Wizard\TokenPlayPattern.cs Wizard\TokenPlayPattern.cs c14d846afb81b876291013c077cbd503bebd27b651b5b78708e93d68758e2e7b 0 +Wizard\ToolboxGame.cs Wizard\ToolboxGame.cs 968903c18a720c29cb410690d8912ff42d11dc7c41e29a61f77f8de112f18414 1 +Wizard\TournamentCell.cs Wizard\TournamentCell.cs b07b968c6768b74b9345ab3aa1ae138950de022b08f92a16966b3daef81d379c 0 +Wizard\TournamentCellData.cs Wizard\TournamentCellData.cs ecc457bdf2dbaa7db9de893f69a07ac43e589ca140dad29866d658af386e605e 0 +Wizard\TournamentController.cs Wizard\TournamentController.cs 236122aa73487c600114c9b0010ab9e9c85a5745a267550088c8f790532647c9 0 +Wizard\TournamentData.cs Wizard\TournamentData.cs d81085f707aa7234732233bd2369575bb633ec742547072ab04f17c75d175e9d 0 +Wizard\TournamentRound.cs Wizard\TournamentRound.cs 03ad29b66c57329d01b4c5bcd55194698731ac49f382e4d7e2d354c269980205 0 +Wizard\TournamentRoundData.cs Wizard\TournamentRoundData.cs 45cc3860a5a515350ba0cd72b7557def64b0a2cfc4a236723246a6446a4e9bb3 0 +Wizard\TournamentWatch.cs Wizard\TournamentWatch.cs 662f35e0246af5d27ef00d73d44eecedff64e41cdcdeea8aff28765c1542fff4 0 +Wizard\TournamentWatchData.cs Wizard\TournamentWatchData.cs cd6aeff1787c5aca48fdba0f29001994fe4efc21a609d3cefb24f19f18c634cb 0 +Wizard\TransformBackup.cs Wizard\TransformBackup.cs 590cfc9e5b00c6896b9bff2e1086827dd53d821b99cc83a76bc76f94ea053135 0 +Wizard\TransitionDeleteTask.cs Wizard\TransitionDeleteTask.cs 8add5ad5b354244a204f363738e421430bf935f915e08b8d3c05a259902ccb98 0 +Wizard\TransitionDialog.cs Wizard\TransitionDialog.cs 902558332dfac4b76963ac9021eb5c723ebb15dd15d3f4fd1c6fbbef30b2e37e 0 +Wizard\TransitionInfoTask.cs Wizard\TransitionInfoTask.cs ab19b5d418517b6201f68a372a316f1c95d705b75a9e39d94e8642af5b472e8e 0 +Wizard\TransitionPublishDialog.cs Wizard\TransitionPublishDialog.cs d8c56ceee7cc8bfdc84ad8962798e816fb3b5c8a989a00ff05fcb2a5af3b4714 0 +Wizard\TransitionPublishTask.cs Wizard\TransitionPublishTask.cs ab1e0e766b8239b0acf1e99bd4fce171ed56dc7d329287686aac0b5759fdefce 0 +Wizard\TreasureBoxCp.cs Wizard\TreasureBoxCp.cs e78c9c95de87adcce86167b4f99afc69960072254fbff0226dbb27aa2253c10f 0 +Wizard\TreasureBoxCpDialog.cs Wizard\TreasureBoxCpDialog.cs 0cf1c94147a7432b0d154d5d5cdf950a05d3db6a6a8c769c95ab86ad7e94a1c0 0 +Wizard\TreasureBoxCpResultInfo.cs Wizard\TreasureBoxCpResultInfo.cs 77141091f1b85fdfa04005a5551b5d9ae29322c1446c70411e410daec2fe4bc5 0 +Wizard\TreasureCpBoxTextPanel.cs Wizard\TreasureCpBoxTextPanel.cs 22be14af133def36515b86ba125a329778b6d3f19997ecc70e7e68bd05167a51 0 +Wizard\TurnEndTagCollection.cs Wizard\TurnEndTagCollection.cs 176accc9ed7bbafa5b36a25cbd85caa6bad54acabdbe1f786160ba11737cbdf2 0 +Wizard\TurnStartTagCollection.cs Wizard\TurnStartTagCollection.cs a6190321dd648393cb52de200be2bdd7dadeca06f602fd13c9803fd3d84e2849 0 +Wizard\TutorialAreaSelect.cs Wizard\TutorialAreaSelect.cs fd8c11bbe4a98a5407fc1bdae75f3fae5fab2a996cde2a54a7fcbd5a73115352 0 +Wizard\TutorialData.cs Wizard\TutorialData.cs 2fc9577f9c08b7803e3673d18eee530d3a61d95d0d8b8d5c166e97ab4dc557ed 0 +Wizard\TutorialUpdateTask.cs Wizard\TutorialUpdateTask.cs a7becdb53f2645cc7e6a49197310d3999d75c601f9babb3d005bdcd725fcd369 0 +Wizard\TweenAnimation.cs Wizard\TweenAnimation.cs fcd6dd622114eb97f11737e4db6a7af924eb209a8a6a44ad4aade9d8a1e1ee4d 0 +Wizard\TweenAnimationGroup.cs Wizard\TweenAnimationGroup.cs 5b6eeb31bb7d1cb9cdaae48da61d0b07ba6b5a72145c5b3e1e7a84a54f599c5e 0 +Wizard\TweenPositionWithUpdate.cs Wizard\TweenPositionWithUpdate.cs af58dc6186fdb5b7a03c25fb5f5128cb2646218eae1424f86756b0e61114872c 0 +Wizard\TwoPickFormat.cs Wizard\TwoPickFormat.cs 7f09731756f955d49fd610f3383ad697786e37c4d09d78bf577b03767bd40177 0 +Wizard\TypeFilterDialog.cs Wizard\TypeFilterDialog.cs 4c764fe4b79a18bc267d0775575b85f7bedb28a645935f2474dfebc292ba3cf8 0 +Wizard\TypeFilterSingle.cs Wizard\TypeFilterSingle.cs d59034d2a145657e5d06d6db841d13f3ea71a00ddb586f5e8994d8e14ad9de2b 0 +Wizard\UIAtlasManager.cs Wizard\UIAtlasManager.cs 5c75b17b39bb1e5e6c14eed56ebbf00a21bc88427227a971897b7d41eae9a173 0 +Wizard\UIDestroyUtility.cs Wizard\UIDestroyUtility.cs ba51f00bdab3124c314a2d7e2e1384f756e9519f4531f04952d2748ce7993eb6 0 +Wizard\UIDragMultiScrollView.cs Wizard\UIDragMultiScrollView.cs 8d500ede637b369c9d2f9bb07050f888f3300658d132cf76d1b91fd2f42971f6 0 +Wizard\UIGauge.cs Wizard\UIGauge.cs 0118ff5fbb35e3386abbda434cac738fc420ecbac5dcba1e532483f4ac9b0d40 0 +Wizard\UILabelEffectOverwriter.cs Wizard\UILabelEffectOverwriter.cs d91ad280e420b0b04a1e1fda0b58c993d0523b2dce9f58e40bf2fd98aaf9943b 0 +Wizard\UILabelGradientOverwriter.cs Wizard\UILabelGradientOverwriter.cs 61d81c1710dbdcfdd5f2ecc07bfaf1aea701f80c45b46c4556705782c43a4eec 0 +Wizard\UIMarquee.cs Wizard\UIMarquee.cs 6cbce7ed5b35b808cb61011c426f87a4d84ea4c96a901de098d13978dc9a95d0 0 +Wizard\UIPageIndicator.cs Wizard\UIPageIndicator.cs d4e6665f6992a99dac634794580ed7810242639f10b9a4f4875fc4df0b87db11 0 +Wizard\UIParticleEffectGroup.cs Wizard\UIParticleEffectGroup.cs dcc425e476a98214ce77ae6c41500e8a082e3c4ecdea1b06455ffc80da4f85ff 0 +Wizard\UIParticleEffectManager.cs Wizard\UIParticleEffectManager.cs 6de2774b868bed1f996dfccce58de26dca47b89b42e03a7929eb95ea97dafcbd 0 +Wizard\UIShaderSprite.cs Wizard\UIShaderSprite.cs 26f4dc6be5c3fa99f59e54582797b045ad343fb40fb1338a187f723ee0c75251 0 +Wizard\UISpriteAtlasOverwriter.cs Wizard\UISpriteAtlasOverwriter.cs 0f3455b58b740cab260d97bf28d1b8e73ba0ba6938f62d4b81021b3329e07bd7 0 +Wizard\UIUtil.cs Wizard\UIUtil.cs 6a019191da0f9c4a0605f3ccec9e85f028115bcf1c292b8f0512a20b54654be7 0 +Wizard\UnitBonusPolicyCollection.cs Wizard\UnitBonusPolicyCollection.cs b8e5522040191498c5871a91b7330774d4710b2f65ee2af451706ff9cb228baf 0 +Wizard\UnlimitedFormatBehavior.cs Wizard\UnlimitedFormatBehavior.cs a9c6cda132c872841d05088bbe187914479e2b555876b4b45f5be6a7b7bb0948 0 +Wizard\UnlimitedRestrictedCard.cs Wizard\UnlimitedRestrictedCard.cs 295618ea53573f498923f63bfabd0b3543552761811830b83e2a18980edfc311 0 +Wizard\UserDataDialog.cs Wizard\UserDataDialog.cs 9deeacf1be23f0f2d62e306dbae62d157ba96349b43c00a59e38c9a3c736d03a 0 +Wizard\UserGoods.cs Wizard\UserGoods.cs c21dd8bc5521e705da0994f68771149a54d461f49d00fbd54f9d8673bb047eb3 0 +Wizard\UserInfoBase.cs Wizard\UserInfoBase.cs ad812a1d63e876c52e813a7a70bb468fd85a8814f1adeff8686f49763d4d3b2e 0 +Wizard\UserListView.cs Wizard\UserListView.cs 5e9cd533c035cbd561f1280429f26a49b7c670daa48346abbe6bbc3e0be5cc7f 0 +Wizard\UserListViewPlate.cs Wizard\UserListViewPlate.cs 8c1341eb0afebf6eac1c4ae041f955137d7f98270a80d4fee37a11f008a35bb2 0 +Wizard\UserPlateBase.cs Wizard\UserPlateBase.cs 4f6b7ab48d259876b5305882ff41034405c93696729bf24bb85125ce9922cca1 0 +Wizard\UserRegionUpdater.cs Wizard\UserRegionUpdater.cs b8c19dcd9a93ecf7f23efae777e654d497fcaf3954be322515cdab4a01bc8c2b 0 +Wizard\UtilityDrumrollItemCustomize.cs Wizard\UtilityDrumrollItemCustomize.cs 4d708a6f05b32993026e2a719bd67a44446e41de59baa8f62878604f2653dda9 0 +Wizard\VoteDataTask.cs Wizard\VoteDataTask.cs 970031c62f0a7056fae5f88a0033f4bdd6c92cf10b46a228608f19cbf50f8882 0 +Wizard\VoteTask.cs Wizard\VoteTask.cs 6997ab7504f80977a4fe1db297832eb7a6b5cc9399a3cf6354e12c0d4be177bc 0 +Wizard\WebViewHelper.cs Wizard\WebViewHelper.cs 6de04c4f2ed591d28abd463e1ecf8392e75ac345520c2632365aef575d87bc53 0 +Wizard\WebViewScreen.cs Wizard\WebViewScreen.cs db0acaf319d8dc5ee28c441a4c32d88b59f49632efcb5707de85ed1ae47ecf7e 0 +Wizard\WhenGetOffTagCollection.cs Wizard\WhenGetOffTagCollection.cs 56009d6b9acb7df9d376670526228b9b51d19fadd14325cc60166a0a0d82d7d1 0 +Wizard\WhenNecromanceTagCollection.cs Wizard\WhenNecromanceTagCollection.cs 2576488749e9fa264bac47d56edcca8f30e7b0eaa08459f85ea0286f39453925 0 +Wizard\WhenPlayTagCollection.cs Wizard\WhenPlayTagCollection.cs 4b4ee7e60d9fc7d6ac23ce8b3cec928d542ea6bb55d3637ad66093f0cba30141 0 +Wizard\WizardFirebase.cs Wizard\WizardFirebase.cs 2f1fe52b52dcc184ba1630ed0df7713c3a49f83a8700d459cee2e0c40b03dffc 0 +Wizard\WizardUIButton.cs Wizard\WizardUIButton.cs e078cf8215ad02ac1c0fd4a7fe66ab7151dcf704fc230c199a12caab67719d5b 0 +Wizard\_3dCardFrameManager.cs Wizard\_3dCardFrameManager.cs d23f7bd3cc2ddbb86f9a40d1dea6941796cf7562f9dd0f804b6acccd9a345396 0 +Wizard\eColorCodeId.cs Wizard\eColorCodeId.cs 4c853d61f36776bc6a652c11a6eabdb4dbde7ff8ff5fbc410fb4b878a17edcb1 0 +WrapContentsScrollBarSize.cs WrapContentsScrollBarSize.cs 90b8b14191d5016037bc1b907ef9408f9aecc63e8a2562cd58db8991345a538e 0 +WrapContentsScrollBarSizeByDirection.cs WrapContentsScrollBarSizeByDirection.cs 61585719e6ffc0839f025ebbfa59cf4949d16685ea71addd2a5533395ff6aff5 0 +WrapVariableContentsScrollBarSize.cs WrapVariableContentsScrollBarSize.cs 05c94e8b843c29e056c2f9f3a7303febe0638d3cf83aa1c46e30df93d36f768c 0 +YuwanField.cs YuwanField.cs 1368d0b2755edbae36ce4dcabd69d8d2f6ce854765ea46621199ef20d407d13a 0 +iTween.cs iTween.cs 8da77cd885d8fb1e8727e91681ab5ac00a889d0fcc9b973a4162f15a0b642a54 0 +llField.cs llField.cs a0e0eaed3f22a8c4ce47f82fa80346e3b99e3ac0a6765e1ad4ade3a87c1b0189 0 +Wizard.Battle.View/CardIconControl.cs Wizard.Battle.View/CardIconControl.cs affd5a289a04bc9f446f3e892403dd9cd560ee557de1e5cd743dcb031dab280c 0 +Wizard.Battle.View.Vfx/NullCardVfxCreator.cs Wizard.Battle.View.Vfx/NullCardVfxCreator.cs bf8f34d27f41df0dc728c47f874465869649299a5195c2d616597d7a37c581f5 0 +Wizard.Battle.View.Vfx/NotEmptyNullVfx.cs Wizard.Battle.View.Vfx/NotEmptyNullVfx.cs fd471e4254bde6dded2c1447714e605a9889b97b01a834bc616585bcff738825 0 +Wizard.Battle.View.Vfx/NullVfxWithLoading.cs Wizard.Battle.View.Vfx/NullVfxWithLoading.cs c297c7c7e53fc9a41e46b5f52baa65f905bc51943d6a0fbe683a98fc0668b9b9 0 diff --git a/SVSim.BattleEngine/Engine/.gitattributes b/SVSim.BattleEngine/Engine/.gitattributes new file mode 100644 index 0000000..9f9dc72 --- /dev/null +++ b/SVSim.BattleEngine/Engine/.gitattributes @@ -0,0 +1,2 @@ +# Verbatim engine copies: never normalize line endings (keeps sha256 manifest valid). +*.cs -text diff --git a/SVSim.BattleEngine/Engine/.gitkeep b/SVSim.BattleEngine/Engine/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/SVSim.BattleEngine/Engine/AISendIntervalTrigger.cs b/SVSim.BattleEngine/Engine/AISendIntervalTrigger.cs new file mode 100644 index 0000000..416b944 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AISendIntervalTrigger.cs @@ -0,0 +1,6 @@ +public class AISendIntervalTrigger : SendIntervalTrigger +{ + public override void SendDataCheck(NetworkBattleManagerBase networkBattleManager, NetworkBattleDefine.NetworkBattleURI sendUri) + { + } +} diff --git a/SVSim.BattleEngine/Engine/AITurnControl.cs b/SVSim.BattleEngine/Engine/AITurnControl.cs new file mode 100644 index 0000000..2f27d85 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AITurnControl.cs @@ -0,0 +1,58 @@ +using System; +using Cute; +using Wizard; + +public class AITurnControl +{ + private DateTime _startTime; + + private bool _isStartTimer; + + public AITurnControl() + { + _isStartTimer = false; + } + + public void StartTurnTimer() + { + _isStartTimer = true; + _startTime = TimeUtil.GetAbsoluteTime(); + } + + public void SetAndStartTurnTimer(DateTime time) + { + _isStartTimer = true; + _startTime = time; + } + + public void Update(IEnemyAI ai) + { + if (ToolboxGame.RealTimeNetworkAgent != null && ToolboxGame.RealTimeNetworkAgent.PlayerNetworkStatus.IsAlive && !ai.IsConnectNetwork) + { + ai.Reconnect(); + } + if (!_isStartTimer || !ToolboxGame.RealTimeNetworkAgent.PlayerNetworkStatus.IsAlive) + { + if (_isStartTimer && ai.IsConnectNetwork) + { + ai.Disconnect(); + } + } + else if ((float)NetworkUtility.GetTimeSpanSecond(_startTime.Ticks) >= 90f) + { + if (ai.IsStackAction) + { + ai.CleanupStackedAction(); + } + if (!ai.IsStackAction) + { + ai.TurnEnd(); + } + } + } + + public void StopTurnTimer() + { + _isStartTimer = false; + } +} diff --git a/SVSim.BattleEngine/Engine/AchievedInfo.cs b/SVSim.BattleEngine/Engine/AchievedInfo.cs new file mode 100644 index 0000000..c828ac8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AchievedInfo.cs @@ -0,0 +1,166 @@ +using System.Collections.Generic; +using LitJson; +using Wizard; +using Wizard.Lottery; + +public class AchievedInfo +{ + private const string ACHIEVEMENT = "achieved_achievement_list"; + + private const string MISSION = "achieved_mission_list"; + + private const string REWARD = "achieved_mission_reward_list"; + + private const string VICTORY_REWARD = "win_reward_list"; + + private const string GRAND_MASTER_REWARD = "grand_master_reward_list"; + + private const string MISSION_START = "mission_start_data"; + + private const string BEGINNER_MISSION_REWARD = "achieved_beginner_mission_reward_list"; + + private const string BEGINNER_MISSION_REWARD_MESSAGE = "achieved_beginner_mission_list"; + + private const string BATTLE_PASS_REWARD_LIST = "battle_pass_reward_list"; + + private const string BATTLE_PASS_MESSAGE_LIST = "battle_pass_message_list"; + + private const long DONT_NOTIFY_IF_SMALLER_THAN_SECONDS = 10L; + + public List _missions; + + public List _achievements; + + public List _rewards; + + public List _victoryRewards; + + public LotteryApplyData _lotteryData = LotteryApplyData.EmptyData(); + + public AchievedInfo() + { + _missions = new List(); + _achievements = new List(); + _rewards = new List(); + _victoryRewards = new List(); + } + + public AchievedInfo(JsonData data) + : this() + { + Read(data); + } + + public void Read(JsonData data) + { + if (data.Count == 0) + { + return; + } + if (data.Keys.Contains("achieved_mission_list")) + { + JsonData jsonData = data["achieved_mission_list"]; + if (jsonData != null) + { + for (int i = 0; i < jsonData.Count; i++) + { + _missions.Add(UserMission.CreateAchievedMission(jsonData[i])); + } + } + } + if (data.Keys.Contains("achieved_achievement_list")) + { + JsonData jsonData2 = data["achieved_achievement_list"]; + if (jsonData2 != null) + { + for (int j = 0; j < jsonData2.Count; j++) + { + UserAchievement userAchievement = UserAchievement.CreateCompletedAchievement(jsonData2[j]); + if (!string.IsNullOrEmpty(userAchievement.OsId)) + { + AchievementImpl.instance.ReleaseAchievement(userAchievement.OsId); + } + _achievements.Add(userAchievement); + } + } + } + if (data.Keys.Contains("grand_master_reward_list")) + { + JsonData jsonData3 = data["grand_master_reward_list"]; + if (jsonData3 != null) + { + for (int k = 0; k < jsonData3.Count; k++) + { + _rewards.Add(ReceivedReward.CreateFromBattleResultGrandMaster(jsonData3[k])); + } + } + } + if (data.Keys.Contains("achieved_mission_reward_list")) + { + JsonData jsonData4 = data["achieved_mission_reward_list"]; + if (jsonData4 != null) + { + for (int l = 0; l < jsonData4.Count; l++) + { + _rewards.Add(ReceivedReward.CreateFromBattleResult(jsonData4[l])); + } + } + } + if (data.Keys.Contains("win_reward_list")) + { + JsonData jsonData5 = data["win_reward_list"]; + if (jsonData5 != null) + { + for (int m = 0; m < jsonData5.Count; m++) + { + _victoryRewards.Add(ReceivedReward.CreateVictoryReward(jsonData5[m])); + } + } + } + if (data.Keys.Contains("achieved_beginner_mission_reward_list")) + { + JsonData jsonData6 = data["achieved_beginner_mission_reward_list"]; + if (jsonData6 != null) + { + for (int n = 0; n < jsonData6.Count; n++) + { + _rewards.Add(ReceivedReward.CreateFromBeginnerMissionReward(jsonData6[n])); + } + } + } + if (data.Keys.Contains("achieved_beginner_mission_list")) + { + JsonData jsonData7 = data["achieved_beginner_mission_list"]; + if (jsonData7 != null) + { + for (int num = 0; num < jsonData7.Count; num++) + { + _missions.Add(UserMission.CreateAchievedMission(jsonData7[num])); + } + } + } + if (data.Keys.Contains("battle_pass_reward_list")) + { + JsonData jsonData8 = data["battle_pass_reward_list"]; + if (jsonData8 != null) + { + for (int num2 = 0; num2 < jsonData8.Count; num2++) + { + _rewards.Add(ReceivedReward.CreateFromBattlePassReward(jsonData8[num2])); + } + } + } + if (data.Keys.Contains("battle_pass_message_list")) + { + JsonData jsonData9 = data["battle_pass_message_list"]; + if (jsonData9 != null) + { + for (int num3 = 0; num3 < jsonData9.Count; num3++) + { + _missions.Add(UserMission.CreateAchievedMission(jsonData9[num3])); + } + } + } + _lotteryData = LotteryApplyData.Parse(data); + } +} diff --git a/SVSim.BattleEngine/Engine/AchievementInfo.cs b/SVSim.BattleEngine/Engine/AchievementInfo.cs new file mode 100644 index 0000000..5e69326 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AchievementInfo.cs @@ -0,0 +1,4 @@ +public class AchievementInfo : HeaderData +{ + public AchievementInfoDetail data; +} diff --git a/SVSim.BattleEngine/Engine/AchievementInfoDetail.cs b/SVSim.BattleEngine/Engine/AchievementInfoDetail.cs new file mode 100644 index 0000000..599f6e0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AchievementInfoDetail.cs @@ -0,0 +1,6 @@ +using System.Collections.Generic; + +public class AchievementInfoDetail +{ + public List user_achievement_list; +} diff --git a/SVSim.BattleEngine/Engine/AchievementWindowBase.cs b/SVSim.BattleEngine/Engine/AchievementWindowBase.cs new file mode 100644 index 0000000..d301dcf --- /dev/null +++ b/SVSim.BattleEngine/Engine/AchievementWindowBase.cs @@ -0,0 +1,777 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Bingo; +using Wizard.Lottery; +using Wizard.Scripts.Network.Data.TableData; + +public class AchievementWindowBase : MonoBehaviour +{ + public enum AchievementType + { + None, + Reward, + Nonattainment, + AlreadyReceived, + PointRunning, + PointClear, + PointReceived + } + + public GameObject goButtonReward; + + public UITexture achievementIconTexture; + + public UILabel labelAchievementTitle; + + public UILabel labelAchievementData; + + public UILabel labelAchievementCount; + + public UILabel _missionWaitLabel; + + public UILabel _labelMissionPeriod; + + public UILabel _labelMissionNotice; + + public UISprite _titleLine; + + public UILabel alreadyReceived; + + [NonSerialized] + public int type; + + [NonSerialized] + public int iType = -1; + + [NonSerialized] + public int level; + + [NonSerialized] + public string strAchievementData = "3種類のスリーブを使う。"; + + [SerializeField] + private UILabel LabelDetailBtn; + + [SerializeField] + private UITable StarTable; + + [SerializeField] + private UISprite StarOriginal; + + [SerializeField] + private GameObject MailReceive; + + [SerializeField] + private UIGauge GaugeUI; + + [SerializeField] + private UILabel GaugeLabel; + + [SerializeField] + private UISprite _Separator; + + [SerializeField] + private UIWidget _StarsWidget; + + [SerializeField] + private UILabel _labelTopRight; + + [SerializeField] + private UILabel _missionStartTime; + + [SerializeField] + private UILabel _missionTimeOver; + + [SerializeField] + private UILabel _applyFinish; + + private const int ACHIEVEMENT_STARS_MAX = 5; + + private ResourceHandler _resourceHandler; + + private const string SPRITE_PREFIX_BUTTON_BLUE = "btn_common_02_s_"; + + private int _viewMailId; + + private QuestRewardInfo _questRewardInfo; + + private Action _onReceivceAchievementSuccess; + + private CrossoverRewardInfo _crossoverRewardInfo; + + private const int BINGO_MISSION_SPRITE_WIDTH = 752; + + private void Awake() + { + LabelDetailBtn.text = Data.SystemText.Get("Common_0022"); + } + + public void SetType(AchievementType typeBase) + { + labelAchievementCount.gameObject.SetActive(typeBase != AchievementType.AlreadyReceived); + alreadyReceived.gameObject.SetActive(typeBase == AchievementType.AlreadyReceived || typeBase == AchievementType.PointReceived); + goButtonReward.SetActive(typeBase != AchievementType.AlreadyReceived && typeBase != AchievementType.PointReceived); + UIManager.SetObjectToGrey(goButtonReward, typeBase == AchievementType.Nonattainment || typeBase == AchievementType.PointRunning); + } + + public void SetActiveGaugeUI(bool isActive) + { + GaugeUI.gameObject.SetActive(isActive); + } + + public void OnRewardClick() + { + AchievementReceiveRewardTask achievementReceiveRewardTask = new AchievementReceiveRewardTask(); + achievementReceiveRewardTask.SetParameter(type, level); + StartCoroutine(Toolbox.NetworkManager.Connect(achievementReceiveRewardTask, OnRequestRewardAchievement, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode)); + } + + public void OnDetail() + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Mission_0007")); + dialogBase.SetText(strAchievementData); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + } + + private void OnRequestRewardAchievement(NetworkTask.ResultCode error) + { + OnRequestReward(error, Data.MissionInfo.data.total_reward_list); + _onReceivceAchievementSuccess.Call(); + } + + private void OnRequestReward(NetworkTask.ResultCode error, List rewards) + { + base.transform.parent.gameObject.AddMissingComponent().ShowReadDialog(rewards, MailReceive, base.gameObject, _resourceHandler); + MyPageMenu.Instance.UpdateMissionCount(); + } + + private void SetAchievementCommon(UserAchievement achi) + { + bool num = achi.reward_type == 4; + strAchievementData = achi.achievement_name; + SystemText systemText = Data.SystemText; + labelAchievementTitle.text = systemText.Get("Mission_0023") + strAchievementData; + labelAchievementTitle.rightAnchor.target = _StarsWidget.transform; + labelAchievementTitle.rightAnchor.relative = 0f; + if (num) + { + ReceiveReward.SetTicket(achi.RewardUserGoodsId, achi.reward_number, achievementIconTexture, labelAchievementData, _resourceHandler); + } + else + { + ReceiveReward.SetTexture((UserGoods.Type)achi.reward_type, achievementIconTexture, _resourceHandler); + labelAchievementData.text = ReceiveReward.getTitle((UserGoods.Type)achi.reward_type, achi.RewardUserGoodsId, achi.reward_number); + } + GaugeUI.gameObject.SetActive(value: true); + int num2 = ((achi.total_count > achi.require_number) ? achi.require_number : achi.total_count); + int require_number = achi.require_number; + labelAchievementCount.gameObject.SetActive(value: false); + GaugeLabel.text = num2 + "/" + require_number; + if (num2 != 0 && require_number != 0) + { + float value = (float)num2 / (float)require_number; + GaugeUI.Value = value; + } + else + { + GaugeUI.Value = 0f; + } + goButtonReward.GetComponent().GetComponentInChildren().text = systemText.Get("Mail_0023"); + } + + private void SetRunning(UserAchievement achi) + { + SetType(AchievementType.Nonattainment); + SetAchievementCommon(achi); + SetAchievementStars(achi, cleared: false); + } + + private void SetAchievementStars(UserAchievement achi, bool cleared) + { + int num = achi._maxLevel; + int num2 = achi.level; + if (achi._maxLevel > 5) + { + num = 5; + num2 = ((achi.level == achi._maxLevel) ? 5 : ((achi.level <= 0 || achi.level % 5 != 0) ? (achi.level % 5) : 5)); + } + for (int i = 0; i < num; i++) + { + UISprite uISprite = UnityEngine.Object.Instantiate(StarOriginal, StarOriginal.transform.localPosition, StarOriginal.transform.localRotation); + uISprite.transform.parent = StarTable.transform; + uISprite.transform.localPosition = Vector3.zero; + uISprite.transform.localScale = Vector3.one; + if ((num2 == i + 1 && cleared) || num2 > i + 1) + { + uISprite.spriteName = "achievement_star_02"; + } + else + { + uISprite.spriteName = "achievement_star_01"; + } + uISprite.gameObject.SetActive(value: true); + } + StarTable.repositionNow = true; + } + + private void SetCanReceive(UserAchievement achi) + { + SetType(AchievementType.Reward); + SetAchievementCommon(achi); + SetAchievementStars(achi, cleared: false); + UIButton component = goButtonReward.GetComponent(); + component.onClick.Clear(); + component.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + OnRewardClick(); + })); + } + + private void SetAlreadyReceived(UserAchievement achi) + { + SetType(AchievementType.AlreadyReceived); + SetAchievementCommon(achi); + SetAchievementStars(achi, cleared: true); + } + + public void SetAchievement(UserAchievement achi, ResourceHandler resourceHandler, Action onReceivceAchievementSuccess) + { + _resourceHandler = resourceHandler; + _onReceivceAchievementSuccess = onReceivceAchievementSuccess; + switch (achi.achievement_status) + { + case 0: + SetRunning(achi); + break; + case 1: + SetCanReceive(achi); + break; + case 2: + SetAlreadyReceived(achi); + break; + default: + UnityEngine.Debug.LogError("unkown achievement status"); + break; + } + } + + public void SetCrossoverReward(CrossoverRewardInfo reward, AchievementType type, ResourceHandler resourceHandler, Action onReceiveReward) + { + _crossoverRewardInfo = reward; + _resourceHandler = resourceHandler; + SetType(type); + string texName = UserGoods.GetUserGoodsImageName((UserGoods.Type)reward.RewardType, reward.RewardDetailId); + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(texName, ResourcesManager.AssetLoadPathType.Item); + _resourceHandler.Add(assetTypePath, delegate + { + if (reward.RewardDetailId == _crossoverRewardInfo.RewardDetailId) + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(texName, ResourcesManager.AssetLoadPathType.Item, isfetch: true); + achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath2); + } + }); + RankInfo rankInfo = Data.Load.data.GetRankInfo(Format.Crossover, reward.Rank); + labelAchievementTitle.text = Data.SystemText.Get("Profile_0042", Data.SystemText.Get(rankInfo.rank_name)); + labelAchievementData.text = ReceiveReward.getTitle((UserGoods.Type)reward.RewardType, reward.RewardDetailId, reward.RewardCount); + GaugeUI.gameObject.SetActive(value: false); + UIButton component = goButtonReward.GetComponent(); + component.GetComponentInChildren().text = Data.SystemText.Get("Mail_0023"); + goButtonReward.gameObject.SetActive(type != AchievementType.PointReceived); + UIManager.SetObjectToGrey(goButtonReward, type != AchievementType.PointClear); + component.onClick.Clear(); + component.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + ReceiveCrossoverReward(reward.RewardId, onReceiveReward); + })); + CopyAnchor(_labelTopRight.rightAnchor, labelAchievementTitle.rightAnchor); + } + + private void ReceiveCrossoverReward(int rewardId, Action onReceiveReward) + { + CrossoverReceiveRankRewardTask task = new CrossoverReceiveRankRewardTask(); + task.SetParameter(rewardId); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + onReceiveReward.Call(); + DialogCreator.CreateRewardReceiveDialog(task.ReceivedRewardList); + })); + } + + public void SetQuestPoint(QuestRewardInfo reward, AchievementType type, ResourceHandler resourceHandler, Action onRequestRewardPointCallBack) + { + _questRewardInfo = reward; + strAchievementData = reward.Point.ToString(); + labelAchievementTitle.text = Data.SystemText.Get("Quest_0019", strAchievementData); + _resourceHandler = resourceHandler; + SetType(type); + string texName = UserGoods.GetUserGoodsImageName((UserGoods.Type)reward.RewardType, reward.RewardDetailId); + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(texName, ResourcesManager.AssetLoadPathType.Item); + _resourceHandler.Add(assetTypePath, delegate + { + if (reward.RewardDetailId == _questRewardInfo.RewardDetailId) + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(texName, ResourcesManager.AssetLoadPathType.Item, isfetch: true); + achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath2); + } + }); + labelAchievementData.text = ReceiveReward.getTitle((UserGoods.Type)reward.RewardType, reward.RewardDetailId, reward.RewardCount); + GaugeUI.gameObject.SetActive(value: false); + UIButton component = goButtonReward.GetComponent(); + component.GetComponentInChildren().text = Data.SystemText.Get("Mail_0023"); + goButtonReward.gameObject.SetActive(type != AchievementType.PointReceived); + UIManager.SetObjectToGrey(goButtonReward, type != AchievementType.PointClear); + component.onClick.Clear(); + component.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + OnQuestPointReceive(reward.Id, onRequestRewardPointCallBack); + })); + GetComponent().spriteName = string.Empty; + CopyAnchor(_labelTopRight.rightAnchor, labelAchievementTitle.rightAnchor); + } + + public void SetMission(UserMission mission, ResourceHandler resourceHandler, bool canChangeMissions, bool enableSeparator, bool displayChange, Action onChangeMissionSuccess = null) + { + _resourceHandler = resourceHandler; + _Separator.gameObject.SetActive(enableSeparator); + if (mission.mission_status == 0 && SetMissionWait(mission)) + { + return; + } + SystemText systemText = Data.SystemText; + if (mission.reward_type == 4) + { + ReceiveReward.SetTicket(mission.RewardUserGoodsId, mission.reward_number, achievementIconTexture, labelAchievementData, _resourceHandler); + } + else + { + ReceiveReward.SetTexture((UserGoods.Type)mission.reward_type, mission.RewardUserGoodsId, achievementIconTexture, _resourceHandler); + labelAchievementData.text = ReceiveReward.getTitle((UserGoods.Type)mission.reward_type, mission.RewardUserGoodsId, mission.reward_number); + } + labelAchievementTitle.text = mission.mission_name; + int require_number = mission.require_number; + bool flag = require_number > 0; + GaugeUI.gameObject.SetActive(flag); + if (flag) + { + int num = ((mission.total_count > mission.require_number) ? mission.require_number : mission.total_count); + GaugeLabel.text = num + "/" + require_number; + if (num != 0) + { + float value = (float)num / (float)require_number; + GaugeUI.Value = value; + } + else + { + GaugeUI.Value = 0f; + } + } + UIButton component = goButtonReward.GetComponent(); + component.normalSprite = "btn_common_02_s_off"; + component.pressedSprite = "btn_common_02_s_on"; + component.GetComponentInChildren().text = systemText.Get("Mission_0029"); + component.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + ChangeMission(mission.id, mission.mission_name, onChangeMissionSuccess); + })); + goButtonReward.SetActive(displayChange && !mission.default_flag); + UIManager.SetObjectToGrey(goButtonReward, !canChangeMissions); + labelAchievementCount.gameObject.SetActive(value: false); + SetMissionPeriodLabel(mission); + CopyAnchor(_labelTopRight.rightAnchor, labelAchievementTitle.rightAnchor); + } + + public void SetBttlePassMonthlyMission(BattlePassMonthlyMission.MissionDetail mission, ResourceHandler resourceHandler) + { + _Separator.gameObject.SetActive(value: false); + _labelMissionPeriod.gameObject.SetActive(value: false); + labelAchievementCount.gameObject.SetActive(value: false); + goButtonReward.gameObject.SetActive(value: false); + _resourceHandler = resourceHandler; + labelAchievementTitle.text = mission.Name; + alreadyReceived.gameObject.SetActive(mission.IsCleared); + BattlePassMonthlyMission.MissionDetail.RewardInfo reward = mission.Reward; + if (reward == null) + { + _resourceHandler.Add(Toolbox.ResourcesManager.GetAssetTypePath("thumbnail_battle_pass_point", ResourcesManager.AssetLoadPathType.BattlePass), delegate + { + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("thumbnail_battle_pass_point", ResourcesManager.AssetLoadPathType.BattlePass, isfetch: true); + achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath); + }); + labelAchievementData.text = string.Empty; + } + else if (reward.UserGoods.GoodsType == UserGoods.Type.Item) + { + ReceiveReward.SetTicket(reward.UserGoods.Id, reward.Number, achievementIconTexture, labelAchievementData, _resourceHandler); + } + else + { + ReceiveReward.SetTexture(reward.UserGoods.GoodsType, achievementIconTexture, _resourceHandler); + labelAchievementData.text = ReceiveReward.getTitle(reward.UserGoods.GoodsType, reward.UserGoods.Id, reward.Number); + } + SetViewBattlePassPointText(mission.BattlePassPoint); + int requireNumber = mission.RequireNumber; + bool flag = requireNumber > 0; + GaugeUI.gameObject.SetActive(flag); + if (flag) + { + int num = ((mission.DoneNumber > mission.RequireNumber) ? mission.RequireNumber : mission.DoneNumber); + GaugeLabel.text = num + "/" + requireNumber; + if (num != 0) + { + float value = (float)num / (float)requireNumber; + GaugeUI.Value = value; + } + else + { + GaugeUI.Value = 0f; + } + } + } + + private void SetViewBattlePassPointText(int point) + { + string text = " "; + if (labelAchievementData.text == string.Empty) + { + labelAchievementData.text = Data.SystemText.Get("BattlePass_0010", point.ToString()); + } + else + { + UILabel uILabel = labelAchievementData; + uILabel.text = uILabel.text + text + Data.SystemText.Get("BattlePass_0010", point.ToString()); + } + } + + private bool SetMissionWait(UserMission mission) + { + MissionInfoTask missionInfoTask = GameMgr.GetIns().GetMissionInfoTask(); + long num = (long)Time.realtimeSinceStartup - missionInfoTask.RequestTime; + long num2 = missionInfoTask.ServerTime + num; + TimeSpan timeSpan = TimeSpan.FromSeconds(mission.start_time - num2).Add(new TimeSpan(0, 1, 0)); + int num3 = timeSpan.Hours; + int num4 = timeSpan.Minutes; + if (timeSpan.TotalHours >= 24.0) + { + num3 = 24; + num4 = 0; + } + else if (num3 <= 0 && num4 <= 0) + { + return false; + } + if (mission.IsGemMission()) + { + _missionWaitLabel.text = Data.SystemText.Get("Mission_0073", num3.ToString("00"), num4.ToString("00")); + _labelMissionNotice.gameObject.SetActive(value: true); + _labelMissionNotice.text = Data.SystemText.Get("Mission_0074"); + } + else + { + _missionWaitLabel.text = Data.SystemText.Get("Mission_0041", num3.ToString("00"), num4.ToString("00")); + } + labelAchievementTitle.gameObject.SetActive(value: false); + labelAchievementCount.gameObject.SetActive(value: false); + labelAchievementData.gameObject.SetActive(value: false); + labelAchievementData.gameObject.SetActive(value: false); + goButtonReward.gameObject.SetActive(value: false); + GaugeUI.gameObject.SetActive(value: false); + _titleLine.gameObject.SetActive(value: false); + _missionWaitLabel.gameObject.SetActive(value: true); + return true; + } + + private void SetMissionPeriodLabel(UserMission mission) + { + if (mission.end_time <= 0 || mission.IsGemMission()) + { + _labelMissionPeriod.gameObject.SetActive(value: false); + return; + } + long nowUnixTime = GameMgr.GetIns().GetMissionInfoTask().NowUnixTime(); + string remainingTime = ConvertTime.GetRemainingTime(TimeSpan.FromSeconds(mission.GetMissionPeriodSec(nowUnixTime))); + goButtonReward.gameObject.SetActive(value: false); + _labelMissionPeriod.gameObject.SetActive(value: true); + _labelMissionPeriod.text = remainingTime; + } + + private void ChangeMission(int id, string content, Action onChangeMissionSuccess) + { + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Mission_0033")); + dialogBase.SetText(systemText.Get("Mission_0030", content)); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.DecisionBtn); + dialogBase.onPushButton1 = delegate + { + MissionRetireTask missionRetireTask = new MissionRetireTask(); + missionRetireTask.SetParameter(id); + StartCoroutine(Toolbox.NetworkManager.Connect(missionRetireTask, delegate + { + onChangeMissionSuccess.Call(); + }, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode)); + }; + } + + private void OnQuestPointReceive(int rewardId, Action onRequestRewardPointCallBack) + { + QuestRewardReceiveTask task = new QuestRewardReceiveTask(); + task.SetParameter(rewardId); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + onRequestRewardPointCallBack.Call(); + DialogCreator.CreateRewardReceiveDialog(task.ReceiveRewardList); + }, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode)); + } + + public void SetHistoryItem(ItemAcquireHistory item, bool enableSeparator, ResourceHandler resourceHandler) + { + _resourceHandler = resourceHandler; + SystemText systemText = Data.SystemText; + if (item.RewardType == 4) + { + ReceiveReward.SetTicket(item.RewardUserGoodsId, item.RewardCount, achievementIconTexture, labelAchievementTitle, _resourceHandler); + } + else + { + ReceiveReward.SetTexture((UserGoods.Type)item.RewardType, achievementIconTexture, _resourceHandler); + labelAchievementTitle.text = ReceiveReward.getTitle((UserGoods.Type)item.RewardType, item.RewardUserGoodsId, item.RewardCount); + } + labelAchievementData.text = item.Message; + labelAchievementCount.text = systemText.Get("Mail_0043", ConvertTime.ToLocal(item.AcquireTime)); + GaugeUI.gameObject.SetActive(value: false); + goButtonReward.SetActive(value: false); + _Separator.gameObject.SetActive(enableSeparator); + } + + public void SetMail(MailData mail, Action OnReadMail, ResourceHandler handler) + { + _resourceHandler = handler; + _viewMailId = mail.mail_id; + SetCommonMail(mail); + TimeLeftUpdate timeLeftUpdate = base.gameObject.AddMissingComponent(); + timeLeftUpdate.mailData = mail; + _labelTopRight.gameObject.SetActive(value: true); + timeLeftUpdate.timeLeft = _labelTopRight; + timeLeftUpdate.UpdateTime(); + SystemText systemText = Data.SystemText; + labelAchievementCount.text = systemText.Get("Mail_0043", mail.create_time); + goButtonReward.SetActive(value: true); + goButtonReward.transform.Find("RewardLabel").GetComponent().text = systemText.Get("Mail_0023"); + UIButton component = goButtonReward.GetComponent(); + component.normalSprite = "btn_common_02_s_off"; + component.hoverSprite = "btn_common_02_s_off"; + component.pressedSprite = "btn_common_02_s_on"; + UIEventListener.Get(goButtonReward).onClick = delegate + { + OnReadMail(mail.mail_id, mail.mail_id); + }; + } + + public void SetHistoryMail(MailData mail, ResourceHandler handler) + { + _resourceHandler = handler; + _viewMailId = mail.mail_id; + SetCommonMail(mail); + TimeLeftUpdate component = base.gameObject.GetComponent(); + if ((bool)component) + { + component.mailData = null; + } + _labelTopRight.gameObject.SetActive(value: false); + labelAchievementCount.text = Data.SystemText.Get("Mail_0044", mail.create_time); + goButtonReward.SetActive(value: false); + } + + private void SetCommonMail(MailData mailData) + { + GaugeUI.gameObject.SetActive(value: false); + labelAchievementData.text = mailData.message; + labelAchievementTitle.text = ReceiveReward.getTitle(mailData); + string textureName = ReceiveReward.GetThumbnailName((UserGoods.Type)mailData.reward_type, mailData.RewardUserGoodsId); + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item); + _resourceHandler.Add(assetTypePath, delegate + { + if (mailData.mail_id == _viewMailId) + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item, isfetch: true); + achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath2); + } + }); + } + + private void CopyAnchor(UIRect.AnchorPoint original, UIRect.AnchorPoint destination) + { + destination.target = original.target; + destination.relative = original.relative; + destination.absolute = original.absolute; + } + + public void SetGetButtonToGreyOut() + { + UIManager.SetObjectToGrey(goButtonReward, b: true); + } + + public void SetLottery(LotteryMissionData lotteryData, bool needCeparator) + { + string userGoodsImageName = UserGoods.GetUserGoodsImageName(lotteryData.UserGoodsType, lotteryData.ItemId); + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(userGoodsImageName, ResourcesManager.AssetLoadPathType.Item, isfetch: true); + base.gameObject.GetComponent().width = 800; + achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath); + _Separator.gameObject.SetActive(needCeparator); + labelAchievementTitle.text = lotteryData.MissionTitle; + if (lotteryData.UserGoodsType == UserGoods.Type.Item) + { + labelAchievementData.text = ReceiveReward.SetTicketTitle(lotteryData.ItemId, lotteryData.ItemCount); + } + else + { + labelAchievementData.text = ReceiveReward.getTitle(lotteryData.UserGoodsType, lotteryData.ItemId, lotteryData.ItemCount); + } + goButtonReward.SetActive(value: false); + if (lotteryData.StartTime.Second > 0) + { + _missionStartTime.text = Data.SystemText.Get("Mission_0077", lotteryData.StartTime.LocalTime); + _missionStartTime.gameObject.SetActive(value: true); + } + else + { + _labelMissionPeriod.text = lotteryData.EndTime.GetShowText("Mission_0062", "Mission_0060", "Mission_0061"); + _labelMissionPeriod.gameObject.SetActive(value: true); + } + CopyAnchor(_labelTopRight.rightAnchor, labelAchievementTitle.rightAnchor); + _applyFinish.gameObject.SetActive(lotteryData.IsCleared); + _labelMissionPeriod.gameObject.SetActive(!lotteryData.IsCleared && !lotteryData.IsTimeOver); + _missionTimeOver.gameObject.SetActive(lotteryData.IsTimeOver); + GaugeLabel.text = lotteryData.MissionCurrent + "/" + lotteryData.MissionMax; + GaugeUI.Value = lotteryData.MissionRatio; + bool active = true; + if (lotteryData.IsCleared || lotteryData.MissionMax == 0) + { + active = false; + } + GaugeUI.gameObject.SetActive(active); + } + + public void SetBingoMission(BingoInfoTask.BingoMissionData missionData, bool needCeparator, ResourceHandler handler) + { + _resourceHandler = handler; + base.gameObject.GetComponent().width = 752; + base.gameObject.GetComponent().enabled = false; + alreadyReceived.gameObject.SetActive(missionData.IsCleared); + labelAchievementData.text = ReceiveReward.getTitle((UserGoods.Type)missionData.Reward.reward_type, missionData.Reward.rewardUserGoodsId, missionData.Reward.reward_count); + string textureName = UserGoods.GetUserGoodsImageName((UserGoods.Type)missionData.Reward.reward_type, missionData.Reward.rewardUserGoodsId); + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item); + _resourceHandler.Add(assetTypePath, delegate + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item, isfetch: true); + achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath2); + }); + CopyAnchor(_labelTopRight.rightAnchor, labelAchievementTitle.rightAnchor); + _titleLine.SetAnchor((GameObject)null); + _titleLine.spriteName = "quest_line_05"; + _titleLine.SetDimensions(610, 2); + _Separator.spriteName = "quest_line_02"; + _Separator.gameObject.SetActive(needCeparator); + goButtonReward.SetActive(value: false); + GaugeLabel.text = missionData.MissionCurrent + "/" + missionData.MissionMax; + GaugeUI.Value = missionData.MissionRatio; + labelAchievementTitle.text = missionData.MissionTitle; + } + + public void SetBingoRewardDetails(ReceivedReward reward, bool needCeparator, ResourceHandler handler) + { + _resourceHandler = handler; + base.gameObject.GetComponent().width = 752; + base.gameObject.GetComponent().enabled = false; + goButtonReward.SetActive(value: false); + _titleLine.SetAnchor((GameObject)null); + _titleLine.spriteName = "quest_line_05"; + _titleLine.SetDimensions(610, 2); + _Separator.spriteName = "quest_line_02"; + _Separator.gameObject.SetActive(needCeparator); + labelAchievementTitle.text = string.Format(Data.SystemText.Get("Bingo_0004", reward.lineNum.ToString())); + labelAchievementData.text = ReceiveReward.getTitle((UserGoods.Type)reward.reward_type, reward.rewardUserGoodsId, reward.reward_count); + GaugeUI.gameObject.SetActive(value: false); + string textureName = UserGoods.GetUserGoodsImageName((UserGoods.Type)reward.reward_type, reward.rewardUserGoodsId); + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item); + _resourceHandler.Add(assetTypePath, delegate + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item, isfetch: true); + achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath2); + }); + } + + public void SetBingoSideBarRewards(string lineNum, ReceivedReward reward, bool isCleared, bool needCeparator, ResourceHandler handler) + { + _resourceHandler = handler; + _Separator.gameObject.SetActive(needCeparator); + goButtonReward.SetActive(value: false); + labelAchievementTitle.text = string.Format(Data.SystemText.Get("Bingo_0004", lineNum)); + labelAchievementData.text = ReceiveReward.getTitle((UserGoods.Type)reward.reward_type, reward.rewardUserGoodsId, reward.reward_count); + alreadyReceived.gameObject.SetActive(isCleared); + string textureName = UserGoods.GetUserGoodsImageName((UserGoods.Type)reward.reward_type, reward.rewardUserGoodsId); + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item); + _resourceHandler.Add(assetTypePath, delegate + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(textureName, ResourcesManager.AssetLoadPathType.Item, isfetch: true); + achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(assetTypePath2); + }); + } + + public void SetPracticePuzzleMission(PracticePuzzleMissionData mission, ResourceHandler resourceHandler, bool canChangeMissions, bool enableSeparator, bool displayChange, Action onChangeMissionSuccess = null) + { + _resourceHandler = resourceHandler; + _Separator.gameObject.SetActive(enableSeparator); + goButtonReward.SetActive(value: false); + _ = Data.SystemText; + if (mission.UserGoodsType == UserGoods.Type.Item) + { + ReceiveReward.SetTicket(mission.ItemId, mission.ItemCount, achievementIconTexture, labelAchievementData, _resourceHandler); + } + else + { + ReceiveReward.SetTexture(mission.UserGoodsType, mission.ItemId, achievementIconTexture, _resourceHandler); + labelAchievementData.text = ReceiveReward.getTitle(mission.UserGoodsType, mission.ItemId, mission.ItemCount); + } + labelAchievementTitle.text = mission.Name; + int totalMissionCount = mission.TotalMissionCount; + bool flag = totalMissionCount > 0; + GaugeUI.gameObject.SetActive(flag); + if (flag) + { + int num = ((mission.TotalMissionCount > mission.CurrentClearCount) ? mission.CurrentClearCount : mission.TotalMissionCount); + GaugeLabel.text = num + "/" + totalMissionCount; + if (num != 0) + { + float value = (float)num / (float)totalMissionCount; + GaugeUI.Value = value; + } + else + { + GaugeUI.Value = 0f; + } + } + alreadyReceived.gameObject.SetActive(mission.IsCleared); + labelAchievementCount.gameObject.SetActive(value: false); + CopyAnchor(_labelTopRight.rightAnchor, labelAchievementTitle.rightAnchor); + } + + public void SetRedEtherMission(RedEtherCampaignRewardData rewardData, ResourceHandler resourceHandler) + { + _resourceHandler = resourceHandler; + goButtonReward.SetActive(value: false); + ReceiveReward.SetTexture(rewardData.UserGoodsType, 0L, achievementIconTexture, _resourceHandler); + labelAchievementData.text = ReceiveReward.getTitle(rewardData.UserGoodsType, 0L, rewardData.ItemCount); + labelAchievementTitle.text = rewardData.MissionText; + alreadyReceived.gameObject.SetActive(rewardData.IsCleared); + GaugeUI.gameObject.SetActive(value: false); + } +} diff --git a/SVSim.BattleEngine/Engine/ActiveAnimation.cs b/SVSim.BattleEngine/Engine/ActiveAnimation.cs new file mode 100644 index 0000000..59f470d --- /dev/null +++ b/SVSim.BattleEngine/Engine/ActiveAnimation.cs @@ -0,0 +1,356 @@ +using System.Collections.Generic; +using AnimationOrTween; +using UnityEngine; + +[AddComponentMenu("NGUI/Internal/Active Animation")] +public class ActiveAnimation : MonoBehaviour +{ + public static ActiveAnimation current; + + public List onFinished = new List(); + + [HideInInspector] + public GameObject eventReceiver; + + [HideInInspector] + public string callWhenFinished; + + private Animation mAnim; + + private Direction mLastDirection; + + private Direction mDisableDirection; + + private bool mNotify; + + private Animator mAnimator; + + private string mClip = ""; + + private float playbackTime => Mathf.Clamp01(mAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime); + + public bool isPlaying + { + get + { + if (mAnim == null) + { + if (mAnimator != null) + { + if (mLastDirection == Direction.Reverse) + { + if (playbackTime == 0f) + { + return false; + } + } + else if (playbackTime == 1f) + { + return false; + } + return true; + } + return false; + } + foreach (AnimationState item in mAnim) + { + if (!mAnim.IsPlaying(item.name)) + { + continue; + } + if (mLastDirection == Direction.Forward) + { + if (item.time < item.length) + { + return true; + } + continue; + } + if (mLastDirection == Direction.Reverse) + { + if (item.time > 0f) + { + return true; + } + continue; + } + return true; + } + return false; + } + } + + public void Finish() + { + if (mAnim != null) + { + foreach (AnimationState item in mAnim) + { + if (mLastDirection == Direction.Forward) + { + item.time = item.length; + } + else if (mLastDirection == Direction.Reverse) + { + item.time = 0f; + } + } + mAnim.Sample(); + } + else if (mAnimator != null) + { + mAnimator.Play(mClip, 0, (mLastDirection == Direction.Forward) ? 1f : 0f); + } + } + + public void Reset() + { + if (mAnim != null) + { + foreach (AnimationState item in mAnim) + { + if (mLastDirection == Direction.Reverse) + { + item.time = item.length; + } + else if (mLastDirection == Direction.Forward) + { + item.time = 0f; + } + } + return; + } + if (mAnimator != null) + { + mAnimator.Play(mClip, 0, (mLastDirection == Direction.Reverse) ? 1f : 0f); + } + } + + private void Start() + { + if (eventReceiver != null && EventDelegate.IsValid(onFinished)) + { + eventReceiver = null; + callWhenFinished = null; + } + } + + private void Update() + { + float deltaTime = RealTime.deltaTime; + if (deltaTime == 0f) + { + return; + } + if (mAnimator != null) + { + mAnimator.Update((mLastDirection == Direction.Reverse) ? (0f - deltaTime) : deltaTime); + if (isPlaying) + { + return; + } + mAnimator.enabled = false; + base.enabled = false; + } + else + { + if (!(mAnim != null)) + { + base.enabled = false; + return; + } + bool flag = false; + foreach (AnimationState item in mAnim) + { + if (!mAnim.IsPlaying(item.name)) + { + continue; + } + float num = item.speed * deltaTime; + item.time += num; + if (num < 0f) + { + if (item.time > 0f) + { + flag = true; + } + else + { + item.time = 0f; + } + } + else if (item.time < item.length) + { + flag = true; + } + else + { + item.time = item.length; + } + } + mAnim.Sample(); + if (flag) + { + return; + } + base.enabled = false; + } + if (!mNotify) + { + return; + } + mNotify = false; + if (current == null) + { + current = this; + EventDelegate.Execute(onFinished); + if (eventReceiver != null && !string.IsNullOrEmpty(callWhenFinished)) + { + eventReceiver.SendMessage(callWhenFinished, SendMessageOptions.DontRequireReceiver); + } + current = null; + } + if (mDisableDirection != Direction.Toggle && mLastDirection == mDisableDirection) + { + NGUITools.SetActive(base.gameObject, state: false); + } + } + + private void Play(string clipName, Direction playDirection) + { + if (playDirection == Direction.Toggle) + { + playDirection = ((mLastDirection != Direction.Forward) ? Direction.Forward : Direction.Reverse); + } + if (mAnim != null) + { + base.enabled = true; + mAnim.enabled = false; + if (string.IsNullOrEmpty(clipName)) + { + if (!mAnim.isPlaying) + { + mAnim.Play(); + } + } + else if (!mAnim.IsPlaying(clipName)) + { + mAnim.Play(clipName); + } + foreach (AnimationState item in mAnim) + { + if (string.IsNullOrEmpty(clipName) || item.name == clipName) + { + float num = Mathf.Abs(item.speed); + item.speed = num * (float)playDirection; + if (playDirection == Direction.Reverse && item.time == 0f) + { + item.time = item.length; + } + else if (playDirection == Direction.Forward && item.time == item.length) + { + item.time = 0f; + } + } + } + mLastDirection = playDirection; + mNotify = true; + mAnim.Sample(); + } + else if (mAnimator != null) + { + if (base.enabled && isPlaying && mClip == clipName) + { + mLastDirection = playDirection; + return; + } + base.enabled = true; + mNotify = true; + mLastDirection = playDirection; + mClip = clipName; + mAnimator.Play(mClip, 0, (playDirection == Direction.Forward) ? 0f : 1f); + } + } + + public static ActiveAnimation Play(Animation anim, string clipName, Direction playDirection, EnableCondition enableBeforePlay, DisableCondition disableCondition) + { + if (!NGUITools.GetActive(anim.gameObject)) + { + if (enableBeforePlay != EnableCondition.EnableThenPlay) + { + return null; + } + NGUITools.SetActive(anim.gameObject, state: true); + UIPanel[] componentsInChildren = anim.gameObject.GetComponentsInChildren(); + int i = 0; + for (int num = componentsInChildren.Length; i < num; i++) + { + componentsInChildren[i].Refresh(); + } + } + ActiveAnimation activeAnimation = anim.GetComponent(); + if (activeAnimation == null) + { + activeAnimation = anim.gameObject.AddComponent(); + } + activeAnimation.mAnim = anim; + activeAnimation.mDisableDirection = (Direction)disableCondition; + activeAnimation.onFinished.Clear(); + activeAnimation.Play(clipName, playDirection); + if (activeAnimation.mAnim != null) + { + activeAnimation.mAnim.Sample(); + } + else if (activeAnimation.mAnimator != null) + { + activeAnimation.mAnimator.Update(0f); + } + return activeAnimation; + } + + public static ActiveAnimation Play(Animation anim, string clipName, Direction playDirection) + { + return Play(anim, clipName, playDirection, EnableCondition.DoNothing, DisableCondition.DoNotDisable); + } + + public static ActiveAnimation Play(Animation anim, Direction playDirection) + { + return Play(anim, null, playDirection, EnableCondition.DoNothing, DisableCondition.DoNotDisable); + } + + public static ActiveAnimation Play(Animator anim, string clipName, Direction playDirection, EnableCondition enableBeforePlay, DisableCondition disableCondition) + { + if (enableBeforePlay != EnableCondition.IgnoreDisabledState && !NGUITools.GetActive(anim.gameObject)) + { + if (enableBeforePlay != EnableCondition.EnableThenPlay) + { + return null; + } + NGUITools.SetActive(anim.gameObject, state: true); + UIPanel[] componentsInChildren = anim.gameObject.GetComponentsInChildren(); + int i = 0; + for (int num = componentsInChildren.Length; i < num; i++) + { + componentsInChildren[i].Refresh(); + } + } + ActiveAnimation activeAnimation = anim.GetComponent(); + if (activeAnimation == null) + { + activeAnimation = anim.gameObject.AddComponent(); + } + activeAnimation.mAnimator = anim; + activeAnimation.mDisableDirection = (Direction)disableCondition; + activeAnimation.onFinished.Clear(); + activeAnimation.Play(clipName, playDirection); + if (activeAnimation.mAnim != null) + { + activeAnimation.mAnim.Sample(); + } + else if (activeAnimation.mAnimator != null) + { + activeAnimation.mAnimator.Update(0f); + } + return activeAnimation; + } +} diff --git a/SVSim.BattleEngine/Engine/AddDamageInfo.cs b/SVSim.BattleEngine/Engine/AddDamageInfo.cs new file mode 100644 index 0000000..435d7fb --- /dev/null +++ b/SVSim.BattleEngine/Engine/AddDamageInfo.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +public class AddDamageInfo : DamageModifier +{ + public int AddDamage { get; protected set; } + + public AddDamageInfo(int addDamage, string damageType, CardBasePrm.ClanType damageClan, bool isUseClass, int order) + { + AddDamage = addDamage; + base.DamageType = new List(); + base.DamageType.AddRange(damageType.Split(new string[1] { "_and_" }, StringSplitOptions.None)); + base.DamageClan = new List { damageClan }; + base.IsUseClass = isUseClass; + base.OrderCount = order; + } + + public override int Calc(int damage) + { + return damage + AddDamage; + } +} diff --git a/SVSim.BattleEngine/Engine/AddHealModifierInfo.cs b/SVSim.BattleEngine/Engine/AddHealModifierInfo.cs new file mode 100644 index 0000000..e594ecf --- /dev/null +++ b/SVSim.BattleEngine/Engine/AddHealModifierInfo.cs @@ -0,0 +1,20 @@ +public class AddHealModifierInfo : HealModifier +{ + public int AddHealAmount { get; private set; } + + public AddHealModifierInfo(int addHealAmount, int order, BattleCardBase owner) + { + AddHealAmount = addHealAmount; + base.OrderCount = order; + _owner = owner; + } + + public override int Calc(int healAmount, BattleCardBase healOwner, BattleCardBase target) + { + if (healOwner.IsPlayer != _owner.IsPlayer) + { + return healAmount; + } + return healAmount + AddHealAmount; + } +} diff --git a/SVSim.BattleEngine/Engine/AddTargetInfo.cs b/SVSim.BattleEngine/Engine/AddTargetInfo.cs new file mode 100644 index 0000000..5b46fc8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AddTargetInfo.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Wizard; + +public class AddTargetInfo +{ + private BattleCardBase _ownerCard; + + private ConditionSkillFilterCollection _conditionFilter; + + private ApplySkillTargetFilterCollection _targetFilter; + + private Func typeCheck; + + private string _conditionFilterText; + + private string _targetFilterText; + + private string _skillTypeText; + + private string _ownerCardtype; + + private SkillCreator _skillCreator; + + public AddTargetInfo(BattleCardBase ownerCard, string conditionFilterText, string targetFilterText, string skillTypeText, string ownerCardType, SkillBase skill) + { + _ownerCard = ownerCard; + _conditionFilterText = conditionFilterText; + _targetFilterText = targetFilterText; + _skillTypeText = skillTypeText; + _ownerCardtype = ownerCardType; + _conditionFilter = new ConditionSkillFilterCollection(); + _targetFilter = new ApplySkillTargetFilterCollection(); + typeCheck = SetTypeCheck(_skillTypeText, _ownerCardtype); + _skillCreator = _ownerCard.CreateSkillCreator(_ownerCard.SelfBattlePlayer, _ownerCard.OpponentBattlePlayer, _ownerCard.ResourceMgr); + string[] array = _conditionFilterText.Split('&'); + List list = new List(); + for (int i = 0; i < array.Length; i++) + { + SkillFilterCreator.ParseContentInfo(array[i], out var retParsedInfo); + list.Add(retParsedInfo); + } + SkillCreator.SetupSkillConditionOld(_conditionFilter, list, _ownerCard, skill); + string[] array2 = _targetFilterText.Split('&'); + List list2 = new List(); + for (int j = 0; j < array2.Length; j++) + { + SkillFilterCreator.ParseContentInfo(array2[j], out var retParsedInfo2); + list2.Add(retParsedInfo2); + } + _skillCreator.SetupSkillTargetOld(_targetFilter, _ownerCard, list2, skill); + } + + public List GetAddTargetCard(SkillBase skill, BattlePlayerReadOnlyInfoPair pair, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue) + { + if (typeCheck(skill) && FilterComparison(skill.ApplyFilterCollection)) + { + return _targetFilter.Filtering(pair, checkerOption, optionValue).Cast().ToList(); + } + return null; + } + + private Func SetTypeCheck(string skillType, string ownerCardType) + { + if (skillType != null && skillType == "damage") + { + return (SkillBase skill) => CardTypeCheck(skill.SkillPrm.ownerCard, ownerCardType) && skill is Skill_damage; + } + return (SkillBase skill) => CardTypeCheck(skill.SkillPrm.ownerCard, ownerCardType) && skill is Skill_none; + } + + private bool CardTypeCheck(BattleCardBase card, string ownerCardType) + { + return ownerCardType switch + { + "all" => true, + "unit" => card.IsUnit, + "spell" => card.IsSpell, + "field" => card.IsField, + "chant_field" => card.IsChantField, + _ => false, + }; + } + + private bool FilterComparison(ApplySkillTargetFilterCollection ownerSkillFilter) + { + if (_conditionFilter.BattlePlayerFilter.GetType() == ownerSkillFilter.BattlePlayerFilter.GetType() && _conditionFilter.TargetFilter.GetType() == ownerSkillFilter.TargetFilter.GetType()) + { + foreach (ISkillCardFilter cardType in _conditionFilter.CardFilterList) + { + if (!ownerSkillFilter.CardFilterList.Any((ISkillCardFilter s) => s.GetType() == cardType.GetType())) + { + return false; + } + } + return true; + } + return false; + } + + public AddTargetInfo Clone(BattleCardBase ownerCard) + { + return new AddTargetInfo(ownerCard, _conditionFilterText, _targetFilterText, _skillTypeText, _ownerCardtype, null); + } +} diff --git a/SVSim.BattleEngine/Engine/AlleyField.cs b/SVSim.BattleEngine/Engine/AlleyField.cs new file mode 100644 index 0000000..ac66645 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AlleyField.cs @@ -0,0 +1,77 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class AlleyField : BackGroundBase +{ + public override int FieldId => 22; + + public override int FieldEffectId => 22; + + public AlleyField(string bgmId = "NONE") + : base(bgmId) + { + } + + protected override void BattleFieldBuild() + { + BattleCoroutine.GetInstance().StartCoroutine(BackGroundBase.ObjectChecker(0.5f, _str3DFieldPath, delegate + { + base.Field = GameObject.Find(_str3DFieldPath); + base.Field.transform.parent = GameMgr.GetIns().m_GameManagerObj.transform; + GimicAudioList = base.Field.GetComponent().GimicAudioList; + _fieldModel = base.Field.transform.Find("md_bf_aley_root").gameObject; + _fieldParticles = _fieldModel.transform.Find("Particles22").gameObject; + List list = new List(_fieldObjDictionary.Keys); + List list2 = new List(); + for (int i = 0; i < _fieldObjDictionary.Count; i++) + { + list2.Add(_fieldObjDictionary[list[i]]); + } + GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list2, delegate + { + base.SetShaderGlobalColorBG = base.Field.transform.Find("SetMaterialColorBGManager").GetComponent(); + base.IsLoadDone = true; + }, isBattle: true, isField: true); + })); + } + + public override void StartFieldSetEffect(Vector3 pos) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_SET_22, pos); + } + + public override void StartFieldTapEffect(int areaId, Vector3 pos) + { + base.StartFieldTapEffect(areaId, pos); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_22_1, pos); + } + + protected override IEnumerator RunFieldOpening() + { + GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_appear_1", "se_field_" + _str3DFieldNo, 0f, 0L); + _battleCamera.Camera.transform.localPosition = new Vector3(2750f, -510f, -10f); + _battleCamera.Camera.transform.localRotation = Quaternion.Euler(new Vector3(-10f, -53f, 84f)); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", new Vector3(300f, -30f, -150f), "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", new Vector3(-11f, -100f, 92f), "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + yield return new WaitForSeconds(2f); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", _battleCamera.BattleCameraPos, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", _battleCamera.BattleCameraRot, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + yield return new WaitForSeconds(0f); + } + + protected override IEnumerator RunFieldGimic(GameObject obj) + { + string tag = obj.tag; + if (tag != null && tag == "FieldGimic1") + { + _ = _gimicCntDictionary[obj.tag]; + } + yield return new WaitForSeconds(0f); + } + + protected override IEnumerator RunFieldShake() + { + yield return new WaitForSeconds(0f); + } +} diff --git a/SVSim.BattleEngine/Engine/AnimationOrTween/Direction.cs b/SVSim.BattleEngine/Engine/AnimationOrTween/Direction.cs new file mode 100644 index 0000000..3fcbe42 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AnimationOrTween/Direction.cs @@ -0,0 +1,8 @@ +namespace AnimationOrTween; + +public enum Direction +{ + Reverse = -1, + Toggle, + Forward +} diff --git a/SVSim.BattleEngine/Engine/ApiType.cs b/SVSim.BattleEngine/Engine/ApiType.cs new file mode 100644 index 0000000..5bb6bfe --- /dev/null +++ b/SVSim.BattleEngine/Engine/ApiType.cs @@ -0,0 +1,2651 @@ +using System.Collections.Generic; + +public class ApiType +{ + public enum Type + { + SignUp, + Load, + GetCardMaster, + Mypage, + MypageFinishBattle, + MypageRefresh, + MyPageCodeInput, + MyPageSettingUpdate, + SpecialCrystalInfo, + Profile, + TutorialUpdate, + TutorialUpdateAction, + DownloadStart, + DownloadFinish, + CardDestruct, + CardCreate, + PremiumCardConversion, + CardProtect, + DeckInfo, + OpenRoomDeckInfo, + DeckMyList, + DeckUpdate, + DeckNameUpdate, + DeckSet, + EmptyDeckInfo, + DeckOrder, + DeckUpdateSleeve, + DeckLeaderSkinUpdate, + DeckRandomLeaderSkinUpdate, + DeckIntroduction, + IntroduceDeckSeries, + DeckDelete, + ConventionDeckDelete, + PracticeDeckInfo, + DeckAutoCreate, + DeckUpdateConvention, + DeckNameUpdateConvention, + DeckUpdateSleeveConvention, + DeckLeaderSkinUpdateConvention, + DeckRandomLeaderSkinUpdateConvention, + ConventionDeckOrder, + ConventionDoWatch, + ConventionInfo, + ConventionRoomGetHistory, + DeckInfoConvention, + MainStoryInfo, + MainStoryStart, + MainStoryAllFinish, + MainStoryFinish, + MainStorySection, + MainStoryLeaderSelect, + MainStoryGetDeckList, + LimitedStoryInfo, + LimitedStoryStart, + LimitedStoryAllFinish, + LimitedStoryFinish, + LimitedStorySection, + LimitedStoryLeaderSelect, + LimitedStoryGetDeckList, + EventStorySection, + EventStoryLeaderSelect, + EventStoryInfo, + EventStoryGetDeckList, + EventStoryStart, + EventStoryFinish, + EventStoryAllFinish, + AllStorySection, + QuestInfo, + QuestMission, + QuestPoint, + QuestStart, + QuestFinish, + QuestRewardReceive, + QuestRewardReceiveAll, + QuestGetDeckList, + QuestPuzzleStart, + QuestPuzzleFinish, + QuestOpenPuzzleDialog, + QuestTweet, + FriendInfo, + SendFriendApplyInfo, + ReceiveFriendApplyInfo, + FriendApplySend, + FriendApplyApprove, + FriendApplyCancel, + FriendApplyCancelAll, + FriendApplyReject, + FriendApplyRejectAll, + FriendReject, + FriendUserSearch, + PlayedTogetherInfo, + GuildInfo, + GuildCreate, + GuildUpdate, + GuildUpdateDescription, + GuildEmblemList, + GuildEmblemUpdate, + GuildSearch, + GuildOthersInfo, + GuildJoin, + GuildJoinRequestCancel, + GuildJoinRequestList, + GuildJoinRequestAccept, + GuildJoinRequestReject, + GuildInvite, + GuildCancelInvite, + GuildInviteUserList, + GuildFriendList, + GuildInvitedList, + GuildRejectInvite, + GuildChangeRole, + GuildLeave, + GuildBreakup, + GuildRemove, + GuildChatPost, + GuildChatAddDeck, + GuildChatAddReplay, + GuildChatMessages, + GuildChatDeckLog, + GuildChatDeleteDeck, + GuildChatReplayDetail, + InformationTop, + InformationDetail, + MailTop, + MailTopTutorial, + MailRead, + MailReadTutorial, + RankMatchFinishRotation, + RankMatchFinishUnlimited, + RankMatchFinishCrossover, + FreeMatchSetParam, + FreeMatchFinishRotation, + FreeMatchFinishUnlimited, + FreeMatchFinishPreRotation, + FreeMatchFinishCrossover, + FreeMatchFinishMyRotation, + FreeMatchFinishAvatar, + RankBattleDoMatchingRotation, + RankBattleDoMatchingUnlimited, + RankBattleDoMatchingCrossover, + RankBattleFinishLoadRotation, + RankBattleFinishLoadUnlimited, + RankBattleForceFinish, + FreeBattleDoMatchingRotation, + FreeBattleDoMatchingUnlimited, + FreeBattleDoMatchingPreRotation, + FreeBattleDoMatchingCrossover, + FreeBattleDoMatchingMyRotation, + FreeBattleDoMatchingAvatar, + FreeBattleFinishLoadRotation, + FreeBattleFinishLoadUnlimited, + FreeBattleFinishLoadAvatar, + FreeBattleForceFinish, + OpenRoomMatchFinish, + OpenRoomBattleBattleDoMatching, + OpenRoomBattleFinishLoad, + OpenRoomBattleForceFinish, + OpenRoom2PickMatchFinish, + OpenRoomBattle2PickBattleDoMatching, + EventRoomBattleBattleDoMatching, + EventRoomBattleFinishLoad, + BattleRecovery, + BattleAbortRecovery, + AbortSoloPlayRecovery, + EventRoomMatchFinish, + AIRotationRankBattleStart, + AIRotationRankBattleFinish, + AIUnlimitedRankBattleStart, + AIUnlimitedRankBattleFinish, + OpenRoomBattleCreateRoom, + OpenRoomBattleCloseRoom, + OpenRoomBattleKickRoom, + OpenRoomBattleForceKickRoom, + OpenRoomBattleSetDeck, + OpenRoomBattleEnterRoom, + OpenRoomBattleLeaveRoom, + OpenRoomBattleWatch, + OpenRoomInitializeRoomBattle, + OpenRoomInitializeOwnerRoomRelations, + OpenRoomDoWatch, + OpenRoomForceClose, + EventRoomBattleCreateRoom, + EventRoomBattleEnterRoom, + EventRoomBattleSetDeck, + EventRoomInitializeRoomBattle, + EventRoomBattleLeaveRoom, + EventRoomBattleCloseRoom, + EventRoomBattleKickRoom, + EventRoomBattleForceKickRoom, + EventRoomForceClose, + EventRoomBattleWatch, + OpenRoomGetRecoverParam, + OpenRoomBattleBattleDoMatchingHOF, + RoomAbortRecovery, + RoomGetHashTag, + OpenRoom2PickBattleDeckReset, + OpenRoom2PickBattleBeginCreateDeck, + OpenRoom2PickBattleSelectClass, + OpenRoom2PickBattleSelectCard, + OpenRoom2PickMultiBattleDeckReset, + OpenRoom2PickMultiBattleBeginCreateDeck, + OpenRoom2PickMultiBattleSelectClass, + OpenRoom2PickMultiBattleSelectCard, + OpenRoomBattle2PickMultiBattleDoMatching, + OpenRoom2PickMultiBattleMatchFinish, + OpenRoom2PickMultiBattleDeckList, + OpenRoom2PickDraftBattleDeckReset, + OpenRoom2PickDraftBattleBeginCreateDeck, + OpenRoom2PickDraftBattleSelectClass, + OpenRoom2PickDraftBattleSelectCard, + OpenRoomBattle2PickDraftBattleDoMatching, + OpenRoom2PickDraftMatchFinish, + OpenRoomBattle2PickDraftFinishLoad, + OpenRoom2PickCubeBattleDoMatching, + OpenRoom2PickCubeBattleFinish, + OpenRoom2PickCubeBattleResetDeck, + OpenRoom2PickCubeBattleBeginCreateDeck, + OpenRoom2PickCubeBattleSelectClass, + OpenRoom2PickCubeBattleSelectCardSet, + OpenRoom2PickCubeMultiBattleDoMatching, + OpenRoom2PickCubeMultiBattleFinish, + OpenRoom2PickCubeMultiBattleResetDeck, + OpenRoom2PickCubeMultiBattleBeginCreateDeck, + OpenRoom2PickCubeMultiBattleSelectClass, + OpenRoom2PickCubeMultiBattleSelectCardSet, + OpenRoom2PickCubeDraftBattleDeckReset, + OpenRoom2PickCubeDraftBattleBeginCreateDeck, + OpenRoom2PickCubeDraftBattleSelectClass, + OpenRoom2PickCubeDraftBattleSelectCard, + OpenRoomBattle2PickCubeDraftBattleDoMatching, + OpenRoom2PickCubeDraftMatchFinish, + OpenRoomBattle2PickCubeDraftFinishLoad, + OpenRoom2PickChaosBattleDoMatching, + OpenRoom2PickChaosBattleFinish, + OpenRoom2PickChaosBattleResetDeck, + OpenRoom2PickChaosBattleBeginCreateDeck, + OpenRoom2PickChaosBattleSelectClass, + OpenRoom2PickChaosBattleSelectCardSet, + OpenRoom2PickChaosMultiBattleDoMatching, + OpenRoom2PickChaosMultiBattleFinish, + OpenRoom2PickChaosMultiBattleResetDeck, + OpenRoom2PickChaosMultiBattleBeginCreateDeck, + OpenRoom2PickChaosMultiBattleSelectClass, + OpenRoom2PickChaosMultiBattleSelectCardSet, + OpenRoom2PickChaosDraftBattleDeckReset, + OpenRoom2PickChaosDraftBattleBeginCreateDeck, + OpenRoom2PickChaosDraftBattleSelectClass, + OpenRoom2PickChaosDraftBattleSelectCard, + OpenRoomBattle2PickChaosDraftBattleDoMatching, + OpenRoom2PickChaosDraftMatchFinish, + OpenRoomBattle2PickChaosDraftFinishLoad, + OpenRoomMultiDeckSet, + OpenRoomMultiResetHistory, + OpenRoomMultiGetHistory, + EventRoomMultiDeckSet, + EventRoomMultiResetHistory, + EventRoomRetire, + OpenRoomMultiDeckBanDecideBan, + OpenRoomGetDeckHof, + OpenRoomSetDeckHof, + OpenRoomMatchFinishHof, + OpenRoomGetDeckAvatar, + OpenRoomSetDeckAvatar, + OpenRoomMatchFinishAvatar, + OpenRoomBattleDoMatchingAvatar, + GatheringRoomBattleSetDeck, + GatheringRoomBattleDoMatching, + GatheringRoomBattleFinish, + GatheringRoomCreateRoom, + GatheringRoomEnterRoom, + GatheringRoomLeaveRoom, + GatheringRoomLeaveRoomForTournament, + GatheringRoomCloseRoom, + GatheringRoomEnterVacancyRoom, + GatheringRoomEnterRoomForTournament, + GatheringRoomInitializeRoomBattle, + GatheringRoomInitializeRoomBattleHistory, + GatheringRoomKickRoom, + GatheringRoomForceKickRoom, + GatheringRoomForceKickRoomForTournament, + GatheringRoomForceCloseRoom, + GatheringRoomGetHistory, + GatheringRoomDoWatch, + GatheringRoomWatchRoom, + GatheringRoomDeckEntry, + ArenaTwoPickTop, + ArenaTwoPickEntry, + ArenaTwoPickClassCharaChoose, + ArenaTwoPickCardChoose, + ArenaTwoPickFinish, + ArenaTwoPickRewardInfo, + ArenaTwoPickRetire, + ArenaTwoPickDoMatching, + ArenaTwoPickFinishLoad, + ArenaTwoPickFinishBattle, + ArenaTwoPickChaosDoMatching, + ArenaTwoPickChaosFinishBattle, + ArenaTwoPickCubeDoMatching, + ArenaTwoPickCubeFinishBattle, + ArenaSealedTop, + ArenaSealedEntry, + ArenaSealedSelectClass, + ArenaSealedGetCardPackInfo, + ArenaSealedGetCardInfo, + ArenaSealedUpdateDeck, + ArenaSealedGetMaintCardList, + ArenaSealedRetire, + ArenaSealedFinish, + ArenaSealedSelectPhantomCard, + ArenaSealedBattleDoMatching, + ArenaSealedBattleFinish, + ChallangeHistory, + ChallangeRankingHistory, + ColosseumTop, + ColosseumEntry, + ColosseumEntryInfo, + ColosseumDeckEntry, + ColosseumDetail, + ColosseumRetireNormalRound, + ColosseumFinishAttachedReward, + ColosseumTwoPickClassInit, + ColosseumTwoPickClassSet, + ColosseumTwoPickCardGet, + ColosseumTwoPickCardSet, + ColosseumHOFDeckInfo, + ColosseumHOFDeckEntry, + ColosseumWindFallDeckInfo, + ColosseumWindFallDeckEntry, + ColosseumAvatarDeckInfo, + ColosseumAvatarDeckEntry, + ColosseumDoMatching, + ColosseumBattleFinishLoad, + ColosseumBattleFinish, + ColosseumDoMatchingRankMatch, + ColosseumBattleFinishLoadRankMatch, + ColosseumBattleFinishRankMatch, + PackInfo, + PackInfoTutorial, + PackOpen, + PackOpenTutorial, + GetSelectSkinOwnedStatus, + PackSetRotationStarterClass, + GachaPointInfo, + GachaPointExchange, + BuildDeckInfo, + BuildDeckBuy, + BuildDeckGetPurchaseCount, + SkinInfo, + SkinBuySingle, + SkinBuyMulti, + SkinBuyMultiReward, + SleeveInfo, + SleeveBuy, + SleeveList, + SleeveFavorite, + ItemPurchaseInfo, + ItemPurchaseBuy, + SpotCardInfo, + SpotCardExchange, + MissionInfo, + MissionReceiveReward, + MissionRetire, + MissionBuyAdditionalRight, + MissionChangeReceiveSetting, + BeginnerMissionInfo, + BeginnerMissionSendApply, + AchievementReceiveReward, + NameUpdate, + RegionCodeUpdate, + OfficialMarkDisplay, + ConfigUpdate, + ArenaConfigUpdate, + ConfigUpdateFoilPreferred, + ConfigUpdatePrizePreferred, + DebugCacheClear, + DebugPlusRupy, + DebugPlusFrupy, + DebugResetRupy, + DebugResetFrupy, + DebugUpdateCard, + DebugUpdateCard1, + DebugUpdateCard2, + DebugResetCard, + DebugResetSleeve, + DebugReleaseClassChara, + DebugAddBattlePoint, + DebugTutorialUpdate, + PaymentItemList, + PaymentStart, + PaymentCancel, + PaymentFinish, + BirthUpdate, + EmblemInfo, + EmblemUpdate, + EmblemFavorite, + DegreeInfo, + DegreeUpdate, + DegreeFavorite, + LeaderSkinInfo, + LeaderSkinUpdate, + RankingPeriodList, + RankingRankMatchClassInfoRotation, + RankingRankMatchClassInfoUnlimited, + RankingRankMatchClassInfoCrossover, + RankingMasterInfoRotation, + RankingMasterInfoUnlimited, + RankingMasterInfoCrossover, + RankingTwoPickInfo, + RankingSealedInfo, + RankingMasterMyHistories, + ItemAcquireHistoryInfo, + PracticeInfo, + PracticeStart, + PracticeFinish, + PracticePuzzleList, + PracticePuzzleInfo, + PracticePuzzleBattleStart, + PracticePuzzleBattleFinish, + PracticePuzzleMissionList, + CountryCodeSet, + SendAllTraceLog, + SendTraceLog, + SendLastTraceLog, + GenerateDeckCode, + GetDeckInfoFromDeckCode, + GenerateDeckImage, + GenerateDeckImageMaintenance, + InviteGetFriendList, + InviteFriend, + InviteGetList, + InviteCancel, + InviteAccept, + InviteConfigUpdate, + ReplayInfo, + ReplayDetail, + GrandMaster, + MasterResetMonth, + BattleReport, + Vote, + VoteData, + AcceptAgreement, + CheckSpecialTitle, + ClientCacheClear, + DeleteUserData, + LotteryInfo, + LotteryReceive, + LotteryReceiveDoubleChance, + LotteryReceiveBigChance, + LotteryReceiveTweetData, + GatheringCreate, + GatheringGetInfo, + GatheringSelfInfo, + GatheringEntry, + GatheringLeave, + GatheringInvite, + GatheringInviteCancel, + GatheringInviteReject, + GatheringFriendList, + GatheringInviteUserList, + GatheringConfirmDeckList, + GatheringDeckList, + GatheringUpdateDeckName, + GatheringUpdateDeckSleeve, + GatheringUpdateDeckLeaderSkin, + GatheringUpdateDeckRandomLeaderSkin, + GatheringInterrupt, + GatheringGetReceiveInvite, + GatheringRanking, + GatheringKick, + GatheringUpdateDescription, + GatheringInfoDependJoin, + GatheringTournamentInfo, + GatheringChatPost, + GatheringChatMessages, + GatheringChatAddDeck, + GatheringChatAddReplay, + GatheringChatReplayDetail, + GatheringChatDeckLog, + GatheringChatDeleteDeck, + BattlePassInfo, + BattlePassItemList, + BattlePassBuy, + AdjustSettingUpdate, + OpenRoomGetDeckWindFall, + OpenRoomSetDeckWindFall, + OpenRoomMatchFinishWindFall, + OpenRoomBattleBattleDoMatchingWindFall, + CompetitionLobbyInfo, + CompetitionRetire, + CompetitionFinish, + CompetitionBattleDoMatching, + CompetitionBattleDoMatchingRankMatch, + CompetitionBattleFinish, + CompetitionBattleFinishRankMatch, + CompetitionEntry, + CompetitionRegisterDeck, + CompetitionCheckPeriod, + CompetitionJoin, + CompetitionPermanentEntry, + CompetitionClassChoose, + CompetitionCardChoose, + CompetitionSetCurrentDeck, + BingoInfo, + BingoDraw, + BingoReceiveTweetData, + CrossoverInfo, + CrossoverReceiveRankReward, + CrossoverReceiveAllRankRewards, + CrossoverRankingMasterMyHistories, + CrossoverGrandMaster, + NeutralPopularityVoteInfo, + NeutralPopularityVoteExecute, + LeaderPopularityVoteInfo, + LeaderPopularityVoteExecute, + AccountDeleteReserve, + AccountDeleteCancel, + BossRushLobbyInfo, + BossRushRegisterDeck, + BossRushSetAbility, + BossRushReceiveReward, + BossRushRetire, + BossRushStart, + BossRushHiddenBattleStart, + BossRushFinish, + BossRushHiddenBattleFinish, + BossRushLoseFinish, + BossRushClearDeckList, + ReceiveUpgradeTreasureBox, + TreasureOpenSpecialTreasureBox, + FreeCardPackBoxFinish, + RedEtherCampaignLobby, + TransitionInfo, + TransitionPublish, + TransitionDelete, + CheckTimeSlipRotationPeriod + } + + public static Dictionary ApiList = new Dictionary + { + { + Type.Load, + "load/index" + }, + { + Type.GetCardMaster, + "immutable_data/card_master" + }, + { + Type.Mypage, + "mypage/index" + }, + { + Type.MypageFinishBattle, + "mypage/finish_battle" + }, + { + Type.MypageRefresh, + "mypage/refresh" + }, + { + Type.MyPageCodeInput, + "campaign/regist_serial_code" + }, + { + Type.MyPageSettingUpdate, + "user_mypage/update" + }, + { + Type.SpecialCrystalInfo, + "mypage/get_special_crystal_info" + }, + { + Type.Profile, + "profile/index" + }, + { + Type.TutorialUpdate, + "tutorial/update" + }, + { + Type.TutorialUpdateAction, + "tutorial/update_action" + }, + { + Type.DownloadStart, + "download_time/start" + }, + { + Type.DownloadFinish, + "download_time/end" + }, + { + Type.CardDestruct, + "card/destruct" + }, + { + Type.CardCreate, + "card/create" + }, + { + Type.PremiumCardConversion, + "card/create_foil_card" + }, + { + Type.CardProtect, + "card/protect" + }, + { + Type.DeckInfo, + "deck/info" + }, + { + Type.OpenRoomDeckInfo, + "open_room/deck_list" + }, + { + Type.DeckMyList, + "deck/my_list" + }, + { + Type.DeckUpdate, + "deck/update" + }, + { + Type.DeckNameUpdate, + "deck/update_name" + }, + { + Type.DeckSet, + "deck/set_deck_redis" + }, + { + Type.EmptyDeckInfo, + "deck/get_empty_deck_number" + }, + { + Type.DeckOrder, + "deck/update_order" + }, + { + Type.DeckUpdateSleeve, + "deck/update_sleeve" + }, + { + Type.DeckLeaderSkinUpdate, + "deck/update_leader_skin" + }, + { + Type.DeckRandomLeaderSkinUpdate, + "deck/update_random_leader_skin" + }, + { + Type.DeckIntroduction, + "introduce_deck/info" + }, + { + Type.IntroduceDeckSeries, + "introduce_deck/series_list" + }, + { + Type.DeckDelete, + "deck/delete_deck_list" + }, + { + Type.PracticeDeckInfo, + "practice/deck_list" + }, + { + Type.DeckAutoCreate, + "auto_deck/create" + }, + { + Type.DeckInfoConvention, + "offline_event/deck_info" + }, + { + Type.DeckUpdateConvention, + "offline_event/deck_update" + }, + { + Type.DeckNameUpdateConvention, + "offline_event/update_deck_name" + }, + { + Type.DeckUpdateSleeveConvention, + "offline_event/update_sleeve" + }, + { + Type.DeckLeaderSkinUpdateConvention, + "offline_event/update_leader_skin" + }, + { + Type.DeckRandomLeaderSkinUpdateConvention, + "offline_event/update_random_leader_skin" + }, + { + Type.ConventionInfo, + "offline_event/info" + }, + { + Type.ConventionRoomGetHistory, + "open_room_offline_event/get_score" + }, + { + Type.ConventionDeckOrder, + "offline_event/update_order" + }, + { + Type.ConventionDeckDelete, + "offline_event/delete_deck_list" + }, + { + Type.ConventionDoWatch, + "open_room_offline_event/do_watch" + }, + { + Type.MainStoryInfo, + "main_story/info" + }, + { + Type.MainStoryStart, + "main_story/start" + }, + { + Type.MainStoryFinish, + "main_story/finish" + }, + { + Type.MainStoryAllFinish, + "main_story/all_finish" + }, + { + Type.MainStorySection, + "main_story/section" + }, + { + Type.MainStoryLeaderSelect, + "main_story/leader_select" + }, + { + Type.MainStoryGetDeckList, + "main_story/get_deck_list" + }, + { + Type.LimitedStoryInfo, + "limited_story/info" + }, + { + Type.LimitedStoryStart, + "limited_story/start" + }, + { + Type.LimitedStoryFinish, + "limited_story/finish" + }, + { + Type.LimitedStoryAllFinish, + "limited_story/all_finish" + }, + { + Type.LimitedStorySection, + "limited_story/section" + }, + { + Type.LimitedStoryLeaderSelect, + "limited_story/leader_select" + }, + { + Type.EventStorySection, + "event_story/section" + }, + { + Type.EventStoryLeaderSelect, + "event_story/leader_select" + }, + { + Type.EventStoryInfo, + "event_story/info" + }, + { + Type.EventStoryGetDeckList, + "event_story/get_deck_list" + }, + { + Type.EventStoryStart, + "event_story/start" + }, + { + Type.EventStoryFinish, + "event_story/finish" + }, + { + Type.EventStoryAllFinish, + "event_story/all_finish" + }, + { + Type.AllStorySection, + "story/section" + }, + { + Type.QuestInfo, + "quest/info" + }, + { + Type.QuestMission, + "quest/mission" + }, + { + Type.QuestPoint, + "quest/point" + }, + { + Type.QuestStart, + "quest/start" + }, + { + Type.QuestFinish, + "quest/finish" + }, + { + Type.QuestRewardReceive, + "quest/receive_reward" + }, + { + Type.QuestRewardReceiveAll, + "quest/receive_reward_all" + }, + { + Type.QuestGetDeckList, + "quest/get_deck_list" + }, + { + Type.QuestPuzzleStart, + "quest/puzzle_start" + }, + { + Type.QuestPuzzleFinish, + "quest/puzzle_finish" + }, + { + Type.QuestOpenPuzzleDialog, + "quest/open_puzzle_dialog" + }, + { + Type.QuestTweet, + "quest/receive_tweet_reward" + }, + { + Type.FriendInfo, + "friend/info" + }, + { + Type.SendFriendApplyInfo, + "friend/send_apply_info" + }, + { + Type.ReceiveFriendApplyInfo, + "friend/receive_apply_info" + }, + { + Type.FriendApplySend, + "friend/send_apply" + }, + { + Type.FriendApplyApprove, + "friend/approve_apply" + }, + { + Type.FriendApplyCancel, + "friend/cancel_apply" + }, + { + Type.FriendApplyCancelAll, + "friend/cancel_apply_all" + }, + { + Type.FriendApplyReject, + "friend/reject_apply" + }, + { + Type.FriendApplyRejectAll, + "friend/reject_apply_all" + }, + { + Type.FriendReject, + "friend/reject_friend" + }, + { + Type.FriendUserSearch, + "friend/search_user" + }, + { + Type.PlayedTogetherInfo, + "friend/played_together_info" + }, + { + Type.GuildInfo, + "guild/info" + }, + { + Type.GuildCreate, + "guild/create" + }, + { + Type.GuildUpdate, + "guild/update" + }, + { + Type.GuildUpdateDescription, + "guild/update_description" + }, + { + Type.GuildEmblemList, + "guild/emblem_list" + }, + { + Type.GuildEmblemUpdate, + "guild/update_emblem" + }, + { + Type.GuildSearch, + "guild/search_guild" + }, + { + Type.GuildOthersInfo, + "guild/others_info" + }, + { + Type.GuildJoin, + "guild/join" + }, + { + Type.GuildJoinRequestCancel, + "guild/cancel_join_request" + }, + { + Type.GuildJoinRequestList, + "guild/join_request_list" + }, + { + Type.GuildJoinRequestAccept, + "guild/join_request_accept" + }, + { + Type.GuildJoinRequestReject, + "guild/reject_join_request" + }, + { + Type.GuildInvite, + "guild/invite" + }, + { + Type.GuildCancelInvite, + "guild/cancel_invite" + }, + { + Type.GuildInviteUserList, + "guild/invite_user_list" + }, + { + Type.GuildFriendList, + "guild/friend_list" + }, + { + Type.GuildInvitedList, + "guild/invited_guild_list" + }, + { + Type.GuildRejectInvite, + "guild/reject_invite" + }, + { + Type.GuildChangeRole, + "guild/change_role" + }, + { + Type.GuildLeave, + "guild/leave" + }, + { + Type.GuildBreakup, + "guild/breakup" + }, + { + Type.GuildRemove, + "guild/remove" + }, + { + Type.GuildChatPost, + "guild_chat/post" + }, + { + Type.GuildChatAddDeck, + "guild_chat/add_deck" + }, + { + Type.GuildChatAddReplay, + "guild_chat/add_replay" + }, + { + Type.GuildChatMessages, + "guild_chat/messages" + }, + { + Type.GuildChatDeckLog, + "guild_chat/deck_log" + }, + { + Type.GuildChatDeleteDeck, + "guild_chat/delete_deck" + }, + { + Type.GuildChatReplayDetail, + "guild_chat/replay_detail" + }, + { + Type.InformationTop, + "information/top" + }, + { + Type.InformationDetail, + "information/detail/1" + }, + { + Type.MailTop, + "gift/top" + }, + { + Type.MailTopTutorial, + "tutorial/gift_top" + }, + { + Type.MailRead, + "gift/receive_gift" + }, + { + Type.MailReadTutorial, + "tutorial/gift_receive" + }, + { + Type.BattleRecovery, + "battle/get_recovery_params" + }, + { + Type.BattleAbortRecovery, + "battle/abort_recovery" + }, + { + Type.AbortSoloPlayRecovery, + "npc_battle/abort_solo_play_recovery" + }, + { + Type.RankMatchFinishRotation, + "rotation_rank_battle/finish" + }, + { + Type.RankMatchFinishUnlimited, + "unlimited_rank_battle/finish" + }, + { + Type.RankMatchFinishCrossover, + "crossover_rank_battle/finish" + }, + { + Type.RankBattleDoMatchingRotation, + "rotation_rank_battle/do_matching" + }, + { + Type.RankBattleDoMatchingUnlimited, + "unlimited_rank_battle/do_matching" + }, + { + Type.RankBattleDoMatchingCrossover, + "crossover_rank_battle/do_matching" + }, + { + Type.RankBattleFinishLoadRotation, + "rotation_rank_battle/finish_load" + }, + { + Type.RankBattleFinishLoadUnlimited, + "unlimited_rank_battle/finish_load" + }, + { + Type.RankBattleForceFinish, + "rank_battle/force_finish" + }, + { + Type.FreeBattleDoMatchingRotation, + "rotation_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingUnlimited, + "unlimited_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingPreRotation, + "pre_rotation_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingCrossover, + "crossover_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingMyRotation, + "my_rotation_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingAvatar, + "avatar_free_battle/do_matching" + }, + { + Type.FreeBattleFinishLoadRotation, + "rotation_free_battle/finish_load" + }, + { + Type.FreeBattleFinishLoadUnlimited, + "unlimited_free_battle/finish_load" + }, + { + Type.FreeBattleFinishLoadAvatar, + "avatar_free_battle/finish_load" + }, + { + Type.FreeMatchFinishRotation, + "rotation_free_battle/finish" + }, + { + Type.FreeMatchFinishCrossover, + "crossover_free_battle/finish" + }, + { + Type.FreeMatchFinishMyRotation, + "my_rotation_free_battle/finish" + }, + { + Type.FreeMatchFinishAvatar, + "avatar_free_battle/finish" + }, + { + Type.FreeMatchFinishUnlimited, + "unlimited_free_battle/finish" + }, + { + Type.FreeMatchFinishPreRotation, + "pre_rotation_free_battle/finish" + }, + { + Type.FreeBattleForceFinish, + "free_battle/force_finish" + }, + { + Type.OpenRoomBattleBattleDoMatching, + "open_room_battle/do_matching" + }, + { + Type.OpenRoomBattleBattleDoMatchingHOF, + "open_room_hof_battle/do_matching" + }, + { + Type.OpenRoomBattleFinishLoad, + "open_room_battle/finish_load" + }, + { + Type.OpenRoomMatchFinish, + "open_room_battle/finish" + }, + { + Type.OpenRoomBattleForceFinish, + "open_room_battle/force_finish" + }, + { + Type.EventRoomMatchFinish, + "open_room_offline_event_battle/finish" + }, + { + Type.OpenRoomBattle2PickBattleDoMatching, + "open_room_two_pick_battle/do_matching" + }, + { + Type.OpenRoom2PickMatchFinish, + "open_room_two_pick_battle/finish" + }, + { + Type.EventRoomBattleBattleDoMatching, + "open_room_offline_event_battle/do_matching" + }, + { + Type.EventRoomBattleFinishLoad, + "open_room_offline_event_battle/finish_load" + }, + { + Type.AIRotationRankBattleStart, + "ai_rotation_rank_battle/start" + }, + { + Type.AIRotationRankBattleFinish, + "ai_rotation_rank_battle/finish" + }, + { + Type.AIUnlimitedRankBattleStart, + "ai_unlimited_rank_battle/start" + }, + { + Type.AIUnlimitedRankBattleFinish, + "ai_unlimited_rank_battle/finish" + }, + { + Type.OpenRoomBattleCreateRoom, + "open_room/create_room" + }, + { + Type.OpenRoomBattleCloseRoom, + "open_room/close_room" + }, + { + Type.OpenRoomBattleKickRoom, + "open_room/kick_room" + }, + { + Type.OpenRoomBattleForceKickRoom, + "open_room/force_kick_room" + }, + { + Type.OpenRoomBattleSetDeck, + "open_room_battle/set_deck" + }, + { + Type.OpenRoomBattleEnterRoom, + "open_room/enter_room" + }, + { + Type.OpenRoomBattleLeaveRoom, + "open_room/leave_room" + }, + { + Type.OpenRoomBattleWatch, + "open_room/watch_room" + }, + { + Type.OpenRoomInitializeRoomBattle, + "open_room/initialize_room_battle" + }, + { + Type.OpenRoomDoWatch, + "open_room/do_watch" + }, + { + Type.OpenRoomForceClose, + "open_room/force_release_room" + }, + { + Type.OpenRoomGetRecoverParam, + "open_room/get_recovery_params" + }, + { + Type.RoomAbortRecovery, + "open_room/abort_recovery" + }, + { + Type.RoomGetHashTag, + "open_room/get_hash_tags" + }, + { + Type.EventRoomBattleCreateRoom, + "open_room_offline_event/create_room" + }, + { + Type.EventRoomBattleEnterRoom, + "open_room_offline_event/enter_room" + }, + { + Type.EventRoomBattleSetDeck, + "open_room_offline_event_battle/set_deck" + }, + { + Type.EventRoomInitializeRoomBattle, + "open_room_offline_event/initialize_room_battle" + }, + { + Type.EventRoomBattleLeaveRoom, + "open_room_offline_event/leave_room" + }, + { + Type.EventRoomBattleCloseRoom, + "open_room_offline_event/close_room" + }, + { + Type.EventRoomBattleKickRoom, + "open_room_offline_event/kick_room" + }, + { + Type.EventRoomBattleForceKickRoom, + "open_room_offline_event/force_kick_room" + }, + { + Type.EventRoomForceClose, + "open_room_offline_event/force_release_room" + }, + { + Type.EventRoomBattleWatch, + "open_room_offline_event/watch_room" + }, + { + Type.OpenRoom2PickBattleDeckReset, + "open_room_two_pick_battle/reset_deck" + }, + { + Type.OpenRoom2PickBattleBeginCreateDeck, + "open_room_two_pick_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickBattleSelectClass, + "open_room_two_pick_battle/select_class" + }, + { + Type.OpenRoom2PickBattleSelectCard, + "open_room_two_pick_battle/select_card_set" + }, + { + Type.OpenRoom2PickMultiBattleDeckReset, + "open_room_two_pick_multiple_battle/reset_deck" + }, + { + Type.OpenRoom2PickMultiBattleBeginCreateDeck, + "open_room_two_pick_multiple_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickMultiBattleSelectClass, + "open_room_two_pick_multiple_battle/select_class" + }, + { + Type.OpenRoom2PickMultiBattleSelectCard, + "open_room_two_pick_multiple_battle/select_card_set" + }, + { + Type.OpenRoomBattle2PickMultiBattleDoMatching, + "open_room_two_pick_multiple_battle/do_matching" + }, + { + Type.OpenRoom2PickMultiBattleMatchFinish, + "open_room_two_pick_multiple_battle/finish" + }, + { + Type.OpenRoom2PickMultiBattleDeckList, + "open_room_two_pick_multiple_battle/battle_result_list" + }, + { + Type.OpenRoomInitializeOwnerRoomRelations, + "open_room/initialize_owner_room_relations" + }, + { + Type.OpenRoom2PickDraftBattleDeckReset, + "open_room_two_pick_backdraft_battle/reset_deck" + }, + { + Type.OpenRoom2PickDraftBattleBeginCreateDeck, + "open_room_two_pick_backdraft_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickDraftBattleSelectClass, + "open_room_two_pick_backdraft_battle/select_class" + }, + { + Type.OpenRoom2PickDraftBattleSelectCard, + "open_room_two_pick_backdraft_battle/select_card_set" + }, + { + Type.OpenRoomBattle2PickDraftBattleDoMatching, + "open_room_two_pick_backdraft_battle/do_matching" + }, + { + Type.OpenRoomBattle2PickDraftFinishLoad, + "open_room_two_pick_backdraft_battle/finish_load" + }, + { + Type.OpenRoom2PickDraftMatchFinish, + "open_room_two_pick_backdraft_battle/finish" + }, + { + Type.OpenRoom2PickCubeBattleDoMatching, + "open_room_two_pick_cube_battle/do_matching" + }, + { + Type.OpenRoom2PickCubeBattleFinish, + "open_room_two_pick_cube_battle/finish" + }, + { + Type.OpenRoom2PickCubeBattleResetDeck, + "open_room_two_pick_cube_battle/reset_deck" + }, + { + Type.OpenRoom2PickCubeBattleBeginCreateDeck, + "open_room_two_pick_cube_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickCubeBattleSelectClass, + "open_room_two_pick_cube_battle/select_class" + }, + { + Type.OpenRoom2PickCubeBattleSelectCardSet, + "open_room_two_pick_cube_battle/select_card_set" + }, + { + Type.OpenRoom2PickCubeMultiBattleDoMatching, + "open_room_two_pick_cube_multiple_battle/do_matching" + }, + { + Type.OpenRoom2PickCubeMultiBattleFinish, + "open_room_two_pick_cube_multiple_battle/finish" + }, + { + Type.OpenRoom2PickCubeMultiBattleResetDeck, + "open_room_two_pick_cube_multiple_battle/reset_deck" + }, + { + Type.OpenRoom2PickCubeMultiBattleBeginCreateDeck, + "open_room_two_pick_cube_multiple_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickCubeMultiBattleSelectClass, + "open_room_two_pick_cube_multiple_battle/select_class" + }, + { + Type.OpenRoom2PickCubeMultiBattleSelectCardSet, + "open_room_two_pick_cube_multiple_battle/select_card_set" + }, + { + Type.OpenRoom2PickCubeDraftBattleDeckReset, + "open_room_two_pick_cube_backdraft_battle/reset_deck" + }, + { + Type.OpenRoom2PickCubeDraftBattleBeginCreateDeck, + "open_room_two_pick_cube_backdraft_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickCubeDraftBattleSelectClass, + "open_room_two_pick_cube_backdraft_battle/select_class" + }, + { + Type.OpenRoom2PickCubeDraftBattleSelectCard, + "open_room_two_pick_cube_backdraft_battle/select_card_set" + }, + { + Type.OpenRoomBattle2PickCubeDraftBattleDoMatching, + "open_room_two_pick_cube_backdraft_battle/do_matching" + }, + { + Type.OpenRoomBattle2PickCubeDraftFinishLoad, + "open_room_two_pick_cube_backdraft_battle/finish_load" + }, + { + Type.OpenRoom2PickCubeDraftMatchFinish, + "open_room_two_pick_cube_backdraft_battle/finish" + }, + { + Type.OpenRoom2PickChaosBattleDoMatching, + "open_room_two_pick_chaos_battle/do_matching" + }, + { + Type.OpenRoom2PickChaosBattleFinish, + "open_room_two_pick_chaos_battle/finish" + }, + { + Type.OpenRoom2PickChaosBattleResetDeck, + "open_room_two_pick_chaos_battle/reset_deck" + }, + { + Type.OpenRoom2PickChaosBattleBeginCreateDeck, + "open_room_two_pick_chaos_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickChaosBattleSelectClass, + "open_room_two_pick_chaos_battle/select_class" + }, + { + Type.OpenRoom2PickChaosBattleSelectCardSet, + "open_room_two_pick_chaos_battle/select_card_set" + }, + { + Type.OpenRoom2PickChaosMultiBattleDoMatching, + "open_room_two_pick_chaos_multiple_battle/do_matching" + }, + { + Type.OpenRoom2PickChaosMultiBattleFinish, + "open_room_two_pick_chaos_multiple_battle/finish" + }, + { + Type.OpenRoom2PickChaosMultiBattleResetDeck, + "open_room_two_pick_chaos_multiple_battle/reset_deck" + }, + { + Type.OpenRoom2PickChaosMultiBattleBeginCreateDeck, + "open_room_two_pick_chaos_multiple_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickChaosMultiBattleSelectClass, + "open_room_two_pick_chaos_multiple_battle/select_class" + }, + { + Type.OpenRoom2PickChaosMultiBattleSelectCardSet, + "open_room_two_pick_chaos_multiple_battle/select_card_set" + }, + { + Type.OpenRoom2PickChaosDraftBattleDeckReset, + "open_room_two_pick_chaos_backdraft_battle/reset_deck" + }, + { + Type.OpenRoom2PickChaosDraftBattleBeginCreateDeck, + "open_room_two_pick_chaos_backdraft_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickChaosDraftBattleSelectClass, + "open_room_two_pick_chaos_backdraft_battle/select_class" + }, + { + Type.OpenRoom2PickChaosDraftBattleSelectCard, + "open_room_two_pick_chaos_backdraft_battle/select_card_set" + }, + { + Type.OpenRoomBattle2PickChaosDraftBattleDoMatching, + "open_room_two_pick_chaos_backdraft_battle/do_matching" + }, + { + Type.OpenRoomBattle2PickChaosDraftFinishLoad, + "open_room_two_pick_chaos_backdraft_battle/finish_load" + }, + { + Type.OpenRoom2PickChaosDraftMatchFinish, + "open_room_two_pick_chaos_backdraft_battle/finish" + }, + { + Type.OpenRoomMultiDeckSet, + "deck/deck_entry" + }, + { + Type.OpenRoomMultiResetHistory, + "open_room/initialize_room_battle_history" + }, + { + Type.OpenRoomMultiGetHistory, + "open_room/get_score" + }, + { + Type.EventRoomMultiDeckSet, + "offline_event/deck_entry" + }, + { + Type.EventRoomMultiResetHistory, + "open_room_offline_event/initialize_room_battle_history" + }, + { + Type.OpenRoomMultiDeckBanDecideBan, + "open_room/ban_deck" + }, + { + Type.OpenRoomGetDeckHof, + "open_room_hof_battle/get_hof_deck_list" + }, + { + Type.OpenRoomSetDeckHof, + "open_room_hof_battle/set_deck" + }, + { + Type.OpenRoomMatchFinishHof, + "open_room_hof_battle/finish" + }, + { + Type.OpenRoomGetDeckWindFall, + "open_room_windfall_battle/get_windfall_deck_list" + }, + { + Type.OpenRoomSetDeckWindFall, + "open_room_windfall_battle/set_deck" + }, + { + Type.OpenRoomMatchFinishWindFall, + "open_room_windfall_battle/finish" + }, + { + Type.OpenRoomBattleBattleDoMatchingWindFall, + "open_room_windfall_battle/do_matching" + }, + { + Type.OpenRoomGetDeckAvatar, + "open_room_avatar_battle/get_avatar_deck_list" + }, + { + Type.OpenRoomSetDeckAvatar, + "open_room_avatar_battle/set_deck" + }, + { + Type.OpenRoomMatchFinishAvatar, + "open_room_avatar_battle/finish" + }, + { + Type.OpenRoomBattleDoMatchingAvatar, + "open_room_avatar_battle/do_matching" + }, + { + Type.GatheringRoomBattleSetDeck, + "gathering_room_battle/set_deck" + }, + { + Type.GatheringRoomBattleDoMatching, + "gathering_room_battle/do_matching" + }, + { + Type.GatheringRoomBattleFinish, + "gathering_room_battle/finish" + }, + { + Type.GatheringRoomCreateRoom, + "gathering_room/create_room" + }, + { + Type.GatheringRoomEnterRoom, + "gathering_room/enter_room" + }, + { + Type.GatheringRoomLeaveRoom, + "gathering_room/leave_room" + }, + { + Type.GatheringRoomLeaveRoomForTournament, + "gathering_room/leave_room_for_tournament" + }, + { + Type.GatheringRoomCloseRoom, + "gathering_room/close_room" + }, + { + Type.GatheringRoomEnterVacancyRoom, + "gathering_room/enter_vacancy_room" + }, + { + Type.GatheringRoomEnterRoomForTournament, + "gathering_room/enter_room_for_tournament" + }, + { + Type.GatheringRoomInitializeRoomBattle, + "gathering_room/initialize_room_battle" + }, + { + Type.GatheringRoomInitializeRoomBattleHistory, + "gathering_room/initialize_room_battle_history" + }, + { + Type.GatheringRoomKickRoom, + "gathering_room/kick_room" + }, + { + Type.GatheringRoomForceKickRoom, + "gathering_room/force_kick_room" + }, + { + Type.GatheringRoomForceKickRoomForTournament, + "gathering_room/force_kick_room_for_tournament" + }, + { + Type.GatheringRoomForceCloseRoom, + "gathering_room/force_release_room" + }, + { + Type.GatheringRoomGetHistory, + "gathering_room/get_score" + }, + { + Type.GatheringRoomDoWatch, + "gathering_room/do_watch" + }, + { + Type.GatheringRoomWatchRoom, + "gathering_room/watch_room" + }, + { + Type.GatheringRoomDeckEntry, + "gathering_room/deck_entry" + }, + { + Type.ArenaTwoPickTop, + "arena_two_pick/top" + }, + { + Type.ArenaTwoPickEntry, + "arena_two_pick/entry" + }, + { + Type.ArenaTwoPickClassCharaChoose, + "arena_two_pick/class_choose" + }, + { + Type.ArenaTwoPickCardChoose, + "arena_two_pick/card_choose" + }, + { + Type.ArenaTwoPickFinish, + "arena_two_pick/finish" + }, + { + Type.ArenaTwoPickRewardInfo, + "arena_two_pick/reward_info" + }, + { + Type.ArenaTwoPickRetire, + "arena_two_pick/retire" + }, + { + Type.ArenaTwoPickDoMatching, + "arena_two_pick_battle/do_matching" + }, + { + Type.ArenaTwoPickFinishLoad, + "arena_two_pick_battle/finish_load" + }, + { + Type.ArenaTwoPickFinishBattle, + "arena_two_pick_battle/finish" + }, + { + Type.ArenaTwoPickChaosDoMatching, + "arena_two_pick_chaos_battle/do_matching" + }, + { + Type.ArenaTwoPickChaosFinishBattle, + "arena_two_pick_chaos_battle/finish" + }, + { + Type.ArenaTwoPickCubeDoMatching, + "arena_two_pick_cube_battle/do_matching" + }, + { + Type.ArenaTwoPickCubeFinishBattle, + "arena_two_pick_cube_battle/finish" + }, + { + Type.ArenaSealedTop, + "arena_sealed/top" + }, + { + Type.ArenaSealedEntry, + "arena_sealed/entry" + }, + { + Type.ArenaSealedSelectClass, + "arena_sealed/select_class" + }, + { + Type.ArenaSealedGetCardPackInfo, + "arena_sealed/pack_info" + }, + { + Type.ArenaSealedGetCardInfo, + "arena_sealed/get_card_list" + }, + { + Type.ArenaSealedUpdateDeck, + "arena_sealed/update_deck" + }, + { + Type.ArenaSealedGetMaintCardList, + "arena_sealed/get_card_maintenance_list" + }, + { + Type.ArenaSealedRetire, + "arena_sealed/retire" + }, + { + Type.ArenaSealedFinish, + "arena_sealed/finish" + }, + { + Type.ArenaSealedSelectPhantomCard, + "arena_sealed/select_phantom_card" + }, + { + Type.ArenaSealedBattleDoMatching, + "arena_sealed_battle/do_matching" + }, + { + Type.ArenaSealedBattleFinish, + "arena_sealed_battle/finish" + }, + { + Type.ChallangeHistory, + "arena/get_challenge_info" + }, + { + Type.ChallangeRankingHistory, + "arena/get_challenge_ranking_history" + }, + { + Type.ColosseumTop, + "arena_colosseum/top" + }, + { + Type.ColosseumEntry, + "arena_colosseum/entry" + }, + { + Type.ColosseumEntryInfo, + "arena_colosseum/get_fee_info" + }, + { + Type.ColosseumDeckEntry, + "arena_colosseum/register_deck" + }, + { + Type.ColosseumDetail, + "arena_colosseum/event_info" + }, + { + Type.ColosseumRetireNormalRound, + "arena_colosseum/retire" + }, + { + Type.ColosseumFinishAttachedReward, + "arena_colosseum/finish" + }, + { + Type.ColosseumTwoPickClassInit, + "arena_colosseum/get_candidate_classes" + }, + { + Type.ColosseumTwoPickClassSet, + "arena_colosseum/class_choose" + }, + { + Type.ColosseumTwoPickCardGet, + "arena_colosseum/get_candidate_cards" + }, + { + Type.ColosseumTwoPickCardSet, + "arena_colosseum/card_choose" + }, + { + Type.ColosseumHOFDeckInfo, + "arena_colosseum/get_hof_deck_list" + }, + { + Type.ColosseumHOFDeckEntry, + "arena_colosseum/register_hof_deck" + }, + { + Type.ColosseumWindFallDeckInfo, + "arena_colosseum/get_windfall_deck_list" + }, + { + Type.ColosseumWindFallDeckEntry, + "arena_colosseum/register_windfall_deck" + }, + { + Type.ColosseumAvatarDeckInfo, + "arena_colosseum/get_avatar_deck_list" + }, + { + Type.ColosseumAvatarDeckEntry, + "arena_colosseum/register_avatar_deck" + }, + { + Type.ColosseumDoMatching, + "colosseum_battle/do_matching" + }, + { + Type.ColosseumBattleFinishLoad, + "colosseum_battle/finish_load" + }, + { + Type.ColosseumBattleFinish, + "colosseum_battle/finish" + }, + { + Type.ColosseumDoMatchingRankMatch, + "colosseum_rank_battle/do_matching" + }, + { + Type.ColosseumBattleFinishLoadRankMatch, + "colosseum_rank_battle/finish_load" + }, + { + Type.ColosseumBattleFinishRankMatch, + "colosseum_rank_battle/finish" + }, + { + Type.PackInfo, + "pack/info" + }, + { + Type.PackInfoTutorial, + "tutorial/pack_info" + }, + { + Type.PackOpen, + "pack/open" + }, + { + Type.PackOpenTutorial, + "tutorial/pack_open" + }, + { + Type.GetSelectSkinOwnedStatus, + "pack/get_leader_skin_owned_status" + }, + { + Type.PackSetRotationStarterClass, + "pack/set_rotation_starter_class" + }, + { + Type.GachaPointInfo, + "pack/get_gacha_point_rewards" + }, + { + Type.GachaPointExchange, + "pack/exchange_gacha_point" + }, + { + Type.BuildDeckInfo, + "build_deck/info" + }, + { + Type.BuildDeckBuy, + "build_deck/buy" + }, + { + Type.BuildDeckGetPurchaseCount, + "build_deck/get_purchase_count" + }, + { + Type.SkinInfo, + "leader_skin/products" + }, + { + Type.SkinBuySingle, + "leader_skin/buy" + }, + { + Type.SkinBuyMulti, + "leader_skin/buy_set" + }, + { + Type.SkinBuyMultiReward, + "leader_skin/buy_set_item" + }, + { + Type.SleeveInfo, + "sleeve/info" + }, + { + Type.SleeveBuy, + "sleeve/buy" + }, + { + Type.SleeveList, + "sleeve/sleeve_list" + }, + { + Type.SleeveFavorite, + "sleeve/favorite" + }, + { + Type.ItemPurchaseInfo, + "item_purchase/info" + }, + { + Type.ItemPurchaseBuy, + "item_purchase/purchase" + }, + { + Type.SpotCardInfo, + "spot_card_exchange/top" + }, + { + Type.SpotCardExchange, + "spot_card_exchange/exchange" + }, + { + Type.MissionInfo, + "mission/info" + }, + { + Type.MissionReceiveReward, + "mission/receive_reward" + }, + { + Type.MissionRetire, + "mission/retire" + }, + { + Type.MissionBuyAdditionalRight, + "mission/buy_additional_right" + }, + { + Type.MissionChangeReceiveSetting, + "mission/change_receive_setting" + }, + { + Type.BeginnerMissionInfo, + "beginner_mission/info" + }, + { + Type.BeginnerMissionSendApply, + "beginner_mission/send_apply" + }, + { + Type.AchievementReceiveReward, + "achievement/receive_reward" + }, + { + Type.NameUpdate, + "account/update_name" + }, + { + Type.RegionCodeUpdate, + "account/update_region_code" + }, + { + Type.OfficialMarkDisplay, + "profile/update_official_mark_display" + }, + { + Type.ConfigUpdate, + "config/update" + }, + { + Type.ArenaConfigUpdate, + "config/update_challenge_config" + }, + { + Type.ConfigUpdateFoilPreferred, + "config/update_foil_preferred" + }, + { + Type.ConfigUpdatePrizePreferred, + "config/update_prize_preferred" + }, + { + Type.DebugCacheClear, + "debug/memcache_flush" + }, + { + Type.DebugPlusRupy, + "debug/plus_rupy" + }, + { + Type.DebugPlusFrupy, + "debug/plus_frupy" + }, + { + Type.DebugResetRupy, + "debug/reset_rupy" + }, + { + Type.DebugResetFrupy, + "debug/reset_frupy" + }, + { + Type.DebugUpdateCard, + "debug/update_card" + }, + { + Type.DebugUpdateCard1, + "debug/update_card_1" + }, + { + Type.DebugUpdateCard2, + "debug/update_card_2" + }, + { + Type.DebugResetCard, + "debug/reset_card" + }, + { + Type.DebugResetSleeve, + "debug/reset_sleeve" + }, + { + Type.DebugReleaseClassChara, + "debug/release_class_chara" + }, + { + Type.DebugAddBattlePoint, + "rank_match/add_battle_point" + }, + { + Type.DebugTutorialUpdate, + "tutorial/debug_update" + }, + { + Type.EmblemInfo, + "emblem/emblem_list" + }, + { + Type.EmblemUpdate, + "emblem/update_emblem" + }, + { + Type.EmblemFavorite, + "emblem/favorite" + }, + { + Type.DegreeInfo, + "degree/degree_list" + }, + { + Type.DegreeUpdate, + "degree/update_degree" + }, + { + Type.DegreeFavorite, + "degree/favorite" + }, + { + Type.LeaderSkinInfo, + "leader_skin/ids" + }, + { + Type.LeaderSkinUpdate, + "leader_skin/set" + }, + { + Type.RankingPeriodList, + "ranking/get_viewable_ranking_period_list" + }, + { + Type.RankingRankMatchClassInfoRotation, + "ranking/rank_match_class_win_rotation_info" + }, + { + Type.RankingRankMatchClassInfoUnlimited, + "ranking/rank_match_class_win_unlimited_info" + }, + { + Type.RankingRankMatchClassInfoCrossover, + "ranking/rank_match_class_win_crossover_info" + }, + { + Type.RankingMasterInfoRotation, + "ranking/master_point_rotation_info" + }, + { + Type.RankingMasterInfoUnlimited, + "ranking/master_point_unlimited_info" + }, + { + Type.RankingMasterInfoCrossover, + "ranking/master_point_crossover_info" + }, + { + Type.RankingTwoPickInfo, + "ranking/two_pick_win_info" + }, + { + Type.RankingSealedInfo, + "ranking/sealed_all_win_info" + }, + { + Type.RankingMasterMyHistories, + "ranking/my_master_point_histories" + }, + { + Type.ItemAcquireHistoryInfo, + "item_acquire_history/info" + }, + { + Type.PracticeInfo, + "practice/info" + }, + { + Type.PracticeStart, + "practice/start" + }, + { + Type.PracticeFinish, + "practice/finish" + }, + { + Type.PracticePuzzleList, + "basic_puzzle/open_puzzle_dialog" + }, + { + Type.PracticePuzzleInfo, + "basic_puzzle/info" + }, + { + Type.PracticePuzzleBattleStart, + "basic_puzzle/start" + }, + { + Type.PracticePuzzleBattleFinish, + "basic_puzzle/finish" + }, + { + Type.PracticePuzzleMissionList, + "basic_puzzle/mission" + }, + { + Type.CountryCodeSet, + "config/update_country_code" + }, + { + Type.SendAllTraceLog, + "rank_battle/add_all_client_log" + }, + { + Type.SendTraceLog, + "rank_battle/add_client_log" + }, + { + Type.SendLastTraceLog, + "rank_battle/add_last_turn_log" + }, + { + Type.GetDeckInfoFromDeckCode, + "deck?format=msgpack" + }, + { + Type.GenerateDeckCode, + "deck_code?format=msgpack" + }, + { + Type.GenerateDeckImage, + "deck_image?lang={0}&format=msgpack" + }, + { + Type.GenerateDeckImageMaintenance, + "deck/image" + }, + { + Type.InviteGetFriendList, + "friend_battle/friend_list" + }, + { + Type.InviteFriend, + "friend_battle/invite" + }, + { + Type.InviteGetList, + "friend_battle/invitation_list" + }, + { + Type.InviteCancel, + "friend_battle/cancel" + }, + { + Type.InviteAccept, + "friend_battle/accept" + }, + { + Type.InviteConfigUpdate, + "config/update_config" + }, + { + Type.ReplayInfo, + "replay/info" + }, + { + Type.ReplayDetail, + "replay/detail" + }, + { + Type.GrandMaster, + "profile/get_grand_master_data" + }, + { + Type.MasterResetMonth, + "rank_battle/get_latest_master_point" + }, + { + Type.BattleReport, + "report/battle_report" + }, + { + Type.Vote, + "vote/execute" + }, + { + Type.VoteData, + "vote/info" + }, + { + Type.AcceptAgreement, + "check/accept_agreement" + }, + { + Type.CheckSpecialTitle, + "check/special_title" + }, + { + Type.ClientCacheClear, + "npc_battle/client_cache_clear" + }, + { + Type.DeleteUserData, + "account/delete_user_data" + }, + { + Type.LotteryInfo, + "lottery/info" + }, + { + Type.LotteryReceive, + "lottery/Receive" + }, + { + Type.LotteryReceiveDoubleChance, + "lottery/receive_double_chance" + }, + { + Type.LotteryReceiveBigChance, + "lottery/receive_big_chance" + }, + { + Type.LotteryReceiveTweetData, + "lottery/receive_tweet_reward" + }, + { + Type.GatheringCreate, + "gathering/create" + }, + { + Type.GatheringGetInfo, + "gathering/search" + }, + { + Type.GatheringEntry, + "gathering/join" + }, + { + Type.GatheringLeave, + "gathering/leave" + }, + { + Type.GatheringSelfInfo, + "gathering/info" + }, + { + Type.GatheringInvite, + "gathering/send_invite" + }, + { + Type.GatheringInviteCancel, + "gathering/cancel_invite" + }, + { + Type.GatheringInviteReject, + "gathering/reject_invite" + }, + { + Type.GatheringFriendList, + "gathering/friend_list" + }, + { + Type.GatheringInviteUserList, + "gathering/send_invite_list" + }, + { + Type.GatheringConfirmDeckList, + "gathering/confirm_deck_list" + }, + { + Type.GatheringDeckList, + "gathering/deck_list" + }, + { + Type.GatheringUpdateDeckName, + "gathering/update_deck_name" + }, + { + Type.GatheringUpdateDeckSleeve, + "gathering/update_deck_sleeve" + }, + { + Type.GatheringUpdateDeckLeaderSkin, + "gathering/update_deck_leader_skin" + }, + { + Type.GatheringUpdateDeckRandomLeaderSkin, + "gathering/update_deck_random_leader_skin" + }, + { + Type.GatheringInterrupt, + "gathering/interrupt" + }, + { + Type.GatheringGetReceiveInvite, + "gathering/receive_invite_list" + }, + { + Type.GatheringRanking, + "gathering/ranking" + }, + { + Type.GatheringKick, + "gathering/kick_member" + }, + { + Type.GatheringUpdateDescription, + "gathering/update_description" + }, + { + Type.GatheringInfoDependJoin, + "gathering/refresh" + }, + { + Type.GatheringTournamentInfo, + "gathering/tournament_info" + }, + { + Type.GatheringChatPost, + "gathering_chat/post" + }, + { + Type.GatheringChatMessages, + "gathering_chat/messages" + }, + { + Type.GatheringChatAddDeck, + "gathering_chat/add_deck" + }, + { + Type.GatheringChatAddReplay, + "gathering_chat/add_replay" + }, + { + Type.GatheringChatReplayDetail, + "gathering_chat/replay_detail" + }, + { + Type.GatheringChatDeckLog, + "gathering_chat/deck_log" + }, + { + Type.GatheringChatDeleteDeck, + "gathering_chat/delete_deck" + }, + { + Type.BattlePassInfo, + "battle_pass/info" + }, + { + Type.BattlePassItemList, + "battle_pass/item_list" + }, + { + Type.BattlePassBuy, + "battle_pass/buy" + }, + { + Type.AdjustSettingUpdate, + "adjust/update_adjust_config" + }, + { + Type.CompetitionLobbyInfo, + "arena_competition/top" + }, + { + Type.CompetitionRetire, + "arena_competition/retire" + }, + { + Type.CompetitionFinish, + "arena_competition/finish" + }, + { + Type.CompetitionBattleDoMatching, + "competition_battle/do_matching" + }, + { + Type.CompetitionBattleDoMatchingRankMatch, + "competition_rank_battle/do_matching" + }, + { + Type.CompetitionBattleFinish, + "competition_battle/finish" + }, + { + Type.CompetitionBattleFinishRankMatch, + "competition_rank_battle/finish" + }, + { + Type.CompetitionEntry, + "arena_competition/entry" + }, + { + Type.CompetitionRegisterDeck, + "arena_competition/register_deck" + }, + { + Type.CompetitionCheckPeriod, + "arena_competition/check_schedule" + }, + { + Type.CompetitionJoin, + "arena_competition/join" + }, + { + Type.CompetitionPermanentEntry, + "arena_competition/permanent_entry" + }, + { + Type.CompetitionClassChoose, + "arena_competition/class_choose" + }, + { + Type.CompetitionCardChoose, + "arena_competition/card_choose" + }, + { + Type.CompetitionSetCurrentDeck, + "arena_competition/set_current_deck_no" + }, + { + Type.BingoInfo, + "bingo/info" + }, + { + Type.BingoDraw, + "bingo/draw" + }, + { + Type.BingoReceiveTweetData, + "bingo/receive_tweet_reward" + }, + { + Type.CrossoverInfo, + "crossover/info" + }, + { + Type.CrossoverReceiveRankReward, + "crossover/receive_rank_reward" + }, + { + Type.CrossoverReceiveAllRankRewards, + "crossover/receive_all_rank_rewards" + }, + { + Type.CrossoverRankingMasterMyHistories, + "crossover/my_master_point_histories" + }, + { + Type.CrossoverGrandMaster, + "crossover/get_grand_master_data" + }, + { + Type.NeutralPopularityVoteInfo, + "card_vote/info" + }, + { + Type.NeutralPopularityVoteExecute, + "card_vote/vote" + }, + { + Type.LeaderPopularityVoteInfo, + "leader_skin_vote/info" + }, + { + Type.LeaderPopularityVoteExecute, + "leader_skin_vote/vote" + }, + { + Type.AccountDeleteReserve, + "account_delete_reservation/reserve" + }, + { + Type.AccountDeleteCancel, + "account_delete_reservation/cancel" + }, + { + Type.BossRushLobbyInfo, + "bossrush/base" + }, + { + Type.BossRushRegisterDeck, + "bossrush/register_deck" + }, + { + Type.BossRushSetAbility, + "bossrush/set_ability" + }, + { + Type.BossRushReceiveReward, + "bossrush/receive_reward" + }, + { + Type.BossRushRetire, + "bossrush/retire" + }, + { + Type.BossRushStart, + "bossrush/start" + }, + { + Type.BossRushHiddenBattleStart, + "bossrush/start_hidden_boss_battle" + }, + { + Type.BossRushFinish, + "bossrush/finish" + }, + { + Type.BossRushHiddenBattleFinish, + "bossrush/finish_hidden_boss_battle" + }, + { + Type.BossRushLoseFinish, + "bossrush/lose_finish_challange" + }, + { + Type.BossRushClearDeckList, + "bossrush/clear_deck_info" + }, + { + Type.ReceiveUpgradeTreasureBox, + "upgrade_treasure_box_campaign/receive_upgrade_treasure_box" + }, + { + Type.TreasureOpenSpecialTreasureBox, + "treasure/open_special_treasure" + }, + { + Type.FreeCardPackBoxFinish, + "free_card_pack_box_campaign/finish" + }, + { + Type.RedEtherCampaignLobby, + "red_ether_campaign/info" + }, + { + Type.TransitionInfo, + "account/get_account_transition_status_with_two" + }, + { + Type.TransitionPublish, + "account/publish_account_transition_code_with_two" + }, + { + Type.TransitionDelete, + "account/delete_account_transition_code_with_two" + }, + { + Type.CheckTimeSlipRotationPeriod, + "check/check_time_slip_card_master_hash" + } + }; +} diff --git a/SVSim.BattleEngine/Engine/ApplySkillTargetFilterCollection.cs b/SVSim.BattleEngine/Engine/ApplySkillTargetFilterCollection.cs new file mode 100644 index 0000000..481d5a4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ApplySkillTargetFilterCollection.cs @@ -0,0 +1,90 @@ +using System.Collections.Generic; +using System.Linq; +using Wizard; +using Wizard.Battle; + +public class ApplySkillTargetFilterCollection : SkillFilterCollectionBase +{ + public List ApplyCustomSelectFilterList { get; set; } + + public List ApplyExclutionFilterList { get; private set; } + + public ISkillSelectFilter ApplySelectFilter { get; set; } + + public List ApplyAndFilter { get; set; } + + public ApplySkillTargetFilterCollection() + { + ApplyCustomSelectFilterList = new List(); + ApplyExclutionFilterList = new List(); + ApplyAndFilter = new List(); + } + + public List Filtering(BattlePlayerReadOnlyInfoPair pair, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue) + { + List list = new List(); + List AndFilterTargets = new List(); + IEnumerable battlePlayerInfos = null; + if (ApplyAndFilter.Count <= 0) + { + if (base.BattlePlayerFilter != null) + { + battlePlayerInfos = base.BattlePlayerFilter.Filtering(pair); + } + if (base.TargetFilter != null) + { + list = base.TargetFilter.Filtering(battlePlayerInfos, checkerOption).ToList(); + if (BattleManagerBase.GetIns().XorShiftRandom(isSelf: true) != null && BattleManagerBase.GetIns().XorShiftRandom(isSelf: false) == null && !pair.ReadOnlySelf.IsPlayer && (base.TargetFilter is SkillTargetInHandCardFilter || base.TargetFilter is SkillTargetReturnCardFilter || base.TargetFilter is SkillTargetTokenDrawCardFilter)) + { + return list; + } + } + foreach (ISkillCardFilter cardFilter in base.CardFilterList) + { + list = cardFilter.Filtering(list, optionValue).ToList(); + } + int i = 0; + for (int count = ApplyCustomSelectFilterList.Count; i < count; i++) + { + list = ApplyCustomSelectFilterList[i].Filtering(list, battlePlayerInfos, checkerOption).ToList(); + } + for (int j = 0; j < ApplyExclutionFilterList.Count; j++) + { + list = ApplyExclutionFilterList[j].Filtering(list, battlePlayerInfos, checkerOption, optionValue).ToList(); + } + } + else + { + for (int k = 0; k < ApplyAndFilter.Count; k++) + { + List cards = ApplyAndFilter[k].Filtering(pair, checkerOption, optionValue).Cast().ToList(); + List collection = (from IReadOnlyBattleCardInfo x in ApplyAndFilter[k].SelectFilter.Filtering(cards, optionValue, checkerOption) + where !AndFilterTargets.Contains(x) + select x).ToList(); + AndFilterTargets.AddRange(collection); + } + } + List list2 = list.ToList(); + list2.AddRange(AndFilterTargets); + return list2; + } + + public bool SimpleFiltering(IReadOnlyBattleCardInfo targetCard, BattlePlayerReadOnlyInfoPair pair, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue) + { + List list = new List { targetCard }; + IEnumerable battlePlayerInfos = base.BattlePlayerFilter.Filtering(pair); + for (int i = 0; i < base.CardFilterList.Count; i++) + { + list = base.CardFilterList[i].Filtering(list, optionValue).ToList(); + } + for (int j = 0; j < ApplyCustomSelectFilterList.Count; j++) + { + list = ApplyCustomSelectFilterList[j].Filtering(list, battlePlayerInfos, checkerOption).ToList(); + } + for (int k = 0; k < ApplyExclutionFilterList.Count; k++) + { + list = ApplyExclutionFilterList[k].Filtering(list, battlePlayerInfos, checkerOption, optionValue).ToList(); + } + return list.Count() > 0; + } +} diff --git a/SVSim.BattleEngine/Engine/AreaBGInfo.cs b/SVSim.BattleEngine/Engine/AreaBGInfo.cs new file mode 100644 index 0000000..91272c3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaBGInfo.cs @@ -0,0 +1,95 @@ +using System.Collections.Generic; +using UnityEngine; + +public class AreaBGInfo : MonoBehaviour +{ + private readonly List _chapterExtraDatas = new List + { + new ChapterExtraData + { + SectionId = 2, + ExtraTextureChapter = 10, + BGExtraEffectPath = "scn_map_change_1", + SeType = Se.TYPE.SE_MAP_TREE_EFFECT + }, + new ChapterExtraData + { + SectionId = 2, + ExtraTextureChapter = 11, + ExtraTextureIndex = { 1, 2 }, + BGSuffix = "b" + }, + new ChapterExtraData + { + SectionId = 2, + ExtraTextureChapter = 12, + ExtraTextureIndex = { 1, 2 }, + BGSuffix = "b" + }, + new ChapterExtraData + { + SectionId = 1, + ExtraTextureChapter = 4, + BGExtraEffectPath = "scn_map_change_1", + SeType = Se.TYPE.SE_MAP_TREE_EFFECT, + ClanType = CardBasePrm.ClanType.NEMESIS + }, + new ChapterExtraData + { + SectionId = 1, + ExtraTextureChapter = 5, + ExtraTextureIndex = { 1, 2 }, + BGSuffix = "b", + ClanType = CardBasePrm.ClanType.NEMESIS + }, + new ChapterExtraData + { + SectionId = 1, + ExtraTextureChapter = 6, + ExtraTextureIndex = { 1, 2 }, + BGSuffix = "b", + ClanType = CardBasePrm.ClanType.NEMESIS + }, + new ChapterExtraData + { + SectionId = 9, + ExtraTextureChapter = 1, + BGSectionId = 4, + BGExtraEffectPath = "scn_map_change_4", + BGFirstClearEffectPath = "scn_map_change_2", + FirstClearSeType = Se.TYPE.SE_MAP_SECTION9_CHAPTER1, + SeType = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER, + ChapterMoveTime = 0f, + FirstClearEffectDelayTime = 1.2f, + FirstClearMoveOutDelayTime = 0.5f + }, + new ChapterExtraData + { + SectionId = 9, + ExtraTextureChapter = 2, + BGSectionId = 7, + BGExtraEffectPath = "scn_map_change_4", + BGFirstClearEffectPath = "scn_map_change_3", + FirstClearSeType = Se.TYPE.SE_MAP_SECTION9_CHAPTER2, + SeType = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER, + FirstClearEffectDelayTime = 1.2f, + FirstClearMoveDelayTime = 1f + }, + new ChapterExtraData + { + SectionId = 9003, + ExtraTextureIndex = { 1, 2 }, + BGSuffix = "c" + } + }; + + public List GetExtraChapters(int sectionId, int? selectStoryClassId) + { + List list = _chapterExtraDatas.FindAll((ChapterExtraData item) => item.SectionId == sectionId); + if (sectionId == 20) + { + list.AddRange(AreaBGInfoSection20.GetChapterExtraDatas()); + } + return list.FindAll((ChapterExtraData item) => (CardBasePrm.ClanType?)item.ClanType == (CardBasePrm.ClanType?)selectStoryClassId || item.ClanType == CardBasePrm.ClanType.NONE); + } +} diff --git a/SVSim.BattleEngine/Engine/AreaBGInfoSection20.cs b/SVSim.BattleEngine/Engine/AreaBGInfoSection20.cs new file mode 100644 index 0000000..137abd2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaBGInfoSection20.cs @@ -0,0 +1,127 @@ +using System.Collections.Generic; +using Cute; + +public class AreaBGInfoSection20 +{ + public const int SECTION_ID = 20; + + public const int WERUSA_START = 10; + + private const int WERUSA_END = 17; + + private const int WERUSA_BG_SECTION_ID = 12; + + private const int LEVIRU_START = 18; + + private const int LEVIRU_END = 25; + + private const int LEVIRU_BG_SECTION_ID = 10; + + private const int IZUNIA_CHANGE_TEXTURE_START = 3; + + private const int IZUNIA_END = 9; + + private const int IZUNIA_BG_SECTION_ID = 2; + + public const int NATERA_START = 26; + + private const int NATERA_END = 33; + + private const int NATERA_BG_SECTION_ID = 9; + + private const int LAST_BATTLE_START = 34; + + private const int LAST_BATTLE_END = 40; + + private const int LAST_BATTLE_BG_SECTION_ID = 20; + + public static List GetChapterExtraDatas() + { + List list = new List(); + list.AddRange(Chapter1_2()); + list.AddRange(Chapter3_9()); + list.AddRange(OtherWorldChapters(10, 17, 12, new List { 1, 2, 6, 7 }, addTreeEffect: true)); + list.AddRange(OtherWorldChapters(18, 25, 10, new List { 1, 2 }, addTreeEffect: true)); + list.AddRange(OtherWorldChapters(26, 33, 9, new List { 2, 3, 4, 7, 8, 9 }, addTreeEffect: true)); + list.AddRange(OtherWorldChapters(34, 40, 20, null, addTreeEffect: false)); + return list; + } + + private static List OtherWorldChapters(int start, int end, int section, List extraTextureIndex, bool addTreeEffect) + { + List list = new List(); + for (int i = start; i <= end; i++) + { + ChapterExtraData chapterExtraData = new ChapterExtraData + { + SectionId = 20, + ExtraTextureChapter = i, + BGSectionId = section + }; + chapterExtraData.AddTreeEffect = addTreeEffect; + if (i == 17 || i == 25 || i == 33) + { + chapterExtraData.BGExtraEffectPath = "scn_map_change_9"; + chapterExtraData.SeType = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER; + } + if (extraTextureIndex.IsNotNullOrEmpty()) + { + chapterExtraData.ExtraTextureIndex = extraTextureIndex; + chapterExtraData.BGSuffix = "b"; + } + list.Add(chapterExtraData); + } + return list; + } + + private static List Chapter1_2() + { + return new List + { + new ChapterExtraData + { + SectionId = 20, + ExtraTextureChapter = 1, + BGExtraEffectPath = "scn_map_change_9", + SeType = Se.TYPE.SE_MAP_SECTION20_CHANGE_CHAPTER1 + }, + new ChapterExtraData + { + SectionId = 20, + ExtraTextureChapter = 2, + BGExtraEffectPath = "scn_map_change_8", + AttachExtraEffectToBgRoot = true, + SeType = Se.TYPE.SE_MAP_TREE_EFFECT + } + }; + } + + private static List Chapter3_9() + { + List list = new List(); + for (int i = 3; i <= 9; i++) + { + ChapterExtraData chapterExtraData = new ChapterExtraData + { + SectionId = 20, + ExtraTextureChapter = i, + ExtraTextureIndex = { 1, 2, 6 }, + BGSectionId = 2, + BGSuffix = "b" + }; + if (i == 9) + { + chapterExtraData.BGExtraEffectPath = "scn_map_change_9"; + chapterExtraData.SeType = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER; + } + list.Add(chapterExtraData); + } + return list; + } + + public static bool IsSpeedUpParticleTransition(int previousChapter, int nextChapter) + { + bool flag = previousChapter == 33 && nextChapter == 32; + return previousChapter == 0 || flag; + } +} diff --git a/SVSim.BattleEngine/Engine/AreaSelInfo.cs b/SVSim.BattleEngine/Engine/AreaSelInfo.cs new file mode 100644 index 0000000..0f282ed --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaSelInfo.cs @@ -0,0 +1,530 @@ +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; + +public class AreaSelInfo : MonoBehaviour +{ + private enum eTableCategory + { + CARD, + SLEEVE, + OTHER, + MAX + } + + private const float LEFTSTAGEINFO_X_IN = 0f; + + private const float LEFTSTAGEINFO_X_OUT = -1120f; + + private const int CLEARPRESENT_MAX = 3; + + private static readonly Vector3 CLEARPRESENT_CARD_COLLISIONSIZE = new Vector3(175f, 230f, 1f); + + private const int CLEARPRESENT_CARD_DEPTHOFFSET = 50; + + private const int CLEARPRESENT_RESOURCELIST_CAPACITY = 2; + + private static readonly string[] CLEARPRESENT_NAME = new string[10] { "", "Common_0205", "", "Common_0201", "", "", "", "", "", "Common_0115" }; + + private static readonly string[] CLEARPRESENT_THUMBNAIL_SPRITENAME = new string[10] { "", "thumbnail_liquid", "", "thumbnail_crystal", "", "", "thumbnail_card", "thumbnail_emblem", "thumbnail_title", "thumbnail_rupy" }; + + private readonly Vector3 REWARD_TABLE_DEFAULT_POSITION = new Vector3(45f, -85.3f, 0f); + + private readonly Vector3 REWARD_TABLE_CARD_POSITION = new Vector3(28.5f, -85.3f, 0f); + + private const float TABLE_CONTAINS_CARD_REWARD_OFFSET_X = -16f; + + private const int REWARD_BG_BASIC_WIDTH = 250; + + private const int REWARD_BG_OFFSET_WIDTH_PER_GOODS = 90; + + private readonly Dictionary REWARD_BG_OFFSET_MAGNIFICATION = new Dictionary + { + { + UserGoods.Type.Degree, + 2f + }, + { + UserGoods.Type.Card, + 1.2f + }, + { + UserGoods.Type.Sleeve, + 1.2f + }, + { + UserGoods.Type.Skin, + 1.2f + }, + { + UserGoods.Type.RedEther, + 1f + }, + { + UserGoods.Type.Rupy, + 1f + }, + { + UserGoods.Type.Item, + 1f + }, + { + UserGoods.Type.Emblem, + 1f + } + }; + + private const float LABEL_ONLY_DEGREE_OFFSET_Y = -10f; + + [SerializeField] + private GameObject _clearRewardPrefab; + + private List _clearRewardList = new List(); + + [SerializeField] + private UITable _tableRoot; + + [SerializeField] + private UITable[] _tableRewardsCategory = new UITable[3]; + + [SerializeField] + private GameObject _cardObjEvacuationRoot; + + [SerializeField] + private UISprite _spriteRewardBackground; + + [SerializeField] + private UILabel _labelAcquired; + + private List _cardObjList = new List(); + + [SerializeField] + private GameObject CardDetailRoot; + + [SerializeField] + private CardDetailUI CardDetailPrefab; + + private CardDetailUI _cardDetail; + + private List _loadFileList = new List(); + + private bool _isLoadEnd = true; + + public void SetClearPresent(StoryChapterData chapterData) + { + if (chapterData == null || chapterData.Rewards == null) + { + return; + } + if (chapterData.Rewards.Length != 0) + { + base.gameObject.SetActive(value: true); + bool isCleared = chapterData.IsCleared; + for (int i = 0; i < _clearRewardList.Count; i++) + { + _clearRewardList[i].gameObject.SetActive(value: false); + } + List list = new List(); + for (int j = 0; j < chapterData.Rewards.Length; j++) + { + StoryChapterData.StoryReward storyReward = chapterData.Rewards[j]; + if (storyReward == null) + { + continue; + } + if (j >= _clearRewardList.Count) + { + break; + } + if (storyReward.RewardType == 5) + { + if (list.Contains(storyReward.RewardUserGoodsId)) + { + continue; + } + list.Add(storyReward.RewardUserGoodsId); + } + _clearRewardList[j].gameObject.SetActive(value: true); + _clearRewardList[j].ShowReward((UserGoods.Type)storyReward.RewardType, storyReward.RewardUserGoodsId, storyReward.RewardNumber, isCleared); + } + RepositionRewards(); + SetRewardBackgroundWidth(); + SetAcquiredLabel(isCleared); + } + else + { + base.gameObject.SetActive(value: false); + } + } + + private void RepositionRewards() + { + for (int i = 0; i < _tableRewardsCategory.Length; i++) + { + _tableRewardsCategory[i].gameObject.SetActive(value: false); + } + for (int j = 0; j < _clearRewardList.Count; j++) + { + if (_clearRewardList[j].gameObject.activeSelf) + { + int num = _clearRewardList[j].RewardGoodsType switch + { + UserGoods.Type.Card => 0, + UserGoods.Type.Sleeve => 1, + _ => 2, + }; + Transform obj = _clearRewardList[j].gameObject.transform; + obj.SetParent(_tableRewardsCategory[num].transform); + obj.SetAsLastSibling(); + _tableRewardsCategory[num].gameObject.SetActive(value: true); + } + } + for (int k = 0; k < _tableRewardsCategory.Length; k++) + { + if (_tableRewardsCategory[k].gameObject.activeInHierarchy) + { + _tableRewardsCategory[k].Reposition(); + } + } + _tableRoot.Reposition(); + if (_tableRewardsCategory[0].gameObject.activeInHierarchy) + { + _tableRoot.transform.localPosition = REWARD_TABLE_CARD_POSITION; + for (int l = 0; l < _tableRewardsCategory.Length; l++) + { + if (l != 0) + { + Vector3 localPosition = _tableRewardsCategory[l].transform.localPosition; + localPosition.x += -16f; + _tableRewardsCategory[l].transform.localPosition = localPosition; + } + } + } + else + { + _tableRoot.transform.localPosition = REWARD_TABLE_DEFAULT_POSITION; + } + } + + private void SetRewardBackgroundWidth() + { + float num = 0f; + for (int i = 0; i < _clearRewardList.Count; i++) + { + if (_clearRewardList[i].gameObject.activeInHierarchy) + { + UserGoods.Type rewardGoodsType = _clearRewardList[i].RewardGoodsType; + num += REWARD_BG_OFFSET_MAGNIFICATION[rewardGoodsType]; + } + } + int width = 250 + (int)(90f * num); + _spriteRewardBackground.width = width; + } + + private void SetAcquiredLabel(bool isAcquired) + { + _labelAcquired.gameObject.SetActive(isAcquired); + if (!isAcquired) + { + return; + } + float a = float.MaxValue; + float num = float.MinValue; + bool flag = true; + for (int i = 0; i < _clearRewardList.Count; i++) + { + if (_clearRewardList[i].gameObject.activeInHierarchy) + { + Transform rewardTransform = _clearRewardList[i].GetRewardTransform(); + a = Mathf.Min(a, rewardTransform.position.x); + num = Mathf.Max(num, rewardTransform.position.x); + if (_clearRewardList[i].RewardGoodsType != UserGoods.Type.Degree) + { + flag = false; + } + } + } + Vector3 position = _labelAcquired.transform.position; + position.x = Mathf.Lerp(a, num, 0.5f); + _labelAcquired.transform.position = position; + Vector3 localPosition = _labelAcquired.transform.localPosition; + localPosition.y = _tableRoot.transform.localPosition.y + (flag ? (-10f) : 0f); + _labelAcquired.transform.localPosition = localPosition; + } + + public void LoadClearPresent(IReadOnlyList stageDataList) + { + if (!_isLoadEnd) + { + return; + } + _isLoadEnd = false; + ReleaseClearPresent(); + if (CardDetailPrefab != null) + { + _cardDetail = Object.Instantiate(CardDetailPrefab); + _cardDetail.transform.parent = CardDetailRoot.transform; + _cardDetail.transform.localPosition = Vector3.zero; + _cardDetail.transform.localScale = Vector3.one; + _cardDetail.OnClose = OnCardDetailClose; + _cardDetail.gameObject.SetActive(value: false); + _cardDetail.Initialize(_cardDetail.gameObject.layer, CardMaster.CardMasterId.Default); + _cardDetail.IsShowFlavorTextButton = true; + _cardDetail.IsShowVoiceButton = true; + _cardDetail.IsShowEvolutionButton = true; + } + _clearRewardList.Clear(); + for (int i = 0; i < 3; i++) + { + AreaSelectClearReward component = NGUITools.AddChild(_tableRoot.gameObject, _clearRewardPrefab).GetComponent(); + _clearRewardList.Add(component); + } + List list = new List(2); + List loadPath = new List(); + StoryChapterData.StoryReward storyReward = null; + for (int j = 0; j < stageDataList.Count; j++) + { + for (int k = 0; k < stageDataList[j].Rewards.Length; k++) + { + string text = string.Empty; + storyReward = stageDataList[j].Rewards[k]; + if (storyReward == null) + { + continue; + } + if (storyReward.RewardType == 5) + { + if (!list.Contains((int)storyReward.RewardUserGoodsId)) + { + list.Add((int)storyReward.RewardUserGoodsId); + } + } + else if (storyReward.RewardType == 4) + { + string userGoodsImageName = UserGoods.GetUserGoodsImageName(UserGoods.Type.Item, storyReward.RewardUserGoodsId); + text = Toolbox.ResourcesManager.GetAssetTypePath(userGoodsImageName, ResourcesManager.AssetLoadPathType.Item); + } + else if (storyReward.RewardType == 6) + { + long existingSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(storyReward.RewardUserGoodsId); + text = Toolbox.ResourcesManager.GetAssetTypePath(existingSleeveId.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture); + Sleeve sleeve = Data.Master.SleeveMgr.Get(existingSleeveId); + if (sleeve.IsPremiumSleeve) + { + UIManager.GetInstance().getUIBase_CardManager().AddPremireSleevePath(ref loadPath, sleeve); + } + } + else if (storyReward.RewardType == 8) + { + foreach (string degreeResource in DegreeHelper.GetDegreeResourceList(storyReward.RewardUserGoodsId, DegreeHelper.DegreeType.SMALL, isFetch: false)) + { + if (!loadPath.Contains(degreeResource)) + { + loadPath.Add(degreeResource); + } + } + } + else if (storyReward.RewardType == 7) + { + text = Toolbox.ResourcesManager.GetAssetTypePath(storyReward.RewardUserGoodsId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M); + } + else if (storyReward.RewardType == 10) + { + text = Toolbox.ResourcesManager.GetAssetTypePath(storyReward.RewardUserGoodsId.ToString(), ResourcesManager.AssetLoadPathType.ClassCharaSkinThumbnail); + } + if (text != string.Empty && !loadPath.Contains(text)) + { + loadPath.Add(text); + } + } + } + if (list.Count == 0 && loadPath.Count == 0) + { + _isLoadEnd = true; + } + else + { + StartCoroutine(LoadClearPresentInner(list, loadPath)); + } + } + + private IEnumerator LoadClearPresentInner(List cardidlist, List rewardPathList) + { + UIManager uiMgr = UIManager.GetInstance(); + UIBase_CardManager uiCardMgr = uiMgr.getUIBase_CardManager(); + bool isLoadRewardEnd = false; + _loadFileList.Clear(); + bool isLoadCard = cardidlist.Count > 0; + if (isLoadCard) + { + int layer = LayerMask.NameToLayer("FrontUI"); + uiMgr.CardLoadSelect(base.gameObject, cardidlist, layer, is2D: true); + } + StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(rewardPathList, delegate + { + _loadFileList.AddRange(rewardPathList); + isLoadRewardEnd = true; + })); + while ((isLoadCard && (!uiCardMgr.getCreateEndFlag() || !uiCardMgr.isAssetAllReady)) || !isLoadRewardEnd) + { + yield return null; + } + _cardObjList = uiMgr.getCardList2DObjs(); + if (_cardObjList != null) + { + for (int num = 0; num < _cardObjList.Count; num++) + { + GameObject cardObj = _cardObjList[num].CardObj; + if (!(cardObj == null)) + { + cardObj.SetActive(value: false); + UITexture[] componentsInChildren = cardObj.GetComponentsInChildren(includeInactive: true); + for (int num2 = 0; num2 < componentsInChildren.Length; num2++) + { + componentsInChildren[num2].depth += 50; + } + UILabel[] componentsInChildren2 = cardObj.GetComponentsInChildren(includeInactive: true); + for (int num3 = 0; num3 < componentsInChildren2.Length; num3++) + { + componentsInChildren2[num3].depth += 50; + } + UISprite[] componentsInChildren3 = cardObj.GetComponentsInChildren(includeInactive: true); + for (int num4 = 0; num4 < componentsInChildren3.Length; num4++) + { + componentsInChildren3[num4].depth += 50; + } + cardObj.GetComponent().HideNum(); + cardObj.AddComponent().size = CLEARPRESENT_CARD_COLLISIONSIZE; + cardObj.AddComponent().onClick = _cardDetail.OnPushCardDetailOn; + } + } + } + for (int num5 = 0; num5 < 3; num5++) + { + _clearRewardList[num5].Init(_cardObjList, _cardObjEvacuationRoot); + } + _isLoadEnd = true; + } + + public void ReleaseClearPresent() + { + if (_cardDetail != null) + { + Object.Destroy(_cardDetail.gameObject); + _cardDetail = null; + } + if (_cardObjList != null) + { + for (int i = 0; i < _cardObjList.Count; i++) + { + Object.Destroy(_cardObjList[i].CardObj.gameObject); + } + _cardObjList.Clear(); + } + Toolbox.ResourcesManager.RemoveAssetGroup(_loadFileList); + _loadFileList.Clear(); + } + + private void OnCardDetailClose() + { + } + + public bool GetLoadEnd() + { + return _isLoadEnd; + } + + public void ResetInfoPosition() + { + base.gameObject.transform.localPosition = new Vector3(0f, base.gameObject.transform.localPosition.y, base.gameObject.transform.localPosition.z); + } + + public void MoveToScreen(bool isIn, bool isImmediate) + { + MoveToScreenObj(base.gameObject, isIn ? 0f : (-1120f), isImmediate ? 0f : 0.5f); + } + + public void MoveToScreenObj(GameObject target, float localPosX, float time) + { + if (Mathf.Approximately(time, 0f)) + { + Vector3 localPosition = target.transform.localPosition; + localPosition.x = localPosX; + target.transform.localPosition = localPosition; + return; + } + iTween.MoveTo(target, iTween.Hash("islocal", true, "x", localPosX, "time", time)); + } + + public static string GetPresentItemName(int itemID, long userGoodsId) + { + switch ((UserGoods.Type)itemID) + { + case UserGoods.Type.RedEther: + case UserGoods.Type.Rupy: + return Data.SystemText.Get(CLEARPRESENT_NAME[itemID]); + case UserGoods.Type.Item: + { + Item item = Data.Master.ItemList.Find((Item data) => data.UserGoodsId == userGoodsId); + if (item == null) + { + return string.Empty; + } + return item.name; + } + case UserGoods.Type.Sleeve: + { + Sleeve sleeve = Data.Master.SleeveMgr.Get(userGoodsId); + if (sleeve == null) + { + return string.Empty; + } + return sleeve.sleeve_name; + } + case UserGoods.Type.Emblem: + { + Emblem emblem = Data.Master.EmblemMgr.Get(userGoodsId); + if (emblem == null) + { + return string.Empty; + } + return emblem._name; + } + case UserGoods.Type.Degree: + { + Degree degree = Data.Master.DegreeMgr.Get((int)userGoodsId); + if (degree == null) + { + return string.Empty; + } + return degree._name; + } + case UserGoods.Type.Skin: + { + ClassCharacterMasterData charaPrmByCharaId = GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId((int)userGoodsId); + if (charaPrmByCharaId == null) + { + return string.Empty; + } + return charaPrmByCharaId.chara_name; + } + case UserGoods.Type.SpotCardPoint: + return Data.SystemText.Get("Common_0161"); + case UserGoods.Type.MyPageBG: + return Data.Master.MyPageCustomBGMaster[userGoodsId.ToString()].Name; + default: + return string.Empty; + } + } + + public static string GetPresentItemSpriteName(int itemID) + { + if (itemID < 0 || itemID >= CLEARPRESENT_THUMBNAIL_SPRITENAME.Length) + { + return string.Empty; + } + return CLEARPRESENT_THUMBNAIL_SPRITENAME[itemID]; + } +} diff --git a/SVSim.BattleEngine/Engine/AreaSelectBG.cs b/SVSim.BattleEngine/Engine/AreaSelectBG.cs new file mode 100644 index 0000000..dd45e19 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaSelectBG.cs @@ -0,0 +1,489 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; + +[Serializable] +public class AreaSelectBG +{ + private const float BGTEXTURE_WIDTH = 1024f; + + private const float BGTEXTURE_HEIGHT = 1024f; + + private const int BGTEXTURE_NUM_X = 4; + + private const int BGTEXTURE_NUM_Y = 3; + + private const float BGTEXTURE_WIDTH_HALF_LEFT = 2048f; + + private const float BGTEXTURE_WIDTH_HALF_RIGHT = 2560f; + + private const float BGTEXTURE_HEIGHT_HALF_UP = 1536f; + + private const float BGTEXTURE_HEIGHT_HALF_BOTTOM = 1536f; + + private const float BGTEXTURE_DRAG_MARGIN = 5f; + + private const float BGTEXTURE_DRAG_DECELERATION = 0.875f; + + private const float BGTEXTURE_DRAGARROW_ANIM_SPEED = 1f; + + private const float BGDRAG_SEC_MAXSPEED = 0.25f; + + private const float BGDRAG_SEC_RESETUPTOTIME_MAX = 0.5f; + + private AreaSelectUI _areaSelectUI; + + [SerializeField] + private GameObject _BGRoot; + + [SerializeField] + private UITexture[] _BGTexture; + + [SerializeField] + private AreaBGInfo _areaBGInfo; + + private ParticleSystem _bgEffect; + + private AreaSelectEffectControlBase _bgEffectControl; + + [SerializeField] + private GameObject _BGDragCollision; + + private Vector2 _BGDragDelta = Vector2.zero; + + private bool _isBGDragEnable; + + private float _BGDragSec; + + private float _BGDragSecResetUpToTime; + + private List _loadedResources = new List(); + + private bool _isLoadEndBGTexture = true; + + private bool _isLoadEndParticle = true; + + private StorySectionData _sectionData; + + private int? _sectionClassId; + + private List _extraChapters = new List(); + + private bool _isNormalBgSet = true; + + private bool _changeChapterFirstCall = true; + + private float _currentAspectRatio; + + private Vector3 _currentBGScale = Vector3.one; + + private Vector3 _currentParentPos = Vector3.zero; + + private Vector2 _minMovablePos = Vector3.one; + + private Vector2 _maxMovablePos = Vector3.one; + + public ChapterExtraData ChapterExtraData { get; private set; } + + public ChapterExtraData TransitionChapterExtraData { get; private set; } + + public int BeforeChapterId { get; private set; } + + public GameObject GetBGRoot() + { + return _BGRoot; + } + + public bool GetLoadEnd() + { + if (_isLoadEndBGTexture) + { + return _isLoadEndParticle; + } + return false; + } + + public void SetActiveBGEffect(bool isActive) + { + _bgEffect.gameObject.SetActive(isActive); + if (_bgEffectControl != null) + { + _bgEffectControl.SetActiveBGEffect(isActive); + } + } + + public bool IsBGDragEnable() + { + return _isBGDragEnable; + } + + public void Init(AreaSelectUI areaSelectUI) + { + _areaSelectUI = areaSelectUI; + UIEventListener component = _BGDragCollision.GetComponent(); + if (null != component) + { + component.onDrag = OnDragBG; + } + SetBGDragEnable(enable: false); + } + + public void Term() + { + int i = 0; + for (int num = _BGTexture.Length; i < num; i++) + { + _BGTexture[i].mainTexture = null; + } + } + + private string GetBackGroundPath(int backGroundId, int index, bool isFetch = false) + { + return Toolbox.ResourcesManager.GetAssetTypePath("bg_story_" + backGroundId.ToString("00") + "_" + (index + 1).ToString("00"), ResourcesManager.AssetLoadPathType.Background, isFetch); + } + + private string GetExtraBackGroundPath(StorySectionData sectionData, int index, string suffix, bool isFetch = false) + { + return Toolbox.ResourcesManager.GetAssetTypePath("bg_story_" + sectionData.BackGroundId.ToString("00") + "_" + (index + 1).ToString("00") + suffix, ResourcesManager.AssetLoadPathType.Background, isFetch); + } + + private string GetExtraBackGroundPath(int backgroundId, int index, string suffix, bool isFetch = false) + { + return Toolbox.ResourcesManager.GetAssetTypePath("bg_story_" + backgroundId.ToString("00") + "_" + (index + 1).ToString("00") + suffix, ResourcesManager.AssetLoadPathType.Background, isFetch); + } + + private string GetMapEffectPath(int backGroundId, bool isFetch = false) + { + return Toolbox.ResourcesManager.GetAssetTypePath("scn_map_world_" + backGroundId, ResourcesManager.AssetLoadPathType.Effect2D, isFetch); + } + + private string GetTreeEffectPath(int backGroundId, bool isFetch = false) + { + return Toolbox.ResourcesManager.GetAssetTypePath("scn_map_world_tree_" + backGroundId, ResourcesManager.AssetLoadPathType.Effect2D, isFetch); + } + + public void LoadBG(StorySectionData sectionData, int? sectionClassId) + { + _sectionData = sectionData; + _sectionClassId = sectionClassId; + _extraChapters = _areaBGInfo.GetExtraChapters(_sectionData.Id, sectionClassId); + _loadedResources.Add(GetMapEffectPath(sectionData.BackGroundId)); + _isLoadEndBGTexture = false; + for (int i = 0; i < _BGTexture.Length; i++) + { + _loadedResources.Add(GetBackGroundPath(sectionData.BackGroundId, i)); + } + foreach (ChapterExtraData extraChapter in _extraChapters) + { + int num = sectionData.BackGroundId; + if (extraChapter.IsUseOtherSectionBG()) + { + num = extraChapter.BGSectionId; + for (int j = 0; j < _BGTexture.Length; j++) + { + _loadedResources.Add(GetBackGroundPath(num, j)); + } + _loadedResources.Add(GetMapEffectPath(num)); + if (extraChapter.AddTreeEffect) + { + _loadedResources.Add(GetTreeEffectPath(num)); + } + } + foreach (int item in extraChapter.ExtraTextureIndex) + { + _loadedResources.Add(GetExtraBackGroundPath(num, item, extraChapter.BGSuffix)); + } + if (!string.IsNullOrEmpty(extraChapter.BGExtraEffectPath)) + { + _loadedResources.Add(Toolbox.ResourcesManager.GetAssetTypePath(extraChapter.BGExtraEffectPath, ResourcesManager.AssetLoadPathType.Effect2D)); + } + if (!string.IsNullOrEmpty(extraChapter.BGFirstClearEffectPath)) + { + _loadedResources.Add(Toolbox.ResourcesManager.GetAssetTypePath(extraChapter.BGFirstClearEffectPath, ResourcesManager.AssetLoadPathType.Effect2D)); + } + } + _areaSelectUI.StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadedResources, _OnLoadEndBG)); + _isLoadEndParticle = false; + } + + public void UnLoadBG() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResources); + _loadedResources.Clear(); + _sectionData = null; + _sectionClassId = null; + } + + private void _OnLoadEndBG() + { + List list = new List(); + _bgEffect = UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(GetMapEffectPath(_sectionData.BackGroundId, isFetch: true)) as GameObject).GetComponent(); + Vector3 localScale = _bgEffect.transform.localScale; + _bgEffect.transform.parent = _BGRoot.transform; + _bgEffect.transform.localScale = localScale; + _bgEffect.transform.localPosition = Vector3.zero; + _bgEffectControl = _bgEffect.gameObject.GetComponent(); + list.Add(_bgEffect.gameObject); + if (_bgEffectControl != null) + { + _bgEffectControl._backGroundEffects.Add(_bgEffectControl.BASE_EFFECT_INDEX, _bgEffect); + _bgEffectControl._backGroundEffects.Add(_sectionData.BackGroundId, _bgEffect); + } + for (int i = 0; i < _BGTexture.Length; i++) + { + _BGTexture[i].mainTexture = Toolbox.ResourcesManager.LoadObject(GetBackGroundPath(_sectionData.BackGroundId, i, isFetch: true)) as Texture; + } + foreach (ChapterExtraData extraChapter in _extraChapters) + { + Dictionary bGTexture = extraChapter.BGTexture; + int num = _sectionData.BackGroundId; + if (extraChapter.IsUseOtherSectionBG()) + { + num = extraChapter.BGSectionId; + for (int j = 0; j < _BGTexture.Length; j++) + { + bGTexture.Add(j, Toolbox.ResourcesManager.LoadObject(GetBackGroundPath(num, j, isFetch: true)) as Texture); + } + if (num != _sectionData.BackGroundId && !_bgEffectControl._backGroundEffects.ContainsKey(num)) + { + ParticleSystem particleSystem = InitParticle(num, extraChapter.AddTreeEffect); + _bgEffectControl._backGroundEffects.Add(num, particleSystem); + list.Add(particleSystem.gameObject); + } + } + foreach (int item in extraChapter.ExtraTextureIndex) + { + if (!bGTexture.ContainsKey(item)) + { + bGTexture.Add(item, Toolbox.ResourcesManager.LoadObject(GetExtraBackGroundPath(num, item, extraChapter.BGSuffix, isFetch: true)) as Texture); + } + } + if (!string.IsNullOrEmpty(extraChapter.BGExtraEffectPath)) + { + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(extraChapter.BGExtraEffectPath, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true); + extraChapter.ExtraEffect = UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(assetTypePath) as GameObject); + if (extraChapter.AttachExtraEffectToBgRoot) + { + extraChapter.ExtraEffect.transform.parent = _BGRoot.transform; + extraChapter.ExtraEffect.transform.localPosition = Vector3.zero; + } + else + { + extraChapter.ExtraEffect.transform.parent = _areaSelectUI.transform; + } + extraChapter.ExtraEffect.SetActive(value: false); + List collection = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(extraChapter.ExtraEffect, null); + _loadedResources.AddRange(collection); + } + if (!string.IsNullOrEmpty(extraChapter.BGFirstClearEffectPath)) + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(extraChapter.BGFirstClearEffectPath, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true); + extraChapter.FirstClearEffect = UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(assetTypePath2) as GameObject); + extraChapter.FirstClearEffect.transform.parent = _areaSelectUI.transform; + extraChapter.FirstClearEffect.SetActive(value: false); + List collection2 = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(extraChapter.FirstClearEffect, null); + _loadedResources.AddRange(collection2); + } + } + List collection3 = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list, delegate + { + _isLoadEndParticle = true; + }); + _loadedResources.AddRange(collection3); + _isLoadEndBGTexture = true; + } + + private ParticleSystem InitParticle(int bgId, bool addTreeEffect = false) + { + Vector3 vector = default(Vector3); + ParticleSystem component = UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(GetMapEffectPath(bgId, isFetch: true)) as GameObject).GetComponent(); + vector = component.transform.localScale; + component.transform.parent = _BGRoot.transform; + component.transform.localScale = vector; + component.transform.localPosition = Vector3.zero; + if (addTreeEffect) + { + GameObject gameObject = UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(GetTreeEffectPath(bgId, isFetch: true)) as GameObject); + gameObject.transform.parent = component.transform; + gameObject.transform.localScale = Vector3.one; + gameObject.transform.localPosition = Vector3.zero; + } + return component; + } + + public void OnChangeSelectChapter(StoryChapterData chapterData, bool isFirstClear) + { + TransitionChapterExtraData = null; + if (_extraChapters.Count > 0) + { + int intChapterId = int.Parse(chapterData.ChapterId); + ChapterExtraData = _extraChapters.FirstOrDefault((ChapterExtraData n) => n.ExtraTextureChapter == intChapterId); + } + if (_bgEffectControl != null) + { + _bgEffectControl.OnChangeSelectChapter(this, _sectionData, _sectionClassId, chapterData, isFirstClear); + } + } + + public void SetExtraTexture(int chapterId) + { + if (_extraChapters.Count == 0) + { + return; + } + ChapterExtraData chapterExtraData = _extraChapters.FirstOrDefault((ChapterExtraData n) => n.ExtraTextureChapter == chapterId || n.SectionId == 9003); + if (chapterExtraData != null && chapterExtraData.IsChangeBG()) + { + int num = _sectionData.BackGroundId; + if (chapterExtraData.IsUseOtherSectionBG()) + { + num = chapterExtraData.BGSectionId; + for (int num2 = 0; num2 < _BGTexture.Length; num2++) + { + _BGTexture[num2].mainTexture = Toolbox.ResourcesManager.LoadObject(GetBackGroundPath(num, num2, isFetch: true)) as Texture; + } + } + foreach (int item in chapterExtraData.ExtraTextureIndex) + { + _BGTexture[item].mainTexture = Toolbox.ResourcesManager.LoadObject(GetExtraBackGroundPath(num, item, chapterExtraData.BGSuffix, isFetch: true)) as Texture; + } + _isNormalBgSet = false; + } + else if (!_isNormalBgSet) + { + for (int num3 = 0; num3 < _BGTexture.Length; num3++) + { + _BGTexture[num3].mainTexture = Toolbox.ResourcesManager.LoadObject(GetBackGroundPath(_sectionData.BackGroundId, num3, isFetch: true)) as Texture; + } + _isNormalBgSet = true; + } + } + + public List GetChaptersWithDifferentBackgroundFrom(int chapterId) + { + ChapterExtraData chapterExtra = _extraChapters.FirstOrDefault((ChapterExtraData n) => n.ExtraTextureChapter == chapterId); + IEnumerable source = ((chapterExtra == null || !chapterExtra.IsUseOtherSectionBG()) ? _extraChapters.Where((ChapterExtraData c) => c.IsUseOtherSectionBG() && c.BGSectionId != _sectionData.BackGroundId) : _extraChapters.Where((ChapterExtraData c) => c.BGSectionId != chapterExtra.BGSectionId)); + return source.Select((ChapterExtraData s) => s.ExtraTextureChapter).ToList(); + } + + public void SetExtraEffect(int chapterId, bool isFirstClear = false) + { + if (_extraChapters.Count == 0) + { + return; + } + List list = new List(); + list = ((BeforeChapterId >= chapterId) ? _extraChapters.FindAll((ChapterExtraData n) => n.ExtraTextureChapter != 0 && BeforeChapterId > n.ExtraTextureChapter && n.ExtraTextureChapter >= chapterId) : _extraChapters.FindAll((ChapterExtraData n) => n.ExtraTextureChapter != 0 && BeforeChapterId <= n.ExtraTextureChapter && n.ExtraTextureChapter < chapterId)); + BeforeChapterId = chapterId; + TransitionChapterExtraData = list.FirstOrDefault((ChapterExtraData n) => n.ExtraEffect != null); + if (isFirstClear) + { + return; + } + if (list.Count() == 0 || TransitionChapterExtraData == null) + { + _changeChapterFirstCall = false; + return; + } + TransitionChapterExtraData = list.FirstOrDefault((ChapterExtraData n) => n.ExtraEffect != null); + if (!_changeChapterFirstCall && TransitionChapterExtraData != null && TransitionChapterExtraData.ExtraEffect != null) + { + TransitionChapterExtraData.ExtraEffect.SetActive(value: false); + TransitionChapterExtraData.ExtraEffect.SetActive(value: true); + GameMgr.GetIns().GetSoundMgr().PlaySe(TransitionChapterExtraData.SeType); + } + _changeChapterFirstCall = false; + } + + public IEnumerator SetClearEffect() + { + ChapterExtraData clearChapterExtraData = _extraChapters.FirstOrDefault((ChapterExtraData n) => n.ExtraTextureChapter == BeforeChapterId); + if (clearChapterExtraData != null && clearChapterExtraData.FirstClearEffect != null) + { + yield return new WaitForSeconds(clearChapterExtraData.FirstClearEffectDelayTime); + clearChapterExtraData.FirstClearEffect.SetActive(value: false); + clearChapterExtraData.FirstClearEffect.SetActive(value: true); + GameMgr.GetIns().GetSoundMgr().PlaySe(clearChapterExtraData.FirstClearSeType); + } + } + + public void SetupEnd() + { + if (_bgEffectControl != null) + { + _bgEffectControl.SetupEnd(); + } + } + + public void OnDragBG(GameObject obj, Vector2 delta) + { + _BGDragSecResetUpToTime = 0.5f; + _BGDragSec += Time.deltaTime; + _BGDragSec = Mathf.Min(_BGDragSec, 0.25f); + float t = Mathf.Clamp(_BGDragSec / 0.25f, 0f, 1f); + _BGDragDelta = Vector2.Lerp(Vector2.zero, delta, t); + } + + public void UpdateBGDrag() + { + if (_BGDragSecResetUpToTime > 0f) + { + _BGDragSecResetUpToTime -= Time.deltaTime; + if (_BGDragSecResetUpToTime < 0f) + { + _BGDragSecResetUpToTime = 0f; + _BGDragSec = 0f; + } + } + if (!Mathf.Approximately(_BGDragDelta.x, 0f) || !Mathf.Approximately(_BGDragDelta.y, 0f)) + { + _BGDragDelta.x *= 0.875f; + _BGDragDelta.y *= 0.875f; + Vector3 localPosition = _BGRoot.transform.localPosition; + localPosition.x += _BGDragDelta.x; + localPosition.y += _BGDragDelta.y; + UpdateMovableRange(); + localPosition.x = Mathf.Clamp(localPosition.x, _minMovablePos.x, _maxMovablePos.x); + localPosition.y = Mathf.Clamp(localPosition.y, _minMovablePos.y, _maxMovablePos.y); + _BGRoot.transform.localPosition = localPosition; + } + } + + public void SetBGDragEnable(bool enable) + { + _isBGDragEnable = enable; + _BGDragCollision.SetActive(enable); + _BGDragDelta = Vector2.zero; + } + + private void UpdateMovableRange() + { + float num = (float)Screen.width / (float)Screen.height; + Vector3 localScale = _BGRoot.transform.localScale; + Vector3 localPosition = _BGRoot.transform.parent.transform.localPosition; + if (!(localScale == _currentBGScale) || num != _currentAspectRatio || !(localPosition == _currentParentPos)) + { + float num2 = UIManager.GetInstance().UIManagerRoot.manualHeight; + if (1.7777778f > num) + { + num2 *= 1.7777778f / num; + } + float num3 = num2 * num * 0.5f; + float num4 = num2 * 0.5f; + float num5 = 2048f * localScale.x; + float num6 = 2560f * localScale.x; + float num7 = 1536f * localScale.y; + float num8 = 1536f * localScale.y; + _minMovablePos.x = 0f - num6 + num3 + 5f - localPosition.x; + _maxMovablePos.x = num5 - num3 - 5f - localPosition.x; + _minMovablePos.y = 0f - num7 + num4 + 5f - localPosition.y; + _maxMovablePos.y = num8 - num4 - 5f - localPosition.y; + _currentAspectRatio = num; + _currentBGScale = localScale; + _currentParentPos = localPosition; + } + } +} diff --git a/SVSim.BattleEngine/Engine/AreaSelectChapterEffect.cs b/SVSim.BattleEngine/Engine/AreaSelectChapterEffect.cs new file mode 100644 index 0000000..ac2f545 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaSelectChapterEffect.cs @@ -0,0 +1,136 @@ +using System.Collections.Generic; +using Cute; +using UnityEngine; + +public class AreaSelectChapterEffect +{ + private static readonly Vector3 EFFECT_SCALE = new Vector3(320f, 320f, 320f); + + private AreaSelectUI _areaSelectUI; + + private List _loadedResources = new List(); + + private bool _isLoadEnd = true; + + private Transform _effectParent; + + private Dictionary _effectList = new Dictionary(); + + private string _playingEffect = ""; + + public bool GetLoadEnd() + { + return _isLoadEnd; + } + + public void Init(AreaSelectUI areaselectUI, Transform effectParent) + { + _areaSelectUI = areaselectUI; + _effectParent = effectParent; + _playingEffect = ""; + } + + public void Term() + { + foreach (KeyValuePair effect in _effectList) + { + ParticleSystem value = effect.Value; + if (!(null == value)) + { + Object.Destroy(value.gameObject); + } + } + _effectList.Clear(); + _playingEffect = ""; + } + + public void LoadEffect(List chapterDataList) + { + _isLoadEnd = false; + string path = ""; + int i = 0; + for (int count = chapterDataList.Count; i < count; i++) + { + path = chapterDataList[i].ChapterEffectPath; + if (!string.IsNullOrEmpty(path) && !_effectList.ContainsKey(path)) + { + _effectList.Add(path, null); + _loadedResources.Add(Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.Effect2D)); + } + } + _areaSelectUI.StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadedResources, delegate + { + List list = new List(_effectList.Count); + int j = 0; + for (int count2 = chapterDataList.Count; j < count2; j++) + { + path = chapterDataList[j].ChapterEffectPath; + if (!string.IsNullOrEmpty(path) && !(null != _effectList[path])) + { + GameObject gameObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)) as GameObject; + if (!(null == gameObject)) + { + _effectList[path] = Object.Instantiate(gameObject).GetComponent(); + _effectList[path].transform.parent = _effectParent; + _effectList[path].transform.localPosition = Vector3.zero; + _effectList[path].transform.localScale = EFFECT_SCALE; + _effectList[path].gameObject.SetActive(value: false); + list.Add(_effectList[path].gameObject); + } + } + } + _loadedResources.AddRange(GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list, delegate + { + _isLoadEnd = true; + })); + })); + } + + public void UnLoadEffect() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResources); + _loadedResources.Clear(); + } + + public void PlayEffect(string path, Vector3 pos) + { + if (!string.IsNullOrEmpty(path) && !(_playingEffect == path) && _effectList.ContainsKey(path) && !(null == _effectList[path])) + { + _effectList[path].gameObject.SetActive(value: true); + _effectList[path].Play(); + _effectList[path].transform.localPosition = pos; + _playingEffect = path; + SetParticleSystemsSpeed(1f); + } + } + + public void StopEffect(float? simulationSpeedAfterStop) + { + if (_effectList.ContainsKey(_playingEffect) && !(null == _effectList[_playingEffect])) + { + if (simulationSpeedAfterStop.HasValue) + { + SetParticleSystemsSpeed(simulationSpeedAfterStop.Value); + } + _effectList[_playingEffect].Stop(); + _playingEffect = ""; + } + } + + public string GetPlayingEffect() + { + return _playingEffect; + } + + private void SetParticleSystemsSpeed(float speed) + { + ParticleSystem.MainModule main = _effectList[_playingEffect].main; + main.simulationSpeed = speed; + ParticleSystem[] componentsInChildren = _effectList[_playingEffect].GetComponentsInChildren(); + for (int i = 0; i < componentsInChildren.Length; i++) + { + ParticleSystem.MainModule main2 = componentsInChildren[i].main; + main2.simulationSpeed = speed; + } + } +} diff --git a/SVSim.BattleEngine/Engine/AreaSelectEffectControlBase.cs b/SVSim.BattleEngine/Engine/AreaSelectEffectControlBase.cs new file mode 100644 index 0000000..198a7ac --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaSelectEffectControlBase.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +public class AreaSelectEffectControlBase : MonoBehaviour +{ + [NonSerialized] + public Dictionary _backGroundEffects = new Dictionary(); + + [NonSerialized] + public readonly int BASE_EFFECT_INDEX = -1; + + protected bool IsSetupEnd { get; private set; } + + public virtual void SetupEnd() + { + IsSetupEnd = true; + } + + public virtual void OnChangeSelectChapter(AreaSelectBG areaSelectBG, StorySectionData sectionData, int? sectionClassId, StoryChapterData chapterData, bool isFirstClear) + { + } + + public virtual void SetActiveBGEffect(bool effect) + { + } +} diff --git a/SVSim.BattleEngine/Engine/AreaSelectMapIcon.cs b/SVSim.BattleEngine/Engine/AreaSelectMapIcon.cs new file mode 100644 index 0000000..e648ae4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaSelectMapIcon.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class AreaSelectMapIcon +{ + public const int MAPICONLIST_CAPACITY_DEFAULT = 8; + + private readonly string MAP_ICON_EFFECT_NAME_CIRCLE4 = "ef_circle4_add_nor_1"; + + private readonly string MAP_ICON_EFFECT_NAME_TWINKLE1 = "ef_twinkle1_add_nor_1"; + + private readonly Color32 MAP_ICON_EFFECT_COLOR_CLEARED = new Color32(byte.MaxValue, 192, 64, byte.MaxValue); + + private readonly Color32 MAP_ICON_EFFECT_COLOR_ALREADY_READ_CIRCLE4 = new Color32(78, 95, 125, byte.MaxValue); + + private readonly Color32 MAP_ICON_EFFECT_COLOR_ALREADY_READ_TWINKLE1 = new Color32(190, 218, 242, byte.MaxValue); + + [SerializeField] + private GameObject MapIconRoot; + + [SerializeField] + private UISprite MapIconOriginal; + + private List MapIconList; + + private GameObject MapIconEffect; + + public void Init() + { + } + + public void Term() + { + MapIconEffect = null; + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_MAP_MAPICON_CLEARED); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_MAP_MAPICON_NOTCLEARED); + } + + public void SetupMapIcon(List chapterDataList) + { + if (MapIconList != null) + { + int i = 0; + for (int count = MapIconList.Count; i < count; i++) + { + UnityEngine.Object.Destroy(MapIconList[i].gameObject); + } + } + MapIconList = new List(8); + UISprite uISprite = null; + for (int j = 0; j < chapterDataList.Count; j++) + { + if (chapterDataList[j].IsReleased) + { + uISprite = UnityEngine.Object.Instantiate(MapIconOriginal); + if (!(null == uISprite)) + { + uISprite.transform.parent = MapIconRoot.transform; + uISprite.transform.localPosition = new Vector3(chapterDataList[j].MapIconPos.x, chapterDataList[j].MapIconPos.y); + uISprite.transform.localScale = Vector3.one; + uISprite.name = "mapicon_" + j; + uISprite.gameObject.SetActive(chapterDataList[j].IsDisplayMapIcon); + MapIconList.Add(uISprite); + } + } + } + MapIconOriginal.gameObject.SetActive(value: false); + } + + public Vector3 GetMapIconPos(int chapterIndex, bool isLocal) + { + if (MapIconList == null) + { + return Vector3.zero; + } + if (chapterIndex < 0 || chapterIndex >= MapIconList.Count) + { + return Vector3.zero; + } + if (!isLocal) + { + return MapIconList[chapterIndex].transform.position; + } + return MapIconList[chapterIndex].transform.localPosition; + } + + public void SetActiveMapIcon(int chapterIndex, bool isActive) + { + if (chapterIndex >= 0 && chapterIndex < MapIconList.Count) + { + MapIconList[chapterIndex].gameObject.SetActive(isActive); + } + } + + public void StartMapIconEffect(StoryChapterData.ChapterClearStatus clearState, int chapterIndex) + { + Effect effect = null; + switch (clearState) + { + case StoryChapterData.ChapterClearStatus.Cleared: + effect = GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_MAP_MAPICON_CLEARED); + effect.ChangeParticleColor(MAP_ICON_EFFECT_COLOR_CLEARED); + break; + case StoryChapterData.ChapterClearStatus.AlreadyRead: + effect = GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_MAP_MAPICON_CLEARED); + MotionUtils.ChangeParticleSystemColor(effect.transform.Find(MAP_ICON_EFFECT_NAME_CIRCLE4).gameObject, MAP_ICON_EFFECT_COLOR_ALREADY_READ_CIRCLE4); + MotionUtils.ChangeParticleSystemColor(effect.transform.Find(MAP_ICON_EFFECT_NAME_TWINKLE1).gameObject, MAP_ICON_EFFECT_COLOR_ALREADY_READ_TWINKLE1); + break; + default: + effect = GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_MAP_MAPICON_NOTCLEARED); + break; + } + MapIconEffect = effect.GetGameObjIns(); + UpdateMapIconEffectPos(chapterIndex); + } + + public void StopMapIconEffect() + { + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_MAP_MAPICON_CLEARED); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_MAP_MAPICON_NOTCLEARED); + } + + public void UpdateMapIconEffectPos(int chapterIndex) + { + if (MapIconList != null && chapterIndex >= 0 && chapterIndex < MapIconList.Count && !(null == MapIconEffect)) + { + Vector3 position = MapIconList[chapterIndex].transform.position; + MapIconEffect.transform.position = position; + } + } + + public GameObject GetMapIconObject(int chapterIndex) + { + return MapIconList[chapterIndex].gameObject; + } +} diff --git a/SVSim.BattleEngine/Engine/AreaSelectUI.cs b/SVSim.BattleEngine/Engine/AreaSelectUI.cs new file mode 100644 index 0000000..ea6bc67 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaSelectUI.cs @@ -0,0 +1,1406 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.Recovery; +using Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase; +using Wizard.Story; +using Wizard.Story.ChapterSelection; +using Wizard.Story.ChapterSelection.SelectionProcessing.Main; + +public class AreaSelectUI : UIBase +{ + private enum CHAPTERUNLOCK_STATE + { + STATE_NULL, + STATE_EFFECT_CLEARLABEL, + STATE_FOCUS_NEWCHAPTER, + STATE_DISP_MAPICON + } + + private enum LoadStatusTutorialEffect + { + NotLoad, + Loading, + Loaded + } + + private const float CLEAR_EFFECT_WAIT_SEC = 1.1f; + + private const float CLEAR_LABEL_DELAY_SEC = 0.4f; + + private const float NEWCHAPTER_FOCUS_SEC = 1f; + + private const float NEWCHAPTER_FOCUS_MAPICON_ENABLE_THRESHOLD = 0.55f; + + private const float MAPICON_EFFECTWAIT_SEC = 0.05f; + + private CHAPTERUNLOCK_STATE StateChapterUnlock; + + private float NewAreaTimer; + + private ChapterSelectButton _clearEffectPlayingChapter; + + private bool IsClearLabelDisplayed; + + private bool IsNewMapIconOpened; + + private bool IsNewMapIconFocused; + + private int nowAreaAllNum; + + private bool IsPlayingUnlockChapter; + + private GameObject _clearEffect; + + private GameObject _alreadyReadEffect; + + private List _loadEffectResources = new List(); + + public static readonly string CUESHEETNAME_MAP = "se_st_map"; + + public const int CHAPTERLIST_CAPACITY_DEFAULT = 8; + + private const int SORTINGORDER_EFFECT_OVER = 1; + + private const float PLAYERICON_Y = -320f; + + private const float TITLEPANEL_X_IN = 0f; + + private const float TITLEPANEL_X_OUT = 949f; + + private const float CHAPTERLIST_X_IN = -200f; + + private const float CHAPTERLIST_X_OUT = 400f; + + private const int CHAPTERLISTICON_MAX = 5; + + public const float CHAPTERLISTICON_OFFSET_Y = 80f; + + public const int CHAPTERLISTICON_MARGIN = 50; + + public const float CHAPTERLIST_SCROLL_RADIUS = 200f; + + public const float CHAPTERLIST_SWITCH_SEC = 0.5f; + + private static readonly Vector2 CHAPTERLIST_PANEL_CLIPOFFSET = new Vector2(0f, -420f); + + private static readonly Vector2 CHAPTERLIST_PANEL_CLIPPOS = new Vector2(0f, 0f); + + private static readonly Vector2 CHAPTERLIST_PANEL_CLIPSIZE = new Vector2(1200f, 80f); + + private static readonly string ANOTHER_ENDING_APPEARANCE_EFFECT_NAME = "scn_map_world_another_bright_1"; + + private string _beforeNextChapterId; + + private int? _beforeReleasedChapterNum; + + private int? _beforeReplayChapterIndex; + + [SerializeField] + private GameObject PlayerIcon; + + [SerializeField] + private GameObject _chapterRewardPanelRoot; + + private AreaSelInfo _chapterRewardPanel; + + [SerializeField] + private GameObject _titlePanelRoot; + + private TitlePanelBase _titlePanel; + + [SerializeField] + private GameObject RightPartsRoot; + + [SerializeField] + private ChapterSelectButton _chapterSelectButtonOriginal; + + [SerializeField] + private GameObject ChapterListRoot; + + [SerializeField] + private UIScrollView ChapterListScrollView; + + [SerializeField] + private SpringPanel ChapterListSpringPanel; + + private List _chapterSelectButtonList; + + private float ChapterListScrollYPrev; + + private GameObject ChapterListTapEffectLocator; + + private Effect ChapterListTapEffect; + + [SerializeField] + private ChapterSelectSphere _chapterSelectSphere; + + private bool IsChapterSelectEnable = true; + + [SerializeField] + private GameObject _chapterListScrollCollision; + + [SerializeField] + private AreaSelectBG _BG = new AreaSelectBG(); + + [SerializeField] + private AreaSelectMapIcon _mapIcon = new AreaSelectMapIcon(); + + private AreaSelectChapterEffect _chapterEffect = new AreaSelectChapterEffect(); + + [SerializeField] + private GameObject _chapterEffectLocator; + + [SerializeField] + private CommonPrefabContainer _commonPrefabContainer; + + [SerializeField] + private float _chapterEffectSimulationSpeedAfterStop = 1f; + + private ScenarioSummary _scenarioSummary; + + private List _resourcePathList = new List(); + + private int _selectChapterIndex; + + private StoryChapterData _selectChapterData; + + private LoadStatusTutorialEffect _loadStatusTutorialEffect; + + private bool IsLoadEnd = true; + + private bool IsFadeInEnd; + + private bool IsSetupEnd; + + private TopBar _topBar; + + private bool IsUseChapterListScroll; + + private bool IsUseChapterListTapEffect; + + private bool IsUseChapterListSwitch; + + private bool _usedScrollWheel; + + private bool _isBackTransitionStarted; + + private IProcessing _firstSelectionProcessing; + + private StoryChapterData _anotherEndingAppearanceAnimationChapterData; + + private GameObject _anotherEndingAppearanceEffect; + + private bool _unlockAfterZoom; + + public static readonly Vector3 BG_SCALE_ZOOMOUT = new Vector3(0.28f, 0.28f, 0.28f); + + public static readonly Vector3 BG_POS_ZOOMOUT = new Vector3(-70f, -430f, 0f); + + public static readonly Vector3 BG_SCALE_ZOOMIN = new Vector3(0.6f, 0.6f, 0.6f); + + public const float BG_POS_ZOOMIN_OFFSET_Y = -400f; + + private const float CHAPTERLISTROOT_X_OUT = 800f; + + private const float CHAPTERLISTROOT_X_IN = -25f; + + private const float MAPMOVE_TIMER_IDLE = 1f; + + private const float MAPMOVE_TIMER_ZOOMIN = 1f; + + private const float MAPMOVE_TIMER_TOEND = 1f; + + private const float ANOTHER_ENDING_APPEARANCE_ANIMATION_TIME = 1.5f; + + [SerializeField] + private iTween.EaseType BG_ZOOMIN_EASETYPE = iTween.EaseType.easeInOutCubic; + + private bool _isPlayingBGStartMove; + + private SelectedStoryInfo SelectedStoryInfo => Data.SelectedStoryInfo; + + private StorySectionData SectionData => SelectedStoryInfo.SectionData; + + private int SectionId => SectionData.Id; + + private int? SectionClassId => SelectedStoryInfo.SectionClassId; + + private List _chapterDataList => Data.StoryInfo.ChapterDataList; + + public bool IsUseChapterListClearedMask { get; private set; } + + private bool HasAnotherEndingAppearanceAnimation => _anotherEndingAppearanceAnimationChapterData != null; + + private void InitUnlockChapter() + { + ChangeStateUnlockChapter(CHAPTERUNLOCK_STATE.STATE_NULL); + NewAreaTimer = 0f; + SetPlayerIconVisible(isvisible: false); + IsPlayingUnlockChapter = false; + } + + private void LoadUnlockChapterResources(Action onFinish) + { + _loadEffectResources.Clear(); + _loadEffectResources.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_ui_clear_1", ResourcesManager.AssetLoadPathType.Effect2D)); + _loadEffectResources.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_ui_clear_2", ResourcesManager.AssetLoadPathType.Effect2D)); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(_loadEffectResources, delegate + { + StartCoroutine(CreateEffect(onFinish)); + }); + } + + private IEnumerator CreateEffect(Action onFinish) + { + bool isLoadClearEffect = false; + _clearEffect = EffectUtility.CreateEffect2D(new Effect2dCreateParam + { + Parent = base.gameObject, + EffectName = "cmn_ui_clear_1", + UnloadAssetList = _loadEffectResources, + MaterialSetEndCallback = delegate + { + isLoadClearEffect = true; + } + }); + bool isLoadAlreadyReadEffect = false; + _alreadyReadEffect = EffectUtility.CreateEffect2D(new Effect2dCreateParam + { + Parent = base.gameObject, + EffectName = "cmn_ui_clear_2", + UnloadAssetList = _loadEffectResources, + MaterialSetEndCallback = delegate + { + isLoadAlreadyReadEffect = true; + } + }); + while (!isLoadClearEffect || !isLoadAlreadyReadEffect) + { + yield return null; + } + onFinish.Call(); + } + + private void UnloadUnlockChapterResources() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadEffectResources); + _loadEffectResources.Clear(); + } + + private void UpdateUnlockChapter() + { + switch (StateChapterUnlock) + { + case CHAPTERUNLOCK_STATE.STATE_EFFECT_CLEARLABEL: + StateUnlockChapter_EffectClearLabel_Update(); + break; + case CHAPTERUNLOCK_STATE.STATE_FOCUS_NEWCHAPTER: + StateUnlockChapter_FocusNewChapter_Update(); + break; + case CHAPTERUNLOCK_STATE.STATE_DISP_MAPICON: + StateUnlockChapter_DispMapIcon_Update(); + break; + } + } + + private bool CheckUnlockChapter() + { + if (SectionData.IsTutorialCategory) + { + return false; + } + if (!_beforeReleasedChapterNum.HasValue || _beforeNextChapterId == null) + { + return false; + } + StoryChapterData storyChapterData = Data.StoryInfo.FindChapterData(_beforeNextChapterId); + if (storyChapterData != null && storyChapterData.IsPlayedChapter) + { + return false; + } + int value = _beforeReleasedChapterNum.Value; + return nowAreaAllNum > value; + } + + private int? CheckSection20UnlockChapter() + { + if (SectionId == 20) + { + int num = nowAreaAllNum; + bool flag = false; + if (num == 10 && !PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_SECTION20_WERUSA_ANIMATION_PLAYED)) + { + flag = true; + } + if (num == 26 && !PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_SECTION20_NATERA_ANIMATION_PLAYED)) + { + flag = true; + } + if (flag) + { + return num - 2; + } + } + return null; + } + + private void SetupUnlockChapter() + { + SelectChapter(_beforeReleasedChapterNum.Value - 1, isplayse: false, iscalcscroll: true, ismapiconeffectenable: false); + MoveToScreenChapterList(isIn: true, isImmediate: true); + UpdateChapterList(isinterpscale: false); + MoveToScreenTitlePanel(isIn: true, isImmediate: true); + _chapterRewardPanel.MoveToScreen(isIn: true, isImmediate: true); + _BG.GetBGRoot().transform.localScale = BG_SCALE_ZOOMIN; + mapMoveTarget(0f); + SetPlayerIconVisible(isvisible: false); + _chapterSelectButtonList[_selectChapterIndex].SetClearVisible(visible: false); + _topBar.SetBackButtonEnable(enable: false); + _mapIcon.SetActiveMapIcon(nowAreaAllNum - 1, isActive: false); + } + + private void StartUnlockChapter() + { + ChangeStateUnlockChapter(CHAPTERUNLOCK_STATE.STATE_EFFECT_CLEARLABEL); + SetChapterScrollEnable(isEnable: false); + IsPlayingUnlockChapter = true; + } + + private void StartUnlockChapterWithoutClear() + { + ChangeStateUnlockChapter(CHAPTERUNLOCK_STATE.STATE_FOCUS_NEWCHAPTER); + SetChapterScrollEnable(isEnable: false); + IsPlayingUnlockChapter = true; + } + + private void OnUnlockChapterEnd() + { + SetPlayerIconVisible(_selectChapterData.IsDisplayMapIcon); + SetChapterScrollEnable(isEnable: true); + CheckPreBuildDeckConfirmDialog(); + _topBar.SetBackButtonEnable(enable: true); + IsPlayingUnlockChapter = false; + } + + private void ChangeStateUnlockChapter(CHAPTERUNLOCK_STATE newstate) + { + if (StateChapterUnlock != newstate) + { + switch (StateChapterUnlock) + { + case CHAPTERUNLOCK_STATE.STATE_EFFECT_CLEARLABEL: + StateUnlockChapter_EffectClearLabel_Exit(); + break; + case CHAPTERUNLOCK_STATE.STATE_FOCUS_NEWCHAPTER: + StateUnlockChapter_FocusNewChapter_Exit(); + break; + case CHAPTERUNLOCK_STATE.STATE_DISP_MAPICON: + StateUnlockChapter_DispMapIcon_Exit(); + break; + } + switch (newstate) + { + case CHAPTERUNLOCK_STATE.STATE_EFFECT_CLEARLABEL: + StateUnlockChapter_EffectClearLabel_Enter(); + break; + case CHAPTERUNLOCK_STATE.STATE_FOCUS_NEWCHAPTER: + StateUnlockChapter_FocusNewChapter_Enter(); + break; + case CHAPTERUNLOCK_STATE.STATE_DISP_MAPICON: + StateUnlockChapter_DispMapIcon_Enter(); + break; + } + StateChapterUnlock = newstate; + } + } + + private void StateUnlockChapter_EffectClearLabel_Update() + { + NewAreaTimer -= Time.deltaTime; + float num = ((_BG.ChapterExtraData == null) ? 1.1f : (1.1f + _BG.ChapterExtraData.FirstClearEffectDelayTime)); + if (!IsClearLabelDisplayed && NewAreaTimer < num - 0.4f) + { + _clearEffectPlayingChapter.OnFinishClearEffect(); + IsClearLabelDisplayed = true; + } + if (NewAreaTimer < 0f && !IsNewMapIconFocused) + { + IsNewMapIconFocused = true; + if (_BG.ChapterExtraData != null && _BG.ChapterExtraData.FirstClearMoveDelayTime > 0f) + { + _BG.SetExtraTexture(_BG.BeforeChapterId + 1); + StartCoroutine(MoveDelay()); + } + else + { + ChangeStateUnlockChapter(CHAPTERUNLOCK_STATE.STATE_FOCUS_NEWCHAPTER); + } + } + } + + private IEnumerator MoveDelay() + { + yield return new WaitForSeconds((_BG.ChapterExtraData == null) ? 0f : _BG.ChapterExtraData.FirstClearMoveDelayTime); + ChangeStateUnlockChapter(CHAPTERUNLOCK_STATE.STATE_FOCUS_NEWCHAPTER); + } + + private void StateUnlockChapter_EffectClearLabel_Enter() + { + StartCoroutine(_BG.SetClearEffect()); + if (_selectChapterIndex >= 0 && _selectChapterIndex < _chapterSelectButtonList.Count) + { + _clearEffectPlayingChapter = _chapterSelectButtonList[_selectChapterIndex]; + _chapterSelectButtonList[_selectChapterIndex].UpdateClearState(_selectChapterData.ClearStatus); + } + if (!(null == _clearEffectPlayingChapter)) + { + _chapterSelectButtonList[_selectChapterIndex].OnStartClearEffect(); + IsClearLabelDisplayed = false; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_MAP_CLEAR); + GameObject obj = ((_selectChapterData.ClearStatus == StoryChapterData.ChapterClearStatus.Cleared) ? _clearEffect : _alreadyReadEffect); + obj.transform.parent = _clearEffectPlayingChapter.ClearLabelTransform; + obj.transform.localPosition = Vector3.zero; + obj.gameObject.SetActive(value: true); + float newAreaTimer = ((_BG.ChapterExtraData == null) ? 1.1f : (1.1f + _BG.ChapterExtraData.FirstClearEffectDelayTime)); + NewAreaTimer = newAreaTimer; + } + } + + private void StateUnlockChapter_EffectClearLabel_Exit() + { + _clearEffectPlayingChapter = null; + } + + private void StateUnlockChapter_FocusNewChapter_Update() + { + mapMoveTarget((_BG.TransitionChapterExtraData == null) ? 1f : _BG.TransitionChapterExtraData.ChapterMoveTime); + if (!IsNewMapIconOpened && NewAreaTimer < 0.55f) + { + if (!_selectChapterData.IsDisplayMapIcon) + { + _mapIcon.SetActiveMapIcon(_selectChapterIndex, isActive: false); + } + else + { + _mapIcon.SetActiveMapIcon(_selectChapterIndex, isActive: true); + Vector3 mapIconPos = _mapIcon.GetMapIconPos(_selectChapterIndex, isLocal: false); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_MAP_CHAPTER_1, mapIconPos.x, mapIconPos.y); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_MAP_NEW_AREA_RELEASE); + } + IsNewMapIconOpened = true; + } + NewAreaTimer -= Time.deltaTime; + if (NewAreaTimer < 0f) + { + ChangeStateUnlockChapter(CHAPTERUNLOCK_STATE.STATE_DISP_MAPICON); + } + } + + private void StateUnlockChapter_FocusNewChapter_Enter() + { + SelectChapter(nowAreaAllNum - 1, isplayse: false, iscalcscroll: true, ismapiconeffectenable: false, isFirstClear: true); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_MAP_CAMERA_MOVE); + NewAreaTimer = ((_BG.TransitionChapterExtraData == null) ? 1f : (1f + _BG.TransitionChapterExtraData.FirstClearMoveOutDelayTime)); + IsNewMapIconOpened = false; + } + + private void StateUnlockChapter_FocusNewChapter_Exit() + { + } + + private void StateUnlockChapter_DispMapIcon_Update() + { + NewAreaTimer -= Time.deltaTime; + if (NewAreaTimer < 0f) + { + if (_selectChapterData.IsDisplayMapIcon) + { + _mapIcon.StartMapIconEffect(StoryChapterData.ChapterClearStatus.NotCleared, _selectChapterIndex); + } + ChangeStateUnlockChapter(CHAPTERUNLOCK_STATE.STATE_NULL); + } + } + + private void StateUnlockChapter_DispMapIcon_Enter() + { + NewAreaTimer = 0.05f; + } + + private void StateUnlockChapter_DispMapIcon_Exit() + { + OnUnlockChapterEnd(); + } + + public static void SetRecoveryData(SetupConditionInfo setupInfo) + { + Data.StoryInfo.IsPreBuildDeck = setupInfo.ScenarioDeckIsPreBuild; + Data.StoryInfo.IsTrialDeck = setupInfo.ScenarioDeckIsTrial; + Data.StoryInfo.IsStoryBattleDone = true; + StoryNextSceneSelector.ResetHistoryOfUsingPreBuildDeck(); + } + + public override void onFirstStart() + { + _chapterSelectButtonOriginal.gameObject.SetActive(value: false); + bool flag = false; + if (SectionData.IsTutorial) + { + IsUseChapterListScroll = false; + IsUseChapterListClearedMask = true; + IsUseChapterListTapEffect = true; + IsUseChapterListSwitch = false; + flag = false; + } + else if (SectionData.IsTutorialReplay) + { + IsUseChapterListScroll = true; + IsUseChapterListClearedMask = false; + IsUseChapterListTapEffect = false; + IsUseChapterListSwitch = true; + flag = true; + } + else + { + IsUseChapterListScroll = true; + IsUseChapterListClearedMask = false; + IsUseChapterListTapEffect = false; + IsUseChapterListSwitch = true; + flag = true; + } + UIManager.GetInstance().createInSceneLoading(); + if (flag) + { + _topBar = StoryChapterSelectionUtility.CreateTopBar(base.gameObject, SelectedStoryInfo, new UIManager.ChangeViewSceneParam + { + OnChange = delegate + { + _isBackTransitionStarted = true; + } + }, 1); + } + _titlePanel = CreateTitlePanel(); + _chapterRewardPanel = CreateChapterRewardPanel(); + if (IsUseChapterListSwitch) + { + _chapterSelectSphere.OnClick = delegate + { + OnSwitchChapterSelect(); + }; + } + StoryNextSceneSelector.ResetHistoryOfUsingPreBuildDeck(); + Data.StoryInfo.IsStoryBattleDone = false; + base.onFirstStart(); + } + + protected override void onClose() + { + GameMgr.GetIns().GetEffectMgr().StopBuff(EffectMgr.EffectType.CMN_MAP_PLAYERICON, PlayerIcon); + _mapIcon.Term(); + _chapterEffect.UnLoadEffect(); + _chapterEffect.Term(); + StopEffectTap(); + if (LoadStatusTutorialEffect.Loaded == _loadStatusTutorialEffect) + { + GameMgr.GetIns().GetEffectMgr().DisposeLatestMadeEffects(); + _loadStatusTutorialEffect = LoadStatusTutorialEffect.NotLoad; + } + Toolbox.ResourcesManager.RemoveAssetGroup(_resourcePathList); + _resourcePathList.Clear(); + GameMgr.GetIns().GetSoundMgr().UnloadSe(CUESHEETNAME_MAP); + UnloadUnlockChapterResources(); + _BG.UnLoadBG(); + _BG.Term(); + if (_scenarioSummary != null) + { + _scenarioSummary.Dispose(); + } + _chapterRewardPanel.ReleaseClearPresent(); + Toolbox.ResourcesManager.RemoveAssetGroup(Toolbox.ResourcesManager.CardListAssetPathList); + Toolbox.ResourcesManager.CardListAssetPathList.Clear(); + InitBGStartMove(); + InitUnlockChapter(); + base.onClose(); + } + + private void OnTouchChapterListTutorial(int chapterindex) + { + if (chapterindex == _selectChapterIndex) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + StopEffectTap(); + ExecuteSelectionProcessings(); + } + else if (SectionData.IsTutorialReplay) + { + SelectChapter(chapterindex, isplayse: true, iscalcscroll: true); + } + } + + private void SetChapterScrollEnable(bool isEnable) + { + if (null != ChapterListScrollView && ChapterListScrollView.enabled != isEnable) + { + ChapterListScrollView.enabled = isEnable; + } + if (_chapterSelectButtonList == null) + { + return; + } + foreach (ChapterSelectButton chapterSelectButton in _chapterSelectButtonList) + { + if (chapterSelectButton != null) + { + chapterSelectButton.SetScrollEnable(isEnable); + } + } + } + + private void OnTouchChapterList(int chapterindex) + { + if (!IsPlayingUnlockChapter && !_unlockAfterZoom) + { + if (chapterindex == _selectChapterIndex) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + ExecuteSelectionProcessings(); + } + else + { + SelectChapter(chapterindex, isplayse: true, iscalcscroll: true); + } + } + } + + private void OnCancelScenarioSummary() + { + if (IsUseChapterListTapEffect) + { + StartEffectTap(); + } + } + + private void StartEffectTap() + { + if (IsUseChapterListTapEffect && !(null != ChapterListTapEffect)) + { + ChapterListTapEffectLocator = _chapterSelectButtonList[_chapterSelectButtonList.Count - 1].TapEffectLocator; + ChapterListTapEffect = GameMgr.GetIns().GetEffectMgr().StartBuff(EffectMgr.EffectType.CMN_TUTORIAL_TAP_1, ChapterListTapEffectLocator); + } + } + + private void StopEffectTap() + { + if (!(null == ChapterListTapEffectLocator)) + { + GameMgr.GetIns().GetEffectMgr().StopBuff(EffectMgr.EffectType.CMN_TUTORIAL_TAP_1, ChapterListTapEffectLocator); + ChapterListTapEffectLocator = null; + ChapterListTapEffect = null; + } + } + + private void LimitAreaScroll() + { + int count = _chapterSelectButtonList.Count; + UIPanel component = ChapterListScrollView.transform.GetComponent(); + component.clipOffset = CHAPTERLIST_PANEL_CLIPOFFSET; + component.baseClipRegion = new Vector4(CHAPTERLIST_PANEL_CLIPPOS.x, CHAPTERLIST_PANEL_CLIPPOS.y, CHAPTERLIST_PANEL_CLIPSIZE.x, CHAPTERLIST_PANEL_CLIPSIZE.y + (float)(count * 2) * 80f); + } + + private void OnSwitchChapterSelect() + { + if (!IsPlayingUnlockChapter && !_isPlayingBGStartMove) + { + IsChapterSelectEnable = !IsChapterSelectEnable; + SetChapterSelectEnable(IsChapterSelectEnable, isplayse: true); + SetChapterScrollEnable(IsChapterSelectEnable); + SetPlayerIconVisible(IsChapterSelectEnable && _selectChapterData.IsDisplayMapIcon); + _BG.SetBGDragEnable(!IsChapterSelectEnable && _selectChapterData.IsEnableDragMapBG); + if (IsChapterSelectEnable && _selectChapterData.IsDisplayMapIcon) + { + _mapIcon.StartMapIconEffect(_selectChapterData.ClearStatus, _selectChapterIndex); + } + else + { + _mapIcon.StopMapIconEffect(); + } + } + } + + private void MoveToScreenObj(GameObject target, float localPosX, float time, Action onComplete = null) + { + if (Mathf.Approximately(time, 0f)) + { + Vector3 localPosition = target.transform.localPosition; + localPosition.x = localPosX; + target.transform.localPosition = localPosition; + onComplete.Call(); + return; + } + iTween.MoveTo(target, iTween.Hash("islocal", true, "x", localPosX, "time", time)); + StartCoroutine(DelayedCall(time, onComplete.Call)); + } + + private IEnumerator DelayedCall(float time, Action callback) + { + yield return new WaitForSeconds(time); + if (!_isBackTransitionStarted) + { + callback.Call(); + } + } + + private void MoveToScreenRightPartsRoot(bool isIn, bool isImmediate) + { + float time = (isImmediate ? 0f : 0.5f); + if (isIn) + { + SetChapterListMarqueeDisable(); + } + MoveToScreenObj(RightPartsRoot, isIn ? (-25f) : 800f, time, delegate + { + if (isIn) + { + SetSelectedChapterMarqueeEnable(); + } + }); + if (isIn && !_unlockAfterZoom) + { + if (isImmediate) + { + SetChapterScrollEnable(IsUseChapterListScroll); + } + else + { + StartCoroutine(MoveToScreenRightCallBack(time)); + } + } + } + + private IEnumerator MoveToScreenRightCallBack(float time) + { + yield return new WaitForSeconds(time); + SetChapterScrollEnable(IsUseChapterListScroll); + } + + private void MoveToScreenChapterList(bool isIn, bool isImmediate) + { + if (isIn) + { + SetChapterListMarqueeDisable(); + } + MoveToScreenObj(ChapterListRoot, isIn ? (-200f) : 400f, isImmediate ? 0f : 0.5f, delegate + { + if (isIn) + { + SetSelectedChapterMarqueeEnable(); + } + }); + } + + private void MoveToScreenTitlePanel(bool isIn, bool isImmediate) + { + MoveToScreenObj(_titlePanel.gameObject, isIn ? 0f : 949f, isImmediate ? 0f : 0.5f); + } + + private void SetChapterSelectEnable(bool enable, bool isplayse) + { + IsChapterSelectEnable = enable; + _chapterSelectSphere.UpdateChapterSelectStatus(IsChapterSelectEnable, IsUseChapterListSwitch); + MoveToScreenChapterList(enable, isImmediate: false); + MoveToScreenTitlePanel(enable, isImmediate: false); + _chapterRewardPanel.MoveToScreen(enable, isImmediate: false); + _chapterListScrollCollision.SetActive(enable); + _BG.SetBGDragEnable(!enable); + if (isplayse) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(enable ? Se.TYPE.SYS_TOGGLE_ON : Se.TYPE.SYS_TOGGLE_OFF); + } + } + + private void SetChapterListMarqueeDisable() + { + if (_chapterSelectButtonList == null) + { + return; + } + foreach (ChapterSelectButton chapterSelectButton in _chapterSelectButtonList) + { + chapterSelectButton.SetMarqueeEnable(enable: false); + } + } + + private void SetSelectedChapterMarqueeEnable() + { + if (_chapterSelectButtonList != null) + { + _chapterSelectButtonList[_selectChapterIndex].SetMarqueeEnable(enable: true); + } + } + + protected override void onOpen() + { + base.onOpen(); + UIManager.GetInstance().OpenNotTouch(); + ResetSelectedStoryInfo(); + InitBGStartMove(); + InitUnlockChapter(); + SetChapterSelectEnable(enable: true, isplayse: false); + SetChapterScrollEnable(isEnable: false); + _mapIcon.Init(); + _BG.Init(this); + _chapterEffect.Init(this, base.transform); + SetPlayerIconVisible(isvisible: false); + PlayerIcon.transform.localPosition = new Vector3(0f, -320f, 0f); + _firstSelectionProcessing = CreateSelectionProcessings(SectionData.IsTutorialCategory); + StartCoroutine(Setup()); + } + + private IEnumerator Setup() + { + IsSetupEnd = false; + if (SectionData.IsTutorialCategory) + { + SetupChapterDataListTutorial(); + } + else + { + yield return StoryChapterSelectionUtility.StoryInfoTaskCoroutine(SelectedStoryInfo); + yield return StoryChapterSelectionUtility.LoadAiMasterCoroutine(_chapterDataList); + StoryChapterSelectionUtility.RegisterMaintenanceChapters(_chapterDataList); + _anotherEndingAppearanceAnimationChapterData = ((_beforeNextChapterId == null) ? _chapterDataList.FirstOrDefault((StoryChapterData x) => x.IsPlayAnotherEndingAppearanceAnimation && x.IsReleased) : null); + } + StartCoroutine(assetSetting()); + IsLoadEnd = false; + StartCoroutine(LoadAndSetupResourcesAsync()); + _BG.LoadBG(SectionData, SectionClassId); + _chapterEffect.LoadEffect(_chapterDataList); + _chapterRewardPanel.LoadClearPresent(_chapterDataList); + while (!IsLoadEnd || !_chapterRewardPanel.GetLoadEnd() || !_BG.GetLoadEnd() || !_chapterEffect.GetLoadEnd()) + { + yield return null; + } + SetupChapterList(); + _mapIcon.SetupMapIcon(_chapterDataList); + if (CheckUnlockChapter()) + { + SetupUnlockChapter(); + } + else + { + int? focus = CheckSection20UnlockChapter(); + if (focus.HasValue) + { + _unlockAfterZoom = true; + } + SetupBGStartMove(focus); + } + _chapterRewardPanel.SetClearPresent(_selectChapterData); + _BG.SetActiveBGEffect(isActive: true); + IsFadeInEnd = false; + UIManager.GetInstance().OnReadyViewScene(isFadein: true, null, OnFadeInEnd); + _BG.SetupEnd(); + IsSetupEnd = true; + } + + private IEnumerator LoadAndSetupResourcesAsync() + { + _resourcePathList.Clear(); + foreach (StoryChapterData chapterData in _chapterDataList) + { + _resourcePathList.Add(ChapterSelectButton.GetHeaderPath(chapterData, isFetch: false)); + } + if (IsUseChapterListTapEffect) + { + _loadStatusTutorialEffect = LoadStatusTutorialEffect.Loading; + GameMgr.GetIns().GetEffectMgr().InitCommonEffect("Json/EffectTutorialData", isBattle: false, isField: false, isBattleEffect: false, delegate + { + _loadStatusTutorialEffect = LoadStatusTutorialEffect.Loaded; + }); + } + GameMgr.GetIns().GetSoundMgr().LoadSe(CUESHEETNAME_MAP); + _scenarioSummary = new ScenarioSummary(SectionId, SectionClassId); + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_resourcePathList, null)); + bool isLoadedClearEffect = false; + LoadUnlockChapterResources(delegate + { + isLoadedClearEffect = true; + }); + while (!_scenarioSummary.IsValid || LoadStatusTutorialEffect.Loading == _loadStatusTutorialEffect || !isLoadedClearEffect || !_titlePanel.IsFinishInit) + { + yield return null; + } + if (HasAnotherEndingAppearanceAnimation) + { + yield return EffectMgr.LoadAndInstantiate2dEffectCoroutine(ANOTHER_ENDING_APPEARANCE_EFFECT_NAME, delegate(GameObject createdEffect, List loadedAssets) + { + _anotherEndingAppearanceEffect = createdEffect; + createdEffect.transform.parent = base.transform; + _resourcePathList.AddRange(loadedAssets); + }); + } + IsLoadEnd = true; + } + + public override void onMove() + { + if (!IsSetupEnd || !IsFadeInEnd) + { + SetChapterListMarqueeDisable(); + return; + } + if (IsPlayingUnlockChapter) + { + UpdateUnlockChapter(); + UpdateChapterList(); + return; + } + UpdateChapterList(); + if (_isPlayingBGStartMove) + { + return; + } + if (_unlockAfterZoom) + { + _unlockAfterZoom = false; + StartUnlockChapterWithoutClear(); + return; + } + UpdateTamaArrow(); + if (_BG.IsBGDragEnable()) + { + _BG.UpdateBGDrag(); + } + else + { + mapMoveTarget((_BG.TransitionChapterExtraData == null) ? 1.5f : _BG.TransitionChapterExtraData.ChapterMoveTime); + } + _mapIcon.UpdateMapIconEffectPos(_selectChapterIndex); + float y = ChapterListScrollView.transform.localPosition.y; + int num = (450 - (int)y) / 80; + if (num < 0) + { + num = 0; + } + else if (num >= _chapterSelectButtonList.Count) + { + num = _chapterSelectButtonList.Count - 1; + } + if (num != _selectChapterIndex) + { + SelectChapter(num, isplayse: true); + } + base.onMove(); + } + + private void SelectChapter(int newIndex, bool isplayse = false, bool iscalcscroll = false, bool ismapiconeffectenable = true, bool isFirstClear = false) + { + int selectChapterIndex = _selectChapterIndex; + _selectChapterIndex = newIndex; + if (_selectChapterIndex < 0 || _selectChapterIndex >= _chapterDataList.Count) + { + _selectChapterIndex = 0; + } + if (SectionId == 20) + { + if (_selectChapterIndex == 9) + { + PlayerPrefsWrapper.SetBool(PlayerPrefsWrapper.IS_SECTION20_WERUSA_ANIMATION_PLAYED, flag: true); + } + else if (_selectChapterIndex == 25) + { + PlayerPrefsWrapper.SetBool(PlayerPrefsWrapper.IS_SECTION20_NATERA_ANIMATION_PLAYED, flag: true); + } + } + string chapterId = (newIndex + 1).ToString(); + _selectChapterData = _chapterDataList.Single((StoryChapterData x) => x.ChapterId == chapterId); + _BG.OnChangeSelectChapter(_selectChapterData, isFirstClear); + if (SectionId == 20) + { + int chapterId2 = int.Parse(_selectChapterData.ChapterId); + List chaptersWithDifferentBackgroundFrom = _BG.GetChaptersWithDifferentBackgroundFrom(chapterId2); + for (int num = 0; num < _chapterSelectButtonList.Count; num++) + { + bool isActive = !chaptersWithDifferentBackgroundFrom.Contains(num + 1); + _mapIcon.SetActiveMapIcon(num, isActive); + } + } + _mapIcon.StopMapIconEffect(); + if (ismapiconeffectenable && _selectChapterData.IsDisplayMapIcon) + { + _mapIcon.StartMapIconEffect(_selectChapterData.ClearStatus, _selectChapterIndex); + } + SetPlayerIconVisible(_selectChapterData.IsDisplayMapIcon); + SwitchChapterEffectVisible(selectChapterIndex); + _chapterRewardPanel.SetClearPresent(_selectChapterData); + if (isplayse) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SCROLL); + } + if (iscalcscroll) + { + float num2 = 400f - (float)_selectChapterIndex * 80f; + Vector3 position = ChapterListScrollView.transform.position; + position.y = num2; + ChapterListScrollView.transform.localPosition = position; + ChapterListScrollView.GetComponent().clipOffset = new Vector2(0f, 0f - num2); + if (null == ChapterListSpringPanel) + { + ChapterListSpringPanel = ChapterListScrollView.GetComponent(); + } + if (null != ChapterListSpringPanel) + { + ChapterListSpringPanel.target = Vector3.zero; + ChapterListSpringPanel.strength = 0f; + ChapterListSpringPanel.onFinished = null; + ChapterListSpringPanel.enabled = false; + } + } + _chapterSelectSphere.IsScrollUpEnable = IsUseChapterListScroll && _chapterSelectButtonList.Count > 1 && _selectChapterIndex < _chapterSelectButtonList.Count - 1; + _chapterSelectSphere.IsScrollDownEnable = IsUseChapterListScroll && _chapterSelectButtonList.Count > 1 && _selectChapterIndex > 0; + _chapterSelectSphere.OnSelectChapter(IsChapterSelectEnable); + } + + private void UpdateTamaArrow() + { + if (IsChapterSelectEnable) + { + _chapterSelectSphere.UpdateArrowAlpha(); + } + } + + private void UpdateChapterList(bool isinterpscale = true) + { + for (int i = 0; i < _chapterSelectButtonList.Count; i++) + { + ChapterSelectButton chapterSelectButton = _chapterSelectButtonList[i]; + if (chapterSelectButton != null) + { + chapterSelectButton.UpdateSelectStatus(_selectChapterIndex, i, this, isinterpscale, ChapterListScrollView); + } + } + if (_isPlayingBGStartMove) + { + return; + } + bool flag = false; + float y = ChapterListScrollView.transform.localPosition.y; + if (ChapterListScrollYPrev != y) + { + ChapterListScrollYPrev = y; + y = 450 - (int)y; + flag = !Input.GetMouseButton(0) && Input.mouseScrollDelta.y < 0f; + if (Input.GetMouseButton(0) || flag) + { + _chapterSelectSphere.UpdateRotationOnScroll(y, _chapterSelectButtonList.Count); + } + } + if (Input.GetMouseButtonUp(0) || (!flag && _usedScrollWheel)) + { + _chapterSelectSphere.ResetRotationOnScroll(); + } + _usedScrollWheel = flag; + } + + private void OnFadeInEnd() + { + UIManager.GetInstance().offNotTouch(); + if (CheckUnlockChapter()) + { + StartUnlockChapter(); + } + else + { + StartBGStartMove(); + CheckPreBuildDeckConfirmDialog(); + } + IsFadeInEnd = true; + } + + public static void CheckPreBuildDeckConfirmDialog() + { + } + + private static void ShowBuildDeckBuyConfirmDialog(int currentCount, int maxCount) + { + int productId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_BATTLE_DECK_ID); + if (currentCount < maxCount) + { + SystemText systemText = Data.SystemText; + string message = systemText.Get("Story_0057"); + if (currentCount > 0) + { + message = systemText.Get("Story_0058"); + } + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(message); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetTitleLabel(systemText.Get("Story_0056")); + dialogBase.SetButtonText(systemText.Get("Shop_0095"), systemText.Get("Common_0005")); + dialogBase.onPushButton1 = delegate + { + BuildDeckPurchasePage.BuildDeckConfirmDialogShow(productId); + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.BuildDeckPurchasePage); + UIManager.GetInstance()._Footer.UpdateCurrentIndex(5); + }; + } + } + + private void SetupChapterDataListTutorial() + { + Data.StoryInfo.ChapterDataList = Data.Master.TutorialAreaSelectList.Select((TutorialAreaSelect x) => new StoryChapterData(x)).ToList(); + } + + private void SetupChapterList() + { + if (_chapterDataList == null) + { + return; + } + if (_chapterSelectButtonList != null) + { + for (int i = 0; i < _chapterSelectButtonList.Count; i++) + { + UnityEngine.Object.Destroy(_chapterSelectButtonList[i].gameObject); + } + } + _chapterSelectButtonList = new List(8); + nowAreaAllNum = 0; + for (int j = 0; j < _chapterDataList.Count; j++) + { + if (!_chapterDataList[j].IsReleased) + { + continue; + } + ChapterSelectButton chapterSelectButton = UnityEngine.Object.Instantiate(_chapterSelectButtonOriginal); + chapterSelectButton.gameObject.SetActive(value: true); + chapterSelectButton.transform.parent = ChapterListScrollView.transform; + chapterSelectButton.transform.localPosition = new Vector3(0f, -400f + (float)j * 80f, 0f); + chapterSelectButton.transform.localScale = Vector3.one; + chapterSelectButton.name = "chapterlist_" + j.ToString("00"); + chapterSelectButton.SetChapterData(_chapterDataList[j], this, ChapterListScrollView); + int index = j; + chapterSelectButton.OnClick = delegate + { + if (SectionData.IsTutorialCategory) + { + OnTouchChapterListTutorial(index); + } + else + { + OnTouchChapterList(index); + } + }; + _chapterSelectButtonList.Add(chapterSelectButton); + nowAreaAllNum++; + } + LimitAreaScroll(); + ChapterListScrollView.ResetPosition(); + } + + private void mapMoveTarget(float time) + { + Vector3 mapIconPos = _mapIcon.GetMapIconPos(_selectChapterIndex, isLocal: true); + iTween.MoveUpdate(_BG.GetBGRoot(), iTween.Hash("islocal", true, "x", BG_SCALE_ZOOMIN.x * (mapIconPos.x * -1f), "y", BG_SCALE_ZOOMIN.y * (mapIconPos.y * -1f) + -400f, "time", time, "easetype", iTween.EaseType.easeOutExpo)); + } + + private void SetPlayerIconVisible(bool isvisible) + { + if (isvisible) + { + GameMgr.GetIns().GetEffectMgr().StartBuff(EffectMgr.EffectType.CMN_MAP_PLAYERICON, PlayerIcon); + } + else + { + GameMgr.GetIns().GetEffectMgr().StopBuff(EffectMgr.EffectType.CMN_MAP_PLAYERICON, PlayerIcon); + } + } + + private void SwitchChapterEffectVisible(int previousChapter) + { + if (!(_chapterEffect.GetPlayingEffect() == _selectChapterData.ChapterEffectPath)) + { + float? simulationSpeedAfterStop = null; + if (SectionId == 20 && AreaBGInfoSection20.IsSpeedUpParticleTransition(previousChapter, _selectChapterIndex)) + { + simulationSpeedAfterStop = _chapterEffectSimulationSpeedAfterStop; + } + _chapterEffect.StopEffect(simulationSpeedAfterStop); + _chapterEffect.PlayEffect(_selectChapterData.ChapterEffectPath, _chapterEffectLocator.transform.localPosition); + } + } + + public string GetChapterTitleStory(string chapterID) + { + if (_scenarioSummary == null) + { + return ""; + } + return _scenarioSummary.GetData(chapterID).Title; + } + + private TitlePanelBase CreateTitlePanel() + { + return StoryChapterSelectionUtility.CreateTitlePanel(_titlePanelRoot, _commonPrefabContainer.CharaInfoPanelPrefab, _commonPrefabContainer.SectionInfoPanelPrefab, SelectedStoryInfo); + } + + private AreaSelInfo CreateChapterRewardPanel() + { + return StoryChapterSelectionUtility.CreateChapterRewardPanel(_chapterRewardPanelRoot, _commonPrefabContainer.ChapterRewardPanelPrefab); + } + + private void ResetSelectedStoryInfo() + { + _beforeNextChapterId = SelectedStoryInfo.NextChapterId; + _beforeReleasedChapterNum = SelectedStoryInfo.ReleasedChapterNum; + _beforeReplayChapterIndex = SelectedStoryInfo.ReplayChapterIndex; + SelectedStoryInfo.ClearInfoForChapterSelectionScene(); + } + + private static IProcessing CreateSelectionProcessings(bool isTutorialCategory) + { + IProcessing[] array = ((!isTutorialCategory) ? new IProcessing[8] + { + new SubChapterSelectionDialogDisplay(), + new SummaryDialogDisplay(), + new DeckSelectionDialogDisplay(), + new ChapterCharaDecider(), + new DownloadInfoGetter(), + new DownloadConfirmDialogDisplay(), + new DeckSelectionConfirmDialogDisplay(), + new StoryStarter() + } : new IProcessing[3] + { + new SummaryDialogDisplay(), + new ChapterCharaDecider(), + new TutorialStoryStarter() + }); + for (int i = 0; i < array.Length - 1; i++) + { + array[i].NextProcessing = array[i + 1]; + } + return array.FirstOrDefault(); + } + + private void ExecuteSelectionProcessings() + { + if (_firstSelectionProcessing != null) + { + Parameter param = CreateSelectionProcessingParameter(); + _firstSelectionProcessing.Execute(param); + } + } + + private Parameter CreateSelectionProcessingParameter() + { + return new Parameter(this, _commonPrefabContainer, _scenarioSummary, SelectedStoryInfo, _selectChapterData, nowAreaAllNum, null, _selectChapterData.IsPlayedChapter ? new int?(_selectChapterIndex) : ((int?)null)); + } + + private void InitBGStartMove() + { + iTween.Stop(_BG.GetBGRoot()); + } + + private void SetupBGStartMove(int? focus) + { + int newIndex = (focus.HasValue ? focus.Value : GetStartFocusChapterIndex()); + SelectChapter(newIndex, isplayse: false, iscalcscroll: true, ismapiconeffectenable: false); + MoveToScreenRightPartsRoot(isIn: false, isImmediate: true); + _chapterRewardPanel.MoveToScreen(isIn: false, isImmediate: true); + if (AspectCamera.SafeAreaRate < 1f) + { + float num = (float)Screen.width / (float)Screen.height / 1.7777778f; + _BG.GetBGRoot().transform.localScale = BG_SCALE_ZOOMOUT * num; + } + else + { + _BG.GetBGRoot().transform.localScale = BG_SCALE_ZOOMOUT; + } + _BG.GetBGRoot().transform.localPosition = BG_POS_ZOOMOUT; + SetPlayerIconVisible(isvisible: false); + InitAnotherEndingAppearanceEffect(); + } + + private void StartBGStartMove() + { + StartCoroutine(PlayAnimationCoroutine()); + } + + private IEnumerator PlayAnimationCoroutine() + { + _isPlayingBGStartMove = true; + yield return new WaitForSeconds(1f); + yield return ZoomInCoroutine(); + if (HasAnotherEndingAppearanceAnimation) + { + yield return PlayAnotherEndingAppearanceAnimationCoroutine(); + } + yield return PlayUiEntranceAnimationCoroutine(); + _isPlayingBGStartMove = false; + } + + private IEnumerator ZoomInCoroutine() + { + iTween.ScaleTo(_BG.GetBGRoot(), iTween.Hash("scale", BG_SCALE_ZOOMIN, "islocal", true, "time", 1f, "easetype", BG_ZOOMIN_EASETYPE)); + Vector3 mapIconPos = _mapIcon.GetMapIconPos(_selectChapterIndex, isLocal: true); + iTween.MoveTo(_BG.GetBGRoot(), iTween.Hash("islocal", true, "x", BG_SCALE_ZOOMIN.x * (mapIconPos.x * -1f), "y", BG_SCALE_ZOOMIN.y * (mapIconPos.y * -1f) + -400f, "time", 1f, "easetype", BG_ZOOMIN_EASETYPE)); + yield return new WaitForSeconds(1f); + } + + private IEnumerator PlayAnotherEndingAppearanceAnimationCoroutine() + { + _anotherEndingAppearanceEffect.SetActive(value: true); + yield return new WaitForSeconds(1.5f); + } + + private IEnumerator PlayUiEntranceAnimationCoroutine() + { + SetPlayerIconVisible(_selectChapterData.IsDisplayMapIcon); + if (_selectChapterData.IsDisplayMapIcon) + { + _mapIcon.StartMapIconEffect(_selectChapterData.ClearStatus, _selectChapterIndex); + } + StartCoroutine(assetSetting()); + MoveToScreenRightPartsRoot(isIn: true, isImmediate: false); + MoveToScreenTitlePanel(isIn: true, isImmediate: false); + _chapterRewardPanel.MoveToScreen(isIn: true, isImmediate: false); + yield return new WaitForSeconds(1f); + StartEffectTap(); + } + + private int GetStartFocusChapterIndex() + { + if (HasAnotherEndingAppearanceAnimation) + { + return int.Parse(_anotherEndingAppearanceAnimationChapterData.ChapterId) - 1; + } + if (_beforeReplayChapterIndex.HasValue && _beforeReplayChapterIndex.Value < nowAreaAllNum - 1) + { + return _beforeReplayChapterIndex.Value + 1; + } + return nowAreaAllNum - 1; + } + + private void InitAnotherEndingAppearanceEffect() + { + if (HasAnotherEndingAppearanceAnimation) + { + int chapterIndex = int.Parse(_anotherEndingAppearanceAnimationChapterData.ChapterId) - 1; + InitEffect(_anotherEndingAppearanceEffect, _mapIcon.GetMapIconObject(chapterIndex)); + } + } + + private static void InitEffect(GameObject effect, GameObject parent) + { + Transform transform = effect.transform; + Vector3 localScale = UIManager.GetInstance().UIManagerRoot.transform.localScale; + transform.parent = parent.transform; + transform.localPosition = Vector3.zero; + transform.localRotation = Quaternion.identity; + transform.localScale = new Vector3(1f / localScale.x, 1f / localScale.y, 1f / localScale.z); + UIManager.GetInstance().SetLayerRecursive(transform, parent.layer); + } +} diff --git a/SVSim.BattleEngine/Engine/AreaSelectUtility.cs b/SVSim.BattleEngine/Engine/AreaSelectUtility.cs new file mode 100644 index 0000000..9c04282 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AreaSelectUtility.cs @@ -0,0 +1,39 @@ +using UnityEngine; + +public class AreaSelectUtility +{ + public const string BTN_IMAGE_NAME_SUFFIX_OFF = "{0}_off"; + + public const string BTN_IMAGE_NAME_SUFFIX_ON = "{0}_on"; + + public static readonly string ChapterSelectBtnPathPrefix = "btn_story_select"; + + public static readonly Color32 CLEAR_LABEL_COLOR_CLEARD_GRADIENT_TOP = new Color32(byte.MaxValue, 245, 161, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_CLEARD_GRADIENT_BUTTOM = new Color32(byte.MaxValue, 209, 71, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_CLEARD_EFFECT_OUTLINE8 = new Color32(94, 67, 31, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_ALREADY_READ_GRADIENT_TOP = new Color32(245, 249, byte.MaxValue, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_ALREADY_READ_GRADIENT_BUTTOM = new Color32(190, 218, 242, byte.MaxValue); + + public static readonly Color32 CLEAR_LABEL_COLOR_ALREADY_READ_EFFECT_OUTLINE8 = new Color32(60, 73, 96, byte.MaxValue); + + public static void SetClearLabelColor(UILabel clearLabel, StoryChapterData.ChapterClearStatus clearState) + { + switch (clearState) + { + case StoryChapterData.ChapterClearStatus.Cleared: + clearLabel.gradientTop = CLEAR_LABEL_COLOR_CLEARD_GRADIENT_TOP; + clearLabel.gradientBottom = CLEAR_LABEL_COLOR_CLEARD_GRADIENT_BUTTOM; + clearLabel.effectColor = CLEAR_LABEL_COLOR_CLEARD_EFFECT_OUTLINE8; + break; + case StoryChapterData.ChapterClearStatus.AlreadyRead: + clearLabel.gradientTop = CLEAR_LABEL_COLOR_ALREADY_READ_GRADIENT_TOP; + clearLabel.gradientBottom = CLEAR_LABEL_COLOR_ALREADY_READ_GRADIENT_BUTTOM; + clearLabel.effectColor = CLEAR_LABEL_COLOR_ALREADY_READ_EFFECT_OUTLINE8; + break; + } + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaColosseum.cs b/SVSim.BattleEngine/Engine/ArenaColosseum.cs new file mode 100644 index 0000000..7baf369 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaColosseum.cs @@ -0,0 +1,346 @@ +using System.Collections.Generic; +using UnityEngine; +using Wizard; +using Wizard.Scripts.Network.Data.TableData.Arena.TwoPick; +using Wizard.Scripts.Network.Data.TaskData.Arena.TwoPick; + +public class ArenaColosseum : ArenaEntryDataBase +{ + public enum eRound + { + FinalNotAdvance = -1, + Round1 = 1, + Round2B = 2, + Round2A = 3, + FinalB = 4, + FinalA = 5, + FinalMin = 4, + RoundMax = 5, + Undecided = 6, + Lose = 7 + } + + public enum eStageNo + { + Stage1 = 1, + Stage2, + FinalStage, + Max + } + + public enum eEntryStatus + { + TwoPickClassSelect = 1, + TwoPickCardSelect, + SetUpComplete + } + + public enum eRule + { + NONE = 0, + RotationBo1 = 1, + UnlimitedBo1 = 2, + TwoPick = 3, + TwoPickChaos = 4, + Crossover = 5, + MyRotation = 6, + HOF = 31, + WindFall = 33, + Avatar = 39 + } + + public enum eDeckIndex + { + Main = 0, + First = 0, + Second = 1, + Third = 2 + } + + public struct Detail + { + public string RoundTimeText { get; set; } + + public string RoundTimeStartText { get; set; } + + public string RoundTimeEndText { get; set; } + + public string GroupName { get; set; } + + public int MaxBattleNum { get; set; } + + public int BreakThroughNum { get; set; } + + public int MaxEntryNum { get; set; } + } + + public class TwoPick + { + public CandidateClass CandidateClass { get; set; } + + public CandidateCardInfo CandidateCard { get; set; } + + public Deck DeckData { get; set; } + + public CandidateChaos CandidateChaos { get; set; } + } + + public enum eResultEffect + { + None, + GroupA, + Final, + Clear + } + + private bool _isRankMatching; + + public bool CanUseNonPossessionCard; + + public int DeckEntryId { get; set; } + + public bool IsColosseumPeriod { get; set; } + + public bool IsRoundPeriod { get; set; } + + public eEntryStatus EntryStatus { get; set; } + + public Format DeckFormat { get; set; } + + public eRule Rule { get; set; } + + public bool IsNormalTwoPick { get; set; } + + public int ChaosNum { get; set; } + + public bool IsTwoPickRule + { + get + { + if (Rule != eRule.TwoPick) + { + return Rule == eRule.TwoPickChaos; + } + return true; + } + } + + public bool NeedsFirstTips { get; set; } + + public int ColosseumId { get; set; } + + public int ChaoseTipsId { get; set; } + + public bool IsSpecialDeckSelectRule + { + get + { + if (Rule != eRule.HOF) + { + return Rule == eRule.WindFall; + } + return true; + } + } + + public bool IsDeckMaxNumberChange => Rule == eRule.WindFall; + + public int DeckMaxNumber + { + get + { + if (Rule == eRule.WindFall) + { + return 35; + } + return 40; + } + } + + public bool IsRankMatching + { + get + { + return _isRankMatching; + } + set + { + if (_isRankMatching != value) + { + _isRankMatching = value; + if (RealTimeNetworkAgent.FinishTaskBase != null) + { + RealTimeNetworkAgent.FinishTaskBase = new ColosseumBattleFinishTask(); + } + } + } + } + + public List DeckList { get; set; } + + public eRound Round { get; set; } + + public int ServerRoundId { get; set; } + + public eStageNo StageNo { get; set; } + + public string Name { get; set; } + + public List RewardList { get; set; } + + public eResultEffect ResultEffect { get; set; } + + public string ColorCodeId { get; set; } + + public string CardPool { get; set; } + + public int RetryRemainingNum { get; set; } + + public int BattleMax { get; set; } + + public int ClearWinNum { get; set; } + + public bool IsDeckEntry { get; set; } + + public bool IsFreeEntry + { + get + { + return Data.MyPageNotifications.data.IsColosseumFreeEntry; + } + set + { + Data.MyPageNotifications.data.IsColosseumFreeEntry = value; + } + } + + public bool IsRetry { get; set; } + + public bool IsLastDay { get; set; } + + public bool IsClear { get; set; } + + public bool IsRetire { get; set; } + + public bool IsFinish { get; set; } + + public bool IsDeckDeleted { get; set; } + + public bool IsFinalRoundTry { get; set; } + + public eRound NextRound { get; set; } + + public double RemainingUnixTime { get; set; } + + public float RemainingSinceTime { get; set; } + + public double RemainingServerUnixTime { get; set; } + + public string NextRoundStartTimeText { get; set; } + + public string NowRoundTimeText { get; set; } + + public string ColosseumTimeText { get; set; } + + public string AnnounceNo { get; set; } + + public Detail[] DetailData { get; set; } + + public eStageNo FocusStageNo { get; set; } + + public int WinBattleNum { get; set; } + + public List BattleResultList { get; set; } + + public List BoxGradeList { get; set; } + + public int FinalRoundEliminateCount { get; set; } + + public TwoPick TwoPickData { get; set; } + + public ArenaColosseum() + { + base.LootBoxType = PlayerStaticData.LootBoxType.COLOSSEUM; + DeckList = new List(); + RewardList = new List(); + BattleResultList = new List(); + BoxGradeList = new List(); + DetailData = new Detail[5]; + Rule = eRule.TwoPick; + TwoPickData = new TwoPick(); + TwoPickData.CandidateClass = new CandidateClass(); + TwoPickData.CandidateCard = new CandidateCardInfo(); + TwoPickData.CandidateChaos = new CandidateChaos(); + } + + public int GetRoundNumber(eRound inRound) + { + switch (inRound) + { + case eRound.Round1: + return 1; + case eRound.Round2B: + case eRound.Round2A: + return 2; + default: + return 0; + } + } + + public string GetGroupText(eRound inRound) + { + switch (inRound) + { + case eRound.Round2A: + case eRound.FinalA: + return Data.SystemText.Get("Colosseum_0020"); + case eRound.Round2B: + case eRound.FinalB: + return Data.SystemText.Get("Colosseum_0021"); + default: + return ""; + } + } + + public eStageNo GetStageNoFromRoundId(eRound inRoundId) + { + switch (inRoundId) + { + case eRound.Round1: + return eStageNo.Stage1; + case eRound.Round2B: + case eRound.Round2A: + return eStageNo.Stage2; + case eRound.FinalB: + case eRound.FinalA: + return eStageNo.FinalStage; + default: + return eStageNo.Stage1; + } + } + + public bool IsFinalRound() + { + if (Round == eRound.FinalA || Round == eRound.FinalB) + { + return true; + } + return false; + } + + public DialogBase CreateDetailDialog(GameObject defaultDetailPrefab) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + GameObject gameObject = Object.Instantiate(defaultDetailPrefab); + dialogBase.SetObj(gameObject); + gameObject.GetComponent().Init(dialogBase); + return dialogBase; + } + + public void ApiRuleParseAndSet(int apiRule) + { + ArenaColosseum colosseumData = Data.ArenaData.ColosseumData; + colosseumData.Rule = (eRule)apiRule; + colosseumData.DeckFormat = ArenaData.ApiDeckFormatParse(colosseumData.Rule); + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaCompetition.cs b/SVSim.BattleEngine/Engine/ArenaCompetition.cs new file mode 100644 index 0000000..72a17e7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaCompetition.cs @@ -0,0 +1,206 @@ +using System; +using System.Collections.Generic; +using LitJson; +using UnityEngine; +using Wizard; +using Wizard.Scripts.Network.Data.TaskData.Arena; + +public class ArenaCompetition : ArenaEntryDataBase +{ + public enum EntryStatusType + { + NotEntry, + NotChallenge, + NotRegistDeck, + InBattle + } + + public enum FreebieStatusType + { + InFreeBattle, + CanPermanentEntry, + PermanentEntryDone + } + + public enum EntryCostType + { + EntryWithFree, + EntryWithCost + } + + private bool _isRankMatching; + + public bool IsCompetitionPeriod { get; private set; } + + public bool IsEntry { get; set; } + + public bool IsInFreeBattleRegistDeck { get; set; } + + public bool NeedsFirstTips { get; private set; } + + public int CompetitionId { get; private set; } + + public FreebieStatusType FreebieStatus { get; set; } + + public Format DeckFormat { get; private set; } + + public ArenaColosseum.eRule Rule { get; private set; } + + public bool IsSpecialMode { get; private set; } + + public string NowRoundTimeText { get; private set; } + + public string EntryEndTimeText { get; private set; } + + public string EndTimeText { get; private set; } + + public double EntryRemainingUnixTime { get; set; } + + public double RemainingUnixTime { get; set; } + + public float RemainingSinceTime { get; set; } + + public double RemainingServerUnixTime { get; set; } + + public string EntryTimeText { get; private set; } + + public List DeckList { get; set; } + + public List EntryRewardList { get; set; } + + public bool IsRewardReceived { get; private set; } + + public string AnnounceId { get; private set; } + + public string CompetitionName { get; private set; } + + public int MaxEntryCount { get; private set; } + + public int MaxChallengeCount { get; private set; } + + public int MaxWinCount { get; private set; } + + public int BestWinCount { get; private set; } + + public int MaxLoseCount { get; private set; } + + public int RestChallangeCount { get; private set; } + + public int RestEntryCount { get; private set; } + + public int CurrentWinCount { get; private set; } + + public int FreebieChallengeCount { get; private set; } + + public bool IsChampion { get; private set; } + + public bool IsEntryTimeEnd { get; private set; } + + public int MaxBattleCount { get; private set; } + + public int IsCompletedTwoPickDeck { get; private set; } + + public int MaxFreebieChallengeCount { get; private set; } + + public EntryStatusType EntryStatus { get; private set; } + + public EntryCostType CostType { get; private set; } + + public bool IsRankMatching + { + get + { + return _isRankMatching; + } + set + { + if (_isRankMatching != value) + { + _isRankMatching = value; + if (RealTimeNetworkAgent.FinishTaskBase != null) + { + RealTimeNetworkAgent.FinishTaskBase = new CompetitionBattleFinishTask(); + } + } + } + } + + public ArenaCompetition() + { + } + + public ArenaCompetition(JsonData responseData) + { + JsonData jsonData = responseData["data"]["competition_info"]; + IsCompetitionPeriod = jsonData["is_competition_period"].ToBoolean(); + if (IsCompetitionPeriod) + { + Rule = (ArenaColosseum.eRule)jsonData["deck_format"].ToInt(); + DeckFormat = ArenaData.ApiDeckFormatParse(Rule); + IsEntry = jsonData["is_entry"].ToBoolean(); + IsInFreeBattleRegistDeck = jsonData["is_in_battle"].ToBoolean(); + IsSpecialMode = jsonData["is_special_mode"].ToInt() == 1; + string text = ConvertTime.ToLocal(DateTime.Parse(jsonData["entry_start_time"].ToString())); + EntryRemainingUnixTime = ConvertTime.DateTimeToUnixTime(DateTime.Parse(jsonData["entry_end_time"].ToString())); + string text2 = ConvertTime.ToLocal(DateTime.Parse(jsonData["entry_end_time"].ToString())); + EntryTimeText = Data.SystemText.Get("Colosseum_0033", text, text2); + EntryEndTimeText = text2; + string text3 = ConvertTime.ToLocal(DateTime.Parse(jsonData["start_time"].ToString())); + RemainingUnixTime = ConvertTime.DateTimeToUnixTime(DateTime.Parse(jsonData["end_time"].ToString())); + string text4 = ConvertTime.ToLocal(DateTime.Parse(jsonData["end_time"].ToString())); + NowRoundTimeText = Data.SystemText.Get("Colosseum_0033", text3, text4); + EndTimeText = text4; + RemainingSinceTime = Time.realtimeSinceStartup; + RemainingServerUnixTime = responseData["data_headers"]["servertime"].ToDouble(); + NeedsFirstTips = jsonData.GetValueOrDefault("is_display_tips", 0) == 1; + CompetitionId = jsonData.GetValueOrDefault("competition_id", 0); + FreebieStatus = (FreebieStatusType)jsonData["freebie_status"].ToInt(); + DeckList = new List(); + EntryRewardList = new List(); + JsonData jsonData2 = jsonData["featured_entry_reward_list"]; + for (int i = 0; i < jsonData2.Count; i++) + { + Wizard.Scripts.Network.Data.TaskData.Arena.Reward item = new Wizard.Scripts.Network.Data.TaskData.Arena.Reward(jsonData2[i]); + EntryRewardList.Add(item); + } + IsRewardReceived = jsonData["is_received_featured_entry_reward"].ToBoolean(); + if (jsonData["announce_id"] != null) + { + AnnounceId = jsonData["announce_id"].ToString(); + } + MaxEntryCount = jsonData.GetValueOrDefault("max_entry_count", 0); + MaxChallengeCount = jsonData.GetValueOrDefault("max_challenge_count", 0); + MaxWinCount = jsonData.GetValueOrDefault("max_win_count", 0); + MaxLoseCount = jsonData.GetValueOrDefault("max_lose_count", 0); + MaxBattleCount = jsonData.GetValueOrDefault("max_battle_count", 0); + MaxFreebieChallengeCount = jsonData["max_freebie_challenge_count"].ToInt(); + crystalCost = jsonData.GetValueOrDefault("crystal_cost", 0); + rupyCost = jsonData.GetValueOrDefault("rupy_cost", 0); + BestWinCount = jsonData["max_win_count_in_entry"].ToInt(); + RestChallangeCount = jsonData["rest_challenge_num"].ToInt(); + RestEntryCount = jsonData["rest_entry_num"].ToInt(); + CurrentWinCount = jsonData["current_win_count"].ToInt(); + FreebieChallengeCount = jsonData["freebie_challenge_count"].ToInt(); + EntryStatus = (EntryStatusType)jsonData["entry_status"].ToInt(); + CostType = (EntryCostType)jsonData["entry_type"].ToInt(); + IsChampion = jsonData.GetValueOrDefault("is_champion", 0) == 1; + CompetitionName = jsonData.GetValueOrDefault("competition_name", string.Empty).Replace("\\n", "\n"); + double num = RemainingServerUnixTime + (double)Time.realtimeSinceStartup - (double)RemainingSinceTime; + IsEntryTimeEnd = EntryRemainingUnixTime - num < 0.0; + bool flag = CompetitionId <= PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.COMPETITION_JOIN_BUTTON_LATEST_ID); + Data.MyPageNotifications.data.IsCompetitionBadge = !IsRewardReceived && EntryStatus == EntryStatusType.NotEntry && !IsEntryTimeEnd && !flag; + base.ExpirtyInfo = new ShopExpirtyInfo(jsonData["sales_period_info"]); + if (DeckFormat == Format.TwoPick) + { + IsCompletedTwoPickDeck = jsonData["is_completed_two_pick_deck"].ToInt(); + } + } + base.LootBoxType = PlayerStaticData.LootBoxType.COMPETITION; + } + + public void SetRestChallangeCountByEntry(JsonData responseData) + { + RestChallangeCount = responseData["rest_challenge_count"].ToInt(); + IsEntry = true; + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaData.cs b/SVSim.BattleEngine/Engine/ArenaData.cs new file mode 100644 index 0000000..c0ca7b6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaData.cs @@ -0,0 +1,80 @@ +using LitJson; +using Wizard; + +public class ArenaData : HeaderData +{ + public enum eARENA_PAY + { + None = 0, + Crystal = 1, + Ticket = 3, + Rupy = 4, + Free = 5 + } + + public ArenaTwoPickData TwoPickData { get; set; } + + public SealedData SealedData { get; private set; } + + public SealedMyPageResponseData SealedMyPageResponseData { get; private set; } + + public ArenaColosseum ColosseumData { get; set; } + + public ArenaCompetition CompetitionData { get; set; } + + public ArenaData() + { + SealedData = new SealedData(); + ColosseumData = new ArenaColosseum(); + CompetitionData = new ArenaCompetition(); + } + + public ArenaData(JsonData data) + : this() + { + if (data != null) + { + JsonData data2 = data[0]; + TwoPickData = new ArenaTwoPickData(data2); + } + } + + public void ClearSealedData() + { + SealedData = new SealedData(); + } + + public void SetSealedMyPageResponseData(JsonData rootData) + { + if (rootData.Keys.Contains("sealed_info")) + { + SealedMyPageResponseData = new SealedMyPageResponseData(rootData["sealed_info"]); + } + } + + public static Format ApiDeckFormatParse(ArenaColosseum.eRule rule) + { + Format format = Format.Rotation; + switch (rule) + { + case ArenaColosseum.eRule.RotationBo1: + return Format.Rotation; + case ArenaColosseum.eRule.UnlimitedBo1: + return Format.Unlimited; + case ArenaColosseum.eRule.TwoPick: + case ArenaColosseum.eRule.TwoPickChaos: + return Format.TwoPick; + case ArenaColosseum.eRule.HOF: + case ArenaColosseum.eRule.WindFall: + return Format.Max; + case ArenaColosseum.eRule.Crossover: + return Format.Crossover; + case ArenaColosseum.eRule.MyRotation: + return Format.MyRotation; + case ArenaColosseum.eRule.Avatar: + return Format.Avatar; + default: + return Format.Max; + } + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaEntryBase.cs b/SVSim.BattleEngine/Engine/ArenaEntryBase.cs new file mode 100644 index 0000000..1800a49 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaEntryBase.cs @@ -0,0 +1,158 @@ +using System; +using System.Collections; +using UnityEngine; +using Wizard; + +public abstract class ArenaEntryBase : MonoBehaviour +{ + [SerializeField] + protected GameObject ArenaEntryDialog; + + [SerializeField] + protected GameObject CompetitionEntryDialog; + + [SerializeField] + protected UIButton ButtonEntry; + + [SerializeField] + protected UIButton ButtonResume; + + [SerializeField] + protected GameObject HeadLineObject; + + private UIWidget[] _headlineWidgetArray; + + private Color[] _headlineWidgetDefaultColorArray; + + private Coroutine _initCoroutine; + + protected bool _isFreeEntry; + + protected bool _isCompetition; + + protected string[] _labelsText; + + protected string _entryDialogTitleText; + + protected Action _initFunc; + + protected Action _resumeFunc; + + protected Func _isJoinFunc; + + protected Action _freeEntryFunc; + + protected Action _freeBattleFunc; + + protected Func _isFreeBattleCompetition; + + protected Action _entryFunc; + + private const float GLAY_SCALE = 0.33f; + + protected abstract void EntryDialogCreate(GameObject inDialog); + + protected virtual void EntryBaseInit(GameObject costRootObject) + { + _headlineWidgetArray = costRootObject.transform.GetComponentsInChildren(); + _headlineWidgetDefaultColorArray = new Color[_headlineWidgetArray.Length]; + for (int i = 0; i < _headlineWidgetArray.Length; i++) + { + _headlineWidgetDefaultColorArray[i] = _headlineWidgetArray[i].color; + } + } + + private void OnEnable() + { + UpdateMenu(); + } + + private void OnDestroy() + { + if (_initCoroutine != null) + { + StopCoroutine(_initCoroutine); + } + } + + public void UpdateMenu() + { + _initCoroutine = UIManager.GetInstance().StartCoroutine(_InitCoroutine()); + } + + protected virtual IEnumerator _InitCoroutine() + { + while (!MyPageMenu.IsMyPageRequestEnd) + { + yield return null; + } + if (_initFunc != null) + { + _initFunc(); + } + ButtonEntry.onClick.Clear(); + ButtonEntry.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (_entryFunc != null) + { + _entryFunc(); + } + else if (_isFreeEntry) + { + _freeEntryFunc(); + } + else + { + DialogBase.Size size = ((Data.ArenaData.CompetitionData.CostType != ArenaCompetition.EntryCostType.EntryWithCost) ? DialogBase.Size.M : DialogBase.Size.XL); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(size); + dialogBase.SetTitleLabel(_entryDialogTitleText); + GameObject gameObject = UnityEngine.Object.Instantiate(_isCompetition ? CompetitionEntryDialog : ArenaEntryDialog); + EntryDialogCreate(gameObject); + if (_isCompetition && Data.ArenaData.CompetitionData.CostType == ArenaCompetition.EntryCostType.EntryWithCost) + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.COMPETITION_JOIN_BUTTON_LATEST_ID, Data.ArenaData.CompetitionData.CompetitionId); + Data.MyPageNotifications.data.IsCompetitionBadge = false; + UIManager.GetInstance()._Footer.UpdateArenaBadgeIcon(); + UpdateCompetitionEntryBadge(); + } + gameObject.GetComponent().ParentDialog = dialogBase; + dialogBase.SetObj(gameObject.gameObject); + DialogBase.ButtonLayout buttonLayout = DialogBase.ButtonLayout.CloseBtn; + dialogBase.SetButtonLayout(buttonLayout); + } + })); + ButtonResume.onClick.Clear(); + ButtonResume.onClick.Add(new EventDelegate(delegate + { + _resumeFunc(); + })); + UpdateEntryResumeButton(); + } + + protected virtual void UpdateCompetitionEntryBadge() + { + } + + protected virtual void UpdateEntryResumeButton() + { + bool flag = _isJoinFunc(); + ButtonEntry.gameObject.SetActive(!flag); + ButtonResume.gameObject.SetActive(flag); + if (flag) + { + for (int i = 0; i < _headlineWidgetArray.Length; i++) + { + _headlineWidgetArray[i].color = new Color(_headlineWidgetDefaultColorArray[i].r * 0.33f, _headlineWidgetDefaultColorArray[i].g * 0.33f, _headlineWidgetDefaultColorArray[i].b * 0.33f, 255f); + } + } + else + { + for (int j = 0; j < _headlineWidgetArray.Length; j++) + { + _headlineWidgetArray[j].color = _headlineWidgetDefaultColorArray[j]; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaEntryDataBase.cs b/SVSim.BattleEngine/Engine/ArenaEntryDataBase.cs new file mode 100644 index 0000000..7b01ef2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaEntryDataBase.cs @@ -0,0 +1,16 @@ +using Wizard; + +public abstract class ArenaEntryDataBase +{ + public bool isJoin; + + public int crystalCost; + + public int rupyCost; + + public int ticketCost; + + public ShopExpirtyInfo ExpirtyInfo { get; set; } + + public PlayerStaticData.LootBoxType LootBoxType { get; set; } +} diff --git a/SVSim.BattleEngine/Engine/ArenaEntryDialogBase.cs b/SVSim.BattleEngine/Engine/ArenaEntryDialogBase.cs new file mode 100644 index 0000000..0c4010f --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaEntryDialogBase.cs @@ -0,0 +1,175 @@ +using UnityEngine; +using Wizard; + +public abstract class ArenaEntryDialogBase : MonoBehaviour +{ + protected Se.TYPE _entryButtonSe = Se.TYPE.SYS_BTN_DECIDE_TRANS; + + private const int CHECK_DIALOG_DEPTH = 10; + + private ArenaEntryDataBase _entryData; + + private ArenaEntryDialogData _dialogData; + + protected ArenaData.eARENA_PAY _payType; + + public bool IsCompetition; + + protected string _mainTextId; + + protected string _ticketSpriteName; + + protected string _arenaNameTextId; + + public DialogBase ParentDialog { get; set; } + + protected abstract void Init(); + + protected abstract int GetTicketNum(); + + protected abstract ArenaEntryDataBase GetEntryData(); + + private void Start() + { + Init(); + _entryData = GetEntryData(); + _dialogData = GetComponent(); + SystemText systemText = Data.SystemText; + if (_dialogData._mainText != null) + { + _dialogData._mainText.text = systemText.Get(_mainTextId); + } + if (_dialogData._ticketHaveTitle != null) + { + _dialogData._ticketHaveTitle.text = systemText.Get("Arena_0037"); + _dialogData._ticketHaveNum.text = GetTicketNum().ToString(); + _dialogData._ticketHaveUnit.text = systemText.Get("Common_0117"); + _dialogData._ticketButtonTitle.text = systemText.Get("Arena_0004"); + _dialogData._ticketButtonSubTitle.text = systemText.Get("Arena_0038"); + _dialogData._ticketButtonUseNum.text = _entryData.ticketCost.ToString(); + _dialogData._ticketSprite.spriteName = _ticketSpriteName; + _dialogData._ticketButton.onClick.Add(new EventDelegate(delegate + { + if (ParentDialog.GetNowScene() == DialogBase.DialogScene.WAIT) + { + OnClickTicketEntryButton(); + } + })); + } + if (_dialogData._rupyHaveTitle != null) + { + _dialogData._rupyHaveTitle.text = systemText.Get("Shop_0065"); + _dialogData._rupyHaveNum.text = PlayerStaticData.UserRupyCount.ToString(); + _dialogData._rupyHaveUnit.text = systemText.Get("Common_0120"); + _dialogData._rupyButtonTitle.text = (IsCompetition ? systemText.Get("Competition_0067") : systemText.Get("Arena_0036")); + _dialogData._rupyButtonSubTitle.text = systemText.Get("Shop_0062"); + _dialogData._rupyButtonUseNum.text = _entryData.rupyCost.ToString(); + _dialogData._rupyButton.onClick.Add(new EventDelegate(delegate + { + if (ParentDialog.GetNowScene() == DialogBase.DialogScene.WAIT) + { + OnClickRupyEntryButton(); + } + })); + } + _dialogData._crystalHaveTitle.text = systemText.Get("Shop_0064"); + _dialogData._crystalHaveNum.text = PlayerStaticData.UserCrystalCount.ToString(); + _dialogData._crystalHaveUnit.text = systemText.Get("Common_0116"); + _dialogData._crystalButtonTitle.text = (IsCompetition ? systemText.Get("Competition_0046") : systemText.Get("Arena_0023")); + _dialogData._crystalButtonSubTitle.text = systemText.Get("Shop_0061"); + _dialogData._crystalButtonUseNum.text = _entryData.crystalCost.ToString(); + if (_entryData.ticketCost > GetTicketNum()) + { + SetButtonDisable(_dialogData._ticketButton, _dialogData._ticketButtonTitle); + } + if (_entryData.rupyCost > PlayerStaticData.UserRupyCount) + { + SetButtonDisable(_dialogData._rupyButton, _dialogData._rupyButtonTitle); + } + _dialogData._crystalButton.onClick.Add(new EventDelegate(delegate + { + if (ParentDialog.GetNowScene() == DialogBase.DialogScene.WAIT) + { + OnClickCrystalEntryButton(); + } + })); + } + + private void SetButtonDisable(UIButton in_Button, UILabel in_Label) + { + in_Button.GetComponent().isEnabled = false; + in_Label.color = LabelDefine.TEXT_COLOR_BUTTON_DISABLE; + in_Button.GetComponent().duration = 0f; + } + + private void OnClickTicketEntryButton() + { + int ticketNum = GetTicketNum(); + SystemText systemText = Data.SystemText; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Arena_0005")); + dialogBase.SetPanelDepth(10); + ArenaBuyDialog component = Object.Instantiate(_dialogData.BuyDialogObject).GetComponent(); + dialogBase.SetObj(component.gameObject); + component.SetTicketConfirmDialog(_entryData.ticketCost, ticketNum, _arenaNameTextId, _ticketSpriteName); + dialogBase.onPushButton1 = Entry; + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(systemText.Get("Dia_Arena_003_Button")); + dialogBase.ClickSe_Btn1 = _entryButtonSe; + _payType = ArenaData.eARENA_PAY.Ticket; + } + + private void OnClickCrystalEntryButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (PlayerStaticData.IsLootBoxRegulation(_entryData.LootBoxType)) + { + LootBoxDialogUtility.CreateLootBoxRegulationDialog(_entryData.LootBoxType); + return; + } + if (_entryData.crystalCost > PlayerStaticData.UserCrystalCount) + { + ShopCommonUtility.CreateCrystalShortagePopup(); + return; + } + int userCrystalCount = PlayerStaticData.UserCrystalCount; + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Arena_0005")); + dialogBase.SetPanelDepth(10); + ArenaBuyDialog component = Object.Instantiate(_dialogData.BuyDialogObject).GetComponent(); + dialogBase.SetObj(component.gameObject); + component.SetClystalConfirmDialog(_entryData.crystalCost, userCrystalCount, _arenaNameTextId, _entryData.ExpirtyInfo); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + string text_btn = (IsCompetition ? systemText.Get("Competition_0036") : systemText.Get("Dia_Arena_004_Button")); + dialogBase.SetButtonText(text_btn); + dialogBase.ClickSe_Btn1 = _entryButtonSe; + dialogBase.onPushButton1 = Entry; + _payType = ArenaData.eARENA_PAY.Crystal; + } + + private void OnClickRupyEntryButton() + { + int userRupyCount = PlayerStaticData.UserRupyCount; + SystemText systemText = Data.SystemText; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Arena_0005")); + dialogBase.SetPanelDepth(10); + ArenaBuyDialog component = Object.Instantiate(_dialogData.BuyDialogObject).GetComponent(); + dialogBase.SetObj(component.gameObject); + component.SetRupyConfirmDialog(_entryData.rupyCost, userRupyCount, _arenaNameTextId); + dialogBase.onPushButton1 = Entry; + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + string text_btn = (IsCompetition ? systemText.Get("Competition_0036") : systemText.Get("Dia_Arena_005_Button")); + dialogBase.SetButtonText(text_btn); + dialogBase.ClickSe_Btn1 = _entryButtonSe; + _payType = ArenaData.eARENA_PAY.Rupy; + } + + protected virtual void Entry() + { + ParentDialog.CloseWithoutSelect(); + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaEntryDialogData.cs b/SVSim.BattleEngine/Engine/ArenaEntryDialogData.cs new file mode 100644 index 0000000..6c63093 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaEntryDialogData.cs @@ -0,0 +1,52 @@ +using UnityEngine; + +public class ArenaEntryDialogData : MonoBehaviour +{ + public GameObject BuyDialogObject; + + public UILabel _mainText; + + public UISprite _ticketSprite; + + public UIButton _ticketButton; + + public UIButton _rupyButton; + + public UIButton _crystalButton; + + public UILabel _ticketHaveTitle; + + public UILabel _ticketHaveNum; + + public UILabel _ticketHaveUnit; + + public UILabel _ticketButtonTitle; + + public UILabel _ticketButtonSubTitle; + + public UILabel _ticketButtonUseNum; + + public UILabel _rupyHaveTitle; + + public UILabel _rupyHaveNum; + + public UILabel _rupyHaveUnit; + + public UILabel _rupyButtonTitle; + + public UILabel _rupyButtonSubTitle; + + public UILabel _rupyButtonUseNum; + + public UILabel _crystalHaveTitle; + + public UILabel _crystalHaveNum; + + public UILabel _crystalHaveUnit; + + public UILabel _crystalButtonTitle; + + public UILabel _crystalButtonSubTitle; + + public UILabel _crystalButtonUseNum; +} diff --git a/SVSim.BattleEngine/Engine/ArenaField.cs b/SVSim.BattleEngine/Engine/ArenaField.cs new file mode 100644 index 0000000..5f6adf8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaField.cs @@ -0,0 +1,80 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ArenaField : BackGroundBase +{ + public override int FieldId => 9; + + public ArenaField(string bgmId = "NONE") + : base(bgmId) + { + } + + protected override void BattleFieldBuild() + { + BattleCoroutine.GetInstance().StartCoroutine(BackGroundBase.ObjectChecker(0.5f, _str3DFieldPath, delegate + { + base.Field = GameObject.Find(_str3DFieldPath); + base.Field.transform.parent = GameMgr.GetIns().m_GameManagerObj.transform; + GimicAudioList = base.Field.GetComponent().GimicAudioList; + _fieldModel = base.Field.transform.Find("md_bf_arna_root").gameObject; + _fieldParticles = _fieldModel.transform.Find("Particles09").gameObject; + _fieldObjDictionary.Add(_fieldParticles.name, _fieldParticles); + _fieldParticleSystemDictionary.Add("opening", _fieldParticles.transform.Find("opening").GetComponent()); + List list = new List(_fieldObjDictionary.Keys); + List list2 = new List(); + for (int i = 0; i < _fieldObjDictionary.Count; i++) + { + list2.Add(_fieldObjDictionary[list[i]]); + } + GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list2, delegate + { + base.SetShaderGlobalColorBG = base.Field.transform.Find("SetMaterialColorBGManager").GetComponent(); + base.IsLoadDone = true; + }, isBattle: true, isField: true); + })); + } + + public override void StartFieldSetEffect(Vector3 pos) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_SET_9, pos); + } + + public override void StartFieldTapEffect(int areaId, Vector3 pos) + { + base.StartFieldTapEffect(areaId, pos); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_9_1, pos); + } + + protected override IEnumerator RunFieldOpening() + { + GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_appear_1", "se_field_" + _str3DFieldNo, 0f, 0L); + _fieldParticleSystemDictionary["opening"].Play(); + _battleCamera.Camera.transform.localPosition = new Vector3(2700f, -880f, 300f); + _battleCamera.Camera.transform.localRotation = Quaternion.Euler(new Vector3(-19f, -90f, 90f)); + Vector3[] bezierCubic = MotionUtils.GetBezierCubic(new Vector3(2700f, -880f, 300f), new Vector3(1700f, -550f, -220f), new Vector3(700f, -200f, 20f), new Vector3(-240f, -190f, -70f), 10); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("path", bezierCubic, "movetopath", false, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", new Vector3(-37f, -117f, 107f), "time", 1f, "delay", 1f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + yield return new WaitForSeconds(2f); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CAMERA_ZOOM_OUT); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", _battleCamera.BattleCameraPos, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", _battleCamera.BattleCameraRot, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + yield return new WaitForSeconds(0f); + } + + protected override IEnumerator RunFieldGimic(GameObject obj) + { + string tag = obj.tag; + if (tag != null && tag == "FieldGimic1") + { + _ = _gimicCntDictionary[obj.tag]; + } + yield return new WaitForSeconds(0f); + } + + protected override IEnumerator RunFieldShake() + { + yield return new WaitForSeconds(0f); + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaNextSceneSelector.cs b/SVSim.BattleEngine/Engine/ArenaNextSceneSelector.cs new file mode 100644 index 0000000..a25edc0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaNextSceneSelector.cs @@ -0,0 +1,101 @@ +using Cute; +using UnityEngine; +using Wizard; + +public class ArenaNextSceneSelector : INextSceneSelector +{ + private BattleResultUIController m_battleResultNewControl; + + private bool _movingToMyPage; + + public ArenaNextSceneSelector(BattleResultUIController battleResultControl) + { + m_battleResultNewControl = battleResultControl; + _movingToMyPage = false; + } + + public void Setup(bool isWin, GameObject gameObject) + { + if (m_battleResultNewControl.ResultMsgReportBtnFlag) + { + m_battleResultNewControl.ReportBtnObj.labels[0].text = Data.SystemText.Get("Con_Management_001_Button"); + m_battleResultNewControl.ReportBtnObj.gameObject.SetActive(value: true); + m_battleResultNewControl.ReportBtnObj.buttons[0].onClick.Clear(); + m_battleResultNewControl.ReportBtnObj.buttons[0].onClick.Add(new EventDelegate(delegate + { + ConsistencyReportButtonAction.CreateReportConfirmWindow(); + })); + } + m_battleResultNewControl.MissionBtnObj.labels[0].text = Data.SystemText.Get("Battle_0200"); + m_battleResultNewControl.MissionBtnObj.buttons[0].onClick.Clear(); + m_battleResultNewControl.MissionBtnObj.buttons[0].onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + UIManager.GetInstance().createInSceneCenterLoading(); + MissionInfoTask missionInfoTask = GameMgr.GetIns().GetMissionInfoTask(); + missionInfoTask.SetParameter(); + m_battleResultNewControl.StartCoroutine(Toolbox.NetworkManager.Connect(missionInfoTask, delegate + { + m_battleResultNewControl.CreateMissionList(); + }, BaseTask.OnRequestFailed, BaseTask.OnFailedErrorCode)); + })); + m_battleResultNewControl.HomeBtnObj.labels[0].text = Data.SystemText.Get("Battle_0202"); + m_battleResultNewControl.HomeBtnObj.buttons[0].onClick.Clear(); + m_battleResultNewControl.HomeBtnObj.buttons[0].onClick.Add(new EventDelegate(delegate + { + MoveToMyPage(); + })); + if (GameMgr.GetIns().GetDataMgr().IsColosseumBattleType()) + { + m_battleResultNewControl.RetryBtnObj.labels[0].text = Data.SystemText.Get("Battle_0489"); + } + else if (GameMgr.GetIns().GetDataMgr().IsCompetitionBattleType()) + { + m_battleResultNewControl.RetryBtnObj.labels[0].text = Data.SystemText.Get("Competition_0021"); + } + else if (GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.Sealed) + { + m_battleResultNewControl.RetryBtnObj.labels[0].text = Data.SystemText.Get("Sealed_BattleResult_0001"); + } + else + { + m_battleResultNewControl.RetryBtnObj.labels[0].text = Data.SystemText.Get("Battle_0203"); + } + m_battleResultNewControl.RetryBtnObj.buttons[0].onClick.Clear(); + m_battleResultNewControl.RetryBtnObj.buttons[0].onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + if (GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.TwoPick) + { + GameMgr.GetIns().GetBattleCtrl().BattleEnd(UIManager.ViewScene.TwoPick); + } + else if (GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.Sealed) + { + GameMgr.GetIns().GetBattleCtrl().BattleEnd(UIManager.ViewScene.Sealed); + } + else if (GameMgr.GetIns().GetDataMgr().IsCompetitionBattleType()) + { + GameMgr.GetIns().GetBattleCtrl().BattleEnd(UIManager.ViewScene.CompetitionLobby); + } + else + { + GameMgr.GetIns().GetBattleCtrl().BattleEnd(UIManager.ViewScene.Colosseum); + } + })); + } + + public void Show() + { + iTween.MoveTo(m_battleResultNewControl.ButtonGrid.gameObject, iTween.Hash("position", m_battleResultNewControl.DefaultPosDict["ButtonGrid"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + } + + private void MoveToMyPage() + { + if (!_movingToMyPage) + { + _movingToMyPage = true; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL_TRANS); + GameMgr.GetIns().GetBattleCtrl().BattleEnd(UIManager.ViewScene.MyPage); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaResultAnimationAgent.cs b/SVSim.BattleEngine/Engine/ArenaResultAnimationAgent.cs new file mode 100644 index 0000000..6e46e97 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaResultAnimationAgent.cs @@ -0,0 +1,204 @@ +using System.Collections; +using UnityEngine; +using Wizard; + +public class ArenaResultAnimationAgent : ResultAnimationAgent +{ + public override IEnumerator RunUI(BattleResultUIController battleResultControl, INextSceneSelector nextSceneSelector, bool isWin) + { + m_BattleCamera.m_CutInCamera.gameObject.SetActive(value: false); + if (battleResultControl.IsDraw) + { + battleResultControl.TitleWin.gameObject.SetActive(value: false); + battleResultControl.TitleLose.gameObject.SetActive(value: false); + battleResultControl.TitleDraw.gameObject.SetActive(value: true); + battleResultControl.TitleDraw.transform.localScale = Vector3.one * 10f; + battleResultControl.TitleDraw.alpha = 0f; + battleResultControl.Bg.color = new Color32(0, 48, 16, 0); + battleResultControl.ResultTitle.spriteName = "result_top_lose"; + } + else if (isWin) + { + battleResultControl.TitleWin.gameObject.SetActive(value: true); + battleResultControl.TitleLose.gameObject.SetActive(value: false); + battleResultControl.TitleDraw.gameObject.SetActive(value: false); + battleResultControl.TitleWin.transform.localScale = Vector3.one * 10f; + battleResultControl.TitleWin.alpha = 0f; + battleResultControl.Bg.color = new Color32(32, 24, 0, 0); + battleResultControl.ResultTitle.spriteName = "result_top_win"; + } + else + { + battleResultControl.TitleWin.gameObject.SetActive(value: false); + battleResultControl.TitleLose.gameObject.SetActive(value: true); + battleResultControl.TitleDraw.gameObject.SetActive(value: false); + battleResultControl.TitleLose.transform.localScale = Vector3.one * 10f; + battleResultControl.TitleLose.alpha = 0f; + battleResultControl.Bg.color = new Color32(0, 24, 48, 0); + battleResultControl.ResultTitle.spriteName = "result_top_lose"; + } + battleResultControl.MainPanel.alpha = 1f; + yield return new WaitForSeconds(0.1f); + if (battleResultControl.IsDraw) + { + TweenAlpha.Begin(battleResultControl.TitleDraw.gameObject, 0.2f, 1f); + iTween.ScaleTo(battleResultControl.TitleDraw.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_YOULOSE); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_JINGLE_LOSE); + } + else if (isWin) + { + TweenAlpha.Begin(battleResultControl.TitleWin.gameObject, 0.2f, 1f); + iTween.ScaleTo(battleResultControl.TitleWin.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_YOUWIN); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_JINGLE_WIN); + } + else + { + TweenAlpha.Begin(battleResultControl.TitleLose.gameObject, 0.2f, 1f); + iTween.ScaleTo(battleResultControl.TitleLose.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_YOULOSE); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_JINGLE_LOSE); + } + TweenAlpha.Begin(battleResultControl.Bg.gameObject, 0.5f, 0.75f); + yield return new WaitForSeconds(0.2f); + TweenAlpha.Begin(battleResultControl.ArcaneIn.gameObject, 0.5f, 1f); + TweenAlpha.Begin(battleResultControl.ArcaneOut.gameObject, 0.5f, 1f); + iTween.ScaleTo(battleResultControl.ArcaneIn.gameObject, iTween.Hash("scale", Vector3.one, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.ScaleTo(battleResultControl.ArcaneOut.gameObject, iTween.Hash("scale", Vector3.one, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + if (battleResultControl.IsDraw) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_TITLE_3, Vector3.zero); + battleResultControl.TitleDraw.transform.localScale = Vector3.one; + iTween.ScaleTo(battleResultControl.TitleDraw.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.linear)); + } + else if (isWin) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_TITLE_1, Vector3.zero); + battleResultControl.TitleWin.transform.localScale = Vector3.one; + iTween.ScaleTo(battleResultControl.TitleWin.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.linear)); + } + else + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_TITLE_2, Vector3.zero); + battleResultControl.TitleLose.transform.localScale = Vector3.one; + iTween.ScaleTo(battleResultControl.TitleLose.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.linear)); + } + HideEmotionMessage(); + if (battleResultControl.ResultMsgWindowFlag) + { + StartCoroutine(battleResultControl.ShowSpecialResultInfo()); + } + yield return new WaitForSeconds(2f); + RankWinnerReward winnerReward = GameMgr.GetIns()._rankWinnerReward; + if (winnerReward == null) + { + int value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_GRADE); + string value2 = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_STRING); + if (value != 0 && value2 != "") + { + winnerReward = UIManager.GetInstance().createRankWinnerReward(); + GameMgr.GetIns()._rankWinnerReward = winnerReward; + winnerReward.SetInfomation(value, value2); + winnerReward.gameObject.SetActive(value: false); + } + } + if (winnerReward != null && isWin) + { + float seconds = 3f; + StartCoroutine(winnerReward.ResultWinnerReward()); + yield return new WaitForSeconds(seconds); + StartCoroutine(winnerReward.HideRewardObject()); + } + if (!battleResultControl.IsDraw && ShowRewardDialog(battleResultControl)) + { + while (battleResultControl.IsRewardWait) + { + yield return null; + } + } + if (Data.ArenaBattleFinish.data != null) + { + TreasureBoxCpResultInfo treasureBoxCpResultInfo = Data.ArenaBattleFinish.data.TreasureBoxCpResultInfo; + if (treasureBoxCpResultInfo.IsPlayGradeUpAnimation()) + { + yield return TreasureBoxCpOpenBoxAnimation(battleResultControl, treasureBoxCpResultInfo.AfterGrade); + } + if (treasureBoxCpResultInfo.IsBoxOpened()) + { + yield return CreateTreasureBoxCpRewardDialog(treasureBoxCpResultInfo); + } + } + if (battleResultControl.IsDraw) + { + TweenAlpha.Begin(battleResultControl.TitleDraw.gameObject, 0.2f, 0f); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_BACK_3, battleResultControl.AnchorBottom.transform.position, battleResultControl.AnchorBottom.gameObject); + } + else if (isWin) + { + TweenAlpha.Begin(battleResultControl.TitleWin.gameObject, 0.2f, 0f); + iTween.ScaleTo(battleResultControl.TitleWin.gameObject, iTween.Hash("scale", Vector3.one * 3f, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_BACK_1, battleResultControl.AnchorBottom.transform.position, battleResultControl.AnchorBottom.gameObject); + } + else + { + TweenAlpha.Begin(battleResultControl.TitleLose.gameObject, 0.2f, 0f); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_BACK_2, battleResultControl.AnchorBottom.transform.position, battleResultControl.AnchorBottom.gameObject); + } + yield return new WaitForSeconds(0.2f); + if (isWin) + { + GameMgr.GetIns().GetSoundMgr().PlayBGM(Bgm.BGM_TYPE.SYS_WIN_LOOP); + } + else + { + GameMgr.GetIns().GetSoundMgr().PlayBGM(Bgm.BGM_TYPE.SYS_LOSE_LOOP); + } + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_WINDOW_APPER); + iTween.MoveTo(battleResultControl.ClassCharObj.gameObject, iTween.Hash("position", battleResultControl.DefaultPosDict["ClassCharObj"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(battleResultControl.ResultTitle.gameObject, iTween.Hash("position", battleResultControl.DefaultPosDict["ResultTitle"], "time", 0.5f, "delay", 0f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(battleResultControl.ClassInfo.gameObject, iTween.Hash("position", battleResultControl.DefaultPosDict["ClassInfo"], "time", 0.5f, "delay", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + yield return new WaitForSeconds(1f); + if (isWin) + { + PlayWinVoice(); + } + if (battleResultControl.AddClassExp > 0) + { + battleResultControl.SettingAddClassExpTextAnimation(); + yield return new WaitForSeconds(0.5f); + for (int i = 0; i < 10; i++) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_GAUGEUP); + yield return new WaitForSeconds(0.05f); + } + yield return new WaitForSeconds(0.5f); + } + bool _isFinishBattlePass = false; + battleResultControl.SetBattlePassGauge(delegate + { + _isFinishBattlePass = true; + }); + while (!_isFinishBattlePass) + { + yield return null; + } + if (Data.RedEtherCampaignResultData != null) + { + bool isFinishRedEther = false; + RedEtherCampaignPanel.Create(battleResultControl.gameObject, Data.RedEtherCampaignResultData, battleResultControl, delegate + { + isFinishRedEther = true; + }); + while (!isFinishRedEther) + { + yield return null; + } + yield return ShowRewardDialog(Data.RedEtherCampaignResultData.RewardList); + } + battleResultControl.GreySpriteBGVisible = false; + nextSceneSelector.Show(); + battleResultControl.PrepareAchievementLog(); + battleResultControl.FinishResult(); + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaResultAnimationHandler.cs b/SVSim.BattleEngine/Engine/ArenaResultAnimationHandler.cs new file mode 100644 index 0000000..e8c8f9c --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaResultAnimationHandler.cs @@ -0,0 +1,22 @@ +using UnityEngine; + +public class ArenaResultAnimationHandler : IResultAnimationHandler +{ + private readonly GameObject m_resultAnimationAgentObj; + + private readonly ArenaResultAnimationAgent m_resultAnimationAgentIns; + + public ResultAnimationAgent m_resultAnimationAgent => m_resultAnimationAgentIns; + + public ArenaResultAnimationHandler(BattleCamera battleCamera) + { + m_resultAnimationAgentObj = new GameObject(); + m_resultAnimationAgentIns = m_resultAnimationAgentObj.AddComponent(); + m_resultAnimationAgentIns.GetComponent().SetBattleCamera(battleCamera); + } + + public void Destroy() + { + Object.Destroy(m_resultAnimationAgentObj); + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaResultReporter.cs b/SVSim.BattleEngine/Engine/ArenaResultReporter.cs new file mode 100644 index 0000000..ec621be --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaResultReporter.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using LitJson; +using Wizard; +using Wizard.Lottery; + +public class ArenaResultReporter : IBattleResultReporter +{ + public bool IsEnd => Data.ArenaBattleFinish.data != null; + + public int ClassExp => GetClassExp(); + + public List UserAchievement => GetUserAchievementList(); + + public List UserMission => GetUserMissionList(); + + public List MissionRewards => Data.ArenaBattleFinish.data._missionRewards; + + public List VictoryRewards => Data.ArenaBattleFinish.data._victoryRewards; + + public LotteryApplyData LotteryData => LotteryApplyData.EmptyData(); + + public bool IsDataExist + { + get + { + if (Data.ArenaBattleFinish.data != null) + { + return Data.ArenaBattleFinish.data.IsProcessed; + } + return false; + } + } + + public MyPageHomeDialogData HomeDialogData => null; + + public void Report(bool isWin) + { + } + + public void Destroy() + { + } + + public JsonData GetFinishResponseData() + { + return Data.ArenaBattleFinish.data._responseData; + } + + public List GetUserAchievementList() + { + return Data.ArenaBattleFinish.data.achieved_achievement_list; + } + + public List GetUserMissionList() + { + return Data.ArenaBattleFinish.data.achieved_mission_list; + } + + public int GetClassExp() + { + return Data.ArenaBattleFinish.data.get_class_chara_experience; + } +} diff --git a/SVSim.BattleEngine/Engine/ArenaTwoPickData.cs b/SVSim.BattleEngine/Engine/ArenaTwoPickData.cs new file mode 100644 index 0000000..07f8831 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArenaTwoPickData.cs @@ -0,0 +1,24 @@ +using LitJson; +using Wizard; + +public class ArenaTwoPickData : ArenaEntryDataBase +{ + public ChallengeData ChallengeData { get; private set; } + + public ArenaTwoPickData(JsonData data) + { + isJoin = data["is_join"].ToBoolean(); + crystalCost = data["cost"].ToInt(); + rupyCost = data["rupy_cost"].ToInt(); + ticketCost = data["ticket_cost"].ToInt(); + base.LootBoxType = PlayerStaticData.LootBoxType.TWOPICK; + if (data.Keys.Contains("sales_period_info")) + { + base.ExpirtyInfo = new ShopExpirtyInfo(data["sales_period_info"]); + } + if (data.Keys.Contains("format_info")) + { + ChallengeData = new ChallengeData(data["format_info"]); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ArrowControl.cs b/SVSim.BattleEngine/Engine/ArrowControl.cs new file mode 100644 index 0000000..3eed528 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArrowControl.cs @@ -0,0 +1,117 @@ +using System.Collections.Generic; +using UnityEngine; + +public class ArrowControl : MonoBehaviour +{ + [SerializeField] + private GameObject ArrowHead; + + [SerializeField] + private GameObject ArrowEfc; + + [SerializeField] + private int DivideCnt = 10; + + [SerializeField] + private bool isEvo; + + private IList ArrowEfcList; + + private GameObject FromObj; + + private GameObject ToObj; + + private bool isOn; + + private bool _isTargettingEnemy; + + private float ChangeTime; + + private IList ArrowTarList; + + private void Start() + { + ArrowEfcList = new List(); + ArrowEfcList.Add(ArrowEfc); + for (int i = 1; i < DivideCnt; i++) + { + GameObject gameObject = Object.Instantiate(ArrowEfc); + if (!(null == gameObject)) + { + gameObject.transform.parent = base.transform; + ArrowEfcList.Add(gameObject); + } + } + ArrowTarList = new List(); + for (int j = 0; j < DivideCnt; j++) + { + ArrowTarList.Add(j); + } + HideArrow(); + } + + private void Update() + { + if (isOn) + { + SetArrowLine(); + } + } + + public void ShowArrow(GameObject fromObj, GameObject toObj, bool isTargettingEnemy) + { + FromObj = fromObj; + ToObj = toObj; + _isTargettingEnemy = isTargettingEnemy; + isOn = true; + base.gameObject.SetActive(value: true); + } + + public void HideArrow() + { + isOn = false; + for (int i = 0; i < DivideCnt; i++) + { + ArrowEfcList[i].SetActive(value: false); + } + base.gameObject.SetActive(value: false); + } + + private void SetArrowLine() + { + if (isEvo) + { + ChangeTime -= Time.deltaTime * 5f; + } + else + { + ChangeTime -= Time.deltaTime; + } + if (ChangeTime <= 0f) + { + ChangeTime = 1f; + ArrowTarList.Add(ArrowTarList[0]); + ArrowTarList.RemoveAt(0); + } + ArrowHead.transform.position = ToObj.transform.position; + Vector3 position = FromObj.transform.position; + Vector3 position2 = ToObj.transform.position; + Vector3 p = (_isTargettingEnemy ? position : position2) + Vector3.back * Vector3.Distance(position, position2) + Vector3.down * Vector3.Distance(position, position2) * -0.5f; + Vector3[] array = new Vector3[DivideCnt]; + array = MotionUtils.GetBezierQuad(position, p, position2, DivideCnt); + for (int i = 0; i < array.Length; i++) + { + float num = 1f - ChangeTime; + if (ArrowTarList[i] != 0) + { + ArrowEfcList[i].SetActive(value: true); + ArrowEfcList[i].transform.position = (array[ArrowTarList[i]] - array[ArrowTarList[i] - 1]) * num + array[ArrowTarList[i] - 1]; + } + else + { + ArrowEfcList[i].SetActive(value: false); + ArrowEfcList[i].transform.position = array[0]; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/AspectCamera.cs b/SVSim.BattleEngine/Engine/AspectCamera.cs new file mode 100644 index 0000000..f5b99a8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AspectCamera.cs @@ -0,0 +1,76 @@ +using UnityEngine; + +[ExecuteInEditMode] +public class AspectCamera : MonoBehaviour +{ + public Vector2 aspect = new Vector2(4f, 3f); + + public Color32 backgroundColor = Color.black; + + private float aspectRate; + + private Camera _camera; + + private static Camera _backgroundCamera; + + private int sizeVal = 1; + + public const float LOWER_LIMIT_ASPECT_RATIO = 0.5625f; + + public const float UPPER_LIMIT_ASPECT_RATIO = 0.4618f; + + public const float LOWER_LIMIT_ASPECT_RATIO_RECIPROCAL = 1.7777778f; + + private const float SAFE_AREA_RATE = 0.892f; + + private const float SAFE_AREA_NONE_RATE = 1f; + + public static float SafeAreaRate; + + private void Start() + { + aspectRate = aspect.x / aspect.y; + _camera = GetComponent(); + SafeAreaRate = 1f; + float num = (float)Screen.height / (float)Screen.width; + if (num < 0.5625f) + { + num = Mathf.Max(num, 0.4618f); + float t = (0.5625f - num) / 0.10069999f; + SafeAreaRate = Mathf.Lerp(1f, 0.892f, t); + } + } + + private void UpdateScreenRate() + { + float num = aspect.y / aspect.x; + float num2 = (float)Screen.height / (float)Screen.width; + if (num2 < 0.5625f) + { + num2 = 0.5625f; + } + if (num > num2) + { + float num3 = num2 / num; + _camera.rect = new Rect(0f, 0f, 1f, 1f); + _camera.orthographicSize = (float)sizeVal * num3; + } + else + { + float num4 = num / num2; + _camera.rect = new Rect(0f, 0f, 1f, 1f); + _camera.orthographicSize = (float)sizeVal / num4; + } + } + + private bool IsChangeAspect() + { + return _camera.aspect == aspectRate; + } + + private void Update() + { + UpdateScreenRate(); + _camera.ResetAspect(); + } +} diff --git a/SVSim.BattleEngine/Engine/AspectCameraPerspective.cs b/SVSim.BattleEngine/Engine/AspectCameraPerspective.cs new file mode 100644 index 0000000..4fe8b8a --- /dev/null +++ b/SVSim.BattleEngine/Engine/AspectCameraPerspective.cs @@ -0,0 +1,44 @@ +using UnityEngine; + +public class AspectCameraPerspective : MonoBehaviour +{ + private Camera m_camera; + + private bool m_isSetFOV; + + public void UpdateFov() + { + m_isSetFOV = false; + } + + private void Start() + { + m_camera = GetComponent(); + } + + private void Update() + { + if (!m_isSetFOV && GameMgr.GetIns() != null && m_camera != null) + { + float num = 0f; + float num2 = 0f; + if (Screen.width > Screen.height) + { + num = Screen.width; + num2 = Screen.height; + } + else + { + num = Screen.height; + num2 = Screen.width; + } + float num3 = num / num2; + if (num3 > 1.7777778f) + { + num3 = 1.7777778f; + } + m_camera.fieldOfView = Mathf.Atan2(1f, num3) * 57.29578f * 2f; + m_isSetFOV = true; + } + } +} diff --git a/SVSim.BattleEngine/Engine/AssetBundleEditorTag.cs b/SVSim.BattleEngine/Engine/AssetBundleEditorTag.cs new file mode 100644 index 0000000..6789971 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AssetBundleEditorTag.cs @@ -0,0 +1,54 @@ +public class AssetBundleEditorTag +{ + public enum BUNDLE_CATEGORY + { + BG, + CARD, + EFFECT, + MASTER, + STORY, + UI, + UIDOWNLOAD, + TUTORIAL, + PACKBOX, + UILANG, + STORYLANG, + FONT, + SLEEVE, + MAX + } + + public enum CardStatType + { + CARD_STAT_NORMAL, + CARD_STAT_FOIL, + CARD_STAT_PROMOTION + } + + public struct categoryProps + { + public string name; + + public categoryProps(string in_name) + { + name = in_name; + } + } + + public static categoryProps[] categoryNameList = new categoryProps[13] + { + new categoryProps("bg"), + new categoryProps("card"), + new categoryProps("effect"), + new categoryProps("master"), + new categoryProps("story"), + new categoryProps("ui"), + new categoryProps("uidownload"), + new categoryProps("tutorial"), + new categoryProps("packbox"), + new categoryProps("uilang"), + new categoryProps("storylang"), + new categoryProps("font"), + new categoryProps("sleeve") + }; +} diff --git a/SVSim.BattleEngine/Engine/AttachedSkillInformation.cs b/SVSim.BattleEngine/Engine/AttachedSkillInformation.cs new file mode 100644 index 0000000..8e75468 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AttachedSkillInformation.cs @@ -0,0 +1,74 @@ +using System.Collections.Generic; +using Wizard.Battle; + +public class AttachedSkillInformation +{ + public SkillCollectionBase AttachedSkills { get; protected set; } + + public List OwnerCardNameList { get; protected set; } + + public List OwnerCardIdList { get; protected set; } + + public List DuplicateBanNum { get; protected set; } + + public List CreatorSkillList { get; protected set; } + + public List CreatorSkillIndexList { get; protected set; } + + public AttachedSkillInformation(BattleCardBase card) + { + AttachedSkills = new SkillCollectionBase(card); + OwnerCardNameList = new List(); + OwnerCardIdList = new List(); + DuplicateBanNum = new List(); + CreatorSkillList = new List(); + CreatorSkillIndexList = new List(); + } + + public AttachedSkillInformation(BattleCardBase card, SkillCollectionBase skills, List nameList, List idList, List duplicateBanNum, List createrList, List creatorSkillIndexList) + { + AttachedSkills = skills.Clone(card); + OwnerCardNameList = new List(nameList); + OwnerCardIdList = new List(idList); + DuplicateBanNum = new List(duplicateBanNum); + CreatorSkillList = new List(createrList); + CreatorSkillIndexList = new List(creatorSkillIndexList); + } + + public void Add(SkillBase skill, string ownerCardName, int ownerCardID, long duplicateBanNum, SkillBase creatorSkill, int index) + { + AttachedSkills.Add(skill); + OwnerCardNameList.Add(ownerCardName); + OwnerCardIdList.Add(ownerCardID); + DuplicateBanNum.Add(duplicateBanNum); + CreatorSkillList.Add(creatorSkill); + CreatorSkillIndexList.Add(index); + } + + public void Remove(SkillBase skill, BattleCardBase owner, long duplicateBanNum, SkillBase creatorSkill, int index) + { + string name = owner.GetName(); + int cardId = owner.CardId; + Remove(skill, name, cardId, duplicateBanNum, creatorSkill, index); + } + + public void Remove(SkillBase skill, string ownerCardName, int ownerCardID, long duplicateBanNum, SkillBase creatorSkill, int index) + { + AttachedSkills.Remove(skill); + OwnerCardNameList.Remove(ownerCardName); + OwnerCardIdList.Remove(ownerCardID); + DuplicateBanNum.Remove(duplicateBanNum); + CreatorSkillList.Remove(creatorSkill); + CreatorSkillIndexList.Remove(index); + } + + public void Clear() + { + AttachedSkills.Clear(); + OwnerCardNameList.Clear(); + OwnerCardIdList.Clear(); + DuplicateBanNum.Clear(); + CreatorSkillList.Clear(); + CreatorSkillIndexList.Clear(); + } +} diff --git a/SVSim.BattleEngine/Engine/AttachingAbilityInfo.cs b/SVSim.BattleEngine/Engine/AttachingAbilityInfo.cs new file mode 100644 index 0000000..6d9019c --- /dev/null +++ b/SVSim.BattleEngine/Engine/AttachingAbilityInfo.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using Wizard.Battle; + +public class AttachingAbilityInfo +{ + public SkillBase Skill { get; private set; } + + public List TargetCards { get; private set; } + + public AttachingAbilityInfo(SkillBase skill, List targetCards) + { + Skill = skill; + TargetCards = targetCards; + } +} diff --git a/SVSim.BattleEngine/Engine/AttackSelectControl.cs b/SVSim.BattleEngine/Engine/AttackSelectControl.cs new file mode 100644 index 0000000..257cde0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AttackSelectControl.cs @@ -0,0 +1,528 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using Wizard; +using Wizard.Battle.Touch; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class AttackSelectControl +{ + public class AttackPair + { + public class AttackPairCard + { + public IBattleCardView _battleCardView; + + public bool _isReady; + + public bool _hasStartedMoving; + + public AttackPairCard(IBattleCardView battleCardBase) + { + _battleCardView = battleCardBase; + } + + public AttackPairCard(AttackPairCard attackPairCard) + { + _battleCardView = attackPairCard._battleCardView; + _isReady = attackPairCard._isReady; + _hasStartedMoving = attackPairCard._hasStartedMoving; + } + + public void Clear() + { + _battleCardView = null; + _isReady = false; + _hasStartedMoving = false; + } + } + + public AttackPairCard _attackInitiator; + + public AttackPairCard _attackTarget; + + public bool IsAttackPairReady + { + get + { + if (_attackInitiator._isReady) + { + return _attackTarget._isReady; + } + return false; + } + } + + public AttackPair(IBattleCardView attackInitiator, IBattleCardView attackTarget) + { + _attackInitiator = new AttackPairCard(attackInitiator); + _attackTarget = new AttackPairCard(attackTarget); + } + + public AttackPair(AttackPair attackPair) + { + _attackInitiator = new AttackPairCard(attackPair._attackInitiator); + _attackTarget = new AttackPairCard(attackPair._attackTarget); + } + + public bool Compare(IBattleCardView attackInitiatorView, IBattleCardView attackTargetView) + { + if (_attackInitiator._battleCardView == attackInitiatorView) + { + return _attackTarget._battleCardView == attackTargetView; + } + return false; + } + + public void Clear() + { + _attackInitiator.Clear(); + _attackTarget.Clear(); + } + } + + public class WaitUntilAttackPairIsReadyVfx : VfxBase + { + private AttackPair _attackPair; + + public WaitUntilAttackPairIsReadyVfx(AttackPair attackPair) + { + _attackPair = attackPair; + } + + public override void Play() + { + BattleCoroutine.GetInstance().StartCoroutine(Wait()); + } + + private IEnumerator Wait() + { + while (!_attackPair.IsAttackPairReady) + { + yield return null; + } + IsEnd = true; + } + } + + private BattleCardBase currentAttackInitiatorBattleCard; + + private bool areAttackPairsBeingUpdated; + + private readonly AttackPair currentAttackPair = new AttackPair(null, null); + + private readonly List successfulAttackPairs = new List(); + + public const float Z_FLOAT_AMOUNT = -100f; + + private const float EPSILON = 0.1f; + + private const float SMOOTHING_AMOUNT = 0.01f; + + private const float DECAY_MULTIPLIER = 10f; + + private const float IDLING_POSITION = 0.025390625f; + + private IBattleCardView currentAttackInitiator + { + get + { + return currentAttackPair._attackInitiator._battleCardView; + } + set + { + currentAttackPair._attackInitiator._battleCardView = value; + } + } + + private IBattleCardView currentAttackTarget + { + get + { + return currentAttackPair._attackTarget._battleCardView; + } + set + { + currentAttackPair._attackTarget._battleCardView = value; + } + } + + public void Update() + { + float t = MotionUtils.CalculateFrameRateIndependantDampingConstant(0.01f, 10f); + if (currentAttackInitiator != null && !currentAttackInitiator._attackTargetSelectInfo.IsCardInvolvedInAttack) + { + MoveCardUpwards(currentAttackPair._attackInitiator, t); + } + if (currentAttackTarget != null && !currentAttackTarget._attackTargetSelectInfo.IsCardInvolvedInAttack) + { + MoveCardUpwards(currentAttackPair._attackTarget, t); + } + } + + public void RegisterAttackInitiator(BattleCardBase attackInitiatorCard, BattlePlayerBase opponentBattlePlayer) + { + currentAttackInitiatorBattleCard = attackInitiatorCard; + currentAttackInitiator = attackInitiatorCard.BattleCardView; + ToggleAttackableCardFrameEffects(isEnabled: true, opponentBattlePlayer); + attackInitiatorCard.BattleCardView._attackTargetSelectInfo._isBeingSelectedInAttack = true; + if (!attackInitiatorCard.BattleCardView._attackTargetSelectInfo.IsCardInvolvedInAttack) + { + ResetCardOrientationAndStopMovement(attackInitiatorCard.BattleCardView); + } + } + + public void RegisterAttackTarget(IBattleCardView attackTargetCard) + { + if (currentAttackTarget == attackTargetCard) + { + return; + } + if (attackTargetCard != null) + { + attackTargetCard._attackTargetSelectInfo._isBeingSelectedInAttack = true; + if (!attackTargetCard._attackTargetSelectInfo.IsCardInvolvedInAttack) + { + ResetCardOrientationAndStopMovement(attackTargetCard); + } + } + currentAttackPair._attackTarget._isReady = !IsCardTranslatable(attackTargetCard); + currentAttackPair._attackTarget._hasStartedMoving = !IsCardTranslatable(attackTargetCard); + ResetCardPosition(currentAttackTarget); + if (currentAttackTarget != null) + { + currentAttackTarget._attackTargetSelectInfo._isBeingSelectedInAttack = false; + } + currentAttackTarget = attackTargetCard; + } + + public virtual void RegisterAttackPair(AttackPair attackPair) + { + IBattleCardView battleCardView = attackPair._attackInitiator._battleCardView; + IBattleCardView battleCardView2 = attackPair._attackTarget._battleCardView; + if (attackPair == null || battleCardView == null || battleCardView._attackTargetSelectInfo._attackPairsCardIsInvolvedIn == null) + { + ResetCardPosition(currentAttackInitiator); + ResetCardPosition(currentAttackTarget); + return; + } + successfulAttackPairs.Add(attackPair); + battleCardView._attackTargetSelectInfo._attackPairsCardIsInvolvedIn.Enqueue(attackPair); + battleCardView2._attackTargetSelectInfo._attackPairsCardIsInvolvedIn.Enqueue(attackPair); + if (!areAttackPairsBeingUpdated) + { + BattleCoroutine.GetInstance().StartCoroutine(UpdateAttackPairs()); + } + } + + public void CancelAttackSelect(bool wasAttackSuccessful, BattlePlayerBase opponentBattlePlayer) + { + if (wasAttackSuccessful) + { + AttackPair attackPair = new AttackPair(currentAttackPair); + RegisterAttackPair(attackPair); + } + else + { + ResetCardPosition(currentAttackInitiator); + ResetCardPosition(currentAttackTarget); + } + if (currentAttackInitiatorBattleCard != null) + { + ToggleAttackableCardFrameEffects(isEnabled: false, opponentBattlePlayer); + } + if (currentAttackInitiator != null) + { + currentAttackInitiator._attackTargetSelectInfo._isBeingSelectedInAttack = false; + } + if (currentAttackTarget != null) + { + currentAttackTarget._attackTargetSelectInfo._isBeingSelectedInAttack = false; + } + currentAttackInitiatorBattleCard = null; + currentAttackPair.Clear(); + } + + public void ResetCardOrientationAndStopMovement(IBattleCardView targetCard) + { + if (!targetCard._attackTargetSelectInfo.IsUneffectedByAttackTargetting) + { + iTween.Stop(targetCard.CardWrapObject); + targetCard.CardWrapObject.transform.rotation = Quaternion.identity; + } + } + + public virtual VfxBase ResetCardAfterAttackOnReplay() + { + return InstantVfx.Create(delegate + { + for (int i = 0; i < successfulAttackPairs.Count(); i++) + { + IBattleCardView battleCardView = successfulAttackPairs[i]._attackInitiator._battleCardView; + if (battleCardView._attackTargetSelectInfo._attackPairsCardIsInvolvedIn.Count > 0) + { + battleCardView._attackTargetSelectInfo._attackPairsCardIsInvolvedIn.Dequeue(); + } + ResetCardPosition(battleCardView); + IBattleCardView battleCardView2 = successfulAttackPairs[i]._attackTarget._battleCardView; + if (battleCardView2._attackTargetSelectInfo._attackPairsCardIsInvolvedIn.Count > 0) + { + battleCardView2._attackTargetSelectInfo._attackPairsCardIsInvolvedIn.Dequeue(); + } + ResetCardPosition(battleCardView2); + } + }); + } + + public virtual VfxBase ResetCardAfterAttack(IBattleCardView cardToReset) + { + return InstantVfx.Create(delegate + { + if (cardToReset._attackTargetSelectInfo._attackPairsCardIsInvolvedIn.Count > 0) + { + cardToReset._attackTargetSelectInfo._attackPairsCardIsInvolvedIn.Dequeue(); + } + if (cardToReset._attackTargetSelectInfo.IsCardInvolvedInAttack) + { + cardToReset._attackTargetSelectInfo.CurrentAttackPairCardIsInvolvedIn._attackTarget._isReady = true; + } + ResetCardPosition(cardToReset); + }); + } + + private void ResetCardPosition(IBattleCardView targetCard) + { + if (!BattleManagerBase.GetIns().IsRecovery && IsCardTranslatable(targetCard) && !targetCard._attackTargetSelectInfo.IsCardInvolvedInAttack && !targetCard._attackTargetSelectInfo.IsUneffectedByAttackTargetting) + { + ImmediateVfxMgr.GetInstance().Register(SequentialVfxPlayer.Create(InstantVfx.Create(delegate + { + iTween.Stop(targetCard.CardWrapObject); + }), new DelaySetupVfx(() => (targetCard._attackTargetSelectInfo._isBeingSelectedInAttack || targetCard._attackTargetSelectInfo.IsCardInvolvedInAttack) ? ((VfxBase)NullVfx.GetInstance()) : ((VfxBase)new FallToGroundVfx(targetCard.CardWrapObject))))); + } + } + + public virtual void StartCardIdling(IBattleCardView battleCardView) + { + iTween.Stop(battleCardView.CardWrapObject); + iTween.MoveAdd(battleCardView.CardWrapObject, iTween.Hash("z", 0.025390625f, "time", Random.Range(0.5f, 0.6f), "looptype", iTween.LoopType.pingPong, "easetype", iTween.EaseType.easeInOutQuad)); + } + + public virtual VfxBase RemoveAttackPairVfx(IBattleCardView attackInitiator, IBattleCardView attackTarget) + { + AttackPair attackPairToRemove = null; + for (int i = 0; i < successfulAttackPairs.Count; i++) + { + if (successfulAttackPairs[i].Compare(attackInitiator, attackTarget)) + { + attackPairToRemove = successfulAttackPairs[i]; + break; + } + } + if (attackPairToRemove != null) + { + VfxBase vfxBase = CreateWaitUntilAttackPairIsReadyVfx(attackPairToRemove); + VfxBase vfxBase2 = InstantVfx.Create(delegate + { + successfulAttackPairs.Remove(attackPairToRemove); + }); + return SequentialVfxPlayer.Create(vfxBase, vfxBase2); + } + return NullVfx.GetInstance(); + } + + private void ToggleAttackableCardFrameEffects(bool isEnabled, BattlePlayerBase opponentBattlePlayer) + { + List classAndInPlayCardList = opponentBattlePlayer.ClassAndInPlayCardList; + for (int i = 0; i < classAndInPlayCardList.Count; i++) + { + if (CanCardAttackTarget(currentAttackInitiatorBattleCard, classAndInPlayCardList[i], opponentBattlePlayer.InPlayCards) && classAndInPlayCardList[i].AreCanBeAttackedConditionsFulfilled) + { + classAndInPlayCardList[i].BattleCardView._inPlayFrameEffect.ToggleTargetSelectEffect(isEnabled); + } + } + currentAttackInitiator._inPlayFrameEffect.ToggleTargetSelectEffect(isEnabled, isAttackTargetSelectInitiator: true); + } + + private VfxBase CreateWaitUntilAttackPairIsReadyVfx(AttackPair attackPair) + { + return new WaitUntilAttackPairIsReadyVfx(attackPair); + } + + private IEnumerator UpdateAttackPairs() + { + areAttackPairsBeingUpdated = true; + while (successfulAttackPairs.Count > 0) + { + float t = MotionUtils.CalculateFrameRateIndependantDampingConstant(0.01f, 10f); + for (int i = 0; i < successfulAttackPairs.Count; i++) + { + AttackPair attackPair = successfulAttackPairs[i]; + if (!attackPair.IsAttackPairReady) + { + AttackPair.AttackPairCard attackInitiator = attackPair._attackInitiator; + AttackPair.AttackPairCard attackTarget = attackPair._attackTarget; + if (attackInitiator._battleCardView._attackTargetSelectInfo.CurrentAttackPairCardIsInvolvedIn == attackPair) + { + MoveCardUpwards(attackInitiator, t); + } + if (attackTarget._battleCardView._attackTargetSelectInfo.CurrentAttackPairCardIsInvolvedIn == attackPair) + { + MoveCardUpwards(attackTarget, t); + } + } + } + yield return null; + } + areAttackPairsBeingUpdated = false; + } + + private void MoveCardUpwards(AttackPair.AttackPairCard attackPairCard, float t) + { + if (BattleManagerBase.GetIns().IsRecovery) + { + attackPairCard._isReady = true; + } + else + { + if (attackPairCard == null || attackPairCard._battleCardView == null) + { + return; + } + IBattleCardView battleCardView = attackPairCard._battleCardView; + if (IsCardTranslatable(battleCardView) && !battleCardView._attackTargetSelectInfo.IsUneffectedByAttackTargetting && !attackPairCard._isReady) + { + if (!attackPairCard._hasStartedMoving) + { + attackPairCard._hasStartedMoving = true; + ResetCardOrientationAndStopMovement(battleCardView); + } + Transform transform = battleCardView.CardWrapObject.transform; + if (!IsCardFullyTranslated(battleCardView)) + { + Vector3 b = CalculateFinalFloatingPosition(battleCardView); + transform.localPosition = Vector3.Lerp(transform.transform.localPosition, b, t); + } + else + { + transform.localPosition = CalculateFinalFloatingPosition(battleCardView); + attackPairCard._isReady = true; + StartCardIdling(battleCardView); + } + } + } + } + + private Vector3 CalculateFinalFloatingPosition(IBattleCardView battleCardView) + { + Vector3 localPosition = battleCardView.CardWrapObject.transform.transform.localPosition; + localPosition.z = -100f; + return localPosition; + } + + public bool IsCardTranslatable(IBattleCardView cardToTranslate) + { + if (cardToTranslate != null) + { + return !cardToTranslate.CardInfo.IsClass; + } + return false; + } + + private bool IsCardFullyTranslated(IBattleCardView cardBeingTranslated) + { + return Mathf.Abs(cardBeingTranslated.CardWrapObject.transform.localPosition.z - -100f) < 0.1f; + } + + public static bool CanCardAttackTarget(BattleCardBase Attacker, BattleCardBase Target, IEnumerable TargetInPlayCards) + { + bool flag = false; + bool isClass = Target.IsClass; + if (TargetInPlayCards.Any((BattleCardBase c) => c.SkillApplyInformation.IsGuard && !c.CantBeFocusedAttack(Attacker))) + { + flag = true; + } + if (Attacker.SkillApplyInformation.IsIgnoreGuard) + { + flag = false; + } + if (Attacker.AttackableCount <= 0) + { + return false; + } + if ((!Attacker.SkillApplyInformation.IsQuick || !Attacker.SkillApplyInformation.IsRush) && !Attacker.Attackable) + { + return false; + } + if (isClass) + { + if (!Attacker.SkillApplyInformation.IsQuick) + { + if (Attacker.IsFirstTurn) + { + return false; + } + if (!Attacker.Attackable) + { + return false; + } + } + if (Attacker.IsCantAttackClass) + { + return false; + } + if (Attacker.SkillApplyInformation.IsForceAttackUnit && Attacker.OpponentBattlePlayer.InPlayCards.Any((BattleCardBase c) => !c.CantBeFocusedAttack(Attacker) && c.IsUnit && !AttackTargetSelectTouchProcessor.CheckAttackToUnitNotHasGuardError(Attacker, c))) + { + return false; + } + } + if (!Target.IsInplay) + { + return false; + } + if (Target.IsField || Target.CantBeFocusedAttack(Attacker)) + { + return false; + } + if (flag && (isClass || !Target.SkillApplyInformation.IsGuard)) + { + return false; + } + if (isClass && Attacker.IsCantAttackClass) + { + return false; + } + if (Target.IsUnit && Attacker.SkillApplyInformation.IsSkillCantAtkUnit) + { + return false; + } + if (Target.IsUnit && Attacker.SkillApplyInformation.IsSkillCantAtkUnitBaseCardId && Attacker.SkillApplyInformation.CantAtkUnitBaseCardIdList.Contains(Target.BaseParameter.BaseCardId)) + { + return false; + } + if (!isClass && Attacker.SkillApplyInformation.IsSkillCantAtkUnitNotHasGuard && !Target.SkillApplyInformation.IsGuard) + { + return false; + } + return true; + } + + public static bool IsAttackPossible(BattleCardBase attacker, BattleCardBase target, IEnumerable opponentInPlayCards) + { + if (attacker.Attackable) + { + return CanCardAttackTarget(attacker, target, opponentInPlayCards); + } + return false; + } + + public static bool IsAttackPossible(AIVirtualCard attacker, AIVirtualCard target, BattlePlayerBase opponent) + { + if (attacker.BaseCard.Attackable) + { + return CanCardAttackTarget(attacker.BaseCard, target.BaseCard, opponent.InPlayCards); + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/AudioList.cs b/SVSim.BattleEngine/Engine/AudioList.cs new file mode 100644 index 0000000..924ca3d --- /dev/null +++ b/SVSim.BattleEngine/Engine/AudioList.cs @@ -0,0 +1,7 @@ +using UnityEngine; + +public class AudioList : MonoBehaviour +{ + [SerializeField] + public string[] GimicAudioList; +} diff --git a/SVSim.BattleEngine/Engine/BMFont.cs b/SVSim.BattleEngine/Engine/BMFont.cs new file mode 100644 index 0000000..3e20ab7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BMFont.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class BMFont +{ + [HideInInspector] + [SerializeField] + private int mSize = 16; + + [HideInInspector] + [SerializeField] + private int mBase; + + [HideInInspector] + [SerializeField] + private int mWidth; + + [HideInInspector] + [SerializeField] + private int mHeight; + + [HideInInspector] + [SerializeField] + private string mSpriteName; + + [HideInInspector] + [SerializeField] + private List mSaved = new List(); + + private Dictionary mDict = new Dictionary(); + + public bool isValid => mSaved.Count > 0; + + public int charSize + { + get + { + return mSize; + } + set + { + mSize = value; + } + } + + public int baseOffset + { + get + { + return mBase; + } + set + { + mBase = value; + } + } + + public int texWidth + { + get + { + return mWidth; + } + set + { + mWidth = value; + } + } + + public int texHeight + { + get + { + return mHeight; + } + set + { + mHeight = value; + } + } + + public int glyphCount + { + get + { + if (!isValid) + { + return 0; + } + return mSaved.Count; + } + } + + public string spriteName + { + get + { + return mSpriteName; + } + set + { + mSpriteName = value; + } + } + + public List glyphs => mSaved; + + public BMGlyph GetGlyph(int index, bool createIfMissing) + { + BMGlyph value = null; + if (mDict.Count == 0) + { + int i = 0; + for (int count = mSaved.Count; i < count; i++) + { + BMGlyph bMGlyph = mSaved[i]; + mDict.Add(bMGlyph.index, bMGlyph); + } + } + if (!mDict.TryGetValue(index, out value) && createIfMissing) + { + value = new BMGlyph(); + value.index = index; + mSaved.Add(value); + mDict.Add(index, value); + } + return value; + } + + public BMGlyph GetGlyph(int index) + { + return GetGlyph(index, createIfMissing: false); + } + + public void Clear() + { + mDict.Clear(); + mSaved.Clear(); + } + + public void Trim(int xMin, int yMin, int xMax, int yMax) + { + if (isValid) + { + int i = 0; + for (int count = mSaved.Count; i < count; i++) + { + mSaved[i]?.Trim(xMin, yMin, xMax, yMax); + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/BMGlyph.cs b/SVSim.BattleEngine/Engine/BMGlyph.cs new file mode 100644 index 0000000..dcd9b70 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BMGlyph.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; + +[Serializable] +public class BMGlyph +{ + public int index; + + public int x; + + public int y; + + public int width; + + public int height; + + public int offsetX; + + public int offsetY; + + public int advance; + + public int channel; + + public List kerning; + + public int GetKerning(int previousChar) + { + if (kerning != null && previousChar != 0) + { + int i = 0; + for (int count = kerning.Count; i < count; i += 2) + { + if (kerning[i] == previousChar) + { + return kerning[i + 1]; + } + } + } + return 0; + } + + public void SetKerning(int previousChar, int amount) + { + if (kerning == null) + { + kerning = new List(); + } + for (int i = 0; i < kerning.Count; i += 2) + { + if (kerning[i] == previousChar) + { + kerning[i + 1] = amount; + return; + } + } + kerning.Add(previousChar); + kerning.Add(amount); + } + + public void Trim(int xMin, int yMin, int xMax, int yMax) + { + int num = x + width; + int num2 = y + height; + if (x < xMin) + { + int num3 = xMin - x; + x += num3; + width -= num3; + offsetX += num3; + } + if (y < yMin) + { + int num4 = yMin - y; + y += num4; + height -= num4; + offsetY += num4; + } + if (num > xMax) + { + width -= num - xMax; + } + if (num2 > yMax) + { + height -= num2 - yMax; + } + } +} diff --git a/SVSim.BattleEngine/Engine/BMSymbol.cs b/SVSim.BattleEngine/Engine/BMSymbol.cs new file mode 100644 index 0000000..585c738 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BMSymbol.cs @@ -0,0 +1,93 @@ +using System; +using UnityEngine; + +[Serializable] +public class BMSymbol +{ + public string sequence; + + public string spriteName; + + private UISpriteData mSprite; + + private bool mIsValid; + + private int mLength; + + private int mOffsetX; + + private int mOffsetY; + + private int mWidth; + + private int mHeight; + + private int mAdvance; + + private Rect mUV; + + public int length + { + get + { + if (mLength == 0) + { + mLength = sequence.Length; + } + return mLength; + } + } + + public int offsetX => mOffsetX; + + public int offsetY => mOffsetY; + + public int width => mWidth; + + public int height => mHeight; + + public int advance => mAdvance; + + public Rect uvRect => mUV; + + public void MarkAsChanged() + { + mIsValid = false; + } + + public bool Validate(UIAtlas atlas) + { + if (atlas == null) + { + return false; + } + if (!mIsValid) + { + if (string.IsNullOrEmpty(spriteName)) + { + return false; + } + mSprite = ((atlas != null) ? atlas.GetSprite(spriteName) : null); + if (mSprite != null) + { + Texture texture = atlas.texture; + if (texture == null) + { + mSprite = null; + } + else + { + mUV = new Rect(mSprite.x, mSprite.y, mSprite.width, mSprite.height); + mUV = NGUIMath.ConvertToTexCoords(mUV, texture.width, texture.height); + mOffsetX = mSprite.paddingLeft; + mOffsetY = mSprite.paddingTop; + mWidth = mSprite.width; + mHeight = mSprite.height; + mAdvance = mSprite.width + (mSprite.paddingLeft + mSprite.paddingRight); + mIsValid = true; + } + } + } + return mSprite != null; + } +} diff --git a/SVSim.BattleEngine/Engine/BackGroundBase.cs b/SVSim.BattleEngine/Engine/BackGroundBase.cs new file mode 100644 index 0000000..eaef9db --- /dev/null +++ b/SVSim.BattleEngine/Engine/BackGroundBase.cs @@ -0,0 +1,272 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard.Battle.View.Vfx; + +public class BackGroundBase +{ + protected string _bgmId; + + protected BattleCamera _battleCamera; + + protected GameObject _fieldModel; + + protected GameObject _fieldParticles; + + protected IDictionary m_FieldAnimationDictionary; + + protected IDictionary _fieldObjDictionary; + + protected IDictionary m_FieldAnimatorDictionary; + + protected IDictionary _fieldParticleSystemDictionary; + + protected IDictionary _gimicCntDictionary; + + public string[] GimicAudioList; + + protected string _str3DFieldNo; + + protected string _str3DFieldPath; + + protected BattleManagerBase m_BtlMgrIns; + + protected string m_FieldAssetPath; + + protected List m_SoundAssetPathList; + + protected float m_RandomActionTime; + + protected bool IsFieldRandom; + + private Coroutine battleLoadCoroutine; + + public virtual int FieldId => 1; + + public virtual int FieldEffectId => FieldId; + + public GameObject Field { get; protected set; } + + public GameObject m_Battle3DContainer { get; protected set; } + + public GameObject m_BattleCutInContainer { get; protected set; } + + public SetShaderGlobalColorBG SetShaderGlobalColorBG { get; protected set; } + + public bool IsLoadDone { get; protected set; } + + public BackGroundBase(string bgmId = "NONE") + { + _battleCamera = null; + m_Battle3DContainer = null; + m_BattleCutInContainer = null; + m_BtlMgrIns = BattleManagerBase.GetIns(); + IsLoadDone = false; + _str3DFieldNo = ""; + _str3DFieldPath = ""; + m_FieldAssetPath = ""; + Field = null; + _fieldModel = null; + _fieldParticles = null; + _bgmId = bgmId; + m_RandomActionTime = 0f; + IsFieldRandom = false; + m_SoundAssetPathList = new List(); + _fieldObjDictionary = new Dictionary(); + m_FieldAnimationDictionary = new Dictionary(); + m_FieldAnimatorDictionary = new Dictionary(); + _fieldParticleSystemDictionary = new Dictionary(); + _gimicCntDictionary = new Dictionary(); + SetShaderGlobalColorBG = null; + Physics.gravity = new Vector3(0f, 0f, 9.8f); + _str3DFieldNo = GetFieldIdString(FieldId); + _gimicCntDictionary.Add("FieldGimic1", 0); + _gimicCntDictionary.Add("FieldGimic2", 0); + _gimicCntDictionary.Add("FieldGimic3", 0); + } + + public void Dispose() + { + UnityEngine.Object.DestroyImmediate(Field); + Field = null; + _fieldModel = null; + _fieldParticles = null; + _fieldObjDictionary.Clear(); + m_FieldAnimationDictionary.Clear(); + m_FieldAnimatorDictionary.Clear(); + _fieldParticleSystemDictionary.Clear(); + m_SoundAssetPathList.Clear(); + _gimicCntDictionary.Clear(); + SetShaderGlobalColorBG = null; + BattleCoroutine.GetInstance().StopCoroutine(battleLoadCoroutine); + } + + public void CreateField(BattleCamera battleCamera, GameObject battle3DContainer, GameObject cutInContainer) + { + _battleCamera = battleCamera; + m_Battle3DContainer = battle3DContainer; + m_BattleCutInContainer = cutInContainer; + Camera componentInChildren = m_Battle3DContainer.GetComponentInChildren(); + Camera component = componentInChildren.transform.Find("Camera 3DGround").GetComponent(); + _battleCamera.SetUp(componentInChildren, m_BattleCutInContainer.transform.Find("Camera").GetComponent(), component); + LoadField(); + } + + protected void LoadField() + { + IsLoadDone = false; + m_BtlMgrIns = BattleManagerBase.GetIns(); + _str3DFieldNo = GetFieldIdString(FieldEffectId); + _str3DFieldPath = "3DField" + GetFieldIdString(FieldId); + m_SoundAssetPathList.Add($"s/se_field_{_str3DFieldNo}.acb"); + m_SoundAssetPathList.Add(string.Format("b/bgm_field_{0}.acb", (_bgmId != "NONE") ? GetFieldIdString(_bgmId) : _str3DFieldNo)); + m_SoundAssetPathList.Add(string.Format("b/bgm_field_{0}.awb", (_bgmId != "NONE") ? GetFieldIdString(_bgmId) : _str3DFieldNo)); + m_FieldAssetPath = Toolbox.ResourcesManager.GetAssetTypePath(_str3DFieldPath, ResourcesManager.AssetLoadPathType.Field3D); + List additionalAssetList = CollectAdditionalAssets(); + GameMgr.GetIns().GetEffectMgr().InitCommonEffect(string.Format("Json/FIeld" + _str3DFieldNo + "EffectData", _str3DFieldNo), isBattle: true); + battleLoadCoroutine = BattleCoroutine.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(m_SoundAssetPathList, delegate + { + BattleCoroutine.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(m_FieldAssetPath, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.AddRange(m_SoundAssetPathList); + Toolbox.ResourcesManager.BattleListAssetPathList.Add(m_FieldAssetPath); + (UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(_str3DFieldPath, ResourcesManager.AssetLoadPathType.Field3D, isfetch: true))) as GameObject).name = _str3DFieldPath; + if (additionalAssetList.IsNotNullOrEmpty()) + { + BattleCoroutine.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(additionalAssetList, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.AddRange(additionalAssetList); + BattleFieldBuild(); + })); + } + else + { + BattleFieldBuild(); + } + })); + })); + } + + private string GetFieldIdString(int fieldId) + { + return fieldId.ToString((fieldId < 100) ? "00" : "0000"); + } + + private string GetFieldIdString(string fileldId) + { + if (int.TryParse(fileldId, out var result)) + { + return result.ToString((result < 100) ? "00" : "0000"); + } + return fileldId; + } + + protected virtual void BattleFieldBuild() + { + } + + protected virtual List CollectAdditionalAssets() + { + return null; + } + + public virtual void StartFieldSetEffect(Vector3 pos) + { + } + + public virtual void StartFieldTapEffect(int areaId, Vector3 pos) + { + BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.IsTouchable(); + } + + public void StartFieldOpening() + { + PlayBgm(); + OpeningVfx.OpenningLogStep = "StartFieldOpening"; + IsFieldRandom = true; + BattleCoroutine.GetInstance().StartCoroutine(RunFieldOpening()); + } + + public void PlayBgm() + { + GameMgr.GetIns().GetSoundMgr().PlayBGM(string.Format("bgm_field_{0}", (_bgmId != "NONE") ? GetFieldIdString(_bgmId) : _str3DFieldNo), 0f, 0L); + } + + protected virtual IEnumerator RunFieldOpening() + { + yield return new WaitForSeconds(0f); + } + + public static IEnumerator ObjectChecker(float fWaitSecs, string strObjectFind, Action callback) + { + while (GameObject.Find(strObjectFind) == null || !GameMgr.GetIns().GetEffectMgr().IsFieldEffectReady || !GameMgr.GetIns().GetEffectMgr().IsBattleUIEffectReady) + { + yield return null; + } + callback(); + } + + public void StartFieldGimic(GameObject obj) + { + if (!GameMgr.GetIns().IsReplayBattle && BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.IsTouchable()) + { + BattleCoroutine.GetInstance().StartCoroutine(RunFieldGimic(obj)); + } + } + + protected virtual IEnumerator RunFieldGimic(GameObject obj) + { + yield return new WaitForSeconds(0f); + } + + public void StartFieldShake() + { + BattleCoroutine.GetInstance().StartCoroutine(RunFieldShake()); + } + + protected virtual IEnumerator RunFieldShake() + { + yield return new WaitForSeconds(0f); + } + + public virtual void UpdateFieldRandom() + { + } + + public void AddParticleToFieldObjDictionary(string targetPath) + { + string[] array = targetPath.Split('/'); + List list = new List(); + list.Add(_fieldParticles.transform); + List list2 = new List(); + for (int i = 0; i < array.Length; i++) + { + list2 = new List(); + for (int j = 0; j < list.Count; j++) + { + list2.AddRange(FindAllChildByName(list[j], array[i])); + } + list = new List(list2); + } + for (int k = 0; k < list2.Count; k++) + { + _fieldObjDictionary.Add(targetPath + "_" + k, list2[k].gameObject); + } + } + + public List FindAllChildByName(Transform parent, string name) + { + List list = new List(); + for (int i = 0; i < parent.childCount; i++) + { + Transform child = parent.GetChild(i); + if (child.name == name) + { + list.Add(child); + } + } + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/BaseCardIDComp.cs b/SVSim.BattleEngine/Engine/BaseCardIDComp.cs new file mode 100644 index 0000000..4d3cd4a --- /dev/null +++ b/SVSim.BattleEngine/Engine/BaseCardIDComp.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using Wizard.Battle; + +internal class BaseCardIDComp : EqualityComparer +{ + public override bool Equals(IReadOnlyBattleCardInfo x, IReadOnlyBattleCardInfo y) + { + if (x == y) + { + return true; + } + if (x.BaseParameter.BaseCardId == y.BaseParameter.BaseCardId) + { + return true; + } + return false; + } + + public override int GetHashCode(IReadOnlyBattleCardInfo obj) + { + return obj.BaseParameter.BaseCardId; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleCamera.cs b/SVSim.BattleEngine/Engine/BattleCamera.cs new file mode 100644 index 0000000..b422d83 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleCamera.cs @@ -0,0 +1,79 @@ +using UnityEngine; +using Wizard.Battle.View.Vfx; + +public class BattleCamera +{ + public UICamera m_CutInCamera; + + public Camera Camera; + + public Camera _backgroundCamera; + + public Vector3 BattleCameraPos { get; private set; } + + public Vector3 BattleCameraRot { get; private set; } + + public BattleCamera() + { + Camera = null; + } + + public void SetUp(Camera camera, UICamera cutInCamera, Camera backgroundCamera) + { + Camera = camera; + m_CutInCamera = cutInCamera; + _backgroundCamera = backgroundCamera; + BattleCameraPos = Camera.transform.localPosition; + BattleCameraRot = Camera.transform.eulerAngles; + } + + public VfxBase ShakeCamera(Vector3 amount, float time, float delay) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + iTween.ShakePosition(Camera.gameObject, iTween.Hash("amount", amount, "time", time, "delay", delay)); + })); + return parallelVfxPlayer; + } + + public static VfxBase ShakeCameraGameObject(GameObject obj, Vector3 amount, float time, float delay) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + iTween.ShakePosition(obj, iTween.Hash("amount", amount, "time", time, "delay", delay)); + })); + return parallelVfxPlayer; + } + + public VfxBase ShakeComplete() + { + return InstantVfx.Create(delegate + { + Camera.transform.localPosition = BattleCameraPos; + Camera.transform.eulerAngles = BattleCameraRot; + iTween.Stop(Camera.gameObject); + }); + } + + public static VfxBase ShakeCompleteGameObject(GameObject obj, Vector3 position, Vector3 euler) + { + return InstantVfx.Create(delegate + { + obj.transform.localPosition = position; + obj.transform.eulerAngles = euler; + iTween.Stop(obj); + }); + } + + public Camera Get3DCamera() + { + return Camera; + } + + public void Dispose() + { + Camera = null; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleCardBase.cs b/SVSim.BattleEngine/Engine/BattleCardBase.cs new file mode 100644 index 0000000..0d24e10 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleCardBase.cs @@ -0,0 +1,3876 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Card.InnerOptions; +using Wizard.Battle.Resource; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqueID +{ + public class BuildInfo + { + public GameObject GameObject; + + public int CardId; + + public BattlePlayerBase SelfBattlePlayer; + + public BattlePlayerBase OpponentBattlePlayer; + + public IBattlePlayerReadOnlyInfo SelfBattlePlayerReadOnlyInfo; + + public List NormalSkillBuildInfos; + + public List EvolveSkillBuildInfos; + + public bool IsPlayer; + + public int BattleCardIndex; + + public CardInnerOptionsBase InnerOptions; + + public BattleManagerBase BattleMgr; + + public IBattleResourceMgr ResourceMgr; + + public BuildInfo(GameObject _gameObject, int _cardId, BattlePlayerBase _selfBattlePlayer, BattlePlayerBase _opponentBattlePlayer, IBattlePlayerReadOnlyInfo _selfBattlePlayerReadOnlyInfo, List _normalSkillBuildInfos, List _evolveSkillBuildInfos, bool _isPlayer, int _battleCardIndex, CardInnerOptionsBase _innerOptions, BattleManagerBase _battleMgr, IBattleResourceMgr _resourceMgr) + { + GameObject = _gameObject; + CardId = _cardId; + SelfBattlePlayer = _selfBattlePlayer; + OpponentBattlePlayer = _opponentBattlePlayer; + SelfBattlePlayerReadOnlyInfo = _selfBattlePlayerReadOnlyInfo; + NormalSkillBuildInfos = _normalSkillBuildInfos; + EvolveSkillBuildInfos = _evolveSkillBuildInfos; + IsPlayer = _isPlayer; + BattleCardIndex = _battleCardIndex; + InnerOptions = _innerOptions; + BattleMgr = _battleMgr; + ResourceMgr = _resourceMgr; + } + + public BuildInfo VirtualClone(BattlePlayerBase virtualSelfBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer) + { + return new BuildInfo(null, CardId, virtualSelfBattlePlayer, virtualOpponentBattlePlayer, virtualSelfBattlePlayer, new List(NormalSkillBuildInfos), new List(EvolveSkillBuildInfos), IsPlayer, BattleCardIndex, InnerOptions.VirtualClone(), BattleMgr, ResourceMgr); + } + } + + public class DeathTypeInformation + { + public bool WhenDestroy; + + public bool DestroyedByKiller; + + public bool ChantDestroy; + + public bool MysteriesDestroy; + + public bool BanishDestroy; + + public bool BurialRite; + + public bool UseFusionIngredient; + + public bool UseFusionMetamorphoseIngredient; + + public bool LeaveByGetOn; + + public DeathTypeInformation() + { + WhenDestroy = false; + DestroyedByKiller = false; + ChantDestroy = false; + MysteriesDestroy = false; + BanishDestroy = false; + BurialRite = false; + UseFusionIngredient = false; + UseFusionMetamorphoseIngredient = false; + LeaveByGetOn = false; + } + + public DeathTypeInformation Clone() + { + return (DeathTypeInformation)MemberwiseClone(); + } + + public void Reset() + { + WhenDestroy = false; + DestroyedByKiller = false; + ChantDestroy = false; + MysteriesDestroy = false; + BanishDestroy = false; + BurialRite = false; + UseFusionIngredient = false; + UseFusionMetamorphoseIngredient = false; + LeaveByGetOn = false; + } + } + + public class ParameterChangeInformation + { + public int CurrentAtk; + + public int BaseAtk; + + public int CurrentHealth; + + public int MaxHealth; + + public int BaseHealth; + + public ParameterChangeInformation(int currentAtk, int baseAtk, int currentHealth, int maxHealth, int baseHealth) + { + CurrentAtk = currentAtk; + BaseAtk = baseAtk; + CurrentHealth = currentHealth; + MaxHealth = maxHealth; + BaseHealth = baseHealth; + } + } + + public class ItWasDamagedCounter + { + public int SelfTurnDamage { get; private set; } + + public int OpponentTurnDamage { get; private set; } + + public ItWasDamagedCounter() + { + Clear(); + } + + public ItWasDamagedCounter(int selfTurnDamage, int opponentTurnDamage) + { + SelfTurnDamage = selfTurnDamage; + OpponentTurnDamage = opponentTurnDamage; + } + + public void Clear() + { + SelfTurnDamage = 0; + OpponentTurnDamage = 0; + } + + public void AddDamageCount(bool selfTurn) + { + if (selfTurn) + { + SelfTurnDamage++; + } + else + { + OpponentTurnDamage++; + } + } + + public int GetDamageCount(bool selfTurn) + { + if (selfTurn) + { + return SelfTurnDamage; + } + return OpponentTurnDamage; + } + } + + private struct DamageClipping + { + public int ClippingMax; + + public int GiveCount; + + public DamageClipping(int clippingMax, int count) + { + ClippingMax = clippingMax; + GiveCount = count; + } + } + + public struct TransformInformation + { + public BattleCardBase OriginalCard { get; private set; } + + public TransformType Type { get; private set; } + + public TransformInformation(TransformType type, BattleCardBase card) + { + Type = type; + OriginalCard = card; + } + } + + public struct SkillActivationInfo + { + public long SkillId { get; private set; } + + public SkillBase Skill { get; private set; } + + public SkillActivationInfo(long skillId, SkillBase skill) + { + SkillId = skillId; + Skill = skill; + } + } + + public enum CHECK_CONDITION_MUTATIONSKILL_TYPE + { + NONE, + NOT_HAVE_MUTATION_SKILL, + SELECT_ACCELERATE_SKILL_NOT_ACTIVE, + CRYSTALLIZE_SKILL_ACTIVE, + SELECT_CRYSTALLIZE_SKILL_NOT_ACTIVE, + NOT_PLAY, + PLAY + } + + public enum TransformType + { + None, + Accelerate, + Crystallize, + Choice, + Metamorphose + } + + public class DestroyedBySkillInfo + { + public enum DestroyedBySkillAbility + { + None, + WhenPlay, + Accelerate, + Crystallize, + WhenDestroy + } + + public DestroyedBySkillAbility Ability { get; private set; } + + public int BaseCardId { get; private set; } + + public string Player { get; private set; } + + public DestroyedBySkillInfo(DestroyedBySkillAbility ability, int baseCardId, bool isDestroyedBySelf) + { + Ability = ability; + BaseCardId = baseCardId; + Player = (isDestroyedBySelf ? "me" : "op"); + } + } + + public class BanishInfo + { + public enum BanishPlace + { + None, + Hand, + Field, + Deck + } + + public int Turn { get; private set; } + + public bool IsSelfTurn { get; private set; } + + public BanishPlace Place { get; private set; } + + public BanishInfo(int turn, bool isSelfTurn, BanishPlace place) + { + Turn = turn; + IsSelfTurn = isSelfTurn; + Place = place; + } + } + + public class AttackCountInfo + { + public Skill_attack_count Skill { get; private set; } + + public int Count { get; private set; } + + public AttackCountInfo(Skill_attack_count skill, int count) + { + Skill = skill; + Count = count; + } + + public virtual int CalcAttackCount(int baseAttackCount) + { + return baseAttackCount; + } + } + + public class SetAttackCountInfo : AttackCountInfo + { + public SetAttackCountInfo(Skill_attack_count skill, int count) + : base(skill, count) + { + } + + public override int CalcAttackCount(int baseAttackCount) + { + return base.Count; + } + } + + public class AddAttackCountInfo : AttackCountInfo + { + public AddAttackCountInfo(Skill_attack_count skill, int count) + : base(skill, count) + { + } + + public override int CalcAttackCount(int baseAttackCount) + { + return baseAttackCount + base.Count; + } + } + + public class AttackOpponentResult + { + public VfxBase attackVfx { get; private set; } + + public VfxBase damageVfx { get; private set; } + + public DamageResult damageResult { get; private set; } + + public AttackOpponentResult(VfxBase _attackVfx, VfxBase _damageVfx, DamageResult _damageResult) + { + attackVfx = _attackVfx; + damageVfx = _damageVfx; + damageResult = _damageResult; + } + } + + public struct DamageParam + { + public int Damage; + + public BattleCardBase OwnerCard { get; private set; } + + public DamageParam(int damage, BattleCardBase card, string damageType = "_OPT_NULL_", CardBasePrm.ClanType damageClan = CardBasePrm.ClanType.NONE) + { + List list = card.SkillApplyInformation.AddDamageList.Where((DamageModifier m) => m.IsEffective(damageType, damageClan, isUseClass: false)).ToList(); + list.AddRange(card.SelfBattlePlayer.Class.SkillApplyInformation.AddDamageList.Where((DamageModifier m) => m.IsEffective(damageType, damageClan, isUseClass: true))); + list.Sort((DamageModifier a, DamageModifier b) => a.OrderCount - b.OrderCount); + for (int num = 0; num < list.Count; num++) + { + damage = list[num].Calc(damage); + } + Damage = damage; + OwnerCard = card; + } + } + + public class DamageResult + { + public VfxBase Vfx { get; private set; } + + public VfxBase PreDamageVfx { get; private set; } + + public VfxBase PostDamageVfx { get; private set; } + + public int DamageApplied { get; private set; } + + public int GainLife { get; private set; } + + public bool IsReflectedDamage { get; private set; } + + public DamageResult(VfxBase _vfx, int _damageApplied, int _gainLife, VfxBase _preDamageVfx = null, VfxBase _postDamageVfx = null, bool isReflectedDamage = false) + { + Vfx = _vfx; + DamageApplied = _damageApplied; + GainLife = _gainLife; + IsReflectedDamage = isReflectedDamage; + PreDamageVfx = ((_preDamageVfx == null) ? NullVfx.GetInstance() : _preDamageVfx); + PostDamageVfx = ((_postDamageVfx == null) ? NullVfx.GetInstance() : _postDamageVfx); + } + } + + public struct HealParam + { + public int HealAmount; + + public HealParam(int healAmount, BattleCardBase owner, BattleCardBase target, bool applyModifier = true) + { + if (applyModifier) + { + List list = owner.SelfBattlePlayer.Class.SkillApplyInformation.HealModifierList.ToList(); + list.AddRange(owner.OpponentBattlePlayer.Class.SkillApplyInformation.HealModifierList); + list.Sort((HealModifier a, HealModifier b) => a.OrderCount - b.OrderCount); + for (int num = 0; num < list.Count; num++) + { + healAmount = list[num].Calc(healAmount, owner, target); + } + } + HealAmount = healAmount; + } + } + + public class HealResult + { + public int HealAmount { get; private set; } + + public VfxBase HealVfx { get; private set; } + + public VfxBase PrehealVfxVfx { get; private set; } + + public VfxBase PosthealVfxVfx { get; private set; } + + public HealResult(int healAmount, VfxBase _healVfx, VfxBase _prehealVfxVfx = null, VfxBase _posthealVfxVfx = null) + { + HealAmount = healAmount; + HealVfx = _healVfx; + PrehealVfxVfx = ((_prehealVfxVfx == null) ? NullVfx.GetInstance() : _prehealVfxVfx); + PosthealVfxVfx = ((_posthealVfxVfx == null) ? NullVfx.GetInstance() : _posthealVfxVfx); + } + } + + public class CopySkillInfo + { + public VfxBase Vfx { get; private set; } + + public bool IsEvolutionSkill { get; private set; } + + public SkillBaseCopy NewCopySkill { get; private set; } + + public List CopiedSkillList { get; private set; } + + public List AttachBuffs { get; private set; } + + public CopySkillInfo(VfxBase vfx, bool isEvolutionSkill, SkillBaseCopy copySkill, List copiedSkillList, List buffs) + { + Vfx = vfx; + IsEvolutionSkill = isEvolutionSkill; + NewCopySkill = copySkill; + CopiedSkillList = copiedSkillList; + AttachBuffs = buffs; + } + } + + private const string CONDITION_CHARGE_COUNT = "charge_count"; + + private const string TARGET_CONDITION_CHARGE_COUNT = "self.charge_count"; + + private const string ME_INPLAY_CLASS_COUNT = "{me.inplay.class.count}"; + + private BattleCardBase _finalMetamorphoseCard; + + protected BuildInfo _buildInfo; + + public List ReplayNoConsumeEpBuffInfoNameList = new List(); + + protected SkillCollectionBase _normalSkillCollection; + + protected SkillCollectionBase _evolveSkillCollection; + + private CardParameter _baseParameter; + + private CardParameter _evolveToOtherCardBaseParameter; + + public readonly IBattlePlayerReadOnlyInfo SelfBattlePlayerReadOnlyInfo; + + private bool _isOndraw; + + public const int NONE_COST = -1; + + public const int DEFAULT_SKILL_ACTIVATED_COUNT = 1; + + public const int DEFAULT_THIS_TURN_SKILL_ACTIVATED_COUNT = 0; + + private int _skillActivatedCountWrapValue = -1; + + private int _skillActivatedCount; + + private int _normalIndividualId = -1; + + private int _evolutionIndividualId = -1; + + private List _tribeCache; + + private List _lastTribeInfo = new List(); + + private int _playedCost = -1; + + private int _lastCost = -1; + + public readonly List CostModifierList; + + public List attackCountinfo; + + private static StringBuilder _extractedText = new StringBuilder(512); + + public BattleCardBase Card + { + get + { + if (MetamorphoseCard != null) + { + return MetamorphoseCard.Card; + } + return this; + } + } + + public virtual bool IsClass => false; + + public virtual bool IsUnit => false; + + public virtual bool IsSpell => false; + + public virtual bool IsField => false; + + public virtual bool IsChantField => false; + + public virtual bool IsSpecialSkill => false; + + public BattleCardBase LastDrawOpenCard { get; set; } + + public BattleCardBase MetamorphoseCard { get; set; } + + public BattleCardBase FinalMetamorphoseCard + { + get + { + if (_finalMetamorphoseCard == null && MetamorphoseCard != null) + { + _finalMetamorphoseCard = MetamorphoseCard; + } + while (_finalMetamorphoseCard != null && _finalMetamorphoseCard.MetamorphoseCard != null) + { + _finalMetamorphoseCard = _finalMetamorphoseCard.MetamorphoseCard; + } + return _finalMetamorphoseCard; + } + } + + public int MetamorphoseCount + { + get + { + int num = 0; + BattleCardBase metamorphoseCard = MetamorphoseCard; + while (metamorphoseCard != null) + { + metamorphoseCard = metamorphoseCard.MetamorphoseCard; + num++; + } + return num; + } + } + + public BattleCardBase ReplayBuffInfoCard { get; set; } + + public int PlayedTurn { get; protected set; } + + public DeathTypeInformation DeathTypeInfo { get; protected set; } + + public BuildInfo GetBuildInfo => _buildInfo; + + public int UpdateBuildInfoBeforeCardId { get; private set; } = -1; + + public string UpdateBuildInfoBeforeCardName { get; private set; } = string.Empty; + + public bool IsChoiceEvolutionCardBeforeUpdateBuildInfo => UpdateBuildInfoBeforeCardId / 1000000 == 910; + + public List NormalSkillBuildInfos => _buildInfo.NormalSkillBuildInfos; + + public List EvolveSkillBuildInfos => _buildInfo.EvolveSkillBuildInfos; + + public IEnumerable GetCopiedCardList + { + get + { + List list = new List(); + list.AddRange(NormalSkillBuildInfos); + list.AddRange(EvolveSkillBuildInfos); + return (from b in list + where b._previousSkillOwner != null + select b._previousSkillOwner).Distinct(); + } + } + + public List BuffInfoList { get; private set; } + + public List ReplayBuffInfoList { get; set; } = new List(); + + public List ReplayAllCopyBuffInfoList { get; set; } = new List(); + + public List ReplayBuffInfoLabelList { get; set; } = new List(); + + protected CardInnerOptionsBase InnerOptions => _buildInfo.InnerOptions; + + public IBattleResourceMgr ResourceMgr => _buildInfo.ResourceMgr; + + public IBattleCardView BattleCardView { get; protected set; } + + public virtual int Index => _buildInfo.BattleCardIndex; + + public BattlePlayerBase SelfBattlePlayer { get; protected set; } + + public BattlePlayerBase OpponentBattlePlayer { get; protected set; } + + public CardParameter BaseParameter + { + get + { + if (_evolveToOtherCardBaseParameter != null) + { + return _evolveToOtherCardBaseParameter; + } + return _baseParameter; + } + private set + { + _baseParameter = value; + } + } + + public SkillCollectionBase Skills { get; protected set; } + + public SkillCollectionBase NormalSkills => _normalSkillCollection; + + public SkillCollectionBase EvolutionSkills => _evolveSkillCollection; + + public TransformInformation TransformInfo { get; set; } + + public ISkillApplyInformation SkillApplyInformation { get; protected set; } + + public bool HasAnySkill { get; private set; } + + public bool IsTokenLoad { get; set; } + + public bool IsPlayer { get; private set; } + + public bool IsFirstTurn { get; protected set; } + + public bool IsOnMove { get; private set; } + + public bool IsSelfTurn => SelfBattlePlayer.IsSelfTurn; + + public virtual bool IsOnDraw + { + get + { + return _isOndraw; + } + private set + { + _isOndraw = value; + if (value) + { + OnStartDraw.Call(); + } + } + } + + public Action OnStartDraw { get; set; } + + public virtual bool IsActionCard => false; + + public virtual bool IsEvolution => false; + + public virtual bool IsEvolvedOnWhenLeave => false; + + public bool IsEvolDrunkenness + { + get + { + if (IsFirstTurn && IsSummonDrunkenness) + { + return !SkillApplyInformation.IsQuick; + } + return false; + } + } + + public virtual bool IsCantAttackClass + { + get + { + if (!GameMgr.GetIns().IsNewReplayBattle) + { + if (!SelfBattlePlayer.Class.IsCantAttackClass && !SkillApplyInformation.IsSkillCantAtkClass && !IsEvolDrunkenness) + { + if (IsFirstTurn && SkillApplyInformation.IsRush) + { + return !SkillApplyInformation.IsQuick; + } + return false; + } + return true; + } + return IsCantAttackClassOnReplay; + } + } + + public bool IsCantAttackClassOnReplay { get; set; } + + public bool IsCantAttackClassOnlyEvolDrunkenness + { + get + { + if (!SelfBattlePlayer.Class.IsCantAttackClass && !SkillApplyInformation.IsSkillCantAtkClass && IsEvolDrunkenness) + { + if (IsFirstTurn && SkillApplyInformation.IsRush) + { + return SkillApplyInformation.IsQuick; + } + return true; + } + return false; + } + } + + public bool IsSummonDrunkenness { get; set; } + + public bool IsPreviousTurnAttacked { get; set; } + + public bool IsSelectedDuringSelectingBurialRiteTarget { get; set; } + + public bool IsCantAttack + { + get + { + if (IsCantAttackClass) + { + return SkillApplyInformation.IsSkillCantAtkUnit; + } + return false; + } + } + + public List ReplaySkillDescriptionValueList { get; set; } = new List(); + + public List ReplayEvoSkillDescriptionValueList { get; set; } = new List(); + + public List ReplayBuffDetailSkillDescriptionValueList { get; set; } = new List(); + + public List ReplayBuffDetailEvoSkillDescriptionValueList { get; set; } = new List(); + + public virtual bool IsCantActivateFanfare => false; + + public int SpellChargeCount { get; protected set; } + + public int ChantCount => SkillApplyInformation.GetChantCount(BaseParameter.ChantCount); + + public int ExecutedFixedUseCostIndex { get; set; } + + public bool IsExecutedEarthRite { get; set; } + + public bool IsSkillLost { get; set; } + + public bool IsReanimate { get; set; } + + public ItWasDamagedCounter DamagedCounter { get; private set; } + + public bool HasSkillActivatedCountWrapValue => _skillActivatedCountWrapValue != -1; + + public int SkillActivatedCount + { + get + { + if (_skillActivatedCountWrapValue == -1) + { + return _skillActivatedCount; + } + int num; + for (num = _skillActivatedCount; num > _skillActivatedCountWrapValue; num -= _skillActivatedCountWrapValue) + { + } + return num; + } + protected set + { + _skillActivatedCount = value; + } + } + + public int ThisTurnSkillActivatedCount { get; protected set; } + + public int NormalIndividualId + { + get + { + if (_normalIndividualId == -1) + { + return _normalSkillCollection.GetIndividualId(); + } + return _normalIndividualId; + } + set + { + _normalIndividualId = value; + } + } + + public int EvolutionIndividualId + { + get + { + if (_evolutionIndividualId == -1) + { + return _evolveSkillCollection.GetIndividualId(); + } + return _evolutionIndividualId; + } + set + { + _evolutionIndividualId = value; + } + } + + public List SkillActivationList { get; set; } + + public bool AlreadyInactiveSkillActivateCountBySimultaneousDestroyedCardList { get; private set; } + + public bool ActiveSkillActivateCountBySimultaneousDestroyedCardList { get; set; } + + public bool AlreadyInactiveSkillActivateCountBySimultaneousBuffingCards { get; private set; } + + public bool ActiveSkillActivateCountBySimultaneousBuffingCards { get; set; } + + public bool AlreadyInactiveSkillActivateCountBySimultaneousSummonedCard { get; private set; } + + public bool ActiveSkillActivateCountBySimultaneousSummonedCard { get; set; } + + public bool HasSpellCharge + { + get + { + if (IsClass) + { + return false; + } + if (Skills.Any((SkillBase s) => s.OnWhenSpellChargeStart != 0)) + { + return true; + } + if (Skills.Any((SkillBase s) => Regex.IsMatch(s.CallCountText, "CHARGE_COUNT"))) + { + return true; + } + if (Skills.Any((SkillBase s) => s.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter t) => t.Lhs.Contains("charge_count")))) + { + return true; + } + if (BaseParameter.SkillTarget.Contains("self.charge_count")) + { + return true; + } + string oddChargeCountText = SkillFilterCreator.ContentKeyword.odd_charge_count.ToStringCustom(); + string evenChargeCountText = SkillFilterCreator.ContentKeyword.even_charge_count.ToStringCustom(); + return Skills.Any((SkillBase s) => s.IsRefVariable("CHARGE_COUNT") || s.IsRefVariable(oddChargeCountText) || s.IsRefVariable(evenChargeCountText)); + } + } + + public bool IsFusionable + { + get + { + SkillBase skillBase = Skills.FirstOrDefault((SkillBase s) => s is Skill_fusion); + if (skillBase == null) + { + return false; + } + if (IsAlreadyFusionInThisTurn) + { + return false; + } + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + if (skillBase.GetSelectableCards(playerInfoPair, option).Count() == 0) + { + return false; + } + if (!skillBase.CheckCondition(playerInfoPair, option, isPrePlay: true)) + { + return false; + } + return true; + } + } + + public bool IsAlreadyFusionInThisTurn => SkillApplyInformation.FusionIngredients.Any((FusionIngredientInfo c) => c.FusionTurn == SelfBattlePlayer.Turn); + + public List FusionIngredients => SkillApplyInformation.FusionIngredients.Select((FusionIngredientInfo f) => f.Card).ToList(); + + public int FusionedTurn { get; protected set; } + + public List GetOnCards => SkillApplyInformation.GetOnCards.ToList(); + + public bool IsChoiceEvolutionCard => CardId / 1000000 == 910; + + public List GetOffCards { get; set; } + + public bool CanPlayAsChoiceBraveCard + { + get + { + if (CardMaster.IsChoiceBraveCardCheck(CardId) && Cost <= SelfBattlePlayer.Bp) + { + if (Skills.Any((SkillBase s) => s.IsUserSelectType)) + { + return Skills.CheckWhenPlaySelectTargetSkillCondition; + } + return true; + } + return false; + } + } + + public virtual CHECK_CONDITION_MUTATIONSKILL_TYPE IsCheckActiveMutationSkill + { + get + { + using (IEnumerator enumerator = Skills.GetEnumerator()) + { + if (enumerator.MoveNext()) + { + if (!(enumerator.Current is Skill_pp_fixeduse skill_pp_fixeduse)) + { + return CHECK_CONDITION_MUTATIONSKILL_TYPE.NOT_HAVE_MUTATION_SKILL; + } + if (skill_pp_fixeduse.IsMutationFixedUseCost) + { + Skill_transform accelerateOrCrystallizeTransformSkill = GetAccelerateOrCrystallizeTransformSkill(); + if (accelerateOrCrystallizeTransformSkill != null) + { + BattleCardBase battleCardBase = SelfBattlePlayer.BattleMgr.CreateTransformCardRegisterVfx(this, accelerateOrCrystallizeTransformSkill.TransformId, accelerateOrCrystallizeTransformSkill.SkillPrm.ownerCard.IsPlayer); + if (battleCardBase.Skills.Any((SkillBase t) => t.IsUserSelectType)) + { + IEnumerable selectTypeSkill = battleCardBase.GetSelectTypeSkill(); + if (selectTypeSkill != null && selectTypeSkill.Count() > 0 && (battleCardBase.BaseParameter.CharType != CardBasePrm.CharaType.SPELL || (battleCardBase as SpellBattleCard).IsSelectableSkillTarget())) + { + return (battleCardBase.BaseParameter.CharType == CardBasePrm.CharaType.SPELL) ? CHECK_CONDITION_MUTATIONSKILL_TYPE.PLAY : CHECK_CONDITION_MUTATIONSKILL_TYPE.CRYSTALLIZE_SKILL_ACTIVE; + } + return (battleCardBase.BaseParameter.CharType == CardBasePrm.CharaType.SPELL) ? CHECK_CONDITION_MUTATIONSKILL_TYPE.SELECT_ACCELERATE_SKILL_NOT_ACTIVE : CHECK_CONDITION_MUTATIONSKILL_TYPE.SELECT_CRYSTALLIZE_SKILL_NOT_ACTIVE; + } + return (battleCardBase.BaseParameter.CharType == CardBasePrm.CharaType.SPELL) ? CHECK_CONDITION_MUTATIONSKILL_TYPE.PLAY : CHECK_CONDITION_MUTATIONSKILL_TYPE.CRYSTALLIZE_SKILL_ACTIVE; + } + } + return CHECK_CONDITION_MUTATIONSKILL_TYPE.NOT_PLAY; + } + } + return CHECK_CONDITION_MUTATIONSKILL_TYPE.NONE; + } + } + + public virtual bool BaseMovable => Movable(); + + public virtual bool IsInHand => SelfBattlePlayer.HandCardList.Contains(this); + + public virtual bool IsInDeck => SelfBattlePlayer.DeckCardList.Contains(this); + + public virtual bool IsInplay => SelfBattlePlayer.ClassAndInPlayCardList.Contains(this); + + public virtual bool IsInCemetery => SelfBattlePlayer.CemeteryList.Contains(this); + + public virtual bool IsInNecromanceZone => SelfBattlePlayer.NecromanceZoneList.Contains(this); + + public virtual bool IsFusionIngredient => SelfBattlePlayer.FusionIngredientList.Contains(this); + + public bool IsDestroyedByKiller { get; protected set; } + + public bool IsDestroyedBySkill { get; protected set; } + + public virtual bool IsDead + { + get + { + if (!IsLifeZeroDead && !IsDestroyedByKiller) + { + return IsDestroyedBySkill; + } + return true; + } + } + + public virtual bool IsLifeZeroDead => Life <= 0; + + public int DestroyedTurn { get; private set; } + + public bool IsDestroySelfTurn { get; private set; } + + public List DestroyedBySkillList { get; private set; } + + public BanishInfo BanishedInfo { get; private set; } + + public SkillBase DiscardedSkill { get; private set; } + + public SkillBase ReturnedSkill { get; private set; } + + public bool HasDeckSelfSkill => Skills.Any((SkillBase s) => s.IsDeckSelfSkill); + + public int AttackableCount { get; set; } + + public virtual bool Attackable + { + get + { + if (!GameMgr.GetIns().IsNewReplayBattle) + { + if (AttackableCount <= 0 || (IsSummonDrunkenness && (!IsSummonDrunkenness || !IsEvolution)) || IsCantAttack) + { + if (SkillApplyInformation.IsInfiniteAttack && !IsSummonDrunkenness) + { + return !IsCantAttack; + } + return false; + } + return true; + } + return AttackableOnReplay; + } + } + + public bool AttackableOnReplay { get; set; } + + public virtual List Tribe + { + get + { + if (SkillApplyInformation == null || SkillApplyInformation.TribeSkinInfo.Count == 0) + { + return BaseParameter.Tribe; + } + if (_tribeCache != null && _lastTribeInfo != null && _lastTribeInfo.SequenceEqual(SkillApplyInformation.TribeSkinInfo)) + { + return _tribeCache; + } + List list = new List(BaseParameter.Tribe); + for (int i = 0; i < SkillApplyInformation.TribeSkinInfo.Count(); i++) + { + if (SkillApplyInformation.TribeSkinInfo[i].TribeTypeList != null) + { + switch (SkillApplyInformation.TribeSkinInfo[i].ChangeType) + { + case CardBasePrm.TribeChangeType.CHANGE: + list = SkillApplyInformation.TribeSkinInfo[i].TribeTypeList; + break; + case CardBasePrm.TribeChangeType.ADD: + list.AddRange(SkillApplyInformation.TribeSkinInfo[i].TribeTypeList); + break; + default: + list = SkillApplyInformation.TribeSkinInfo[i].TribeTypeList; + break; + } + } + } + _tribeCache = list.Distinct().ToList(); + if (_tribeCache.Count >= 2 && _tribeCache.Contains(CardBasePrm.TribeType.ALL)) + { + _tribeCache.Remove(CardBasePrm.TribeType.ALL); + } + _lastTribeInfo.Clear(); + _lastTribeInfo.AddRange(SkillApplyInformation.TribeSkinInfo); + return _tribeCache; + } + } + + public virtual CardBasePrm.ClanType Clan + { + get + { + if (SkillApplyInformation.ClanSkinInfo.Count <= 0) + { + return BaseParameter.Clan; + } + return SkillApplyInformation.ClanSkinInfo.Last(); + } + } + + public int CardId => _buildInfo.CardId; + + public int EquitedCardId + { + get + { + if (IsChoiceEvolutionCard) + { + return BaseParameter.BaseCardId; + } + DataMgr.SpecialBattleSetting specialBattleSettingInfo = GameMgr.GetIns().GetDataMgr().SpecialBattleSettingInfo; + if (specialBattleSettingInfo == null) + { + return CardId; + } + Dictionary idOverridePairDict = specialBattleSettingInfo.IdOverridePairDict; + if (idOverridePairDict == null) + { + return CardId; + } + if (idOverridePairDict.ContainsKey(CardId)) + { + return idOverridePairDict[CardId]; + } + return CardId; + } + } + + public int Cost + { + get + { + int num = BaseParameter.Cost; + if (IsChoiceBraveSkillCard) + { + return num; + } + for (int i = 0; i < CostModifierList.Count; i++) + { + ICardCostModifier cardCostModifier = CostModifierList[i]; + if (!(cardCostModifier is CostHalfModifier)) + { + num = cardCostModifier.CalcCost(num); + } + } + for (int j = 0; j < CostModifierList.Count; j++) + { + ICardCostModifier cardCostModifier2 = CostModifierList[j]; + if (cardCostModifier2 is CostHalfModifier) + { + num = cardCostModifier2.CalcCost(num); + } + } + return Math.Max(0, num); + } + } + + public int BaseCost => BaseParameter.Cost; + + public int Atk => SkillApplyInformation.GetAtk(); + + public int BaseAtk + { + get + { + if (!IsEvolution) + { + return BaseParameter.Atk; + } + return BaseParameter.EvoAtk; + } + } + + public int Life => SkillApplyInformation.GetLife(); + + public int MaxLife => SkillApplyInformation.GetMaxLife(); + + public int[] GenericValueArray => SkillApplyInformation.SkillGenericValueArray; + + public virtual int BaseMaxLife + { + get + { + if (!IsEvolution) + { + return BaseParameter.Life; + } + return BaseParameter.EvoLife; + } + } + + public int PlayedCost => _playedCost; + + public int LastCost => _lastCost; + + public int MaxAttackableCount + { + get + { + int num = 1; + for (int i = 0; i < attackCountinfo.Count; i++) + { + num = attackCountinfo[i].CalcAttackCount(num); + } + return num; + } + } + + public DamageParam DamageCalculationAtkTypeAttack => new DamageParam(SkillApplyInformation.IsAttackByLifeTypeAttack ? Life : Atk, this, SkillFilterCreator.ContentKeyword.unit.ToString(), Clan); + + public DamageParam DamageCalculationAtkTypeBeAttacked => new DamageParam(SkillApplyInformation.IsAttackByLifeTypeBeAttacked ? Life : Atk, this, SkillFilterCreator.ContentKeyword.unit.ToString(), Clan); + + public ICardVfxCreator VfxCreator { get; protected set; } + + public bool AreCanPlayConditionsFulfilled => this.OnCheckCanPlay.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanAttackConditionsFulfilled => this.OnCheckCanAttack.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanBeAttackedConditionsFulfilled => this.OnCheckCanBeAttacked.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanBeSelectedConditionsFulfilled => this.OnCheckCanBeSelected.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanShowDetailConditionsFulfilled => this.OnCheckCanShowDetail.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanEvolveConditionsFulfilled => this.OnCheckCanEvolve.GetAllFuncCallResults().All((bool condition) => condition); + + public int FixedUseCost => CalcFixedUseCost(SelfBattlePlayer.Pp); + + public List UseCostList + { + get + { + List list = new List(); + List list2 = new List(); + int pp = SelfBattlePlayer.Pp; + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse skill_pp_fixeduse) + { + if (skill_pp_fixeduse.IsAccelerateOrCrystallize) + { + list2.Add(skill_pp_fixeduse._fixedUsePP); + } + else + { + list.Add(skill_pp_fixeduse._fixedUsePP); + } + } + } + List list3 = new List(); + if (!list.Any() && !list2.Any()) + { + return list3; + } + if (IsSelectedDuringSelectingBurialRiteTarget) + { + return list3; + } + if (!IsCantActivateFanfare) + { + list3.AddRange(list.Where((int c) => c <= pp).Reverse()); + } + if ((!list.Any((int c) => c <= Cost) || IsCantActivateFanfare) && Cost <= pp) + { + list3.Add(Cost); + } + list3.AddRange(list2.Where((int c) => pp >= c && c < Cost).Reverse()); + list3.AddRange(list2.Where((int c) => pp < c && c < Cost)); + if (!list.Any((int c) => c <= Cost) && pp < Cost) + { + list3.Add(Cost); + } + if (!IsCantActivateFanfare) + { + list3.AddRange(list.Where((int c) => pp < c)); + } + list3.AddRange(list2.Where((int c) => Cost <= c)); + if (list.Any((int c) => c <= Cost)) + { + list3.Add(Cost); + } + if (IsCantActivateFanfare) + { + list3.AddRange(list); + } + return list3; + } + } + + public bool HasSkillFixedUseCost => FixedUseCost != -1; + + public bool HasSkillAccelerate => Skills.Any((SkillBase s) => s.OnWhenAccelerate != 0); + + public bool HasSkillCrystallize => Skills.Any((SkillBase s) => s.OnWhenCrystallize != 0); + + public bool HasSkillEnhance => Skills.Any((SkillBase s) => s.IsEnhance()); + + public bool HasSkillDestroyWhiteRitual => HasSkillDestroyTribe(CardBasePrm.TribeType.WHITE_RITUAL); + + public bool HasSkillStackWhiteRitual => Skills.Any((SkillBase s) => s is Skill_stack_white_ritual); + + public bool HasSkillBurialRite + { + get + { + if (!NormalSkills.Any((SkillBase s) => s.IsBurialRite)) + { + return EvolutionSkills.Any((SkillBase s) => s.IsBurialRite); + } + return true; + } + } + + public bool HasSkillNecromance { get; private set; } + + public bool HasSkillWhenDestroy + { + get + { + if (IsInDeck) + { + if (!NormalSkills.Any((SkillBase s) => s.IsWhenDestroySkill)) + { + return EvolutionSkills.Any((SkillBase s) => s.IsWhenDestroySkill); + } + return true; + } + return Skills.Any((SkillBase s) => s.IsWhenDestroySkill); + } + } + + public bool HasSkillReanimate + { + get + { + if (!NormalSkills.Any((SkillBase s) => s is Skill_summon_token && (s as Skill_summon_token).IsReanimate)) + { + return EvolutionSkills.Any((SkillBase s) => s is Skill_summon_token && (s as Skill_summon_token).IsReanimate); + } + return true; + } + } + + public bool HasSkillFusion => NormalSkills.Any((SkillBase s) => s is Skill_fusion); + + public bool HasWhenAttack => Skills.Any((SkillBase s) => s.IsBeforAttackSkill); + + public bool HasWhenFight => Skills.Any((SkillBase s) => s.IsWhenFightSkill); + + public bool HasFusionSkill => Skills.Any((SkillBase s) => s is Skill_fusion); + + public bool HasNoSelectFusionSkill => Skills.Any((SkillBase s) => s.IsNoSelectFusionSkill); + + public bool IsChoiceBraveSkillCard { get; set; } + + public bool HasSkillWhenEvolve => EvolutionSkills.Any((SkillBase s) => s.IsWhenEvolveSkill); + + public bool HasUnionBurst + { + get + { + string unionBurstString = SkillFilterCreator.ContentKeyword.union_burst_count.ToString(); + if (Skills.Any((SkillBase s) => s.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter t) => t.Lhs.Contains(unionBurstString)))) + { + return true; + } + return false; + } + } + + public bool HasSkyboundArt + { + get + { + string skyboundArtString = SkillFilterCreator.ContentKeyword.skybound_art_count.ToString(); + return Skills.Any((SkillBase s) => s.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter t) => t.Lhs.Contains(skyboundArtString))); + } + } + + public bool HasSuperSkyboundArt + { + get + { + string superSkyboundArtString = SkillFilterCreator.ContentKeyword.super_skybound_art_count.ToString(); + return Skills.Any((SkillBase s) => s.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter t) => t.Lhs.Contains(superSkyboundArtString))); + } + } + + public bool IsLegend => BaseParameter.Rarity >= 4; + + public int DrawTurn { get; set; } + + public bool IsHaveBurialRiteJudgeBothFlag + { + get + { + bool flag = false; + bool flag2 = false; + foreach (SkillBase skill in Skills) + { + List list = skill.ConditionFilterCollection.ConditionCheckerFilterList.FindAll((ISkillConditionChecker x) => x is SkillConditionBurialRite).ConvertAll((ISkillConditionChecker x) => x as SkillConditionBurialRite); + if (list == null) + { + continue; + } + if (!flag) + { + flag = list.Find((SkillConditionBurialRite x) => x.judgeFlg) != null; + } + if (!flag2) + { + flag2 = list.Find((SkillConditionBurialRite x) => !x.judgeFlg) != null; + } + } + return flag && flag2; + } + } + + public bool IsBuffDetail + { + get + { + if (IsShowBuffDetail || IsRecordingBuffDetail) + { + return !IsRecordingExceptBuffDetail; + } + return false; + } + } + + public bool IsShowBuffDetail { get; set; } + + public bool IsRecordingBuffDetail { get; set; } + + public bool IsRecordingExceptBuffDetail { get; set; } + + public bool IsRecordingFusionInfo { get; set; } + + public event Func OnRemoveFromInPlayAfterOneTime; + + public event Func OnBeforeEvolve; + + public event Action OnEvolveEvent; + + public event Func OnPlay; + + public event Func OnFinishWhenPlaySkill; + + public event Func OnDestroy; + + public event Func OnBanish; + + public event Func OnReturnCard; + + public event Func OnMetamorphose; + + public event Func OnGetOn; + + public event Action OnAddCostState; + + public event Action OnRemoveCostState; + + public event Func OnAfterAddDamage; + + public event Action OnAttachSkill; + + public event Action OnCopySkillComplete; + + public event Func OnLoseSkillOneTime; + + public event Func OnDamageAfter; + + public event Func OnGiveDamage; + + public event Func OnReflectionAfter; + + public event Action OnResetCardParameter; + + public event Action> OnFusionEvent; + + public event Action OnTurnStart; + + public event Func OnCheckCanPlay; + + public event Func OnCheckCanAttack; + + public event Func OnCheckCanBeAttacked; + + public event Func OnCheckCanBeSelected; + + public event Func OnCheckCanShowDetail; + + public event Func OnCheckCanEvolve; + + public void SetPlayedTurnNow() + { + PlayedTurn = SelfBattlePlayer.Turn; + } + + private void ResetUpdateBuildInfo() + { + UpdateBuildInfoBeforeCardId = -1; + UpdateBuildInfoBeforeCardName = string.Empty; + } + + public void UpdateBuildInfoAndSkillCollection(int cardId, bool isFoil, bool isNotUpdateAtkLife = false) + { + UpdateBuildInfoBeforeCardId = BaseParameter.NormalCardId; + UpdateBuildInfoBeforeCardName = BaseParameter.CardName; + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId)); + _buildInfo = new BuildInfo(_buildInfo.GameObject, isFoil ? (cardId + 1) : cardId, _buildInfo.SelfBattlePlayer, _buildInfo.OpponentBattlePlayer, _buildInfo.SelfBattlePlayer, cardSkillsBuildInfo.normalSkillBuildInfos, cardSkillsBuildInfo.evolveSkillBuildInfos, _buildInfo.IsPlayer, _buildInfo.BattleCardIndex, _buildInfo.InnerOptions, _buildInfo.BattleMgr, _buildInfo.ResourceMgr); + int evoAtk = BaseParameter.EvoAtk; + int evoLife = BaseParameter.EvoLife; + _evolveToOtherCardBaseParameter = CardMaster.GetInstanceForBattle().GetCardParameterFromId(_buildInfo.CardId).Clone(); + InitSkillCollection(); + if (isNotUpdateAtkLife) + { + _evolveToOtherCardBaseParameter.UpdateEvoAtkLife(evoAtk, evoLife); + } + } + + public void ResetChoiceEvolutionCardBuildInfo() + { + UpdateBuildInfoAndSkillCollection(BaseParameter.BaseCardId, BaseParameter.IsFoil); + if (!SelfBattlePlayer.BattleMgr.IsRecovery || IsPlayer) + { + BattleCardView.CardTemplate.NormalNameLabelTemp.text = BaseParameter.CardName; + Global.SetRepositionNameLabel(BattleCardView.CardTemplate.NormalNameLabelTemp, BaseParameter.CardName, is2D: false); + BattleCardView.InitializeVoiceInfo(CardId); + for (int i = 0; i < NormalSkills.Count(); i++) + { + NormalSkills.ElementAt(i).SetInductionVoiceIndex(); + } + for (int j = 0; j < EvolutionSkills.Count(); j++) + { + EvolutionSkills.ElementAt(j).SetInductionVoiceIndex(); + } + } + } + + public void UpdateChoiceEvolutionBeforeCard(int cardId, string cardName) + { + UpdateBuildInfoBeforeCardId = cardId; + UpdateBuildInfoBeforeCardName = cardName; + } + + public void ResetReplayBuffInfo() + { + ReplayBuffInfoList.Clear(); + ReplayNoConsumeEpBuffInfoNameList.Clear(); + ReplayBuffInfoLabelList.Clear(); + } + + public virtual string SkillDescription(BattlePlayerBase.SideLogInfo sideLogInfo = null, bool isSkipOption = false, BuffInfo buff = null, string divergenceId = "", List skillDescriptionValueList = null, List sideLogDescriptionValueList = null) + { + return ConvertSkillDescription(BaseParameter.SkillDescription, sideLogInfo, isSkipOption, buff, divergenceId, skillDescriptionValueList, (IsBuffDetail && sideLogInfo == null && ReplayBuffDetailSkillDescriptionValueList.Count > 0) ? ReplayBuffDetailSkillDescriptionValueList : ((sideLogDescriptionValueList != null) ? sideLogDescriptionValueList : ReplaySkillDescriptionValueList)); + } + + public virtual string EvoSkillDescription(BattlePlayerBase.SideLogInfo sideLogInfo = null, bool isSkipOption = false, BuffInfo buff = null, string divergenceId = "", List skillDescriptionValueList = null, List sideLogDescriptionValueList = null) + { + return ConvertSkillDescription(BaseParameter.EvoSkillDescription, sideLogInfo, isSkipOption, buff, divergenceId, skillDescriptionValueList, (IsBuffDetail && sideLogInfo == null && ReplayBuffDetailEvoSkillDescriptionValueList.Count > 0) ? ReplayBuffDetailEvoSkillDescriptionValueList : ((sideLogDescriptionValueList != null) ? sideLogDescriptionValueList : ReplayEvoSkillDescriptionValueList)); + } + + public string CopiedSkillDescription(string skillDescription, List skillDescriptionValueList) + { + return ConvertSkillDescription(skillDescription, null, isSkipOption: false, null, "", skillDescriptionValueList, null); + } + + public string CopiedEvoSkillDescription(string skillDescription, List skillDescriptionValueList) + { + return ConvertSkillDescription(skillDescription, null, isSkipOption: false, null, "", skillDescriptionValueList, null); + } + + public string CopiedSkillDescriptionInReplay(BuffInfo buff, List copiedSkillDescriptionValueList) + { + return ConvertSkillDescription(BaseParameter.SkillDescription, null, isSkipOption: false, buff, "", null, copiedSkillDescriptionValueList); + } + + public string CopiedEvoSkillDescriptionInReplay(BuffInfo buff, List copiedEvoSkillDescriptionValueList) + { + return ConvertSkillDescription(BaseParameter.EvoSkillDescription, null, isSkipOption: false, buff, "", null, copiedEvoSkillDescriptionValueList); + } + + public virtual bool CantBeFocusedAttack(BattleCardBase attackCard) + { + if (SkillApplyInformation.IsSneak) + { + return true; + } + if (SkillApplyInformation.NotBeAttackedInfoList.Any((NotBeAttackedInfo s) => !s.CheckAttacked(attackCard))) + { + return true; + } + return false; + } + + public bool CanEvolution(bool isSkill, bool isSelfBattlePlayer) + { + BattlePlayerBase battlePlayerBase = (isSelfBattlePlayer ? SelfBattlePlayer : OpponentBattlePlayer); + if (isSkill) + { + if (!IsEvolution) + { + return true; + } + } + else if (battlePlayerBase.EvolveWaitTurnCount <= 0 && battlePlayerBase.NowTurnEvol && (battlePlayerBase.CurrentEpCount - SkillApplyInformation.GetEp() >= 0 || battlePlayerBase.CheckNotConsumeEpCard(this)) && !IsEvolution && !SkillApplyInformation.CantEvolutionList.Any((int f) => (f & Skill_cant_evolution.BIT_FLAG_EPUSE) != 0)) + { + return true; + } + return false; + } + + public void IncrementSkillActivatedCount() + { + SkillActivatedCount++; + ThisTurnSkillActivatedCount++; + } + + public void SetSkillActivatedCount(int value) + { + SkillActivatedCount = value; + } + + public void SetSkillActivatedCountWrapValue(int value) + { + _skillActivatedCountWrapValue = value; + } + + public void ResetSkillActivateCountBySimultaneousDestroyedCardList() + { + ActiveSkillActivateCountBySimultaneousDestroyedCardList = false; + AlreadyInactiveSkillActivateCountBySimultaneousDestroyedCardList = false; + } + + public void InactiveSkillActivateCountBySimultaneousDestroyedCardList() + { + ActiveSkillActivateCountBySimultaneousDestroyedCardList = false; + AlreadyInactiveSkillActivateCountBySimultaneousDestroyedCardList = true; + } + + public void ResetSkillActivateCountBySimultaneousBuffingCards() + { + ActiveSkillActivateCountBySimultaneousBuffingCards = false; + AlreadyInactiveSkillActivateCountBySimultaneousBuffingCards = false; + } + + public void InactiveSkillActivateCountBySimultaneousBuffingCards() + { + ActiveSkillActivateCountBySimultaneousBuffingCards = false; + AlreadyInactiveSkillActivateCountBySimultaneousBuffingCards = true; + } + + public void ResetSkillActivateCountBySimultaneousSummonedCard() + { + ActiveSkillActivateCountBySimultaneousSummonedCard = false; + AlreadyInactiveSkillActivateCountBySimultaneousSummonedCard = false; + } + + public void InactiveSkillActivateCountBySimultaneousSummonedCard() + { + ActiveSkillActivateCountBySimultaneousSummonedCard = false; + AlreadyInactiveSkillActivateCountBySimultaneousSummonedCard = true; + } + + protected virtual bool GetIsMovableOnView() + { + if (IsOnDraw) + { + return false; + } + return Movable(isCheckOnDraw: false); + } + + public virtual bool Movable(bool isCheckOnDraw = true, bool isSkipSelecting = false, CHECK_CONDITION_MUTATIONSKILL_TYPE type = CHECK_CONDITION_MUTATIONSKILL_TYPE.NONE, bool isRecording = false) + { + if (SelfBattlePlayer.Class.SkillApplyInformation.IsCantPlay(this, type)) + { + return false; + } + if (!SelfBattlePlayer.HandCardList.Contains(this)) + { + return false; + } + if (SelfBattlePlayer.Pp < Cost && FixedUseCost == -1) + { + return false; + } + if (!IsSelfTurn) + { + return false; + } + if (SelfBattlePlayer.Class.IsDead || OpponentBattlePlayer.Class.IsDead) + { + return false; + } + if (!InnerOptions.CheckMovable(SelfBattlePlayer.BattleView, BattleCardView, isCheckOnDraw && IsOnDraw, isSkipSelecting, isRecording)) + { + return false; + } + if (!SelfBattlePlayer.IsPlayer && GameMgr.GetIns().IsAdminWatch) + { + if (isCheckOnDraw && IsOnDraw) + { + return false; + } + if (BattleCardView._hasCardEnteredPlayQueue) + { + return false; + } + if (SelfBattlePlayer.BattleView.IsSelecting && !isSkipSelecting) + { + return false; + } + } + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption checkerOption = new SkillConditionCheckerOption(); + if (Skills.Any((SkillBase s) => s is Skill_can_play_self && !s.CheckCondition(playerInfoPair, checkerOption, isPrePlay: true))) + { + return false; + } + return true; + } + + public Skill_transform GetAccelerateOrCrystallizeTransformSkill() + { + BattlePlayerReadOnlyInfoPair pair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse { IsAccelerateOrCrystallize: false } skill_pp_fixeduse && !IsCantActivateFanfare && skill_pp_fixeduse.CheckCondition(pair, option, isPrePlay: true)) + { + return null; + } + } + return (Skill_transform)Skills.LastOrDefault((SkillBase s) => (s.OnWhenAccelerate != 0 || s.OnWhenCrystallize != 0) && s is Skill_transform && s.CheckCondition(pair, option, isPrePlay: true)); + } + + public bool IsMutationMovable(CHECK_CONDITION_MUTATIONSKILL_TYPE type) + { + if (type == CHECK_CONDITION_MUTATIONSKILL_TYPE.SELECT_ACCELERATE_SKILL_NOT_ACTIVE) + { + return false; + } + if (SelfBattlePlayer.InPlayCards.Count() >= 5) + { + switch (type) + { + case CHECK_CONDITION_MUTATIONSKILL_TYPE.CRYSTALLIZE_SKILL_ACTIVE: + case CHECK_CONDITION_MUTATIONSKILL_TYPE.SELECT_CRYSTALLIZE_SKILL_NOT_ACTIVE: + return false; + default: + return false; + case CHECK_CONDITION_MUTATIONSKILL_TYPE.NONE: + case CHECK_CONDITION_MUTATIONSKILL_TYPE.PLAY: + break; + } + } + return true; + } + + public void SetDestroyedBySkillList(SkillBase skill) + { + DestroyedBySkillList = new List(); + if (skill == null) + { + return; + } + bool isDestroyedBySelf = skill.SkillPrm.ownerCard.SelfBattlePlayer.IsPlayer == SelfBattlePlayer.IsPlayer; + if (skill.IsWhenPlaySkill) + { + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.WhenPlay, skill.SkillPrm.ownerCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + TransformInformation transformInfo = skill.SkillPrm.ownerCard.TransformInfo; + switch (transformInfo.Type) + { + case TransformType.Accelerate: + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.Accelerate, transformInfo.OriginalCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + break; + case TransformType.Crystallize: + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.Crystallize, transformInfo.OriginalCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + break; + } + } + else if (skill.IsWhenDestroySkill) + { + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.WhenDestroy, skill.SkillPrm.ownerCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + } + else + { + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.None, skill.SkillPrm.ownerCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + } + } + + public void SetBanishedInfo(BanishInfo.BanishPlace place) + { + BattlePlayerBase battlePlayerBase = (SelfBattlePlayer.IsSelfTurn ? SelfBattlePlayer : OpponentBattlePlayer); + BanishedInfo = new BanishInfo(battlePlayerBase.Turn, battlePlayerBase.IsPlayer, place); + } + + public void SetDiscardedSkill(SkillBase discardedSkill) + { + DiscardedSkill = discardedSkill; + } + + public void SetReturnedSkill(SkillBase returnedSkill) + { + ReturnedSkill = returnedSkill; + } + + public bool IsTribe(CardBasePrm.TribeType tribe) + { + if (Tribe != null) + { + return Tribe.Contains(tribe); + } + return false; + } + + public bool HasMoreDamageThan(BattleCardBase other) + { + return SkillApplyInformation.HasMoreDamageThan(other.SkillApplyInformation); + } + + protected void ResetPlayedCost() + { + _playedCost = -1; + } + + protected void ResetLastCost() + { + _lastCost = -1; + } + + public void GiveAttackCount(Skill_attack_count skill, int count) + { + if (skill.IsAddAttackCount()) + { + attackCountinfo.Add(new AddAttackCountInfo(skill, count)); + } + else if (skill.IsSetAttackCount()) + { + attackCountinfo.Add(new SetAttackCountInfo(skill, count)); + } + } + + public void DepriveAttackCount(Skill_attack_count skill) + { + attackCountinfo.RemoveAll((AttackCountInfo s) => s.Skill == skill); + } + + public void ClearAttackCount() + { + attackCountinfo.Clear(); + } + + public void CallOnAttachSkill(BattleCardBase card, SkillBase skill) + { + if (card.IsClass) + { + skill.SetAndAddPublishedActiveSkillCount(); + } + this.OnAttachSkill.Call(card, skill); + } + + public Action ForceAttackOff() + { + if (BattleManagerBase.GetIns().IsRecovery) + { + return delegate + { + }; + } + Func forceAttackOffFunc = () => false; + OnCheckCanAttack += forceAttackOffFunc; + return delegate + { + OnCheckCanAttack -= forceAttackOffFunc; + }; + } + + public bool HasSkillWhenPlay(bool isOnlyNoSelect) + { + if (isOnlyNoSelect) + { + bool hasChoiceTransform = NormalSkills.Any((SkillBase s) => s.OnWhenChoicePlayStart != 0 && s is Skill_transform); + if (NormalSkills.Any((SkillBase s) => s.IsWhenPlaySkill)) + { + return !NormalSkills.Any((SkillBase s) => (s.IsWhenPlaySkill && (s.IsUserSelectType || s.IsBurialRite)) || (!hasChoiceTransform && s.OnWhenChoicePlayStart != 0)); + } + return false; + } + return NormalSkills.Any((SkillBase s) => s.IsWhenPlaySkill); + } + + public int GetCurrentAtkBuff() + { + if (IsEvolution) + { + return SkillApplyInformation.GetAtk(ignoreLowerLimit: true) - BaseParameter.EvoAtk; + } + return SkillApplyInformation.GetAtk(ignoreLowerLimit: true) - BaseParameter.Atk; + } + + public int GetCurrentLifeBuff() + { + if (IsEvolution) + { + return SkillApplyInformation.GetMaxLife() - BaseParameter.EvoLife; + } + return SkillApplyInformation.GetMaxLife() - BaseParameter.Life; + } + + public bool IsMutationPlayPp(int pp) + { + int num = CalcFixedUseCost(pp, skipCondition: true); + if (-1 != num && num <= pp) + { + return pp < Cost; + } + return false; + } + + public Skill_pp_fixeduse GetAccelerateOrCrystallizeSkill(int currentPp) + { + Skill_pp_fixeduse result = null; + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse skill_pp_fixeduse && skill_pp_fixeduse._fixedUsePP <= currentPp && skill_pp_fixeduse._fixedUsePP < Cost && currentPp < Cost) + { + result = skill_pp_fixeduse; + } + } + return result; + } + + public int CalcFixedUseCost(int currentPp, bool skipCondition = false) + { + int num = -1; + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse skill_pp_fixeduse && currentPp >= skill_pp_fixeduse._fixedUsePP) + { + bool flag = skill_pp_fixeduse.CheckCondition(playerInfoPair, new SkillConditionCheckerOption(), isPrePlay: true); + bool num2 = flag && num < skill_pp_fixeduse._fixedUsePP; + bool flag2 = (skipCondition || flag) && skill_pp_fixeduse._fixedUsePP < Cost && currentPp < Cost; + if (num2 || flag2) + { + num = skill_pp_fixeduse._fixedUsePP; + } + } + } + return num; + } + + public int GetPaidFixedCost() + { + if (ExecutedFixedUseCostIndex != -1 && Skills.ElementAt(ExecutedFixedUseCostIndex) is Skill_pp_fixeduse skill_pp_fixeduse) + { + return skill_pp_fixeduse._fixedUsePP; + } + return -1; + } + + public bool CheckConditionFixedUseCost(bool isPrePlay) + { + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse skill_pp_fixeduse && skill_pp_fixeduse.CheckCondition(new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer), new SkillConditionCheckerOption(), isPrePlay)) + { + return true; + } + } + return false; + } + + protected bool IsFixedUseEnable(int labelCost) + { + if (Skills.Any((SkillBase s) => s is Skill_pp_fixeduse && (s as Skill_pp_fixeduse)._fixedUsePP == labelCost && ((s as Skill_pp_fixeduse)._fixedUsePP < Cost || !(s as Skill_pp_fixeduse).IsAccelerateOrCrystallize))) + { + return true; + } + return false; + } + + public bool HasSkillDestroyTribe(CardBasePrm.TribeType tribe) + { + if (_normalSkillCollection != null && HasSkillDestroyTribeInner(tribe, _normalSkillCollection)) + { + return true; + } + if (_evolveSkillCollection != null && HasSkillDestroyTribeInner(tribe, _evolveSkillCollection)) + { + return true; + } + return false; + } + + private bool HasSkillDestroyTribeInner(CardBasePrm.TribeType tribe, SkillCollectionBase skills) + { + if (skills == null) + { + return false; + } + for (int i = 0; i < skills.Count(); i++) + { + for (int j = 0; j < skills.ElementAt(i).PreprocessList.Count; j++) + { + if (skills.ElementAt(i).PreprocessList[j] is SkillPreprocessDestroyTribe skillPreprocessDestroyTribe && tribe == skillPreprocessDestroyTribe.GetDestroyTribe()) + { + return true; + } + } + } + return false; + } + + private CardParameter CreateClassParameter(bool isPlayer) + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + return new CardParameter((CardBasePrm.ClanType)(isPlayer ? dataMgr.GetPlayerClassId() : dataMgr.GetEnemyClassId())); + } + + public void ChangeClassClanParameter() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + BaseParameter.ChangeClanParameter((CardBasePrm.ClanType)(IsPlayer ? dataMgr.GetPlayerClassId() : dataMgr.GetEnemyClassId())); + } + + public void CreateParameter() + { + if (CardMaster.IsClass(_buildInfo.CardId)) + { + BaseParameter = CreateClassParameter(IsPlayer); + } + else + { + BaseParameter = CardMaster.GetInstanceForBattle().GetCardParameterFromId(_buildInfo.CardId); + } + } + + public BattleCardBase(BuildInfo buildInfo) + { + _buildInfo = buildInfo; + IsTokenLoad = false; + SelfBattlePlayer = buildInfo.SelfBattlePlayer; + OpponentBattlePlayer = buildInfo.OpponentBattlePlayer; + SelfBattlePlayerReadOnlyInfo = buildInfo.SelfBattlePlayerReadOnlyInfo; + IsPlayer = buildInfo.IsPlayer; + CreateParameter(); + CostModifierList = new List(); + attackCountinfo = new List(); + SpellChargeCount = 0; + ExecutedFixedUseCostIndex = -1; + DamagedCounter = new ItWasDamagedCounter(); + GetOffCards = new List(); + IsSummonDrunkenness = true; + IsOnMove = false; + IsOnDraw = true; + ResetPlayedCost(); + ResetLastCost(); + PlayedTurn = -1; + DeathTypeInfo = new DeathTypeInformation(); + BuffInfoList = new List(); + SkillActivationList = new List(); + _skillActivatedCount = 1; + ThisTurnSkillActivatedCount = 0; + InitSkillCollection(); + Skills = _normalSkillCollection; + IsSkillLost = false; + IsReanimate = false; + HasAnySkill = (NormalSkills != null && NormalSkills.Any((SkillBase skill) => !(skill is Skill_none) && !skill.IsAttachedSkill)) || (EvolutionSkills != null && EvolutionSkills.Any((SkillBase skill) => !(skill is Skill_none) && !skill.IsAttachedSkill)); + HasSkillNecromance = (NormalSkills != null && NormalSkills.Any((SkillBase skill) => skill.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessNecromance) && !skill.IsAttachedSkill)) || (EvolutionSkills != null && EvolutionSkills.Any((SkillBase skill) => skill.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessNecromance) && !skill.IsAttachedSkill)); + OnPlay += delegate + { + BattleCardView.HideCanPlayEffect(); + return NullVfx.GetInstance(); + }; + } + + public virtual void Setup(bool createNullView = false, bool isRecreate = false) + { + BattleCardView = CreateView(CreateViewBuildInfo(_buildInfo), createNullView); + VfxCreator = CreateVfxCreator(IsPlayer, BattleCardView, createNullView); + if (!createNullView) + { + foreach (SkillBase normalSkill in NormalSkills) + { + normalSkill.SetInductionVoiceIndex(); + } + foreach (SkillBase evolutionSkill in EvolutionSkills) + { + evolutionSkill.SetInductionVoiceIndex(); + } + } + if (SkillApplyInformation == null) + { + SkillApplyInformation = CreateSkillApplyInformation(this, VfxCreator); + SkillApplyInformation.InitializeInformation(); + } + if (!isRecreate) + { + DrawTurn = -1; + } + DestroyedTurn = -1; + DestroyedBySkillList = new List(); + BanishedInfo = new BanishInfo(-1, isSelfTurn: false, BanishInfo.BanishPlace.None); + } + + public void RecreateView(GameObject cardGameObject) + { + _buildInfo.GameObject = cardGameObject; + Setup(createNullView: false, isRecreate: true); + SkillApplyInformation.ReSetupVfxCreator(VfxCreator); + } + + protected virtual void InitSkillCollection() + { + _normalSkillCollection = CreateSkillCondition(_buildInfo.NormalSkillBuildInfos, _buildInfo.SelfBattlePlayer, _buildInfo.OpponentBattlePlayer, _buildInfo.ResourceMgr); + _evolveSkillCollection = CreateSkillCondition(_buildInfo.EvolveSkillBuildInfos, _buildInfo.SelfBattlePlayer, _buildInfo.OpponentBattlePlayer, _buildInfo.ResourceMgr); + } + + public void SetIndex(int setIndex) + { + _buildInfo.BattleCardIndex = setIndex; + } + + public virtual void UpdateSkillCollection() + { + } + + protected virtual BattleCardView.BuildInfo CreateViewBuildInfo(BuildInfo baseBuildInfo) + { + Func getIsTouchable = null; + if (baseBuildInfo.SelfBattlePlayer != null) + { + getIsTouchable = baseBuildInfo.SelfBattlePlayer.BattleView.IsTouchable; + } + return new BattleCardView.BuildInfo(this, new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer), baseBuildInfo.GameObject, SelfBattlePlayer.BattleCamera, SelfBattlePlayer.BackGround, baseBuildInfo.ResourceMgr, getIsTouchable, () => GetIsMovableOnView(), () => IsOnMove, (int cost) => IsFixedUseEnable(cost), () => !IsActionCard, () => Attackable && IsInplay && IsSelfTurn, () => IsCantAttackClass, GetHandCardFrameEffectType); + } + + protected virtual IBattleCardView CreateView(BattleCardView.BuildInfo buildInfo, bool IsNullView) + { + if (IsNullView) + { + return new NullBattleCardView(buildInfo); + } + return new BattleCardView(buildInfo); + } + + protected SkillCollectionBase CreateSkillCondition(IEnumerable buildInfos, BattlePlayerBase selfBattlPlayer, BattlePlayerBase opponentBattlePlayer, IBattleResourceMgr resourceMgr) + { + if (buildInfos == null) + { + return null; + } + SkillCollectionBase skillCollectionBase = CreateSkillCollection(); + List list = null; + SkillCreator skillCreator = CreateSkillCreator(selfBattlPlayer, opponentBattlePlayer, resourceMgr); + foreach (SkillCreator.SkillBuildInfo buildInfo in buildInfos) + { + SkillBase skillBase = skillCreator.Create(buildInfo, list); + skillCollectionBase.Add(skillBase); + if (skillBase.PreprocessList.Any()) + { + if (skillBase.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessReferencePrevious)) + { + list.AddRange(skillBase.PreprocessList); + } + else + { + list = skillBase.PreprocessList.ToList(); + } + } + } + skillCollectionBase.Complete(); + return skillCollectionBase; + } + + public virtual SkillCreator CreateSkillCreator(BattlePlayerBase selfBattlPlayer, BattlePlayerBase opponentBattlePlayer, IBattleResourceMgr resourceMgr) + { + return new SkillCreator(this, selfBattlPlayer, opponentBattlePlayer, resourceMgr); + } + + protected virtual SkillCollectionBase CreateSkillCollection() + { + return new SkillCollectionBase(this); + } + + public virtual VfxBase TurnStart(SkillProcessor skillProcessor) + { + if (IsInplay) + { + this.OnTurnStart.Call(); + AttackableCount = MaxAttackableCount; + IsFirstTurn = false; + IsSummonDrunkenness = false; + } + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + skillProcessor.Register(Skills.CreateTurnStartInfo(skillProcessor, playerInfoPair)); + return Skills.RegisterAndProcessWhenTurnStartImmediateInfo(new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer)); + } + + public virtual VfxBase OpponentTurnStart(SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + skillProcessor.Register(Skills.CreateTurnStartInfo(skillProcessor, playerInfoPair)); + return Skills.RegisterAndProcessWhenTurnStartImmediateInfo(new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer)); + } + + public virtual void Necromance(BattleCardBase necromanceCard, SkillProcessor skillProcessor, int necromanceCount) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + skillProcessor.Register(Skills.CreateNecromanceInfo(necromanceCard, skillProcessor, playerInfoPair, necromanceCount)); + } + + public virtual VfxBase TurnEndPostProcess() + { + return NullVfx.GetInstance(); + } + + public virtual void TurnEndSkillProcess(SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + skillProcessor.Register(Skills.CreateTurnEndInfo(skillProcessor, playerInfoPair)); + ThisTurnSkillActivatedCount = 0; + } + + public void CheckPreviousTurnAttacked() + { + if (SelfBattlePlayer.IsSelfTurn && IsInplay) + { + IsPreviousTurnAttacked = AttackableCount < MaxAttackableCount; + } + } + + public virtual VfxBase Draw(Vector3 Pos) + { + return VfxCreator.CreateDraw(Pos, IsLegend); + } + + public virtual VfxBase Moving(Vector3 Pos) + { + return VfxCreator.CreateMoving(Pos); + } + + protected virtual VfxBase StartPlayCard() + { + foreach (BattleCardBase handCard in SelfBattlePlayer.HandCardList) + { + if (handCard != this) + { + handCard.BattleCardView.areArrowsForcedOff = false; + handCard.BattleCardView.UpdateMovability(); + } + } + if (!GameMgr.GetIns().IsNewReplayBattle) + { + SelfBattlePlayer.CantPlayChoiceBrave = false; + SelfBattlePlayer.BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + BattleCardView.HideHandCardInfo(); + return NullVfx.GetInstance(); + } + + public VfxWith PlayCard(SkillProcessor skillProcessor, SkillConditionCheckerOption option, bool isInplayGeneration = false, BattleCardBase originalCard = null) + { + SequentialVfxPlayer sequentialVfx = SequentialVfxPlayer.Create(); + IsSummonDrunkenness = true; + AttackableCount = MaxAttackableCount; + VfxBase instance = NullVfx.GetInstance(); + if (!IsChoiceBraveSkillCard) + { + int useCost = Cost; + if (CheckConditionFixedUseCost(isPrePlay: true)) + { + useCost = CalcFixedUseCost(SelfBattlePlayer.Pp); + List list = Skills.Where((SkillBase s) => s is Skill_pp_fixeduse && !(s as Skill_pp_fixeduse).IsAccelerateOrCrystallize).ToList(); + SkillBase item = list.SingleOrDefault((SkillBase s) => (s as Skill_pp_fixeduse)._fixedUsePP == useCost); + ExecutedFixedUseCostIndex = list.IndexOf(item); + } + instance = SelfBattlePlayer.UsePp(useCost); + _playedCost = useCost; + _lastCost = useCost; + SelfBattlePlayer.SummonedCards.Add(this); + } + else + { + instance = SelfBattlePlayer.UseBp(Cost, BaseParameter.IsVariableCost, IsPlayer); + _playedCost = Cost; + } + VfxBase vfxBase = StartPlayCard(); + sequentialVfx.Register(ParallelVfxPlayer.Create(instance, vfxBase)); + sequentialVfx.Register(SetUpInplay()); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + VfxWith vfxWith = (isInplayGeneration ? new VfxWith(NullVfx.GetInstance(), null) : Skills.CreateWhenPlayInfo(this, skillProcessor, playerInfoPair, option)); + VfxBase allFuncVfxResults = this.OnPlay.GetAllFuncVfxResults(); + sequentialVfx.Register(allFuncVfxResults); + sequentialVfx.Register(vfxWith.Vfx); + SelfBattlePlayer.CallOnPlayCard((originalCard != null) ? originalCard : this, this, IsChoiceBraveSkillCard); + SelfBattlePlayer.AddRallyCount(SelfBattlePlayer.SummonedCards.Where((BattleCardBase c) => c.IsInplay && c.IsUnit).Count()); + sequentialVfx.Register(InstantVfx.Create(delegate + { + if (SelfBattlePlayer.HandCardList.Count <= 0) + { + sequentialVfx.Register(SelfBattlePlayer.BattleView.HandUnfocus()); + } + })); + sequentialVfx.Register(InstantVfx.Create(delegate + { + MotionUtils.SetLayerAll(BattleCardView.CardTemplate.CardNormalTemp.gameObject, 10); + })); + return new VfxWith(sequentialVfx, vfxWith.Value); + } + + public virtual VfxWith PlayChoiceCard(SkillProcessor skillProcessor, SkillConditionCheckerOption option) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + return Skills.CreateWhenChoicePlayInfo(skillProcessor, playerInfoPair, option); + } + + public VfxBase FinishWhenPlaySkill() + { + VfxBase[] allFuncCallResults = this.OnFinishWhenPlaySkill.GetAllFuncCallResults(); + if (allFuncCallResults.IsNotNullOrEmpty()) + { + return SequentialVfxPlayer.Create(allFuncCallResults); + } + return null; + } + + public virtual VfxBase DestroyInPlay(SkillProcessor skillProcessor, bool useDestroy = true, SkillBase destroyedSkill = null) + { + if (IsDead) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (IsChoiceEvolutionCard) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + UpdateBuildInfoAndSkillCollection(BaseParameter.BaseCardId, BaseParameter.IsFoil, isNotUpdateAtkLife: true); + })); + } + sequentialVfxPlayer.Register(RemoveFromInPlay()); + VfxBase allFuncVfxResults = this.OnDestroy.GetAllFuncVfxResults(this, skillProcessor); + if (!SelfBattlePlayer.ClassAndInPlayCardList.Contains(this)) + { + DeathTypeInfo.WhenDestroy = Skills._skillTimingInfo.IsWhenDestroy; + VfxBase vfx = VfxCreator.CreateDestroy(DeathTypeInfo, SelfBattlePlayer); + sequentialVfxPlayer.Register(vfx); + } + sequentialVfxPlayer.Register(allFuncVfxResults); + BattlePlayerBase battlePlayerBase = (SelfBattlePlayer.IsSelfTurn ? SelfBattlePlayer : OpponentBattlePlayer); + DestroyedTurn = battlePlayerBase.Turn; + IsDestroySelfTurn = battlePlayerBase.IsPlayer; + return sequentialVfxPlayer; + } + return NullVfx.GetInstance(); + } + + public virtual VfxBase DestroyInHand(SkillProcessor skillProcessor) + { + BattlePlayerBase battlePlayerBase = (SelfBattlePlayer.IsSelfTurn ? SelfBattlePlayer : OpponentBattlePlayer); + DestroyedTurn = battlePlayerBase.Turn; + IsDestroySelfTurn = battlePlayerBase.IsPlayer; + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(StopSpellCharge()); + VfxBase allFuncVfxResults = this.OnDestroy.GetAllFuncVfxResults(this, skillProcessor); + if (!SelfBattlePlayer.HandCardList.Contains(this)) + { + VfxBase vfx = VfxCreator.CreateDestroyHand(DeathTypeInfo, SelfBattlePlayer); + BattleCardView.HideCanPlayEffect(); + sequentialVfxPlayer.Register(vfx); + } + sequentialVfxPlayer.Register(allFuncVfxResults); + return sequentialVfxPlayer; + } + + public virtual VfxBase Banish(SkillProcessor skillProcessor, bool isReturn = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (IsChoiceEvolutionCard) + { + if (isReturn) + { + UpdateBuildInfoAndSkillCollection(BaseParameter.BaseCardId, BaseParameter.IsFoil); + if (!SelfBattlePlayer.BattleMgr.IsRecovery || IsPlayer) + { + BattleCardView.CardTemplate.NormalNameLabelTemp.text = BaseParameter.CardName; + Global.SetRepositionNameLabel(BattleCardView.CardTemplate.NormalNameLabelTemp, BaseParameter.CardName, is2D: false); + } + } + else + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + UpdateBuildInfoAndSkillCollection(BaseParameter.BaseCardId, BaseParameter.IsFoil, isNotUpdateAtkLife: true); + })); + } + } + sequentialVfxPlayer.Register(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor)); + if (!isReturn) + { + sequentialVfxPlayer.Register(VfxCreator.CreateBanish(DeathTypeInfo, SelfBattlePlayer)); + } + return sequentialVfxPlayer; + } + + public virtual VfxWithLoading BanishInHand(SkillProcessor skillProcessor) + { + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor)); + if (!SelfBattlePlayer.HandCardList.Contains(this)) + { + vfxWithLoadingSequential.RegisterVfxWithLoading(VfxCreator.CreateBanishHand(DeathTypeInfo, SelfBattlePlayer)); + } + return vfxWithLoadingSequential; + } + + public virtual VfxBase BanishInDeck(SkillProcessor skillProcessor) + { + return this.OnBanish.GetAllFuncVfxResults(this, skillProcessor); + } + + public virtual VfxBase GetOn(Transform vehicleCardTrans, IBattleCardView vehicleCardView, SkillProcessor skillProcessor, bool isReturn = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(this.OnGetOn.GetAllFuncVfxResults(this, skillProcessor)); + sequentialVfxPlayer.Register(VfxCreator.CreateGeton(vehicleCardTrans, vehicleCardView, DeathTypeInfo, SelfBattlePlayer)); + return sequentialVfxPlayer; + } + + public virtual VfxBase UniteInPlay(SkillProcessor skillProcessor, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(LoseSkill()); + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop()); + sequentialVfxPlayer.Register(RemoveFromInPlay()); + sequentialVfxPlayer.Register(SelfBattlePlayer.UniteCard(this, skillProcessor, skill)); + sequentialVfxPlayer.Register(VfxCreator.CreateBanish(DeathTypeInfo, SelfBattlePlayer)); + return sequentialVfxPlayer; + } + + public virtual VfxWithLoading FusionMaterialized(SkillProcessor skillProcessor, BattleCardBase fusionCard, bool isFusionMetamorphose) + { + fusionCard.SkillApplyInformation.AddFusionIngredientCard(this); + FusionedTurn = SelfBattlePlayer.Turn; + DeathTypeInfo.UseFusionIngredient = true; + DeathTypeInfo.UseFusionMetamorphoseIngredient = isFusionMetamorphose; + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor)); + vfxWithLoadingSequential.RegisterVfxWithLoading(VfxCreator.CreateFusionHand(SelfBattlePlayer, fusionCard.BattleCardView, isFusionMetamorphose)); + return vfxWithLoadingSequential; + } + + public virtual VfxBase Metamorphose(SkillProcessor SkillProcessor) + { + return this.OnMetamorphose.GetAllFuncVfxResults(this, SkillProcessor); + } + + public VfxWithLoadingSequential SkillPlayCard(bool isPlayer, SkillBaseSummon.SUMMON_TYPE summonType, SkillProcessor skillProcessor, SkillBase skill, bool isGetoff = false, bool isReanimate = false) + { + _lastCost = Cost; + VfxBase vfxBase = SelfBattlePlayer.PickCard(this, skill, summonType, isGetoff, isReanimate); + VfxBase vfxBase2 = SetUpInplay(); + IsReanimate = isReanimate; + if (summonType == SkillBaseSummon.SUMMON_TYPE.HAND) + { + skillProcessor.Register(Skills.CreateWhenHandToNotPlayInfo(skillProcessor, new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer), new SkillConditionCheckerOption())); + } + return VfxWithLoadingSequential.Create(vfxBase, vfxBase2); + } + + public VfxBase StartHandEffect() + { + if (SelfBattlePlayer.IsPlayer || GameMgr.GetIns().IsAdminWatch) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (SpellChargeCount > 0 && HasSpellCharge && IsInHand) + { + sequentialVfxPlayer.Register(new HandEffectLoopStartVfx(BattleCardView, () => IsActionCard, HandEffectLoopStartVfx.HandEffectType.SpellCharge)); + } + return sequentialVfxPlayer; + } + return NullVfx.GetInstance(); + } + + public virtual VfxBase RecoveryAttackCount() + { + AttackableCount = MaxAttackableCount; + return InstantVfx.Create(delegate + { + BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect(); + }); + } + + public virtual VfxBase StopSpellCharge() + { + return new HandEffectLoopEndVfx(BattleCardView); + } + + public virtual VfxBase CreateMoveToHandVfx() + { + if (IsPlayer) + { + return new PlayerDrawCardToHandVfx(this); + } + return NullVfx.GetInstance(); + } + + public VfxBase CreateShowLogVfx(float time, SkillBase skill, bool isEvolve, string SkillDescription) + { + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SHOW_SIDE_LOG)) + { + BattlePlayerBase.SideLogInfo sideLogInfo = new BattlePlayerBase.SideLogInfo(skill); + return new ShowSideLogVfx(this, skill, SelfBattlePlayer.BattleView.GetSideLogControl(isSkillTargetSelect: false), (SkillDescription == string.Empty) ? GetCardSkillDescription(sideLogInfo, isEvolve) : SkillDescription, time, isEvol: false, sideLogInfo); + } + return NullVfx.GetInstance(); + } + + public virtual AttackOpponentResult AttackOpponent(BattleCardBase target, DamageParam damageParam, SkillProcessor skillProcessor, bool IsChallenge) + { + return new AttackOpponentResult(NullVfx.GetInstance(), NullVfx.GetInstance(), null); + } + + public void SetOnMove(bool move) + { + IsOnMove = move; + } + + public void SetOnDraw(bool draw) + { + IsOnDraw = draw; + } + + public IEnumerable GetSelectTypeSkill(bool isEvolve = false, bool isFusion = false, bool isRegister = false, bool isEvolutionSimpleProcessor = false, bool isChoiceCheck = false) + { + SkillCollectionBase skillCollectionBase = (isEvolve ? EvolutionSkills : Skills); + NetworkBattleManagerBase networkBattleManagerBase = SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase; + GameMgr ins = GameMgr.GetIns(); + if (!ins.IsAdminWatch && !ins.IsAINetwork && networkBattleManagerBase != null) + { + NetworkBattleReceiver.ReceiveData receiveData = networkBattleManagerBase.networkBattleData.GetReceiveData(); + if (Index == receiveData.playCardIndex && !isEvolutionSimpleProcessor && !isChoiceCheck) + { + List list = new List(); + for (int i = 0; i < receiveData.OpponentTargetDataList.Count; i++) + { + list.AddRange(receiveData.OpponentTargetDataList[i].SelectSkillIndexList); + } + list = list.Distinct().ToList(); + if (list.Count > 0) + { + List list2 = new List(); + for (int j = 0; j < list.Count; j++) + { + if (list[j] < skillCollectionBase.Count()) + { + list2.Add(skillCollectionBase.ElementAt(list[j])); + continue; + } + LocalLog.AccumulateTraceLog("SelectSkillIndex " + list[j] + " out of range. CardId:" + CardId + " &&" + StackTraceUtility.ExtractStackTrace()); + } + return list2; + } + } + } + BattlePlayerReadOnlyInfoPair readOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + BattleCardBase battleCardBase = SelfBattlePlayer.Class; + bool isActivateFanfare = (!IsUnit || !battleCardBase.SkillApplyInformation.IsCantActivateFanfareUnit) && (!IsField || !battleCardBase.SkillApplyInformation.IsCantActivateFanfareField); + IEnumerable selectTypeSkill = skillCollectionBase.GetSelectTypeSkill(isEvolve, isFusion, isActivateFanfare, readOnlyInfoPair); + if (isRegister && SelfBattlePlayer.BattleMgr is NetworkBattleManagerBase networkBattleManagerBase2) + { + for (int k = 0; k < selectTypeSkill.Count(); k++) + { + networkBattleManagerBase2.AddRegisterSelectTypeSkillIndexList(skillCollectionBase.IndexOf(selectTypeSkill.ElementAt(k))); + } + } + return selectTypeSkill; + } + + public virtual VfxBase StartAttack(BattleCardBase underAttackCard, BattlePlayerPair battlePlayerPair) + { + return NullVfx.GetInstance(); + } + + public virtual DamageResult ApplyDamage(SkillBase skill, DamageParam damage, bool doesAttackerPossessKiller, bool isReflectedDamage, SkillProcessor skillProcessor, BattleCardBase reflectCard) + { + DamagedCounter.AddDamageCount(SelfBattlePlayer.IsSelfTurn); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (this.OnDamageAfter != null) + { + sequentialVfxPlayer.Register(this.OnDamageAfter.GetAllFuncVfxResults(skillProcessor)); + } + if (reflectCard != null && reflectCard.OnReflectionAfter != null) + { + sequentialVfxPlayer.Register(reflectCard.OnReflectionAfter.GetAllFuncVfxResults(skillProcessor)); + } + BattleCardBase battleCardBase = damage.OwnerCard.SelfBattlePlayer.Class; + if (battleCardBase != damage.OwnerCard && battleCardBase.SkillApplyInformation.AddDamageList.Count() > 0 && battleCardBase.OnGiveDamage != null) + { + sequentialVfxPlayer.Register(battleCardBase.OnGiveDamage.GetAllFuncVfxResults(skillProcessor)); + } + if (damage.OwnerCard.OnGiveDamage != null) + { + sequentialVfxPlayer.Register(damage.OwnerCard.OnGiveDamage.GetAllFuncVfxResults(skillProcessor)); + } + return new DamageResult(sequentialVfxPlayer, 0, 0); + } + + public virtual HealResult ApplyHealing(HealParam healParam, SkillProcessor skillProcessor) + { + return new HealResult(-1, NullVfx.GetInstance()); + } + + protected VfxBase CreateVfxWithCardPlayabilityRefresh(VfxBase originalVfx) + { + return SequentialVfxPlayer.Create(originalVfx, InstantVfx.Create(delegate + { + SelfBattlePlayer.UpdateHandCardsPlayability(); + })); + } + + public virtual VfxBase Evolution(bool isSkill, SkillProcessor skillProcessor, SkillConditionCheckerOption option, Func getEvolveVfxFunc = null) + { + return NullVfx.GetInstance(); + } + + public void CallOnFusionEvent(List ingredientCards) + { + this.OnFusionEvent.Call(ingredientCards); + } + + public VfxBase Fusion(SkillProcessor skillProcessor, List ingredientCards, bool isFusionMetamorphose) + { + if (!isFusionMetamorphose) + { + SetActiveSkillCount(); + } + skillProcessor.Register(Skills.CreateWhenFusionInfo(ingredientCards, skillProcessor, new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer))); + for (int i = 0; i < ingredientCards.Count; i++) + { + skillProcessor.Register(ingredientCards[i].Skills.CreateWhenFusionedInfo(skillProcessor, new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer))); + } + BattlePlayerBase battlePlayerBase = (IsSelfTurn ? SelfBattlePlayer : OpponentBattlePlayer); + BattlePlayerBase obj = (IsSelfTurn ? OpponentBattlePlayer : SelfBattlePlayer); + battlePlayerBase.StartSkillWhenFusionOther(ingredientCards, skillProcessor); + obj.StartSkillWhenFusionOther(ingredientCards, skillProcessor); + return NullVfx.GetInstance(); + } + + public virtual void InitializeParameterOnWhenReturn() + { + InitSkillApplyInformationOnWhenReturn(); + } + + protected virtual void InitSkillApplyInformationOnWhenReturn() + { + SkillApplyInformation.InitializeInformation(isReturnCard: true); + SkillApplyInformation.ClearParameterModifier(); + ClearCostModifier(); + TransformInfo = default(TransformInformation); + int normalIndividualId = NormalIndividualId; + int evolutionIndividualId = EvolutionIndividualId; + SkillApplyInformation.AttachedSkillsInfo.Clear(); + _normalSkillCollection.Clear(); + _evolveSkillCollection.Clear(); + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(CardMaster.GetInstanceForBattle().GetCardParameterFromId(CardId)); + _buildInfo.NormalSkillBuildInfos = cardSkillsBuildInfo.normalSkillBuildInfos; + _buildInfo.EvolveSkillBuildInfos = cardSkillsBuildInfo.evolveSkillBuildInfos; + foreach (SkillBase item in CreateSkillCondition(cardSkillsBuildInfo.normalSkillBuildInfos, SelfBattlePlayer, OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _normalSkillCollection.Add(item); + item.SetInductionVoiceIndex(); + item.SetIndividualId(normalIndividualId); + } + foreach (SkillBase item2 in CreateSkillCondition(cardSkillsBuildInfo.evolveSkillBuildInfos, SelfBattlePlayer, OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _evolveSkillCollection.Add(item2); + item2.SetInductionVoiceIndex(); + item2.SetIndividualId(evolutionIndividualId); + } + Skills = _normalSkillCollection; + Skills.Complete(); + } + + public virtual VfxBase ReturnCard(SkillProcessor skillProcessor) + { + if (IsChoiceEvolutionCard) + { + ResetChoiceEvolutionCardBuildInfo(); + } + InitSkill(); + SpellChargeCount = 0; + SkillApplyInformation.ForceDepriveChantCount(); + SkillApplyInformation.ForceDepriveBuffLife(); + _skillActivatedCount = 1; + ThisTurnSkillActivatedCount = 0; + VfxBase[] allFuncCallResults = this.OnReturnCard.GetAllFuncCallResults(this, skillProcessor); + ClearCostModifier(); + BattleCardView.InitHandParameter(); + UpdateCostViewStrategy(isForceUpdate: true); + BattleCardView.UpdateCost(BattleCardView.GetUseCostList(BaseParameter.Cost), isGenerateInHand: false); + ClearBuffInfo(); + ResetPlayedCost(); + ResetLastCost(); + ExecutedFixedUseCostIndex = -1; + IsExecutedEarthRite = false; + IsSkillLost = false; + IsReanimate = false; + DamagedCounter.Clear(); + GetOffCards.Clear(); + ResetUpdateBuildInfo(); + return ParallelVfxPlayer.Create(allFuncCallResults); + } + + public void FlagCardAsDestroyedByKiller() + { + IsDestroyedByKiller = true; + DeathTypeInfo.DestroyedByKiller = true; + } + + public virtual void ResetFlagCardAsDestroyed() + { + IsDestroyedBySkill = false; + IsDestroyedByKiller = false; + } + + public virtual void FlagCardAsDestroyedBySkill() + { + IsDestroyedBySkill = true; + } + + public VfxBase CreateMaskCardInPlayVfx() + { + return VfxCreator.CreateMaskCardInPlay(); + } + + public void AddCostModifier(ICardCostModifier modifier, SkillBase skill, bool eventCall = true) + { + if (eventCall && skill != null) + { + this.OnAddCostState.Call(skill, modifier); + } + if (modifier.IsClearBeforeModifier) + { + CostModifierList.RemoveAll((ICardCostModifier c) => !c.IsResidentModifier); + } + CostModifierList.Add(modifier); + } + + public void RemoveCostModifier(SkillBase skill, ICardCostModifier modifier) + { + this.OnRemoveCostState.Call(skill, modifier); + CostModifierList.Remove(modifier); + } + + public void ClearCostModifier() + { + CostModifierList.Clear(); + } + + public int CalculateFinalDamageAmount(int damageAmount, bool isSkillDamage = false, bool isSpellDamage = false, ParallelVfxPlayer lifeLowerLimitEffectVfx = null) + { + bool flag = !isSkillDamage && !isSpellDamage; + if (SkillApplyInformation.IsShieldAll || (isSkillDamage && SkillApplyInformation.IsShieldSkill) || (isSpellDamage && SkillApplyInformation.IsShieldSpell) || (flag && SkillApplyInformation.IsShieldAttack)) + { + return 0; + } + damageAmount -= SkillApplyInformation.GetDamageCutAmount(isSkillDamage ? DamageCutInfo.DamageType.SKILL : DamageCutInfo.DamageType.ALL); + damageAmount = SkillApplyInformation.GetClippingDamage(damageAmount, lifeLowerLimitEffectVfx); + return Mathf.Max(damageAmount, 0); + } + + public int HealLife(int healAmount, int turn, bool isSelfTurn) + { + int life = Life; + SkillApplyInformation.HealLife(healAmount, turn, isSelfTurn); + return Life - life; + } + + public virtual string GetCardSkillDescription(BattlePlayerBase.SideLogInfo sideLogInfo, bool? isForceGetEvolveText = null) + { + return SkillDescription(sideLogInfo); + } + + public VfxBase LoseSkill(SkillBase loseSkill = null, SkillProcessor skillProcessor = null) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + IsSkillLost = true; + AttackableCount = ((AttackableCount >= MaxAttackableCount) ? 1 : 0); + NormalSkills.Clear(); + NormalSkills.InitTimingInfo(); + EvolutionSkills.Clear(); + EvolutionSkills.InitTimingInfo(); + SkillApplyInformation.AttachedSkillsInfo.Clear(); + SkillApplyInformation.AttachedSkillsInfo.AttachedSkills.InitTimingInfo(); + _buildInfo.NormalSkillBuildInfos.Clear(); + _buildInfo.EvolveSkillBuildInfos.Clear(); + parallelVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop()); + SkillApplyInformation.InitializeInformationWithoutLifeOffenseModifier(); + parallelVfxPlayer.Register(ParallelVfxPlayer.Create(this.OnLoseSkillOneTime.GetAllFuncCallResults(loseSkill, skillProcessor, this))); + this.OnLoseSkillOneTime = null; + RemoveBuffInfo((BuffInfo buff) => !(buff.SkillFrom is Skill_powerup) && !(buff.SkillFrom is Skill_power_down)); + parallelVfxPlayer.Register(BattleCardView.InitializeBattleCardIcon(this, Skills)); + if (IsFirstTurn) + { + IsSummonDrunkenness = true; + } + else + { + IsSummonDrunkenness = false; + } + bool isSelfTurn = SelfBattlePlayer.IsSelfTurn; + return SequentialVfxPlayer.Create(parallelVfxPlayer, SkillApplyInformation.AllSkillEffectRestart(), InstantVfx.Create(delegate + { + BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect(null, isSelfTurn); + })); + } + + public CopySkillInfo CopySkill(BattleCardBase targetCard, string copySkillType, bool isRemain) + { + SkillFilterCreator.ContentKeyword skillType = (SkillFilterCreator.ContentKeyword)Enum.Parse(typeof(SkillFilterCreator.ContentKeyword), copySkillType, ignoreCase: true); + List copySkills = GetCopySkill(targetCard.Skills, skillType); + bool isEvolutionSkill = targetCard.EvolutionSkills.Any((SkillBase skill) => skill == copySkills.FirstOrDefault()); + int num = 0; + List list = new List(); + foreach (SkillBase item in copySkills) + { + if (!isRemain) + { + targetCard.Skills.Remove(item); + if (!targetCard.IsEvolution) + { + List list2 = new List(); + foreach (SkillBase evolutionSkill in targetCard.EvolutionSkills) + { + if (item.IsSameSkill(evolutionSkill)) + { + list2.Add(evolutionSkill); + } + } + foreach (SkillBase item2 in list2) + { + targetCard.EvolutionSkills.Remove(item2); + } + } + } + if (item.GetAttachSkill == null) + { + num++; + } + } + List copiedSkillBuildInfoList = new List(); + if (num > 0) + { + string timing = skillType.ToStringCustom(); + copiedSkillBuildInfoList.AddRange(SettingRobSkillInfo(targetCard, timing, targetCard.IsEvolution, isRemain)); + } + foreach (SkillBase item3 in _normalSkillCollection) + { + if (item3.GetAttachSkill != null) + { + list.Add(item3); + } + } + _normalSkillCollection.Clear(); + _evolveSkillCollection.Clear(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop()); + CombineVirtualCardSkill(this); + AttachedSkillInformation attachedSkillsInfo = targetCard.SkillApplyInformation.AttachedSkillsInfo; + List copySkill = GetCopySkill(attachedSkillsInfo.AttachedSkills, skillType); + List list3 = new List(); + foreach (SkillBase item4 in copySkill) + { + int index = attachedSkillsInfo.AttachedSkills.IndexOf(item4); + Skill_attach_skill creatorSkill = attachedSkillsInfo.CreatorSkillList[index] as Skill_attach_skill; + string text = attachedSkillsInfo.OwnerCardNameList[index]; + int num2 = attachedSkillsInfo.OwnerCardIdList[index]; + long duplicateBanNum = attachedSkillsInfo.DuplicateBanNum[index]; + if (isRemain) + { + SkillBase attachSkill = targetCard.SkillApplyInformation.CloneAttachSkill(SkillApplyInformation as SkillApplyInformation, creatorSkill); + SkillBase.BuffInfoContainer buffInfo = creatorSkill.GetBuffInfo(targetCard); + if (buffInfo != null) + { + buffInfo = buffInfo.Clone(); + buffInfo._targetCard = this; + buffInfo._attachSkill = attachSkill; + buffInfo._buffInfo = buffInfo._buffInfo.Clone(); + buffInfo._buffInfo.IsCopied = true; + buffInfo._buffInfo.IsCopiedEvolutionSkill = creatorSkill.SkillPrm.ownerCard.EvolutionSkills.Any((SkillBase s) => s == creatorSkill); + buffInfo._buffInfo.SetPreviousOwner(creatorSkill.SkillPrm.ownerCard); + AddBuffInfo(buffInfo._buffInfo); + creatorSkill.AddBuffInfo(buffInfo); + list3.Add(buffInfo._buffInfo); + } + else + { + BuffInfo buffInfo2 = creatorSkill.AddBuffInfoIfNeeded(this); + buffInfo2.SetPreviousOwner(creatorSkill.SkillPrm.ownerCard); + buffInfo2.IsCopied = true; + buffInfo2.IsCopiedEvolutionSkill = creatorSkill.SkillPrm.ownerCard.EvolutionSkills.Any((SkillBase s) => s == creatorSkill); + buffInfo = new SkillBase.BuffInfoContainer(this, buffInfo2, -1, "", null, 0L); + buffInfo._attachSkill = attachSkill; + creatorSkill.AddBuffInfo(buffInfo); + list3.Add(buffInfo._buffInfo); + } + } + else + { + int index2 = attachedSkillsInfo.CreatorSkillIndexList[index]; + item4.SkillPrm.ownerCard = this; + item4.SkillPrm.selfBattlePlayer = SelfBattlePlayer; + item4.SkillPrm.opponentBattlePlayer = OpponentBattlePlayer; + SkillApplyInformation.AttachSkill(item4.SkillPrm.buildInfo, item4.SkillPrm.resourceMgr, text, num2, duplicateBanNum, creatorSkill); + targetCard.SkillApplyInformation.AttachedSkillsInfo.Remove(item4, text, num2, duplicateBanNum, creatorSkill, index2); + SkillBase.BuffInfoContainer buffInfoContainer = creatorSkill.PopBuffInfo(targetCard); + if (buffInfoContainer == null) + { + CardParameter baseParameter = creatorSkill.SkillPrm.ownerCard.BaseParameter; + BuffInfo buffInfo3 = new BuffInfo(baseParameter.BaseCardId, baseParameter.NormalCardId, creatorSkill); + buffInfoContainer = new SkillBase.BuffInfoContainer(targetCard, buffInfo3, -1, "", null, 0L); + } + buffInfoContainer._buffInfo.IsCopied = true; + buffInfoContainer._buffInfo.IsCopiedEvolutionSkill = creatorSkill.SkillPrm.ownerCard.EvolutionSkills.Any((SkillBase s) => s == creatorSkill); + buffInfoContainer._buffInfo.SetPreviousOwner(creatorSkill.SkillPrm.ownerCard); + targetCard.RemoveBuffInfo(buffInfoContainer._buffInfo); + buffInfoContainer._targetCard = this; + AddBuffInfo(buffInfoContainer._buffInfo); + creatorSkill.AddBuffInfo(buffInfoContainer); + list3.Add(buffInfoContainer._buffInfo); + } + } + Skills.Complete(); + SetActiveSkillCount(); + targetCard.SkillApplyInformation.AttachedSkillsInfo.AttachedSkills.InitTimingInfo(); + SkillApplyInformation.AttachedSkillsInfo.AttachedSkills.InitTimingInfo(); + targetCard.NormalSkills.InitTimingInfo(); + NormalSkills.InitTimingInfo(); + targetCard.EvolutionSkills.InitTimingInfo(); + EvolutionSkills.InitTimingInfo(); + sequentialVfxPlayer.Register(targetCard.BattleCardView.InitializeBattleCardIcon(targetCard, targetCard.Skills)); + sequentialVfxPlayer.Register(BattleCardView.InitializeBattleCardIcon(this, Skills)); + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectRestart()); + this.OnCopySkillComplete.Call(this); + SkillBaseCopy copySkill2 = Skills.Where((SkillBase s) => s is SkillBaseCopy && s.OptionValue.GetString(SkillFilterCreator.ContentKeyword.ability, "NONE") == skillType.ToString()).FirstOrDefault() as SkillBaseCopy; + List copiedSkillList = Skills.Where((SkillBase s) => copiedSkillBuildInfoList.Contains(s.SkillPrm.buildInfo)).ToList(); + return new CopySkillInfo(sequentialVfxPlayer, isEvolutionSkill, copySkill2, copiedSkillList, list3); + } + + private List SettingRobSkillInfo(BattleCardBase targetCard, string timing, bool isEvolution, bool isRemain) + { + List list = new List(); + bool flag = false; + List list2 = (isEvolution ? targetCard._buildInfo.EvolveSkillBuildInfos : targetCard._buildInfo.NormalSkillBuildInfos); + foreach (SkillCreator.SkillBuildInfo skillInfo in list2) + { + if (!(skillInfo._timing == timing)) + { + continue; + } + flag = true; + _buildInfo.NormalSkillBuildInfos.Add(skillInfo); + if (_buildInfo.EvolveSkillBuildInfos.IsNotNullOrEmpty()) + { + _buildInfo.EvolveSkillBuildInfos.Add(skillInfo); + } + if (skillInfo._previousSkillOwner == null) + { + skillInfo._previousSkillOwner = targetCard; + } + OnRemoveFromInPlayAfterOneTime += delegate + { + if (!IsDead) + { + _buildInfo.NormalSkillBuildInfos.Remove(skillInfo); + if (_buildInfo.EvolveSkillBuildInfos.Contains(skillInfo)) + { + _buildInfo.EvolveSkillBuildInfos.Remove(skillInfo); + } + } + return NullVfx.GetInstance(); + }; + list.Add(skillInfo); + } + if (flag || !isEvolution) + { + if (!isRemain) + { + list2.RemoveAll((SkillCreator.SkillBuildInfo b) => b._timing == timing); + } + } + else + { + list.AddRange(SettingRobSkillInfo(targetCard, timing, isEvolution: false, isRemain)); + } + return list; + } + + private List GetCopySkill(SkillCollectionBase skills, SkillFilterCreator.ContentKeyword skillType) + { + List list = new List(); + foreach (SkillBase skill in skills) + { + switch (skillType) + { + case SkillFilterCreator.ContentKeyword.when_destroy: + if (skill.IsWhenDestroySkill) + { + list.Add(skill); + } + break; + case SkillFilterCreator.ContentKeyword.when_attack: + if (skill.IsBeforAttackSkill) + { + list.Add(skill); + } + break; + case SkillFilterCreator.ContentKeyword.when_fight: + if (skill.IsWhenFightSkill) + { + list.Add(skill); + } + break; + } + } + return list; + } + + public virtual VfxBase RemoveFromInPlay() + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + if (!IsClass) + { + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + BattleCardView.BattleCardIconAnimations.ClearAllSkillIcons(); + })); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + BattleCardView.HideAttackFinished(); + })); + } + return parallelVfxPlayer; + } + + public virtual VfxBase RemoveFromInPlayAfter(SkillProcessor skillProcessor, bool isReturn = false) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(this.OnRemoveFromInPlayAfterOneTime.GetAllFuncCallResults(isReturn, skillProcessor)); + this.OnRemoveFromInPlayAfterOneTime = null; + ParallelVfxPlayer parallelVfxPlayer2 = ParallelVfxPlayer.Create(this.OnLoseSkillOneTime.GetAllFuncCallResults(null, skillProcessor, this)); + this.OnLoseSkillOneTime = null; + return ParallelVfxPlayer.Create(parallelVfxPlayer, parallelVfxPlayer2); + } + + protected virtual ICardVfxCreator CreateVfxCreator(bool isPlayer, IBattleCardView battleCardView, bool isNullView) + { + if (isNullView) + { + return NullCardVfxCreator.GetInstance(); + } + return new CardVfxCreatorBase(isPlayer, this, battleCardView, _buildInfo.ResourceMgr); + } + + protected virtual ISkillApplyInformation CreateSkillApplyInformation(BattleCardBase card, ICardVfxCreator vfxCreator) + { + return new SkillApplyInformation(card, vfxCreator); + } + + public ParameterChangeInformation CreateParameterChangeInfo() + { + return new ParameterChangeInformation(Atk, BaseAtk, Life, MaxLife, BaseMaxLife); + } + + public void AddBuffInfo(BuffInfo buffInfo) + { + BuffInfoList.Add(buffInfo); + } + + public void InsertBuffInfo(BuffInfo buffInfo, int index) + { + if (index >= BuffInfoList.Count) + { + index = BuffInfoList.Count; + } + BuffInfoList.Insert(index, buffInfo); + } + + public void RemoveBuffInfo(BuffInfo buffInfo) + { + BuffInfoList.Remove(buffInfo); + } + + public void RemoveBuffInfo(Predicate condition) + { + BuffInfoList.RemoveAll(condition); + } + + public bool IsContainBuffInfo(BuffInfo buffInfo) + { + return BuffInfoList.Contains(buffInfo); + } + + public void ClearBuffInfo() + { + BuffInfoList.Clear(); + } + + public void ShallowCopyBuffInfoList(BattleCardBase originalCard) + { + BuffInfoList = originalCard.BuffInfoList; + this.OnResetCardParameter = originalCard.OnResetCardParameter; + } + + public VfxBase AfterAddDamage() + { + VfxBase allFuncVfxResults = this.OnAfterAddDamage.GetAllFuncVfxResults(); + this.OnAfterAddDamage = null; + return allFuncVfxResults; + } + + public virtual VfxBase SetUpInplay() + { + ResetCardParameter(); + IsFirstTurn = true; + SetOnMove(move: false); + AttackableCount = MaxAttackableCount; + IsSummonDrunkenness = true; + IsOnDraw = true; + SetActiveSkillCount(); + return NullVfx.GetInstance(); + } + + public void SetActiveSkillCount() + { + _normalSkillCollection.SetAndAddPublishedActiveSkillsCount(); + _evolveSkillCollection.SetAndAddPublishedActiveSkillsCount(); + } + + public virtual void ResetCardParameter() + { + IsDestroyedByKiller = false; + IsDestroyedBySkill = false; + DeathTypeInfo.DestroyedByKiller = false; + DeathTypeInfo.MysteriesDestroy = false; + DeathTypeInfo.WhenDestroy = false; + ClearCostModifier(); + this.OnResetCardParameter.Call(); + } + + public void ResetCardParameterInHand() + { + IsDestroyedByKiller = false; + IsDestroyedBySkill = false; + DeathTypeInfo.DestroyedByKiller = false; + DeathTypeInfo.MysteriesDestroy = false; + DeathTypeInfo.WhenDestroy = false; + } + + public HandCardFrameEffectType GetHandCardFrameEffectType() + { + return GetHandCardFrameEffectType(isNewReplayRecord: false); + } + + public HandCardFrameEffectType GetHandCardFrameEffectType(bool isNewReplayRecord) + { + HandCardFrameEffectType handCardFrameEffectType = HandCardFrameEffectType.NONE; + BattlePlayerReadOnlyInfoPair pair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + List list = new List(); + list.AddRange(NormalSkills); + list.AddRange(EvolutionSkills); + for (int i = 0; i < list.Count(); i++) + { + SkillBase skill = list[i]; + if (skill == null) + { + continue; + } + HandCardFrameEffectType handCardFrameEffectType2 = skill.SkillPrm.buildInfo._handCardFrameEffectType; + if ((handCardFrameEffectType < handCardFrameEffectType2 || (handCardFrameEffectType == HandCardFrameEffectType.LIGHT_BLUE && skill is Skill_pp_fixeduse)) && skill.VisualCheckCondition(pair, option, isPrePlay: true) && skill.PreprocessList.All((SkillPreprocessBase p) => p.IsRight(pair, option))) + { + handCardFrameEffectType = handCardFrameEffectType2; + if ((GameMgr.GetIns().IsWatchBattle || isNewReplayRecord) && handCardFrameEffectType == HandCardFrameEffectType.YELLOW && (skill.ConditionTargetFilter is SkillTargetDeckFilter || skill.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter c) => c.Text.Contains("deck") && RegisterSkillConditionCheck.IsSkillConditionCheck(skill)))) + { + handCardFrameEffectType = HandCardFrameEffectType.NONE; + } + } + } + return handCardFrameEffectType; + } + + protected string ConvertSkillDescription(string text, BattlePlayerBase.SideLogInfo sideLogInfo, bool isSkipOption, BuffInfo buff, string divergenceId, List skillDescriptionValueList, List replaySkillDescriptionValueList) + { + SelfBattlePlayer.SideLogSkill = sideLogInfo; + OpponentBattlePlayer.SideLogSkill = sideLogInfo; + bool num = sideLogInfo != null; + bool isRobBuff = buff != null && buff.IsCopied; + string text2 = (text.Contains("<<${") ? GetSkillDescriptionVariables(text) : text); + bool flag = IsInHand || (text2.Contains("{me.inplay.class.count}") && (text2.Contains(SkillFilterCreator.ContentKeyword.hand.ToString()) || text2.Contains(SkillFilterCreator.ContentKeyword.deck.ToString()))); + if (num && !isSkipOption && !IsPlayer && !GameMgr.GetIns().IsAdminWatch && flag) + { + isSkipOption = true; + } + Action setupOptionValue = (isSkipOption ? null : ((Action)delegate(SkillOptionValue optionValue) + { + BattleCardBase battleCardBase = ((!isRobBuff) ? this : ((buff.SkillFrom != null) ? buff.SkillFrom.SkillPrm.ownerCard : buff.OwnerCard)); + bool flag2 = isRobBuff && SelfBattlePlayer != battleCardBase.SelfBattlePlayer; + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(flag2 ? OpponentBattlePlayer : SelfBattlePlayer, flag2 ? SelfBattlePlayer : OpponentBattlePlayer); + SkillBase skill = null; + if (text.Contains(SkillFilterCreator.ContentKeyword.is_individual.ToString())) + { + skill = SelfBattlePlayer.Class.Skills.FirstOrDefault((SkillBase s) => s.HasIndividualId && s.IsAttachedSkill && s.GetAttachSkill.SkillPrm.ownerCard.Index == Index); + } + SkillCollectionBase.SetupOptionValue(optionValue, playerInfoPair, battleCardBase, skill); + })); + string result = ConvertSkillDescriptionText(text, setupOptionValue, IsPlayer, divergenceId, skillDescriptionValueList, replaySkillDescriptionValueList); + SelfBattlePlayer.SideLogSkill = null; + OpponentBattlePlayer.SideLogSkill = null; + return result; + } + + private string GetSkillDescriptionVariables(string originalText) + { + if (originalText == null || originalText == string.Empty) + { + return string.Empty; + } + string text = string.Empty; + string text2 = originalText; + int num = 0; + while (true) + { + num++; + if (num >= 21) + { + Debug.LogError("Maybe infinity loop. OriginalText=" + originalText); + break; + } + string variableNumberText = GetVariableNumberText(text2); + if (variableNumberText == string.Empty) + { + break; + } + if (variableNumberText.Contains('?')) + { + List list = variableNumberText.Split('?').ToList(); + text2 = text2.Replace("<<" + list[0] + "?" + list[1] + "?" + list[2] + ">>", string.Empty); + text = text + list[1] + list[2]; + } + } + return text; + } + + private static string GetDefaultValue(string expression) + { + if (expression.Contains(SkillFilterCreator.ContentKeyword.union_burst_count.ToStringCustom())) + { + return 10.ToString(); + } + if (expression.Contains(SkillFilterCreator.ContentKeyword.super_skybound_art_count.ToStringCustom())) + { + return 15.ToString(); + } + if (expression.Contains(SkillFilterCreator.ContentKeyword.skybound_art_count.ToStringCustom())) + { + return 10.ToString(); + } + if (expression.Contains(SkillFilterCreator.ContentKeyword.fixed_generic_value.ToStringCustom())) + { + return (-1).ToString(); + } + if (expression.Contains(SkillFilterCreator.ContentKeyword.white_ritual_stack.ToStringCustom())) + { + return 1.ToString(); + } + return "0"; + } + + private static string CreateDefaultOptionValue(string expression) + { + if (expression.Contains('{')) + { + bool flag = false; + bool flag2 = false; + int num = 0; + int count = 0; + for (int i = 0; i < expression.Length; i++) + { + if (expression[i] == '{') + { + flag = true; + num = i; + } + if (expression[i] == '}') + { + flag2 = true; + count = ((i != expression.Length) ? (i - num + 1) : (i - num)); + } + if (flag && flag2) + { + string defaultValue = GetDefaultValue(expression); + expression = expression.Remove(num, count); + expression = expression.Insert(num, defaultValue); + i = 0; + flag = false; + flag2 = false; + } + } + } + return expression; + } + + public static string ConvertSkillDescriptionText(string originalText, Action setupOptionValue = null, bool isPlayer = false, string divergenceId = "", List valueList = null, List replaySkillDescriptionValueList = null) + { + if (originalText == null || originalText == "") + { + return null; + } + string text = originalText; + int num = 0; + List list = new List(); + Dictionary dictionary = new Dictionary(); + while (true) + { + num++; + if (num >= 21) + { + Debug.LogError("Maybe infinity loop. OriginalText=" + originalText); + break; + } + Match match = Regex.Match(text, "<<([^>]+(>[^>])*)+>>"); + string variableNumberText = GetVariableNumberText(text); + if (variableNumberText == string.Empty) + { + break; + } + string text2 = variableNumberText; + bool flag = text2.Contains('?'); + List list2 = null; + if (flag) + { + list2 = text2.Split('?').ToList(); + text2 = list2[0]; + } + bool flag2 = text2.StartsWith("$", StringComparison.Ordinal); + if (flag && flag2) + { + text2 = text2.Remove(0, 1); + } + Action action = setupOptionValue; + bool flag3 = action == null; + if (flag3) + { + if (!flag2) + { + text2 = CreateDefaultOptionValue(text2); + } + action = SetupDefaultOptionValue; + } + bool isSkillDescriptionExpressionValueDefault = !flag2; + if (flag) + { + isSkillDescriptionExpressionValueDefault = ((flag3 || !GameMgr.GetIns().IsNewReplayBattle || text2.Contains("(divergence_id=")) ? EvalExpressionAndCondition(isSkillDescriptionExpressionValueDefault, text2, flag2, flag3, divergenceId, action, dictionary) : (replaySkillDescriptionValueList[num - 1] == 1)); + string empty = string.Empty; + empty = ((!isSkillDescriptionExpressionValueDefault) ? list2[2] : list2[1]); + valueList?.Add(isSkillDescriptionExpressionValueDefault ? 1 : 0); + text = text.Replace("<<" + list2[0] + "?" + list2[1] + "?" + list2[2] + ">>", empty); + continue; + } + SkillOptionValue skillOptionValue = new SkillOptionValue("v=" + text2); + action(skillOptionValue); + isSkillDescriptionExpressionValueDefault = IsSkillDescriptionExpressionValueDefault(text2, action, dictionary); + string text3 = ""; + string text4 = ""; + if (isSkillDescriptionExpressionValueDefault) + { + Match match2 = Regex.Match(text, "\\[[\\w\\d]+\\]([^[]*<<([^>])+>>[^[]*)\\[-\\]"); + MatchCollection matchCollection = Regex.Matches(text, "\\[[\\w\\d]+\\]([^[]*<<([^>])+>>[^[]*)\\[-\\]|<<([^>]+(>[^>])*)+>>"); + if (match2.Success && matchCollection[0].Value == match2.Value) + { + match = match2; + string value = match.Groups[1].Value; + Match match3 = Regex.Match(value, "<<([^>]+(>[^>])*)+>>"); + text3 = value.Substring(0, match3.Index); + text4 = value.Substring(match3.Index + match3.Length); + } + } + string text5 = text.Substring(0, match.Index) + text3; + string text6 = text4 + text.Substring(match.Index + match.Length); + if (Regex.Match(text, "{<<([^>])+>>@").Success) + { + text = text5 + list.Count + text6; + int item = ((flag3 || !GameMgr.GetIns().IsNewReplayBattle) ? skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.v) : replaySkillDescriptionValueList[num - 1]); + list.Add(item.ToString()); + valueList?.Add(item); + } + else + { + int item2 = ((flag3 || !GameMgr.GetIns().IsNewReplayBattle) ? skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.v) : replaySkillDescriptionValueList[num - 1]); + text = text5 + item2 + text6; + valueList?.Add(item2); + } + } + text = Data.SystemText.Convert(text, list.ToArray()); + return text.Replace("\\n", "\n"); + } + + private static bool EvalExpressionAndCondition(bool isSkillDescriptionExpressionValueDefault, string expression, bool isNewExpression, bool isNotBattleScene, string divergenceId, Action setupOptVal, Dictionary evalConditionCache) + { + string[] array = expression.Split('|'); + for (int i = 0; i < array.Length; i++) + { + string text = array[i]; + if (isNewExpression) + { + if (isNotBattleScene) + { + isSkillDescriptionExpressionValueDefault = false; + } + else if (text.StartsWith("(divergence_id=")) + { + text = text.Substring(1, text.Length - 2); + string text2 = text.Split('=')[1]; + isSkillDescriptionExpressionValueDefault |= text2 == divergenceId; + } + else + { + isSkillDescriptionExpressionValueDefault |= EvalNewExpressionAndCondition(text, setupOptVal, evalConditionCache); + } + } + else + { + isSkillDescriptionExpressionValueDefault &= EvalOldExpressionAndCondition(text, setupOptVal, evalConditionCache); + } + } + return isSkillDescriptionExpressionValueDefault; + } + + private static bool EvalNewExpressionAndCondition(string expression, Action setupOptionValue, Dictionary cache) + { + bool flag = true; + string[] array = expression.Split('&'); + for (int i = 0; i < array.Length; i++) + { + SkillTextVariableComareFilter skillTextVariableComareFilter = new SkillTextVariableComareFilter(array[i]); + SkillOptionValue skillOptionValue = new SkillOptionValue("v=" + skillTextVariableComareFilter.Lhs); + setupOptionValue(skillOptionValue); + if (cache.ContainsKey(skillTextVariableComareFilter.Lhs)) + { + skillTextVariableComareFilter.LhsFilteringResult = cache[skillTextVariableComareFilter.Lhs]; + } + else + { + cache[skillTextVariableComareFilter.Lhs] = skillTextVariableComareFilter.FilteringLhs(skillOptionValue); + } + if (cache.ContainsKey(skillTextVariableComareFilter.Rhs)) + { + skillTextVariableComareFilter.RhsFilteringResult = cache[skillTextVariableComareFilter.Rhs]; + } + else + { + cache[skillTextVariableComareFilter.Rhs] = skillTextVariableComareFilter.FilteringRhs(skillOptionValue); + } + flag &= skillTextVariableComareFilter.Filtering(skillOptionValue); + } + return flag; + } + + private static bool EvalOldExpressionAndCondition(string expression, Action setupOptionValue, Dictionary cache) + { + bool flag = false; + string[] array = expression.Split('&'); + for (int i = 0; i < array.Length; i++) + { + string text = array[i]; + bool flag2 = false; + if (!text.Contains("+1")) + { + text += "+1"; + flag2 = true; + } + SkillOptionValue obj = new SkillOptionValue("v=" + text); + setupOptionValue(obj); + bool flag3 = (flag2 ? (!IsSkillDescriptionExpressionValueDefault(text, setupOptionValue, cache)) : IsSkillDescriptionExpressionValueDefault(text, setupOptionValue, cache)); + flag = flag || flag3; + } + return flag; + } + + private static string GetVariableNumberText(string text) + { + _extractedText.Length = 0; + int num = 0; + for (int i = 0; i < text.Length - 1; i++) + { + if (text[i] == '<' && text[i + 1] == '<') + { + if (num > 0) + { + _extractedText.Append(text[i]); + _extractedText.Append(text[i + 1]); + } + i++; + num++; + } + else if (text[i] == '>' && text[i + 1] == '>') + { + num--; + if (num <= 0) + { + break; + } + _extractedText.Append(text[i]); + _extractedText.Append(text[i + 1]); + i++; + } + else if (num > 0) + { + _extractedText.Append(text[i]); + } + } + return _extractedText.ToString(); + } + + private static void SetupDefaultOptionValue(SkillOptionValue optionValue) + { + optionValue.SetVariable("PLAY_COUNT", "0"); + optionValue.SetVariable("HAND_COUNT", "0"); + optionValue.SetVariable("HAND_SPACE_COUNT", "0"); + optionValue.SetVariable("CHANT_COUNT", "0"); + optionValue.SetVariable("CHARGE_COUNT", "0"); + optionValue.SetVariable("DROP_COUNT", "0"); + optionValue.SetVariable("RETURN_COUNT", "0"); + optionValue.SetVariable("INPLAY_ME_COUNT", "0"); + optionValue.SetVariable("INPLAY_OP_COUNT", "0"); + optionValue.SetVariable("INPLAY_UNIT_ME_COUNT", "0"); + optionValue.SetVariable("INPLAY_UNIT_OP_COUNT", "0"); + optionValue.SetVariable("CLASS_ME_LIFE", "0"); + optionValue.SetVariable("CLASS_OP_LIFE", "0"); + optionValue.SetVariable("ADD_CHARGE_COUNT", "0"); + optionValue.SetVariable("ADD_ODD_CHARGE_COUNT", "0"); + optionValue.SetVariable("ADD_EVEN_CHARGE_COUNT", "0"); + } + + private static bool IsSkillDescriptionExpressionValueDefault(string expression, Action setupOptionValue, Dictionary cache) + { + string expression2 = string.Copy(expression); + expression2 = CreateDefaultOptionValue(expression2); + SkillOptionValue skillOptionValue = new SkillOptionValue("v=" + expression2); + SetupDefaultOptionValue(skillOptionValue); + int num; + if (cache.ContainsKey(expression)) + { + num = cache[expression]; + } + else + { + SkillOptionValue skillOptionValue2 = new SkillOptionValue("v=" + expression); + setupOptionValue(skillOptionValue2); + num = (cache[expression] = skillOptionValue2.GetInt(SkillFilterCreator.ContentKeyword.v)); + } + return skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.v) == num; + } + + public virtual VfxBase LoadResource(bool isLogging = false) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(BattleCardView.LoadChoiceTransformCardsResources(this)); + parallelVfxPlayer.Register(BattleCardView.LoadResource()); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(parallelVfxPlayer); + if (isLogging) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + LocalLog.AccumulateLastTraceLog("Loaded" + CardId); + })); + } + return sequentialVfxPlayer; + } + + public virtual VfxBase UnloadResource() + { + return BattleCardView.UnloadResource(); + } + + protected void OnEvolve(bool isSkill) + { + this.OnEvolveEvent(isSkill); + } + + protected VfxBase OnBeforeEvolveEvent(SkillProcessor skillProcessor) + { + return this.OnBeforeEvolve.GetAllFuncVfxResults(skillProcessor); + } + + protected void InitSkill() + { + Skills = _normalSkillCollection; + } + + public virtual VfxBase RecoveryInPlay(int inPlayIndex, bool newReplayMoveTurn = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(new SummonCardPreperationVfx(this)); + sequentialVfxPlayer.Register(new ChangeInPlayViewVfx(BattleCardView)); + sequentialVfxPlayer.Register(CreateMaskCardInPlayVfx()); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + BattleCardView.GameObject.transform.localPosition = InPlayCardControl.CalcPosition(SelfBattlePlayer.InPlayCards.Count(), inPlayIndex, IsPlayer); + BattleCardView.GameObject.SetLayer(10, isSetChildren: true); + BattleCardView.GameObject.SetActive(value: true); + BattleCardView.isHiddenFromInPlayView = false; + SetOnDraw(draw: false); + })); + if (!newReplayMoveTurn) + { + sequentialVfxPlayer.Register(BattleCardView.BattleCardIconAnimations.Initialize(this, Skills)); + } + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop()); + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectRestart()); + return sequentialVfxPlayer; + } + + public abstract BattleCardBase VirtualClone(BattlePlayerBase selfBattlePlayer, BattlePlayerBase opponentBattlePlayer); + + protected void CopyToVirtualCardBase(BattleCardBase target) + { + target.PlayedTurn = PlayedTurn; + target.DeathTypeInfo = DeathTypeInfo.Clone(); + target.BaseParameter = BaseParameter; + target.IsTokenLoad = IsTokenLoad; + target.IsFirstTurn = IsFirstTurn; + target.IsOnMove = IsOnMove; + target.SpellChargeCount = SpellChargeCount; + target.SkillActivatedCount = SkillActivatedCount; + target.ThisTurnSkillActivatedCount = ThisTurnSkillActivatedCount; + target.IsSummonDrunkenness = IsSummonDrunkenness; + target.IsPreviousTurnAttacked = IsPreviousTurnAttacked; + target.IsDestroyedByKiller = IsDestroyedByKiller; + target.IsDestroyedBySkill = IsDestroyedBySkill; + target.AttackableCount = AttackableCount; + target._playedCost = _playedCost; + target._lastCost = _lastCost; + target.IsSkillLost = IsSkillLost; + target.IsReanimate = IsReanimate; + target.DamagedCounter = new ItWasDamagedCounter(DamagedCounter.GetDamageCount(selfTurn: true), DamagedCounter.GetDamageCount(selfTurn: false)); + target.GetOffCards = GetOffCards; + target.TransformInfo = TransformInfo; + for (int i = 0; i < CostModifierList.Count; i++) + { + target.CostModifierList.Add(CostModifierList[i].Clone()); + } + for (int j = 0; j < attackCountinfo.Count; j++) + { + if (attackCountinfo[j].Skill.IsAddAttackCount()) + { + target.attackCountinfo.Add(new AddAttackCountInfo(attackCountinfo[j].Skill, attackCountinfo[j].Count)); + } + else if (attackCountinfo[j].Skill.IsSetAttackCount()) + { + target.attackCountinfo.Add(new SetAttackCountInfo(attackCountinfo[j].Skill, attackCountinfo[j].Count)); + } + } + if (IsEvolution && EvolutionSkills.Count() > 0) + { + target.Skills = target.EvolutionSkills; + } + target.SkillApplyInformation = SkillApplyInformation.Clone(target); + target._buildInfo = _buildInfo.VirtualClone(SelfBattlePlayer, OpponentBattlePlayer); + target.HasSkillNecromance = HasSkillNecromance; + target.Setup(); + } + + public virtual VfxBase CombineVirtualCardSkill(BattleCardBase target) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + IsSkillLost = false; + foreach (SkillBase item in CreateSkillCondition(target._buildInfo.NormalSkillBuildInfos, SelfBattlePlayer, OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _normalSkillCollection.Add(item); + } + foreach (SkillBase item2 in CreateSkillCondition(target._buildInfo.EvolveSkillBuildInfos, SelfBattlePlayer, OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + item2.ConditionCheckerList = item2.ConditionCheckerList.Where((ISkillConditionChecker c) => !(c is SkillPreprocessEvolutionEndStop)).ToList(); + item2.PreprocessList = item2.PreprocessList.Where((SkillPreprocessBase c) => !(c is SkillPreprocessEvolutionEndStop)).ToList(); + _evolveSkillCollection.Add(item2); + } + Skills = ((IsEvolution && EvolutionSkills.Count() > 0) ? _evolveSkillCollection : _normalSkillCollection); + SkillApplyInformation.Combine(target.SkillApplyInformation); + int count = target.BuffInfoList.Count; + for (int num = 0; num < count; num++) + { + BuffInfo buffInfo = target.BuffInfoList[num]; + if (!(buffInfo.SkillFrom is Skill_powerup) && !(buffInfo.SkillFrom is Skill_power_down) && !BuffInfoList.Contains(buffInfo)) + { + AddBuffInfo(buffInfo); + } + } + Skills.Complete(); + CostModifierList.AddRange(target.CostModifierList); + attackCountinfo.AddRange(target.attackCountinfo); + if (!SelfBattlePlayer.BattleMgr.IsVirtualBattle && !SelfBattlePlayer.BattleMgr.IsRecovery) + { + parallelVfxPlayer.Register(SequentialVfxPlayer.Create(SkillApplyInformation.AllSkillEffectRestart(), InstantVfx.Create(delegate + { + BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect(); + }), BattleCardView.BattleCardIconAnimations.Initialize(this, Skills))); + } + return parallelVfxPlayer; + } + + public void SetSpellChargeCount(int num) + { + if (num != -1) + { + SpellChargeCount = num; + } + } + + public void AddSpellChargeCount(int num) + { + SpellChargeCount += num; + } + + public VfxBase GetSpellChargeLoopEffect(int num) + { + Func getIsActionCard = () => IsActionCard || IsInplay || BattleCardView._hasCardEnteredPlayQueue; + if (SpellChargeCount == 0 && num > 0) + { + return new HandEffectLoopStartVfx(BattleCardView, getIsActionCard, HandEffectLoopStartVfx.HandEffectType.SpellCharge); + } + return NullVfx.GetInstance(); + } + + public BattleCardBase GetDamageReflectionTarget(bool isSkillDamage) + { + if (SkillApplyInformation.IsReflectionClass && (isSkillDamage || SkillApplyInformation.ReflectionInfoList.Any((ReflectionInfo b) => b.Type == ReflectionInfo.DamageType.ALL))) + { + return OpponentBattlePlayer.Class; + } + return this; + } + + public VfxBase CalcHandCost(bool playEffect = true, bool isOnlyFixedUseCost = false) + { + if (SelfBattlePlayer.BattleMgr.IsRecovery) + { + return NullVfx.GetInstance(); + } + if (IsInHand) + { + List costList = BattleCardView.GetUseCostList(Cost); + return InstantVfx.Create(delegate + { + BattleCardView.UpdateCost(costList, isGenerateInHand: true, playEffect, isForceUpdate: false, isOnlyFixedUseCost); + }); + } + return NullVfx.GetInstance(); + } + + public void UpdateCostViewStrategy(bool isForceUpdate = false) + { + BattleCardView.UpdateCostViewStrategy(isForceUpdate); + } + + public void InitHandParameterIconPos(HandParameter.IconLayout layout) + { + BattleCardView.InitHandParameterIconPos(layout); + } + + public IEnumerable AsIEnumerable() + { + yield return this; + } + + public bool IsHoverActionCard() + { + if (IsClass) + { + return false; + } + if (IsOnMove) + { + return false; + } + if (IsOnDraw) + { + return false; + } + if (!GameMgr.GetIns().IsAdmin && !IsPlayer && IsInHand) + { + return false; + } + return true; + } + + public List GetSelectSkillsNoDuplication(List skills) + { + List list = new List(); + BattlePlayerPair playerInfoPair = new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + for (int i = 0; i < skills.Count; i++) + { + SkillBase skillBase = skills[i]; + int val = ((skillBase.IsBurialRite && !skillBase.IsUserSelectType) ? 1 : skillBase.GetSelectableCards(playerInfoPair, option, isSkipForceSelect: true).Count()); + int num = Math.Min(skillBase.GetSkillSelectCount(), val); + for (int j = 0; j < num; j++) + { + list.Add(skillBase); + } + } + if (list.Count == 0) + { + list.AddRange(skills); + } + return list; + } + + public int GetBurialRiteCount(BattlePlayerReadOnlyInfoPair playerInfoPair, SkillConditionCheckerOption option, bool isPrePlay) + { + if (BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView._isEvolutionSkillSelect) + { + return EvolutionSkills.Count((SkillBase s) => s.CheckConditionWithoutBurialRite(playerInfoPair, option, isPrePlay)); + } + return Skills.Count((SkillBase s) => s.CheckConditionWithoutBurialRite(playerInfoPair, option, isPrePlay)); + } + + public void ReplaceParameterAndSkillOnDeck(int id) + { + _buildInfo.CardId = id; + CreateParameter(); + InitSkillApplyInformationOnWhenReturn(); + } + + public bool HasInductionSkill() + { + for (int i = 0; i < Skills.Count(); i++) + { + SkillBase skillBase = Skills.ElementAt(i); + if (skillBase.IsInductionSkill && skillBase.SkillPrm.buildInfo._icon == "induction") + { + return true; + } + } + return false; + } + + public bool HasInductionNumberSkill() + { + for (int i = 0; i < Skills.Count(); i++) + { + SkillBase skillBase = Skills.ElementAt(i); + if (skillBase.IsInductionSkill && skillBase.SkillPrm.buildInfo._icon != "induction" && skillBase.SkillPrm.buildInfo._icon.Contains("induction")) + { + return true; + } + } + return false; + } + + public int GetInductionLabelNumber() + { + SkillBase skillBase = Skills.FirstOrDefault((SkillBase s) => s.IsInductionSkill && s.SkillPrm.buildInfo._icon != "induction" && s.SkillPrm.buildInfo._icon.Contains("induction")); + if (skillBase == null) + { + return -1; + } + SkillOptionValue skillOptionValue = new SkillOptionValue(skillBase.SkillPrm.buildInfo._icon); + skillOptionValue.SetupFilterVariable(BattleManagerBase.GetIns().GetBattlePlayerInfoPair(IsPlayer), this, isPrePlay: false, null); + return skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.induction); + } + + public bool HasStackWhiteRitualAndOtherIconSkill() + { + if (HasSkillStackWhiteRitual) + { + if (!HasInductionSkill() && !HasInductionNumberSkill()) + { + return HasSkillWhenDestroy; + } + return true; + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleCardBaseExtensions.cs b/SVSim.BattleEngine/Engine/BattleCardBaseExtensions.cs new file mode 100644 index 0000000..5ccb186 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleCardBaseExtensions.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; +using System.Linq; +using Wizard.Battle; +using Wizard.Battle.View; + +public static class BattleCardBaseExtensions +{ + public static List ConvertToViewList(this IList battleCardBaseList) + { + return battleCardBaseList?.Select((BattleCardBase c) => c.BattleCardView).ToList(); + } + + public static BattleCardBase FindFromCardId(this IList battleCardBaseList, IBattleCardUniqueID cardId) + { + if (battleCardBaseList == null) + { + return null; + } + for (int i = 0; i < battleCardBaseList.Count; i++) + { + BattleCardBase battleCardBase = battleCardBaseList[i]; + if (battleCardBase.EquelsID(cardId)) + { + return battleCardBase; + } + } + return null; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleCardIconAnimations.cs b/SVSim.BattleEngine/Engine/BattleCardIconAnimations.cs new file mode 100644 index 0000000..2eac6ae --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleCardIconAnimations.cs @@ -0,0 +1,487 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard.Battle.View.Vfx; + +public class BattleCardIconAnimations : MonoBehaviour +{ + public class SkillIcon + { + public string _key; + + public string _iconSpriteName; + + public int LabelNumber; + + public SkillIcon(string key, string iconSpriteName, int labelNumber) + { + _key = key; + _iconSpriteName = iconSpriteName; + LabelNumber = labelNumber; + } + } + + private List skillIconList = new List(); + + private List skillIconListWithoutDuplicates = new List(); + + private CardTemplate cardTemplate; + + private BattleCardBase _card; + + private SkillCollectionBase collection; + + private bool skillIconAlphaFlg; + + private int skillCount; + + private int _inductionLabelNumber = -1; + + private const float ALPHA_BLEND_RATE = 0.6f; + + private const string INDUCTION_ICON_SPRITE_NAME = "battle_notice_status_04"; + + private const string WHITE_RITUAL_STACK_SPRITE_NAME = "battle_notice_status_11"; + + public VfxBase Initialize(BattleCardBase card, SkillCollectionBase collection, bool isStackWhiteRitual = false) + { + _card = card; + this.collection = collection; + ISkillApplyInformation skillApplyInformation = card.SkillApplyInformation; + bool isEarthRiteField = (IsEarthRiteField() ? true : false); + bool hasInductionSkill = HasInductionSkill(); + bool hasInductionNumberSkill = HasInductionNumberSkill(); + bool hasKiller = (skillApplyInformation.IsKiller ? true : false); + bool hasDrain = (skillApplyInformation.IsDrain ? true : false); + bool hasWhenDestroySkill = (HasWhenDestroySkill() ? true : false); + bool hasGetonSkill = HasGetonSkill(); + bool isGetOnAfter = _card.GetOnCards.Any(); + bool hasWhiteRirualStackSkill = HasStackWhiteRitualSkill(); + int whiteRitualCount = _card.SkillApplyInformation.WhiteRitualCount; + return InstantVfx.Create(delegate + { + InitializeIcon(isEarthRiteField && !hasWhiteRirualStackSkill, isEarthRiteField && hasWhiteRirualStackSkill, whiteRitualCount, hasInductionSkill, hasInductionNumberSkill, hasKiller, hasDrain, hasWhenDestroySkill, hasGetonSkill, isGetOnAfter, isReplay: false, isStackWhiteRitual); + }); + } + + public VfxBase InitializeOnlyStack(BattleCardBase card, SkillCollectionBase collection) + { + _card = card; + this.collection = collection; + bool isEarthRiteField = IsEarthRiteField(); + bool hasWhiteRirualStackSkill = HasStackWhiteRitualSkill(); + int whiteRitualCount = _card.SkillApplyInformation.WhiteRitualCount; + return InstantVfx.Create(delegate + { + InitializeIcon(isEarthRiteField && !hasWhiteRirualStackSkill, isEarthRiteField && hasWhiteRirualStackSkill, whiteRitualCount, hasInductionSkill: false, hasInductionNumberSkill: false, hasKiller: false, hasDrain: false, hasWhenDestroySkill: false, hasGetonSkill: false); + }); + } + + private void InitializeIcon(bool hasWhiteRirualSkill, bool hasWhiteRirualStackSkill, int whiteRitualCount, bool hasInductionSkill, bool hasInductionNumberSkill, bool hasKiller, bool hasDrain, bool hasWhenDestroySkill, bool hasGetonSkill, bool isGetOnAfter = false, bool isReplay = false, bool isStackWhiteRitual = false) + { + if (!(_card.BattleCardView.GameObject == null)) + { + ClearAllSkillIcons(); + cardTemplate = _card.BattleCardView.GameObject.GetComponent(); + cardTemplate.SkillIconTemp.gameObject.transform.localPosition = new Vector3(0f, -30f, -0.1f); + cardTemplate.SkillIconTemp.gameObject.transform.localScale = new Vector3(0.2f, 0.2f, 1f); + cardTemplate.SkillIconTemp.atlas = UIManager.GetInstance().GetAtlasList().FirstOrDefault((UIAtlas s) => s.name == "Battle"); + AddToIconList("white_ritual", "battle_notice_status_08", hasWhiteRirualSkill); + AddToIconList("stack_white_ritual", "battle_notice_status_11", hasWhiteRirualStackSkill, whiteRitualCount); + AddToIconList("induction", "battle_notice_status_04", hasInductionSkill); + AddToIconList("induction_number", "battle_notice_status_04", hasInductionNumberSkill, GetInductionLabelNumber()); + AddToIconList("killer", "battle_notice_status_01", hasKiller); + AddToIconList("drain", "battle_notice_status_07", hasDrain); + AddToIconList("destroy", "battle_notice_status_06", hasWhenDestroySkill); + if (isReplay) + { + AddToIconList("geton", "battle_notice_status_09", hasGetonSkill); + AddToIconList("geton_after", "battle_notice_status_10", isGetOnAfter); + } + else if (isGetOnAfter) + { + AddToIconList("geton_after", "battle_notice_status_10", hasGetonSkill); + } + else + { + AddToIconList("geton", "battle_notice_status_09", hasGetonSkill); + } + PopulateSkillIconListWithoutDuplicates(); + string spriteName = (skillIconListWithoutDuplicates.Any() ? skillIconListWithoutDuplicates[0]._iconSpriteName : string.Empty); + cardTemplate.SkillIconTemp.spriteName = spriteName; + ChangeSkillIconLabel(cardTemplate.SkillIconLabelTemp, skillIconListWithoutDuplicates.Any() ? skillIconListWithoutDuplicates[0].LabelNumber : (-1)); + UpdateSkillIconLabelColor(); + skillCount = 0; + cardTemplate.SkillIconTemp.gameObject.SetActive(value: true); + if (isStackWhiteRitual) + { + cardTemplate.SkillIconTemp.alpha = 1.5f; + skillIconAlphaFlg = false; + } + } + } + + public VfxBase UpdateLabelNumber() + { + return InstantVfx.Create(delegate + { + SkillIcon skillIcon = skillIconListWithoutDuplicates.FirstOrDefault((SkillIcon i) => i._key == "induction_number"); + if (skillIcon != null) + { + skillIcon.LabelNumber = GetInductionLabelNumber(); + if (cardTemplate.SkillIconTemp.spriteName == "battle_notice_status_04") + { + ChangeSkillIconLabel(cardTemplate.SkillIconLabelTemp, skillIcon.LabelNumber); + } + } + }); + } + + public VfxBase UpdateWhiteRitualCountLabel() + { + if (!HasStackWhiteRitualSkill() || !IsEarthRiteField()) + { + return NullVfx.GetInstance(); + } + int whiteRitualCount = _card.SkillApplyInformation.WhiteRitualCount; + return InstantVfx.Create(delegate + { + SkillIcon skillIcon = skillIconListWithoutDuplicates.FirstOrDefault((SkillIcon i) => i._key == "stack_white_ritual"); + if (skillIcon != null) + { + skillIcon.LabelNumber = whiteRitualCount; + if (cardTemplate.SkillIconTemp.spriteName == "battle_notice_status_11") + { + ChangeSkillIconLabel(cardTemplate.SkillIconLabelTemp, skillIcon.LabelNumber); + } + } + }); + } + + private void AddToIconList(string key, string spriteName, bool addCondition, int labelNumber = -1) + { + if (addCondition) + { + AddSkillIcon(key, spriteName, labelNumber); + } + } + + private void PopulateSkillIconListWithoutDuplicates() + { + AddToIconListWithoutDuplicates("white_ritual"); + AddToIconListWithoutDuplicates("stack_white_ritual"); + AddToIconListWithoutDuplicates("induction"); + AddToIconListWithoutDuplicates("induction_number"); + AddToIconListWithoutDuplicates("destroy"); + AddToIconListWithoutDuplicates("killer"); + AddToIconListWithoutDuplicates("drain"); + AddToIconListWithoutDuplicates("geton"); + } + + private void AddToIconListWithoutDuplicates(string key) + { + if (skillIconList.Any((SkillIcon c) => c._key == key) && !skillIconListWithoutDuplicates.Any((SkillIcon c) => c._key == key)) + { + SkillIcon skillIcon = skillIconList.SingleOrDefault((SkillIcon c) => c._key == key && c._iconSpriteName != null); + skillIconListWithoutDuplicates.Add(new SkillIcon(key, skillIcon._iconSpriteName, skillIcon.LabelNumber)); + } + } + + public VfxBase ShowIcon() + { + return InstantVfx.Create(delegate + { + cardTemplate.SkillIconTemp.gameObject.SetActive(value: true); + }); + } + + public VfxBase HideIcon() + { + return InstantVfx.Create(delegate + { + cardTemplate.SkillIconTemp.gameObject.SetActive(value: false); + }); + } + + private void Update() + { + if (cardTemplate != null) + { + if (cardTemplate.SkillIconTemp.gameObject.activeSelf) + { + SkillIconAlphaBlend(); + } + else + { + cardTemplate.SkillIconTemp.alpha = 0f; + } + } + } + + public void AddSkillIcon(string key, string fileName, int labelNumber = -1) + { + string iconSpriteName = ((!skillIconList.Any((SkillIcon v) => v._key == key)) ? fileName : null); + skillIconList.Add(new SkillIcon(key, iconSpriteName, labelNumber)); + skillIconListWithoutDuplicates = skillIconList.Where((SkillIcon v) => v._iconSpriteName != null).ToList(); + } + + public void DeleteSkillIcon(string key) + { + if (skillIconList.Any((SkillIcon v) => v._key == key)) + { + skillIconList.Remove(skillIconList.Where((SkillIcon v) => v._key == key).Last()); + } + skillIconListWithoutDuplicates = skillIconList.Where((SkillIcon v) => v._iconSpriteName != null).ToList(); + if (skillIconListWithoutDuplicates.Count == 0) + { + cardTemplate.SkillIconTemp.spriteName = string.Empty; + cardTemplate.SkillIconLabelTemp.text = string.Empty; + } + ChangeTexture(); + } + + public void DeleteUnneededSkillIcons() + { + RemoveSkillIconFromList("white_ritual", () => !IsEarthRiteField()); + RemoveSkillIconFromList("induction", () => !HasInductionSkill()); + RemoveSkillIconFromList("induction_number", () => !HasInductionNumberSkill()); + RemoveSkillIconFromList("destroy", () => !HasWhenDestroySkill()); + } + + private void RemoveSkillIconFromList(string key, Func deleteCondition) + { + if (deleteCondition()) + { + DeleteSkillIcon(key); + } + } + + private void ChangeTexture() + { + if (skillIconListWithoutDuplicates.Count() - 1 > skillCount) + { + skillCount++; + cardTemplate.SkillIconTemp.spriteName = skillIconListWithoutDuplicates[skillCount]._iconSpriteName; + ChangeSkillIconLabel(cardTemplate.SkillIconLabelTemp, skillIconListWithoutDuplicates[skillCount].LabelNumber); + } + else if (skillIconListWithoutDuplicates.Count() != 0) + { + skillCount = 0; + cardTemplate.SkillIconTemp.spriteName = skillIconListWithoutDuplicates[skillCount]._iconSpriteName; + ChangeSkillIconLabel(cardTemplate.SkillIconLabelTemp, skillIconListWithoutDuplicates[skillCount].LabelNumber); + } + UpdateSkillIconLabelColor(); + } + + private void UpdateSkillIconLabelColor() + { + if (cardTemplate.SkillIconTemp.spriteName == "battle_notice_status_11") + { + cardTemplate.SkillIconLabelTemp.color = Color.white; + cardTemplate.SkillIconLabelTemp.effectColor = Color.black; + } + else if (cardTemplate.SkillIconTemp.spriteName == "battle_notice_status_04") + { + cardTemplate.SkillIconLabelTemp.color = Color.black; + cardTemplate.SkillIconLabelTemp.effectColor = Color.white; + } + } + + private void ChangeSkillIconLabel(UILabel label, int labelNumber) + { + if (labelNumber == -1) + { + label.text = string.Empty; + } + else + { + label.text = labelNumber.ToString(); + } + } + + public void ClearAllSkillIcons() + { + skillIconList.Clear(); + skillIconListWithoutDuplicates.Clear(); + } + + private void SkillIconAlphaBlend() + { + bool flag = cardTemplate.SkillIconLabelTemp.text.IsNotNullOrEmpty(); + if (skillIconListWithoutDuplicates.Count > 1) + { + if (skillIconAlphaFlg) + { + cardTemplate.SkillIconTemp.alpha += (flag ? (0.6f * Time.deltaTime * 2f) : (0.6f * Time.deltaTime)); + } + else + { + cardTemplate.SkillIconTemp.alpha -= (flag ? (0.6f * Time.deltaTime * 2f) : (0.6f * Time.deltaTime)); + } + } + else if (cardTemplate.SkillIconTemp.spriteName == string.Empty) + { + cardTemplate.SkillIconTemp.alpha = 1f; + if (skillIconListWithoutDuplicates.Count > 0) + { + if (cardTemplate.SkillIconTemp.spriteName != skillIconListWithoutDuplicates[0]._iconSpriteName) + { + cardTemplate.SkillIconTemp.spriteName = skillIconListWithoutDuplicates[0]._iconSpriteName; + } + ChangeSkillIconLabel(cardTemplate.SkillIconLabelTemp, skillIconListWithoutDuplicates[0].LabelNumber); + UpdateSkillIconLabelColor(); + } + } + else + { + cardTemplate.SkillIconTemp.alpha = 1f; + } + if (skillIconAlphaFlg && cardTemplate.SkillIconTemp.alpha >= (flag ? 2f : 1f)) + { + skillIconAlphaFlg = false; + } + else if (!skillIconAlphaFlg && cardTemplate.SkillIconTemp.alpha <= 0f) + { + ChangeTexture(); + skillIconAlphaFlg = true; + } + } + + private bool HasWhenDestroySkill() + { + return collection._skillTimingInfo.IsWhenDestroy; + } + + public bool HasInductionSkill() + { + for (int i = 0; i < collection.Count(); i++) + { + SkillBase skillBase = collection.ElementAt(i); + if (skillBase.IsInductionSkill && skillBase.SkillPrm.buildInfo._icon == "induction") + { + return true; + } + } + return false; + } + + public bool HasStackWhiteRitualSkill() + { + return collection.Any((SkillBase x) => x is Skill_stack_white_ritual); + } + + public bool HasGetonSkill() + { + return collection.Any((SkillBase x) => x is Skill_geton); + } + + public bool HasInductionNumberSkill() + { + for (int i = 0; i < collection.Count(); i++) + { + SkillBase skillBase = collection.ElementAt(i); + if (skillBase.IsInductionSkill && skillBase.SkillPrm.buildInfo._icon != "induction" && skillBase.SkillPrm.buildInfo._icon.Contains("induction")) + { + return true; + } + } + return false; + } + + public int GetInductionLabelNumber() + { + if (_inductionLabelNumber != -1) + { + return _inductionLabelNumber; + } + SkillBase skillBase = collection.FirstOrDefault((SkillBase s) => s.IsInductionSkill && s.SkillPrm.buildInfo._icon != "induction" && s.SkillPrm.buildInfo._icon.Contains("induction")); + if (skillBase == null) + { + return -1; + } + SkillOptionValue skillOptionValue = new SkillOptionValue(skillBase.SkillPrm.buildInfo._icon); + skillOptionValue.SetupFilterVariable(BattleManagerBase.GetIns().GetBattlePlayerInfoPair(_card.IsPlayer), _card, isPrePlay: false, null); + return skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.induction); + } + + private bool IsEarthRiteField() + { + if (_card.IsField || _card.IsChantField) + { + return _card.IsTribe(CardBasePrm.TribeType.WHITE_RITUAL); + } + return false; + } + + public VfxBase UpdateSkillIconInReplay(List inplaySkillEffectList, int inductionNumber, bool isInitialize, bool isStackWhiteRitual = false) + { + if (!isInitialize && _card.HasStackWhiteRitualAndOtherIconSkill() && skillIconListWithoutDuplicates.Count < 2) + { + return NullVfx.GetInstance(); + } + _inductionLabelNumber = inductionNumber; + bool hasWhiteRitualSkill = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.WhiteRitual); + bool hasWhiteRirualStackSkill = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.StackWhiteRitual); + bool hasInductionSkill = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Induction); + bool hasInductionNumberSkill = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.InductionNumber); + bool hasKiller = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Killer); + bool hasDrain = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Drain); + bool hasWhenDestroySkill = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Destroy); + bool hasGeton = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.Geton); + bool hasGetonAfter = inplaySkillEffectList.Contains(NetworkBattleReceiver.InplaySkillEffect.GetonAfter); + int whiteRitualCount = _card.SkillApplyInformation.WhiteRitualCount; + return InstantVfx.Create(delegate + { + if (skillIconList.Count == 0 || isInitialize) + { + InitializeIcon(hasWhiteRitualSkill, hasWhiteRirualStackSkill, whiteRitualCount, hasInductionSkill, hasInductionNumberSkill, hasKiller, hasDrain, hasWhenDestroySkill, hasGeton, hasGetonAfter, isReplay: true, isStackWhiteRitual); + } + else + { + UpdateSkillIcon("white_ritual", "battle_notice_status_08", hasWhiteRitualSkill); + UpdateSkillIcon("stack_white_ritual", "battle_notice_status_11", hasWhiteRirualStackSkill, whiteRitualCount); + UpdateSkillIcon("induction", "battle_notice_status_04", hasInductionSkill); + UpdateSkillIcon("induction_number", "battle_notice_status_04", hasInductionNumberSkill, GetInductionLabelNumber()); + UpdateSkillIcon("killer", "battle_notice_status_01", hasKiller); + UpdateSkillIcon("drain", "battle_notice_status_07", hasDrain); + UpdateSkillIcon("destroy", "battle_notice_status_06", hasWhenDestroySkill); + UpdateSkillIcon("geton", "battle_notice_status_09", hasGeton); + UpdateSkillIcon("geton_after", "battle_notice_status_10", hasGetonAfter); + } + }); + } + + private void UpdateSkillIcon(string key, string spriteName, bool hasIcon, int labelNumber = -1) + { + if (hasIcon && !skillIconList.Any((SkillIcon v) => v._key == key)) + { + AddToIconList(key, spriteName, hasIcon, labelNumber); + } + else if (!hasIcon && skillIconList.Any((SkillIcon v) => v._key == key)) + { + DeleteSkillIcon(key); + } + } + + public void DeleteSkillIcons() + { + if (!(cardTemplate == null)) + { + DeleteSkillIcon("white_ritual"); + DeleteSkillIcon("stack_white_ritual"); + DeleteSkillIcon("induction"); + DeleteSkillIcon("induction_number"); + DeleteSkillIcon("destroy"); + DeleteSkillIcon("killer"); + DeleteSkillIcon("drain"); + DeleteSkillIcon("geton"); + } + } + + public int GetIconListCount() + { + return skillIconListWithoutDuplicates.Count; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleControl.cs b/SVSim.BattleEngine/Engine/BattleControl.cs new file mode 100644 index 0000000..e2bfb18 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleControl.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.UI; +using Wizard.Battle.View.Vfx; + +public class BattleControl : MonoBehaviour +{ + private BattleManagerBase m_BtlMgrIns; + + private int FirstAttack; + + public void Init() + { + m_BtlMgrIns = BattleManagerBase.GetIns(); + GameMgr.GetIns().GetInputMgr().SetLayerMask(512); + LocalLog.AccumulateLastTraceLog("StartBattleCoroutine "); + StartCoroutine(WaitLoadOpponentObjectToBattleStart(m_BtlMgrIns.LoadOpponentObjects())); + } + + private IEnumerator WaitLoadOpponentObjectToBattleStart(VfxBase vfx) + { + if (GameMgr.GetIns().IsNetworkBattle) + { + FirstAttack = ToolboxGame.RealTimeNetworkAgent.GetIsFirstPlayer(); + } + while (!vfx.IsEnd) + { + yield return null; + } + LocalLog.AccumulateLastTraceLog("DecideFirstUser End "); + m_BtlMgrIns.StartOpening(FirstAttack); + } + + public void BattleEnd(UIManager.ViewScene MoveTo, Action callback = null, Action paramCustomize = null, object sceneParam = null) + { + ToolboxGame.UIManager.gameObject.SetActive(value: true); + UIManager.ChangeViewSceneParam changeViewSceneParam = new UIManager.ChangeViewSceneParam(); + changeViewSceneParam.OnBeforeChange = delegate + { + BattleManagerBase.GetIns().DisposeBattleGameObj(); + }; + changeViewSceneParam.OnChange = delegate + { + GameMgr.GetIns().GetEffectMgr().DestroyBattleEffectContainer(); + GameMgr.GetIns().GetDataMgr().ResetEnemyData(); + GameMgr.GetIns().DestroyBattleManagements(); + GameMgr.GetIns().GetGameObjMgr().GetUIContainer() + .SetActive(value: false); + if (callback != null) + { + callback(); + } + }; + paramCustomize.Call(changeViewSceneParam); + StartCoroutine(UnloadAllResources(MoveTo, changeViewSceneParam, null, sceneParam)); + } + + private IEnumerator UnloadAllResources(UIManager.ViewScene MoveTo = UIManager.ViewScene.None, UIManager.ChangeViewSceneParam param = null, Action callback = null, object sceneParam = null) + { + BattleLogManager.GetInstance().Clear(); + GameMgr.GetIns().GetEffectMgr().ClearLastCacheEffect(); + StopAllTweens(); + yield return Resources.UnloadUnusedAssets(); + GC.Collect(); + callback?.Invoke(); + if (MoveTo != UIManager.ViewScene.None) + { + UIManager.GetInstance().ChangeViewScene(MoveTo, param, sceneParam); + } + } + + public IEnumerator BattleEnd(Action callback = null) + { + BattleRelease(); + yield return Resources.UnloadUnusedAssets(); + GC.Collect(); + callback?.Invoke(); + } + + public void BattleRelease() + { + ToolboxGame.UIManager.gameObject.SetActive(value: true); + GameMgr.GetIns().GetEffectMgr().DestroyBattleEffectContainer(); + GameMgr.GetIns().GetDataMgr().ResetEnemyData(); + if (BattleManagerBase.GetIns() != null) + { + BattleManagerBase.GetIns().DisposeBattleGameObj(); + } + GameMgr.GetIns().DestroyBattleManagements(); + GameMgr.GetIns().GetGameObjMgr().GetUIContainer() + .SetActive(value: false); + BattleLogManager.GetInstance().Clear(); + GameMgr.GetIns().GetEffectMgr().ClearLastCacheEffect(); + StopAllTweens(); + } + + private void StopAllTweens() + { + HashSet hashSet = new HashSet(); + for (int i = 0; i < iTween.tweens.Count; i++) + { + if (iTween.tweens[i] != null) + { + GameObject gameObject = (GameObject)iTween.tweens[i]["target"]; + if (gameObject != null) + { + hashSet.Add(gameObject); + } + } + } + foreach (GameObject item in hashSet) + { + if (item != null) + { + iTween.Stop(item); + } + } + iTween.tweens.Clear(); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleCoroutine.cs b/SVSim.BattleEngine/Engine/BattleCoroutine.cs new file mode 100644 index 0000000..21a6e5c --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleCoroutine.cs @@ -0,0 +1,52 @@ +using System.Collections; +using UnityEngine; + +public class BattleCoroutine +{ + private static BattleCoroutine m_instance; + + private static MonoBehaviour _coroutineObject; + + public static BattleCoroutine GetInstance() + { + if (m_instance == null) + { + m_instance = new BattleCoroutine(); + } + if (_coroutineObject == null) + { + GameObject gameObject = Object.Instantiate(Resources.Load("Prefab/Game/_BattleCoroutine")) as GameObject; + if (null != gameObject) + { + _coroutineObject = gameObject.GetComponent(); + } + } + return m_instance; + } + + public Coroutine StartCoroutine(IEnumerator enumerator) + { + return _coroutineObject.StartCoroutine(enumerator); + } + + public void StopAllCoroutines() + { + _coroutineObject.StopAllCoroutines(); + } + + public void StopCoroutine(IEnumerator enumerator) + { + if (enumerator != null) + { + _coroutineObject.StopCoroutine(enumerator); + } + } + + public void StopCoroutine(Coroutine enumerator) + { + if (enumerator != null) + { + _coroutineObject.StopCoroutine(enumerator); + } + } +} diff --git a/SVSim.BattleEngine/Engine/BattleEnemy.cs b/SVSim.BattleEngine/Engine/BattleEnemy.cs new file mode 100644 index 0000000..e0f8eee --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleEnemy.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Player.Emotion; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class BattleEnemy : BattlePlayerBase +{ + private readonly Vector3 OFFSET_THINK_ICON_FROM_CLASSVIEW = new Vector3(0.62f, 0.15f, 0f); + + private IEmotion _emotion; + + private readonly Vector3 FIELD_CENTER_POSITION = new Vector3(0f, 0.25f, 0f); + + public override bool IsGameFirst => !base.BattleMgr.IsFirst; + + public override bool IsPlayer => false; + + public override IBattlePlayerView BattleView => BattleEnemyView; + + public override IEmotion Emotion => _emotion; + + public virtual IBattlePlayerView BattleEnemyView { get; protected set; } + + public bool EnableEnemyAI { get; set; } + + public override int Turn + { + get + { + if (!base.BattleMgr.IsFirst) + { + return base.BattleMgr.FirstTurn; + } + return base.BattleMgr.SecondTurn; + } + set + { + if (base.BattleMgr.IsFirst) + { + base.BattleMgr.SecondTurn = value; + } + else + { + base.BattleMgr.FirstTurn = value; + } + } + } + + public event Action> OnMulliganEndForReplay; + + public BattleEnemy(BattleManagerBase battleMgr, BattleCamera battleCamera, BackGroundBase backGround, IInnerOptionsBuilder innerOptionsBuilder) + : base(battleMgr, battleCamera, backGround, innerOptionsBuilder) + { + } + + protected override void Initialize() + { + BattleEnemyView = new BattleEnemyView(this); + } + + protected override void CreateSelfBattleCard() + { + EnemyClassBattleCard item = new EnemyClassBattleCard(new ClassBattleCardBase.ClassBuildInfo(_isPlayer: false, 20, this, base.BattleMgr.BattlePlayer, base.BattleMgr, base.BattleMgr.BattleResourceMgr)); + base.ClassAndInPlayCardList.Add(item); + } + + public override void Setup(BattlePlayerBase opponentBattlePlayer) + { + _emotion = _innerOptionsBuilder.CreateEnemyEmotion((IClassBattleCardView)base.Class.BattleCardView); + base.Setup(opponentBattlePlayer); + } + + public override void SetupClone(BattlePlayerBase sourceBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags) + { + sourceBattlePlayer.CopyToVirtualBase(this, virtualOpponentBattlePlayer, cloneFlags); + } + + public override VfxBase StartTurnControl(string log = "") + { + if (GameMgr.GetIns().IsAdminWatch) + { + UpdateHandCardsPlayability(); + } + Turn++; + SequentialVfxPlayer sequentialVfxPlayer = TurnEvolveControl(BattleView.EpIcon); + VfxBase vfx = TurnStart(); + sequentialVfxPlayer.Register(vfx); + VfxBase vfx2 = BattleManagerBase.GetIns().JudgeBattleResult(); + sequentialVfxPlayer.Register(vfx2); + sequentialVfxPlayer.Register(CreateThinkingVfx(base.BattleMgr)); + return sequentialVfxPlayer; + } + + public VfxBase CreateThinkingVfx(BattleManagerBase battleMgr) + { + if (GameMgr.GetIns().IsAdminWatch) + { + return NullVfx.GetInstance(); + } + return new DelaySetupVfx(() => new ThinkIconShowVfx(delegate + { + Vector3 position = base.BattleCamera.Get3DCamera().WorldToScreenPoint(base.Class.BattleCardView.Transform.position + OFFSET_THINK_ICON_FROM_CLASSVIEW); + return UIManager.GetInstance().getCamera().ScreenToWorldPoint(position); + }, battleMgr.BattleResourceMgr)); + } + + public override VfxBase UsePp(int pp, bool isNewReplayMoveTurn = false) + { + base.UsePp(pp); + int usedPp = base.Pp; + int maxPp = base.PpTotal; + Vector3 labelPosition = default(Vector3); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + Vector3 position = base.BattleCamera.Get3DCamera().WorldToScreenPoint(StatusPanelControl.GetPPPanel().transform.Find("PPIcon/PPLabel").transform.position); + labelPosition = UIManager.GetInstance().getCamera().ScreenToWorldPoint(position); + })); + sequentialVfxPlayer.Register(new DelaySetupVfx(() => m_vfxCreator.CreateUsePp(usedPp, maxPp, labelPosition, isNewReplayMoveTurn))); + return sequentialVfxPlayer; + } + + protected override VfxBase TurnStartDrawCard(SkillProcessor skillProcessor) + { + NullVfx.GetInstance(); + int drawCount = ((IsGameFirst || Turn != 1) ? 1 : 2); + VfxWith> vfxWith = RandomCardDraw(drawCount, skillProcessor); + VfxBase vfxBase = CardDrawVfx(vfxWith.Value); + SequentialVfxPlayer result = SequentialVfxPlayer.Create(vfxWith.Vfx, vfxBase); + if (!base.Class.IsDead && EnableEnemyAI) + { + base.BattleMgr.EnemyAI.ExecuteEnemyAI(useWait: true); + } + _ = base.Class.IsDead; + return result; + } + + public override VfxBase CardDrawVfx(IEnumerable DrawList, bool skipShuffle = false, bool isOpenDrawSkill = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (GameMgr.GetIns().IsAdminWatch) + { + foreach (BattleCardBase card in DrawList) + { + if (card.BaseCost != card.Cost) + { + List costList = card.BattleCardView.GetUseCostList(card.Cost); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + card.BattleCardView.UpdateCost(costList); + })); + } + } + } + sequentialVfxPlayer.Register(new OpponentDrawCardVfx(DrawList, isOpenDrawSkill)); + sequentialVfxPlayer.Register(new OpponentDrawCardToHandVfx(DrawList.ToList(), 0.4f, isOpenDrawSkill, skipShuffle)); + return sequentialVfxPlayer; + } + + public override VfxBase TurnEnd() + { + ParallelVfxPlayer result = ParallelVfxPlayer.Create(base.TurnEnd(), new ThinkIconHideVfx(base.BattleMgr.BattleResourceMgr)); + if (GameMgr.GetIns().IsAdminWatch) + { + foreach (BattleCardBase handCard in base.HandCardList) + { + handCard.BattleCardView.HideCanPlayEffect(); + } + } + return result; + } + + protected override void SetActive() + { + if (GameMgr.GetIns().IsAdminWatch) + { + UpdateHandCardsPlayability(); + } + if (!IsGameFirst || Turn != 1) + { + base.IsChoiceBraveEffectTiming = true; + BattleEnemyView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + } + + public override BattlePlayerBase CreateVirtualPlayer() + { + return new VirtualBattleEnemy(base.BattleMgr, base.BattleCamera, base.BackGround); + } + + public override void UpdateHandCardsPlayability(bool areArrowsForcedOff = false) + { + foreach (BattleCardBase handCard in _opponentBattlePlayer.HandCardList) + { + handCard.BattleCardView.areArrowsForcedOff = areArrowsForcedOff; + handCard.BattleCardView.UpdateMovability(); + } + if (!GameMgr.GetIns().IsAdmin) + { + return; + } + foreach (BattleCardBase handCard2 in base.HandCardList) + { + handCard2.BattleCardView.areArrowsForcedOff = areArrowsForcedOff; + handCard2.BattleCardView.UpdateMovability(); + } + if (base.IsSelfTurn) + { + BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + } + + public override VfxBase MoveToHand(List cardsToMoveToHand) + { + return SequentialVfxPlayer.Create(new OpponentDrawCardToHandVfx(cardsToMoveToHand.ToList(), 0.3f), InstantVfx.Create(delegate + { + UpdateHandCardsPlayability(); + })); + } + + public override EffectBattle GetSkillEffect(string skillEffectPath) + { + return GameMgr.GetIns().GetEffectMgr().GetEnemyEffectBattle(skillEffectPath); + } + + public override Vector3 GetFieldCenterPosition() + { + return FIELD_CENTER_POSITION; + } + + public override VfxBase TurnStartDraw(SkillProcessor skillProcessor) + { + return base.TurnStartDraw(skillProcessor); + } + + public void CallRecordingMulliganEnd(List cardIndexList) + { + this.OnMulliganEndForReplay.Call(cardIndexList); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleFinishParam.cs b/SVSim.BattleEngine/Engine/BattleFinishParam.cs new file mode 100644 index 0000000..a114cd3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleFinishParam.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using Wizard; + +public class BattleFinishParam : BaseParam +{ + public int class_id; + + public int total_turn; + + public int evolve_count; + + public int enemy_evolve_count; + + public int battle_result; + + public int is_retire; + + public Dictionary mission; + + public string recovery_data; + + public int SDTRB; + + public string[] prosessing_time_data; +} diff --git a/SVSim.BattleEngine/Engine/BattleFinishResponsProcessing.cs b/SVSim.BattleEngine/Engine/BattleFinishResponsProcessing.cs new file mode 100644 index 0000000..128b017 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleFinishResponsProcessing.cs @@ -0,0 +1,125 @@ +using LitJson; +using Wizard; + +public class BattleFinishResponsProcessing +{ + public void Processing(JsonData ResponseData, MatchFinishBase matchFinishData) + { + matchFinishData.IsProcessed = true; + if (GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.RankBattle && Data.CurrentFormat != Format.Crossover) + { + if (ResponseData["data"].Keys.Contains("target_grand_master_point")) + { + UserRank.IsGrandMasterAvailability = true; + } + else + { + UserRank.IsGrandMasterAvailability = false; + } + } + Data.RedEtherCampaignResultData = null; + if (GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumNormal || GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumTwoPick || GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumHof || GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumWindFall || GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumAvatar) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.None; + } + RankMatchFinishDetail rankMatchFinishDetail = matchFinishData as RankMatchFinishDetail; + matchFinishData._responseData = ResponseData; + JsonData jsonData = ResponseData["data"]; + foreach (string key in jsonData.Keys) + { + JsonData jsonData2 = jsonData[key.ToString()]; + if (jsonData2 == null) + { + if (key.ToString() == "user_promotion_match" && UserRank.IsGrandMasterAvailability && PlayerStaticData.IsMasterRankCurrentFormat()) + { + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.is_promotion = false; + } + continue; + } + switch (key.ToString()) + { + case "battle_result": + switch (jsonData2.ToInt()) + { + case 0: + matchFinishData.battleResult = BattleManagerBase.BATTLE_RESULT_TYPE.LOSE; + break; + case 1: + matchFinishData.battleResult = BattleManagerBase.BATTLE_RESULT_TYPE.WIN; + break; + case 2: + matchFinishData.battleResult = BattleManagerBase.BATTLE_RESULT_TYPE.CONSISTENCY; + break; + } + (BattleManagerBase.GetIns() as NetworkBattleManagerBase).BattleResultType = matchFinishData.battleResult; + break; + case "get_class_experience": + matchFinishData.get_class_chara_experience = jsonData2.ToInt(); + break; + case "class_experience": + matchFinishData.class_chara_experience = jsonData2.ToInt(); + break; + case "class_level": + matchFinishData.class_chara_level = jsonData2.ToInt(); + break; + case "achieved_info": + matchFinishData.AchievedInfo.Read(jsonData2); + break; + case "is_master_rank": + Data.Load.data._userRank[(int)Data.CurrentFormat].is_master_rank = jsonData2.ToInt() != 0; + break; + case "is_grand_master_rank": + Data.Load.data._userRank[(int)Data.CurrentFormat].is_grand_master_rank = jsonData2.ToInt() != 0; + break; + case "user_promotion_match": + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.match_count = jsonData2["match_count"].ToInt(); + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.battle_result = jsonData2["battle_result"].ToInt(); + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.win = jsonData2["win"].ToInt(); + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.lose = jsonData2["lose"].ToInt(); + Data.Load.data._userRank[(int)Data.CurrentFormat].user_promotion_match.is_promotion = jsonData2["is_promotion"].ToBoolean(); + break; + case "current_grand_master_point": + Data.Load.data._userRank[(int)Data.CurrentFormat].grandMasterData.currentMasterPoint = jsonData2.ToInt(); + UserRank.IsGrandMasterAvailability = true; + break; + case "target_grand_master_point": + Data.Load.data._userRank[(int)Data.CurrentFormat].grandMasterData.targetMasterPoint = jsonData2.ToInt(); + UserRank.IsGrandMasterAvailability = true; + break; + case "reward_list": + PlayerStaticData.UpdateHaveUserGoodsNumByJsonData(jsonData2); + break; + case "colosseum_special_params": + if (jsonData2.Keys.Contains("next_round")) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.None; + if (jsonData2["next_round"].ToInt() == 2) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.GroupA; + } + else if (jsonData2["next_round"].ToInt() == 3) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.Final; + } + } + else if (jsonData2.Keys.Contains("is_champion") && jsonData2["is_champion"].ToBoolean()) + { + Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.Clear; + } + break; + case "red_ether_campagin_info": + Data.RedEtherCampaignResultData = new RedEtherCampaignResultData(jsonData2); + break; + case "battle_dialog_list": + if (rankMatchFinishDetail != null) + { + rankMatchFinishDetail.HomeDialogData = new MyPageHomeDialogData(ResponseData["data"], "battle_dialog_list"); + } + break; + case "upgrade_treasure_box_info": + matchFinishData.TreasureBoxCpResultInfo.Parse(jsonData2); + break; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/BattleFinishSendBase.cs b/SVSim.BattleEngine/Engine/BattleFinishSendBase.cs new file mode 100644 index 0000000..6de0fa6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleFinishSendBase.cs @@ -0,0 +1,49 @@ +using System; +using Cute; +using Wizard; + +public class BattleFinishSendBase +{ + private FinishTaskBase _finishTaskBase; + + private Action _onSuccess; + + private NetworkManager _networkManager; + + private BattleManagerBase _battleMgr; + + public BattleFinishSendBase(BattleManagerBase mgr) + { + _networkManager = Toolbox.NetworkManager; + _battleMgr = mgr; + } + + public void SendMatchingFinish(FinishTaskBase finishTaskBase, Action callbackOnSuccess) + { + _finishTaskBase = finishTaskBase; + SettingFinishBattleParameter(finishTaskBase); + _onSuccess = callbackOnSuccess; + StartMatchingFinish(); + } + + private void StartMatchingFinish() + { + LocalLog.AccumulateLastTraceLog("StartMatchingFinish"); + BattleCoroutine.GetInstance().StartCoroutine(_networkManager.Connect(_finishTaskBase, _onSuccess, CallbackOnFailure, null, encrypt: true, useJson: false, showLoadingIcon: false)); + } + + public void CallbackOnFailure(NetworkTask.ResultCode result) + { + LocalLog.AccumulateTraceLog("CallbackOnFailure" + result); + } + + private void SettingFinishBattleParameter(FinishTaskBase data) + { + int cumulativeEvolutionCount = _battleMgr.BattlePlayer._cumulativeEvolutionCount; + int cumulativeEvolutionCount2 = _battleMgr.BattleEnemy._cumulativeEvolutionCount; + int battle_result = ((!_battleMgr.BattlePlayer.Class.IsDead) ? 1 : 0); + int is_retire = (_battleMgr.IsPlayerRetire ? 1 : 0); + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + data.SettingFinishBattleParameter(dataMgr.GetPlayerClassId(), _battleMgr.BattlePlayer.Turn, cumulativeEvolutionCount, cumulativeEvolutionCount2, battle_result, is_retire); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleFinishToOpponentDisConnectChecker.cs b/SVSim.BattleEngine/Engine/BattleFinishToOpponentDisConnectChecker.cs new file mode 100644 index 0000000..5ec3d6b --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleFinishToOpponentDisConnectChecker.cs @@ -0,0 +1,149 @@ +using System; +using Cute; +using Wizard; + +public class BattleFinishToOpponentDisConnectChecker : NetworkBattleIntervalCheckerBase +{ + private NetworkBattleManagerBase networkBattleManager; + + private DialogBase BattleFinishWaitDialog; + + private SystemText _systemText; + + private int _dispScene; + + private const int WINDOW_DISP_WAIT = 0; + + private const int WINDOW_UPDATE = 1; + + private const int FINISH_SEND_WAIT = 2; + + private const int FINISH_OPPONENT_DISCONNECT_INTERVAL = 8; + + private const int FINISH_OPPONENT_DISP_COUNTER_INTERVAL = 98; + + private const int FINISH_BATTLE_SEND_INTERVAL = 128; + + private bool _isDisconnect; + + public bool IsStart { get; private set; } + + public event Action OnDisConnectWin; + + public BattleFinishToOpponentDisConnectChecker(NetworkBattleManagerBase manager) + { + networkBattleManager = manager; + _systemText = Data.SystemText; + } + + public override void StartChecker(string log = "") + { + if (BattleFinishWaitDialog == null) + { + LocalLog.AccumulateTraceLog("#6911825CreateBattleFinishWaitDialog" + log); + } + base.StartChecker(); + IsStart = true; + CreateBattleFinishWaitDialog(); + BattleFinishWaitDialog.SetActive(inActive: false); + UIManager.GetInstance().closeInSceneNotNetwork(); + } + + public override void StopChecker() + { + base.StopChecker(); + if (BattleFinishWaitDialog != null) + { + BattleFinishWaitDialog.Close(); + LocalLog.AccumulateTraceLog("#691182DialogCloseStopChecker"); + } + UIManager.GetInstance().closeInSceneNotNetwork(); + } + + protected override void IntervalCheck() + { + base.IntervalCheck(); + switch (_dispScene) + { + case 0: + if (!networkBattleManager.VfxMgr.IsEnd) + { + InitTimer(); + } + else if (NetworkUtility.GetTimeSpanSecond(base.startTick) >= 8) + { + if (networkBattleManager.disconnectToLoseChecker.IsDisconnect()) + { + ShowDisconnectAlert(); + } + _dispScene++; + } + break; + case 1: + if (networkBattleManager.disconnectToLoseChecker.IsDisconnect()) + { + ShowDisconnectAlert(); + break; + } + ShowBattleFinishWaitDialog(); + if (NetworkUtility.GetTimeSpanSecond(base.startTick) <= 98) + { + int num = 98 - NetworkUtility.GetTimeSpanSecond(base.startTick); + BattleFinishWaitDialog.SetText(_systemText.Get("Battle_0425", num.ToString() ?? "")); + } + else + { + BattleFinishWaitDialog.SetText(_systemText.Get("Battle_0426")); + _dispScene++; + } + break; + case 2: + if (NetworkUtility.GetTimeSpanSecond(base.startTick) >= 128) + { + BattleFinishWaitDialog.Close(); + LocalLog.AccumulateTraceLog("#691182DialogClose"); + this.OnDisConnectWin.Call(); + StopChecker(); + } + break; + } + } + + private void ShowDisconnectAlert() + { + BattleFinishWaitDialog.SetActive(inActive: false); + if (!_isDisconnect) + { + _isDisconnect = true; + UIManager.GetInstance().closeInSceneNotNetwork(); + BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.ShowAlert(PanelMgr.BattleAlertType.DisconnectInfomation, isClass: false); + } + } + + private void ShowBattleFinishWaitDialog() + { + if (!BattleFinishWaitDialog.gameObject.activeSelf) + { + LocalLog.AccumulateTraceLog("#691182ShowBattleFinishWaitDialog"); + } + BattleFinishWaitDialog.SetActive(inActive: true); + if (_isDisconnect) + { + _isDisconnect = false; + UIManager.GetInstance().createInSceneNotNetwork(); + BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.OffNotHideAndNotCreate(); + BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.HideAlertDialogue(); + } + } + + private void CreateBattleFinishWaitDialog() + { + UIManager.GetInstance().closeInSceneNotNetwork(); + UIManager.GetInstance().createInSceneNotNetwork(); + BattleFinishWaitDialog = UIManager.GetInstance().CreateDialogClose(); + BattleFinishWaitDialog.SetTitleLabel(Data.SystemText.Get("Battle_0423")); + BattleFinishWaitDialog.SetButtonLayout(DialogBase.ButtonLayout.NONE); + BattleFinishWaitDialog.SetFadeButtonEnabled(flag: false); + BattleFinishWaitDialog.SetPanelDepth(5000); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleKeywordInfoListMgr.cs b/SVSim.BattleEngine/Engine/BattleKeywordInfoListMgr.cs new file mode 100644 index 0000000..c0cb71a --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleKeywordInfoListMgr.cs @@ -0,0 +1,423 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using UnityEngine; +using Wizard; +using Wizard.Battle.View; + +public class BattleKeywordInfoListMgr : MonoBehaviour +{ + private const string KEYWORD = "KEYWORD"; + + private static readonly string[] KEYWORD_PATTERNS = new string[2] { "\\[u\\]\\[(ffcd45|524522)\\](?.*?)\\[-\\]\\[/u\\]", "\\[b\\](?.*?)\\[/b\\]" }; + + private static readonly string KEYWORD_TITLE_REMOVE_PATTERN = "<<\\{me.hand_self.count\\}\\+\\d\\?\\?>>"; + + private const int LABEL_KEYWORD = 0; + + private const int LABEL_DESC = 1; + + private const int LINE_SPRITE = 0; + + private const int PADDING_OBJECT = 1; + + private const int LINE_SPRITE_OFFSET = -12; + + private const int CLASS_EFFECT_TABLE_PADDING_Y = 30; + + private const int CLASS_EFFECT_FONT_SIZE = 21; + + [SerializeField] + public UIScrollView ScrollView; + + [SerializeField] + private NguiObjs SkillInfo; + + [SerializeField] + public UITable _table; + + [SerializeField] + private UIPanel _panel; + + private IList SkillInfoList = new List(); + + private Action ResetTableFinishAction; + + public static IList GetKeywords(CardParameter cardParameter) + { + return GetKeywords(cardParameter.SkillDescription + cardParameter.EvoSkillDescription); + } + + public static IList GetKeywords(string skillDescription) + { + List list = new List(); + for (int i = 0; i < KEYWORD_PATTERNS.Length; i++) + { + foreach (Match item in Regex.Matches(skillDescription, KEYWORD_PATTERNS[i])) + { + string value = item.Groups["KEYWORD"].Value; + if (!list.Contains(value)) + { + list.Add(value); + } + } + } + return list; + } + + public void SetKeywordInfos(IList currentWords, CardMaster.CardMasterId cardMasterId) + { + List list = new List(); + for (int i = 0; i < currentWords.Count; i++) + { + string keywordTitle = string.Empty; + string skillinfo = string.Empty; + string text = currentWords[i]; + string valueOrDefault = Data.Master.BattleKeywordReplaceDic.GetValueOrDefault(text, text); + if (GetKeywordData(valueOrDefault, cardMasterId, out keywordTitle, out skillinfo) && !list.Contains(keywordTitle)) + { + AddKeywordInfo(keywordTitle, skillinfo, LabelDefine.TEXT_COLOR_KEYWORD, cardMasterId); + list.Add(keywordTitle); + } + } + StartCoroutine(RepositionTable()); + } + + public void SetBuffInfos(List baseCardID, List buff) + { + string empty = string.Empty; + for (int i = 0; i < baseCardID.Count; i++) + { + empty = ((CardMaster.GetInstanceForBattle().GetCardParameterFromId(baseCardID[i]).CardName != null && !(CardMaster.GetInstanceForBattle().GetCardParameterFromId(baseCardID[i]).CardName == string.Empty)) ? CardMaster.GetInstanceForBattle().GetCardParameterFromId(baseCardID[i]).CardName : Data.SystemText.Get("BattleLog_0097")); + AddKeywordInfo(empty, buff[i], LabelDefine.TEXT_COLOR_NORMAL, CardMaster.BatttleCardMasterId); + } + StartCoroutine(RepositionTable()); + } + + public IEnumerator RepositionTable() + { + yield return null; + _table.Reposition(); + ScrollView.verticalScrollBar.value = 0f; + ScrollView.ResetPosition(); + if (ResetTableFinishAction != null) + { + ResetTableFinishAction(); + } + } + + public void AddKeywordInfo(string keyword, string desc, Color32 keywordColor, CardMaster.CardMasterId cardMasterId, bool isClassEffect = false, Action onClickCardName = null, bool isKeyWordDisp = true) + { + NguiObjs nguiObjs = UnityEngine.Object.Instantiate(SkillInfo); + keyword = Regex.Replace(keyword, KEYWORD_TITLE_REMOVE_PATTERN, ""); + if (isClassEffect) + { + nguiObjs.labels[0].fontSize = 21; + nguiObjs.labels[1].fontSize = 21; + } + nguiObjs.transform.parent = _table.transform; + nguiObjs.labels[0].text = keyword; + nguiObjs.labels[0].color = keywordColor; + nguiObjs.labels[1].SetWrapText(desc); + nguiObjs.transform.localScale = new Vector3(1f, 1f, 1f); + nguiObjs.gameObject.name = SkillInfoList.Count.ToString(); + nguiObjs.gameObject.SetActive(value: true); + if (isClassEffect) + { + GameObject gameObject = new GameObject("paddingObject"); + gameObject.transform.SetParent(nguiObjs.labels[0].gameObject.transform); + gameObject.transform.localPosition = Vector3.zero; + gameObject.transform.localScale = Vector3.one; + UISprite uISprite = gameObject.AddComponent(); + uISprite.alpha = 0f; + uISprite.height = 30; + gameObject.transform.localPosition = new Vector3(nguiObjs.labels[0].width / 2, gameObject.transform.localPosition.y); + nguiObjs.objs.Add(gameObject); + if (SkillInfoList.Count == 0) + { + gameObject.SetActive(value: false); + } + BoxCollider boxCollider = nguiObjs.labels[1].gameObject.AddComponent(); + boxCollider.size = new Vector3(nguiObjs.labels[1].width, nguiObjs.labels[1].height); + boxCollider.center = new Vector3(nguiObjs.labels[1].width / 2, -nguiObjs.labels[1].height / 2); + List keyWordList = BattlePlayerView.GetKeyWordList(nguiObjs.labels[1].text); + UIEventListener uIEventListener = UIEventListener.Get(nguiObjs.labels[1].gameObject); + uIEventListener.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onClick, (UIEventListener.VoidDelegate)delegate + { + if (keyWordList.Count == 0) + { + onClickCardName(); + } + else + { + BattlePlayerView.CreateClassEffectPanel(keyWordList, cardMasterId); + } + }); + BattlePlayerView.SetKeyWordColor(nguiObjs.labels[1].gameObject, nguiObjs.labels[1]); + BoxCollider boxCollider2 = nguiObjs.labels[0].gameObject.AddComponent(); + boxCollider2.size = new Vector3(nguiObjs.labels[0].width, nguiObjs.labels[0].height); + boxCollider2.center = new Vector3(nguiObjs.labels[0].width / 2, -nguiObjs.labels[0].height / 2); + BattlePlayerView.SetLabelColorEvent(nguiObjs.labels[0]); + UIEventListener uIEventListener2 = UIEventListener.Get(nguiObjs.labels[0].gameObject); + uIEventListener2.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener2.onClick, (UIEventListener.VoidDelegate)delegate + { + onClickCardName(); + }); + if (!isKeyWordDisp) + { + nguiObjs.labels[0].gameObject.SetActive(value: false); + nguiObjs.labels[1].transform.localPosition = new Vector3(nguiObjs.labels[1].transform.localPosition.x, nguiObjs.labels[0].transform.localPosition.y); + SkillInfoList[SkillInfoList.Count - 1].objs[0].SetActive(value: false); + } + boxCollider.gameObject.AddComponent().scrollView = ScrollView; + boxCollider2.gameObject.AddComponent().scrollView = ScrollView; + UILabel uILabel = nguiObjs.labels[1]; + uILabel.topAnchor.target = null; + uILabel.bottomAnchor.target = null; + uILabel.leftAnchor.target = null; + uILabel.rightAnchor.target = null; + UISprite component = nguiObjs.objs[0].GetComponent(); + component.topAnchor.target = null; + component.bottomAnchor.target = null; + component.leftAnchor.target = null; + component.rightAnchor.target = null; + component.transform.localPosition = new Vector3(component.transform.localPosition.x, uILabel.transform.localPosition.y - (float)uILabel.height + -12f); + } + SkillInfoList.Add(nguiObjs); + } + + public void RemoveKeyWord(int index) + { + bool activeSelf = SkillInfoList[index].labels[0].gameObject.activeSelf; + UnityEngine.Object.Destroy(SkillInfoList[index].gameObject); + if (SkillInfoList.Count > index + 1) + { + if (!SkillInfoList[index + 1].labels[0].gameObject.activeSelf) + { + Vector3 localPosition = SkillInfoList[index + 1].labels[1].transform.localPosition; + if (activeSelf) + { + SkillInfoList[index + 1].labels[0].gameObject.SetActive(value: true); + } + SkillInfoList[index + 1].labels[1].transform.localPosition = new Vector3(localPosition.x, SkillInfoList[index + 1].labels[0].transform.localPosition.y - (float)SkillInfoList[index + 1].labels[0].height); + SkillInfoList[index + 1].objs[0].transform.localPosition = new Vector3(SkillInfoList[index + 1].objs[0].transform.localPosition.x, -72 - SkillInfoList[index + 1].labels[1].height + -12); + } + } + else if (index - 1 > 0) + { + bool flag = false; + bool flag2 = false; + if (SkillInfoList[index - 1].labels[0].gameObject.activeSelf) + { + flag = true; + if (index + 1 < SkillInfoList.Count && !SkillInfoList[index + 1].labels[0].gameObject.activeSelf) + { + flag2 = true; + } + } + if (flag && !flag2) + { + SkillInfoList[index - 1].objs[0].SetActive(value: true); + } + } + SkillInfoList.RemoveAt(index); + if (SkillInfoList.Count != 0) + { + SkillInfoList[0].objs[1].SetActive(value: false); + } + if (base.gameObject.activeInHierarchy) + { + StartCoroutine(RepositionTable()); + } + } + + public void AddKeywordInfo(BattleCardBase card, string keyword, string desc, Color32 keywordColor) + { + NguiObjs nguiObjs = UnityEngine.Object.Instantiate(SkillInfo); + nguiObjs.transform.parent = _table.transform; + nguiObjs.labels[0].text = keyword; + nguiObjs.labels[0].color = keywordColor; + nguiObjs.labels[1].SetWrapText(desc); + nguiObjs.transform.localScale = new Vector3(1f, 1f, 1f); + nguiObjs.gameObject.name = SkillInfoList.Count.ToString(); + nguiObjs.gameObject.SetActive(value: true); + UIRect[] componentsInChildren = nguiObjs.gameObject.GetComponentsInChildren(); + for (int i = 0; i < componentsInChildren.Length; i++) + { + componentsInChildren[i].ResetAndUpdateAnchors(); + } + SkillInfoList.Add(nguiObjs); + } + + public void SetScrollView(DialogBase dia) + { + UIPanel component = ScrollView.GetComponent(); + GameObject gameObject = dia.WindowSprite.gameObject; + GameObject gameObject2 = dia.titleLine.gameObject; + component.topAnchor.target = gameObject2.transform; + component.topAnchor.relative = 0f; + component.topAnchor.absolute = -10; + component.bottomAnchor.target = gameObject.transform; + component.bottomAnchor.relative = 0f; + component.bottomAnchor.absolute = 25; + component.leftAnchor.target = gameObject.transform; + component.leftAnchor.relative = 0f; + component.leftAnchor.absolute = 25; + component.rightAnchor.target = gameObject.transform; + component.rightAnchor.relative = 1f; + component.rightAnchor.absolute = -25; + gameObject.GetComponent().scrollView = ScrollView; + component.UpdateAnchors(); + } + + private bool GetKeywordData(string skill, CardMaster.CardMasterId cardMasterId, out string keywordTitle, out string skillinfo) + { + keywordTitle = string.Empty; + skillinfo = string.Empty; + if (Data.Master.BattleKeyWordDic.ContainsKey(skill)) + { + string skillToLower = skill.ToLower(); + KeyValuePair keyValuePair = Data.Master.BattleKeyWordDic.First((KeyValuePair data) => data.Key.ToLower() == skillToLower); + keywordTitle = keyValuePair.Key; + skillinfo = keyValuePair.Value; + List cardIdsInDesc = GetCardIdsInDesc(skillinfo); + if (cardIdsInDesc.Count > 0) + { + skillinfo = string.Empty; + for (int num = 0; num < cardIdsInDesc.Count; num++) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(cardMasterId).GetCardParameterFromId(cardIdsInDesc[num]); + if (num > 0) + { + skillinfo += "\n"; + skillinfo += Data.SystemText.Get("Card_0198_BattleKeyWord_01", cardParameterFromId.CardName); + skillinfo += "\n"; + } + skillinfo += GetCardDescText(cardParameterFromId); + } + } + skillinfo = skillinfo.Trim(); + return true; + } + return false; + } + + public static string GetCardDescText(CardParameter param) + { + string empty = string.Empty; + string clanNameByKey = GameMgr.GetIns().GetDataMgr().GetClanNameByKey((int)param.Clan); + string cardTypeName = CardBasePrm.GetCardTypeName(param.CharType); + empty = ((!(param.TribeName == "ALL")) ? (Data.SystemText.Get("Card_0200_BattleKeyWord_03", param.Cost.ToString(), clanNameByKey, param.TribeName, cardTypeName) + "\n") : (Data.SystemText.Get("Card_0199_BattleKeyWord_02", param.Cost.ToString(), clanNameByKey, cardTypeName) + "\n")); + if (param.CharType == CardBasePrm.CharaType.NORMAL || param.CharType == CardBasePrm.CharaType.EVOLUTION) + { + if (!param.IsEvolveChoiceCard) + { + empty = empty + Data.SystemText.Get("Card_0201_BattleKeyWord_04", param.Atk.ToString(), param.Life.ToString()) + "\n"; + if (param.ConvertedSkillDescription != string.Empty) + { + empty = empty + ConvertKeywordsInText(param.ConvertedSkillDescription) + "\n"; + } + } + empty = empty + Data.SystemText.Get("Card_0202_BattleKeyWord_05") + "\n"; + empty = empty + Data.SystemText.Get("Card_0201_BattleKeyWord_04", param.EvoAtk.ToString(), param.EvoLife.ToString()) + "\n"; + if (param.ConvertedEvoSkillDescription != string.Empty) + { + empty = empty + ConvertKeywordsInText(param.ConvertedEvoSkillDescription) + "\n"; + } + } + else + { + empty = empty + ConvertKeywordsInText(param.ConvertedSkillDescription) + "\n"; + } + return empty; + } + + private static string ConvertKeywordsInText(string skilldisc) + { + List list = new List(); + List list2 = new List(); + for (int i = 0; i < KEYWORD_PATTERNS.Length; i++) + { + foreach (Match item2 in Regex.Matches(skilldisc, KEYWORD_PATTERNS[i])) + { + string item = Regex.Escape(item2.Value); + if (list.Contains(item)) + { + continue; + } + string value = item2.Groups["KEYWORD"].Value; + if (Data.Master.BattleKeyWordDic.ContainsKey(value)) + { + List cardIdsInDesc = GetCardIdsInDesc(Data.Master.BattleKeyWordDic[value]); + list.Add(item); + if (cardIdsInDesc.Count > 0) + { + list2.Add(Data.SystemText.Get("Card_0203_BattleKeyWord_06", value)); + } + else + { + list2.Add(value); + } + } + } + } + for (int j = 0; j < list.Count; j++) + { + skilldisc = Regex.Replace(skilldisc, list[j], list2[j]); + } + return Global.ConvertToWithoutBBCode(skilldisc); + } + + public static List GetCardIdsInDesc(string desc) + { + string text = "KEYWORD"; + string pattern = "\\[card\\](?<" + text + ">.*?)\\[/card\\]"; + List list = new List(); + foreach (Match item2 in Regex.Matches(desc, pattern)) + { + int item = int.Parse(item2.Groups[text].Value); + if (!list.Contains(item)) + { + list.Add(item); + } + } + return list; + } + + public List GetKeyWordNameList() + { + List list = new List(SkillInfoList.Count); + for (int i = 0; i < SkillInfoList.Count; i++) + { + list.Add(SkillInfoList[i].labels[0].text); + } + return list; + } + + public IList GetSkillInfoList() + { + return SkillInfoList; + } + + public float GetScrollViewSizeY() + { + return ScrollView.GetComponent().GetViewSize().y; + } + + public void SetResetTableFinishAction(Action inAction) + { + ResetTableFinishAction = inAction; + } + + public void SetKeyWordFocus(float inScrollBarValue) + { + ScrollView.verticalScrollBar.value = inScrollBarValue; + } + + public void SetPanelDepth(int depth) + { + _panel.depth = depth; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleLifeTimeSharedObject.cs b/SVSim.BattleEngine/Engine/BattleLifeTimeSharedObject.cs new file mode 100644 index 0000000..68877ee --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleLifeTimeSharedObject.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; + +public class BattleLifeTimeSharedObject +{ + private Dictionary _skillBuildInfoSharedObject; + + public BattleLifeTimeSharedObject() + { + _skillBuildInfoSharedObject = new Dictionary(); + } + + ~BattleLifeTimeSharedObject() + { + _skillBuildInfoSharedObject.Clear(); + } + + public void SetSkillBuildInfo(string key, SkillCreator.SkillBuildInfo value) + { + if (!_skillBuildInfoSharedObject.ContainsKey(key)) + { + _skillBuildInfoSharedObject.Add(key, value); + } + } + + public SkillCreator.SkillBuildInfo GetSkillBuildInfo(string key) + { + return _skillBuildInfoSharedObject.GetValueOrDefault(key, null); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleLogTextBuilderAttachSkill.cs b/SVSim.BattleEngine/Engine/BattleLogTextBuilderAttachSkill.cs new file mode 100644 index 0000000..30e1396 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleLogTextBuilderAttachSkill.cs @@ -0,0 +1,851 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using Wizard; + +public abstract class BattleLogTextBuilderAttachSkill +{ + private static readonly string COST_MAX = "cost.max"; + + private const string OP_INPLAY_UNIT_COUNT = "op.inplay.unit.count"; + + private const string ME_INPLAY = "me.inplay"; + + private const string ME_HAND = "me.hand"; + + private const string ME_INPLAY_UNIT = "me.inplay.unit"; + + private const string ME_INPLAY_CLASS_EP = "me.inplay.class.ep"; + + private const string ME_HAND_COUNT = "me.hand.count"; + + private const string PLAYED_CARD = "played_card"; + + private const string ME_INPLAY_SELF = "me.inplay_self.count"; + + private const string ME_INPLAY_CLASS_PP = "me.inplay.class.pp"; + + private const string ME_TURN_COUNT = "{me.inplay.class.turn}"; + + private const string ME_DECK_NOT_DUPLICATION = "me.deck.unique_base_card_id_card"; + + public abstract string BuildTextAttachSkill(SkillBase attachedSkill, bool isBuffText, bool isNow); + + public static string _GetSpecificCardCostInformation(SkillBase skill, bool isTarget) + { + if (isTarget) + { + if (skill.ApplyCardFilterList.Any((ISkillCardFilter f) => f is SkillParameterCostFilter)) + { + SkillParameterCostFilter skillParameterCostFilter = skill.ApplyCardFilterList.First((ISkillCardFilter f) => f is SkillParameterCostFilter) as SkillParameterCostFilter; + if (skillParameterCostFilter.GetParameterText().Contains(COST_MAX)) + { + return Data.SystemText.Get("BattleLog_0165"); + } + if (skillParameterCostFilter.GetParameterOptionText() == ">=") + { + return Data.SystemText.Get("BattleLog_0182", skillParameterCostFilter.GetParameterText()); + } + if (skillParameterCostFilter.GetParameterOptionText() == "<=") + { + return Data.SystemText.Get("BattleLog_0230", skillParameterCostFilter.GetParameterText()); + } + } + if (skill.ApplyCardFilterList.Any((ISkillCardFilter f) => f is SkillParameterBaseCostFilter)) + { + SkillParameterBaseCostFilter skillParameterBaseCostFilter = skill.ApplyCardFilterList.FirstOrDefault((ISkillCardFilter f) => f is SkillParameterBaseCostFilter) as SkillParameterBaseCostFilter; + if (skillParameterBaseCostFilter.GetParameterOptionText() == "<=") + { + return Data.SystemText.Get("BattleLog_0164", skillParameterBaseCostFilter.GetParameterText()); + } + } + } + else if (skill.ConditionFilterCollection.VariableCompareFilter.Count > 0) + { + string text = skill.ConditionFilterCollection.VariableCompareFilter.First().Lhs.Trim('{', '}'); + VariableSkillFilterCollection variableSkillFilterCollection = new VariableSkillFilterCollection(); + SkillFilterCreator.SetupVariable(variableSkillFilterCollection, text, skill.SkillPrm.ownerCard, skill); + if (variableSkillFilterCollection.CardFilterList.Any((ISkillCardFilter f) => f is SkillParameterBaseCostFilter)) + { + SkillParameterBaseCostFilter skillParameterBaseCostFilter2 = variableSkillFilterCollection.CardFilterList.First((ISkillCardFilter f) => f is SkillParameterBaseCostFilter) as SkillParameterBaseCostFilter; + if (skillParameterBaseCostFilter2.GetParameterOptionText() == "<=") + { + return Data.SystemText.Get("BattleLog_0164", skillParameterBaseCostFilter2.GetParameterText()); + } + if (skillParameterBaseCostFilter2.GetParameterOptionText() == "=") + { + return Data.SystemText.Get("BattleLog_0194", skillParameterBaseCostFilter2.GetParameterText()); + } + } + } + return ""; + } + + public static string _GetCardTypeByFilterList(List filters) + { + if (filters.Any((ISkillCardFilter f) => f is SkillUnitFilter)) + { + return Data.SystemText.Get("BattleLog_0172"); + } + if (filters.Any((ISkillCardFilter f) => f is SkillSpellFilter)) + { + return Data.SystemText.Get("BattleLog_0173"); + } + if (filters.Any((ISkillCardFilter f) => f is SkillChantFieldFilter)) + { + return Data.SystemText.Get("BattleLog_0176"); + } + if (filters.Any((ISkillCardFilter f) => f is SkillFieldFilter)) + { + return Data.SystemText.Get("BattleLog_0175"); + } + if (filters.Any((ISkillCardFilter f) => f is SkillSpellAndFieldFilter)) + { + return Data.SystemText.Get("BattleLog_0183"); + } + return string.Empty; + } + + public static string _GetSpecificCardType(SkillBase skill, bool isTarget) + { + if (isTarget) + { + string text = _GetCardTypeByFilterList(skill.ApplyCardFilterList); + if (text != string.Empty) + { + return text; + } + } + else + { + if (skill.ConditionCardFilterList.Count > 0) + { + string text = _GetCardTypeByFilterList(skill.ConditionCardFilterList); + if (text != string.Empty) + { + return text; + } + } + if (skill.ConditionFilterCollection.VariableCompareFilter.Count > 0) + { + string text2 = skill.ConditionFilterCollection.VariableCompareFilter.First().Lhs.Trim('{', '}'); + VariableSkillFilterCollection variableSkillFilterCollection = new VariableSkillFilterCollection(); + SkillFilterCreator.SetupVariable(variableSkillFilterCollection, text2, skill.SkillPrm.ownerCard, skill); + if (variableSkillFilterCollection.CardFilterList.Count > 0) + { + string text = _GetCardTypeByFilterList(variableSkillFilterCollection.CardFilterList); + if (text != string.Empty) + { + return text; + } + } + } + } + return Data.SystemText.Get("BattleLog_0174"); + } + + public static string _GetSpecificCardTribeClan(SkillBase skill, bool isTarget) + { + if (isTarget) + { + if (skill.ApplyCardFilterList.Any((ISkillCardFilter f) => f is SkillClanFilter)) + { + SkillClanFilter skillClanFilter = skill.ApplyCardFilterList.First((ISkillCardFilter f) => f is SkillClanFilter) as SkillClanFilter; + string clanNameByKey = GameMgr.GetIns().GetDataMgr().GetClanNameByKey((int)skillClanFilter._clan); + string text = ((skillClanFilter.OptionText == SkillFilterCreator.NOTEQUAL) ? Data.SystemText.Get("BattleLog_0238") : ""); + return Data.SystemText.Get("BattleLog_0234", clanNameByKey, text); + } + if (skill.ApplyCardFilterList.Any((ISkillCardFilter f) => f is SkillTribeFilter)) + { + return DataMgr.GetTribeNameByKey((int)(skill.ApplyCardFilterList.First((ISkillCardFilter f) => f is SkillTribeFilter) as SkillTribeFilter)._type); + } + } + else + { + if (skill.ConditionCardFilterList.Any((ISkillCardFilter f) => f is SkillClanFilter)) + { + SkillClanFilter skillClanFilter2 = skill.ConditionCardFilterList.First((ISkillCardFilter f) => f is SkillClanFilter) as SkillClanFilter; + return GameMgr.GetIns().GetDataMgr().GetClanNameByKey((int)skillClanFilter2._clan); + } + if (skill.ConditionCardFilterList.Any((ISkillCardFilter f) => f is SkillTribeFilter)) + { + return DataMgr.GetTribeNameByKey((int)(skill.ConditionCardFilterList.First((ISkillCardFilter f) => f is SkillTribeFilter) as SkillTribeFilter)._type); + } + if (skill.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter f) => f.Lhs.Contains(SkillFilterCreator.ContentKeyword.tribe.ToString()))) + { + string text2 = skill.ConditionFilterCollection.VariableCompareFilter.FirstOrDefault((SkillVariableComareFilter f) => f.Lhs.Contains(SkillFilterCreator.ContentKeyword.tribe.ToString())).Lhs.Trim('{', '}'); + VariableSkillFilterCollection variableSkillFilterCollection = new VariableSkillFilterCollection(); + SkillFilterCreator.SetupVariable(variableSkillFilterCollection, text2, skill.SkillPrm.ownerCard, skill); + ISkillCardFilter skillCardFilter = variableSkillFilterCollection.CardFilterList.FirstOrDefault((ISkillCardFilter f) => f is SkillTribeFilter); + if (skillCardFilter != null) + { + return DataMgr.GetTribeNameByKey((int)(skillCardFilter as SkillTribeFilter)._type); + } + } + } + return ""; + } + + public static string _GetSpecificCardException(SkillBase skill) + { + if (skill.ApplyCardFilterList.Any((ISkillCardFilter f) => f is SkillParameterIdFilter)) + { + SkillParameterIdFilter skillParameterIdFilter = skill.ApplyCardFilterList.First((ISkillCardFilter f) => f is SkillParameterIdFilter) as SkillParameterIdFilter; + if (skillParameterIdFilter.GetOptionText() == "!=") + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(int.Parse(skillParameterIdFilter.GetFilterId().First())); + return Data.SystemText.Get("BattleLog_0166", cardParameterFromId.CardName); + } + } + return ""; + } + + public static string _GetSpecificCardTargetCount(SkillBase skill, bool isTarget) + { + if (!isTarget) + { + return ""; + } + if (skill.ApplySelectFilter is SkillRandomSelectFilter) + { + SkillRandomSelectFilter skillRandomSelectFilter = skill.ApplySelectFilter as SkillRandomSelectFilter; + if (!skillRandomSelectFilter.IsContainVariableValue()) + { + int num = int.Parse(skillRandomSelectFilter.Context); + if (num >= 1) + { + return Data.SystemText.Get("BattleLog_0163", num.ToString()); + } + } + return ""; + } + if (skill.ApplySelectFilter is SkillUserSelectFilter) + { + SkillUserSelectFilter skillUserSelectFilter = skill.ApplySelectFilter as SkillUserSelectFilter; + return Data.SystemText.Get("BattleLog_0163", skillUserSelectFilter.CalcCount(skill.OptionValue).ToString()); + } + if (skill.ApplyingTargetFilter is SkillTargetLastTargetFilter) + { + int num2 = skill.SkillPrm.selfBattlePlayer.SkillInfoLastTargets.Count(); + return Data.SystemText.Get("BattleLog_0163", num2.ToString()); + } + if (skill.ApplyingTargetFilter is SkillTargetSkillDrewCardFilter) + { + int num3 = skill.GetDrewCardInHand().Count(); + return Data.SystemText.Get("BattleLog_0163", num3.ToString()); + } + if (skill.ConditionTargetFilter is SkillTargetPlayedCardFilter) + { + return ""; + } + return Data.SystemText.Get("BattleLog_0171"); + } + + public static string _GetSpecificCard(SkillBase skill, bool isBuffText, bool isTarget) + { + string text = _GetSpecificCardCostInformation(skill, isTarget); + string text2 = _GetSpecificCardTribeClan(skill, isTarget); + string text3 = _GetSpecificCardType(skill, isTarget); + if (skill.ApplyCardFilterList.Any((ISkillCardFilter f) => f is SkillParameterIdFilter)) + { + SkillParameterIdFilter skillParameterIdFilter = skill.ApplyCardFilterList.First((ISkillCardFilter f) => f is SkillParameterIdFilter) as SkillParameterIdFilter; + if (skillParameterIdFilter.GetOptionText() == SkillFilterCreator.EQUAL) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(int.Parse(skillParameterIdFilter.GetFilterId().First())); + text2 = ""; + text3 = cardParameterFromId.CardName; + } + } + string text4 = _GetSpecificCardException(skill); + string text5 = _GetSpecificCardTargetCount(skill, isTarget); + if (isBuffText) + { + string text6 = string.Empty; + if ((isTarget && skill.ApplyCardFilterList.Any((ISkillCardFilter f) => f is SkillTribeFilter)) || (!isTarget && (skill.ConditionCardFilterList.Any((ISkillCardFilter f) => f is SkillTribeFilter) || skill.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter f) => f.Lhs.Contains(SkillFilterCreator.ContentKeyword.tribe.ToString()))))) + { + text6 = Data.SystemText.Get("BattleLog_0252"); + } + return Data.SystemText.Get("BattleLog_0156", text, text2, text3, text4, text5, text6); + } + string text7 = Data.SystemText.Get("BattleLog_0225"); + if (text == string.Empty && text2 == string.Empty && text3 == Data.SystemText.Get("BattleLog_0174") && text4 == string.Empty) + { + text7 = string.Empty; + } + return Data.SystemText.Get("BattleLog_0161", text5, text7); + } + + public static string _GetSkillTarget(SkillBase skill, bool isBuffText) + { + if (skill.ApplyFilterCollection.ApplyAndFilter.Any((ApplySkillTargetFilterCollection f) => f.BattlePlayerFilter is OpponentBattlePlayerFilter && f.CardFilterList.Any((ISkillCardFilter c) => c is SkillUnitFilter)) && skill.ApplyFilterCollection.ApplyAndFilter.Any((ApplySkillTargetFilterCollection f) => f.BattlePlayerFilter is SelfBattlePlayerFilter && f.CardFilterList.Any((ISkillCardFilter c) => c is SkillClassFilter))) + { + return Data.SystemText.Get("BattleLog_0147"); + } + if (skill.ApplyingTargetFilter is SkillTargetBeAttackedFilter) + { + return Data.SystemText.Get("BattleLog_0063"); + } + if (skill.ApplyingTargetFilter is SkillTargetAttackerFilter) + { + return Data.SystemText.Get("BattleLog_0101"); + } + if (skill.ApplyingTargetFilter is SkillTargetFightTargetFilter) + { + return Data.SystemText.Get("BattleLog_0103"); + } + if (skill.ApplyingTargetFilter is SkillTargetSelfFilter) + { + return Data.SystemText.Get("BattleLog_0064"); + } + if (skill.ApplyingTargetFilter is SkillTargetSkillDrewCardFilter) + { + if (isBuffText) + { + return Data.SystemText.Get("BattleLog_0118"); + } + return Data.SystemText.Get("BattleLog_0065"); + } + if (skill.ApplyingTargetFilter is SkillTargetHandOtherSelfFilter || skill.ApplyingTargetFilter is SkillTargetHandFilter) + { + return Data.SystemText.Get("BattleLog_0082", _GetSpecificCard(skill, isBuffText, isTarget: true)); + } + if (skill.ApplyingTargetFilter is SkillTargetDeckFilter) + { + return Data.SystemText.Get("BattleLog_0083", _GetSpecificCard(skill, isBuffText, isTarget: true)); + } + if (skill.ApplyingTargetFilter is SkillTargetSummonedCardFilter) + { + return Data.SystemText.Get("BattleLog_0093"); + } + if (skill.ApplyingTargetFilter is SkillTargetPlayedCardFilter) + { + return Data.SystemText.Get("BattleLog_0118"); + } + if (skill.ApplyingTargetFilter is SkillTargetInPlayFilter) + { + int num = 0; + for (int count = skill.ApplyCardFilterList.Count; num < count; num++) + { + if (skill.ApplyCardFilterList[num] is SkillClassFilter) + { + if (skill.ApplyBattlePlayerFilter is SelfBattlePlayerFilter) + { + return Data.SystemText.Get("BattleLog_0115"); + } + if (skill.ApplyBattlePlayerFilter is OpponentBattlePlayerFilter) + { + return Data.SystemText.Get("BattleLog_0004"); + } + } + else if (skill.ApplyCardFilterList[num] is SkillUnitAndClassFilter) + { + if (skill.ApplySelectFilter != null) + { + if (!(skill.ApplySelectFilter is SkillSelectAllFilter) && !(skill.ApplySelectFilter is SkillSelectNullFilter)) + { + return Data.SystemText.Get("BattleLog_0120"); + } + if (skill.ApplyBattlePlayerFilter is OpponentBattlePlayerFilter) + { + return Data.SystemText.Get("BattleLog_0112"); + } + if (skill.ApplyBattlePlayerFilter is SelfBattlePlayerFilter) + { + return Data.SystemText.Get("BattleLog_0190"); + } + } + else + { + Debug.LogError("ApplySelectFilter is not allowed null!"); + } + } + else + { + if (!(skill.ApplyCardFilterList[num] is SkillUnitFilter)) + { + continue; + } + if (skill.ApplySelectFilter != null) + { + string text = _ConvertSkillConditionCharacter((skill.ApplyBattlePlayerFilter is OpponentBattlePlayerFilter) ? SkillFilterCreator.ContentKeyword.op.ToStringCustom() : SkillFilterCreator.ContentKeyword.me.ToStringCustom()); + if (!(skill.ApplySelectFilter is SkillSelectAllFilter) && !(skill.ApplySelectFilter is SkillSelectNullFilter)) + { + string text2 = _GetSkillTargetCount(skill); + int result = -1; + int.TryParse(text2, out result); + return Data.SystemText.Get("BattleLog_0133", text2, text); + } + return Data.SystemText.Get("BattleLog_0124", text); + } + Debug.LogError("ApplySelectFilter is not allowed null!"); + } + } + return ""; + } + if (skill.ApplyingTargetFilter is SkillTargetInPlayOtherSelfFilter) + { + if (skill.ApplySelectFilter is SkillRandomSelectFilter) + { + return Data.SystemText.Get("BattleLog_0146"); + } + return Data.SystemText.Get("BattleLog_0121"); + } + if (skill.ApplyingTargetFilter is SkillTargetLastTargetFilter) + { + return Data.SystemText.Get("BattleLog_0118"); + } + if (skill.ApplyingTargetFilter is SkillTargetInplaySelfAndClassFilter) + { + return Data.SystemText.Get("BattleLog_0214"); + } + if (!(skill.ApplyingTargetFilter is SkillTargetTokenDrawCardFilter)) + { + _ = skill.ApplyingTargetFilter is SkillTargetReturnCardFilter; + } + return ""; + } + + public static string _GetSkillPeriod(SkillBase skill, bool isNow) + { + if (skill.PreprocessList.FirstOrDefault((SkillPreprocessBase pre) => pre is SkillPreprocessInPlayPeriodOfTime) is SkillPreprocessInPlayPeriodOfTime) + { + if (isNow) + { + return Data.SystemText.Get("BattleLog_0091"); + } + return Data.SystemText.Get("BattleLog_0159"); + } + if (skill.ConditionCheckerList.Any((ISkillConditionChecker a) => a is SkillPreprocessTurnStartStop && (a as SkillPreprocessTurnStartStop).Target == "op")) + { + return Data.SystemText.Get("BattleLog_0189"); + } + if (skill.ConditionCheckerList.Any((ISkillConditionChecker a) => a is SkillConditionTurn && (a as SkillConditionTurn).judgeFlg)) + { + return Data.SystemText.Get("BattleLog_0126"); + } + if (skill.ConditionCheckerList.Any((ISkillConditionChecker a) => a is SkillPreprocessTurnEndStop)) + { + return Data.SystemText.Get("BattleLog_0215"); + } + return ""; + } + + protected static string _GetSkillTiming(SkillBase skill, bool isBuffText) + { + if (skill.IsWhenPlaySkill) + { + return ""; + } + if (skill.IsWhenDestroySkill) + { + return Data.SystemText.Get("BattleLog_0066"); + } + if (skill.IsBeforAttackSkill || skill.IsBeforeAttackSelfAndOtherSkill) + { + if (skill.ConditionCheckerList.Any((ISkillConditionChecker f) => f is SkillConditionAttackerIsOther)) + { + return Data.SystemText.Get("BattleLog_0192"); + } + return Data.SystemText.Get("BattleLog_0067"); + } + if (skill.OnAfterAttackStart != 0) + { + return Data.SystemText.Get("BattleLog_0254"); + } + if (skill.IsWhenFightSkill) + { + return Data.SystemText.Get("BattleLog_0102"); + } + if (skill.OnSelfTurnStartStart != 0) + { + return Data.SystemText.Get("BattleLog_0068"); + } + if (skill.OnSelfTurnEndStart != 0) + { + return Data.SystemText.Get("BattleLog_0069"); + } + if (skill.OnWhenSummonOtherStart != 0) + { + if (skill.ApplyBattlePlayerFilter is SelfBattlePlayerFilter) + { + return Data.SystemText.Get("BattleLog_0092", _GetSpecificCard(skill, isBuffText, isTarget: false)); + } + return ""; + } + if (skill.OnWhenPlayOtherStart != 0) + { + if (skill.ConditionTargetFilter is SkillTargetPlayedCardFilter && skill.ConditionCardFilterList.Any((ISkillCardFilter c) => c is SkillSpellFilter)) + { + return Data.SystemText.Get("BattleLog_0108"); + } + return Data.SystemText.Get("BattleLog_0117", _GetSpecificCard(skill, isBuffText, isTarget: false)); + } + if (skill.OnWhenDamageStart != 0) + { + return Data.SystemText.Get("BattleLog_0127"); + } + if (skill.OnWhenDestroyOtherStart != 0) + { + return Data.SystemText.Get("BattleLog_0257", _GetSpecificCard(skill, isBuffText, isTarget: false)); + } + if (skill.OnWhenDamageStart != 0 && skill.ConditionCheckerList.Any((ISkillConditionChecker c) => c is SkillConditionTurn)) + { + return ""; + } + if (skill.OnWhenDrawOtherStart != 0) + { + return ""; + } + if (skill.OnWhenPpHealStart != 0) + { + return ""; + } + if (skill.OnOpponentTurnEndStart != 0) + { + return ""; + } + if (skill.OnWhenReturnOtherStart != 0) + { + return Data.SystemText.Get("BattleLog_0264"); + } + return ""; + } + + protected static string _GetSkillTargetCount(SkillBase skill) + { + if (skill.ApplySelectFilter != null) + { + return skill.ApplySelectFilter.CalcCount(skill.OptionValue).ToString(); + } + return ""; + } + + protected static string _GetSkillPreProcessText(SkillBase skill) + { + SkillPreprocessBase skillPreprocessBase = skill.PreprocessList.FirstOrDefault((SkillPreprocessBase s) => s is SkillPreprocessUsePp); + if (skillPreprocessBase != null) + { + int consumeValue = (skillPreprocessBase as SkillPreprocessUsePp).ConsumeValue; + return Data.SystemText.Get("BattleLog_0236", consumeValue.ToString()); + } + return string.Empty; + } + + protected static string _GetSkillOptionSetCost(SkillBase skill) + { + int num = skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.set, int.MinValue); + int num2 = skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add, int.MinValue); + if (num != int.MinValue) + { + return num.ToString(); + } + if (num2 != int.MinValue) + { + return num2.ToString(); + } + return ""; + } + + protected static string _GetSkillDetailCondition(SkillBase skill) + { + if (skill.ConditionCheckerList.Any((ISkillConditionChecker f) => f is SkillConditionResonance) && (skill.ConditionCheckerList.First((ISkillConditionChecker f) => f is SkillConditionResonance) as SkillConditionResonance).judgeFlg) + { + return Data.SystemText.Get("BattleLog_0169"); + } + List variableCompareFilter = skill.ConditionFilterCollection.VariableCompareFilter; + if (variableCompareFilter.Count > 0) + { + SkillVariableComareFilter skillVariableComareFilter = variableCompareFilter.First(); + string compare = skillVariableComareFilter.Compare; + string text = skillVariableComareFilter.Lhs.Trim('{', '}'); + VariableSkillFilterCollection variableSkillFilterCollection = new VariableSkillFilterCollection(); + SkillFilterCreator.SetupVariable(variableSkillFilterCollection, text, skill.SkillPrm.ownerCard, skill); + if (text.Contains("me.deck.unique_base_card_id_card")) + { + if (compare == "=") + { + return Data.SystemText.Get("BattleLog_0260"); + } + return Data.SystemText.Get("BattleLog_0259"); + } + if (text.Contains("op.inplay.unit.count")) + { + string rhs = skillVariableComareFilter.Rhs; + if (compare == ">" && rhs == "0") + { + return Data.SystemText.Get("BattleLog_0158"); + } + if (compare == "=" && rhs == "0") + { + return Data.SystemText.Get("BattleLog_0181"); + } + } + else if (variableSkillFilterCollection.CardCountFilter != null && variableSkillFilterCollection.BattlePlayerFilter is SelfBattlePlayerFilter) + { + string rhs2 = skillVariableComareFilter.Rhs; + if (variableSkillFilterCollection.CardFilterList.Any((ISkillCardFilter f) => f is SkillParameterIdFilter)) + { + SkillParameterIdFilter skillParameterIdFilter = variableSkillFilterCollection.CardFilterList.FirstOrDefault((ISkillCardFilter f) => f is SkillParameterIdFilter) as SkillParameterIdFilter; + string cardName = CardMaster.GetInstanceForBattle().GetCardParameterFromId(int.Parse(skillParameterIdFilter.GetFilterId().First())).CardName; + if (variableCompareFilter.Any((SkillVariableComareFilter f) => f.Lhs.Contains("me.inplay") && f.Rhs == "0") && variableCompareFilter.Any((SkillVariableComareFilter f) => f.Lhs.Contains("me.hand") && f.Rhs == "0")) + { + return Data.SystemText.Get("BattleLog_0193", cardName, Data.SystemText.Get("BattleLog_0177")); + } + if (compare == "=" && rhs2 == "0") + { + string text2 = Data.SystemText.Get("BattleLog_0205"); + if (variableSkillFilterCollection.TargetFilter is SkillTargetHandFilter) + { + text2 = Data.SystemText.Get("BattleLog_0206"); + } + return Data.SystemText.Get("BattleLog_0193", cardName, text2); + } + } + if (compare == ">" && rhs2 == "0") + { + if (variableSkillFilterCollection.CardFilterList.Any((ISkillCardFilter f) => f is SkillFieldFilter)) + { + return Data.SystemText.Get("BattleLog_0149"); + } + if (variableSkillFilterCollection.CardFilterList.Any((ISkillCardFilter f) => f is SkillUnitFilter)) + { + return Data.SystemText.Get("BattleLog_0148"); + } + } + } + else if (variableSkillFilterCollection.ParameterSelectFilter is SkillParameterTurnDamageValueFilter) + { + int num = int.Parse(skillVariableComareFilter.Rhs.ToString()); + if (compare == ">=") + { + return Data.SystemText.Get("BattleLog_0197", num.ToString()); + } + if (compare == "<") + { + return Data.SystemText.Get("BattleLog_0198", (num - 1).ToString()); + } + } + if (text.Contains("me.hand.count")) + { + string rhs3 = skillVariableComareFilter.Rhs; + switch (compare) + { + case "<=": + return Data.SystemText.Get("BattleLog_0187", rhs3); + case "<": + { + int num3 = int.Parse(rhs3) - 1; + return Data.SystemText.Get("BattleLog_0187", num3.ToString()); + } + case ">=": + return Data.SystemText.Get("BattleLog_0188", rhs3); + case ">": + { + int num2 = int.Parse(rhs3) + 1; + return Data.SystemText.Get("BattleLog_0188", num2.ToString()); + } + } + } + if (text.Contains("me.inplay.class.ep")) + { + return Data.SystemText.Get("BattleLog_0177"); + } + if (variableSkillFilterCollection.BattlePlayerFilter != null && variableSkillFilterCollection.TargetFilter is SkillTargetInPlayFilter && variableSkillFilterCollection.CardFilterList.Count > 0 && variableSkillFilterCollection.CardCountFilter != null) + { + string[] array = text.Split('.'); + string text3 = _ConvertSkillConditionCharacter(array[0]); + string text4 = _ConvertSkillConditionTarget(array[1]); + string text5 = _ConvertSkillConditionCardType(array[2]); + string rhs4 = skillVariableComareFilter.Rhs; + switch (compare) + { + case "=": + return Data.SystemText.Get("BattleLog_0200", text3, text4, text5, rhs4); + case ">=": + return Data.SystemText.Get("BattleLog_0209", text3, text4, text5, rhs4); + case "<=": + return Data.SystemText.Get("BattleLog_0210", text3, text4, text5, rhs4); + } + } + if (text.Contains("me.inplay.class.pp")) + { + string rhs5 = skillVariableComareFilter.Rhs; + if (compare != null && compare == ">=") + { + return Data.SystemText.Get("BattleLog_0235", rhs5); + } + } + if (text.Contains(SkillFilterCreator.ContentKeyword.turn_play_cards.ToString())) + { + return Data.SystemText.Get("BattleLog_0191", skillVariableComareFilter.Rhs, _GetSpecificCard(skill, isBuffText: true, isTarget: false)); + } + } + if (skill.ConditionCheckerList.Any((ISkillConditionChecker f) => f is SkillConditionTurn) && (skill.ConditionCheckerList.First((ISkillConditionChecker f) => f is SkillConditionTurn) as SkillConditionTurn).judgeFlg) + { + return Data.SystemText.Get("BattleLog_0126"); + } + if (skill.ConditionCheckerList.Any((ISkillConditionChecker s) => s is SkillConditionPlayCount)) + { + SkillConditionPlayCount skillConditionPlayCount = (SkillConditionPlayCount)skill.ConditionCheckerList.First((ISkillConditionChecker s) => s is SkillConditionPlayCount); + return Data.SystemText.Get("BattleLog_0191", skillConditionPlayCount.GetCount().ToString(), _GetSpecificCard(skill, isBuffText: true, isTarget: false)); + } + if (skill.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessTimesPerTurn && (p as SkillPreprocessTimesPerTurn).GetLimitCount() == 1)) + { + return Data.SystemText.Get("BattleLog_0196"); + } + return ""; + } + + protected static string _CombineSkillCondition(SkillBase skill, string condition) + { + if (skill.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessDestroyTribe && (p as SkillPreprocessDestroyTribe).IsWhiteRitual)) + { + return Data.SystemText.Get("BattleLog_0178", condition); + } + SkillVariableComareFilter skillVariableComareFilter = skill.ConditionFilterCollection.VariableCompareFilter.FirstOrDefault((SkillVariableComareFilter f) => f.Lhs == "{me.inplay.class.turn}"); + if (skillVariableComareFilter != null) + { + int num = int.Parse(skillVariableComareFilter.Rhs); + return Data.SystemText.Get("BattleLog_0150", num.ToString(), condition); + } + return condition; + } + + protected static string _GetSkillCondition(SkillBase skill, bool isBuffText) + { + if (skill.ConditionCheckerList.Any((ISkillConditionChecker a) => a is SkillConditionTurn && (a as SkillConditionTurn).judgeFlg)) + { + return ""; + } + if (skill.ConditionCardFilterList.Any((ISkillCardFilter s) => s is SkillAllCardFilter || s is SkillUnitFilter || s is SkillClassFilter || s is SkillFieldFilter || s is SkillChantFieldFilter || s is SkillNotChantFieldFilter || s is SkillSpellFilter || s is SkillUnitAndClassFilter || s is SkillUnitAndAllFieldFilter || s is SkillSpellAndFieldFilter) && !skill.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter f) => !f.Lhs.Contains("played_card") && !f.Lhs.Contains("me.inplay_self.count")) && !skill.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessTimesPerTurn && (p as SkillPreprocessTimesPerTurn).GetLimitCount() == 1) && !skill.ConditionCheckerList.Any((ISkillConditionChecker f) => f is SkillConditionResonance || f is SkillConditionHalfLife || f is SkillConditionTurn || f is SkillPreprocessDestroyTribe || f is SkillConditionPlayCount)) + { + return ""; + } + if (isBuffText) + { + return _CombineSkillCondition(skill, _GetSkillDetailCondition(skill)); + } + return Data.SystemText.Get("BattleLog_0113"); + } + + public static string _ConvertSkillConditionCharacter(string character) + { + if (!SkillFilterCreator.PLAYER_FILTER_NAMES.Contains(character)) + { + return ""; + } + return SkillFilterCreator.Str2ContentKeyword(character) switch + { + SkillFilterCreator.ContentKeyword.me => Data.SystemText.Get("BattleLog_0218"), + SkillFilterCreator.ContentKeyword.op => Data.SystemText.Get("BattleLog_0219"), + SkillFilterCreator.ContentKeyword.both => Data.SystemText.Get("BattleLog_0208"), + _ => "", + }; + } + + protected static string _ConvertSkillConditionTarget(string target) + { + if (!SkillFilterCreator.PLAYER_TARGET_FILTER_NAMES.Contains(target)) + { + return ""; + } + return SkillFilterCreator.Str2ContentKeyword(target) switch + { + SkillFilterCreator.ContentKeyword.inplay => Data.SystemText.Get("BattleLog_0205"), + SkillFilterCreator.ContentKeyword.hand => Data.SystemText.Get("BattleLog_0206"), + SkillFilterCreator.ContentKeyword.deck => Data.SystemText.Get("BattleLog_0207"), + _ => "", + }; + } + + protected static string _ConvertSkillConditionCardType(string cardType) + { + if (!SkillFilterCreator.CARD_TYPE_FILTER_NAMES.Contains(cardType)) + { + return ""; + } + return SkillFilterCreator.Str2ContentKeyword(cardType) switch + { + SkillFilterCreator.ContentKeyword.unit => Data.SystemText.Get("BattleLog_0172"), + SkillFilterCreator.ContentKeyword.spell => Data.SystemText.Get("BattleLog_0173"), + SkillFilterCreator.ContentKeyword.field => Data.SystemText.Get("BattleLog_0175"), + SkillFilterCreator.ContentKeyword.chant_field => Data.SystemText.Get("BattleLog_0176"), + _ => "", + }; + } + + protected static string _GetSkillOptionDamage(SkillBase skill) + { + return Mathf.Max(0, skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.damage, 0)).ToString(); + } + + protected static string _GetSkillOptionAddDamage(SkillBase skill) + { + int b = skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add_damage, 0); + return Mathf.Max(0, b).ToString(); + } + + protected static string _GetSkillOptionDamageCut(SkillBase skill) + { + int b = skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.cut_amount, 0); + return Mathf.Max(0, b).ToString(); + } + + protected static int _GetSkillOptionDamageClipping(SkillBase skill) + { + return skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.cut_clipping, int.MaxValue); + } + + protected static string _GetSkillOptionHealing(SkillBase skill) + { + int b = skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.healing, 0); + return Mathf.Max(0, b).ToString(); + } + + protected static string _GetSkillOptionAddPp(SkillBase skill) + { + int b = skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add_pp, 0); + return Mathf.Max(0, b).ToString(); + } + + protected static string _GetSkillOptionAddOffense(SkillBase skill) + { + return skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add_offense, 0).ToString(); + } + + protected static string _GetSkillOptionAddLife(SkillBase skill) + { + return skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add_life, 0).ToString(); + } + + protected static string _GetSkillOptionMultiplyOffense(SkillBase skill) + { + return skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.multiply_offense, 1).ToString(); + } + + protected static string _GetSkillOptionMultiplyLife(SkillBase skill) + { + return skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.multiply_life, 1).ToString(); + } + + protected static int _GetSkillOptionLifeLowerLimit(SkillBase skill) + { + return skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.life_lower_limit, 0); + } + + protected static string _GetSkillCallCount(SkillBase skill) + { + int callCount = skill.CallCount; + if (callCount >= 2) + { + return Data.SystemText.Get("BattleLog_0114", callCount.ToString()); + } + return ""; + } + + protected static string _GetSkillOptionAddEp(SkillBase skill) + { + int b = skill.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add_ep, 0); + return Mathf.Max(0, b).ToString(); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleManagerBase.cs b/SVSim.BattleEngine/Engine/BattleManagerBase.cs new file mode 100644 index 0000000..ef2e365 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleManagerBase.cs @@ -0,0 +1,2449 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Mulligan; +using Wizard.Battle.Phase; +using Wizard.Battle.Resource; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; +using Wizard.BattleMgr; + +public class BattleManagerBase +{ + public class CardParameterListInfo + { + public IList HolderCards { get; set; } + + public CardParameterListInfo() + { + HolderCards = new List(); + } + + public void Clear() + { + HolderCards.Clear(); + } + } + + public class XorShift + { + private int w = 111111111; + + private int x = 123456789; + + private int y = 987654321; + + private int z = 555555555; + + public bool IsActive { get; private set; } + + public XorShift(int seed = -1) + { + IsActive = seed != -1; + w = seed; + } + + public int GetChangeInt(double val) + { + double num = Math.Floor((double)Next() / 2147483647.0 * 10000000000.0) / 10000000000.0; + return (int)Math.Floor(val * num); + } + + private int Next() + { + int num = x ^ (x << 11); + x = y; + y = z; + z = w; + return w = w ^ (w >> 19) ^ (num ^ (num >> 8)); + } + } + + public class IndexInfo + { + public int AddIndex { get; private set; } + + public int TargetIndex { get; private set; } + + public bool IsSkillCopy { get; private set; } + + public int CopySkillSelectIndex { get; private set; } + + public IndexInfo(int addIndex = -1, int targetIndex = -1, bool skillCopy = false, int copySelectIndex = -1) + { + AddIndex = addIndex; + TargetIndex = targetIndex; + IsSkillCopy = skillCopy; + CopySkillSelectIndex = copySelectIndex; + } + } + + public class MissionNecessaryInformation + { + private Dictionary NecessaryTargetDictionary; + + private Dictionary _originalTargetDictionary; + + private const string MISSION_INFO_EQUAL = "mission_info="; + + public MissionNecessaryInformation(Dictionary targetDictionary) + { + _originalTargetDictionary = targetDictionary; + NecessaryTargetDictionary = new Dictionary(); + foreach (KeyValuePair item in targetDictionary) + { + SkillOptionValue value = new SkillOptionValue(SkillCreator.ParseContentInfos("mission_info=" + item.Value)); + NecessaryTargetDictionary.Add(item.Key, value); + } + } + + public Dictionary GetMissionNecessaryInfo(BattlePlayerPair pair, BattleCardBase selfClass) + { + Dictionary dictionary = new Dictionary(); + foreach (KeyValuePair item in NecessaryTargetDictionary) + { + SkillCollectionBase.SetupOptionValue(item.Value, pair, selfClass, null); + dictionary.Add(item.Key, item.Value.GetInt(SkillFilterCreator.ContentKeyword.mission_info, 0)); + } + return dictionary; + } + + public Dictionary GetOriginalTargetDictionary() + { + return _originalTargetDictionary; + } + } + + public class CalledCreateFilterPair + { + private readonly IReadOnlyBattleCardInfo _ownerCard; + + private readonly string _checkText; + + public CalledCreateFilterPair(IReadOnlyBattleCardInfo ownerCard, string checkText) + { + _ownerCard = ownerCard; + _checkText = checkText; + } + + public bool Equal(CalledCreateFilterPair piar) + { + if (piar._ownerCard == _ownerCard) + { + return piar._checkText == _checkText; + } + return false; + } + + public bool HasOwnerCard() + { + if (_ownerCard != null) + { + return _ownerCard.SkillApplyInformation != null; + } + return false; + } + + public bool IsOwnerCardDead() + { + if (!BattleLogManager.GetInstance().EnemyFusionCard.Contains(_ownerCard)) + { + if (!_ownerCard.IsDead) + { + if (!_ownerCard.IsInHand) + { + return !_ownerCard.IsInplay; + } + return false; + } + return true; + } + return false; + } + } + + public class CardCreateInfo + { + public readonly bool IsPlayer; + + public readonly NetworkBattleDefine.NetworkCardPlaceState PlaceStatus; + + public readonly IndexInfo IndexInfo; + + public readonly bool IsChoice; + + public readonly bool IsReferenceOpponenCard; + + public int Id { get; private set; } + + public SkillBase Skill { get; private set; } + + public int Cost { get; private set; } = -1; + + public CardCreateInfo(int id, bool isPlayer, bool isChoice, NetworkBattleDefine.NetworkCardPlaceState placeStatus, bool isReferenceOpponentCard = false, SkillBase skill = null) + { + Id = id; + IsPlayer = isPlayer; + PlaceStatus = placeStatus; + IsChoice = isChoice; + IsReferenceOpponenCard = isReferenceOpponentCard; + Skill = skill; + } + + public void SetId(int id) + { + Id = id; + } + + public void SetCost(int cost) + { + Cost = cost; + } + } + + public enum BATTLE_RESULT_TYPE + { + NONE, + WIN, + LOSE, + CONSISTENCY + } + + public enum FINISH_TYPE + { + NORMAL, + RETIRE, + SPECIAL_WIN + } + + protected class AttachInfo + { + public BattleCardBase _classCard; + + public SkillBase _attachSkill; + + public SkillCreator.SkillBuildInfo _targetSkillBuildInfo; + + public string _myRotationBonusId; + + public AttachInfo(BattleCardBase classCard, SkillBase attachSkill, SkillCreator.SkillBuildInfo targetSkillBuildInfo, string myRotationBonusId = "") + { + _classCard = classCard; + _attachSkill = attachSkill; + _targetSkillBuildInfo = targetSkillBuildInfo; + _myRotationBonusId = myRotationBonusId; + } + } + + public class ResourceInfo + { + public string ObjectPath { get; private set; } + + public string SePath { get; private set; } + + public string ObjectFullPath { get; private set; } + + public bool IsEffectBattleInfoDictionary { get; set; } + + public ResourceInfo(string objectPath, string sePath) + { + ObjectPath = objectPath; + SePath = sePath; + ObjectFullPath = Toolbox.ResourcesManager.GetAssetTypePath(objectPath, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true); + } + + public ResourceInfo(string objectFullPath) + { + ObjectPath = string.Empty; + SePath = string.Empty; + ObjectFullPath = objectFullPath; + } + } + + private Dictionary _calledCreateFilterDictionary = new Dictionary(); + + private Dictionary _calledCreateLimitFilterDictionary = new Dictionary(); + + private Dictionary _calledCreateOrFilterDictionary = new Dictionary(); + + public const int SIMPLE_STAGE_ID = 9; + + public const int NEW_INDEX = -1; + + public static readonly int FIRST_PLAYER_EP_NUM = 2; + + public static readonly int SECOND_PLAYER_EP_NUM = 3; + + protected const int FIRST_PLAYER_EVOLVE_WAIT_TURN = 5; + + protected const int SECOND_PLAYER_EVOLVE_WAIT_TURN = 4; + + public SBattleLoad SBattleLoad; + + protected IBattleMgrContentsCreator _contentsCreator; + + public EmoteUI EmoteUI; + + public BattleEnemy BattleEnemy; + + public BattlePlayer BattlePlayer; + + public GameObject BtlContainer; + + public GameObject BtlUIContainer; + + public GameObject CutInContainer; + + public GameObject Battle3DContainer; + + public GameObject SubParticleContainer; + + protected BattleCamera _battleCamera; + + protected BackGroundBase _backGround; + + public DetailMgr DetailMgr; + + public PanelMgr PanelMgr; + + public IMulliganMgr MulliganMgr; + + protected Camera _subParticleCamera; + + public IEnemyAI EnemyAI; + + public GameObject CardHolder; + + public GameObject ECardHolder; + + public GameObject PCardPlace; + + public GameObject ChoiceCardHolder; + + public GameObject EvolveCardHolder; + + public GameObject Arrow; + + public ArrowControl ArrowControl; + + public GameObject AttackArrowHead; + + public GameObject EvolutionArrowHead; + + public GameObject AlertDialogue; + + public UILabel AlertDialogueLabel; + + public GameObject PSideLog; + + public SideLogControl PSideLogControl; + + public GameObject ESideLog; + + public SideLogControl ESideLogControl; + + public GameObject ESelectSkillSideLog; + + public SideLogControl ESelectSkillSideLogControl; + + private const string UnityEventAgentStr = "Prefab/Game/UnityEventAgent"; + + public ITurnPanelControl TurnPanelControl; + + public GameObject BattleResult; + + public BattleResultUIController BattleResultControl; + + public GameObject BattleStart; + + public BattleStartControl BattleStartControl; + + public CardParameterListInfo PlayerCardParameterListInfo = new CardParameterListInfo(); + + public CardParameterListInfo EnemyCardParameterListInfo = new CardParameterListInfo(); + + public List TransformCardList = new List(); + + public bool IsFirst; + + public Transform SubUI; + + public TweenAlpha SubUIOverLayBG; + + public GameObject MenuButtonObject; + + public int isStorySuccessful; + + protected int _allPublishedActiveSkillCount; + + protected int _temporaryPublishedAddCount; + + public const int NOT_LETHAL_PUBLISHED_COUNT = -1; + + protected int _lethalPublishedActiveSkillCount = -1; + + protected int _lethalMovementCount; + + protected int _allPublishedDamageModifierCount; + + protected int _allPublishedHealModifierCount; + + public int FirstTurn; + + public int SecondTurn; + + public int GroundID; + + public int DamageCount; + + private GameObject _unityEventAgentObject; + + private UnityEventAgent _unityEventAgent; + + protected IPhase _phase; + + private NetworkTouchControl _networkTouchControl; + + public static bool IsRandomDraw { + get => SVSim.BattleEngine.Ambient.BattleAmbient.Require().IsRandomDraw; + set => SVSim.BattleEngine.Ambient.BattleAmbient.Require().IsRandomDraw = value; + } + + public static bool IsForecast { + get => SVSim.BattleEngine.Ambient.BattleAmbient.Require().IsForecast; + set => SVSim.BattleEngine.Ambient.BattleAmbient.Require().IsForecast = value; + } + + public BattleLifeTimeSharedObject BattleLifeTimeSharedObject; + + private BattleUIContainer _battleUIContainer; + + protected System.Random _stableRandom; + + protected System.Random _stableRandomOnlySelf; + + private int stableRandomCount; + + protected XorShift _selfXorShiftRandom; + + protected XorShift _oppXorShiftRandom; + + public bool IsKeyboardEnable = true; + + public static bool IsTutorial + { + get + { + if (Data.Load.data._userTutorial.tutorial_step == 100) + { + return false; + } + return true; + } + } + + protected virtual bool IsStoryTutorial => false; + + protected virtual bool DisableCustomMouse => false; + + public static bool UseCustomMouse + { + get + { + bool flag = GetIns()?.DisableCustomMouse ?? false; + if (InputMgr.MouseControl) + { + return !flag; + } + return false; + } + } + + public static bool UseKeyboard + { + get + { + bool flag = GetIns()?.IsStoryTutorial ?? false; + GameMgr ins = GameMgr.GetIns(); + bool isWatchBattle = ins.IsWatchBattle; + bool isReplayBattle = ins.IsReplayBattle; + if (InputMgr.KeyboardControl && !flag && !isWatchBattle) + { + return !isReplayBattle; + } + return false; + } + } + + public static bool UseKeyboardTurnEndSpaceShortcut + { + get + { + if (UseKeyboard) + { + return InputMgr.KeyboardControlSpace; + } + return false; + } + } + + public int BackgroundId { get; private set; } + + public string BgmId { get; private set; } + + public bool IsBackGroundLoad => _backGround.IsLoadDone; + + public BattleCamera Camera => _battleCamera; + + public BackGroundBase BackGround => _backGround; + + public Camera SubParticleCamera => _subParticleCamera; + + public int AllPublishedActiveSkillCount + { + get + { + return _allPublishedActiveSkillCount; + } + set + { + _allPublishedActiveSkillCount = value; + } + } + + public int TemporaryPublishedAddCount + { + get + { + return _temporaryPublishedAddCount; + } + protected set + { + _temporaryPublishedAddCount = value; + } + } + + public List PublishedSkillList { get; protected set; } + + public int LethalPublishedActiveSkillCount + { + get + { + return _lethalPublishedActiveSkillCount; + } + set + { + _lethalPublishedActiveSkillCount = value; + } + } + + public int LethalMovementCount + { + get + { + return _lethalMovementCount; + } + set + { + _lethalMovementCount = value; + } + } + + public int AllPublishedDamageModifierCount + { + get + { + return _allPublishedDamageModifierCount; + } + set + { + _allPublishedDamageModifierCount = value; + } + } + + public int AllPublishedHealModifierCount + { + get + { + return _allPublishedHealModifierCount; + } + set + { + _allPublishedHealModifierCount = value; + } + } + + public int NextIndividualId { get; private set; } = 1; + + public int CurrentTurn + { + get + { + if (!BattlePlayer.IsSelfTurn) + { + return BattleEnemy.Turn; + } + return BattlePlayer.Turn; + } + } + + public virtual TouchControl TouchControl { get; protected set; } + + public virtual OperateMgr OperateMgr { get; protected set; } + + public IPhaseCreator PhaseCreator { get; private set; } + + public bool IsPreRecovery { get; set; } + + public bool IsRecovery { get; set; } + + public bool IsPuzzleMgr => this is PuzzleBattleManager; + + public virtual bool IsBattleEnd + { + get + { + if (BattlePlayer != null && BattleEnemy != null && !BattlePlayer.Class.IsDead) + { + return BattleEnemy.Class.IsDead; + } + return true; + } + } + + public IBattleResourceMgr BattleResourceMgr { get; private set; } + + public VfxMgr VfxMgr { get; protected set; } + + public virtual bool IsStopOperate => false; + + public BattleUIContainer BattleUIContainer + { + get + { + return _battleUIContainer; + } + set + { + _battleUIContainer = value; + if (Prediction == null || !(_battleUIContainer != null)) + { + return; + } + _battleUIContainer.ShowPrediction = delegate(bool isPress) + { + if (isPress) + { + Prediction.TurnEnd(); + } + else + { + Prediction.Clear(); + } + }; + } + } + + public bool HasFocus => _unityEventAgent.HasFocus; + + public double randomResult { get; protected set; } + + public bool IsMulliganEnd { get; set; } + + public bool IsTurnEnd { get; protected set; } + + public virtual bool IsVirtualBattle => IsForecast; + + public virtual bool IsVirtualBattleEnemyTurn + { + get + { + if (EnemyAI is EnemyAI) + { + return BattleEnemy.IsSelfTurn; + } + return false; + } + } + + public bool IsPlayerRetire { get; protected set; } + + public Prediction Prediction { get; private set; } + + public event Action OnStartOpening; + + public event Action OnWin; + + public event Action OnBattleSettingInfoClear; + + public event Action OnBattleFinish; + + public event Func OnSubmitMulligan; + + public void AddPublishedSkillList(SkillBase skill) + { + PublishedSkillList.Add(skill); + } + + public void IncrementIndividualId() + { + NextIndividualId++; + } + + public virtual int GetMaxDeckCount(bool isSelf) + { + return 40; + } + + public XorShift XorShiftRandom(bool isSelf) + { + if (!isSelf) + { + return _oppXorShiftRandom; + } + return _selfXorShiftRandom; + } + + public static BattleManagerBase GetIns() + { + // Soft read: returns null when no scope is active, preserving engine call sites that pattern + // `GetIns()?.Foo ?? default` (or null-tolerant successors). Inside a scope, returns the + // scope's Mgr (which may itself be null mid-Setup — see SessionBattleEngine.SetupInternal, + // which publishes Mgr before WireMulliganPhase). + return SVSim.BattleEngine.Ambient.BattleAmbient.Current?.Mgr; + } + + protected BattleManagerBase(IBattleMgrContentsCreator contentsCreator) + { + BattleLifeTimeSharedObject = new BattleLifeTimeSharedObject(); + PublishedSkillList = new List(); + _contentsCreator = contentsCreator; + BattleResourceMgr = _contentsCreator.CreateResourceMgr(); + _stableRandom = new System.Random(_contentsCreator.RandomSeed); + _stableRandomOnlySelf = new System.Random(_contentsCreator.RandomSeed); + BackgroundId = CreateBackgroundId(); + BgmId = CreateBgmId(); + CreateManager(); + BattlePlayer = CreateBattlePlayer(); + BattleEnemy = CreateBattleEnemy(); + BattlePlayer.ClassAndInPlayCardList[0].Setup(); + BattleEnemy.ClassAndInPlayCardList[0].Setup(); + PhaseCreator = _contentsCreator.CreatePhaseCreator(this); + PhaseCreator.CreateFirstPhase().Setup(); + EmoteUI = null; + PanelMgr = null; + SBattleLoad = null; + IsFirst = false; + BattlePlayer.EvolveWaitTurnCount = 0; + BattleEnemy.EvolveWaitTurnCount = 0; + FirstTurn = (SecondTurn = 0); + EnemyAI = null; + BtlContainer = null; + BtlUIContainer = null; + CutInContainer = null; + Battle3DContainer = null; + SubParticleContainer = null; + CardHolder = null; + PCardPlace = null; + ECardHolder = null; + Arrow = null; + ArrowControl = null; + AttackArrowHead = null; + EvolutionArrowHead = null; + AlertDialogue = null; + TurnPanelControl = null; + BattleResult = null; + BattleResultControl = null; + BattleStart = null; + BattleStartControl = null; + SubUI = null; + SubUIOverLayBG = null; + MenuButtonObject = null; + GameMgr.GetIns().GetPrefabMgr().Load("Prefab/Game/UnityEventAgent"); + _unityEventAgentObject = UnityEngine.Object.Instantiate(GameMgr.GetIns().GetPrefabMgr().Get("Prefab/Game/UnityEventAgent")); + _unityEventAgent = _unityEventAgentObject.GetComponent(); + _unityEventAgent.SetBattleMgr(this); + Prediction = new Prediction(BattleResourceMgr, GetBattlePlayerPair(isPlayer: true)); + TouchControl = new TouchControl(this, _battleCamera, _backGround); + OperateMgr = CreateOperateMgr(); + VfxMgr = _contentsCreator.CreateVfxMgr(); + VfxBase vfx = ChangePhase(PhaseCreator.CreateFirstPhase()); + VfxMgr.RegisterSequentialVfx(vfx); + SetupEvent(); + FirstRecoverySetting(); + FirstReplaySetting(); + OnBattleSettingInfoClear += delegate + { + GameMgr.GetIns().GetDataMgr().SetStoryBgmID("NONE"); + }; + LocalLog.AccumulateSettingLog(); + } + + protected virtual void FirstRecoverySetting() + { + StartRecoveryRecording(); + } + + public void StartRecoveryRecording() + { + _contentsCreator.RecoveryRecordManager.SetupRecording(this, GameMgr.GetIns().GetDataMgr().m_BattleType, _contentsCreator.RandomSeed, BackgroundId, BgmId); + } + + protected virtual void FirstReplaySetting() + { + StartReplayRecording(); + } + + public void StartReplayRecording() + { + _contentsCreator.ReplayRecordManager.SetupRecording(this); + } + + public void SetupReplayBattleInfoFilter() + { + _contentsCreator.ReplayRecordManager.SetupBattleInfoFilter(); + } + + public void CreateXorShift(int selfIdxSeed, int oppIdxSeed = -1) + { + if (selfIdxSeed != -1) + { + _selfXorShiftRandom = new XorShift(selfIdxSeed); + } + if (oppIdxSeed != -1) + { + _oppXorShiftRandom = new XorShift(oppIdxSeed); + } + } + + public void SetBattleMenuBtn() + { + MenuButtonObject = BtlUIContainer.transform.Find("BattleMenuBtn").gameObject; + SetBattleMenuBtnVisibility(); + } + + public virtual void SetBattleMenuBtnVisibility() + { + MenuButtonObject.SetActive(value: false); + } + + protected virtual int CreateBackgroundId() + { + int backGroundId = _contentsCreator.RecoveryManager.BackGroundId; + if (backGroundId >= 0) + { + return backGroundId; + } + int result = 1; + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (dataMgr.m_BattleType == DataMgr.BattleType.BossRushQuest && PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SIMPLE_STAGE)) + { + result = 9; + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.Story || dataMgr.IsQuestBattleType() || GameMgr.GetIns().IsPuzzleQuest) + { + result = dataMgr.GetSoroPlay3DFieldID(); + } + else if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SIMPLE_STAGE)) + { + result = 9; + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.Practice && dataMgr.GetSoroPlay3DFieldID() != 0) + { + result = CalculationRandomStage(); + } + else if (!IsTutorial) + { + result = UnityEngine.Random.Range(1, 8); + } + return result; + } + + protected int CalculationRandomStage() + { + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SIMPLE_STAGE)) + { + return 9; + } + List list = new List(); + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.USE_OFF_STAGE)) + { + list = PlayerPrefsWrapper.CreateServerSendStageOffList(); + } + List list2 = new List(); + for (int i = 0; i < Data.Load.data.OpenBattleFieldIdList.Count; i++) + { + int item = int.Parse(Data.Load.data.OpenBattleFieldIdList[i]); + if (!list.Contains(item)) + { + list2.Add(item); + } + } + if (list2.Count == 0) + { + return 9; + } + return list2[UnityEngine.Random.Range(0, list2.Count)]; + } + + protected virtual string CreateBgmId() + { + string bgmId = _contentsCreator.RecoveryManager.BgmId; + if (bgmId != "NONE") + { + return bgmId; + } + string result = "NONE"; + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (dataMgr.m_BattleType == DataMgr.BattleType.Story || dataMgr.IsQuestBattleType()) + { + result = dataMgr.GetStoryBgmID(); + } + return result; + } + + public BackGroundBase CreateBattleField() + { + _backGround.CreateField(_battleCamera, Battle3DContainer, CutInContainer); + GameMgr.GetIns().GetInputMgr().SetBackGround(_backGround); + return _backGround; + } + + protected void CreateManager() + { + _battleCamera = new BattleCamera(); + GameMgr.GetIns().GetInputMgr().SetBattleCamera(_battleCamera); + DetailMgr = new DetailMgr(); + switch (BackgroundId) + { + case 1: + _backGround = new ForestField(BgmId); + break; + case 2: + _backGround = new CastleField(BgmId); + break; + case 3: + _backGround = new VolcanoField(BgmId); + break; + case 4: + _backGround = new RoyalPalaceField(BgmId); + break; + case 5: + _backGround = new TempleField(BgmId); + break; + case 6: + _backGround = new ChateauField(BgmId); + break; + case 7: + _backGround = new LaboratoryField(BgmId); + break; + case 8: + _backGround = new GateField(BgmId); + break; + case 9: + _backGround = new ArenaField(BgmId); + break; + case 10: + _backGround = new PlazField(BgmId); + break; + case 11: + _backGround = new ForestNightField(BgmId); + break; + case 14: + _backGround = new RoyalPalaceNightField(BgmId); + break; + case 15: + _backGround = new TempleNightField(BgmId); + break; + case 17: + _backGround = new LaboratoryNightField(BgmId); + break; + case 18: + _backGround = new YuwanField(BgmId); + break; + case 20: + _backGround = new PlazRiotingField(BgmId); + break; + case 21: + _backGround = new HillField(BgmId); + break; + case 22: + _backGround = new AlleyField(BgmId); + break; + case 23: + _backGround = new HillRiotingField(BgmId); + break; + case 30: + _backGround = new IronField(BgmId); + break; + case 31: + _backGround = new NateField(BgmId); + break; + case 32: + _backGround = new Nat2Field(BgmId); + break; + case 33: + _backGround = new Nat3Field(BgmId); + break; + case 34: + _backGround = new Nat4Field(BgmId); + break; + case 41: + _backGround = new RivayleField(BgmId); + break; + case 42: + _backGround = new RivayleBackalleyField(BgmId); + break; + case 43: + _backGround = new VellsarDesertField(BgmId); + break; + case 51: + _backGround = new Field51(BgmId); + break; + case 52: + _backGround = new Field52(BgmId); + break; + case 61: + _backGround = new Field61(BgmId); + break; + case 62: + _backGround = new Field62(BgmId); + break; + case 71: + _backGround = new Field71(BgmId); + break; + case 72: + _backGround = new Field72(BgmId); + break; + case 73: + _backGround = new Field73(BgmId); + break; + case 74: + _backGround = new Field74(BgmId); + break; + case 75: + _backGround = new Field75(BgmId); + break; + case 76: + _backGround = new Field76(BgmId); + break; + case 1001: + _backGround = new SpecialArenaField(BgmId); + break; + case 1002: + _backGround = new llField(); + break; + case 1003: + _backGround = new PriConnField(BgmId); + break; + case 1004: + _backGround = new StageField(BgmId); + break; + case 1005: + _backGround = new Field1005(BgmId); + break; + case 1006: + _backGround = new Field1006(BgmId); + break; + case 1007: + _backGround = new Field1007(BgmId); + break; + case 1008: + _backGround = new Field1008(BgmId); + break; + case 1009: + _backGround = new Field1009(BgmId); + break; + case 1010: + _backGround = new Field1010(BgmId); + break; + case 1011: + _backGround = new Field1011(BgmId); + break; + case 1012: + _backGround = new Field1012(BgmId); + break; + } + } + + protected virtual OperateMgr CreateOperateMgr() + { + return new OperateMgr(this, TouchControl); + } + + protected virtual BattlePlayer CreateBattlePlayer() + { + return new BattlePlayer(this, _battleCamera, _backGround, CreatePlayerInnerOptionsBuilder()); + } + + protected virtual BattleEnemy CreateBattleEnemy() + { + return new BattleEnemy(this, _battleCamera, _backGround, CreateEnemyInnerOptionsBuilder()); + } + + public virtual IInnerOptionsBuilder CreatePlayerInnerOptionsBuilder() + { + return new PlayerInnerOptionsBuilder(BattleResourceMgr); + } + + public virtual IInnerOptionsBuilder CreateEnemyInnerOptionsBuilder() + { + return NullInnerOptionsBuilder.GetInstance(); + } + + public virtual void StartOpening(int FirstAttack) + { + LocalLog.AccumulateLastTraceLog("StartOpening"); + FirstAttack = GetFirstAttack(FirstAttack); + bool doesPlayerGoFirst = FirstAttack == 0; + SetupInitialGameState(doesPlayerGoFirst, areCardsRandomlyDrawn: true, 20, 20); + VfxBase vfx = ChangePhase(PhaseCreator.CreateOpeningPhase()); + SkillProcessor skillProcessor = new SkillProcessor(); + VfxBase vfx2 = BattlePlayer.StartSkillWhenBattleStart(skillProcessor); + VfxMgr.RegisterSequentialVfx(vfx); + VfxMgr.RegisterSequentialVfx(vfx2); + this.OnStartOpening.Call(IsFirst); + } + + public virtual void SetupInitialGameState(bool doesPlayerGoFirst, bool areCardsRandomlyDrawn, int playerMaxLife, int enemyMaxLife) + { + IsFirst = doesPlayerGoFirst; + IsRandomDraw = areCardsRandomlyDrawn; + InitializeClassLife(playerMaxLife, enemyMaxLife); + SetUpMyRotationBattle(playerMaxLife, enemyMaxLife); + SetupAvatarBattle(doesPlayerGoFirst); + TurnPanelControl.Initialize(); + SetupEvolCount(doesPlayerGoFirst); + } + + protected virtual void SetupInitialGameState(bool doesPlayerGoFirst, bool areCardsRandomlyDrawn, int playerCurrentLife, int enemyCurrentLife, int playerMaxLife, int enemyMaxLife, int playerEvolCount, int enemyEvolCount, int playerEvolWaitTurnCount, int enemyEvolWaitTurnCount, int playerInitialPp, int enemyInitialPp, int playerInitialCemeteryAmount, int enemyInitialCemeteryAmount, int currentTurnNumber, bool showTurnsLeftUntilEvolve) + { + IsFirst = doesPlayerGoFirst; + IsRandomDraw = areCardsRandomlyDrawn; + InitializeClassLife(playerMaxLife, enemyMaxLife); + TurnPanelControl.Initialize(showTurnsLeftUntilEvolve, showTurnsLeftUntilEvolve); + int maxEvolCount = (doesPlayerGoFirst ? FIRST_PLAYER_EP_NUM : SECOND_PLAYER_EP_NUM); + int maxEvolCount2 = ((!doesPlayerGoFirst) ? FIRST_PLAYER_EP_NUM : SECOND_PLAYER_EP_NUM); + InitializePlayer(BattlePlayer, playerEvolCount, maxEvolCount, playerEvolWaitTurnCount, playerInitialPp, playerInitialCemeteryAmount, playerCurrentLife, playerMaxLife); + InitializePlayer(BattleEnemy, enemyEvolCount, maxEvolCount2, enemyEvolWaitTurnCount, enemyInitialPp, enemyInitialCemeteryAmount, enemyCurrentLife, enemyMaxLife); + FirstTurn = currentTurnNumber; + SecondTurn = currentTurnNumber; + } + + public void SetupEvolCount(bool doesPlayerGoFirst) + { + BattlePlayerBase battlePlayerBase; + BattlePlayerBase battlePlayerBase2; + if (doesPlayerGoFirst) + { + battlePlayerBase = BattlePlayer; + battlePlayerBase2 = BattleEnemy; + } + else + { + battlePlayerBase = BattleEnemy; + battlePlayerBase2 = BattlePlayer; + } + SetPlayerInitialEp(battlePlayerBase, FIRST_PLAYER_EP_NUM, FIRST_PLAYER_EP_NUM, 5); + SetPlayerInitialEp(battlePlayerBase2, SECOND_PLAYER_EP_NUM, SECOND_PLAYER_EP_NUM, 4); + } + + public void SetPlayerInitialEp(BattlePlayerBase battlePlayerBase, int usableEp, int maxEp, int turnsLeftUntilCanEvolve) + { + battlePlayerBase.SetCurrentEpCount(usableEp); + battlePlayerBase.EpTotal = maxEp; + battlePlayerBase.EvolveWaitTurnCount = turnsLeftUntilCanEvolve; + } + + private void InitializeClassLife(int playerMaxLife, int enemyMaxLife) + { + ((ClassBattleCardBase)BattlePlayer.Class).InitBaseMaxLife(playerMaxLife); + ((ClassBattleCardBase)BattleEnemy.Class).InitBaseMaxLife(enemyMaxLife); + } + + private void InitializePlayer(BattlePlayerBase battlePlayerBase, int evolCount, int maxEvolCount, int evolWaitTurnCount, int initialPp, int initialCemeteryAmount, int currentLife, int maxLife) + { + SetPlayerInitialEp(battlePlayerBase, evolCount, maxEvolCount, evolWaitTurnCount); + battlePlayerBase.SetPpTotal(initialPp, isUpdatePp: true, null); + for (int i = 0; i < initialCemeteryAmount; i++) + { + BattleCardBase item = CardCreatorBase.CreateDummyInstance(); + battlePlayerBase.CemeteryList.Add(item); + } + if (currentLife < maxLife) + { + battlePlayerBase.Class.SkillApplyInformation.DamageLife(maxLife - currentLife, -1, isSelfTurn: false); + } + } + + protected virtual void SetupEvent() + { + BattlePlayer.OnTurnEndFinish += delegate + { + BattleResourceMgr.UnloadEffectBattle(); + BattlePlayer.PlayerBattleView.ResetTouchable(); + return NullVfx.GetInstance(); + }; + BattleEnemy.OnTurnEndFinish += delegate + { + BattleResourceMgr.UnloadEffectBattle(); + return NullVfx.GetInstance(); + }; + } + + public VfxBase ControlTurnStartPlayer() + { + return ControlTurnStart(BattleEnemy, BattlePlayer, IsFirst); + } + + public VfxBase ControlTurnStartOpponent() + { + return ControlTurnStart(BattlePlayer, BattleEnemy, !IsFirst); + } + + private VfxBase ControlTurnStart(BattlePlayerBase selfBattlePlayer, BattlePlayerBase opponentBattlePlayer, bool didPlayerGoFirst) + { + if (IsBattleEnd) + { + return NullVfx.GetInstance(); + } + int num = 0; + VfxBase result; + if (selfBattlePlayer.IsExtraTurn) + { + result = selfBattlePlayer.StartTurnControl("ExtraTurn"); + selfBattlePlayer.DecreasesExtraTurnCount(); + num = selfBattlePlayer.Turn; + } + else + { + result = opponentBattlePlayer.StartTurnControl("Normal"); + opponentBattlePlayer.DecreasesExtraTurnCount(); + num = opponentBattlePlayer.Turn; + } + if (num >= 1) + { + LocalLog.SetLastTraceLogTurn(num); + } + return result; + } + + public virtual void SetUpOperateEvent(OperateMgr operateMgr) + { + SetupEndTurnButtonEvents(operateMgr); + } + + public virtual void SetupBattlePlayersEvent() + { + BattlePlayer.OnSetupCardEvent += SetupCardEvent; + BattleEnemy.OnSetupCardEvent += SetupCardEvent; + BattlePlayer.OnSetupClassEvent += SetupPlayerClassEvent; + BattleEnemy.OnSetupClassEvent += SetupOpponentClassEvent; + BattlePlayer.Setup(BattleEnemy); + BattleEnemy.Setup(BattlePlayer); + BattlePlayer.OnTurnEnd += delegate + { + VfxMgr.Cancel(); + return NullVfx.GetInstance(); + }; + } + + public VfxBase LoadOpponentObjects() + { + VfxBase vfxBase = GetIns().SBattleLoad.NetworkBattleStartToLoadOpponentObjects(delegate + { + DelayLoadCompleteOpponentResources(); + }); + VfxMgr.RegisterSequentialVfx(vfxBase); + return vfxBase; + } + + protected virtual void DelayLoadCompleteOpponentResources() + { + SetupBattlePlayersEvent(); + } + + public virtual void SetupActionProcessorEvent(ActionProcessor processor, bool isPlayer) + { + GetBattlePlayer(isPlayer).SetupActionProcessorEvent(processor); + processor.OnAfterPlayCard += delegate + { + BattlePlayer.UpdateHandCardsPlayability(); + BattleEnemy.UpdateHandCardsPlayability(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(BattlePlayer.UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(JudgeBattleResult()); + return sequentialVfxPlayer; + }; + processor.OnBeforeAttack += JudgeBattleResult; + processor.OnAfterAttack += delegate + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(BattlePlayer.UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(JudgeBattleResult()); + return sequentialVfxPlayer; + }; + processor.OnAfterEvolution += delegate + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(BattlePlayer.UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(JudgeBattleResult()); + return sequentialVfxPlayer; + }; + processor.OnAfterFusion += delegate + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(BattlePlayer.UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(JudgeBattleResult()); + return sequentialVfxPlayer; + }; + } + + protected virtual void SetupEndTurnButtonEvents(OperateMgr operateMgr) + { + SetupInstantEndTurnConditions(); + BattlePlayer.OnTurnStartAfterDraw += () => InstantVfx.Create(delegate + { + BattlePlayer.PlayerBattleView.UpdateTurnEndPulseEffect(); + }); + operateMgr.OnPlayerAttack += delegate + { + BattlePlayer.PlayerBattleView.UpdateTurnEndPulseEffect(); + BattlePlayer.UpdateHandCardsPlayability(); + return NullVfx.GetInstance(); + }; + operateMgr.OnPlayerEvolve += delegate + { + BattlePlayer.PlayerBattleView.UpdateTurnEndPulseEffect(); + return NullVfx.GetInstance(); + }; + operateMgr.OnPlayerFusion += delegate + { + BattlePlayer.PlayerBattleView.UpdateTurnEndPulseEffect(); + return NullVfx.GetInstance(); + }; + BattlePlayer.OnTurnEnd += delegate + { + BattlePlayer.PlayerBattleView.HideTurnEndPulseEffect(); + Prediction.Clear(); + return NullVfx.GetInstance(); + }; + } + + protected virtual void SetupInstantEndTurnConditions() + { + BattlePlayer.PlayerBattleView.OnCheckImmediateTurnEnd += delegate + { + if (BattlePlayer.CheckPlayableCards()) + { + return false; + } + return !BattlePlayer.CheckAttackableCards(); + }; + } + + public virtual VfxBase LoadTurnPanelResource() + { + return TurnPanelControl.LoadResource(); + } + + public void ReinitializeTurnPanelControl() + { + TurnPanelControl.Initialize(BattlePlayer.EvolveWaitTurnCount > 0, BattleEnemy.EvolveWaitTurnCount > 0); + } + + public virtual void Update(float dt) + { + VfxWith vfxWith = _phase.Update(dt); + VfxMgr.RegisterSequentialVfx(SequentialVfxPlayer.Create(vfxWith.Vfx, ChangePhase(vfxWith.Value))); + VfxMgr.Update(Time.deltaTime); + if (_backGround != null) + { + _backGround.UpdateFieldRandom(); + } + if (BattlePlayer.BattleView.PlayQueueView != null) + { + BattlePlayer.BattleView.PlayQueueView.UpdatePlayQueuePositions(Time.deltaTime); + } + if (BattleEnemy.BattleView.PlayQueueView != null) + { + BattleEnemy.BattleView.PlayQueueView.UpdatePlayQueuePositions(Time.deltaTime); + } + LocalLog.SubmitAccumulateLastTraceLog(); + } + + public virtual void Pause() + { + _phase.Pause(); + Prediction.Clear(); + } + + public IPhase GetCurrentPhase() + { + return _phase; + } + + public virtual void Resume() + { + } + + public virtual void FinishBattle() + { + } + + public void OnBattleSettingInfoClearIsNullClear() + { + this.OnBattleSettingInfoClear = null; + } + + public virtual void DisposeBattleGameObj() + { + BattleResourceMgr.Dispose(); + VfxMgr.Dispose(); + DetailMgr.Dispose(); + Data.BattleRecoveryInfo = null; + BattleLifeTimeSharedObject = null; + this.OnBattleSettingInfoClear.Call(); + BattleLogItem.ClearHeaderTextureCache(); + CardVoiceInfoCache.ClearCardVoiceInfo(); + NullBattleCardView.ReleaseSharedDummy(); + NullBattleCard.ReleaseSharedDummy(); + GameMgr.GetIns().GetEffectMgr().ClearBattleFeildEffect(); + GameMgr.GetIns().GetEffectMgr().RestUnneededEffect(); + _backGround.Dispose(); + _battleCamera.Dispose(); + Toolbox.ResourcesManager.RemoveAssetGroup(Toolbox.ResourcesManager.BattleListAssetPathList); + Toolbox.ResourcesManager.BattleListAssetPathList.Clear(); + RenderSettings.fog = false; + GameMgr.GetIns().GetEffectMgr().ImmediateDestroyBattleEffectContainer(); + if (PanelMgr != null) + { + DisposeBattleGameObj_DestroyImmediate(PanelMgr.gameObject); + } + DisposeBattleGameObj_DestroyImmediate(Battle3DContainer); + DisposeBattleGameObj_DestroyImmediate(BtlUIContainer); + DisposeBattleGameObj_DestroyImmediate(CutInContainer); + DisposeBattleGameObj_DestroyImmediate(SubParticleContainer); + DisposeBattleGameObj_DestroyImmediate(_unityEventAgentObject); + if (SubUI != null) + { + DisposeBattleGameObj_DestroyImmediate(SubUI.gameObject); + } + SBattleLoad.Dispoose(); + SBattleLoad = null; + BattlePlayer.Clear(); + BattleEnemy.Clear(); + BattlePlayer = null; + BattleEnemy = null; + EmoteUI = null; + _unityEventAgentObject = null; + PanelMgr = null; + PlayerCardParameterListInfo.Clear(); + EnemyCardParameterListInfo.Clear(); + PlayerCardParameterListInfo = null; + EnemyCardParameterListInfo = null; + TransformCardList.Clear(); + PublishedSkillList.Clear(); + Prediction.Dispose(); + Prediction = null; + TouchControl.Dispose(); + TouchControl = null; + EnemyAI = null; + BtlContainer = null; + BtlUIContainer = null; + CutInContainer = null; + CardHolder = null; + PCardPlace = null; + ECardHolder = null; + Arrow = null; + ArrowControl = null; + AttackArrowHead = null; + EvolutionArrowHead = null; + AlertDialogue = null; + TurnPanelControl = null; + BattleResult = null; + BattleResultControl = null; + BattleStart = null; + BattleStartControl = null; + MenuButtonObject = null; + Battle3DContainer = null; + SubUI = null; + SubParticleContainer = null; + UIManager.GetInstance().DestroyView(UIManager.ViewScene.Battle); + GameMgr.GetIns().GetPrefabMgr().DisposeAllClonedObject(); + GameMgr.GetIns().GetGameObjMgr().DisposeUIGameObj(); + GameMgr.GetIns().GetPrefabMgr().AllUnLoad(); + } + + private void DisposeBattleGameObj_DestroyImmediate(GameObject obj) + { + if (obj != null) + { + UnityEngine.Object.DestroyImmediate(obj); + } + } + + public VfxBase TurnEnd(bool isPlayer) + { + IsTurnEnd = true; + VfxBase result = GetBattlePlayer(isPlayer).TurnEnd(); + IsTurnEnd = false; + return result; + } + + public virtual VfxBase StartBattle() + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + LocalLog.SetLastTraceLogTurn(1); + sequentialVfxPlayer.Register(ChangePhase(PhaseCreator.CreateMainPhase())); + if (IsRecovery) + { + return sequentialVfxPlayer; + } + if (IsFirst) + { + sequentialVfxPlayer.Register(BattlePlayer.StartTurnControl()); + } + else + { + sequentialVfxPlayer.Register(BattleEnemy.StartTurnControl()); + } + return sequentialVfxPlayer; + } + + public virtual VfxBase ChangePhase(IPhase phase) + { + if (phase == null) + { + return NullVfx.GetInstance(); + } + LocalLog.AccumulateLastTraceLog("ChangePhase" + phase.ToString()); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (_phase != null) + { + VfxBase vfx = _phase.Teardown(); + sequentialVfxPlayer.Register(vfx); + } + _phase = phase; + VfxBase vfx2 = _phase.Setup(); + sequentialVfxPlayer.Register(vfx2); + return sequentialVfxPlayer; + } + + public BattleControl GetBattleControl() + { + return GameMgr.GetIns().GetBattleCtrl(); + } + + public CardParameterListInfo GetCardParameterListInfo(bool isPlayer) + { + if (!isPlayer) + { + return EnemyCardParameterListInfo; + } + return PlayerCardParameterListInfo; + } + + public BattlePlayerBase GetBattlePlayer(bool isPlayer) + { + if (isPlayer) + { + return BattlePlayer; + } + return BattleEnemy; + } + + public BattlePlayerPair GetBattlePlayerPair(bool isPlayer) + { + BattlePlayerBase battlePlayer = GetBattlePlayer(isPlayer); + BattlePlayerBase battlePlayer2 = GetBattlePlayer(!isPlayer); + return new BattlePlayerPair(battlePlayer, battlePlayer2); + } + + public BattlePlayerReadOnlyInfoPair GetBattlePlayerInfoPair(bool isPlayer) + { + BattlePlayerBase battlePlayer = GetBattlePlayer(isPlayer); + BattlePlayerBase battlePlayer2 = GetBattlePlayer(!isPlayer); + return new BattlePlayerReadOnlyInfoPair(battlePlayer, battlePlayer2); + } + + public Transform GetBattle3DContainerChild(string childName) + { + return Battle3DContainer.transform.Find(childName); + } + + public virtual int StableRandom(int val) + { + if (IsForecast) + { + return 0; + } + stableRandomCount++; + randomResult = _stableRandom.NextDouble(); + return (int)Math.Floor((double)val * randomResult); + } + + public virtual double StableRandomDouble() + { + if (IsForecast) + { + return 0.0; + } + stableRandomCount++; + randomResult = _stableRandom.NextDouble(); + return randomResult; + } + + public virtual int StableRandomOnlySelf(int val) + { + if (IsForecast) + { + return 0; + } + return _stableRandomOnlySelf.Next(val); + } + + public BattleCardBase GetBattleCardIdx(IList list, int idx) + { + return list.SingleOrDefault((BattleCardBase c) => c.Index == idx); + } + + public virtual BattleCardBase MetamorphoseCard(int cardId, bool isPlayer, int addIndex, SkillBase skill, bool isFusion = false) + { + return CreateBattleCardWithGameObject(new CardCreateInfo(cardId, isPlayer, skill.ApplyingTargetFilter is SkillTargetChosenCardsFilter, NetworkBattleDefine.NetworkCardPlaceState.None, isReferenceOpponentCard: false, skill), new IndexInfo(addIndex)); + } + + public virtual BattleCardBase CreateBattleCardWithGameObject(CardCreateInfo info, IndexInfo indexInfo, int repeatCount = -1, bool isVirtual = false, bool isActualCard = false) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(info.Id); + BattlePlayerBase battlePlayer = GetBattlePlayer(info.IsPlayer); + int cardIndex = SetupCardIndex(battlePlayer, indexInfo.AddIndex); + GameObject cardGameObject = null; + if (!IsRecovery || !isVirtual) + { + cardGameObject = CreateBaseCardGameObject(cardParameterFromId, info.IsPlayer, cardIndex); + } + BattleCardBase battleCardBase = CreateBattleCard(info.Id, info.IsPlayer, cardGameObject, cardParameterFromId, battlePlayer, cardIndex, info.Cost); + SetupCardObjectMaterials(cardGameObject, battleCardBase); + return battleCardBase; + } + + public BattleCardBase CreateBattleCard(int cardId, bool isPlayer, GameObject cardGameObject, CardParameter cardParameter, BattlePlayerBase battlePlayer, int cardIndex, int cost = -1) + { + BattleCardBase battleCardBase = CardCreatorBase.CreateToken(CreateCardBuildInfo(cardGameObject, cardParameter, isPlayer, cardIndex, cardId), cardGameObject == null); + battleCardBase.IsTokenLoad = true; + battlePlayer.SetupCardEvent(battleCardBase); + if (cost != -1) + { + battleCardBase.CostModifierList.Add(new CostSetModifier(cost)); + } + return battleCardBase; + } + + public BattleCardBase CreateTransformCardRegisterVfx(BattleCardBase originalCard, int tokenId, bool isPlayer, VfxMgr predictionVfxMgr = null, bool isRecoveryFinish = false, bool isChoice = false) + { + BattleCardBase battleCardBase = null; + if (!IsRecovery || isRecoveryFinish) + { + battleCardBase = CreateTransformCardWithGameObject(tokenId, originalCard, isPlayer, isChoice); + } + else + { + battleCardBase = TransformCardList.FirstOrDefault((BattleCardBase c) => c.CardId == tokenId && c.IsPlayer == isPlayer); + if (battleCardBase == null) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(tokenId); + battleCardBase = CreateChoiceCard(tokenId, isPlayer, null, cardParameterFromId, GetBattlePlayer(isPlayer)); + } + } + battleCardBase.TransformInfo = new BattleCardBase.TransformInformation(battleCardBase.TransformInfo.Type, originalCard); + return battleCardBase; + } + + protected virtual BattleCardBase CreateTransformCardWithGameObject(int cardId, BattleCardBase originalCard, bool isPlayer, bool isChoice) + { + BattleCardBase battleCardBase = TransformCardList.FirstOrDefault((BattleCardBase c) => c.CardId == cardId && c.IsPlayer == isPlayer && (isChoice || c.TransformInfo.OriginalCard == originalCard)); + if (battleCardBase == null) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + BattlePlayerBase battlePlayer = GetBattlePlayer(isPlayer); + GameObject cardGameObject = CreateBaseCardGameObject(cardParameterFromId, isPlayer, cardId); + battleCardBase = CreateChoiceCard(cardId, isPlayer, cardGameObject, cardParameterFromId, battlePlayer); + SetupCardObjectMaterials(cardGameObject, battleCardBase); + TransformCardList.Add(battleCardBase); + } + return battleCardBase; + } + + protected BattleCardBase CreateChoiceCard(int cardId, bool isPlayer, GameObject cardGameObject, CardParameter cardParameter, BattlePlayerBase battlePlayer) + { + BattleCardBase battleCardBase = CardCreatorBase.CreateToken(CreateCardBuildInfo(cardGameObject, cardParameter, isPlayer, cardId, cardId), cardGameObject == null); + battleCardBase.IsTokenLoad = true; + return battleCardBase; + } + + public BattleCardBase CreateFusionCard(int cardId, bool isPlayer) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + return CardCreatorBase.CreateToken(CreateCardBuildInfo(null, cardParameterFromId, isPlayer, cardId, cardId), createNullView: true); + } + + public BattleCardBase ReplaceChoiceBraveCard(BattleCardBase originalCard, int cardId, BattleCardBase selectSkillCard) + { + BattleCardBase choiceBraveCard = originalCard.SelfBattlePlayer.CreateCard(cardId, originalCard.SelfBattlePlayer.Class.Index, isChoiceBrave: true); + choiceBraveCard.BattleCardView.GameObject.SetActive(value: false); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(ParallelVfxPlayer.Create(choiceBraveCard.SelfBattlePlayer.BattleMgr.LoadCardResources(new List { choiceBraveCard }), InstantVfx.Create(delegate + { + if (!IsRecovery) + { + Transform transform = choiceBraveCard.BattleCardView.Transform; + Transform transform2 = ((selectSkillCard != null) ? selectSkillCard.BattleCardView.Transform : originalCard.SelfBattlePlayer.BattleView.ChoiceBraveButtonTransform); + transform.position = ((selectSkillCard != null) ? transform2.position : new Vector3(transform2.position.x, transform2.position.y, 0f)); + transform.rotation = transform2.rotation; + transform.parent = originalCard.SelfBattlePlayer.BattleView.HandDeck.transform; + transform.localScale = transform2.localScale; + transform.SetSiblingIndex(transform2.GetSiblingIndex()); + choiceBraveCard.BattleCardView.GameObject.SetActive(value: true); + } + }))); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + if (selectSkillCard != null) + { + selectSkillCard.BattleCardView.GameObject.SetActive(value: false); + } + })); + choiceBraveCard.SelfBattlePlayer.BattleMgr.VfxMgr.RegisterImmediateVfx(sequentialVfxPlayer); + return choiceBraveCard; + } + + protected GameObject CreateBaseCardGameObject(CardParameter cardParameter, bool isPlayer, int cardIndex) + { + GameObject gameObject = null; + if (cardParameter.CharType == CardBasePrm.CharaType.NORMAL) + { + gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(SBattleLoad.UnitCardTemplate.gameObject, _backGround.m_Battle3DContainer); + } + else if (cardParameter.CharType == CardBasePrm.CharaType.SPELL) + { + gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(SBattleLoad.SpellCardTemplate.gameObject, _backGround.m_Battle3DContainer); + } + else if (cardParameter.CharType == CardBasePrm.CharaType.FIELD || cardParameter.CharType == CardBasePrm.CharaType.CHANT_FIELD) + { + gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(SBattleLoad.FieldCardTemplate.gameObject, _backGround.m_Battle3DContainer); + gameObject.transform.Find("CardObj/NormalField").gameObject.SetActive(value: false); + } + SetupCardObjectTags(gameObject, isPlayer, cardIndex); + return gameObject; + } + + private void SetupCardObjectTags(GameObject cardGameObject, bool isPlayer, int cardIndex) + { + string tag; + string text; + if (isPlayer) + { + tag = "PlayerToken"; + text = "P"; + } + else + { + tag = "Enemy"; + text = "E"; + } + cardGameObject.tag = tag; + cardGameObject.transform.Find("CardObj").tag = tag; + cardGameObject.transform.Find("Collider").tag = tag; + cardGameObject.name = text + cardIndex; + } + + protected void SetupCardObjectMaterials(GameObject cardGameObject, BattleCardBase battleCard) + { + cardGameObject.GetComponent().DynamicSetupMaterials(battleCard, BattleResourceMgr); + cardGameObject.SetActive(value: false); + cardGameObject.transform.localPosition = Vector3.zero; + cardGameObject.transform.localScale = Global.CARD_BATTLE_SCALE; + cardGameObject.transform.rotation = Quaternion.identity; + } + + protected int SetupCardIndex(BattlePlayerBase battlePlayer, int cardIndex) + { + if (cardIndex == -1) + { + cardIndex = battlePlayer.cardTotalNum; + battlePlayer.cardTotalNum++; + } + return cardIndex; + } + + private BattleCardBase.BuildInfo CreateCardBuildInfo(GameObject cardGameObject, CardParameter cardParameter, bool isPlayer, int cardIndex, int cardId) + { + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(cardParameter); + IInnerOptionsBuilder innerOptionsBuilder = (isPlayer ? CreatePlayerInnerOptionsBuilder() : CreateEnemyInnerOptionsBuilder()); + bool isPlayer2 = isPlayer; + return new BattleCardBase.BuildInfo(cardGameObject, cardId, GetBattlePlayer(isPlayer), GetBattlePlayer(!isPlayer), GetBattlePlayer(isPlayer), cardSkillsBuildInfo.normalSkillBuildInfos, cardSkillsBuildInfo.evolveSkillBuildInfos, isPlayer2, cardIndex, innerOptionsBuilder.CreateCardOptions(), this, BattleResourceMgr); + } + + public virtual VfxBase JudgeBattleResult() + { + if (BattlePlayer.Class.IsDead && BattleEnemy.Class.IsDead) + { + return InstantVfx.Create(delegate + { + InitiateGameEndSequence(!BattlePlayer.IsSelfTurn); + }); + } + if (BattlePlayer.Class.IsDead) + { + return InstantVfx.Create(delegate + { + InitiateGameEndSequence(hasWon: false); + }); + } + if (BattleEnemy.Class.IsDead) + { + return InstantVfx.Create(delegate + { + InitiateGameEndSequence(hasWon: true); + }); + } + return NullVfx.GetInstance(); + } + + public VfxBase DeadClass(bool PlayerDead, FINISH_TYPE finishType) + { + ClassBattleCardBase classBattleCardBase = (ClassBattleCardBase)GetBattlePlayer(PlayerDead).Class; + if (GameMgr.GetIns().IsReplayBattle && !classBattleCardBase.ClassBattleCardView.InPlayModelActive) + { + return NullVfx.GetInstance(); + } + switch ((int)finishType) + { + case 0: + return classBattleCardBase.SelfBattlePlayer.CardManagement(classBattleCardBase, new SkillProcessor(), BattlePlayerBase.CARD_MANAGEMENT.DESTROY, isRandom: false); + case 1: + if (IsBothClassDead(PlayerDead)) + { + return NullVfx.GetInstance(); + } + classBattleCardBase.FlagCardAsDestroyedBySkill(); + return classBattleCardBase.Retire(); + case 2: + if (IsBothClassDead(PlayerDead)) + { + return NullVfx.GetInstance(); + } + return classBattleCardBase.DestroyBySpecialWin(); + default: + return classBattleCardBase.SelfBattlePlayer.CardManagement(classBattleCardBase, new SkillProcessor(), BattlePlayerBase.CARD_MANAGEMENT.DESTROY, isRandom: false); + } + } + + private bool IsBothClassDead(bool isPlayer) + { + ClassBattleCardBase obj = (ClassBattleCardBase)GetBattlePlayer(isPlayer).Class; + ClassBattleCardBase classBattleCardBase = (ClassBattleCardBase)GetBattlePlayer(!isPlayer).Class; + if (obj.IsDead && classBattleCardBase.IsDead) + { + return true; + } + return false; + } + + protected virtual int GetFirstAttack(int FirstAttack) + { + return UnityEngine.Random.Range(0, 2); + } + + public virtual void SetupEnemyAI() + { + EnemyAI = new EnemyAINull(); + } + + public virtual void SetupPlayerClassEvent() + { + } + + public virtual void SetupOpponentClassEvent() + { + } + + public virtual void SetupCardEvent(BattleCardBase card) + { + } + + public virtual void InitiateGameEndSequence(bool hasWon) + { + if (GameMgr.GetIns().IsReplayBattle && !GameMgr.GetIns().IsNewReplayBattle) + { + hasWon = Data.ReplayBattleInfo.is_win; + } + IResultPhase resultPhase = PhaseCreator.CreateResultPhase(hasWon); + if (hasWon) + { + resultPhase.OnSetupEnd += this.OnWin; + } + VfxBase vfx = ChangePhase(resultPhase); + VfxMgr.RegisterSequentialVfx(vfx); + this.OnBattleFinish.Call(hasWon); + } + + public virtual VfxBase PlaySpecialWin(BattlePlayerBase winPlayer) + { + GetIns().VfxMgr.RegisterImmediateVfx(new CanNotTouchCardVfx()); + bool playerDead = !winPlayer.IsPlayer; + return SequentialVfxPlayer.Create(DeadClass(playerDead, FINISH_TYPE.SPECIAL_WIN), InstantVfx.Create(delegate + { + InitiateGameEndSequence(winPlayer.IsPlayer); + })); + } + + public virtual void PlayRetire() + { + GetIns().VfxMgr.RegisterImmediateVfx(new CanNotTouchCardVfx()); + if (!GetBattlePlayer(isPlayer: true).Class.IsDead) + { + BattlePlayer.BattleView.HideTurnEndButton(); + IsPlayerRetire = true; + VfxMgr.RegisterSequentialVfx(DeadClass(PlayerDead: true, FINISH_TYPE.RETIRE)); + VfxMgr.RegisterSequentialVfx(InstantVfx.Create(delegate + { + InitiateGameEndSequence(hasWon: false); + })); + } + } + + public void MulliganSubmit() + { + VfxMgr.RegisterSequentialVfx(this.OnSubmitMulligan.GetAllFuncVfxResults()); + } + + public void ChangeCameraFieldOfView(float aspectRatio) + { + if ((bool)Battle3DContainer) + { + int num = CalculateCameraFieldOfView(aspectRatio); + int num2 = CalculateBackgroundCameraFieldOfView(aspectRatio); + Transform transform = Battle3DContainer.transform.Find("Camera"); + Camera component; + Camera camera = (component = transform.GetComponent()); + component.fieldOfView = num; + component = transform.Find("Camera 3DGround").GetComponent(); + component.fieldOfView = num2; + (_subParticleCamera = transform.Find("Camera SubParticles").GetComponent()).fieldOfView = num; + component = transform.Find("Camera BattleUnder").GetComponent(); + component.fieldOfView = num; + Transform transform2 = Battle3DContainer.transform.Find("Camera HighRankEvolve"); + if (transform2 == null) + { + transform2 = transform.transform.Find("Camera HighRankEvolve"); + } + Camera component2 = transform2.GetComponent(); + component2.fieldOfView = num; + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (dataMgr.Is3DSkin(isPlayer: true)) + { + component2.depth = 40f; + } + if (dataMgr.GetPlayerCharaData().IsNoEvolveShift) + { + component2.transform.SetParent(camera.transform); + } + component = CutInContainer.transform.Find("Camera").GetComponent(); + component.fieldOfView = num; + } + } + + private int CalculateCameraFieldOfView(float aspectRatio) + { + if (!(aspectRatio < 1.5f)) + { + _ = Global.NormalFieldOfView; + } + else + { + _ = Global.WideFieldOfView; + } + float num = aspectRatio - 1.5f; + return Mathf.Clamp((int)((float)(Global.WideFieldOfView + Global.NormalFieldOfView) / 2f * (1f - num)), Global.NormalFieldOfView, Global.WideFieldOfView); + } + + private int CalculateBackgroundCameraFieldOfView(float aspectRatio) + { + return CalculateCameraFieldOfView(aspectRatio); + } + + public bool CanOpenEvolutionConfirmation(BattleCardBase card) + { + if (IsStopOperate || !card.IsInplay || !card.SelfBattlePlayer.IsSelfTurn || !card.IsPlayer || !card.IsUnit || GameMgr.GetIns().IsWatchBattle) + { + return false; + } + return card.CanEvolution(isSkill: false, isSelfBattlePlayer: true); + } + + protected virtual SequentialVfxPlayer OnShortageDeck(BattlePlayerBase battlePlayer) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (battlePlayer.IsShortageDeckWin) + { + sequentialVfxPlayer.Register(new DeckOutWinVfx(battlePlayer)); + sequentialVfxPlayer.Register(DeadClass(!battlePlayer.IsPlayer, FINISH_TYPE.SPECIAL_WIN)); + battlePlayer.Class.OpponentBattlePlayer.Class.FlagCardAsDestroyedBySkill(); + } + else + { + if (battlePlayer.IsPlayer) + { + sequentialVfxPlayer.Register(new PlayerDeckOutVfx(BattlePlayer, this)); + BattlePlayer.SetIsShortageDeckLose(flag: true); + } + else + { + sequentialVfxPlayer.Register(new EnemyDeckOutVfx(BattleEnemy, this)); + BattleEnemy.SetIsShortageDeckLose(flag: true); + } + sequentialVfxPlayer.Register(DeadClass(battlePlayer.IsPlayer, FINISH_TYPE.NORMAL)); + } + return sequentialVfxPlayer; + } + + public SkillCardLimitUpperCountFilter CheackCalledCreateFilterDictionary(IReadOnlyBattleCardInfo ownerCard, string partText, string infoText) + { + SkillCardLimitUpperCountFilter result = null; + CalledCreateFilterPair calledFilterPair = new CalledCreateFilterPair(ownerCard, partText); + if (_calledCreateLimitFilterDictionary.Any((KeyValuePair c) => c.Key.Equal(calledFilterPair))) + { + KeyValuePair keyValuePair = _calledCreateLimitFilterDictionary.FirstOrDefault((KeyValuePair c) => c.Key.Equal(calledFilterPair)); + if (keyValuePair.Value != null) + { + result = keyValuePair.Value; + } + } + else if (SkillFilterCreator.COUNT_EXTENSIONS_FILTER_NAMES.Any((string n) => Regex.IsMatch(partText, "^" + n + "[<>!:=]=?"))) + { + SkillCardLimitUpperCountFilter skillCardLimitUpperCountFilter = new SkillCardLimitUpperCountFilter(infoText); + result = skillCardLimitUpperCountFilter; + if (!IsVirtualBattleEnemyTurn) + { + _calledCreateLimitFilterDictionary.Add(calledFilterPair, skillCardLimitUpperCountFilter); + } + } + else if (!IsVirtualBattleEnemyTurn) + { + _calledCreateLimitFilterDictionary.Add(calledFilterPair, null); + } + return result; + } + + public SkillOrFilter CheackCalledCreateOrFilterDictionary(IReadOnlyBattleCardInfo ownerCard, string partText, string infoText) + { + SkillOrFilter result = null; + CalledCreateFilterPair calledFilterPair = new CalledCreateFilterPair(ownerCard, partText); + if (_calledCreateOrFilterDictionary.Any((KeyValuePair c) => c.Key.Equal(calledFilterPair))) + { + KeyValuePair keyValuePair = _calledCreateOrFilterDictionary.FirstOrDefault((KeyValuePair c) => c.Key.Equal(calledFilterPair)); + if (keyValuePair.Value != null) + { + result = keyValuePair.Value; + } + } + else + { + string text = SkillFilterCreator.ContentKeyword.or.ToStringCustom(); + if (Regex.IsMatch(partText, "^" + text + "[<>!:=]=?")) + { + SkillOrFilter skillOrFilter = new SkillOrFilter(int.Parse(infoText)); + result = skillOrFilter; + if (!IsVirtualBattleEnemyTurn) + { + _calledCreateOrFilterDictionary.Add(calledFilterPair, skillOrFilter); + } + } + else if (!IsVirtualBattleEnemyTurn) + { + _calledCreateOrFilterDictionary.Add(calledFilterPair, null); + } + } + return result; + } + + public ISkillCardFilter CheackCalledCreateSkillCardFilterDictionary(IReadOnlyBattleCardInfo ownerCard, string partText, string infoText) + { + ISkillCardFilter result = null; + CalledCreateFilterPair calledFilterPair = new CalledCreateFilterPair(ownerCard, partText); + if (_calledCreateFilterDictionary.Any((KeyValuePair c) => c.Key.Equal(calledFilterPair))) + { + KeyValuePair keyValuePair = _calledCreateFilterDictionary.FirstOrDefault((KeyValuePair c) => c.Key.Equal(calledFilterPair)); + if (keyValuePair.Value != null) + { + result = keyValuePair.Value; + } + } + else if (SkillFilterCreator.CARD_PARAMETER_COMPARE_FILTER_NAMES.Any((string n) => Regex.IsMatch(partText, "^" + n + "[<>!:=]=?"))) + { + ISkillCardFilter skillCardFilter = SkillFilterCreator.CreateCardParameterCompareFilter(partText, ownerCard); + result = skillCardFilter; + if (!IsVirtualBattleEnemyTurn) + { + _calledCreateFilterDictionary.Add(calledFilterPair, skillCardFilter); + } + } + else if (!IsVirtualBattleEnemyTurn) + { + _calledCreateFilterDictionary.Add(calledFilterPair, null); + } + return result; + } + + public void RemoveUnUseCalledFilterDictionary() + { + if (IsVirtualBattleEnemyTurn) + { + return; + } + List list = new List(); + foreach (KeyValuePair item in new Dictionary(_calledCreateFilterDictionary)) + { + if (item.Key.HasOwnerCard()) + { + if (item.Key.IsOwnerCardDead()) + { + list.Add(item.Key); + } + } + else + { + list.Add(item.Key); + } + } + foreach (CalledCreateFilterPair item2 in list) + { + _calledCreateFilterDictionary.Remove(item2); + } + list.Clear(); + foreach (KeyValuePair item3 in new Dictionary(_calledCreateLimitFilterDictionary)) + { + if (item3.Key.HasOwnerCard()) + { + if (item3.Key.IsOwnerCardDead()) + { + list.Add(item3.Key); + } + } + else + { + list.Add(item3.Key); + } + } + foreach (CalledCreateFilterPair item4 in list) + { + _calledCreateLimitFilterDictionary.Remove(item4); + } + list.Clear(); + foreach (KeyValuePair item5 in new Dictionary(_calledCreateOrFilterDictionary)) + { + if (item5.Key.HasOwnerCard()) + { + if (item5.Key.IsOwnerCardDead()) + { + list.Add(item5.Key); + } + } + else + { + list.Add(item5.Key); + } + } + foreach (CalledCreateFilterPair item6 in list) + { + _calledCreateOrFilterDictionary.Remove(item6); + } + } + + protected void SetUpMyRotationBattle(int playerMaxLife, int enemyMaxLife) + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + MyRotationInfo myRotationInfo; + bool flag = dataMgr.TryGetPlayerMyRotationInfo(out myRotationInfo); + MyRotationInfo myRotationInfo2; + bool flag2 = dataMgr.TryGetEnemyMyRotationInfo(out myRotationInfo2); + if (!flag && !flag2) + { + return; + } + List list = new List(); + if (flag) + { + for (int i = 0; i < myRotationInfo.Abilities.Count; i++) + { + MyRotationInfo.MyRotationBonus myRotationBonus = myRotationInfo.Abilities[i]; + for (int j = 0; j < myRotationBonus.AttachAbilities.Length; j++) + { + AttachInfo attachInfo = AddAttachSkillToClass(isPlayer: true, myRotationBonus.AttachAbilities[j], myRotationBonus.AbilityId); + if (attachInfo != null) + { + list.Add(attachInfo); + } + } + BattlePlayer.PpTotal += myRotationBonus.AddStartPp; + playerMaxLife += myRotationBonus.AddStartLife; + BattlePlayer.BonusConditionList.Add(new BattlePlayerBase.MyRotationBonusCondition(myRotationBonus)); + } + } + if (flag2) + { + for (int k = 0; k < myRotationInfo2.Abilities.Count; k++) + { + MyRotationInfo.MyRotationBonus myRotationBonus2 = myRotationInfo2.Abilities[k]; + for (int l = 0; l < myRotationBonus2.AttachAbilities.Length; l++) + { + AttachInfo attachInfo2 = AddAttachSkillToClass(isPlayer: false, myRotationBonus2.AttachAbilities[l], myRotationBonus2.AbilityId); + if (attachInfo2 != null) + { + list.Add(attachInfo2); + } + } + BattleEnemy.PpTotal += myRotationBonus2.AddStartPp; + enemyMaxLife += myRotationBonus2.AddStartLife; + BattleEnemy.BonusConditionList.Add(new BattlePlayerBase.MyRotationBonusCondition(myRotationBonus2)); + } + } + for (int m = 0; m < list.Count; m++) + { + AttachInfo attachInfo3 = list[m]; + SkillBase attachSkill = Skill_attach_skill.CreateAndAttachSkill(attachInfo3._classCard, attachInfo3._attachSkill, attachInfo3._targetSkillBuildInfo); + IDetailPanelControl detailPanel = DetailMgr.DetailPanelControl; + if (!attachSkill.PreprocessList.Any((SkillPreprocessBase s) => s is SkillPreprocessRemoveAfterAction)) + { + continue; + } + attachSkill.OnSkillStart += delegate + { + attachSkill.OnSkillEnd += delegate + { + if (attachSkill.PreprocessList.Any((SkillPreprocessBase s) => s is SkillPreprocessRemoveAfterAction && (s as SkillPreprocessRemoveAfterAction).IsEnd())) + { + List list2 = (attachInfo3._classCard.IsPlayer ? BattlePlayer.BonusConditionList : BattleEnemy.BonusConditionList); + BattlePlayerBase.MyRotationBonusCondition myRotationBonusCondition = list2.FirstOrDefault((BattlePlayerBase.MyRotationBonusCondition b) => b.MyRotationBonus.AbilityId == attachInfo3._myRotationBonusId); + myRotationBonusCondition.ReduceSkillCount(); + myRotationBonusCondition.UseUpSkill(); + if (detailPanel._card != null && detailPanel._card.IsClass && detailPanel._card.IsPlayer == attachInfo3._classCard.IsPlayer) + { + detailPanel.UpdateBuffInfo(attachInfo3._classCard, list2); + } + } + return NullVfx.GetInstance(); + }; + }; + } + BattlePlayer.SetPpTotal(BattlePlayer.PpTotal, isUpdatePp: true, null); + BattleEnemy.SetPpTotal(BattleEnemy.PpTotal, isUpdatePp: true, null); + InitializeClassLife(playerMaxLife, enemyMaxLife); + } + + protected void SetupAvatarBattle(bool doesPlayerGoFirst) + { + if (Data.CurrentFormat == Format.Avatar) + { + GameMgr.GetIns().GetDataMgr(); + if (doesPlayerGoFirst) + { + SetupSpecifiedPlayerAvatarBattle(isPlayer: true); + SetupSpecifiedPlayerAvatarBattle(isPlayer: false); + } + else + { + SetupSpecifiedPlayerAvatarBattle(isPlayer: false); + SetupSpecifiedPlayerAvatarBattle(isPlayer: true); + } + } + } + + private void SetupSpecifiedPlayerAvatarBattle(bool isPlayer) + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if ((!isPlayer) ? dataMgr.TryGetEnemyAvatarBattleInfo(out var avatarBattleInfo) : dataMgr.TryGetPlayerAvatarBattleInfo(out avatarBattleInfo)) + { + SetupPlayerAvatarBattle(isPlayer ? ((BattlePlayerBase)BattlePlayer) : ((BattlePlayerBase)BattleEnemy), avatarBattleInfo); + } + } + + private void SetupPlayerAvatarBattle(BattlePlayerBase battlePlayerBase, AvatarBattleInfo avatarBattleInfo) + { + battlePlayerBase.AvatarBattleInfo = avatarBattleInfo; + AvatarBattleInfo.AvatarBattleBonus bonus = avatarBattleInfo.Bonus; + string[] abilities = bonus.Abilities; + List list = new List(); + for (int i = 0; i < abilities.Length; i++) + { + AttachInfo attachInfo = AddAttachSkillToClass(battlePlayerBase is BattlePlayer, abilities[i]); + if (attachInfo != null) + { + list.Add(attachInfo); + } + } + for (int j = 0; j < list.Count; j++) + { + AttachInfo attachInfo2 = list[j]; + Skill_attach_skill.CreateAndAttachSkill(attachInfo2._classCard, attachInfo2._attachSkill, attachInfo2._targetSkillBuildInfo); + } + battlePlayerBase.AvatarBattlePassiveSkillDescInfo = new BattlePlayerBase.AvatarBattleDescInfo(avatarBattleInfo.Bonus.PassiveAbilityDesc, ""); + battlePlayerBase.ChoiceBraveSkillDescInfoList = new List(); + for (int k = 0; k < bonus.AbilityDesc.Count(); k++) + { + battlePlayerBase.ChoiceBraveSkillDescInfoList.Add(new BattlePlayerBase.AvatarBattleDescInfo(bonus.AbilityDesc[k], bonus.AbilityCosts[k])); + } + VfxMgr.RegisterImmediateVfx(battlePlayerBase.SetBp(battlePlayerBase.IsGameFirst ? bonus.BattleStartFirstPlayerTurnBp : bonus.BattleStartSecondPlayerTurnBp)); + ((ClassBattleCardBase)battlePlayerBase.Class).InitBaseMaxLife(bonus.BattleStartMaxLife); + } + + protected AttachInfo AddAttachSkillToClass(bool isPlayer, string skillText, string myRotationBonusId = "") + { + if (skillText == string.Empty) + { + return null; + } + SkillCreator.SkillBuildInfo targetSkillBuildInfo = Skill_attach_skill.CreateAttachSkillBuildInfo(skillText); + BattleCardBase battleCardBase = null; + battleCardBase = ((!isPlayer) ? BattleEnemy.ClassAndInPlayCardList.First((BattleCardBase c) => c is ClassBattleCardBase) : BattlePlayer.ClassAndInPlayCardList.First((BattleCardBase c) => c is ClassBattleCardBase)); + SkillCreator.SkillBuildInfo skillBuildInfo = new SkillCreator.SkillBuildInfo("attach_skill", "none", "character=me", "character=me&target=inplay&card_type=class", "skill=" + skillText, "none"); + SkillBase skillBase = battleCardBase.CreateSkillCreator(battleCardBase.SelfBattlePlayer, battleCardBase.OpponentBattlePlayer, BattleResourceMgr).Create(skillBuildInfo, null, isAttachSkill: true); + battleCardBase.NormalSkills.Add(skillBase); + battleCardBase.NormalSkillBuildInfos.Add(skillBuildInfo); + return new AttachInfo(battleCardBase, skillBase, targetSkillBuildInfo, myRotationBonusId); + } + + public static bool IsCardPrivate(BattleCardBase card) + { + if (!card.IsPlayer) + { + if (!card.IsInHand) + { + return card.IsInDeck; + } + return true; + } + return false; + } + + public VfxBase LoadCardResources(List cards, bool isRecoveryFinish = false) + { + if (cards.Count == 0) + { + return NullVfx.GetInstance(); + } + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + List list = new List(); + for (int i = 0; i < cards.Count; i++) + { + BattleCardBase battleCardBase = cards[i]; + if (battleCardBase != null) + { + parallelVfxPlayer.Register(battleCardBase.BattleCardView.GetResourcePathes(list)); + parallelVfxPlayer.Register(battleCardBase.BattleCardView.GetChoiceTransformCardsResourcePathes(battleCardBase, list, isRecoveryFinish)); + } + } + List list2 = new List(); + Action action = delegate + { + }; + for (int num = 0; num < list.Count; num++) + { + ResourceInfo info = list[num]; + if (info.ObjectPath != string.Empty) + { + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(info.ObjectPath, ResourcesManager.AssetLoadPathType.Effect2D); + if (!list2.Contains(assetTypePath)) + { + list2.Add(assetTypePath); + } + } + else if (!list2.Contains(info.ObjectFullPath)) + { + list2.Add(info.ObjectFullPath); + } + if (info.SePath != string.Empty) + { + string item = "s/" + info.SePath + ".acb"; + if (!list2.Contains(item)) + { + list2.Add(item); + } + } + if (info.IsEffectBattleInfoDictionary) + { + BattleResourceMgr.AddEffectBattleInfoDictionary(info.ObjectPath, info.SePath); + action = (Action)Delegate.Combine(action, (Action)delegate + { + BattleResourceMgr.SetEffectBattleInfoDictionary(info.ObjectPath, info.ObjectFullPath); + }); + } + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(new WaitLoadResourceVfx(list2, action)); + sequentialVfxPlayer.Register(parallelVfxPlayer); + return sequentialVfxPlayer; + } + + public VfxBase RecoveryInPlayAndHandCards() + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + List list = new List(); + for (int i = 0; i < BattlePlayer.InPlayCards.Count(); i++) + { + BattleCardBase battleCardBase = BattlePlayer.InPlayCards.ElementAt(i); + battleCardBase.BattleCardView.CardWrapObject.SetActive(value: true); + iTween.Stop(battleCardBase.BattleCardView.GameObject); + list.Add(battleCardBase); + parallelVfxPlayer.Register(battleCardBase.RecoveryInPlay(i, newReplayMoveTurn: true)); + } + for (int j = 0; j < BattleEnemy.InPlayCards.Count(); j++) + { + BattleCardBase battleCardBase2 = BattleEnemy.InPlayCards.ElementAt(j); + iTween.Stop(battleCardBase2.BattleCardView.GameObject); + list.Add(battleCardBase2); + parallelVfxPlayer.Register(battleCardBase2.RecoveryInPlay(j, newReplayMoveTurn: true)); + } + for (int k = 0; k < BattlePlayer.HandCardList.Count; k++) + { + BattleCardBase card = BattlePlayer.HandCardList[k]; + list.Add(card); + card.SetOnDraw(draw: false); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(card.BattleCardView.RecoveryInHand()); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + card.BattleCardView.GameObject.SetActive(value: false); + MotionUtils.SetLayerAll(card.BattleCardView.GameObject, 10); + card.BattleCardView.InitCostViewAnim(); + card.BattleCardView.Transform.parent = BattlePlayer.HandControl.Transform; + BattlePlayer.BattleView.HandView.AddCardToView(card.BattleCardView, 0f, isNewReplayMoveTurn: true); + card.BattleCardView.GameObject.SetActive(value: true); + card.BattleCardView.CardWrapObject.SetActive(value: true); + })); + parallelVfxPlayer.Register(sequentialVfxPlayer); + } + for (int num = 0; num < BattleEnemy.HandCardList.Count; num++) + { + BattleCardBase card2 = BattleEnemy.HandCardList[num]; + list.Add(card2); + SequentialVfxPlayer sequentialVfxPlayer2 = SequentialVfxPlayer.Create(); + sequentialVfxPlayer2.Register(InstantVfx.Create(delegate + { + card2.BattleCardView.GameObject.SetActive(value: false); + MotionUtils.SetLayerAll(card2.BattleCardView.GameObject, 10); + card2.BattleCardView.Transform.parent = BattleEnemy.HandControl.Transform; + BattleEnemy.BattleView.HandView.AddCardToView(card2.BattleCardView, 0f, isNewReplayMoveTurn: true); + card2.BattleCardView.GameObject.SetActive(value: true); + })); + parallelVfxPlayer.Register(sequentialVfxPlayer2); + } + return SequentialVfxPlayer.Create(LoadCardResources(list), parallelVfxPlayer); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleMenuMgr.cs b/SVSim.BattleEngine/Engine/BattleMenuMgr.cs new file mode 100644 index 0000000..7e35d07 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleMenuMgr.cs @@ -0,0 +1,609 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.View; +using Wizard.RoomMatch; + +public class BattleMenuMgr : NonDialogPopup +{ + [SerializeField] + private GameObject UserPanel; + + [SerializeField] + private NguiObjs UserPanelP; + + [SerializeField] + private NguiObjs UserPanelE; + + [SerializeField] + private GameObject CharPanelP; + + [SerializeField] + private GameObject CharPanelE; + + [SerializeField] + private UITexture CharTextureP; + + [SerializeField] + private UITexture CharTextureE; + + [SerializeField] + private GameObject _roomIDRoot; + + [SerializeField] + private UILabel _roomIDLabel; + + [SerializeField] + private GameObject _winnerRewardRoot; + + [SerializeField] + private UISprite _winnerRewardBox; + + [SerializeField] + private UILabel _winnerRewardNameLabel; + + [SerializeField] + private GameObject _vsRoot; + + [SerializeField] + private GameObject _ratingRoot; + + [SerializeField] + private GameObject _backSpriteRoot; + + [SerializeField] + private UIButton _backSpriteButton; + + [SerializeField] + private GameObject _defaultMenuRoot; + + [SerializeField] + private GameObject _titleLine; + + [SerializeField] + private GameObject _titleLineWithFormat; + + [SerializeField] + private UILabel _formatLabel; + + [SerializeField] + private UISprite _formatIcon; + + [SerializeField] + private UILabel _tsRotaionFormatLabel; + + [SerializeField] + private UIButton _retireButton; + + [SerializeField] + private UILabel _retireButtonLabel; + + [SerializeField] + private UIButton _settingButton; + + [SerializeField] + private UILabel _settingButtonLabel; + + [SerializeField] + private UIButton _backButton; + + [SerializeField] + private UILabel _backButtonLabel; + + [SerializeField] + private GameObject _questMenuRoot; + + [SerializeField] + private UIButton _questRetireButton; + + [SerializeField] + private UILabel _questRetireButtonLabel; + + [SerializeField] + private UIButton _questSettingButton; + + [SerializeField] + private UILabel _questSettingButtonLabel; + + [SerializeField] + private UIButton _questBackButton; + + [SerializeField] + private UILabel _questBackButtonLabel; + + [SerializeField] + private UIButton _questMissionButton; + + [SerializeField] + private UILabel _questMissionButtonLabel; + + [SerializeField] + private GameObject _questMissionDialogPrefab; + + [SerializeField] + private ClassInfoParts _classInfoP; + + [SerializeField] + private ClassInfoParts _classInfoE; + + [SerializeField] + private ClassInfoParts _classInfoWithSubClassP; + + [SerializeField] + private ClassInfoParts _classInfoWithSubClassE; + + [SerializeField] + private FlexibleGrid _subClassGridP; + + [SerializeField] + private FlexibleGrid _subClassGridE; + + [SerializeField] + private MyRotationParts _myRotationInfoP; + + [SerializeField] + private MyRotationParts _myRotationInfoE; + + private Dictionary defPosDict = new Dictionary(); + + public const float OPEN_DURATION_TIME = 0.3f; + + private bool IsQuestBattle => GameMgr.GetIns().GetDataMgr().IsQuestBattleType(); + + public GameObject QuestMissionDialogPrefab => _questMissionDialogPrefab; + + public void DisplayBattleMenu(Action retireAction, Action settingAction, Action backAction, Action questMissionAction) + { + InitializeBattleMenu(); + iTween.MoveTo(UserPanel, iTween.Hash("position", defPosDict["UserPanel"], "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CharPanelP, iTween.Hash("position", defPosDict["CharPanelP"], "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CharPanelE, iTween.Hash("position", defPosDict["CharPanelE"], "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(UserPanel, 0f, 0f); + TweenAlpha.Begin(UserPanel, 0.3f, 1f); + if (IsQuestBattle && !BattleManagerBase.GetIns().IsPuzzleMgr && GameMgr.GetIns().GetDataMgr().m_BattleType != DataMgr.BattleType.BossRushQuest && GameMgr.GetIns().GetDataMgr().m_BattleType != DataMgr.BattleType.SecretBossQuest) + { + SetupQuestButtonMenu(retireAction, settingAction, backAction, questMissionAction); + } + else + { + SetupDefaultButtonMenu(retireAction, settingAction, backAction); + } + TweenAlpha.Begin(base.gameObject, 0f, 0f); + TweenAlpha.Begin(base.gameObject, 0.3f, 1f); + TweenAlpha.Begin(_backSpriteRoot.gameObject, 0f, 0f); + TweenAlpha.Begin(_backSpriteRoot.gameObject, 0.3f, 1f); + } + + private void InitializeBattleMenu() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + NetworkUserInfoData networkUserInfoData = GameMgr.GetIns().GetNetworkUserInfoData(); + PuzzleQuestData puzzleQuestData = null; + bool isPuzzleMgr = BattleManagerBase.GetIns().IsPuzzleMgr; + if (isPuzzleMgr) + { + puzzleQuestData = Data.Master.PuzzleQuestDataList.First((PuzzleQuestData data) => data.Id == GameMgr.GetIns().GetDataMgr().PuzzleQuestId); + } + string text = PlayerStaticData.UserName.ToString(); + if (GameMgr.GetIns().IsWatchBattle) + { + text = networkUserInfoData.GetSelfName(); + } + UserPanelP.labels[0].text = text; + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.labels[0].text = VideoHostingUtil.GetUserNameHidden(networkUserInfoData.GetOpponentName().ToString()); + } + else + { + UserPanelE.labels[0].text = dataMgr.GetEnemyCharaData().chara_name; + } + if (dataMgr.m_BattleType == DataMgr.BattleType.RankBattle) + { + if (PlayerStaticData.IsMasterRankCurrentFormat()) + { + UserPanelP.labels[1].text = PlayerStaticData.UserMasterPointCurrentFormat().ToString(); + } + else + { + int num = PlayerStaticData.UserBattlePointCurrentFormat(); + if (GameMgr.GetIns().IsWatchBattle) + { + num = networkUserInfoData.GetSelfBattlePoint(); + } + UserPanelP.labels[1].text = num.ToString(); + } + if (networkUserInfoData.GetOpponentIsMasterRank()) + { + UserPanelE.labels[1].text = networkUserInfoData.GetOpponentMasterPoint().ToString(); + } + else + { + UserPanelE.labels[1].text = networkUserInfoData.GetOpponentBattlePoint().ToString(); + } + } + else + { + UserPanelP.labels[1].gameObject.SetActive(value: false); + UserPanelE.labels[1].gameObject.SetActive(value: false); + } + if (GameMgr.GetIns().IsWatchBattle) + { + UserPanelP.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (isPuzzleMgr) + { + UserPanelP.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(puzzleQuestData.PlayerEmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + PlayerStaticData.AttachUserEmblemTexture(UserPanelP.textures[0], PlayerStaticData.EmblemTexSize.M); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + int num2 = 100000000; + if (isPuzzleMgr) + { + num2 = puzzleQuestData.EnemyEmblemId; + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.Quest) + { + num2 = dataMgr.QuestBattleData.EmblemId; + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.BossRushQuest || dataMgr.m_BattleType == DataMgr.BattleType.SecretBossQuest) + { + num2 = dataMgr.BossRushBattleData.EmblemId; + } + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(num2.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M); + if (Toolbox.ResourcesManager.IsLoadedAssetBundle(assetTypePath)) + { + UserPanelE.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(num2.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + UserPanelE.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(num2.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + } + if (GameMgr.GetIns().IsWatchBattle) + { + DegreeHelper.InitializeDegree(UserPanelP.textures[1], networkUserInfoData.GetSelfDegreeId(), DegreeHelper.DegreeType.SMALL); + } + else if (isPuzzleMgr) + { + DegreeHelper.InitializeDegree(UserPanelP.textures[1], puzzleQuestData.PlayerDegreeId, DegreeHelper.DegreeType.MIDDLE); + } + else + { + DegreeHelper.InitializeDegree(UserPanelP.textures[1], PlayerStaticData.UserDegreeID, DegreeHelper.DegreeType.SMALL); + } + int num3 = (GameMgr.GetIns().IsNetworkBattle ? networkUserInfoData.GetOpponentDegreeId() : (isPuzzleMgr ? puzzleQuestData.EnemyDegreeId : ((dataMgr.m_BattleType == DataMgr.BattleType.Quest) ? dataMgr.QuestBattleData.DegreeId : ((dataMgr.m_BattleType != DataMgr.BattleType.BossRushQuest && dataMgr.m_BattleType != DataMgr.BattleType.SecretBossQuest) ? dataMgr.PracticeDifficultyDegreeId : dataMgr.BossRushBattleData.DegreeId)))); + if ((dataMgr.m_BattleType != DataMgr.BattleType.Practice || dataMgr.PracticeDifficultyDegreeId != -1 || isPuzzleMgr) && (!dataMgr.IsQuestBattleType() || num3 != -1) && dataMgr.m_BattleType != DataMgr.BattleType.Story) + { + DegreeHelper.InitializeDegree(UserPanelE.textures[1], num3, DegreeHelper.DegreeType.SMALL); + } + UserPanelE.textures[1].gameObject.SetActive(value: true); + if (dataMgr.m_BattleType != DataMgr.BattleType.Practice && dataMgr.m_BattleType != DataMgr.BattleType.Story && dataMgr.m_BattleType != DataMgr.BattleType.Quest && dataMgr.m_BattleType != DataMgr.BattleType.BossRushQuest && dataMgr.m_BattleType != DataMgr.BattleType.SecretBossQuest) + { + if (GameMgr.GetIns().IsWatchBattle || UserPanelP.textures[2].mainTexture == null) + { + UserPanelP.textures[2].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfRank().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + else + { + PlayerStaticData.AttachUserRankTexture(UserPanelP.textures[2], PlayerStaticData.RankTexSize.S); + } + UserPanelE.textures[2].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentRank().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + else + { + UserPanelP.textures[2].gameObject.SetActive(value: false); + UserPanelE.textures[2].gameObject.SetActive(value: false); + } + if (GameMgr.GetIns().IsWatchBattle) + { + UIUtil.SetCountryTexture(UserPanelP.textures[3], networkUserInfoData.GetSelfCountryCode()); + } + else + { + bool flag = !string.IsNullOrEmpty(PlayerStaticData.UserCountryCode); + UserPanelP.textures[3].gameObject.SetActive(flag); + if (flag) + { + PlayerStaticData.AttachUserCountryTexture(UserPanelP.textures[3], PlayerStaticData.CountryTexSize.M); + } + else + { + UserPanelP.textures[3].mainTexture = null; + } + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UIUtil.SetCountryTexture(UserPanelE.textures[3], networkUserInfoData.GetOpponentCountryCode()); + } + else + { + UserPanelE.textures[3].gameObject.SetActive(value: false); + UserPanelE.textures[3].mainTexture = null; + } + _myRotationInfoP.gameObject.SetActive(value: false); + if (dataMgr.TryGetPlayerSubClassId(out var subClassId)) + { + SetClassInfoWithSubClass(dataMgr.GetPlayerCharaData(), networkUserInfoData.GetSelfChaosId(), subClassId, _classInfoP, _classInfoWithSubClassP, _subClassGridP); + } + else + { + if (dataMgr.TryGetPlayerMyRotationInfo(out var myRotationInfo)) + { + _myRotationInfoP.gameObject.SetActive(value: true); + _myRotationInfoP.SetMyRotationInfo(myRotationInfo); + _myRotationInfoP.Reposition(); + } + _classInfoP.InitByCharaPrm(dataMgr.GetPlayerCharaData(), networkUserInfoData.GetSelfChaosId()); + _classInfoWithSubClassP.gameObject.SetActive(value: false); + } + _myRotationInfoE.gameObject.SetActive(value: false); + if (dataMgr.TryGetEnemySubClassId(out var subClassId2)) + { + SetClassInfoWithSubClass(dataMgr.GetEnemyCharaData(), networkUserInfoData.GetOpponentChaosId(), subClassId2, _classInfoE, _classInfoWithSubClassE, _subClassGridE); + } + else + { + if (dataMgr.TryGetEnemyMyRotationInfo(out var myRotationInfo2)) + { + _myRotationInfoE.gameObject.SetActive(value: true); + _myRotationInfoE.SetMyRotationInfo(myRotationInfo2); + _myRotationInfoE.Reposition(); + } + _classInfoE.InitByCharaPrm(dataMgr.GetEnemyCharaData(), networkUserInfoData.GetOpponentChaosId()); + _classInfoWithSubClassE.gameObject.SetActive(value: false); + } + BattleManagerBase ins = BattleManagerBase.GetIns(); + string playerSkinId = dataMgr.GetPlayerSkinId().ToString("00"); + ResourcesManager.AssetLoadPathType assetTypePlayer = (ins.BattlePlayer.IsSkinEvolved ? ResourcesManager.AssetLoadPathType.ClassCharaEvolve : ResourcesManager.AssetLoadPathType.ClassCharaBase); + string playerClassAssetName = Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId, assetTypePlayer); + if (Toolbox.ResourcesManager.IsLoadedAssetBundle(playerClassAssetName)) + { + CharTextureP.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId, assetTypePlayer, isfetch: true)); + } + else + { + StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(playerClassAssetName, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(playerClassAssetName); + CharTextureP.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId, assetTypePlayer, isfetch: true)); + })); + } + string enemySkinId = dataMgr.GetEnemySkinId().ToString("00"); + ResourcesManager.AssetLoadPathType assetTypeEnemy = (ins.BattleEnemy.IsSkinEvolved ? ResourcesManager.AssetLoadPathType.ClassCharaEvolve : ResourcesManager.AssetLoadPathType.ClassCharaBase); + string enemyClassAssetName = Toolbox.ResourcesManager.GetAssetTypePath(enemySkinId, assetTypeEnemy); + if (Toolbox.ResourcesManager.IsLoadedAssetBundle(enemyClassAssetName)) + { + CharTextureE.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(enemySkinId, assetTypeEnemy, isfetch: true)); + } + else + { + StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(enemyClassAssetName, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(enemyClassAssetName); + CharTextureE.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(enemySkinId, assetTypeEnemy, isfetch: true)); + })); + } + bool activeOfficialUserIconSprite = (GameMgr.GetIns().IsWatchBattle ? networkUserInfoData.GetSelfIsOfficialUser() : PlayerStaticData.IsOfficialUserDisplay); + bool activeOfficialUserIconSprite2 = GameMgr.GetIns().IsNetworkBattle && networkUserInfoData.GetOpponentIsOfficialUser(); + UserPanelP.gameObject.GetComponent().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite); + UserPanelE.gameObject.GetComponent().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite2); + defPosDict["UserPanel"] = UserPanel.transform.localPosition + (IsQuestBattle ? new Vector3(0f, -7f, 0f) : Vector3.zero); + defPosDict["CharPanelP"] = CharPanelP.transform.localPosition; + defPosDict["CharPanelE"] = CharPanelE.transform.localPosition; + UserPanel.transform.localPosition = defPosDict["UserPanel"] + Vector3.down * 50f; + CharPanelP.transform.localPosition = defPosDict["CharPanelP"] + Vector3.left * 300f; + CharPanelE.transform.localPosition = defPosDict["CharPanelE"] + Vector3.right * 300f; + TweenAlpha.Begin(UserPanel, 0f, 0f); + if (dataMgr.GetEnemyBattleSkillReverse() == 0) + { + CharTextureE.uvRect = new Rect(1f, 0f, -1f, 1f); + } + _SetupRoomIDObj(); + SetupRankWinnerReward(); + if (CustomPreference.GetTextLanguage() == Global.LANG_TYPE.Kor.ToString()) + { + _ratingRoot.SetActive(value: true); + } + else + { + _ratingRoot.SetActive(value: false); + } + } + + private static void SetClassInfoWithSubClass(ClassCharacterMasterData charaData, int chaosId, int subClassId, ClassInfoParts defaultClassInfoParts, ClassInfoParts classInfoParts, FlexibleGrid grid) + { + classInfoParts.gameObject.SetActive(value: true); + defaultClassInfoParts.ClassNameLabel.text = string.Empty; + classInfoParts.InitByCharaPrm(charaData, chaosId); + classInfoParts.SetSubClass((CardBasePrm.ClanType)subClassId); + UIUtil.AdjustClassInfoPartsSize(classInfoParts, grid, defaultClassInfoParts.ClassNameLabel.width); + } + + private void _SetupRoomIDObj() + { + _roomIDRoot.SetActive(value: false); + if (GameMgr.GetIns().IsReplayBattle || !GameMgr.GetIns().GetDataMgr().IsRoomBattleType()) + { + return; + } + if (RoomBase.IsConnectControllerActive()) + { + if (!RoomBase.ConnectController.IsGathering) + { + _roomIDRoot.SetActive(value: true); + _roomIDLabel.text = $"{RoomBase.ConnectController.DisplayRoomID:00000}"; + } + } + else if (Data.BattleRecoveryInfo != null && !Data.BattleRecoveryInfo.IsGatheringRoom) + { + _roomIDRoot.SetActive(value: true); + _roomIDLabel.text = $"{PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.ROOM_MATCH_DISPLAY_ID):00000}"; + } + } + + private void SetupRankWinnerReward() + { + if (GameMgr.GetIns().GetDataMgr().m_BattleType != DataMgr.BattleType.RankBattle && GameMgr.GetIns().GetDataMgr().m_BattleType != DataMgr.BattleType.TwoPick) + { + return; + } + RankWinnerReward rankWinnerReward = GameMgr.GetIns()._rankWinnerReward; + if (rankWinnerReward == null) + { + int value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_GRADE); + string value2 = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_STRING); + if (value != 0 && value2 != "") + { + GameMgr.GetIns()._rankWinnerReward = UIManager.GetInstance().createRankWinnerReward(); + GameMgr.GetIns()._rankWinnerReward.SetInfomation(value, value2); + GameMgr.GetIns()._rankWinnerReward.gameObject.SetActive(value: false); + rankWinnerReward = GameMgr.GetIns()._rankWinnerReward; + } + else + { + _winnerRewardRoot.SetActive(value: false); + } + } + if (rankWinnerReward != null) + { + UIManager.GetInstance().AttachAtlas(_winnerRewardRoot); + _winnerRewardNameLabel.text = rankWinnerReward.RewardString; + _winnerRewardBox.spriteName = rankWinnerReward.GetBoxSpriteName(); + _winnerRewardBox.transform.localPosition = rankWinnerReward.GetBattleMenuBoxPosition(); + _winnerRewardRoot.SetActive(value: true); + _vsRoot.SetActive(value: false); + } + } + + private void SetupDefaultButtonMenu(Action retireAction, Action settingAction, Action backAction) + { + _defaultMenuRoot.SetActive(value: true); + _questMenuRoot.SetActive(value: false); + if (Data.CurrentFormat != Format.Max && DataMgr.IsEnableFormatIconBattleType(GameMgr.GetIns().GetDataMgr().m_BattleType)) + { + _titleLine.SetActive(value: false); + _titleLineWithFormat.SetActive(value: true); + if (Data.CurrentFormat != Format.Rotation || CustomPreference.GetTextLanguage() != Global.LANG_TYPE.Jpn.ToString()) + { + _formatLabel.gameObject.SetActive(value: true); + _formatIcon.gameObject.SetActive(value: true); + _tsRotaionFormatLabel.gameObject.SetActive(value: false); + _formatLabel.text = UIUtil.GetFormatName(Data.CurrentFormat); + _formatIcon.spriteName = UIUtil.GetFormatSmallSpriteName(Data.CurrentFormat); + } + else + { + _formatLabel.gameObject.SetActive(value: false); + _formatIcon.gameObject.SetActive(value: false); + _tsRotaionFormatLabel.gameObject.SetActive(value: true); + _tsRotaionFormatLabel.text = UIUtil.GetFormatName(Data.CurrentFormat); + } + UIUtil.AddPositionY(_retireButton.transform, -5f); + } + else + { + _titleLine.SetActive(value: true); + _titleLineWithFormat.SetActive(value: false); + _formatLabel.gameObject.SetActive(value: false); + _formatIcon.gameObject.SetActive(value: false); + _tsRotaionFormatLabel.gameObject.SetActive(value: false); + } + SetButton(_retireButton, _retireButtonLabel, GetRetireButtonText(), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + retireAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + SetButton(_settingButton, _settingButtonLabel, Data.SystemText.Get("Common_0209"), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + settingAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + SetButton(_backButton, _backButtonLabel, Data.SystemText.Get("Battle_0406"), delegate + { + backAction(); + UnityEngine.Object.Destroy(base.gameObject); + }, Se.TYPE.SYS_BTN_CANCEL); + _backSpriteButton.onClick.Add(new EventDelegate(Close)); + } + + private void SetupQuestButtonMenu(Action retireAction, Action settingAction, Action backAction, Action questMissionAction) + { + _defaultMenuRoot.SetActive(value: false); + _questMenuRoot.SetActive(value: true); + SetButton(_questRetireButton, _questRetireButtonLabel, GetRetireButtonText(), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + retireAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + SetButton(_questSettingButton, _questSettingButtonLabel, Data.SystemText.Get("Common_0209"), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + settingAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + SetButton(_questBackButton, _questBackButtonLabel, Data.SystemText.Get("Battle_0406"), delegate + { + backAction(); + UnityEngine.Object.Destroy(base.gameObject); + }, Se.TYPE.SYS_BTN_CANCEL); + SetButton(_questMissionButton, _questMissionButtonLabel, Data.SystemText.Get("Quest_0013"), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + questMissionAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + _backSpriteButton.onClick.Add(new EventDelegate(Close)); + } + + private string GetRetireButtonText() + { + string result = Data.SystemText.Get("Common_0051"); + if (GameMgr.GetIns().IsReplayBattle) + { + result = Data.SystemText.Get("Common_0149"); + } + else if (GameMgr.GetIns().IsWatchBattle) + { + result = Data.SystemText.Get("Common_0147"); + } + return result; + } + + private void SetButton(UIButton button, UILabel label, string text, Action action, Se.TYPE se) + { + label.text = text; + button.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(se); + action(); + })); + } + + public void SetSettingButtonDisable() + { + UIManager.SetObjectToGrey(_settingButton.gameObject, b: true); + UIManager.SetObjectToGrey(_questSettingButton.gameObject, b: true); + } + + public override void Close() + { + if (_defaultMenuRoot.activeSelf) + { + EventDelegate.Execute(_backButton.onClick); + } + else if (_questMenuRoot.activeSelf) + { + EventDelegate.Execute(_questBackButton.onClick); + } + } +} diff --git a/SVSim.BattleEngine/Engine/BattlePlayer.cs b/SVSim.BattleEngine/Engine/BattlePlayer.cs new file mode 100644 index 0000000..309ad2e --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattlePlayer.cs @@ -0,0 +1,346 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Player.Emotion; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class BattlePlayer : BattlePlayerBase +{ + private readonly Vector3 FIELD_CENTER_POSITION = new Vector3(0f, -0.3f, 0f); + + private BattleUIContainer _battleUIContainer; + + protected CanNotTouchCardVfx _canNotTouchCardVfx; + + public bool _isPlayerActive; + + public int PlayCardTouchCount; + + public bool IsTimeOverTurnEndProcessing; + + public bool IsDuringChoiceBrave; + + public override bool IsGameFirst => base.BattleMgr.IsFirst; + + public override bool IsPlayer => true; + + public override IBattlePlayerView BattleView => PlayerBattleView; + + public virtual IPlayerView PlayerBattleView { get; protected set; } + + public override IEmotion Emotion => PlayerEmotion; + + public IPlayerEmotion PlayerEmotion { get; protected set; } + + public bool IsTurnStartEffectNotFinished { get; set; } + + public override bool CanChoiceBraveThisTurn + { + get + { + if (!base.IsAlreadyChoiceBraveInThisTurn && !IsTimeOverTurnEndProcessing) + { + return base.IsChoiceBraveEffectTiming; + } + return false; + } + } + + public override bool CanChoiceBrave + { + get + { + if (CanChoiceBraveThisTurn && base.CanPlayAnyChoiceBraveCard && BattleView.IsTouchable() && !BattleView.IsSelecting && !CantPlayChoiceBrave) + { + return !PlayerBattleView.IsMoving(); + } + return false; + } + } + + public event Func OnAfterPlayerTurnStart; + + public event Action OnPlayerActive; + + public event Action> OnMulliganEndForReplay; + + public BattlePlayer(BattleManagerBase battleMgr, BattleCamera battleCamera, BackGroundBase backGround, IInnerOptionsBuilder innerOptionsBuilder) + : base(battleMgr, battleCamera, backGround, innerOptionsBuilder) + { + } + + protected override void Initialize() + { + PlayerBattleView = new BattlePlayerView(this); + } + + protected override void CreateSelfBattleCard() + { + PlayerClassBattleCard item = new PlayerClassBattleCard(new ClassBattleCardBase.ClassBuildInfo(_isPlayer: true, 20, this, base.BattleMgr.BattleEnemy, base.BattleMgr, base.BattleMgr.BattleResourceMgr)); + base.ClassAndInPlayCardList.Add(item); + } + + public override void Setup(BattlePlayerBase opponentBattlePlayer) + { + if (_battleUIContainer == null && !(this is VirtualBattlePlayer) && (base.IsSelfTurn || IsTurnStartEffectNotFinished)) + { + _battleUIContainer = base.BattleMgr.BattleUIContainer; + _battleUIContainer.DisableMenu(); + } + PlayerEmotion = _innerOptionsBuilder.CreatePlayerEmotion((IClassBattleCardView)base.Class.BattleCardView); + base.OnTurnEnd += (SkillProcessor skill) => InstantVfx.Create(delegate + { + if (!GameMgr.GetIns().IsWatchBattle) + { + PlayerBattleView.TurnEndButtonUI.ChangeButtonView(base.IsSelfTurn); + } + }); + opponentBattlePlayer.OnTurnStartAfterDraw += () => InstantVfx.Create(delegate + { + EnableBattleMenu(); + ITurnEndButtonUI turnEndButtonUI = PlayerBattleView.TurnEndButtonUI; + if (!turnEndButtonUI.GameObject.activeSelf) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_UI_TURN_1, turnEndButtonUI.GetBtnPosition()); + } + turnEndButtonUI.GameObject.SetActive(value: true); + turnEndButtonUI.EnableButton(); + turnEndButtonUI.HideBtn(); + turnEndButtonUI.ChangeButtonView(base.IsSelfTurn); + }); + base.Setup(opponentBattlePlayer); + } + + public override void SetupClone(BattlePlayerBase sourceBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags) + { + sourceBattlePlayer.CopyToVirtualBase(this, virtualOpponentBattlePlayer, cloneFlags); + } + + public override void SetupCardEvent(BattleCardBase card) + { + base.SetupCardEvent(card); + card.OnPlay += delegate + { + foreach (BattleCardBase item in base.HandCardList.Where((BattleCardBase c) => c != card)) + { + item.BattleCardView.UpdateMovability(); + } + BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + return NullVfx.GetInstance(); + }; + } + + public override VfxBase TurnStart() + { + VfxBase vfxBase = base.TurnStart(); + if (base.BattleMgr.IsRecovery) + { + EnableBattleMenu(); + if (base.IsSelfTurn) + { + _isPlayerActive = true; + } + } + return SequentialVfxPlayer.Create(vfxBase, InstantVfx.Create(PlayerBattleView.UpdateTurnEndPulseEffect)); + } + + public void TurnStartEffectEnd() + { + IsTurnStartEffectNotFinished = false; + } + + private void EnableBattleMenu() + { + if (_battleUIContainer != null) + { + _battleUIContainer.EnableMenu(); + } + } + + public override VfxBase StartTurnControl(string log = "") + { + if (_canNotTouchCardVfx == null) + { + _canNotTouchCardVfx = new CanNotTouchCardVfx(); + BattleManagerBase.GetIns().VfxMgr.RegisterImmediateVfx(_canNotTouchCardVfx); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + NetworkBattleManagerBase networkBattleManagerBase = BattleManagerBase.GetIns() as NetworkBattleManagerBase; + if (networkBattleManagerBase.turnEndTimeController != null) + { + networkBattleManagerBase.turnEndTimeController.AddTurnEndTimerLog("TurnStart" + log); + } + } + PlayerEmotion.ResetPlayCount(); + Turn++; + SequentialVfxPlayer sequentialVfxPlayer = TurnEvolveControl(PlayerBattleView.EpIcon); + VfxBase vfx = TurnStart(); + sequentialVfxPlayer.Register(vfx); + VfxBase allFuncVfxResults = this.OnAfterPlayerTurnStart.GetAllFuncVfxResults(); + this.OnAfterPlayerTurnStart = null; + sequentialVfxPlayer.Register(allFuncVfxResults); + VfxBase vfx2 = base.BattleMgr.JudgeBattleResult(); + sequentialVfxPlayer.Register(vfx2); + return sequentialVfxPlayer; + } + + public override VfxBase UsePp(int pp, bool isNewReplayMoveTurn = false) + { + base.UsePp(pp); + if (BattleManagerBase.IsForecast) + { + return NullVfx.GetInstance(); + } + int pp2 = base.Pp; + Vector3 zero = Vector3.zero; + zero = BattleView.GetPPLabelPosition(); + return m_vfxCreator.CreateUsePp(pp2, base.PpTotal, zero, isNewReplayMoveTurn); + } + + protected override VfxBase TurnStartDrawCard(SkillProcessor skillProcessor) + { + int drawCount = ((IsGameFirst || Turn != 1) ? 1 : 2); + VfxWith> vfxWith = RandomCardDraw(drawCount, skillProcessor); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(vfxWith.Vfx); + sequentialVfxPlayer.Register(CardDrawVfx(vfxWith.Value)); + BattleLogManager.GetInstance().AddLogOverDrawCards(vfxWith.Value.Where((BattleCardBase s) => !s.IsInHand).ToList()); + return sequentialVfxPlayer; + } + + public override VfxBase TurnEnd() + { + bool flag = false; + if (BattleManagerBase.GetIns().VfxMgr.IsEnd && IsTimeOverTurnEndProcessing) + { + base.HandControl.RearrangeHand(0.4f, base.HandCardList.ConvertToViewList()); + flag = true; + } + _isPlayerActive = false; + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(base.TurnEnd()); + foreach (BattleCardBase handCard in base.HandCardList) + { + handCard.BattleCardView.HideCanPlayEffect(); + } + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + base.NowTurnEvol = true; + })); + if (IsTimeOverTurnEndProcessing && !flag) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + base.HandControl.RearrangeHand(0.4f, base.HandCardList.ConvertToViewList()); + })); + } + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + IsTimeOverTurnEndProcessing = false; + })); + return sequentialVfxPlayer; + } + + public override void HandCardToField(BattleCardBase targetCard, SkillBase skill = null) + { + base.HandCardToField(targetCard, skill); + if (base.HandCardList.Count <= 0) + { + base.BattleMgr.VfxMgr.RegisterImmediateVfx(BattleView.HandUnfocus()); + } + } + + protected override void SetActive() + { + PlayerActive(); + this.OnPlayerActive.Call(); + _isPlayerActive = true; + } + + protected override void PlayerActive() + { + TurnStartEffectEnd(); + EnableBattleMenu(); + if (!GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle) + { + ITurnEndButtonUI turnEndButtonUI = PlayerBattleView.TurnEndButtonUI; + turnEndButtonUI.StartTurnEndCountdown(); + turnEndButtonUI.ChangeButtonView(base.IsSelfTurn); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_UI_TURN_1, turnEndButtonUI.GetBtnPosition()); + } + _canNotTouchCardVfx.End(); + _canNotTouchCardVfx = null; + if (!IsGameFirst || Turn != 1) + { + base.IsChoiceBraveEffectTiming = true; + PlayerBattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + } + + public override BattlePlayerBase CreateVirtualPlayer() + { + return new VirtualBattlePlayer(base.BattleMgr, base.BattleCamera, base.BackGround); + } + + public override void UpdateHandCardsPlayability(bool areArrowsForcedOff = false) + { + foreach (BattleCardBase handCard in base.HandCardList) + { + handCard.BattleCardView.areArrowsForcedOff = areArrowsForcedOff; + handCard.BattleCardView.UpdateMovability(); + } + if (base.IsSelfTurn && !GameMgr.GetIns().IsNewReplayBattle) + { + CantPlayChoiceBrave = areArrowsForcedOff; + BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + } + + private bool IsDrawing() + { + if (base.HandCardList.Count != 0) + { + return base.HandCardList[0].IsOnDraw; + } + return false; + } + + public override VfxBase MoveToHand(List cardsToMoveToHand) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + foreach (BattleCardBase item in cardsToMoveToHand) + { + parallelVfxPlayer.Register(item.CreateMoveToHandVfx()); + } + return SequentialVfxPlayer.Create(parallelVfxPlayer, InstantVfx.Create(delegate + { + UpdateHandCardsPlayability(); + })); + } + + public override VfxBase CardDrawVfx(IEnumerable cards, bool skipShuffle = false, bool isOpenDrawSkill = false) + { + return m_vfxCreator.CreateCardDraw(cards, isOpenDrawSkill); + } + + public override EffectBattle GetSkillEffect(string skillEffectPath) + { + return GameMgr.GetIns().GetEffectMgr().GetEffectBattle(skillEffectPath); + } + + public override Vector3 GetFieldCenterPosition() + { + return FIELD_CENTER_POSITION; + } + + public void CallRecordingMulliganEnd(List cards) + { + this.OnMulliganEndForReplay.Call(cards); + } +} diff --git a/SVSim.BattleEngine/Engine/BattlePlayerBase.cs b/SVSim.BattleEngine/Engine/BattlePlayerBase.cs new file mode 100644 index 0000000..1ec0059 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattlePlayerBase.cs @@ -0,0 +1,4574 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Player.Emotion; +using Wizard.Battle.Resource; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo +{ + public class TurnAndCard + { + public int Turn { get; private set; } + + public bool IsSelfTurn { get; private set; } + + public IReadOnlyBattleCardInfo Card { get; private set; } + + public bool IsTurnEnd { get; private set; } + + public TurnAndCard(int turn, bool isSelfTurn, IReadOnlyBattleCardInfo card, bool isTurnEnd) + { + Turn = turn; + Card = card; + IsSelfTurn = isSelfTurn; + IsTurnEnd = isTurnEnd; + } + } + + public class CardAndId + { + public IReadOnlyBattleCardInfo Card { get; private set; } + + public int Id { get; private set; } + + public CardAndId(IReadOnlyBattleCardInfo card, int id) + { + Card = card; + Id = id; + } + } + + public class CardAndTribe + { + public IReadOnlyBattleCardInfo Card { get; private set; } + + public List Tribes { get; private set; } + + public CardAndTribe(IReadOnlyBattleCardInfo card, List tribes) + { + Card = card; + Tribes = tribes; + } + } + + public class CardAndValue + { + public IReadOnlyBattleCardInfo Card { get; private set; } + + public int Value { get; private set; } + + public CardAndValue(IReadOnlyBattleCardInfo card, int value) + { + Card = card; + Value = value; + } + } + + public enum CARD_MANAGEMENT + { + NONE, + DESTROY, + BANISH, + RETURN, + FUSION_MATERIAL, + GETON, + GETOFF, + SUMMON + } + + public class SideLogInfo + { + public SkillBase Skill; + + public SideLogInfo(SkillBase skill) + { + Skill = skill; + } + } + + public class MyRotationBonusCondition + { + public MyRotationInfo.MyRotationBonus MyRotationBonus { get; } + + public int RemainingIncreaseAddPptotalTurn { get; private set; } + + public bool IsRemainIncreaseAddPptotalTurn { get; private set; } + + public int RemainingSkillCount { get; private set; } + + public bool IsRemainSkill { get; private set; } + + public MyRotationBonusCondition(MyRotationInfo.MyRotationBonus myRotationBonus) + { + MyRotationBonus = myRotationBonus; + RemainingIncreaseAddPptotalTurn = myRotationBonus.IncreaseAddPptotalTurn; + IsRemainIncreaseAddPptotalTurn = RemainingIncreaseAddPptotalTurn > 0; + RemainingSkillCount = myRotationBonus.AttachAbilities.Length; + IsRemainSkill = RemainingSkillCount > 0; + } + + public void SetConditionInReplay(NetworkBattleReceiver.MyRotationBonusInfo bonusInfo) + { + RemainingIncreaseAddPptotalTurn = bonusInfo.RemainingIncreaseAddPptotalTurn; + IsRemainIncreaseAddPptotalTurn = bonusInfo.IsRemainIncreaseAddPptotalTurn; + RemainingSkillCount = bonusInfo.RemainingSkillCount; + IsRemainSkill = bonusInfo.IsRemainSkill; + } + + public bool GetAndReduceAddPpTurn() + { + bool num = RemainingIncreaseAddPptotalTurn > 0; + if (num) + { + RemainingIncreaseAddPptotalTurn--; + } + return num; + } + + public void ReduceSkillCount() + { + RemainingSkillCount--; + } + + public void UseUpAddPpTotalBonus() + { + IsRemainIncreaseAddPptotalTurn = RemainingIncreaseAddPptotalTurn > 0; + } + + public void UseUpSkill() + { + IsRemainSkill = RemainingSkillCount > 0; + } + } + + public class AvatarBattleDescInfo + { + public string DescText; + + public string Cost; + + public List ReplaySkillDescriptionValueList; + + public AvatarBattleDescInfo(string descText, string cost) + { + DescText = descText; + Cost = cost; + ReplaySkillDescriptionValueList = new List(); + } + } + + public enum CEMETERY_TYPE + { + NORMAL, + FIELD_RETURN_HAND_OVER, + DECK_DRAW_HAND_OVER + } + + public class SummonInfo + { + public bool IsPlayer { get; private set; } + + public SkillBaseSummon.SummonedCardsList SummonedCardsList { get; private set; } + + public SkillBaseSummon.SUMMON_TYPE SummonType { get; private set; } + + public bool IsReanimate { get; private set; } + + public bool IsDeckSelfSummon { get; private set; } + + public SummonInfo(bool isPlayer, SkillBaseSummon.SummonedCardsList summonedCardsList, SkillBaseSummon.SUMMON_TYPE summonType, bool isReanimate = false, bool isDeckSelfSummon = false) + { + IsPlayer = isPlayer; + SummonedCardsList = summonedCardsList; + SummonType = summonType; + IsReanimate = isReanimate; + IsDeckSelfSummon = isDeckSelfSummon; + } + } + + public const int MAX_PP = 10; + + public List SelfDiscardList = new List(); + + protected BattlePlayerBase _opponentBattlePlayer; + + private List _skillList = new List(); + + protected IBattlePlayerVfxCreator m_vfxCreator; + + protected readonly IInnerOptionsBuilder _innerOptionsBuilder; + + private int _ppTotal; + + protected int m_EpTotal; + + private const int MAX_BP = 99; + + public bool CantPlayChoiceBrave; + + public HashSet PredictionWarningCards = new HashSet(); + + public Func OnTurnStartSkillAfter; + + public Func OnTurnEndSkillAfter; + + public Action OnTurnStartComplete; + + public Action OnPreTurnEndComplete; + + public Action OnPostTurnEndComplete; + + public Action OnEndOneSkillProcess; + + public List BonusConditionList; + + public List BossRushSpecialSkillList; + + public AvatarBattleDescInfo AvatarBattlePassiveSkillDescInfo; + + public List ChoiceBraveSkillDescInfoList; + + public const int MAX_NUM_HAND_CARDS = 9; + + public const int MAX_NUM_IN_PLAY_CARDS_WITH_CLASS = 6; + + public const int MAX_NUM_IN_PLAY_CARDS = 5; + + protected int _gameUsedEpCount; + + protected int _turnUsedEpCount; + + private const string TOKEN_EFFECT_PATH = "cmn_token_draw_1"; + + public BattleManagerBase BattleMgr { get; protected set; } + + public virtual bool IsGameFirst => false; + + public BattleCamera BattleCamera { get; private set; } + + public BackGroundBase BackGround { get; private set; } + + protected DataMgr _dataMgr { get; set; } + + public virtual bool IsPlayer => true; + + public virtual int Turn + { + get + { + if (!BattleMgr.IsFirst) + { + return BattleMgr.SecondTurn; + } + return BattleMgr.FirstTurn; + } + set + { + if (BattleMgr.IsFirst) + { + BattleMgr.FirstTurn = value; + } + else + { + BattleMgr.SecondTurn = value; + } + } + } + + public int Pp { get; set; } + + public int PpTotal + { + get + { + return _ppTotal; + } + set + { + _ppTotal = value; + } + } + + public int EpTotal + { + get + { + return m_EpTotal; + } + set + { + m_EpTotal = value; + } + } + + public int CurrentEpCount { get; private set; } + + public int EvolveWaitTurnCount { get; set; } + + public bool NowTurnEvol { get; set; } + + public bool IsEpEvolveThisTurn { get; set; } + + public bool IsEvolve + { + get + { + if (NowTurnEvol && CurrentEpCount > 0) + { + return EvolveWaitTurnCount <= 0; + } + return false; + } + } + + public bool IsExceptionEvolve + { + get + { + if (NowTurnEvol && EvolveWaitTurnCount <= 0) + { + return InPlayCards.Any((BattleCardBase c) => !c.IsEvolution && CheckNotConsumeEpCard(c)); + } + return false; + } + } + + public int GameUsedEpCount => _gameUsedEpCount; + + public int TurnUsedEpCount => _turnUsedEpCount; + + public int Bp { get; private set; } + + public bool IsAlreadyChoiceBraveInThisTurn { get; set; } = true; + + public bool IsChoiceBraveEffectTiming { get; set; } + + public List ChoiceBraveCards + { + get + { + List list = new List(); + SkillBase skillBase = Class.Skills.FirstOrDefault((SkillBase s) => s.OnWhenChoiceBrave != 0); + if (skillBase == null) + { + return list; + } + List list2 = SkillOptionValue.ParseOptionTokenID(skillBase.OptionValue.GetOption(SkillFilterCreator.ContentKeyword.card_id, "_OPT_NULL_")).ToList(); + for (int num = 0; num < list2.Count(); num++) + { + BattleCardBase item = BattleManagerBase.GetIns().CreateTransformCardRegisterVfx(Class, list2[num], IsPlayer, null, isRecoveryFinish: false, isChoice: true); + list.Add(item); + } + return list; + } + } + + public bool CanPlayAnyChoiceBraveCard + { + get + { + if (IsAlreadyChoiceBraveInThisTurn) + { + return false; + } + List choiceBraveCards = ChoiceBraveCards; + for (int i = 0; i < choiceBraveCards.Count(); i++) + { + if (choiceBraveCards[i].CanPlayAsChoiceBraveCard) + { + return true; + } + } + return false; + } + } + + public virtual bool CanChoiceBraveThisTurn + { + get + { + if (!IsAlreadyChoiceBraveInThisTurn) + { + return IsChoiceBraveEffectTiming; + } + return false; + } + } + + public virtual bool CanChoiceBrave + { + get + { + if (CanChoiceBraveThisTurn && CanPlayAnyChoiceBraveCard && BattleView.IsTouchable()) + { + return !BattleView.IsSelecting; + } + return false; + } + } + + public BattleCardBase LowestCostChoiceBraveCard => ChoiceBraveCards.OrderBy((BattleCardBase c) => c.Cost).FirstOrDefault(); + + public bool IsShortageDeckLose { get; protected set; } + + public bool IsShortageDeckWin => Class.SkillApplyInformation.IsShortageDeckWin; + + public bool IsChangeShortageDeck + { + get + { + if (!Class.SkillApplyInformation.IsShortageDeckWin) + { + return Class.Skills.Any((SkillBase s) => s.OnWhenShortageDeck != 0); + } + return false; + } + } + + public List HandCardList { get; private set; } + + public List DeckCardList { get; private set; } + + public List BattleStartDeckCardList { get; set; } + + public List DeckSkillCardList { get; private set; } + + public List ClassAndInPlayCardList { get; private set; } + + public List CemeteryList { get; private set; } + + public List BanishList { get; set; } + + public List FusionIngredientList { get; set; } + + public List TurnFusionCards { get; set; } + + public List NecromanceZoneList { get; set; } + + public List DiscardedCardList { get; set; } + + public List FusionIngredientAndDiscardedCardList { get; set; } + + public List ReservedCardList { get; set; } + + public List UniteList { get; set; } + + public List GetOnList { get; set; } + + public List BlackHole { get; set; } + + public List ChoiceBraveCardList { get; set; } + + public List PredictionCemeteryRandomCards { get; private set; } + + public List PredictionDamageRandomCards { get; private set; } + + public List PredictionBanishRandomCards { get; private set; } + + public virtual IStatusPanelControl StatusPanelControl + { + get + { + if ((bool)BattleView.StatusParentPanel) + { + return BattleView.StatusParentPanel.GetComponent(); + } + return new NullStatusPanelControl(); + } + } + + public IClassInfomationUI _classInfomationUI { get; protected set; } + + public ClassInformationUIController ClassInformationUIController { get; protected set; } + + public bool IsBuffDetail + { + get + { + if (IsShowBuffDetail || IsRecordingBuffDetail) + { + return !IsRecordingExceptBuffDetail; + } + return false; + } + } + + public bool IsShowBuffDetail { get; set; } + + public bool IsRecordingBuffDetail { get; set; } + + public bool IsRecordingExceptBuffDetail { get; set; } + + public SideLogInfo SideLogSkill { get; set; } + + protected BattleCardBase _class { get; set; } + + public HandControl HandControl => BattleView.HandControl; + + public abstract IBattlePlayerView BattleView { get; } + + public abstract IEmotion Emotion { get; } + + public bool IsSelfTurn { get; set; } + + public List ReturnList { get; set; } + + public List> LastTargetCardsList { get; set; } + + public List InHandCards { get; set; } + + public List SkillDiscards { get; set; } + + public List SkillBanishCards { get; set; } + + public List HealingCards { get; set; } + + public List SkillSummonedCards { get; set; } + + public List SummonedCards { get; set; } + + public BattleCardBase DrewSkillCard { get; set; } + + public BattleCardBase ReturnSkillCard { get; set; } + + public List EvolvedCards { get; set; } + + public List DestroyedWhenDestroyCards { get; set; } + + public List TurnPlayCardCountInfo { get; set; } + + public List TurnFusionCountInfo { get; set; } + + public List TurnEvolveCardCountInfo { get; set; } + + public int TurnNecromanceCount { get; set; } + + public int GameNecromanceCount { get; set; } + + public int GameUsedPpCount { get; set; } + + public BattleCardBase CardOnPlay { get; set; } + + public List TurnPlayCards { get; set; } + + public List TurnDrawCards { get; set; } + + public List TurnDrawTokenCardsWithId { get; set; } + + public List GameDrawCards { get; set; } + + public List GameDrawTokenCards { get; set; } + + public List GameAddUpdateDeckCards { get; set; } + + public List GameSummonCards { get; set; } + + public List GameSummonMomentTribe { get; set; } + + public List GamePlayMomentTribe { get; set; } + + public List GamePlayMomentSpellChargeCards { get; set; } + + public List GameUpdateDeckMomentTribe { get; set; } + + public List GamePlayCards { get; set; } + + public List GameTurnPlayCards { get; set; } + + public List GameEnhancePlayCards { get; set; } + + public List GameCrystallizedPlayCards { get; set; } + + public List GameLeftCards { get; set; } + + public List GameTurnLeftCards { get; set; } + + public List GameReturnedCards { get; set; } + + public List GameSuperSkyboundArtCards { get; set; } + + public List GameInplayMetamorphoseCards { get; set; } + + public List OkSkillInProcess { get; set; } + + public List TurnDestroyCards { get; set; } + + public List TurnWhenHealingCount { get; set; } + + public List GameBurialRiteCards { get; set; } + + public List TurnBurialRiteCards { get; set; } + + public List BurialRiteOrDiscardCardHandIndexList { get; set; } + + public List GameReanimatedCards { get; set; } + + protected List AddToDeckCardList { get; set; } + + public List TurnStartLifeList { get; protected set; } + + public int RallyCount { get; protected set; } + + public int DeckBanishCount { get; protected set; } + + public int GameResonanceStartCount { get; set; } + + public int TurnResonanceStartCount { get; set; } + + public int GameUsedWhiteRitualCount { get; set; } + + public int LastInplayWhiteRitualStack { get; set; } + + public List GameSkillReturnCardCountList { get; set; } + + public List GameSkillDiscardCountList { get; set; } + + public List GameSkillBuffCountList { get; set; } + + public List GameSkillMetamorphoseCountList { get; set; } + + public int GameSkillDiscardCount { get; set; } + + public List GameQuickAttackCards { get; set; } + + public IEnumerable SkillInfoDeckCards => ConvertToSkillInfoCollection(DeckCardList); + + public IEnumerable SkillInfoBattleStartDeckCards => ConvertToSkillInfoCollection(BattleStartDeckCardList); + + public IEnumerable SkillInfoHandCards => ConvertToSkillInfoCollection(HandCardList); + + public IEnumerable SkillInfoClassAndInPlayCards => ConvertToSkillInfoCollection(ClassAndInPlayCardList); + + public IEnumerable SkillInfoCemeterys => ConvertToSkillInfoCollection(CemeteryList); + + public IEnumerable SkillInfoBanishCards => ConvertToSkillInfoCollection(BanishList); + + public IEnumerable SkillInfoFusionIngredientList => ConvertToSkillInfoCollection(FusionIngredientList); + + public IEnumerable SkillInfoTurnFusionCards => ConvertToSkillInfoCollection(TurnFusionCards); + + public IEnumerable SkillInfoNecromanceZoneCards => ConvertToSkillInfoCollection(NecromanceZoneList); + + public IEnumerable SkillInfoInPlayCards => ConvertToSkillInfoCollection(InPlayCards); + + public IEnumerable> SkillInfoLastTargets => ConvertToSkillInfoCollectionList(LastTargetCardsList); + + public IEnumerable SkillInfoDiscards => ConvertToSkillInfoCollection(SkillDiscards); + + public IEnumerable SkillInfoDiscardedCards => ConvertToSkillInfoCollection(DiscardedCardList); + + public IEnumerable SkillInfoFusionIngredientAndDiscardedCards => ConvertToSkillInfoCollection(FusionIngredientAndDiscardedCardList); + + public IEnumerable SkillInfoReturnedCards => GameReturnedCards; + + public IEnumerable SkillInfoHealingCards => ConvertToSkillInfoCollection(HealingCards); + + public IEnumerable SkillInfoSkillSummonedCards => ConvertToSkillInfoCollection(SkillSummonedCards); + + public IEnumerable SkillInfoEvolvedCards => ConvertToSkillInfoCollection(EvolvedCards); + + public IEnumerable SkillInfoDestroyedWhenDestroyCards => ConvertToSkillInfoCollection(DestroyedWhenDestroyCards); + + public IEnumerable SkillInfoTurnPlayCards => ConvertToSkillInfoCollection(TurnPlayCards); + + public IEnumerable SkillInfoTurnDrawCards => ConvertToSkillInfoCollection(TurnDrawCards); + + public IEnumerable SkillInfoTurnDrawTokenCardsWithId => TurnDrawTokenCardsWithId; + + public IEnumerable SkillInfoGameSummonCards => GameSummonCards; + + public IEnumerable SkillInfoGamePlayCards => ConvertToSkillInfoCollection(GamePlayCards); + + public IEnumerable SkillInfoGameTurnPlayCards => GameTurnPlayCards; + + public IEnumerable SkillInfoGameEnhancePlayCards => GameEnhancePlayCards; + + public IEnumerable SkillInfoGameCrystallizedPlayCards => ConvertToSkillInfoCollection(GameCrystallizedPlayCards); + + public IEnumerable SkillInfoGameSkillActivated => ConvertToSkillInfoCollection(ChoiceBraveCardList); + + public IEnumerable SkillInfoInplayMetamorphosedCards => ConvertToSkillInfoCollection(GameInplayMetamorphoseCards); + + public IEnumerable SkillInfoGameBurialRiteCards => ConvertToSkillInfoCollection(GameBurialRiteCards); + + public IEnumerable SkillInfoTurnBurialRiteCards => ConvertToSkillInfoCollection(TurnBurialRiteCards); + + public IEnumerable SkillInfoGameReanimatedCards => GameReanimatedCards; + + public IEnumerable SkillInfoGameDrawCards => ConvertToSkillInfoCollection(GameDrawCards); + + public IEnumerable SkillInfoGameDrawTokenCards => ConvertToSkillInfoCollection(GameDrawTokenCards); + + public IEnumerable SkillInfoGameAddUpdateDeckCards => ConvertToSkillInfoCollection(GameAddUpdateDeckCards); + + public IEnumerable SkillInfoGameLeftCards => ConvertToSkillInfoCollection(GameLeftCards); + + public IEnumerable SkillInfoGameTurnLeftCards => GameTurnLeftCards; + + public IEnumerable SkillInfoGameSuperSkyboundArtCards => ConvertToSkillInfoCollection(GameSuperSkyboundArtCards); + + public IReadOnlyBattleCardInfo SkillInfoClass => Class; + + public IEnumerable SkillInfoGameQuickAttackCards => ConvertToSkillInfoCollection(GameQuickAttackCards); + + public AvatarBattleInfo AvatarBattleInfo { get; set; } + + public int extraTurnCount { get; set; } + + public bool IsExtraTurn => extraTurnCount > 0; + + public int cardTotalNum { get; set; } + + public bool IsShortageDeck { get; private set; } + + public int _cumulativeEvolutionCount { get; protected set; } + + public bool IsSkinEvolved + { + get + { + if (_dataMgr.IsEvolveSkin(IsPlayer)) + { + return _cumulativeEvolutionCount > 0; + } + return false; + } + } + + public IEnumerable AllCards + { + get + { + for (int i = 0; i < HandCardList.Count(); i++) + { + yield return HandCardList[i]; + } + for (int i = 0; i < ClassAndInPlayCardList.Count; i++) + { + yield return ClassAndInPlayCardList[i]; + } + for (int i = 0; i < DeckCardList.Count(); i++) + { + yield return DeckCardList[i]; + } + } + } + + public List AllCardsWithCemeteryAndBanish + { + get + { + List list = AllCards.ToList(); + list.AddRange(CemeteryList); + list.AddRange(NecromanceZoneList); + list.AddRange(BanishList); + return list; + } + } + + public List AllCardsWithSkillIngredient + { + get + { + List list = AllCardsWithCemeteryAndBanish.ToList(); + list.AddRange(FusionIngredientList); + list.AddRange(GetOnList); + list.AddRange(UniteList); + list.AddRange(ReservedCardList); + list.AddRange(BlackHole); + return list; + } + } + + public IEnumerable InPlayCards + { + get + { + for (int i = 0; i < ClassAndInPlayCardList.Count; i++) + { + if (!(ClassAndInPlayCardList[i] is ClassBattleCardBase)) + { + yield return ClassAndInPlayCardList[i]; + } + } + } + } + + public BattleCardBase Class => _class; + + public event Action OnTurnStartStart; + + public event Func OnTurnStartFinish; + + public event Action OnTurnEndStart; + + public event Func OnTurnEnd; + + public event Func OnTurnEndFinish; + + public event Func OnTurnStartBeforeDraw; + + public event Func OnTurnStartAfterDraw; + + public event Action OnNecromance; + + public event Action OnPickCard; + + public event Action OnAfterPickCard; + + public event Action OnSetupClassEvent; + + public event Action OnSetupCardEvent; + + public event Func OnShortageDeck; + + public event Action> OnMulliganStart; + + public event Action, IEnumerable> OnMulliganEnd; + + public event Action OnClearDeck; + + public event Action OnChangePP; + + public event Action OnAddPpTotal; + + public event Action OnAddPp; + + public event Action OnAddBp; + + public event Action OnEpModifier; + + public event Action OnAddHandCardEvent; + + public event Action OnAddCemeteryEvent; + + public event Action OnAddPlayCardEvent; + + public event Action OnAddBanishEvent; + + public event Action OnAddDeckEvent; + + public event Action OnAddUniteEvent; + + public event Action OnSpellPlayEvent; + + public event Action OnFusion; + + public event Action OnGeton; + + public event Action, List, SkillBase> OnGetoff; + + public event Action, SkillBase> OnAddBlackHole; + + public event Action OnAfterReturnCardEvent; + + public event Func, VfxBase> OnAfterSummonCardEvent; + + public event Action OnAddHandCardAfterEvent; + + public event Func OnAddCemeteryAfterEvent; + + public event Action OnAddPlayCardAfterEvent; + + public event Action OnAddBanishAfterEvent; + + public event Action OnAddUniteAfterEvent; + + public event Action OnLeaveAfterEvent; + + public event Action OnSummonAfterEvent; + + public event Action OnMetamorphoseAfterEvent; + + public event Action> OnChangeDeckAfterEvent; + + public event Action, BattlePlayerBase, bool> OnDrawCards; + + public event Action, List, bool, bool, bool> OnTokenDrawCards; + + public event Action, bool> OnCreateReservedCards; + + public event Action, bool, bool, bool> OnUpdateDeck; + + public event Action OnIndexChange; + + public event Action, List, bool, bool, bool, bool, bool> OnSummonTokenCards; + + public event Action, bool, bool, bool, bool> OnSummonCards; + + public event Action, List, List, List, bool, bool, bool> OnCostChange; + + public event Action, bool, bool> OnRemoveCostChange; + + public event Action, int, int, int, int, int> OnPowerUp; + + public event Action OnPowerDownStart; + + public event Action, int, int, int, bool> OnPowerDown; + + public event Action> OnDeprivePowerUp; + + public event Action> OnDeprivePowerDown; + + public event Action, List> OnSpellCharge; + + public event Action OnDrain; + + public event Action OnSkillDamageStart; + + public event Action, List, List> OnDamage; + + public event Action, List> OnHeal; + + public event Action> OnDiscard; + + public event Action OnStartLeaveCard; + + public event Action OnDestroy; + + public event Action OnSkillDestroyOrBanish; + + public event Action OnBanish; + + public event Action OnPlayVoiceOnDeath; + + public event Action OnReturn; + + public event Action OnSkillReturn; + + public event Action> OnBeforeSkillEvolve; + + public event Action OnEvolveMeWhenAttack; + + public event Action> OnAfterSkillEvolve; + + public event Action OnPlayCard; + + public event Action OnWhenPlayEffect; + + public event Action, int> OnChantCountChange; + + public event Action OnChangeWhiteRitualStack; + + public event Action, int> OnChangeMaxAttackableCount; + + public event Action, int> OnMetamorphose; + + public event Action OnFusionMetamorphose; + + public event Action OnOpenCard; + + public event Action, BattleCardBase> OnUnite; + + public event Action OnRemoveLatestOperationJsonData; + + public event Action OnPlayComplete; + + public event Action OnEmotion; + + public event Action OnClearDestroyedCardList; + + public void SetCurrentEpCount(int setCount) + { + CurrentEpCount = setCount; + } + + public void AddCurrentEpCount(int addCount = 1) + { + CurrentEpCount += addCount; + } + + public void GainCurrentEpCount(int gainCount = 1) + { + CurrentEpCount -= gainCount; + } + + public VfxBase SetBp(int value) + { + Bp = value; + Bp = Math.Max(0, Bp); + Bp = Math.Min(Bp, 99); + return BattleView.SetBp(value); + } + + public VfxBase AddBp(int value) + { + Bp += value; + Bp = Math.Max(0, Bp); + Bp = Math.Min(Bp, 99); + return BattleView.SetBp(Bp); + } + + public void SetIsShortageDeckLose(bool flag) + { + IsShortageDeckLose = flag; + } + + public void ResetIsShortageDeck() + { + IsShortageDeck = false; + } + + public void SetCumulativeEvolutionCount(int count) + { + _cumulativeEvolutionCount = count; + } + + public int AddDamageByClassUseCard(string damageType) + { + if (Class != null) + { + int num = 0; + for (int i = 0; i < Class.SkillApplyInformation.AddDamageList.Count; i++) + { + if (Class.SkillApplyInformation.AddDamageList[i] is AddDamageInfo addDamageInfo && addDamageInfo.IsEffective(damageType, Class.Clan, isUseClass: true)) + { + num += addDamageInfo.AddDamage; + } + } + return num; + } + return 0; + } + + protected BattlePlayerBase(BattleManagerBase battleMgr, BattleCamera battleCamera, BackGroundBase backGround, IInnerOptionsBuilder innerOptionsBuilder) + { + BattleMgr = battleMgr; + _dataMgr = GameMgr.GetIns().GetDataMgr(); + BattleCamera = battleCamera; + BackGround = backGround; + _innerOptionsBuilder = innerOptionsBuilder; + Initialize(); + HandCardList = new List(); + DeckCardList = new List(); + BattleStartDeckCardList = new List(); + DeckSkillCardList = new List(); + ClassAndInPlayCardList = new List(); + CemeteryList = new List(); + PredictionCemeteryRandomCards = new List(); + PredictionDamageRandomCards = new List(); + PredictionBanishRandomCards = new List(); + BanishList = new List(); + FusionIngredientList = new List(); + TurnFusionCards = new List(); + NecromanceZoneList = new List(); + DiscardedCardList = new List(); + FusionIngredientAndDiscardedCardList = new List(); + ReservedCardList = new List(); + UniteList = new List(); + GetOnList = new List(); + BlackHole = new List(); + ChoiceBraveCardList = new List(); + ReturnList = new List(); + HealingCards = new List(); + LastTargetCardsList = new List>(); + SkillSummonedCards = new List(); + SummonedCards = new List(); + EvolvedCards = new List(); + DestroyedWhenDestroyCards = new List(); + InHandCards = new List(); + SkillDiscards = new List(); + SkillBanishCards = new List(); + TurnPlayCards = new List(); + TurnDrawCards = new List(); + TurnDrawTokenCardsWithId = new List(); + GameSummonCards = new List(); + GameSummonMomentTribe = new List(); + GamePlayMomentTribe = new List(); + GamePlayMomentSpellChargeCards = new List(); + GameUpdateDeckMomentTribe = new List(); + GamePlayCards = new List(); + GameTurnPlayCards = new List(); + GameEnhancePlayCards = new List(); + GameCrystallizedPlayCards = new List(); + GameInplayMetamorphoseCards = new List(); + GameBurialRiteCards = new List(); + GameQuickAttackCards = new List(); + TurnBurialRiteCards = new List(); + BurialRiteOrDiscardCardHandIndexList = new List(); + GameReanimatedCards = new List(); + OkSkillInProcess = new List(); + TurnDestroyCards = new List(); + AddToDeckCardList = new List(); + GameDrawCards = new List(); + GameDrawTokenCards = new List(); + GameAddUpdateDeckCards = new List(); + TurnStartLifeList = new List(); + TurnWhenHealingCount = new List(); + TurnPlayCardCountInfo = new List(); + TurnFusionCountInfo = new List(); + TurnEvolveCardCountInfo = new List(); + GameLeftCards = new List(); + GameTurnLeftCards = new List(); + GameReturnedCards = new List(); + GameSuperSkyboundArtCards = new List(); + GameSkillReturnCardCountList = new List(); + GameSkillDiscardCountList = new List(); + GameSkillBuffCountList = new List(); + GameSkillMetamorphoseCountList = new List(); + BonusConditionList = new List(); + BossRushSpecialSkillList = new List(); + ChoiceBraveSkillDescInfoList = new List(); + NowTurnEvol = true; + m_vfxCreator = CreateVfxCreator(); + CreateSelfBattleCard(); + _class = ClassAndInPlayCardList[0]; + } + + protected abstract void Initialize(); + + protected abstract void CreateSelfBattleCard(); + + protected virtual IBattlePlayerVfxCreator CreateVfxCreator() + { + return new BattlePlayerVfxCreatorBase(BattleView); + } + + public virtual VfxBase LoadResources(IBattleResourceMgr resourceMgr) + { + long sleeveId = (IsPlayer ? _dataMgr.GetPlayerSleeveId() : _dataMgr.GetEnemySleeveId()); + return SequentialVfxPlayer.Create(resourceMgr.LoadSleeveMaterial(sleeveId, IsPlayer), ClassInformationUIController.LoadResources(StatusPanelControl.GetClassInfoAnchor(), IsPlayer)); + } + + public virtual void Setup(BattlePlayerBase opponentBattlePlayer) + { + IsShortageDeckLose = false; + extraTurnCount = 0; + _cumulativeEvolutionCount = 0; + _opponentBattlePlayer = opponentBattlePlayer; + _opponentBattlePlayer.Class.ChangeClassClanParameter(); + GameMgr ins = GameMgr.GetIns(); + List list = new List(); + BattleManagerBase ins2 = BattleManagerBase.GetIns(); + if (IsPlayer) + { + int key = (IsPlayer ? ins.GetNetworkUserInfoData().GetSelfChaosId() : ins.GetNetworkUserInfoData().GetOpponentChaosId()); + if (Data.Master.ClassInfomationOrder != null && Data.Master.ClassInfomationOrder.ContainsKey(key)) + { + List value = new List(); + int num = 1; + Data.Master.ClassInfomationOrder.TryGetValue(key, out value); + for (int i = 0; i < value.Count; i++) + { + list.Add(CreateClassInfomationUI(num, value.Count, value[i])); + num++; + } + } + else if (ins.GetDataMgr().GetPlayerSubClassId() != 10) + { + int num2 = 1; + List crossOverClassInfoListOrNull = Data.Master.GetCrossOverClassInfoListOrNull(ins.GetDataMgr().GetPlayerClassId(), ins.GetDataMgr().GetPlayerSubClassId()); + if (crossOverClassInfoListOrNull == null || crossOverClassInfoListOrNull.Count <= 0) + { + list.Add(CreateClassInfomationUI()); + } + else + { + for (int j = 0; j < crossOverClassInfoListOrNull.Count; j++) + { + list.Add(CreateClassInfomationUI(num2, crossOverClassInfoListOrNull.Count, crossOverClassInfoListOrNull[j])); + num2++; + } + } + } + else if (Data.CurrentFormat == Format.Avatar) + { + int key2 = ((ins2 is NetworkBattleManagerBase) ? int.Parse(ins.GetNetworkUserInfoData().GetSelfAvatarBattleId()) : ins.GetDataMgr().GetPlayerCharaId()); + List value2 = new List(); + Data.Master.AvatarClassInformationOrder.TryGetValue(key2, out value2); + for (int k = 0; k < value2.Count; k++) + { + list.Add(CreateClassInfomationUI(k + 1, value2.Count, value2[k])); + } + } + else if (ins2.IsPuzzleMgr) + { + int playerClass = (ins2 as PuzzleBattleManager).PuzzleQuestData.BattleData.PlayerClass; + list.Add(CreateClassInfomationUI(1, 1, playerClass)); + } + else + { + list.Add(CreateClassInfomationUI()); + } + } + else if (ins.GetDataMgr().GetEnemySubClassId() != 10) + { + int num3 = 1; + List crossOverClassInfoListOrNull2 = Data.Master.GetCrossOverClassInfoListOrNull(ins.GetDataMgr().GetEnemyClassId(), ins.GetDataMgr().GetEnemySubClassId()); + if (crossOverClassInfoListOrNull2 == null || crossOverClassInfoListOrNull2.Count <= 0) + { + list.Add(CreateClassInfomationUI()); + } + else + { + for (int l = 0; l < crossOverClassInfoListOrNull2.Count; l++) + { + list.Add(CreateClassInfomationUI(num3, crossOverClassInfoListOrNull2.Count, crossOverClassInfoListOrNull2[l])); + num3++; + } + } + } + else if (Data.CurrentFormat == Format.Avatar && ins2 is NetworkBattleManagerBase) + { + int key3 = int.Parse(ins.GetNetworkUserInfoData().GetOpponentAvatarBattleId()); + List value3 = new List(); + Data.Master.AvatarClassInformationOrder.TryGetValue(key3, out value3); + for (int m = 0; m < value3.Count; m++) + { + list.Add(CreateClassInfomationUI(m + 1, value3.Count, value3[m])); + } + } + else + { + list.Add(CreateClassInfomationUI()); + } + ClassInformationUIController = new ClassInformationUIController(list); + ClassInformationUIController.SetUpEvent(this); + SetUpClassEvent(); + foreach (BattleCardBase deckCard in DeckCardList) + { + SetupCardEvent(deckCard); + } + foreach (BattleCardBase handCard in HandCardList) + { + SetupCardEvent(handCard); + } + foreach (BattleCardBase classAndInPlayCard in ClassAndInPlayCardList) + { + SetupCardEvent(classAndInPlayCard); + } + OnNecromance += delegate(BattleCardBase necromanceCard, SkillProcessor skillProcessor, int necromanceCount, bool isFusion) + { + List list2 = ClassAndInPlayCardList.ToList(); + list2.AddRange(DeckSkillCardList); + foreach (BattleCardBase item in list2) + { + item.Necromance(necromanceCard, skillProcessor, necromanceCount); + } + if (BattleMgr is NetworkBattleManagerBase networkBattleManagerBase) + { + networkBattleManagerBase.RegisterActionManager.Add(new RegisterPlayerParameter(RegisterActionBase.ActionBaseParameter.cemetery, -1 * necromanceCount, necromanceCard.IsPlayer)); + } + }; + Emotion.OnPlay += (ClassCharaPrm.EmotionType emoteType) => opponentBattlePlayer.Emotion.ReceiveOpponentEmotion(emoteType); + OnNecromance += delegate + { + BattleMgr.VfxMgr.RegisterImmediateVfx(InstantVfx.Create(delegate + { + StatusPanelControl.SetGrave(CemeteryList.Count((BattleCardBase c) => !c.IsClass)); + UpdateHandCardsPlayability(); + })); + }; + OnAddPlayCardAfterEvent += delegate + { + UpdateStatusPanelHandCount(); + }; + OnAddHandCardAfterEvent += delegate + { + UpdateStatusPanelHandCount(); + }; + OnAddCemeteryAfterEvent += delegate + { + UpdateStatusPanelHandCount(); + return NullVfx.GetInstance(); + }; + OnAddCemeteryAfterEvent += delegate + { + BattleMgr.VfxMgr.RegisterImmediateVfx(InstantVfx.Create(delegate + { + if (StatusPanelControl != null) + { + StatusPanelControl.SetGrave(CemeteryList.Count((BattleCardBase c) => !c.IsClass)); + } + })); + return InstantVfx.Create(delegate + { + UpdateHandCardsPlayability(); + }); + }; + OnAddBanishAfterEvent += delegate + { + UpdateHandCardsPlayability(); + UpdateStatusPanelHandCount(); + }; + OnAddUniteAfterEvent += delegate + { + UpdateHandCardsPlayability(); + UpdateStatusPanelHandCount(); + }; + OnChangeDeckAfterEvent += delegate(int previousCount, SkillProcessor skillProcessor, List summonCards) + { + if (previousCount % 2 == 1 && DeckCardList.Count % 2 == 0) + { + int gameResonanceStartCount = GameResonanceStartCount; + GameResonanceStartCount = gameResonanceStartCount + 1; + gameResonanceStartCount = TurnResonanceStartCount; + TurnResonanceStartCount = gameResonanceStartCount + 1; + StartSkillWhenResonanceStart(skillProcessor, summonCards); + } + }; + OnChangeDeckAfterEvent += delegate + { + DeckSkillCardList.RemoveAll((BattleCardBase c) => !c.IsInDeck); + }; + OnMulliganEnd += delegate + { + DeckSkillCardList.RemoveAll((BattleCardBase c) => !c.IsInDeck); + }; + OnTurnStartComplete = (Action)Delegate.Combine(OnTurnStartComplete, new Action(AddToDeckCardIndexChange)); + OnTurnStartComplete = (Action)Delegate.Combine(OnTurnStartComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + OnPostTurnEndComplete = (Action)Delegate.Combine(OnPostTurnEndComplete, new Action(AddToDeckCardIndexChange)); + OnPreTurnEndComplete = (Action)Delegate.Combine(OnPreTurnEndComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + } + + private void UpdateStatusPanelHandCount() + { + if (StatusPanelControl != null && HandCardList != null) + { + StatusPanelControl.SetHandCount(HandCardList.Count); + } + } + + public void UpdateStatusPanel(int handCount, int cemeteryCount, int deckCount) + { + if (StatusPanelControl != null) + { + StatusPanelControl.SetHandCount(handCount); + StatusPanelControl.SetGrave(cemeteryCount); + StatusPanelControl.SetDeck(deckCount); + } + } + + public virtual IClassInfomationUI CreateClassInfomationUI(int orderCount = 1, int totalInfoNum = 1, int clanId = -1) + { + if (clanId == -1) + { + clanId = (IsPlayer ? _dataMgr.GetPlayerClassId() : _dataMgr.GetEnemyClassId()); + } + IBattlePlayerView battlePlayerView = (IsPlayer ? BattleView : _opponentBattlePlayer.BattleView); + IBattlePlayerView battleEnemyView = (IsPlayer ? _opponentBattlePlayer.BattleView : BattleView); + switch ((CardBasePrm.ClanType)clanId) + { + case CardBasePrm.ClanType.MIN: + return new ElfInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.ROYAL: + return new RoyalInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.WITCH: + if (IsPlayer || totalInfoNum > 1) + { + return new WitchInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + } + return new ClassInfomationUIBase(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.DRAGON: + return new DragonInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.NECRO: + return new NecromanceInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.VAMPIRE: + return new VampireInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.BISHOP: + return new BishopInfomationUI(this, battlePlayerView, battleEnemyView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.NEMESIS: + return new NemesisInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + default: + return new ClassInfomationUIBase(this, battlePlayerView, orderCount, totalInfoNum); + } + } + + public VfxBase Recovery() + { + return SequentialVfxPlayer.Create(ClassInformationUIController.LoadResources(StatusPanelControl.GetClassInfoAnchor(), IsPlayer), InstantVfx.Create(delegate + { + ClassInformationUIController.ShowInfomation(playEffect: false); + })); + } + + public abstract void SetupClone(BattlePlayerBase sourceBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags); + + public void SetupActionProcessorEvent(ActionProcessor processor) + { + processor.OnBeforePlayCard += delegate(BattleCardBase originalCard, BattleCardBase card, IEnumerable selectedCards) + { + if (!card.IsChoiceBraveSkillCard) + { + AddCurrentTrunPlayCount(1); + CardOnPlay = card; + TurnPlayCards.Add(card); + GamePlayCards.Add(card); + GameTurnPlayCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + GamePlayMomentTribe.Add(new CardAndTribe(card, card.Tribe)); + if (card.HasSpellCharge) + { + GamePlayMomentSpellChargeCards.Add(card); + } + if (card.CheckConditionFixedUseCost(isPrePlay: true)) + { + GameEnhancePlayCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + } + if (card.TransformInfo.Type == BattleCardBase.TransformType.Crystallize) + { + GameCrystallizedPlayCards.Add(card); + } + if (!BattleMgr.IsVirtualBattle) + { + BattleLogManager.GetInstance().AddLogDestFollower(BattleLogWindow.BattleLogType.PlayCardLog, card); + } + BattleView.HandView.RemoveCardFromView(card.BattleCardView, 0.3f); + } + }; + processor.OnAfterFusion += delegate + { + AddToDeckCardIndexChange(); + return NullVfx.GetInstance(); + }; + processor.OnPlayComplete = (Action)Delegate.Combine(processor.OnPlayComplete, new Action(AddToDeckCardIndexChange)); + processor.OnPlayComplete = (Action)Delegate.Combine(processor.OnPlayComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + processor.OnPlayComplete = (Action)Delegate.Combine(processor.OnPlayComplete, this.OnPlayComplete); + processor.OnPlayComplete = (Action)Delegate.Combine(processor.OnPlayComplete, (Action)delegate + { + CardOnPlay = null; + }); + processor.OnEvolutionComplete = (Action)Delegate.Combine(processor.OnEvolutionComplete, new Action(AddToDeckCardIndexChange)); + processor.OnEvolutionComplete = (Action)Delegate.Combine(processor.OnEvolutionComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvolutionEvent)); + processor.OnAttackComplete = (Action)Delegate.Combine(processor.OnAttackComplete, new Action(AddToDeckCardIndexChange)); + processor.OnAttackComplete = (Action)Delegate.Combine(processor.OnAttackComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + if (GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle) + { + processor.OnFusionComplete = (Action)Delegate.Combine(processor.OnFusionComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + } + } + + private void SetUpClassEvent() + { + this.OnSetupClassEvent.Call(); + } + + public virtual void SetupCardEvent(BattleCardBase card) + { + if (card.IsUnit) + { + card.OnEvolveEvent += delegate(bool isSkill) + { + EvolveProcess(card, isSkill); + }; + } + this.OnSetupCardEvent.Call(card); + if (card.IsSpell) + { + card.OnPlay += () => RemoveSpellCardFromHand(card); + card.OnFinishWhenPlaySkill += () => AddSpellCardToCemetery(card); + } + card.OnRemoveFromInPlayAfterOneTime += (bool flg, SkillProcessor skillProcessorOneTime) => flg ? NullVfx.GetInstance() : card.SkillApplyInformation.AllSkillEffectStop(); + } + + public virtual BattleCardBase CreateCard(int cardId, int cardIndex, bool isChoiceBrave = false) + { + BattleCardBase battleCardBase = CardCreatorBase.CreateCard(cardId, IsPlayer, cardIndex, BattleManagerBase.GetIns().SBattleLoad, BattleMgr, BattleManagerBase.GetIns().BattleResourceMgr, _innerOptionsBuilder, isChoiceBrave); + SetupCardEvent(battleCardBase); + return battleCardBase; + } + + public BattleCardBase CreateVirtualCard(int cardId, int cardIndex) + { + BattleCardBase battleCardBase = CardCreatorBase.CreateVirtualCard(cardId, cardIndex, IsPlayer, BattleMgr, this, _opponentBattlePlayer, _innerOptionsBuilder); + SetupCardEvent(battleCardBase); + return battleCardBase; + } + + public BattleCardBase CreateNextIndexCard(int cardId, bool isChoiceBrave = false) + { + BattleCardBase result = CreateCard(cardId, cardTotalNum, isChoiceBrave); + if (!isChoiceBrave) + { + cardTotalNum++; + } + return result; + } + + public VfxBase CardManagement(BattleCardBase card, SkillProcessor skillProcessor, CARD_MANAGEMENT management, bool isRandom, List fusionCards = null, BattleCardBase vehicleCard = null, SkillBase skill = null, SummonInfo summonInfo = null, bool isOpen = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + switch (management) + { + case CARD_MANAGEMENT.DESTROY: + if (card.SkillApplyInformation.IsBanishByDestroy && card.SkillApplyInformation.IsDestroyByBanish) + { + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + else if (!card.SkillApplyInformation.IsBanishByDestroy && card.SkillApplyInformation.IsDestroyByBanish) + { + if (card.SkillApplyInformation.IsIndestructible && card.IsDestroyedBySkill) + { + card.ResetFlagCardAsDestroyed(); + } + else + { + sequentialVfxPlayer.Register(BanishManagement(card, skillProcessor, skill, isReturn: false, isRandom, isOpen)); + } + } + else + { + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + break; + case CARD_MANAGEMENT.BANISH: + if (card.SkillApplyInformation.IsBanishByDestroy && card.SkillApplyInformation.IsDestroyByBanish) + { + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + else if (card.SkillApplyInformation.IsBanishByDestroy && !card.SkillApplyInformation.IsDestroyByBanish) + { + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + else + { + sequentialVfxPlayer.Register(BanishManagement(card, skillProcessor, skill, isReturn: false, isRandom, isOpen)); + } + break; + case CARD_MANAGEMENT.RETURN: + GameReturnedCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + card.SetReturnedSkill(skill); + if (card.SkillApplyInformation.IsReturnByBanish && card.SkillApplyInformation.IsBanishByDestroy) + { + if (card.SkillApplyInformation.IsIndestructible) + { + sequentialVfxPlayer.Register(ReturnCardManagement(card, skillProcessor, skill)); + break; + } + card.FlagCardAsDestroyedBySkill(); + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + else if (card.SkillApplyInformation.IsReturnByBanish) + { + sequentialVfxPlayer.Register(BanishManagement(card, skillProcessor, skill, isReturn: true, isRandom, isOpen)); + } + else + { + sequentialVfxPlayer.Register(ReturnCardManagement(card, skillProcessor, skill)); + } + break; + case CARD_MANAGEMENT.FUSION_MATERIAL: + sequentialVfxPlayer.Register(Fusion(card, fusionCards, skillProcessor)); + break; + case CARD_MANAGEMENT.GETON: + sequentialVfxPlayer.Register(GetOnCardManagement(card, skillProcessor, vehicleCard, skill)); + break; + case CARD_MANAGEMENT.GETOFF: + return GetOffCardManagement(summonInfo, skillProcessor, vehicleCard, skill); + case CARD_MANAGEMENT.SUMMON: + return SummonCardManagement(summonInfo, skillProcessor, skill); + } + return sequentialVfxPlayer; + } + + public void CallOnSummonTokenCards(BattleCardBase card, List summonCards, List overflowCards, bool isSelf, bool isOwnerEffect, bool isIgnoreVoice, bool isRandomVoice, bool isEvoVoice) + { + this.OnSummonTokenCards.Call(card, summonCards, overflowCards, isSelf, isOwnerEffect, isIgnoreVoice, isRandomVoice, isEvoVoice); + } + + public void CallOnSummonCards(BattleCardBase card, List cards, bool isSelf, bool isDeckSelf, bool isIgnoreVoice, bool isBurialRite = false) + { + this.OnSummonCards.Call(card, cards, isSelf, isDeckSelf, isIgnoreVoice, isBurialRite); + } + + protected VfxBase Fusion(BattleCardBase fusionCard, List ingredientCards, SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (!fusionCard.IsFusionable) + { + return sequentialVfxPlayer; + } + if (!GameMgr.GetIns().IsAdminWatch && !GameMgr.GetIns().IsReplayBattle) + { + BattleLogManager.GetInstance().AddFusionIngredients(fusionCard, isCreateClone: false); + } + if (!BattleMgr.IsVirtualBattle && !BattleMgr.IsRecovery) + { + sequentialVfxPlayer.Register(BattleView.CreateBeforeFusionVfx(fusionCard, ingredientCards)); + } + new SkillConditionCheckerOption(); + SkillProcessor.ProcessInfo processInfo = fusionCard.Skills.CreateWhenFusionMetamorphoseInfo(ingredientCards, skillProcessor, new BattlePlayerPair(fusionCard.SelfBattlePlayer, fusionCard.OpponentBattlePlayer)); + skillProcessor.Register(processInfo); + bool flag = processInfo != null; + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + foreach (BattleCardBase ingredientCard in ingredientCards) + { + parallelVfxPlayer.Register(UseFusionIngredientManagement(ingredientCard, fusionCard, skillProcessor, isRandom: false, flag)); + } + sequentialVfxPlayer.Register(parallelVfxPlayer); + TurnFusionCards.Add(fusionCard); + AddCurrentTurnFusionCount(1); + if (GameMgr.GetIns().IsAdminWatch || GameMgr.GetIns().IsReplayBattle) + { + BattleLogManager.GetInstance().AddFusionIngredients(fusionCard, isCreateClone: true); + } + BattleCardBase originalCard = fusionCard; + fusionCard.CallOnFusionEvent(ingredientCards); + sequentialVfxPlayer.Register(skillProcessor.Process(new BattlePlayerPair(this, _opponentBattlePlayer))); + if (flag) + { + fusionCard = fusionCard.MetamorphoseCard; + } + sequentialVfxPlayer.Register(BattleView.ReturnActCardAfterFusion(fusionCard.BattleCardView, flag)); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + ImmediateVfxMgr.GetInstance().Register(new ShowSideLogVfx(originalCard, null, originalCard.SelfBattlePlayer.BattleView.GetSideLogControl(isSkillTargetSelect: false), originalCard.GetCardSkillDescription(new SideLogInfo(null)), 3f)); + })); + VfxBase vfx = fusionCard.Fusion(skillProcessor, ingredientCards, flag); + sequentialVfxPlayer.Register(vfx); + VfxBase vfx2 = skillProcessor.Process(new BattlePlayerPair(this, _opponentBattlePlayer)); + sequentialVfxPlayer.Register(vfx2); + return sequentialVfxPlayer; + } + + public VfxBase CardManagement(List cards, SkillProcessor skillProcessor, CARD_MANAGEMENT management, bool isRandom, SkillBase skill = null) + { + if (!BattleMgr.IsRecovery) + { + for (int i = 0; i < cards.Count; i++) + { + BurialRiteOrDiscardCardHandIndexList.Add(HandCardList.IndexOf(cards[i])); + } + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (management == CARD_MANAGEMENT.DESTROY) + { + sequentialVfxPlayer.Register(DestroyManagement(cards, skillProcessor, isRandom, skill)); + } + return sequentialVfxPlayer; + } + + protected VfxBase DestroyManagement(BattleCardBase card, SkillProcessor skillProcessor, bool isRandom, SkillBase destroyedSkill = null) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + bool num = ClassAndInPlayCardList.Contains(card); + bool flag = HandCardList.Contains(card); + if (num) + { + this.OnStartLeaveCard.Call(); + sequentialVfxPlayer.Register(DestroyCard(card, skillProcessor, isRandom, destroyedSkill)); + sequentialVfxPlayer.Register(card.DestroyInPlay(skillProcessor, useDestroy: true, destroyedSkill)); + this.OnDestroy.Call(card); + } + else if (flag) + { + sequentialVfxPlayer.Register(DestroyCard(card, skillProcessor, isRandom, destroyedSkill)); + sequentialVfxPlayer.Register(DisCard(card, new List { card }, skillProcessor, destroyedSkill)); + } + return sequentialVfxPlayer; + } + + protected VfxBase DestroyManagement(List cards, SkillProcessor skillProcessor, bool isRandom, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (HandCardList.Contains(cards.First())) + { + for (int i = 0; i < cards.Count; i++) + { + sequentialVfxPlayer.Register(DestroyCard(cards[i], skillProcessor, isRandom, skill)); + } + sequentialVfxPlayer.Register(DisCards(cards, skillProcessor, skill)); + } + return sequentialVfxPlayer; + } + + protected VfxBase BanishManagement(BattleCardBase card, SkillProcessor skillProcessor, SkillBase skill, bool isReturn = false, bool isRandom = false, bool isOpen = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + bool num = InPlayCards.Contains(card); + bool flag = HandCardList.Contains(card); + bool flag2 = DeckCardList.Contains(card); + this.OnStartLeaveCard.Call(); + if (num) + { + card.SetBanishedInfo(BattleCardBase.BanishInfo.BanishPlace.Field); + sequentialVfxPlayer.Register(card.SkillApplyInformation.AllSkillEffectStop()); + sequentialVfxPlayer.Register(BanishCard(card, skillProcessor, isRandom, skill, isOpen)); + sequentialVfxPlayer.Register(card.Banish(skillProcessor, isReturn)); + } + else if (flag) + { + card.SetBanishedInfo(BattleCardBase.BanishInfo.BanishPlace.Hand); + sequentialVfxPlayer.Register(BanishCard(card, skillProcessor, isRandom, skill, isOpen)); + VfxWithLoading vfxWithLoading = card.BanishInHand(skillProcessor); + sequentialVfxPlayer.Register(vfxWithLoading.LoadingVfx); + sequentialVfxPlayer.Register(vfxWithLoading.MainVfx); + } + else if (flag2) + { + card.SetBanishedInfo(BattleCardBase.BanishInfo.BanishPlace.Deck); + sequentialVfxPlayer.Register(BanishCard(card, skillProcessor, isRandom, skill, isOpen)); + sequentialVfxPlayer.Register(card.BanishInDeck(skillProcessor)); + } + this.OnBanish.Call(card); + return sequentialVfxPlayer; + } + + public VfxBase UseFusionIngredientManagement(BattleCardBase ingredientCard, BattleCardBase fusionCard, SkillProcessor skillProcessor, bool isRandom = false, bool isFusionMetamorphose = false) + { + if (FusionIngredientList.Any((BattleCardBase c) => c == fusionCard)) + { + return NullVfx.GetInstance(); + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + VfxWithLoading vfxWithLoading = ingredientCard.FusionMaterialized(skillProcessor, fusionCard, isFusionMetamorphose); + this.OnFusion.Call(ingredientCard); + HandCardList.Remove(ingredientCard); + CallSkill((IBattlePlayerSkill s) => s.StopBattleHandCard, ingredientCard); + FusionIngredientList.Add(ingredientCard); + FusionIngredientAndDiscardedCardList.Add(ingredientCard); + if (isRandom) + { + PredictionBanishRandomCards.Add(ingredientCard); + } + this.OnAddBanishAfterEvent.Call(fusionCard); + sequentialVfxPlayer.Register(ingredientCard.UnloadResource()); + sequentialVfxPlayer.Register(vfxWithLoading.LoadingVfx); + sequentialVfxPlayer.Register(vfxWithLoading.MainVfx); + return sequentialVfxPlayer; + } + + protected VfxBase ReturnCardManagement(BattleCardBase card, SkillProcessor skillProcessor, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + this.OnStartLeaveCard.Call(); + sequentialVfxPlayer.Register(ReturnCard(card, skillProcessor, skill)); + this.OnReturn.Call(card); + return sequentialVfxPlayer; + } + + protected VfxBase GetOnCardManagement(BattleCardBase getOnCard, SkillProcessor skillProcessor, BattleCardBase vehicleCard, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + vehicleCard.SkillApplyInformation.AddGetOnCard(getOnCard); + getOnCard.DeathTypeInfo.LeaveByGetOn = true; + sequentialVfxPlayer.Register(getOnCard.RemoveFromInPlay()); + sequentialVfxPlayer.Register(CardToVehicleZone(getOnCard, skill)); + SkillProcessor.ProcessInfo info = vehicleCard.Skills.CreateWhenGetOnInfo(skillProcessor, playerInfoPair); + sequentialVfxPlayer.Register(getOnCard.RemoveFromInPlayAfter(skillProcessor)); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor)); + skillProcessor.Register(info); + sequentialVfxPlayer.Register(getOnCard.GetOn(vehicleCard.BattleCardView.Transform, vehicleCard.BattleCardView, skillProcessor)); + return sequentialVfxPlayer; + } + + protected VfxBase GetOffCardManagement(SummonInfo summonInfo, SkillProcessor skillProcessor, BattleCardBase vehicleCard, SkillBase skill) + { + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + foreach (BattleCardBase summonedCard in summonInfo.SummonedCardsList.summonedCards) + { + vfxWithLoadingSequential.RegisterVfxWithLoading(summonedCard.SkillPlayCard(IsPlayer, SkillBaseSummon.SUMMON_TYPE.TOKEN, skillProcessor, skill, isGetoff: true)); + } + vfxWithLoadingSequential.RegisterToLoadingVfx(BattleMgr.LoadCardResources(summonInfo.SummonedCardsList.summonedCards.ToList())); + vfxWithLoadingSequential.RegisterToLoadingVfx(BattleMgr.LoadCardResources(summonInfo.SummonedCardsList.overflowCards.ToList())); + this.OnGetoff.Call(summonInfo.SummonedCardsList.summonedCards.ToList(), summonInfo.SummonedCardsList.overflowCards.ToList(), skill); + vfxWithLoadingSequential.RegisterToMainVfx(StartSkillWhenChangeInplay(null, summonInfo.SummonedCardsList.summonedCards.ToList(), skillProcessor, isSummonCheck: false)); + vehicleCard.GetOffCards.AddRange(summonInfo.SummonedCardsList.summonedCards); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + skillProcessor.Register(vehicleCard.Skills.CreateWhenGetOffInfo(skillProcessor, playerInfoPair), ignoreOwnerDeadCheck: true); + UpdateHandCardsPlayability(); + return vfxWithLoadingSequential; + } + + protected VfxBase SummonCardManagement(SummonInfo summonInfo, SkillProcessor skillProcessor, SkillBase skill) + { + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + if (summonInfo.IsReanimate) + { + skillConditionCheckerOption.ReanimatedCards = ConvertToSkillInfoCollection(summonInfo.SummonedCardsList); + } + if (summonInfo.IsDeckSelfSummon) + { + skillConditionCheckerOption.DeckSelfSummonedCards = ConvertToSkillInfoCollection(summonInfo.SummonedCardsList); + } + foreach (BattleCardBase summonedCard in summonInfo.SummonedCardsList.summonedCards) + { + vfxWithLoadingSequential.RegisterVfxWithLoading(summonedCard.SkillPlayCard(summonInfo.IsPlayer, summonInfo.SummonType, skillProcessor, skill, isGetoff: false, summonInfo.IsReanimate)); + } + vfxWithLoadingSequential.RegisterToLoadingVfx(BattleMgr.LoadCardResources(summonInfo.SummonedCardsList.summonedCards.ToList())); + SkillSummonedCards = new List(summonInfo.SummonedCardsList.summonedCards); + SummonedCards = new List(summonInfo.SummonedCardsList.ToList()); + vfxWithLoadingSequential.RegisterToLoadingVfx(BattleMgr.LoadCardResources(summonInfo.SummonedCardsList.overflowCards.ToList())); + vfxWithLoadingSequential.RegisterToMainVfx(StartSkillWhenChangeInplay(null, summonInfo.SummonedCardsList.summonedCards.ToList(), skillProcessor, isSummonCheck: true, null, skillConditionCheckerOption)); + for (int i = 0; i < SkillSummonedCards.Count; i++) + { + List list = new List(); + for (int j = i + 1; j < SkillSummonedCards.Count; j++) + { + list.Add(SkillSummonedCards[j]); + } + StartSkillWhenSummonOther(SkillSummonedCards[i], skillProcessor, summonInfo.IsReanimate, list); + } + BattleCardBase[] array = summonInfo.SummonedCardsList.Where((BattleCardBase c) => c.IsInplay && c.IsUnit).ToArray(); + for (int num = 0; num < array.Length; num++) + { + array[num].SelfBattlePlayer.AddRallyCount(1); + } + UpdateHandCardsPlayability(); + return vfxWithLoadingSequential; + } + + protected VfxBase DestroyCard(BattleCardBase destroyCard, SkillProcessor skillProcessor, bool isRandom, SkillBase skill) + { + bool flag = destroyCard.IsChantField && destroyCard.ChantCount <= 0; + if (destroyCard.SkillApplyInformation.IsIndestructible && destroyCard.IsDestroyedBySkill && !flag && !destroyCard.DeathTypeInfo.MysteriesDestroy && (!destroyCard.IsTribe(CardBasePrm.TribeType.WHITE_RITUAL) || destroyCard.SkillApplyInformation.WhiteRitualCount > 0 || (!(destroyCard is FieldBattleCard) && !(destroyCard is ChantFieldBattleCard)))) + { + destroyCard.ResetFlagCardAsDestroyed(); + if (!destroyCard.IsDead) + { + return NullVfx.GetInstance(); + } + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (skillProcessor != null) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + if (ClassAndInPlayCardList.Any((BattleCardBase c) => c == destroyCard)) + { + new SkillConditionCheckerOption().DestroyedCard = destroyCard; + TurnDestroyCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, destroyCard, BattleMgr.IsTurnEnd)); + GameLeftCards.Add(destroyCard); + GameTurnLeftCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, destroyCard, BattleMgr.IsTurnEnd)); + sequentialVfxPlayer.Register(destroyCard.RemoveFromInPlay()); + sequentialVfxPlayer.Register(CardToCemetery(destroyCard, skill, CEMETERY_TYPE.NORMAL, isRandom)); + SkillProcessor.ProcessInfo info = destroyCard.Skills.CreateWhenLeaveInfo(skillProcessor, playerInfoPair); + VfxWith info2 = destroyCard.Skills.CreateWhenDestroyInfo(destroyCard, skillProcessor, playerInfoPair); + if (destroyCard.HasSkillWhenDestroy && !DestroyedWhenDestroyCards.Any((BattleCardBase x) => x.Index == destroyCard.Index)) + { + DestroyedWhenDestroyCards.Add(destroyCard); + } + sequentialVfxPlayer.Register(destroyCard.RemoveFromInPlayAfter(skillProcessor)); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor)); + skillProcessor.Register(info, ignoreOwnerDeadCheck: true); + skillProcessor.Register(info2.Value, ignoreOwnerDeadCheck: true); + destroyCard.OnDestroy += (BattleCardBase _card, SkillProcessor _skillProcessor) => info2.Vfx; + destroyCard.SetDestroyedBySkillList(skill); + StartSkillWhenDestroyOther(destroyCard, skillProcessor); + } + else if (HandCardList.Any((BattleCardBase c) => c == destroyCard)) + { + skillProcessor.Register(destroyCard.Skills.CreateDisCardInfo(skillProcessor, playerInfoPair)); + sequentialVfxPlayer.Register(CardToCemetery(destroyCard, skill)); + } + return sequentialVfxPlayer; + } + return CardToCemetery(destroyCard, skill); + } + + protected VfxBase BanishCard(BattleCardBase banishedCard, SkillProcessor skillProcessor, bool isRandom, SkillBase skill, bool isOpen) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + new SkillConditionCheckerOption(); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + if (InPlayCards.Any((BattleCardBase c) => c == banishedCard)) + { + SkillProcessor.ProcessInfo info = banishedCard.Skills.CreateWhenLeaveInfo(skillProcessor, playerInfoPair); + SkillProcessor.ProcessInfo info2 = banishedCard.Skills.CreateWhenBanishInfo(banishedCard, skillProcessor, playerInfoPair); + skillProcessor.Register(info, ignoreOwnerDeadCheck: true); + skillProcessor.Register(info2, ignoreOwnerDeadCheck: true); + sequentialVfxPlayer.Register(banishedCard.RemoveFromInPlay()); + sequentialVfxPlayer.Register(CardToBanishZone(banishedCard, skill, registerEvent: true, isRandom, isOpen)); + sequentialVfxPlayer.Register(banishedCard.RemoveFromInPlayAfter(skillProcessor)); + StartSkillWhenBanishOther(banishedCard, skillProcessor, isInplay: true); + } + else if (HandCardList.Any((BattleCardBase c) => c == banishedCard)) + { + SkillProcessor.ProcessInfo info3 = banishedCard.Skills.CreateWhenBanishInfo(banishedCard, skillProcessor, playerInfoPair); + skillProcessor.Register(info3, ignoreOwnerDeadCheck: true); + sequentialVfxPlayer.Register(CardToBanishZone(banishedCard, skill, registerEvent: true, isRandom, isOpen)); + StartSkillWhenBanishOther(banishedCard, skillProcessor, isInplay: false); + } + else if (DeckCardList.Any((BattleCardBase c) => c == banishedCard)) + { + SkillProcessor.ProcessInfo info4 = banishedCard.Skills.CreateWhenBanishInfo(banishedCard, skillProcessor, playerInfoPair); + skillProcessor.Register(info4, ignoreOwnerDeadCheck: true); + sequentialVfxPlayer.Register(CardToBanishZone(banishedCard, skill, registerEvent: true, isRandom, isOpen)); + if (!BattleManagerBase.IsForecast) + { + sequentialVfxPlayer.Register(new DeckChangeVfx(this)); + sequentialVfxPlayer.Register(new DummyDeckRemoveCardVfx(IsPlayer, 1)); + } + } + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor)); + return sequentialVfxPlayer; + } + + protected VfxBase ReturnCard(BattleCardBase targetCard, SkillProcessor skillProcessor, SkillBase skill) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + List list = new List(); + bool flag = HandCardList.Count < 9; + if (flag) + { + list.Add(targetCard); + targetCard.DrawTurn = ((targetCard.SelfBattlePlayer.IsSelfTurn && !BattleMgr.IsTurnEnd) ? targetCard.SelfBattlePlayer.Turn : (targetCard.SelfBattlePlayer.Turn + 1)); + } + BattleCardBase battleCardBase = targetCard.VirtualClone(this, _opponentBattlePlayer); + GameLeftCards.Add(battleCardBase); + GameTurnLeftCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, battleCardBase, BattleMgr.IsTurnEnd)); + skillConditionCheckerOption.InHandCard = ConvertToSkillInfoCollection(list); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + SequentialVfxPlayer sequentialVfxPlayer2 = SequentialVfxPlayer.Create(); + List list2 = new List(); + if (targetCard.SkillApplyInformation.IsSkillCantAtkAll) + { + list2.Add(targetCard); + } + SkillProcessor.ProcessInfo info = targetCard.Skills.CreateWhenLeaveInfo(skillProcessor, playerInfoPair); + skillProcessor.Register(info, ignoreOwnerDeadCheck: true); + SkillProcessor.ProcessInfo info2 = targetCard.Skills.CreateWhenReturnInfo(skillProcessor, playerInfoPair); + sequentialVfxPlayer2.Register(targetCard.ReturnCard(skillProcessor)); + parallelVfxPlayer.Register(ReturnToHand(targetCard, skill)); + sequentialVfxPlayer2.Register(targetCard.RemoveFromInPlayAfter(skillProcessor, isReturn: true)); + parallelVfxPlayer.Register(sequentialVfxPlayer2); + this.OnAfterReturnCardEvent.Call(targetCard); + this.OnLeaveAfterEvent.Call(targetCard); + skillProcessor.Register(info2, ignoreOwnerDeadCheck: true); + sequentialVfxPlayer.Register(parallelVfxPlayer); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(new List { targetCard }, null, skillProcessor, isSummonCheck: true, flag ? ((Func)((SkillBase s) => s.OnWhenAddToHand)) : null, skillConditionCheckerOption)); + StartSkillWhenReturnOther(targetCard, skillProcessor, list2); + return sequentialVfxPlayer; + } + + public VfxBase UniteCard(BattleCardBase destroyCard, SkillProcessor skillProcessor, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + new SkillConditionCheckerOption(); + destroyCard.FlagCardAsDestroyedBySkill(); + sequentialVfxPlayer.Register(CardToUniteZone(destroyCard, skill)); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor)); + return sequentialVfxPlayer; + } + + protected virtual VfxBase DisCard(BattleCardBase ownerCard, List targetCards, SkillProcessor skillProcessor, SkillBase discardedSkill) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + for (int i = 0; i < targetCards.Count; i++) + { + parallelVfxPlayer.Register(targetCards[i].DestroyInHand(skillProcessor)); + targetCards[i].SetDiscardedSkill(discardedSkill); + } + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: false, (BattleCardBase card) => card != ownerCard && card.Skills.Any((SkillBase s) => s.OnDisCardOtherStart != 0)); + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateDisCardOtherInfo(targetCards, cardsOrderBySkillActivation[num].IsPlayer, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + return SequentialVfxPlayer.Create(parallelVfxPlayer); + } + + protected virtual VfxBase DisCards(List targetCards, SkillProcessor skillProcessor, SkillBase discardedSkill) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + BurialRiteOrDiscardCardHandIndexList.Clear(); + })); + for (int num = 0; num < targetCards.Count; num++) + { + parallelVfxPlayer.Register(targetCards[num].DestroyInHand(skillProcessor)); + targetCards[num].SetDiscardedSkill(discardedSkill); + } + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: false, (BattleCardBase card) => !targetCards.Contains(card) && card.Skills.Any((SkillBase s) => s.OnDisCardOtherStart != 0)); + for (int num2 = 0; num2 < cardsOrderBySkillActivation.Count; num2++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num2].Skills.CreateDisCardOtherInfo(targetCards, cardsOrderBySkillActivation[num2].IsPlayer, skillProcessor, (cardsOrderBySkillActivation[num2].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + return SequentialVfxPlayer.Create(parallelVfxPlayer); + } + + protected virtual VfxBase ReturnToHand(BattleCardBase returnCard, SkillBase skill) + { + return FieldCardToHandCard(returnCard, skill); + } + + public VfxBase StartBattleMainView(bool playEffect = true) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(CreateUpdateClassInfoVfx(playEffect)); + for (int i = 0; i < InHandCards.Count; i++) + { + parallelVfxPlayer.Register(InHandCards.ToList()[i].BattleCardView.ShowHandCardInfo()); + } + return parallelVfxPlayer; + } + + public virtual VfxBase TurnStart() + { + foreach (BattleCardBase handCard in HandCardList) + { + handCard.SetOnDraw(draw: true); + } + IsSelfTurn = true; + _opponentBattlePlayer.IsSelfTurn = false; + this.OnTurnStartStart.Call(); + NowTurnEvol = true; + IsEpEvolveThisTurn = false; + TurnNecromanceCount = 0; + TurnPlayCards.Clear(); + TurnDrawCards.Clear(); + TurnDrawTokenCardsWithId.Clear(); + TurnBurialRiteCards.Clear(); + TurnFusionCards.Clear(); + if (!IsGameFirst || Turn != 1) + { + IsAlreadyChoiceBraveInThisTurn = false; + } + _turnUsedEpCount = 0; + TurnStartLifeList.Add(new TurnAndIntValue(Class.Life, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + _opponentBattlePlayer.TurnStartLifeList.Add(new TurnAndIntValue(_opponentBattlePlayer.Class.Life, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + SkillProcessor skillProcessor = new SkillProcessor(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + _ = PpTotal; + GameMgr.GetIns().GetDataMgr(); + int num = 0; + IDetailPanelControl detailPanelControl = BattleMgr.DetailMgr.DetailPanelControl; + if (EvolveWaitTurnCount <= 0) + { + for (int i = 0; i < BonusConditionList.Count; i++) + { + if (BonusConditionList[i].GetAndReduceAddPpTurn()) + { + BonusConditionList[i].UseUpAddPpTotalBonus(); + if (detailPanelControl._card != null && detailPanelControl._card.IsClass && detailPanelControl._card.IsPlayer == IsPlayer) + { + detailPanelControl.UpdateBuffInfo(_class, BonusConditionList); + } + num += BonusConditionList[i].MyRotationBonus.IncreaseAddPptotalAmount; + } + } + } + int count = ((!Class.SkillApplyInformation.IsTurnStartFixedPP) ? (1 + num) : 0); + VfxBase vfx = AddPpTotal(count, isUpdatePp: true, skillProcessor); + sequentialVfxPlayer.Register(vfx); + BattleLogManager.GetInstance().AddLogTurn(IsPlayer); + BattleLogManager.GetInstance().BeginLogBlockTurnChangeReactive(); + VfxBase[] allFuncCallResults = this.OnTurnStartBeforeDraw.GetAllFuncCallResults(skillProcessor); + foreach (VfxBase vfx2 in allFuncCallResults) + { + sequentialVfxPlayer.Register(vfx2); + } + BattleCardBase[] array = HandCardList.ToArray(); + BattleCardBase[] array2 = _opponentBattlePlayer.HandCardList.ToArray(); + BattleCardBase[] array3 = ClassAndInPlayCardList.ToArray(); + BattleCardBase[] array4 = _opponentBattlePlayer.ClassAndInPlayCardList.ToArray(); + BattleCardBase[] array5 = DeckSkillCardList.ToArray(); + BattleCardBase[] array6 = _opponentBattlePlayer.DeckSkillCardList.ToArray(); + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + BattleCardBase[] array7 = array; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx3 = array7[j].TurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx3); + } + array7 = array2; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx4 = array7[j].OpponentTurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx4); + } + array7 = array3; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx5 = array7[j].TurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx5); + } + array7 = array4; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx6 = array7[j].OpponentTurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx6); + } + array7 = array5; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx7 = array7[j].TurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx7); + } + array7 = array6; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx8 = array7[j].OpponentTurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx8); + } + BattleMgr.OperateMgr.CallOnUpdateAttackableEffect(array3.Where((BattleCardBase c) => c.Attackable).ToList(), array4.Where((BattleCardBase c) => c.Attackable).ToList()); + sequentialVfxPlayer.Register(parallelVfxPlayer); + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + VfxBase vfx9 = skillProcessor.Process(battlePlayerPair); + sequentialVfxPlayer.Register(vfx9); + allFuncCallResults = OnTurnStartSkillAfter.GetAllFuncCallResults(skillProcessor); + foreach (VfxBase vfx10 in allFuncCallResults) + { + sequentialVfxPlayer.Register(vfx10); + } + if (IsGameFirst && Turn == 1) + { + for (int num2 = 0; num2 < HandCardList.Count(); num2++) + { + HandCardList[num2].Skills.CreateAndRegisterWhenChangeInplaySelfhandInfo(HandCardList, skillProcessor, battlePlayerPair); + } + BattlePlayerPair playerInfoPair = new BattlePlayerPair(_opponentBattlePlayer, this); + for (int num3 = 0; num3 < _opponentBattlePlayer.HandCardList.Count(); num3++) + { + _opponentBattlePlayer.HandCardList[num3].Skills.CreateAndRegisterWhenChangeInplaySelfhandInfo(_opponentBattlePlayer.HandCardList, skillProcessor, playerInfoPair); + } + } + sequentialVfxPlayer.Register(TurnStartDraw(skillProcessor)); + sequentialVfxPlayer.Register(skillProcessor.Process(battlePlayerPair)); + BattleUIContainer battleUIContainer = BattleManagerBase.GetIns().BattleUIContainer; + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + battleUIContainer.EnableMenu(); + })); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + BattleMgr.BattlePlayer.TurnStartEffectEnd(); + })); + BattleLogManager.GetInstance().EndLogBlockTurnChangeReactive(); + if (!BattleMgr.IsBattleEnd) + { + if (GameMgr.GetIns().IsNetworkBattle && IsPlayer) + { + NetworkBattleManagerBase networkBattleManagerBase = BattleManagerBase.GetIns() as NetworkBattleManagerBase; + if (networkBattleManagerBase.turnEndTimeController != null) + { + networkBattleManagerBase.turnEndTimeController.AddTurnEndTimerLog("Player SetActiveVFX"); + } + } + ParallelVfxPlayer parallelVfxPlayer2 = ParallelVfxPlayer.Create(); + parallelVfxPlayer2.Register(InstantVfx.Create(SetActive)); + sequentialVfxPlayer.Register(parallelVfxPlayer2); + } + VfxBase allFuncVfxResults = this.OnTurnStartAfterDraw.GetAllFuncVfxResults(); + sequentialVfxPlayer.Register(allFuncVfxResults); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + foreach (BattleCardBase handCard2 in HandCardList) + { + handCard2.SetOnDraw(draw: false); + } + UpdateHandCardsPlayability(); + })); + sequentialVfxPlayer.Register(UpdateHandCardsCost()); + sequentialVfxPlayer.Register(UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(this.OnTurnStartFinish.GetAllFuncVfxResults()); + OnTurnStartComplete.Call(); + return sequentialVfxPlayer; + } + + public abstract VfxBase StartTurnControl(string log = ""); + + public SequentialVfxPlayer TurnEvolveControl(GameObject eqIcon) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + bool firstEvolve = false; + if (EvolveWaitTurnCount > 0) + { + if (EvolveWaitTurnCount == 1) + { + firstEvolve = true; + } + EvolveWaitTurnCount--; + } + if (BattleMgr.IsRecovery || BattleMgr.IsPuzzleMgr) + { + sequentialVfxPlayer.Register(m_vfxCreator.CreateUpdateEp(CurrentEpCount, EvolveWaitTurnCount)); + if (NowTurnEvol && CurrentEpCount > 0 && EvolveWaitTurnCount <= 0) + { + sequentialVfxPlayer.Register(new TurnStartEvolveVfx(eqIcon, firstEvolve)); + } + } + else + { + sequentialVfxPlayer.Register(BattleMgr.LoadTurnPanelResource()); + sequentialVfxPlayer.Register(m_vfxCreator.CreateUpdateEp(CurrentEpCount, EvolveWaitTurnCount)); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_YOURTURN); + BattleMgr.TurnPanelControl.StartUI(Turn, EvolveWaitTurnCount, IsPlayer); + if (GameMgr.GetIns().IsWatchBattle || GameMgr.GetIns().IsReplayBattle) + { + BattleView.TurnEndButtonUI.GameObject.SetActive(value: true); + BattleView.TurnEndButtonUI.ChangeButtonView(IsPlayer); + } + })); + if (NowTurnEvol && CurrentEpCount > 0 && EvolveWaitTurnCount <= 0) + { + sequentialVfxPlayer.Register(new TurnStartEvolveVfx(eqIcon, firstEvolve)); + } + sequentialVfxPlayer.Register(WaitVfx.Create(1.6f)); + } + return sequentialVfxPlayer; + } + + public virtual VfxBase TurnStartDraw(SkillProcessor skillProcessor) + { + DeckCardList.Sort((BattleCardBase a, BattleCardBase b) => a.Index - b.Index); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (!Class.IsDead && !_opponentBattlePlayer.Class.IsDead && !BattleManagerBase.GetIns().IsPuzzleMgr) + { + sequentialVfxPlayer.Register(TurnStartDrawCard(skillProcessor)); + } + return sequentialVfxPlayer; + } + + protected abstract VfxBase TurnStartDrawCard(SkillProcessor skillProcessor); + + protected abstract void SetActive(); + + public abstract BattlePlayerBase CreateVirtualPlayer(); + + public VfxBase AddPpTotal(int count, bool isUpdatePp, SkillProcessor skillProcessor, BattleCardBase ownerCard = null, bool bySkill = false) + { + string text = ""; + bool flag = false; + if (Turn <= 1 && !IsPlayer) + { + flag = true; + } + if (flag) + { + text = text + "AddPpTotal " + count + "isUpdatePp " + isUpdatePp + "NotPPcounter " + Class.SkillApplyInformation.NotDecreasePPCounter + "IsTurnStartFixedPP " + Class.SkillApplyInformation.IsTurnStartFixedPP + ":" + StackTraceUtility.ExtractStackTrace(); + } + if (count < 0 && Class.SkillApplyInformation.NotDecreasePPCounter > 0) + { + if (flag) + { + LocalLog.AccumulateLastTraceLog(text); + } + return NullVfx.GetInstance(); + } + new SkillConditionCheckerOption(); + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + int ppTotal = PpTotal; + PpTotal += count; + if (PpTotal > 10) + { + PpTotal = 10; + } + else if (PpTotal < 0) + { + PpTotal = 0; + } + int num = PpTotal; + if (flag) + { + text = text + "DecreaseList " + Class.SkillApplyInformation.DecreaseTurnStartPPList.Count; + } + for (int i = 0; i < Class.SkillApplyInformation.DecreaseTurnStartPPList.Count; i++) + { + if (flag) + { + text = text + "Decrease:" + Class.SkillApplyInformation.DecreaseTurnStartPPList[i]; + } + num -= Class.SkillApplyInformation.DecreaseTurnStartPPList[i]; + if (num < 0) + { + num = 0; + } + } + Pp = (isUpdatePp ? num : Math.Min(Pp, PpTotal)); + if (flag) + { + text = text + "nowPP " + Pp; + LocalLog.AccumulateLastTraceLog(text); + } + parallelVfxPlayer.Register(new PpChangeVfx(this)); + this.OnChangePP.Call(PpTotal - ppTotal); + this.OnAddPpTotal.Call(PpTotal - ppTotal, Pp, IsPlayer, ownerCard, bySkill); + if (skillProcessor != null) + { + StartSkillWhenChangePPTotal(skillProcessor); + } + return parallelVfxPlayer; + } + + public VfxBase SetPpTotal(int pp, bool isUpdatePp, SkillProcessor skillProcessor) + { + return AddPpTotal(pp - PpTotal, isUpdatePp, skillProcessor); + } + + public SkillProcessor GetTurnEndSkillProcess() + { + SkillProcessor skillProcessor = new SkillProcessor(); + List list = new List(); + list.AddRange(HandCardList); + list.AddRange(_opponentBattlePlayer.HandCardList); + list.AddRange(ClassAndInPlayCardList); + list.AddRange(_opponentBattlePlayer.ClassAndInPlayCardList); + list.AddRange(DeckSkillCardList); + list.AddRange(_opponentBattlePlayer.DeckSkillCardList); + int num = list.Count(); + for (int i = 0; i < num; i++) + { + list[i].TurnEndSkillProcess(skillProcessor); + } + return skillProcessor; + } + + public virtual VfxBase TurnEnd() + { + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + SequentialVfxPlayer turnEndVfx = SequentialVfxPlayer.Create(); + if (this.OnTurnEndStart != null) + { + this.OnTurnEndStart.Call(); + } + BattleLogManager.GetInstance().BeginLogBlockTurnChangeReactive(); + turnEndVfx.Register(BattleView.SetIsNowTurnEnd(flg: true)); + SkillProcessor turnEndSkillProcess = GetTurnEndSkillProcess(); + VfxBase vfx = turnEndSkillProcess.Process(battlePlayerPair); + turnEndVfx.Register(vfx); + List list = new List(); + list.AddRange(ClassAndInPlayCardList); + list.AddRange(_opponentBattlePlayer.ClassAndInPlayCardList); + for (int i = 0; i < list.Count; i++) + { + list[i].CheckPreviousTurnAttacked(); + } + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + foreach (BattleCardBase inPlayCard in InPlayCards) + { + parallelVfxPlayer.Register(inPlayCard.TurnEndPostProcess()); + } + turnEndVfx.Register(parallelVfxPlayer); + VfxBase[] allFuncCallResults = this.OnTurnEnd.GetAllFuncCallResults(turnEndSkillProcess); + foreach (VfxBase vfx2 in allFuncCallResults) + { + turnEndVfx.Register(vfx2); + } + allFuncCallResults = OnTurnEndSkillAfter.GetAllFuncCallResults(turnEndSkillProcess); + foreach (VfxBase vfx3 in allFuncCallResults) + { + turnEndVfx.Register(vfx3); + } + turnEndVfx.Register(turnEndSkillProcess.Process(battlePlayerPair)); + turnEndVfx.Register(UpdateInPlayBattleCardIconLabel()); + turnEndVfx.Register(InstantVfx.Create(delegate + { + if (HandCardList.Count <= 0) + { + turnEndVfx.Register(BattleView.HandUnfocus()); + } + })); + TurnPlayCards.Clear(); + TurnDrawCards.Clear(); + TurnDrawTokenCardsWithId.Clear(); + TurnBurialRiteCards.Clear(); + TurnFusionCards.Clear(); + TurnNecromanceCount = 0; + _turnUsedEpCount = 0; + TurnResonanceStartCount = 0; + _opponentBattlePlayer.TurnResonanceStartCount = 0; + BattleLogManager.GetInstance().EndLogBlockTurnChangeReactive(); + turnEndVfx.Register(BattleMgr.JudgeBattleResult()); + if (!BattleMgr.IsRecovery) + { + turnEndVfx.Register(InstantVfx.Create(delegate + { + int count = ClassAndInPlayCardList.Count; + for (int k = 0; k < count; k++) + { + BattleCardBase card = ClassAndInPlayCardList[k]; + if (!card.BattleCardView.GameObject.activeSelf) + { + turnEndVfx.Register(InstantVfx.Create(delegate + { + card.BattleCardView.GameObject.SetActive(value: true); + if (card.IsInplay) + { + card.SetOnDraw(draw: false); + } + })); + } + } + })); + } + OnPreTurnEndComplete.Call(); + if (!Class.IsDead && !_opponentBattlePlayer.Class.IsDead) + { + IsSelfTurn = false; + VfxBase allFuncVfxResults = this.OnTurnEndFinish.GetAllFuncVfxResults(); + turnEndVfx.Register(allFuncVfxResults); + } + OnPostTurnEndComplete.Call(); + turnEndVfx.Register(BattleView.SetIsNowTurnEnd(flg: false)); + LocalLog.RecordTurnEndIfLoadErrorOccured(); + return turnEndVfx; + } + + public void DecreasesExtraTurnCount() + { + extraTurnCount = Math.Max(0, extraTurnCount - 1); + } + + public void Clear() + { + ClearSpineObject(); + ClearClassAndMainPlace(); + ClearBattleCount(); + } + + protected void ClearSpineObject() + { + if (Class is ClassBattleCardBase classBattleCardBase) + { + classBattleCardBase.ClearSpineObject(); + } + } + + public void ClearClassAndMainPlace() + { + HandCardList.Clear(); + DeckCardList.Clear(); + BattleStartDeckCardList.Clear(); + DeckSkillCardList.Clear(); + ClassAndInPlayCardList.Clear(); + } + + public void ClearBattleCount() + { + CemeteryList.Clear(); + PredictionCemeteryRandomCards.Clear(); + PredictionDamageRandomCards.Clear(); + PredictionBanishRandomCards.Clear(); + BanishList.Clear(); + NecromanceZoneList.Clear(); + UniteList.Clear(); + GetOnList.Clear(); + BlackHole.Clear(); + ChoiceBraveCardList.Clear(); + ReturnList.Clear(); + HealingCards.Clear(); + LastTargetCardsList.Clear(); + SkillSummonedCards.Clear(); + SummonedCards.Clear(); + EvolvedCards.Clear(); + DestroyedWhenDestroyCards.Clear(); + InHandCards.Clear(); + SkillDiscards.Clear(); + SkillBanishCards.Clear(); + DrewSkillCard = null; + TurnPlayCards.Clear(); + TurnDrawCards.Clear(); + TurnDrawTokenCardsWithId.Clear(); + GamePlayCards.Clear(); + GameTurnPlayCards.Clear(); + GameEnhancePlayCards.Clear(); + GameCrystallizedPlayCards.Clear(); + OkSkillInProcess.Clear(); + TurnDestroyCards.Clear(); + AddToDeckCardList.Clear(); + GameSummonCards.Clear(); + GameSummonMomentTribe.Clear(); + GamePlayMomentTribe.Clear(); + GamePlayMomentSpellChargeCards.Clear(); + GameUpdateDeckMomentTribe.Clear(); + GameDrawCards.Clear(); + GameDrawTokenCards.Clear(); + GameAddUpdateDeckCards.Clear(); + GameQuickAttackCards.Clear(); + TurnBurialRiteCards.Clear(); + GameReanimatedCards.Clear(); + TurnWhenHealingCount.Clear(); + GameLeftCards.Clear(); + GameTurnLeftCards.Clear(); + GameReturnedCards.Clear(); + GameSuperSkyboundArtCards.Clear(); + TurnPlayCardCountInfo.Clear(); + TurnFusionCountInfo.Clear(); + TurnNecromanceCount = 0; + GameNecromanceCount = 0; + GameUsedPpCount = 0; + RallyCount = 0; + DeckBanishCount = 0; + GameResonanceStartCount = 0; + TurnResonanceStartCount = 0; + GameUsedWhiteRitualCount = 0; + LastInplayWhiteRitualStack = 0; + _turnUsedEpCount = 0; + GameSkillReturnCardCountList.Clear(); + GameSkillDiscardCountList.Clear(); + GameSkillBuffCountList.Clear(); + GameSkillMetamorphoseCountList.Clear(); + GameSkillDiscardCount = 0; + DiscardedCardList.Clear(); + FusionIngredientList.Clear(); + FusionIngredientAndDiscardedCardList.Clear(); + ReservedCardList.Clear(); + TurnEvolveCardCountInfo.Clear(); + GameInplayMetamorphoseCards.Clear(); + GameBurialRiteCards.Clear(); + TurnStartLifeList.Clear(); + TurnFusionCards.Clear(); + } + + public BattleCardBase FindCardFromGameObject(GameObject cardObject) + { + return AllCards.FirstOrDefault((BattleCardBase s) => s.BattleCardView.GameObject == cardObject); + } + + protected void AddInplayCard(BattleCardBase card, bool isGetoff = false, bool isReanimate = false) + { + ClassAndInPlayCardList.Add(card); + if (!card.IsClass && !isGetoff) + { + GameSummonCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + GameSummonMomentTribe.Add(new CardAndTribe(card, card.Tribe)); + if (isReanimate) + { + GameReanimatedCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + } + } + } + + public void AddRallyCount(int addCount) + { + RallyCount += addCount; + } + + public VfxBase PickCard(BattleCardBase unit, SkillBase skill, SkillBaseSummon.SUMMON_TYPE summonType = SkillBaseSummon.SUMMON_TYPE.HAND, bool isGetoff = false, bool isReanimate = false) + { + this.OnPickCard.Call(unit); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + switch (summonType) + { + case SkillBaseSummon.SUMMON_TYPE.HAND: + HandCardToField(unit, skill); + break; + case SkillBaseSummon.SUMMON_TYPE.DECK: + DeckCardToField(unit, skill); + sequentialVfxPlayer.Register(new DeckChangeVfx(this)); + sequentialVfxPlayer.Register(new DummyDeckRemoveCardVfx(IsPlayer, 1)); + break; + case SkillBaseSummon.SUMMON_TYPE.TOKEN: + TokenToField(unit, skill, isGetoff, isReanimate); + break; + case SkillBaseSummon.SUMMON_TYPE.DESTROYED: + DestroyedToField(unit, skill); + break; + } + this.OnAfterPickCard.Call(); + return sequentialVfxPlayer; + } + + public virtual void HandCardToField(BattleCardBase targetCard, SkillBase skill = null) + { + BattleCardBase battleCardBase = HandCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null) + { + throw new Exception("Target card was not found in hand cards."); + } + this.OnAddPlayCardEvent.Call(battleCardBase, arg2: false, skill); + AddInplayCard(battleCardBase); + HandCardList.Remove(battleCardBase); + CallSkill((IBattlePlayerSkill s) => s.StopBattleHandCard, battleCardBase); + this.OnAddPlayCardAfterEvent.Call(); + this.OnSummonAfterEvent.Call(battleCardBase); + } + + private bool TokenToField(BattleCardBase targetCard, SkillBase skill, bool isGetoff = false, bool isReanimate = false) + { + if (InPlayCards.Count() < 6) + { + this.OnAddPlayCardEvent.Call(targetCard, isGetoff, skill); + AddInplayCard(targetCard, isGetoff, isReanimate); + this.OnSummonAfterEvent.Call(targetCard); + return true; + } + return false; + } + + public bool CemeteryConsumption(int num, BattleCardBase necromanceCard, SkillProcessor skillprocessor, bool isFusion) + { + if (CemeteryList.Count < num) + { + return false; + } + if (num == -1) + { + num = 0; + } + for (int i = 0; i < num; i++) + { + BattleCardBase item = CemeteryList.First(); + NecromanceZoneList.Add(item); + CemeteryList.Remove(item); + } + SuccessNecromance(necromanceCard, skillprocessor, num, isFusion); + return true; + } + + public void SuccessNecromance(BattleCardBase necromanceCard, SkillProcessor skillprocessor, int necromanceCount, bool isFusion) + { + int turnNecromanceCount = TurnNecromanceCount + 1; + TurnNecromanceCount = turnNecromanceCount; + GameNecromanceCount += necromanceCount; + this.OnNecromance.Call(necromanceCard, skillprocessor, necromanceCount, isFusion); + } + + public VfxBase GainCemetery(int gainCount) + { + if (gainCount > CemeteryList.Count()) + { + gainCount = CemeteryList.Count(); + } + for (int i = 0; i < gainCount; i++) + { + BattleCardBase item = CemeteryList.First(); + NecromanceZoneList.Add(item); + CemeteryList.Remove(item); + } + return this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults(); + } + + protected VfxBase FieldCardToHandCard(BattleCardBase targetCard, SkillBase skill) + { + BattleCardBase battleCardBase = ClassAndInPlayCardList.Single((BattleCardBase c) => c == targetCard); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(battleCardBase.RemoveFromInPlay()); + if (HandCardList.Count >= 9) + { + VfxBase vfx = CardToCemetery(battleCardBase, skill, CEMETERY_TYPE.FIELD_RETURN_HAND_OVER); + sequentialVfxPlayer.Register(vfx); + return sequentialVfxPlayer; + } + ClassAndInPlayCardList.Remove(battleCardBase); + HandCardAddList(battleCardBase, NetworkBattleDefine.NetworkCardPlaceState.Field, skill); + return sequentialVfxPlayer; + } + + protected void HandCardAddList(BattleCardBase targetCard, NetworkBattleDefine.NetworkCardPlaceState fromState, SkillBase skill, bool isOpen = false) + { + InHandCards.Add(targetCard); + this.OnAddHandCardEvent.Call(targetCard, fromState, isOpen, skill); + HandCardList.Add(targetCard); + CallSkill((IBattlePlayerSkill s) => s.StartBattleHandCard, targetCard); + this.OnAddHandCardAfterEvent.Call(); + } + + public VfxBase CardToCemetery(BattleCardBase targetCard, SkillBase skill, CEMETERY_TYPE cemeteryType = CEMETERY_TYPE.NORMAL, bool wasRandom = false) + { + if (CemeteryList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + BattleCardBase battleCardBase = ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + BattleCardBase battleCardBase2 = HandCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + BattleCardBase battleCardBase3 = DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null && battleCardBase2 == null && battleCardBase3 == null) + { + return NullVfx.GetInstance(); + } + this.OnAddCemeteryEvent.Call(targetCard, cemeteryType, arg3: false, skill); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + BattleCardBase battleCardBase4 = null; + if (battleCardBase != null) + { + ClassAndInPlayCardList.Remove(battleCardBase); + battleCardBase4 = battleCardBase; + if (battleCardBase.IsUnit && cemeteryType != CEMETERY_TYPE.FIELD_RETURN_HAND_OVER && !BattleMgr.IsVirtualBattle) + { + BattleLogManager.GetInstance().AddLogDestFollower(BattleLogWindow.BattleLogType.Destruction, battleCardBase); + } + } + else + { + battleCardBase4 = ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + } + if (battleCardBase4 == null && battleCardBase2 != null) + { + HandCardList.Remove(battleCardBase2); + CallSkill((IBattlePlayerSkill s) => s.StopBattleHandCard, battleCardBase2); + battleCardBase4 = battleCardBase2; + } + if (battleCardBase4 == null && battleCardBase3 != null) + { + DeckCardList.Remove(battleCardBase3); + sequentialVfxPlayer.Register(CreateUpdateDeckCountLabelVfx()); + battleCardBase4 = battleCardBase3; + } + VfxBase vfxBase = NullVfx.GetInstance(); + if (battleCardBase4 != null) + { + CemeteryList.Add(battleCardBase4); + if (!battleCardBase4.IsClass) + { + vfxBase = battleCardBase4.UnloadResource(); + sequentialVfxPlayer.Register(this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults()); + this.OnLeaveAfterEvent.Call(battleCardBase4); + } + if (wasRandom) + { + PredictionCemeteryRandomCards.Add(battleCardBase4); + } + } + return SequentialVfxPlayer.Create(vfxBase, sequentialVfxPlayer); + } + + public VfxBase CardToVehicleZone(BattleCardBase targetCard, SkillBase skill) + { + if (CemeteryList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + if (!ClassAndInPlayCardList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + this.OnGeton.Call(targetCard, skill); + ClassAndInPlayCardList.Remove(targetCard); + GetOnList.Add(targetCard); + sequentialVfxPlayer.Register(targetCard.UnloadResource()); + return sequentialVfxPlayer; + } + + public VfxBase DummyCardToCemetery(BattleCardBase targetCard, SkillBase skill = null) + { + this.OnAddCemeteryEvent.Call(targetCard, CEMETERY_TYPE.NORMAL, arg3: false, skill); + CemeteryList.Add(targetCard); + return this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults(); + } + + public VfxBase ClearDestroyedAndDiscardedCardList(SkillBase skill) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + int count = CemeteryList.Count; + this.OnAddBlackHole.Call(CemeteryList, skill); + this.OnAddBlackHole.Call(NecromanceZoneList, skill); + BlackHole.AddRange(CemeteryList); + BlackHole.AddRange(NecromanceZoneList); + CemeteryList.Clear(); + NecromanceZoneList.Clear(); + DestroyedWhenDestroyCards.Clear(); + for (int i = 0; i < DiscardedCardList.Count; i++) + { + FusionIngredientAndDiscardedCardList.Remove(DiscardedCardList[i]); + } + DiscardedCardList.Clear(); + for (int j = 0; j < count; j++) + { + parallelVfxPlayer.Register(DummyCardToCemetery(CardCreatorBase.GetDummyInstance(), skill)); + } + return parallelVfxPlayer; + } + + public VfxBase RemoveSpellCardFromHand(BattleCardBase targetSpellCard) + { + if (targetSpellCard.IsChoiceBraveSkillCard) + { + return NullVfx.GetInstance(); + } + BattleCardBase battleCardBase = HandCardList.SingleOrDefault((BattleCardBase c) => c == targetSpellCard); + if (battleCardBase == null) + { + throw new Exception("Target card was not found in hand cards."); + } + this.OnSpellPlayEvent.Call(battleCardBase); + HandCardList.Remove(battleCardBase); + return NullVfx.GetInstance(); + } + + public VfxBase AddSpellCardToCemetery(BattleCardBase targetSpellCard) + { + if (CemeteryList.Any((BattleCardBase c) => c == targetSpellCard)) + { + return NullVfx.GetInstance(); + } + if (!targetSpellCard.IsChoiceBraveSkillCard) + { + CemeteryList.Add(targetSpellCard); + } + else + { + ChoiceBraveCardList.Add(targetSpellCard); + } + BattleMgr.VfxMgr.RegisterImmediateVfx(this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults()); + return targetSpellCard.UnloadResource(); + } + + public VfxBase CardToBanishZone(BattleCardBase targetCard, SkillBase skill, bool registerEvent = true, bool wasRandom = false, bool isOpen = false) + { + targetCard.DeathTypeInfo.BanishDestroy = true; + if (BanishList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + if (registerEvent) + { + bool arg = isOpen || (skill is Skill_banish && skill.OnSelfTurnEndStart != 0 && skill.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter f) => f.Text.Contains("hand_self"))); + this.OnAddBanishEvent.Call(targetCard, skill, arg); + } + BattleCardBase battleCardBase = null; + if (ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + battleCardBase = ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + ClassAndInPlayCardList.Remove(ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard)); + BattleCardBase battleCardBase2 = battleCardBase.VirtualClone(this, _opponentBattlePlayer); + GameLeftCards.Add(battleCardBase2); + GameTurnLeftCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, battleCardBase2, BattleMgr.IsTurnEnd)); + } + else if (HandCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + battleCardBase = HandCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + HandCardList.Remove(battleCardBase); + CallSkill((IBattlePlayerSkill s) => s.StopBattleHandCard, battleCardBase); + } + else if (DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + battleCardBase = DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null) + { + throw new Exception("Target card was not found in either field, hand or deck."); + } + DeckCardList.Remove(battleCardBase); + battleCardBase.SelfBattlePlayer.DeckBanishCount++; + } + if (battleCardBase == null) + { + return NullVfx.GetInstance(); + } + BanishList.Add(battleCardBase); + SkillBanishCards.Add(battleCardBase); + if (wasRandom) + { + PredictionBanishRandomCards.Add(battleCardBase); + } + this.OnAddBanishAfterEvent.Call(targetCard); + this.OnLeaveAfterEvent.Call(targetCard); + return battleCardBase.UnloadResource(); + } + + public VfxBase CardToUniteZone(BattleCardBase targetCard, SkillBase skill) + { + targetCard.DeathTypeInfo.BanishDestroy = true; + if (UniteList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + this.OnAddUniteEvent.Call(targetCard, skill); + ClassAndInPlayCardList.Remove(targetCard); + UniteList.Add(targetCard); + this.OnAddUniteAfterEvent.Call(targetCard); + this.OnLeaveAfterEvent.Call(targetCard); + return targetCard.UnloadResource(); + } + + private void DeckCardToField(BattleCardBase targetCard, SkillBase skill) + { + BattleCardBase battleCardBase = DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null) + { + throw new Exception("Target card is not found from deck cards."); + } + this.OnAddPlayCardEvent.Call(battleCardBase, arg2: false, skill); + AddInplayCard(battleCardBase); + DeckCardList.Remove(battleCardBase); + this.OnSummonAfterEvent.Call(battleCardBase); + } + + private void DestroyedToField(BattleCardBase targetCard, SkillBase skill) + { + BattleCardBase battleCardBase = null; + battleCardBase = CemeteryList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null) + { + battleCardBase = NecromanceZoneList.SingleOrDefault((BattleCardBase c) => c == targetCard); + } + if (battleCardBase == null) + { + throw new Exception("Target card is not found from destroyed cards."); + } + this.OnAddPlayCardEvent.Call(battleCardBase, arg2: false, skill); + AddInplayCard(battleCardBase); + CemeteryList.Remove(battleCardBase); + NecromanceZoneList.Remove(battleCardBase); + this.OnSummonAfterEvent.Call(battleCardBase); + } + + public virtual VfxBase CardDrawVfx(IEnumerable DrawList, bool skipShuffle = false, bool isOpenDrawSkill = false) + { + return NullVfx.GetInstance(); + } + + private VfxBase DrawCard(BattleCardBase targetCard, SkillBase skill, bool isOpen = false, bool isToken = false, bool isReservation = false) + { + bool flag = false; + if (!isToken && DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + DeckCardList.Remove(targetCard); + if (!BattleMgr.IsVirtualBattle) + { + flag = true; + StatusPanelControl.SetDeck(DeckCardList.Count); + } + } + if (HandCardList.Count >= 9) + { + return NullVfx.GetInstance(); + } + if (isToken) + { + HandCardAddList(targetCard, isReservation ? NetworkBattleDefine.NetworkCardPlaceState.Reservation : NetworkBattleDefine.NetworkCardPlaceState.None, skill, isOpen); + return CreateUpdateDeckCountLabelVfx(); + } + targetCard.ResetCardParameterInHand(); + HandCardAddList(targetCard, NetworkBattleDefine.NetworkCardPlaceState.Deck, skill, isOpen); + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + if (DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + DeckCardList.Remove(targetCard); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + StatusPanelControl.SetDeck(DeckCardList.Count); + })); + } + else if (NecromanceZoneList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + NecromanceZoneList.Remove(targetCard); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + targetCard.BattleCardView.ResetCardView(targetCard.BaseParameter); + })); + } + else if (CemeteryList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + CemeteryList.Remove(targetCard); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + targetCard.BattleCardView.ResetCardView(targetCard.BaseParameter); + })); + } + if (flag) + { + return parallelVfxPlayer; + } + return SequentialVfxPlayer.Create(parallelVfxPlayer, CreateUpdateDeckCountLabelVfx()); + } + + public virtual VfxBase CreateUpdateDeckCountLabelVfx() + { + return InstantVfx.Create(delegate + { + StatusPanelControl.SetDeck(DeckCardList.Count); + }); + } + + protected virtual VfxBase CreateUpdateClassInfoVfx(bool playEffect) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + StatusPanelControl.SetHandCount(HandCardList.Count); + })); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + ClassInformationUIController.ShowInfomation(playEffect); + })); + return parallelVfxPlayer; + } + + private void EvolveProcess(BattleCardBase card, bool isSkill) + { + if (!CheckNotConsumeEpCard(card)) + { + GainCurrentEpCount(card.SkillApplyInformation.GetEp()); + _gameUsedEpCount += card.SkillApplyInformation.GetEp(); + _turnUsedEpCount += card.SkillApplyInformation.GetEp(); + } + if (!isSkill) + { + _cumulativeEvolutionCount++; + } + } + + public bool UseEpCount(int count) + { + if (CurrentEpCount >= count) + { + GainCurrentEpCount(count); + _gameUsedEpCount += count; + _turnUsedEpCount += count; + return true; + } + return false; + } + + public VfxBase AddDeckTokenCards(List cards, SkillProcessor skillProcessor, string updateType, SkillBase skill, bool isOpen) + { + if (updateType == "change") + { + DeckClear(skill); + } + for (int i = 0; i < cards.Count; i++) + { + AddToDeck(cards[i], callEvent: true, skill); + } + this.OnUpdateDeck.Call(skill.SkillPrm.ownerCard, cards, IsPlayer, updateType == "change", isOpen); + return NullVfx.GetInstance(); + } + + public void CallOnChangeDeckAfterEvent(int previousCount, SkillProcessor skillProcessor, List summonCards) + { + this.OnChangeDeckAfterEvent.Call(previousCount, skillProcessor, summonCards); + } + + public void DeckClear(SkillBase skill) + { + this.OnClearDeck.Call(); + this.OnAddBlackHole.Call(DeckCardList, skill); + BlackHole.AddRange(DeckCardList); + DeckCardList.Clear(); + } + + public void AddToDeck(BattleCardBase card, bool callEvent = false, SkillBase skill = null) + { + if (callEvent) + { + this.OnAddDeckEvent.Call(card, skill); + } + DeckCardList.Add(card); + if (card.HasDeckSelfSkill) + { + AddDeckSkillCard(card); + } + if (BattleMgr.XorShiftRandom(card.IsPlayer) != null && BattleMgr.XorShiftRandom(card.IsPlayer).IsActive && BattleMgr.IsMulliganEnd) + { + AddToDeckCardList.Add(card); + } + } + + public void AddDeckSkillCard(BattleCardBase card) + { + DeckSkillCardList.Add(card); + DeckSkillCardList = DeckSkillCardList.OrderBy((BattleCardBase c) => c.Index).ToList(); + } + + public void RemoveOriginalAndAddDeckSkillCard(BattleCardBase card) + { + DeckSkillCardList.RemoveAll((BattleCardBase c) => c.Index == card.Index); + AddDeckSkillCard(card); + } + + private void AddToDeckCardIndexChange() + { + if (AddToDeckCardList.Count == 0 && _opponentBattlePlayer.AddToDeckCardList.Count == 0) + { + return; + } + if (AddToDeckCardList.Count > 0 && BattleMgr.XorShiftRandom(AddToDeckCardList.First().IsPlayer) != null && BattleMgr.XorShiftRandom(AddToDeckCardList.First().IsPlayer).IsActive && BattleMgr.IsMulliganEnd) + { + for (int i = 0; i < AddToDeckCardList.Count; i++) + { + if (AddToDeckCardList[i].IsInDeck) + { + int changeInt = BattleMgr.XorShiftRandom(AddToDeckCardList[i].IsPlayer).GetChangeInt(DeckCardList.Count()); + BattleCardBase battleCardBase = DeckCardList[changeInt]; + int index = AddToDeckCardList[i].Index; + AddToDeckCardList[i].SetIndex(battleCardBase.Index); + this.OnIndexChange.Call(index, battleCardBase.Index, IsPlayer); + battleCardBase.SetIndex(index); + DeckCardList.Sort((BattleCardBase a, BattleCardBase b) => a.Index - b.Index); + } + } + } + AddToDeckCardList.Clear(); + if (_opponentBattlePlayer.AddToDeckCardList.Count > 0) + { + _opponentBattlePlayer.AddToDeckCardIndexChange(); + } + } + + public VfxBase ReplaceInPlay(BattleCardBase originalCard, BattleCardBase newCard, SkillProcessor skillProcessor, bool isMetamorphose = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + ClassAndInPlayCardList.Insert(ClassAndInPlayCardList.IndexOf(originalCard), newCard); + ClassAndInPlayCardList.Remove(originalCard); + sequentialVfxPlayer.Register(originalCard.RemoveFromInPlay()); + sequentialVfxPlayer.Register(originalCard.RemoveFromInPlayAfter(skillProcessor)); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, new List { newCard }, skillProcessor, !isMetamorphose, null, null, isReplace: true)); + if (isMetamorphose) + { + this.OnMetamorphoseAfterEvent.Call(originalCard, newCard); + } + return sequentialVfxPlayer; + } + + public VfxBase ReplaceInHand(BattleCardBase originalCard, BattleCardBase newCard, SkillProcessor skillProcessor) + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + HandCardList.Insert(HandCardList.IndexOf(originalCard), newCard); + HandCardList.Remove(originalCard); + StartSkillWhenChangeInplaySelfHand(new List { newCard }, skillProcessor); + return result; + } + + public void RegisterSkill(IBattlePlayerSkill battlePlayerSkill) + { + _skillList.Add(battlePlayerSkill); + } + + public void UnregisterSkill(IBattlePlayerSkill battlePlayerSkill) + { + _skillList.Remove(battlePlayerSkill); + } + + private void CallSkill(Func> getFunc, BattleCardBase targetCard) + { + foreach (IBattlePlayerSkill skill in _skillList) + { + getFunc(skill)(targetCard); + } + } + + public virtual VfxBase UsePp(int pp, bool isNewReplayMoveTurn = false) + { + Pp -= pp; + AddGameUsedPp(pp); + return NullVfx.GetInstance(); + } + + public void AddGameUsedPp(int pp) + { + GameUsedPpCount += pp; + } + + public VfxBase UseBp(int bp, bool isVariableCost, bool isSelf) + { + Bp -= bp; + int bp2 = Bp; + return m_vfxCreator.CreateUseBp(bp2, bp, () => BattleView.GetBPLabelPosition(), isVariableCost, isSelf); + } + + public virtual VfxBase MoveToHand(List cardsToMoveToHand) + { + return NullVfx.GetInstance(); + } + + public virtual VfxBase MoveToDeck(List cardsToMoveToDeck) + { + return new MoveToDeckVfx(cardsToMoveToDeck, IsPlayer); + } + + protected virtual VfxWith> LotteryRandomDrawCard(int drawCount, SkillProcessor skillProcessor) + { + List list = new List(); + if (CheckShortageDeck(drawCount, skillProcessor, out var _)) + { + return new VfxWith>(SendShortageDeck(), list); + } + if (BattleManagerBase.IsRandomDraw) + { + list = SkillRandomSelectFilter.Filtering(drawCount, DeckCardList, BattleMgr).ToList(); + } + else + { + int num = Math.Min(drawCount, DeckCardList.Count); + for (int i = 0; i < num; i++) + { + list.Add(DeckCardList[i]); + } + } + return new VfxWith>(NullVfx.GetInstance(), list); + } + + public VfxWith> RandomCardDraw(int drawCount, SkillProcessor skillProcessor) + { + VfxWith> vfxWith = LotteryRandomDrawCard(drawCount, skillProcessor); + VfxWith> vfxWith2 = DrawCards(vfxWith.Value, skillProcessor); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(vfxWith2.Vfx); + sequentialVfxPlayer.Register(vfxWith.Vfx); + return new VfxWith>(sequentialVfxPlayer, vfxWith2.Value); + } + + public VfxWith> DrawManagement(List drawCards, SkillProcessor skillProcessor, bool isVisible, bool shortageDeck, SkillBase.SkillResultInfo resultInfo, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + VfxWith> vfxWith = DrawCards(drawCards, skillProcessor, isVisible, isMulligan: false, isToken: false, skill != null, skill, isReservation: false, resultInfo); + if (vfxWith.Value.Count() <= 0 && !shortageDeck) + { + resultInfo.drawCards = new List(); + return new VfxWith>(NullVfxWithLoading.GetInstance(), new List()); + } + if (resultInfo != null) + { + resultInfo.drawCards = ConvertToSkillInfoCollection(vfxWith.Value); + } + if (IsPlayer || GameMgr.GetIns().IsAdminWatch || isVisible || BattleMgr is SingleBattleMgr) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + foreach (BattleCardBase card in drawCards) + { + int cost = card.Cost; + List costList = card.BattleCardView.GetUseCostList(card.Cost); + bool isInHand = card.IsInHand; + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + if (card.BaseCost != cost) + { + card.BattleCardView.UpdateCost(costList, isGenerateInHand: true, playEffect: true, isInHand); + } + })); + } + sequentialVfxPlayer.Register(parallelVfxPlayer); + } + if (IsPlayer) + { + sequentialVfxPlayer.Register(new PlayerDrawCardVfx(drawCards, isVisible)); + sequentialVfxPlayer.Register(new PlayerEndDrawVfx(drawCards)); + } + else + { + if (!(GameMgr.GetIns().IsAdminWatch && isVisible)) + { + sequentialVfxPlayer.Register(new OpponentDrawCardVfx(drawCards, isVisible)); + } + sequentialVfxPlayer.Register(new OpponentDrawCardToHandVfx(drawCards, 0.4f, isVisible)); + } + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + vfxWithLoadingSequential.RegisterToMainVfx(InstantVfx.Create(delegate + { + foreach (BattleCardBase drawCard in drawCards) + { + drawCard.BattleCardView.HideCanPlayEffect(); + } + })); + vfxWithLoadingSequential.RegisterToMainVfx(vfxWith.Vfx); + vfxWithLoadingSequential.RegisterToMainVfx(sequentialVfxPlayer); + if (shortageDeck) + { + vfxWithLoadingSequential.RegisterToMainVfx(SendShortageDeck()); + } + vfxWithLoadingSequential.RegisterToMainVfx(InstantVfx.Create(delegate + { + UpdateHandCardsPlayability(); + })); + return new VfxWith>(vfxWithLoadingSequential, vfxWith.Value); + } + + public VfxWith> DrawCards(IEnumerable drawList, SkillProcessor skillProcessor, bool isOpen = false, bool isMulligan = false, bool isToken = false, bool isSkillDraw = false, SkillBase skill = null, bool isReservation = false, SkillBase.SkillResultInfo skillResultInfo = null, int tokenDrawSkillId = -1) + { + if (skillResultInfo != null) + { + skillResultInfo.drewOverHandLimitCards = new List(); + } + if (!drawList.Any()) + { + return new VfxWith>(NullVfx.GetInstance(), drawList); + } + int count = DeckCardList.Count; + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + ParallelVfxPlayer parallelVfxPlayer2 = ParallelVfxPlayer.Create(); + foreach (BattleCardBase card in drawList) + { + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + List list = new List(); + list.Add(card); + bool num = HandCardList.Count >= 9; + if (num) + { + list.RemoveAt(0); + this.OnAddCemeteryEvent.Call(card, CEMETERY_TYPE.DECK_DRAW_HAND_OVER, isOpen, skill); + CemeteryList.Add(card); + skillConditionCheckerOption.DrewOverHandLimitCards.Add(card); + skillResultInfo?.drewOverHandLimitCards.Add(card); + BattleMgr.VfxMgr.RegisterImmediateVfx(this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults()); + int cost = card.Cost; + List costList = card.BattleCardView.GetUseCostList(card.Cost); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + if (card.BaseCost != cost) + { + card.BattleCardView.UpdateCost(costList, isGenerateInHand: true, playEffect: true, isForceUpdate: true); + } + })); + } + skillConditionCheckerOption.InHandCard = ConvertToSkillInfoCollection(list); + parallelVfxPlayer.Register(DrawCard(card, skill, isOpen, isToken, isReservation)); + parallelVfxPlayer2.Register(card.StartHandEffect()); + if (!isMulligan) + { + StartSkillWhenChangeInplaySelfHand(new List { card }, skillProcessor); + } + if (!num) + { + StartSkillWhenAddToHand(skillProcessor, skillConditionCheckerOption); + } + } + if (!isToken) + { + CallOnChangeDeckAfterEvent(count, skillProcessor, new List()); + } + sequentialVfxPlayer.Register(SequentialVfxPlayer.Create(parallelVfxPlayer, parallelVfxPlayer2)); + if (!isMulligan) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + SkillConditionCheckerOption skillConditionCheckerOption2 = new SkillConditionCheckerOption(); + if (skill != null) + { + DrewSkillCard = skill.SkillPrm.ownerCard; + } + List list2 = new List(); + List list3 = new List(); + if (isToken) + { + list2.AddRange(drawList); + skillConditionCheckerOption2.TokenDrewCards.AddRange(list2); + } + else + { + list3.AddRange(drawList); + skillConditionCheckerOption2.DeckDrewCards.AddRange(list3); + } + foreach (BattleCardBase item in drawList.Where((BattleCardBase c) => c.IsInHand)) + { + skillProcessor.Register(item.Skills.CreateWhenDraw(skillProcessor, playerInfoPair, skillConditionCheckerOption2)); + item.DrawTurn = ((item.SelfBattlePlayer.IsSelfTurn && !BattleMgr.IsTurnEnd) ? item.SelfBattlePlayer.Turn : (item.SelfBattlePlayer.Turn + 1)); + } + if (!IsPlayer) + { + IEnumerable enumerable = drawList.Where((BattleCardBase c) => c.Skills.Any((SkillBase s) => s.OnWhenDraw != 0 && s.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessOpenCard))); + foreach (BattleCardBase item2 in enumerable) + { + item2.LastDrawOpenCard = enumerable.LastOrDefault(); + } + } + List list4 = new List(HandCardList); + list4.AddRange(ClassAndInPlayCardList); + foreach (BattleCardBase item3 in list4.Where((BattleCardBase c) => !drawList.Contains(c))) + { + SkillProcessor.ProcessInfo info = item3.Skills.CreateWhenDrawOther(list3, list2, skillProcessor, new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer), isSkillDraw); + skillProcessor.Register(info); + } + if (!isToken) + { + int count2 = TurnDrawCards.Count; + TurnDrawCards.AddRange(drawList); + GameDrawCards.AddRange(drawList); + this.OnDrawCards.Call(count2, TurnDrawCards.Count, drawList.ToList(), this, isOpen); + } + else + { + GameDrawTokenCards.AddRange(drawList); + if (tokenDrawSkillId != -1) + { + for (int num2 = 0; num2 < drawList.Count(); num2++) + { + TurnDrawTokenCardsWithId.Add(new CardAndId(drawList.ElementAt(num2), tokenDrawSkillId)); + } + } + } + } + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + vfxWithLoadingSequential.RegisterVfxWithLoading(VfxWithLoading.Create(BattleMgr.LoadCardResources(drawList.ToList()))); + vfxWithLoadingSequential.RegisterToMainVfx(sequentialVfxPlayer); + return new VfxWith>(vfxWithLoadingSequential, drawList); + } + + public bool CheckShortageDeck(int drawNum, SkillProcessor skillProcessor, out bool isActiveChangeShortageDeck) + { + bool flag = drawNum > DeckCardList.Count; + isActiveChangeShortageDeck = false; + if (!IsChangeShortageDeck) + { + IsShortageDeck = flag; + return IsShortageDeck; + } + if (IsChangeShortageDeck && flag) + { + StartSkillWhenShortageDeck(skillProcessor); + isActiveChangeShortageDeck = true; + } + return false; + } + + public void CallRecordingMulliganStart(List cards) + { + this.OnMulliganStart.Call(this, cards); + } + + public virtual VfxBase CallRecordingMulligan(IList abandonCards, IList completeCards) + { + this.OnMulliganEnd.Call(abandonCards, completeCards); + return NullVfx.GetInstance(); + } + + protected virtual void PlayerActive() + { + } + + public virtual void UpdateHandCardsPlayability(bool areArrowsForcedOff = false) + { + } + + public VfxBase UpdateHandCardsCost(bool playEffect = true, bool isOnlyFixedUseCost = false) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + int i = 0; + for (int count = HandCardList.Count; i < count; i++) + { + parallelVfxPlayer.Register(HandCardList[i].CalcHandCost(playEffect, isOnlyFixedUseCost)); + } + return parallelVfxPlayer; + } + + public void ApplyFixedUseCostInfo() + { + HandParameter.IconLayout currentIconLayout = BattleCardView.GetCurrentIconLayout(); + HandControl.ArrangeType type = (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.FIXEDUSE_COST_INFO) ? HandControl.ArrangeType.Flat : HandControl.ArrangeType.Fan); + NetworkBattleManagerBase networkBattleMgr = BattleManagerBase.GetIns() as NetworkBattleManagerBase; + UpdateHandCostViewStrategy(); + InitHandParameterIconPos(currentIconLayout); + BattleView.HandView.ChangeArrangeType(type); + if (networkBattleMgr != null && networkBattleMgr.IsSkillSelectTiming) + { + BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(UpdateHandCardsCost(playEffect: false, isOnlyFixedUseCost: true), WaitEventVfx.Create(() => !networkBattleMgr.IsSkillSelectTiming), UpdateHandCardsCost(playEffect: false))); + } + else + { + BattleMgr.VfxMgr.RegisterImmediateVfx(UpdateHandCardsCost(playEffect: false)); + } + } + + private void UpdateHandCostViewStrategy() + { + int i = 0; + for (int count = HandCardList.Count; i < count; i++) + { + HandCardList[i].UpdateCostViewStrategy(); + } + } + + public void InitHandParameterIconPos(HandParameter.IconLayout layout) + { + int i = 0; + for (int count = HandCardList.Count; i < count; i++) + { + HandCardList[i].InitHandParameterIconPos(layout); + } + } + + public VfxWithLoadingSequential AddSpellChargeCountVfx(List targetCardList, List addCountList) + { + List list = new List(); + List list2 = new List(); + List list3 = new List(); + for (int i = 0; i < targetCardList.Count; i++) + { + BattleCardBase battleCardBase = targetCardList[i]; + int num = addCountList[i]; + battleCardBase.AddSpellChargeCount(num); + if ((!battleCardBase.IsPlayer && !GameMgr.GetIns().IsAdminWatch) || battleCardBase.IsInDeck) + { + continue; + } + for (int j = 0; j < num; j++) + { + list.Add(battleCardBase); + if (num >= Skill_spell_charge.SPELL_CHARGE_SUMMARY_COUNT) + { + list2.Add(num); + list3.Add(Skill_spell_charge.SPELL_CHARGE_SUMMARY_INTERVAL); + break; + } + list2.Add(1); + list3.Add(Skill_spell_charge.SPELL_CHARGE_INTERVAL); + } + } + return new SpellChargeSkillActivationVfx(list, list2, list3); + } + + public abstract EffectBattle GetSkillEffect(string skillEffectPath); + + public abstract Vector3 GetFieldCenterPosition(); + + public void StartSkillWhenChangeInplaySelfHand(List inHandCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + cardsOrderBySkillActivation[i].Skills.CreateAndRegisterWhenChangeInplaySelfhandInfo(inHandCards, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2); + } + } + + public VfxBase StartSkillWhenChangeInplay(List inHandCards, List inPlayCards, SkillProcessor skillProcessor, bool isSummonCheck = true, Func inplayCheckFunc = null, SkillConditionCheckerOption option = null, bool isReplace = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + if (inPlayCards != null && !isReplace && isSummonCheck) + { + sequentialVfxPlayer.Register(this.OnAfterSummonCardEvent.GetAllFuncVfxResults(skillProcessor, inPlayCards)); + } + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true); + List cardsOrderBySkillActivation2 = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: true, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation2.Count; i++) + { + sequentialVfxPlayer.Register(cardsOrderBySkillActivation2[i].Skills.RegisterAndProcessWhenChangeInplayImmediateInfo((cardsOrderBySkillActivation2[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2)); + } + for (int j = 0; j < cardsOrderBySkillActivation.Count; j++) + { + cardsOrderBySkillActivation[j].Skills.CreateAndRegisterWhenChangeInplaySelfhandInfo(inHandCards, skillProcessor, (cardsOrderBySkillActivation[j].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2); + } + for (int k = 0; k < cardsOrderBySkillActivation2.Count; k++) + { + cardsOrderBySkillActivation2[k].Skills.CreateAndRegisterWhenChangeInplayInfo(inPlayCards, skillProcessor, (cardsOrderBySkillActivation2[k].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2, isSummonCheck, inplayCheckFunc, option); + } + return sequentialVfxPlayer; + } + + public VfxBase StartSkillWhenChangeClassLife(SkillProcessor skillProcessor) + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true); + List cardsOrderBySkillActivation2 = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: false, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + cardsOrderBySkillActivation[i].Skills.CreateAndRegisterWhenChangeClassLifeSelfHandInfo(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2); + } + for (int j = 0; j < cardsOrderBySkillActivation2.Count; j++) + { + cardsOrderBySkillActivation2[j].Skills.CreateAndRegisterWhenChangeClassLifeInplayInfo(skillProcessor, (cardsOrderBySkillActivation2[j].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2); + } + return result; + } + + public VfxBase StartSkillWhenChangePPTotal(SkillProcessor skillProcessor) + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: false, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + cardsOrderBySkillActivation[i].Skills.CreateAndRegisterWhenChangePPTotalInfo(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2); + } + return result; + } + + public void StartSkillWhenAddToHand(SkillProcessor skillProcessor, SkillConditionCheckerOption option) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, BattleMgr is SingleBattleMgr, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + cardsOrderBySkillActivation[i].Skills.CreateAndRegisterWhenAddToHandInfo(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, option); + } + } + + public void StartSkillWhenDestroyOther(BattleCardBase destroyCard, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: true, containsHand: false, containsClass: false, containsInplay: false, containsDeck: false, (BattleCardBase card) => card != destroyCard); + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenDestroyOtherInfo(destroyCard, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + } + + public void StartSkillWhenReturnOther(BattleCardBase returnedCard, SkillProcessor skillProcessor, List cantAttackAllReturnCards) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: false, (BattleCardBase card) => card != returnedCard); + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenReturnOtherInfo(returnedCard, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, cantAttackAllReturnCards)); + } + } + + public void StartSkillWhenReturnSkillActivate(List returnedCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenReturnSkillActivateInfo(returnedCards, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + } + + public VfxBase StartSkillWhenPlayOtherEnhanceAndAccelerateAndCrystallize(BattleCardBase playedCard, bool isEnhance, SkillProcessor skillProcessor) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + if (playedCard.IsChoiceBraveSkillCard) + { + return parallelVfxPlayer; + } + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + foreach (BattleCardBase item in SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: true, containsHand: false, containsClass: false, containsInplay: false, containsDeck: false, (BattleCardBase card) => card != playedCard)) + { + foreach (SkillBase skill in item.Skills) + { + VfxWith vfxWith = item.Skills.CreateWhenPlayOtherEnhanceAndAccelerateAndCrystallizeInfo(skill, playedCard, isEnhance ? playedCard : null, skillProcessor, (item.SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2); + skillProcessor.Register(vfxWith.Value); + parallelVfxPlayer.Register(vfxWith.Vfx); + } + } + return parallelVfxPlayer; + } + + public VfxBase StartSkillWhenSummonOther(BattleCardBase summonedCard, SkillProcessor skillProcessor, bool isReanimate = false, List ignoreCheckCard = null) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: false, (BattleCardBase card) => ignoreCheckCard == null || ignoreCheckCard.Count == 0 || !ignoreCheckCard.Contains(card)); + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + if (cardsOrderBySkillActivation[num] != summonedCard) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenSummonOtherInfo(summonedCard, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, isReanimate)); + } + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenSummonSelfAndOtherInfo(summonedCard, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, isReanimate)); + } + return NullVfx.GetInstance(); + } + + public void StartSkillWhenFusionOther(List fusionIngredientCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = new List(); + list.AddRange(ClassAndInPlayCardList); + foreach (BattleCardBase item in list) + { + skillProcessor.Register(item.Skills.CreateWhenFusionOtherInfo(skillProcessor, playerInfoPair, fusionIngredientCards)); + } + } + + public void StartSkillWhenUseEpSelfAndOther(SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenUseEpSelfAndOtherInfo(skillProcessor, playerInfoPair)); + } + } + + public VfxBase StartSkillWhenHealingSelfAndOther(List healingCards, SkillProcessor skillProcessor, List healAmountList) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true); + if (cardsOrderBySkillActivation.Any()) + { + TurnAndIntValue turnAndIntValue = TurnWhenHealingCount.FirstOrDefault((TurnAndIntValue t) => t.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && t.Turn == Turn); + if (turnAndIntValue != null) + { + turnAndIntValue.Increment(); + } + else + { + TurnWhenHealingCount.Add(new TurnAndIntValue(1, Turn, BattleMgr.BattlePlayer.IsSelfTurn)); + } + } + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenHealingSelfAndOtherInfo(healingCards, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, healAmountList)); + } + return NullVfx.GetInstance(); + } + + public VfxBase StartSkillWhenDamageSelfAndOther(SkillBase skill, List damageCards, SkillProcessor skillProcessor, int defDamage, int fixedDamage) + { + if (damageCards != null) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenDamageSelfAndOtherInfo(skill, damageCards, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, defDamage, fixedDamage)); + } + } + return NullVfx.GetInstance(); + } + + public void StartSkillWhenBurialRiteOther(BattleCardBase burialRiteCard, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: true, containsInplay: true, containsDeck: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenBurialRiteOther(burialRiteCard, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + } + + public void StartSkillWhenBanishOther(BattleCardBase banishedCard, SkillProcessor skillProcessor, bool isInplay) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenBanishOther(banishedCard, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, isInplay)); + } + } + + public void StartSkillWhenUseWhiteRitualStack(SkillProcessor skillProcessor, SkillConditionCheckerOption checkerOption) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = HandCardList.ToList(); + list.AddRange(ClassAndInPlayCardList); + list.AddRange(DeckSkillCardList); + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenUseWhiteRitualStackInfo(skillProcessor, playerInfoPair, checkerOption)); + } + } + + public void StartSkillWhenResonanceStart(SkillProcessor skillProcessor, List SummonCardList) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = HandCardList.ToList(); + list.AddRange(ClassAndInPlayCardList); + list.AddRange(DeckSkillCardList); + for (int i = 0; i < list.Count; i++) + { + BattleCardBase card = list[i]; + if (!SummonCardList.Any((BattleCardBase s) => s == card)) + { + skillProcessor.Register(card.Skills.CreateWhenResonanceStart(skillProcessor, playerInfoPair)); + } + } + } + + public VfxBase StartSkillWhenPpHealing(SkillProcessor skillProcessor) + { + List list = ClassAndInPlayCardList.ToList(); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenPpHealingInfo(skillProcessor, playerInfoPair)); + } + return NullVfx.GetInstance(); + } + + public void StartSkillWhenBuffDebuffSelfAndOther(IEnumerable targetCards, IEnumerable inplayTargetCards, SkillProcessor skillProcessor) + { + if (targetCards.Count() != 0) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = ClassAndInPlayCardList.ToList(); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + List inplayDebuffingCards = (skillConditionCheckerOption.InplayBuffingCards = ConvertToSkillInfoCollection(inplayTargetCards)); + skillConditionCheckerOption.InplayDebuffingCards = inplayDebuffingCards; + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenBuffDebuffSelfAndOtherInfo(skillProcessor, playerInfoPair, skillConditionCheckerOption)); + } + } + } + + public void StartSkillWhenBuffSelfAndOther(IEnumerable buffingCards, IEnumerable inplayBuffingCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = ClassAndInPlayCardList.ToList(); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.InplayBuffingCards = ConvertToSkillInfoCollection(inplayBuffingCards); + if (buffingCards.Count() > 0) + { + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenBuffSelfAndOtherInfo(skillProcessor, playerInfoPair, skillConditionCheckerOption)); + } + } + } + + public void StartSkillWhenDebuffSelfAndOther(IEnumerable debuffingCards, IEnumerable inplayDebuffingCards, SkillProcessor skillProcessor) + { + if (debuffingCards.Count() != 0) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = ClassAndInPlayCardList.ToList(); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.InplayDebuffingCards = ConvertToSkillInfoCollection(inplayDebuffingCards); + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenDebuffSelfAndOtherInfo(skillProcessor, playerInfoPair, skillConditionCheckerOption)); + } + } + } + + public void StartSkillWhenDebuffIncludeSetMaxLife(BattleCardBase debuffingCard, IEnumerable inplayDebuffingCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.InplayDebuffingCards = ConvertToSkillInfoCollection(inplayDebuffingCards); + skillProcessor.Register(debuffingCard.Skills.CreateWhenDebuffIncludeSetMaxLifeInfo(skillProcessor, playerInfoPair, skillConditionCheckerOption)); + } + + public void StartSkillWhenShortageDeck(SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + skillProcessor.Register(Class.Skills.CreateWhenShortageDeck(skillProcessor, playerInfoPair)); + } + + public void StartSkillWhenShortageDeckWinSkillActivate(List shortageDeckWinCards, SkillProcessor skillProcessor) + { + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.ShortageDeckWinCards = ConvertToSkillInfoCollection(shortageDeckWinCards); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenShortageDeckWinSkillActivate(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2, skillConditionCheckerOption)); + } + } + + public VfxBase StartSkillWhenBattleStart(SkillProcessor skillProcessor) + { + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenBattleStartInfo(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2)); + } + return skillProcessor.Process(battlePlayerPair); + } + + public static List ConvertToSkillInfoCollection(IEnumerable cards) + { + if (cards == null) + { + return new List(); + } + List list = new List(); + foreach (BattleCardBase card in cards) + { + list.Add(card); + } + return list; + } + + public static List> ConvertToSkillInfoCollectionList(List> cardsList) + { + if (cardsList == null) + { + return new List>(); + } + List> list = new List>(); + foreach (List cards in cardsList) + { + List item = cards.ToList().ConvertAll(ConvertIReadOnlyBattleCardInfo); + list.Add(item); + } + return list; + } + + public static IReadOnlyBattleCardInfo ConvertIReadOnlyBattleCardInfo(BattleCardBase card) + { + return card; + } + + public void AddLastTargetCardsList(BattleCardBase addCard) + { + if (LastTargetCardsList.Count > 0) + { + LastTargetCardsList.First().Add(addCard); + return; + } + List list = new List(); + List item = new List(); + list.Add(addCard); + LastTargetCardsList.Add(list); + _opponentBattlePlayer.LastTargetCardsList.Add(item); + } + + public List GetLastTargetCardsList(int index) + { + if (0 <= index && index < LastTargetCardsList.Count) + { + return LastTargetCardsList[index]; + } + return new List(); + } + + public void SkillsEndProcess() + { + ReturnList.Clear(); + LastTargetCardsList.Clear(); + InHandCards.Clear(); + HealingCards.Clear(); + SkillSummonedCards.Clear(); + SummonedCards.Clear(); + SkillDiscards.Clear(); + SkillBanishCards.Clear(); + DrewSkillCard = null; + OkSkillInProcess.Clear(); + LastInplayWhiteRitualStack = 0; + Class.SkillApplyInformation.ReservationAllDepriveRepeatSkill(); + } + + public void OnCallOneSkillProcess() + { + if (OnEndOneSkillProcess != null) + { + OnEndOneSkillProcess(); + OnEndOneSkillProcess = null; + } + } + + public VfxBase SendShortageDeck() + { + return this.OnShortageDeck.GetAllFuncVfxResults(); + } + + public void CopyToVirtualBase(BattlePlayerBase target, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags) + { + target._opponentBattlePlayer = virtualOpponentBattlePlayer; + target._skillList = _skillList.ToList(); + target.Pp = Pp; + target._ppTotal = _ppTotal; + target.SetCurrentEpCount(CurrentEpCount); + target.EvolveWaitTurnCount = EvolveWaitTurnCount; + target.NowTurnEvol = NowTurnEvol; + target._gameUsedEpCount = _gameUsedEpCount; + target._turnUsedEpCount = _turnUsedEpCount; + target.HandCardList = CloneCardList(HandCardList, target, virtualOpponentBattlePlayer, cloneFlags.Hand); + target.DeckCardList = CloneCardList(DeckCardList, target, virtualOpponentBattlePlayer, cloneFlags.Deck); + target.BattleStartDeckCardList = CloneCardList(BattleStartDeckCardList, target, virtualOpponentBattlePlayer, cloneFlags.Deck); + target.ClassAndInPlayCardList = CloneCardList(ClassAndInPlayCardList, target, virtualOpponentBattlePlayer, cloneFlags.InPlay); + target.CemeteryList = CloneCardList(CemeteryList, target, virtualOpponentBattlePlayer, cloneFlags.Cemetery); + if (target.ClassAndInPlayCardList.Count > 0 && target.ClassAndInPlayCardList[0] is ClassBattleCardBase) + { + target._class = target.ClassAndInPlayCardList[0]; + } + else + { + BattleCardBase battleCardBase = target.CemeteryList.FirstOrDefault((BattleCardBase c) => c is ClassBattleCardBase); + if (battleCardBase != null) + { + target._class = battleCardBase; + } + else + { + target._class = _class.VirtualClone(target, virtualOpponentBattlePlayer); + } + } + target.BanishList = CloneCardList(BanishList, target, virtualOpponentBattlePlayer, cloneFlags.Banish); + target.FusionIngredientList = CloneCardList(FusionIngredientList, target, virtualOpponentBattlePlayer, cloneFlags.FusionMaterial); + target.NecromanceZoneList = CloneCardList(NecromanceZoneList, target, virtualOpponentBattlePlayer, cloneFlags.NecromanceZone); + target.UniteList = CloneCardList(UniteList, target, virtualOpponentBattlePlayer, cloneFlags.Unite); + target.GetOnList = CloneCardList(GetOnList, target, virtualOpponentBattlePlayer, cloneFlags.GetOn); + target.SummonedCards = CloneCardList(SummonedCards, target, virtualOpponentBattlePlayer, isActualClone: true); + target.IsSelfTurn = IsSelfTurn; + target.DrewSkillCard = DrewSkillCard; + List list = new List(); + list.AddRange(target.HandCardList); + list.AddRange(target.ClassAndInPlayCardList); + list.AddRange(target.DeckCardList); + list.AddRange(target.CemeteryList); + list.AddRange(target.BanishList); + list.AddRange(target.NecromanceZoneList); + list.AddRange(target.FusionIngredientList); + list.AddRange(target.UniteList); + list.AddRange(target.GetOnList); + target.ReturnList = FindClonedIdCards(list, ReturnList); + List> list2 = new List>(); + foreach (List lastTargetCards in LastTargetCardsList) + { + list2.Add(FindClonedIdCards(list, lastTargetCards)); + } + target.LastTargetCardsList = list2; + target.InHandCards = FindClonedIdCards(list, InHandCards); + target.SkillDiscards = FindClonedIdCards(list, SkillDiscards); + target.SkillBanishCards = FindClonedIdCards(list, SkillBanishCards); + target.TurnPlayCards = FindClonedIdCards(list, TurnPlayCards); + target.TurnDrawCards = FindClonedIdCards(list, TurnDrawCards); + target.TurnDrawTokenCardsWithId = new List(); + int i; + for (i = 0; i < TurnDrawTokenCardsWithId.Count; i++) + { + target.TurnDrawTokenCardsWithId.Add(new CardAndId(list.FirstOrDefault((BattleCardBase c) => c.EquelsID(TurnDrawTokenCardsWithId[i].Card)), TurnDrawTokenCardsWithId[i].Id)); + } + target.GamePlayCards = FindClonedIdCards(list, GamePlayCards); + target.GameCrystallizedPlayCards = FindClonedIdCards(list, GameCrystallizedPlayCards); + target.OkSkillInProcess = OkSkillInProcess.ToList(); + target.GameInplayMetamorphoseCards = FindClonedIdCards(list, GameInplayMetamorphoseCards); + target.GameBurialRiteCards = FindClonedIdCards(list, GameBurialRiteCards); + target.TurnBurialRiteCards = FindClonedIdCards(list, TurnBurialRiteCards); + target.EvolvedCards = FindClonedIdCards(AllCards, EvolvedCards); + target.GameDrawCards = FindClonedIdCards(list, GameDrawCards); + target.GameDrawTokenCards = FindClonedIdCards(list, GameDrawTokenCards); + target.GameAddUpdateDeckCards = FindClonedIdCards(list, GameAddUpdateDeckCards); + target.GameLeftCards = FindClonedIdCards(list, GameLeftCards); + target.GameSuperSkyboundArtCards = FindClonedIdCards(list, GameSuperSkyboundArtCards); + List list3 = FindClonedIdCards(list, GameTurnLeftCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num = 0; num < list3.Count; num++) + { + target.GameTurnLeftCards.Add(new TurnAndCard(GameTurnLeftCards[num].Turn, GameTurnLeftCards[num].IsSelfTurn, list3[num], GameTurnLeftCards[num].IsTurnEnd)); + } + List list4 = FindClonedIdCards(list, GameSummonCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num2 = 0; num2 < list4.Count; num2++) + { + target.GameSummonCards.Add(new TurnAndCard(GameSummonCards[num2].Turn, GameSummonCards[num2].IsSelfTurn, list4[num2], GameSummonCards[num2].IsTurnEnd)); + } + for (int num3 = 0; num3 < GameSummonMomentTribe.Count; num3++) + { + target.GameSummonMomentTribe.Add(new CardAndTribe(GameSummonMomentTribe[num3].Card, GameSummonMomentTribe[num3].Tribes)); + } + for (int num4 = 0; num4 < GamePlayMomentTribe.Count; num4++) + { + target.GamePlayMomentTribe.Add(new CardAndTribe(GamePlayMomentTribe[num4].Card, GamePlayMomentTribe[num4].Tribes)); + } + for (int num5 = 0; num5 < GamePlayMomentSpellChargeCards.Count; num5++) + { + target.GamePlayMomentSpellChargeCards.Add(GamePlayMomentSpellChargeCards[num5].Card); + } + for (int num6 = 0; num6 < GameUpdateDeckMomentTribe.Count; num6++) + { + target.GameUpdateDeckMomentTribe.Add(new CardAndTribe(GameUpdateDeckMomentTribe[num6].Card, GameUpdateDeckMomentTribe[num6].Tribes)); + } + List list5 = FindClonedIdCards(list, GameReanimatedCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num7 = 0; num7 < list5.Count; num7++) + { + target.GameReanimatedCards.Add(new TurnAndCard(GameReanimatedCards[num7].Turn, GameReanimatedCards[num7].IsSelfTurn, list5[num7], GameReanimatedCards[num7].IsTurnEnd)); + } + List list6 = FindClonedIdCards(list, GameReturnedCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num8 = 0; num8 < list6.Count; num8++) + { + target.GameReturnedCards.Add(new TurnAndCard(GameReturnedCards[num8].Turn, GameReturnedCards[num8].IsSelfTurn, list6[num8], GameReturnedCards[num8].IsTurnEnd)); + } + List list7 = FindClonedIdCards(list, GameTurnPlayCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num9 = 0; num9 < list7.Count; num9++) + { + target.GameTurnPlayCards.Add(new TurnAndCard(GameTurnPlayCards[num9].Turn, GameTurnPlayCards[num9].IsSelfTurn, list7[num9], GameTurnPlayCards[num9].IsTurnEnd)); + } + List list8 = FindClonedIdCards(list, GameEnhancePlayCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num10 = 0; num10 < list8.Count; num10++) + { + target.GameEnhancePlayCards.Add(new TurnAndCard(GameEnhancePlayCards[num10].Turn, GameEnhancePlayCards[num10].IsSelfTurn, list8[num10], GameEnhancePlayCards[num10].IsTurnEnd)); + } + for (int num11 = 0; num11 < TurnPlayCardCountInfo.Count; num11++) + { + TurnAndIntValue turnAndIntValue = TurnPlayCardCountInfo[num11]; + target.TurnPlayCardCountInfo.Add(new TurnAndIntValue(turnAndIntValue.Value, turnAndIntValue.Turn, turnAndIntValue.IsSelfTurn)); + } + for (int num12 = 0; num12 < TurnFusionCountInfo.Count; num12++) + { + TurnAndIntValue turnAndIntValue2 = TurnFusionCountInfo[num12]; + target.TurnFusionCountInfo.Add(new TurnAndIntValue(turnAndIntValue2.Value, turnAndIntValue2.Turn, turnAndIntValue2.IsSelfTurn)); + } + target.extraTurnCount = extraTurnCount; + target.cardTotalNum = cardTotalNum; + for (int num13 = 0; num13 < TurnEvolveCardCountInfo.Count; num13++) + { + TurnAndIntValue turnAndIntValue3 = TurnEvolveCardCountInfo[num13]; + target.TurnEvolveCardCountInfo.Add(new TurnAndIntValue(turnAndIntValue3.Value, turnAndIntValue3.Turn, turnAndIntValue3.IsSelfTurn)); + } + target.IsShortageDeck = IsShortageDeck; + target.RallyCount = RallyCount; + target.DeckBanishCount = DeckBanishCount; + target.GameResonanceStartCount = GameResonanceStartCount; + target.TurnResonanceStartCount = TurnResonanceStartCount; + target.GameNecromanceCount = GameNecromanceCount; + target.GameUsedPpCount = GameUsedPpCount; + target.GameUsedWhiteRitualCount = GameUsedWhiteRitualCount; + target.LastInplayWhiteRitualStack = LastInplayWhiteRitualStack; + for (int num14 = 0; num14 < GameSkillReturnCardCountList.Count; num14++) + { + TurnAndIntValue turnAndIntValue4 = GameSkillReturnCardCountList[num14]; + target.GameSkillReturnCardCountList.Add(new TurnAndIntValue(turnAndIntValue4.Value, turnAndIntValue4.Turn, turnAndIntValue4.IsSelfTurn)); + } + for (int num15 = 0; num15 < GameSkillDiscardCountList.Count; num15++) + { + TurnAndIntValue turnAndIntValue5 = GameSkillDiscardCountList[num15]; + target.GameSkillDiscardCountList.Add(new TurnAndIntValue(turnAndIntValue5.Value, turnAndIntValue5.Turn, turnAndIntValue5.IsSelfTurn)); + } + for (int num16 = 0; num16 < GameSkillBuffCountList.Count; num16++) + { + TurnAndIntValue turnAndIntValue6 = GameSkillBuffCountList[num16]; + target.GameSkillBuffCountList.Add(new TurnAndIntValue(turnAndIntValue6.Value, turnAndIntValue6.Turn, turnAndIntValue6.IsSelfTurn)); + } + for (int num17 = 0; num17 < GameSkillMetamorphoseCountList.Count; num17++) + { + TurnAndIntValue turnAndIntValue7 = GameSkillMetamorphoseCountList[num17]; + target.GameSkillMetamorphoseCountList.Add(new TurnAndIntValue(turnAndIntValue7.Value, turnAndIntValue7.Turn, turnAndIntValue7.IsSelfTurn)); + } + target.GameSkillDiscardCount = GameSkillDiscardCount; + } + + private List CloneCardList(ICollection sourceCards, BattlePlayerBase virtualSelfBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, bool isActualClone) + { + if (isActualClone) + { + List list = new List(sourceCards.Count); + for (int i = 0; i < sourceCards.Count; i++) + { + list.Add(sourceCards.ElementAt(i).VirtualClone(virtualSelfBattlePlayer, virtualOpponentBattlePlayer)); + } + return list; + } + List list2 = new List(sourceCards.Count); + for (int j = 0; j < sourceCards.Count; j++) + { + list2.Add(CardCreatorBase.CreateDummyInstance()); + } + return list2; + } + + private List FindClonedIdCards(IEnumerable clonedCardList, IEnumerable findIdCardList) + { + List list = new List(); + if (findIdCardList == null) + { + return list; + } + foreach (BattleCardBase uniqId in findIdCardList) + { + if (uniqId != null) + { + BattleCardBase battleCardBase = clonedCardList.SingleOrDefault((BattleCardBase c) => c.EquelsID(uniqId)); + if (battleCardBase != null) + { + list.Add(battleCardBase); + } + } + } + return list; + } + + public bool CheckPlayableCards() + { + List handCardList = HandCardList; + for (int i = 0; i < handCardList.Count; i++) + { + if (handCardList[i].Movable(isCheckOnDraw: false, isSkipSelecting: true)) + { + return true; + } + } + return false; + } + + public bool CheckAttackableCards() + { + List inPlayCardList = InPlayCards.ToList(); + int i = 0; + while (i < inPlayCardList.Count) + { + if (inPlayCardList[i].Attackable) + { + IEnumerable source = _opponentBattlePlayer.InPlayCards.Where((BattleCardBase c) => c.IsUnit && !c.CantBeFocusedAttack(inPlayCardList[i])); + if (!inPlayCardList[i].IsCantAttackClass || source.Any()) + { + IEnumerable source2 = source.Where((BattleCardBase c) => c.SkillApplyInformation.IsGuard); + if ((!inPlayCardList[i].SkillApplyInformation.IsSkillCantAtkUnitNotHasGuard || source2.Any() || !inPlayCardList[i].IsCantAttackClass) && (!inPlayCardList[i].SkillApplyInformation.IsSkillCantAtkUnit || !source2.Any() || inPlayCardList[i].SkillApplyInformation.IsIgnoreGuard) && (!inPlayCardList[i].SkillApplyInformation.IsSkillCantAtkUnitBaseCardId || ((!source2.Any() || !source2.All((BattleCardBase c) => inPlayCardList[i].SkillApplyInformation.CantAtkUnitBaseCardIdList.Contains(c.BaseParameter.BaseCardId)) || inPlayCardList[i].SkillApplyInformation.IsIgnoreGuard) && (!source.Any() || !source.All((BattleCardBase c) => inPlayCardList[i].SkillApplyInformation.CantAtkUnitBaseCardIdList.Contains(c.BaseParameter.BaseCardId)) || !inPlayCardList[i].IsCantAttackClass)))) + { + return true; + } + } + } + int num = i + 1; + i = num; + } + return false; + } + + public bool CheckNotConsumeEpCard(BattleCardBase card) + { + foreach (BattleCardBase inPlayCard in InPlayCards) + { + if (inPlayCard.SkillApplyInformation.CheckNotConsumeEpCard(card)) + { + return true; + } + } + return false; + } + + public IEnumerable GetSpecificTurnDestroyCards(TurnPlayerInfo turnPlayerInfo) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer; + int turn = (isCheckSelf ? ins.BattlePlayer.Turn : ins.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return from c in TurnDestroyCards + where c.IsSelfTurn == isCheckSelf && c.Turn == turn + select c.Card; + } + + public VfxBase UpdateInPlayBattleCardIconLabel() + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + for (int i = 1; i < ClassAndInPlayCardList.Count; i++) + { + if (!(ClassAndInPlayCardList[i].BattleCardView.BattleCardIconAnimations == null) && ClassAndInPlayCardList[i].BattleCardView.BattleCardIconAnimations.HasInductionNumberSkill()) + { + sequentialVfxPlayer.Register(ClassAndInPlayCardList[i].BattleCardView.UpdateBattleCardIconLabelNumber(ClassAndInPlayCardList[i], ClassAndInPlayCardList[i].Skills)); + } + } + return sequentialVfxPlayer; + } + + public int GetSpecificTurnWhenHealingCount(TurnPlayerInfo turnPlayerInfo, bool isTextKeyword) + { + bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer; + if (isTextKeyword && isCheckSelf == IsPlayer && !IsSelfTurn) + { + return 0; + } + int turn = (isCheckSelf ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return TurnWhenHealingCount.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public int GetSpecificTurnSkillReturnCardCount(TurnPlayerInfo turnPlayerInfo) + { + bool isCheckSelf = turnPlayerInfo.IsSelfPlayer; + int turn = ((IsPlayer == isCheckSelf) ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return GameSkillReturnCardCountList.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public int GetSpecificTurnSkillDiscardCount(TurnPlayerInfo turnPlayerInfo) + { + bool isCheckSelf = turnPlayerInfo.IsSelfPlayer; + int turn = ((IsPlayer == isCheckSelf) ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return GameSkillDiscardCountList.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public int GetSpecificTurnEnhanceCardCount(TurnPlayerInfo turnPlayerInfo) + { + bool isSelfPlayer = turnPlayerInfo.IsSelfPlayer; + int num = ((IsPlayer == isSelfPlayer) ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + num -= turnPlayerInfo.TurnOffset; + List list = new List(); + for (int i = 0; i < GameEnhancePlayCards.Count; i++) + { + if (GameEnhancePlayCards[i].Turn == num && GameEnhancePlayCards[i].IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn) + { + list.Add(GameEnhancePlayCards[i].Card); + } + } + return list.Count; + } + + public int GetCurrentTurnPlayCount() + { + return TurnPlayCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn)?.Value ?? 0; + } + + public void AddCurrentTrunPlayCount(int count) + { + TurnAndIntValue turnAndIntValue = TurnPlayCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn); + if (turnAndIntValue != null) + { + turnAndIntValue.AddValue(count); + } + else + { + TurnPlayCardCountInfo.Add(new TurnAndIntValue(count, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + } + } + + public int GetSpecificTurnPlayCount(TurnPlayerInfo turnPlayerInfo) + { + bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer; + int turn = (isCheckSelf ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return TurnPlayCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public void AddCurrentTurnFusionCount(int count) + { + TurnAndIntValue turnAndIntValue = TurnFusionCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn); + if (turnAndIntValue != null) + { + turnAndIntValue.AddValue(count); + } + else + { + TurnFusionCountInfo.Add(new TurnAndIntValue(count, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + } + } + + public void AddCurrentEvolvePlayCount(int count) + { + TurnAndIntValue turnAndIntValue = TurnEvolveCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn); + if (turnAndIntValue != null) + { + turnAndIntValue.AddValue(count); + } + else + { + TurnEvolveCardCountInfo.Add(new TurnAndIntValue(count, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + } + } + + public int GetCurrentTurnEvolveCount() + { + return TurnEvolveCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn)?.Value ?? 0; + } + + public int GetSpecificTurnEvolveCount(TurnPlayerInfo turnPlayerInfo) + { + bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer; + int turn = (isCheckSelf ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return TurnEvolveCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public int GetAttachTurnBySkillId(string id) + { + for (int i = 0; i < Class.Skills.Count(); i++) + { + if (Class.Skills.ElementAt(i).GetAttachSkill is Skill_attach_skill skill_attach_skill && skill_attach_skill.SaveTurnSkillId == id) + { + return skill_attach_skill.AttachedTurn; + } + } + return 0; + } + + public VfxWithLoading CreateTokenSpawnVfx(BattleCardBase firstToken) + { + Color color; + switch (firstToken.Clan) + { + case CardBasePrm.ClanType.MIN: + color = Global.EFFECT_COLOR_ELF; + break; + case CardBasePrm.ClanType.ROYAL: + color = Global.EFFECT_COLOR_ROYAL; + break; + case CardBasePrm.ClanType.WITCH: + color = Global.EFFECT_COLOR_WITCH_1; + break; + case CardBasePrm.ClanType.DRAGON: + color = Global.EFFECT_COLOR_DRAGON; + break; + case CardBasePrm.ClanType.NECRO: + color = Global.EFFECT_COLOR_NECROMANCER; + break; + case CardBasePrm.ClanType.VAMPIRE: + color = Global.EFFECT_COLOR_VANPIRE; + break; + case CardBasePrm.ClanType.BISHOP: + color = Global.EFFECT_COLOR_BISHOP; + break; + case CardBasePrm.ClanType.NEMESIS: + color = Global.EFFECT_COLOR_NEMESIS; + break; + default: + color = Color.clear; + break; + } + Func getEffectSpawnPoint = () => firstToken.BattleCardView.GameObject.transform.position; + EffectBattle effectBattle = null; + SkillBase.WaitEffectLoadVfx loadingVfx = new SkillBase.WaitEffectLoadVfx("cmn_token_draw_1", EffectMgr.EngineType.SHURIKEN, "se_cmn_token_draw_1", BattleMgr.BattleResourceMgr, delegate(EffectBattle eb) + { + effectBattle = eb; + }); + DelaySetupVfx mainVfx = new DelaySetupVfx(() => new SkillEffectBattleVfx(effectBattle, firstToken.BattleCardView, BattleMgr.BattleResourceMgr, getEffectSpawnPoint, getEffectSpawnPoint, 0f, 0f, EffectMgr.MoveType.DIRECT, IsPlayer, color)); + return VfxWithLoading.Create(loadingVfx, mainVfx); + } + + public void CallOnTokenDraw(BattleCardBase owner, List drawList, List targets, bool isPlayer, bool isOpen, bool isReserved) + { + this.OnTokenDrawCards.Call(owner, drawList, targets, isPlayer, isOpen, isReserved); + } + + public void CallOnCreateReservedCards(BattleCardBase owner, List drawList, bool isPlayer) + { + this.OnCreateReservedCards.Call(owner, drawList, isPlayer); + } + + public void CallOnCostChange(BattleCardBase card, List targets, List addList, List setList, List isCostUpList, bool isHalf, bool isSpellCharge, bool isOpenCard) + { + this.OnCostChange.Call(card, targets, addList, setList, isCostUpList, isHalf, isSpellCharge, isOpenCard); + } + + public void CallOnRemoveCostChange(List targetList, bool isSpellCharge, bool isAdd) + { + this.OnRemoveCostChange.Call(targetList, isSpellCharge, isAdd); + } + + public void CallOnPowerUp(BattleCardBase card, List cards, int offense, int life, int multiplyOffense, int multiplyLife, int maxLife) + { + this.OnPowerUp.Call(card, cards, offense, life, multiplyOffense, multiplyLife, maxLife); + } + + public void CallOnPowerDownStart() + { + this.OnPowerDownStart.Call(); + } + + public void CallOnPowerDown(BattleCardBase card, List cards, int offense, int life, int maxLife, bool isSet) + { + this.OnPowerDown.Call(card, cards, offense, life, maxLife, isSet); + } + + public void CallOnDeprivePowerUp(List targetList) + { + this.OnDeprivePowerUp.Call(targetList); + } + + public void CallOnDeprivePowerDown(List targetList) + { + this.OnDeprivePowerDown.Call(targetList); + } + + public void CallOnSpellCharge(BattleCardBase card, List targets, List addList) + { + this.OnSpellCharge.Call(card, targets, addList); + } + + public void CallOnDrain(int heal) + { + this.OnDrain.Call(heal); + } + + public void CallOnSkillDamageStart(BattleCardBase card) + { + this.OnSkillDamageStart.Call(card); + } + + public void CallOnDamage(List cards, List effectTargets, List damageList) + { + this.OnDamage.Call(cards, effectTargets, damageList); + } + + public void CallOnHeal(BattleCardBase ownerCard, List cards, List healList) + { + this.OnHeal.Call(ownerCard, cards, healList); + } + + public void CallOnDiscard(List targets) + { + this.OnDiscard.Call(targets); + } + + public void CallOnSkillDestroyOrBanish(BattleCardBase card, bool isBurialRite = false, bool isOpen = false) + { + this.OnSkillDestroyOrBanish.Call(card, isBurialRite, isOpen); + } + + public void CallOnPlayVoiceOnDeath(BattleCardBase card) + { + this.OnPlayVoiceOnDeath.Call(card); + } + + public void CallOnSkillReturn() + { + this.OnSkillReturn.Call(); + } + + public void CallOnAddPp(int addPpCount, BattleCardBase card) + { + this.OnAddPp.Call(addPpCount, IsPlayer, card); + } + + public void CallOnAddBp(int addBpCount, BattleCardBase card) + { + this.OnAddBp.Call(addBpCount, IsPlayer, card); + } + + public void CallOnEpModifier(BattleCardBase card, int epCount, bool isAdd) + { + this.OnEpModifier.Call(card, epCount, IsPlayer, isAdd); + } + + public void CallOnBeforeSkillEvolve(BattleCardBase card, List targets) + { + this.OnBeforeSkillEvolve.Call(card, targets); + } + + public void CallOnEvolveMeWhenAttack(BattleCardBase card) + { + this.OnEvolveMeWhenAttack.Call(card); + } + + public void CallOnAfterSkillEvolve(List targets) + { + this.OnAfterSkillEvolve.Call(targets); + } + + public void CallOnPlayCard(BattleCardBase originalCard, BattleCardBase playCard, bool isChoiceBrave) + { + this.OnPlayCard.Call(originalCard, playCard, isChoiceBrave); + } + + public void CallOnWhenPlayEffect(SkillCollectionBase.WhenPlayEffectType whenPlayEffectType, BattleCardBase target, bool isInvoked) + { + this.OnWhenPlayEffect.Call(whenPlayEffectType, target, isInvoked); + } + + public void CallOnChantCountChange(BattleCardBase card, List targets, int changeCount) + { + this.OnChantCountChange.Call(card, targets, changeCount); + } + + public void CallOnChangeWhiteRitualStack(BattleCardBase target, int changeCount, bool isDestroy = false) + { + this.OnChangeWhiteRitualStack.Call(target, changeCount, isDestroy); + } + + public void CallOnChangeMaxAttackableCount(BattleCardBase card, List targets, int changeCount) + { + this.OnChangeMaxAttackableCount.Call(card, targets, changeCount); + } + + public void CallOnMetamorphose(BattleCardBase card, List targets, int cardId) + { + this.OnMetamorphose.Call(card, targets, cardId); + } + + public void CallOnFusionMetamorphose(int fusionMetamorphoseCardId) + { + this.OnFusionMetamorphose.Call(fusionMetamorphoseCardId); + } + + public void CallOnOpenCard(BattleCardBase card) + { + this.OnOpenCard.Call(card); + } + + public void CallOnUnite(BattleCardBase ownerCard, List targets, BattleCardBase uniteCard) + { + this.OnUnite.Call(ownerCard, targets, uniteCard); + } + + public void CallOnRemoveLatestOperationJsonData(NetworkBattleReceiver.ReplayOperationType type) + { + this.OnRemoveLatestOperationJsonData.Call(type); + } + + public void CallOnEmotion(ClassCharaPrm.EmotionType emotionType) + { + this.OnEmotion.Call(emotionType, IsPlayer); + } + + public void CallOnClearDestroyedCardList(bool isPlayer) + { + this.OnClearDestroyedCardList.Call(isPlayer); + } +} diff --git a/SVSim.BattleEngine/Engine/BattlePlayerVfxCreatorBase.cs b/SVSim.BattleEngine/Engine/BattlePlayerVfxCreatorBase.cs new file mode 100644 index 0000000..f1dfb94 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattlePlayerVfxCreatorBase.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class BattlePlayerVfxCreatorBase : IBattlePlayerVfxCreator +{ + private readonly IBattlePlayerView m_battleView; + + public BattlePlayerVfxCreatorBase(IBattlePlayerView battleView) + { + m_battleView = battleView; + } + + public VfxBase CreateUsePp(int pp, int maxPp, Vector3 labelPosition, bool newReplayMoveTurn) + { + if (newReplayMoveTurn) + { + return ParallelVfxPlayer.Create(InstantVfx.Create(delegate + { + m_battleView.StatusParentPanel.GetComponent().SetPp(pp, maxPp, newReplayMoveTurn); + })); + } + return ParallelVfxPlayer.Create(new LoadAndPlayEffectVfx("cmn_ui_cost_1", null, labelPosition, 0f), InstantVfx.Create(delegate + { + m_battleView.StatusParentPanel.GetComponent().SetPp(pp, maxPp, newReplayMoveTurn); + })); + } + + public VfxBase CreateUseBp(int bp, int deltaBp, Func getPosition, bool isVariableCost, bool isSelf) + { + if (BattleManagerBase.GetIns().IsRecovery || isVariableCost) + { + return ParallelVfxPlayer.Create(m_battleView.SetBp(bp)); + } + string fileName = ((deltaBp < 0) ? "cmn_ui_hbp_2" : "cmn_ui_hbp_1"); + if (deltaBp < 0 && isSelf) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_HBP_UP); + } + return ParallelVfxPlayer.Create(new LoadAndPlayEffectVfx(fileName, null, getPosition, 0f, BattleManagerBase.GetIns().Battle3DContainer.layer), m_battleView.SetBp(bp)); + } + + public VfxBase CreateUpdateEp(int evolCount, int evolveWaitTurnCount) + { + return new UpdateEpVfx(m_battleView, evolCount, evolveWaitTurnCount); + } + + public VfxBase CreateCardDraw(IEnumerable cards, bool isOpenDrawSkill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + foreach (BattleCardBase card in cards) + { + if (card.BaseCost != card.Cost) + { + List costList = card.BattleCardView.GetUseCostList(card.Cost); + bool isInHand = card.IsInHand; + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + card.BattleCardView.UpdateCost(costList, isGenerateInHand: true, playEffect: true, isInHand); + })); + } + } + sequentialVfxPlayer.Register(new PlayerDrawCardVfx(cards, isOpenDrawSkill)); + sequentialVfxPlayer.Register(new PlayerEndDrawVfx(cards)); + return sequentialVfxPlayer; + } +} diff --git a/SVSim.BattleEngine/Engine/BattlePlayersExtension.cs b/SVSim.BattleEngine/Engine/BattlePlayersExtension.cs new file mode 100644 index 0000000..3b5012d --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattlePlayersExtension.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using Wizard.Battle; + +public static class BattlePlayersExtension +{ + public static IEnumerable AllCards(this IEnumerable battlePlayerInfos) + { + List list = new List(); + foreach (IBattlePlayerReadOnlyInfo battlePlayerInfo in battlePlayerInfos) + { + list.Add(battlePlayerInfo.SkillInfoClass); + list.AddRange(battlePlayerInfo.SkillInfoHandCards); + list.AddRange(battlePlayerInfo.SkillInfoDeckCards); + list.AddRange(battlePlayerInfo.SkillInfoInPlayCards); + list.AddRange(battlePlayerInfo.SkillInfoCemeterys); + list.AddRange(battlePlayerInfo.SkillInfoBanishCards); + list.AddRange(battlePlayerInfo.SkillInfoNecromanceZoneCards); + } + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleResultUIController.cs b/SVSim.BattleEngine/Engine/BattleResultUIController.cs new file mode 100644 index 0000000..c784542 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleResultUIController.cs @@ -0,0 +1,916 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using LitJson; +using UnityEngine; +using Wizard; +using Wizard.Battle.Recovery; + +public class BattleResultUIController : MonoBehaviour +{ + private enum MenuDialogSelect + { + None = -1, + Button1, + ButtonClose + } + + public const string BattleResultObjectPass = "Prefab/UI/BattleResult/BattleResultUI"; + + public const string RankMatchBattleResultObjectPass = "Prefab/UI/BattleResult/RankMatchBattleResultUI"; + + public const string QuestBattleResultObjectPass = "Prefab/UI/BattleResult/QuestSpecialBattleResultUI"; + + public const string ColosseumBattleResultObjectPass = "Prefab/UI/BattleResult/ColosseumBattleResultUI"; + + public const string PLUS_STRING = "+"; + + public static readonly Color PLUS_START_COLOR = new Color32(byte.MaxValue, 192, 0, 0); + + public static readonly Color PLUS_END_COLOR = new Color32(byte.MaxValue, 192, 0, byte.MaxValue); + + public static readonly Color MINUS_START_COLOR = new Color32(128, 192, byte.MaxValue, 0); + + public const float GAUGEUP_DURATION = 0.5f; + + public const float GAUGEUP_DELAY = 0.5f; + + public const float GAUGEUP_LABEL_DURATION = 0.3f; + + public const float GAUGEUP_LABEL_MOVE_DISTANCE = 10f; + + public const float GAUGEUP_LABEL_DISAPPEAR_DURATION = 0.5f; + + public const float GAUGEUP_LABEL_DISAPPEAR_DELAY = 0.5f; + + [SerializeField] + public RankMatchBattleResult RankMatchBattleResultObject; + + [SerializeField] + public QuestSpecialBattleResult QuestBattleResultObject; + + [SerializeField] + private GameObject _battlePassResultPanel; + + [SerializeField] + private Transform _acncorNoneRoot; + + [SerializeField] + private UISprite _backGroundWithRank; + + [SerializeField] + private UISprite _backGroundNotNeedRank; + + [Header("共通")] + [SerializeField] + public UIPanel MainPanel; + + [SerializeField] + public NguiObjs ClassCharObj; + + [SerializeField] + public UITexture Bg; + + [SerializeField] + public UISprite ArcaneIn; + + [SerializeField] + public UISprite ArcaneOut; + + [SerializeField] + public UISprite ResultTitle; + + [Header("クラス情報")] + [SerializeField] + public GameObject ClassInfo; + + [SerializeField] + private ClassInfoParts _classInfoParts; + + [SerializeField] + private UITexture ClassLvImg; + + [SerializeField] + private UILabel ClassLvLabel; + + [SerializeField] + private UIGauge ClassGaugeBar; + + [SerializeField] + private ParticleSystem ClassGaugeEfc; + + [SerializeField] + public UILabel ClassExpAddLabel; + + [SerializeField] + private UILabel ClassExpNextTitle; + + [SerializeField] + private UILabel ClassExpNextLabel; + + [Header("下部ボタン")] + [SerializeField] + public UIAnchor AnchorBottom; + + [SerializeField] + public UIGrid ButtonGrid; + + [SerializeField] + public NguiObjs MissionBtnObj; + + [SerializeField] + public NguiObjs HomeBtnObj; + + [SerializeField] + public NguiObjs RetryBtnObj; + + [SerializeField] + public NguiObjs ReportBtnObj; + + [Header("タイトル画像")] + [SerializeField] + private GameObject _titleRoot; + + [SerializeField] + public UISprite TitleWin; + + [SerializeField] + public UISprite TitleLose; + + [SerializeField] + public UISprite TitleDraw; + + [SerializeField] + public UISprite TitleMatch; + + [Header("通知表示")] + [SerializeField] + public NguiObjs ResultInfo; + + [SerializeField] + private GameObject _notificationAnimationParent; + + [SerializeField] + private NotificatonAnimation _notificationAnimationPrefab; + + [SerializeField] + private UISprite _battlePassBG; + + private string _resultTypeMsg = ""; + + [SerializeField] + private GameObject m_MissionBase; + + public IDictionary DefaultPosDict = new Dictionary(); + + private int _classLv; + + private int _classLvPrev; + + private int _classLvMax; + + private int _classExp; + + private int _nowClassExp; + + private int _nextClassExp; + + private IList _missionLogList = new List(); + + private int _beforeClassExp; + + private IList _classExpList = new List(); + + private bool _isResultTutorial; + + private bool _isUsingSpecialDeck; + + private int _usingSpecialDeckClassId; + + private List _resultAssetList = new List(); + + private INextSceneSelector _nextSceneSelector; + + [NonSerialized] + public IBattleResultReporter resultReporter; + + private IResultAnimationHandler resultAnimationHandler; + + public const int MISSION_SPRITE_WIDTH = 800; + + private const int MISSION_MARGIN = 24; + + private const string MAINTENANCE_TIME_KEY = "maintenance_time"; + + private int _selectedClassId; + + private NotificatonAnimation _notificationAnimation; + + [SerializeField] + private GameObject _missionSelect; + + [SerializeField] + private GameObject _retrySelect; + + [SerializeField] + private GameObject _homeSelect; + + private const int MISSION_SELECT = 0; + + private const int RETRY_SELECT = 1; + + private const int HOME_SELECT = 2; + + public DialogBase _missionDialog; + + private MenuDialogSelect _menuDialogSelect = MenuDialogSelect.None; + + [NonSerialized] + public bool IsRewardWait; + + public bool ResultMsgWindowFlag { get; private set; } + + public bool ResultMsgReportBtnFlag { get; private set; } + + public bool IsWin { get; set; } + + public int AddClassExp { get; private set; } + + public bool IsDraw { get; private set; } + + public bool IsResultOn { get; private set; } + + public bool AlreadyResultRecovery { get; set; } + + public bool GreySpriteBGVisible + { + set + { + _battlePassBG.gameObject.SetActive(value); + } + } + + public IBattleResultReporter ResultReporter => resultReporter; + + public event Action OnResultFinish; + + private void OnDestroy() + { + VideoHostingUtil.SetHUDScene(VideoHostingUtil.HUDScene.Home); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_RESULT_BACK_1); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_RESULT_BACK_2); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_RESULT_BACK_3); + if (resultAnimationHandler != null) + { + resultAnimationHandler.Destroy(); + } + if (GameMgr.GetIns()._rankWinnerReward != null) + { + GameMgr.GetIns()._rankWinnerReward.RemoveObject(); + GameMgr.GetIns()._rankWinnerReward = null; + } + } + + private void Start() + { + _titleRoot.SetActive(value: true); + IsResultOn = false; + DefaultPosDict["ClassCharObj"] = ClassCharObj.transform.localPosition; + DefaultPosDict["ResultTitle"] = ResultTitle.transform.localPosition; + DefaultPosDict["ClassInfo"] = ClassInfo.transform.localPosition; + DefaultPosDict["ButtonGrid"] = ButtonGrid.transform.localPosition; + MainPanel.alpha = 0f; + TitleMatch.alpha = 0f; + Toolbox.AudioManager.AddCueSheet("bgm_btl_jingle", "bgm_btl_jingle.acb", "b/", "bgm_btl_jingle.awb"); + ButtonGrid.gameObject.SetActive(value: false); + IsDraw = false; + base.gameObject.SetActive(value: false); + if (RankMatchBattleResultObject != null) + { + RankMatchBattleResultObject.Init(); + } + if (QuestBattleResultObject != null) + { + QuestBattleResultObject.Init(); + } + } + + public void StartUI(bool win, BattleCamera battleCamera) + { + base.gameObject.SetActive(value: true); + if (IsResultOn) + { + return; + } + IsResultOn = true; + Toolbox.AudioManager.AddCueSheet("bgm_btl_jingle", "bgm_btl_jingle.acb", "b/", "bgm_btl_jingle.awb"); + VideoHostingUtil.SetHUDScene(VideoHostingUtil.HUDScene.BattleResult); + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + int skinId = dataMgr.GetPlayerSkinId(); + bool isEvolve = BattleManagerBase.GetIns().BattlePlayer.IsSkinEvolved; + if (!BattleManagerBase.IsTutorial) + { + if (win) + { + _resultAssetList.Add(Toolbox.ResourcesManager.GetAssetTypePath(skinId.ToString("00"), isEvolve ? ResourcesManager.AssetLoadPathType.ClassCharaEvolveWin : ResourcesManager.AssetLoadPathType.ClassCharaBaseWin)); + string text = dataMgr.GetPlayerEmotionData()[ClassCharaPrm.EmotionType.WIN].GetVoiceId(isEvolve); + if (BattleManagerBase.GetIns().IsPuzzleMgr) + { + string clearVoiceId = (BattleManagerBase.GetIns() as PuzzleBattleManager).PuzzleQuestData.ClearVoiceId; + if (!string.IsNullOrEmpty(clearVoiceId)) + { + text = clearVoiceId; + } + } + _ = isEvolve; + _resultAssetList.Add("v/vo_" + text + ".acb"); + } + else + { + _resultAssetList.Add(Toolbox.ResourcesManager.GetAssetTypePath(skinId.ToString("00"), isEvolve ? ResourcesManager.AssetLoadPathType.ClassCharaEvolveLose : ResourcesManager.AssetLoadPathType.ClassCharaBaseLose)); + _resultAssetList.Add("v/vo_" + dataMgr.GetPlayerEmotionData()[ClassCharaPrm.EmotionType.LOSE].GetVoiceId(isEvolve) + ".acb"); + } + } + if (dataMgr.IsFormatEnableBattleType()) + { + int num = PlayerStaticData.UserRankCurrentFormat(); + _resultAssetList.Add(Toolbox.ResourcesManager.GetAssetTypePath(num.ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_L)); + } + List list = new List(); + list.Add(ClassGaugeEfc.gameObject); + if (RankMatchBattleResultObject != null) + { + list.Add(RankMatchBattleResultObject.RankGaugeEfc.gameObject); + } + if (QuestBattleResultObject != null) + { + list.Add(QuestBattleResultObject.QuestPointGaugeEffect.gameObject); + } + GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list, delegate + { + GameMgr.GetIns().GetEffectMgr().InitCommonEffect("Json/EffectResultData", isBattle: true, isField: false, isBattleEffect: true, delegate + { + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(_resultAssetList, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.AddRange(_resultAssetList); + IsWin = win; + DataMgr.BattleType battleType = dataMgr.m_BattleType; + if (battleType == DataMgr.BattleType.Story && Data.SelectedStoryInfo.IsTutorialCategory) + { + _isResultTutorial = true; + _nextSceneSelector = new TutorialNextSceneSelector(this); + resultReporter = new TutorialResultReporter(); + resultAnimationHandler = new TutorialResultAnimationHandler(battleCamera); + } + else + { + ResourcesManager.AssetLoadPathType type = ((!isEvolve) ? (IsWin ? ResourcesManager.AssetLoadPathType.ClassCharaBaseWin : ResourcesManager.AssetLoadPathType.ClassCharaBaseLose) : (IsWin ? ResourcesManager.AssetLoadPathType.ClassCharaEvolveWin : ResourcesManager.AssetLoadPathType.ClassCharaEvolveLose)); + Texture mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(skinId.ToString("00"), type, isfetch: true)) as Texture; + ClassCharObj.textures[0].mainTexture = mainTexture; + _classInfoParts.InitByCharaPrm(dataMgr.GetPlayerCharaData()); + ClassLvImg.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(dataMgr.GetPlayerClassId().ToString("00"), ResourcesManager.AssetLoadPathType.ClassCharaIconLevel, isfetch: true)) as Texture; + if (battleType == DataMgr.BattleType.TwoPick) + { + _isUsingSpecialDeck = true; + if (Data.TwoPickInfo.deckInfo != null) + { + _usingSpecialDeckClassId = Data.TwoPickInfo.deckInfo.classId; + } + else + { + _usingSpecialDeckClassId = Data.BattleRecoveryInfo.chara_id; + } + } + SetResultFunc(battleCamera); + } + ResultSetupEnd(); + }); + }); + }, isBattle: true); + } + + private void SetResultFunc(BattleCamera battleCamera) + { + if (GameMgr.GetIns().IsReplayBattle) + { + _nextSceneSelector = new NullNextSceneSelector(this); + resultReporter = new RoomMatchResultReporter(); + resultAnimationHandler = new RoomMatchResultAnimationHandler(battleCamera); + return; + } + switch (GameMgr.GetIns().GetDataMgr().m_BattleType) + { + case DataMgr.BattleType.FreeBattle: + _nextSceneSelector = new NetworkMatchNextSceneSelector(this); + resultReporter = new FreeMatchResultReporter(); + resultAnimationHandler = new FreeMatchResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.RankBattle: + _nextSceneSelector = new NetworkMatchNextSceneSelector(this); + resultReporter = new RankMatchResultReporter(); + resultAnimationHandler = new RankMatchResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.Practice: + if (GameMgr.GetIns().IsPuzzleQuest) + { + _nextSceneSelector = new PracticePuzzleNextSceneSelector(this); + resultReporter = new PracticePuzzleResultReporter(); + resultAnimationHandler = new PracticeResultAnimationHandler(battleCamera); + } + else + { + _nextSceneSelector = new PracticeNextSceneSelector(this); + resultReporter = new PracticeResultReporter(); + resultAnimationHandler = new PracticeResultAnimationHandler(battleCamera); + } + break; + case DataMgr.BattleType.ColosseumNormal: + case DataMgr.BattleType.ColosseumTwoPick: + case DataMgr.BattleType.ColosseumHof: + case DataMgr.BattleType.ColosseumWindFall: + case DataMgr.BattleType.ColosseumAvatar: + _nextSceneSelector = new ArenaNextSceneSelector(this); + resultReporter = new ColosseumResultReporter(); + resultAnimationHandler = new ColosseumResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.CompetitionNormal: + case DataMgr.BattleType.CompetitionTwoPick: + _nextSceneSelector = new ArenaNextSceneSelector(this); + resultReporter = new CompetitionResultReporter(); + resultAnimationHandler = new CompetitionResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.TwoPick: + case DataMgr.BattleType.Sealed: + _nextSceneSelector = new ArenaNextSceneSelector(this); + resultReporter = new ArenaResultReporter(); + resultAnimationHandler = new ArenaResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.RoomBattle: + case DataMgr.BattleType.RoomTwoPick: + case DataMgr.BattleType.TwoPickBackdraft: + _nextSceneSelector = new NullNextSceneSelector(this); + resultReporter = new RoomMatchResultReporter(); + resultAnimationHandler = new RoomMatchResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.Story: + _nextSceneSelector = new StoryNextSceneSelector(this); + resultReporter = new StoryResultReporter(); + resultAnimationHandler = new StoryResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.Quest: + case DataMgr.BattleType.BossRushQuest: + case DataMgr.BattleType.SecretBossQuest: + _nextSceneSelector = new QuestNextSceneSelector(this); + resultReporter = new QuestResultReporter(); + resultAnimationHandler = new QuestSpecialResultAnimationHandler(battleCamera, GetComponent()); + break; + } + if (BattleManagerBase.GetIns().IsPuzzleMgr && !IsWin) + { + _nextSceneSelector = new NullNextSceneSelector(this); + } + } + + private void ResultSetupEnd() + { + _nextSceneSelector.Setup(IsWin, base.gameObject); + ClassCharObj.transform.localPosition = DefaultPosDict["ClassCharObj"] + Vector3.right * 1200f; + ResultTitle.transform.localPosition = DefaultPosDict["ResultTitle"] + Vector3.up * 500f; + ClassInfo.transform.localPosition = DefaultPosDict["ClassInfo"] + Vector3.left * 2000f; + ButtonGrid.transform.localPosition = DefaultPosDict["ButtonGrid"] + Vector3.down * 200f; + for (int i = 0; i < _missionLogList.Count; i++) + { + _missionLogList[i].gameObject.SetActive(value: false); + } + ClassCharObj.gameObject.SetActive(value: true); + ResultTitle.gameObject.SetActive(value: true); + ClassInfo.gameObject.SetActive(value: true); + ButtonGrid.gameObject.SetActive(value: true); + ArcaneIn.transform.localScale = Vector3.one * 0.01f; + ArcaneOut.transform.localScale = Vector3.one * 0.01f; + ArcaneIn.alpha = 0f; + ArcaneOut.alpha = 0f; + ClassExpAddLabel.alpha = 0f; + ResultInfo.labels[0].alpha = 0f; + ResultInfo.sprites[0].alpha = 0f; + ButtonGrid.repositionNow = true; + ClassExpNextTitle.text = Data.SystemText.Get("Battle_0205"); + Format format = Data.CurrentFormat; + if (GameMgr.GetIns().GetDataMgr().IsDipslayHighRankFormat()) + { + format = PlayerStaticData.HighRankFormat(); + } + if (format == Format.PreRotation) + { + format = Format.Rotation; + } + if (GameMgr.GetIns().IsWatchBattle) + { + resultReporter.Destroy(); + StartCoroutine(resultAnimationHandler.m_resultAnimationAgent.RunUI(this, _nextSceneSelector, IsWin)); + } + else + { + StartCoroutine(GetServerData()); + } + if (RankMatchBattleResultObject != null) + { + RankMatchBattleResultObject.ResultSetupEnd(format); + } + if (QuestBattleResultObject != null) + { + QuestBattleResultObject.ResultSetupEnd(format); + } + } + + public void SetBattlePassGauge(Action completeAction) + { + if (_battlePassResultPanel == null || !PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.BATTLE_PASS_SHOW_RESULT) || !resultReporter.IsDataExist) + { + completeAction(); + return; + } + JsonData finishResponseData = resultReporter.GetFinishResponseData(); + if (finishResponseData != null && finishResponseData["data"].Keys.Contains("battle_pass_gauge_info")) + { + BattlePassGaugeInfo battlePassGaugeInfo = new BattlePassGaugeInfo(finishResponseData["data"]["battle_pass_gauge_info"]); + if (battlePassGaugeInfo.IsMaxPoint && battlePassGaugeInfo.IsBeforeMaxPoint) + { + completeAction(); + return; + } + GreySpriteBGVisible = true; + BattlePassResultPanel component = UnityEngine.Object.Instantiate(_battlePassResultPanel, _acncorNoneRoot).GetComponent(); + component.Initialize(battlePassGaugeInfo); + component.SetPointupAnimation(completeAction); + } + else + { + completeAction(); + } + } + + public void CreateMissionList() + { + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(systemText.Get("Mission_0003")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.ScrollView.transform.DestroyChildren(); + dialogBase.ScrollView.panel.leftAnchor.absolute = 24; + dialogBase.ScrollView.panel.rightAnchor.absolute = -24; + GameObject gameObject = new GameObject("table"); + dialogBase.ScrollView.contentPivot = UIWidget.Pivot.Top; + dialogBase.AttachToScrollView(gameObject.transform); + UITable uITable = gameObject.AddComponent(); + uITable.columns = 1; + uITable.keepWithinPanel = true; + uITable.cellAlignment = UIWidget.Pivot.Center; + uITable.pivot = UIWidget.Pivot.Center; + ResourceHandler resourceHandler = base.gameObject.AddMissingComponent(); + int count = Data.MissionInfo.data.user_mission_list.Count; + for (int i = 0; i < Data.MissionInfo.data.user_mission_list.Count; i++) + { + UserMission mission = Data.MissionInfo.data.user_mission_list[i]; + GameObject obj = UnityEngine.Object.Instantiate(m_MissionBase); + obj.transform.parent = uITable.transform; + obj.transform.localPosition = Vector3.zero; + obj.transform.localScale = Vector3.one; + obj.SetActive(value: true); + obj.GetComponent().width = 800; + obj.GetComponent().SetMission(mission, resourceHandler, canChangeMissions: false, i != count - 1, displayChange: false); + } + _missionDialog = dialogBase; + StartCoroutine(ResetMissionScrollPos(dialogBase.ScrollView)); + UIManager.GetInstance().closeInSceneCenterLoading(); + } + + private IEnumerator ResetMissionScrollPos(UIScrollView scroll) + { + yield return new WaitForSeconds(0.1f); + scroll.ResetPosition(); + } + + private IEnumerator GetServerData() + { + LocalLog.AccumulateLastTraceLog("GetServerData "); + LocalLog.SendClientInfoTraceLog(delegate + { + resultReporter.Report(IsWin); + }); + while (!resultReporter.IsEnd) + { + yield return null; + } + LocalLog.AccumulateLastTraceLog("GetServerData ReporterEnd"); + if (!resultReporter.IsDataExist) + { + Toolbox.NetworkManager.NetworkUI.OpenGoToTitleErrorPopUp(Data.SystemText.Get("ErrorHeader_3502"), Data.SystemText.Get("Error_3502"), ""); + yield break; + } + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (RankMatchBattleResultObject != null) + { + RankMatchBattleResultObject.GetServerData(); + } + if (QuestBattleResultObject != null) + { + QuestBattleResultObject.GetServerData(resultReporter); + } + if (dataMgr.IsColosseumBattleType()) + { + SetBackGroundNeedBattlePoint(needBattlePoint: false); + } + GameMgr.GetIns().GetDataMgr().CacheSingleRecovryData(); + RecoveryRecordManagerBase.DeleteRecoveryFile(); + AddClassExp = resultReporter.ClassExp; + resultReporter.Destroy(); + if (!_isResultTutorial) + { + if (_isUsingSpecialDeck) + { + _selectedClassId = ((_usingSpecialDeckClassId != 0) ? _usingSpecialDeckClassId : dataMgr.GetPlayerClassId()); + } + else + { + _selectedClassId = dataMgr.GetPlayerClassId(); + } + _beforeClassExp = dataMgr.GetClassPrm(_selectedClassId).GetClassCharaExp(); + } + _classExpList.Clear(); + for (int num = 0; num < Data.Load.data._classCharaExpList.Count; num++) + { + _classExpList.Add(Data.Load.data._classCharaExpList[num].necessary_exp); + } + _classLvMax = _classExpList.Count; + SetClassExp(0, isLvUpCheck: false); + _classLvPrev = _classLv; + StartCoroutine(resultAnimationHandler.m_resultAnimationAgent.RunUI(this, _nextSceneSelector, IsWin)); + } + + public void PrepareAchievementLog() + { + if (GameMgr.GetIns().IsWatchBattle) + { + return; + } + List list = new List(); + JsonData finishResponseData = resultReporter.GetFinishResponseData(); + if (finishResponseData != null && finishResponseData["data"].Keys.Contains("maintenance_time")) + { + DateTime dateTime = DateTime.Parse(finishResponseData["data"]["maintenance_time"].ToString()); + list.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.MaintenanceOnResult, Data.SystemText.Get("System_0044", ConvertTime.ToLocal(dateTime)))); + } + if (finishResponseData != null && finishResponseData["data"].Keys.Contains("gathering_notification")) + { + string valueOrDefault = finishResponseData["data"]["gathering_notification"].GetValueOrDefault("matching_established_message", string.Empty); + if (!string.IsNullOrEmpty(valueOrDefault)) + { + list.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.GatheringMatching, valueOrDefault)); + } + } + for (int i = 0; i < resultReporter.UserMission.Count; i++) + { + list.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.Result, resultReporter.UserMission[i].achieved_message)); + } + for (int j = 0; j < resultReporter.UserAchievement.Count; j++) + { + list.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.Result, resultReporter.UserAchievement[j].achieved_message)); + } + StartCoroutine(ShowAchieveLog(list)); + } + + public void RewardCheck() + { + IsRewardWait = false; + } + + public void FinishResult() + { + this.OnResultFinish.Call(); + } + + public void SettingAddClassExpTextAnimation() + { + iTween.ValueTo(base.gameObject, iTween.Hash("from", 0, "to", AddClassExp, "time", 0.5f, "delay", 0.5f, "onstart", "StartClassExp", "onupdate", "UpdateClassExp", "oncomplete", "CompleteClassExp", "easetype", iTween.EaseType.easeOutQuad)); + bool flag = AddClassExp >= 0; + ClassExpAddLabel.text = (flag ? "+" : string.Empty) + AddClassExp; + ClassExpAddLabel.color = (flag ? PLUS_START_COLOR : MINUS_START_COLOR); + TweenAlpha.Begin(ClassExpAddLabel.gameObject, 0.3f, 1f); + iTween.MoveFrom(ClassExpAddLabel.gameObject, iTween.Hash("y", ClassExpAddLabel.transform.localPosition.y - 10f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + } + + private void StartClassExp() + { + ClassGaugeEfc.gameObject.SetActive(value: true); + ClassGaugeEfc.Play(); + } + + private void UpdateClassExp(int num) + { + SetClassExp(num, isLvUpCheck: true); + } + + public void SetClassExp(int num, bool isLvUpCheck) + { + _classExp = _beforeClassExp + num; + _classLv = GetClassLv(_classExp); + _nowClassExp = GetClassExpNow(_classExp); + _nextClassExp = Mathf.Max(0, _classExpList[_classLv - 1] - _nowClassExp); + ClassLvLabel.text = _classLv.ToString(); + ClassExpNextLabel.text = _nextClassExp.ToString(); + if (AddClassExp >= 0) + { + ClassExpAddLabel.text = ((AddClassExp - num >= 0) ? "+" : "") + (AddClassExp - num); + } + else + { + ClassExpAddLabel.text = (AddClassExp - num).ToString(); + } + ClassGaugeBar.Value = (((float)_classExpList[_classLv - 1] >= 0f) ? Mathf.Min((float)_nowClassExp / (float)_classExpList[_classLv - 1], 1f) : 1f); + if (isLvUpCheck && _classLv > _classLvPrev) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_LEVELUP); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_LVUP_1, ClassLvImg.transform.position); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_GAUGE_1, ClassGaugeBar.GetTransformGaugeStartEdge().position); + _classLvPrev = _classLv; + } + } + + private void CompleteClassExp() + { + ClassGaugeEfc.Stop(); + TweenAlpha.Begin(ClassExpAddLabel.gameObject, 0.5f, 0f).delay = 0.5f; + SetClassLvAndExp(); + } + + public void SetClassLvAndExp() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + switch (dataMgr.m_BattleType) + { + case DataMgr.BattleType.FreeBattle: + _classLv = Data.FreeMatchFinish.data.class_chara_level; + _classExp = Data.FreeMatchFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.RankBattle: + _classLv = Data.RankMatchFinish.data.class_chara_level; + _classExp = Data.RankMatchFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.Story: + _classLv = Data.StoryFinish.data.class_chara_level; + _classExp = Data.StoryFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.Practice: + _classLv = Data.PracticeFinish.data.class_chara_level; + _classExp = Data.PracticeFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.RoomBattle: + _classLv = Data.FreeMatchFinish.data.class_chara_level; + _classExp = Data.FreeMatchFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.Quest: + case DataMgr.BattleType.BossRushQuest: + case DataMgr.BattleType.SecretBossQuest: + _classLv = Data.QuestFinish.data.class_chara_level; + _classExp = Data.QuestFinish.data.class_chara_experience; + break; + } + ClassCharaPrm classPrm = dataMgr.GetClassPrm(_selectedClassId); + classPrm.SetClassCharaLv(_classLv); + classPrm.SetClassCharaExp(_classExp); + } + + private int GetClassLv(int num) + { + int num2 = 1; + int num3 = 0; + for (int i = 0; i < _classExpList.Count; i++) + { + num3 += _classExpList[i]; + if (num < num3) + { + break; + } + num2++; + } + return Mathf.Min(num2, _classLvMax); + } + + private int GetClassExpNow(int num) + { + int num2 = num; + for (int i = 0; i < _classExpList.Count && num2 >= _classExpList[i]; i++) + { + num2 -= _classExpList[i]; + } + return num2; + } + + private IEnumerator ShowAchieveLog(List paramList) + { + if (_notificationAnimation != null) + { + UnityEngine.Object.Destroy(_notificationAnimation.gameObject); + _notificationAnimation = null; + } + _notificationAnimation = NGUITools.AddChild(_notificationAnimationParent, _notificationAnimationPrefab.gameObject).GetComponent(); + yield return StartCoroutine(_notificationAnimation.Exec(paramList)); + } + + public void SetSpecialResultTypeText(string text) + { + _resultTypeMsg = text; + ResultMsgWindowFlag = true; + } + + public void SetBattleFinishConsistency() + { + IsDraw = true; + ResultMsgReportBtnFlag = true; + } + + public IEnumerator ShowSpecialResultInfo() + { + ResultInfo.labels[0].text = _resultTypeMsg; + ResultInfo.labels[0].alpha = 0f; + ResultInfo.sprites[0].alpha = 0f; + ResultInfo.labels[0].transform.localPosition = Vector3.right * 200f; + ResultInfo.sprites[0].transform.localScale = new Vector3(0.01f, 0.1f, 1f); + TweenAlpha.Begin(ResultInfo.sprites[0].gameObject, 0.2f, 1f); + iTween.ScaleTo(ResultInfo.sprites[0].gameObject, iTween.Hash("scale", new Vector3(1f, 0.1f, 1f), "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + iTween.ScaleTo(ResultInfo.sprites[0].gameObject, iTween.Hash("scale", Vector3.one, "time", 0.5f, "delay", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeOutBack)); + yield return new WaitForSeconds(0.5f); + TweenAlpha.Begin(ResultInfo.labels[0].gameObject, 0.2f, 1f); + iTween.MoveTo(ResultInfo.labels[0].gameObject, iTween.Hash("position", Vector3.zero, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + yield return new WaitForSeconds(2f); + TweenAlpha.Begin(ResultInfo.sprites[0].gameObject, 0.1f, 0f).delay = 0.2f; + TweenAlpha.Begin(ResultInfo.labels[0].gameObject, 0.1f, 0f).delay = 0.2f; + iTween.ScaleTo(ResultInfo.sprites[0].gameObject, iTween.Hash("scale", new Vector3(1f, 0.1f, 1f), "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + iTween.MoveTo(ResultInfo.labels[0].gameObject, iTween.Hash("position", Vector3.left * 200f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + } + + public void Recovery() + { + ClassInfo.SetActive(value: false); + ClassInfo.SetActive(value: true); + } + + public IEnumerator RunMatch() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RANK_UP_MACH_BEGIN); + TweenAlpha.Begin(TitleMatch.gameObject, 0.2f, 1f); + TitleMatch.transform.localScale = Vector3.one * 10f; + iTween.ScaleTo(TitleMatch.gameObject, iTween.Hash("scale", Vector3.one * 0.8f, "time", 0.2f, "easetype", iTween.EaseType.easeInQuad)); + yield return new WaitForSeconds(0.2f); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_MATCH_1, Vector3.back); + TitleMatch.transform.localScale = Vector3.one; + iTween.ScaleTo(TitleMatch.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 3f, "easetype", iTween.EaseType.linear)); + yield return new WaitForSeconds(2.5f); + TweenAlpha.Begin(TitleMatch.gameObject, 0.3f, 0f); + iTween.ScaleTo(TitleMatch.gameObject, iTween.Hash("scale", Vector3.one * 10f, "time", 0.3f, "easetype", iTween.EaseType.easeInExpo)); + yield return new WaitForSeconds(0.3f); + } + + private void Update() + { + if (_missionDialog != null) + { + MenuDialogUpdate(_missionDialog); + } + } + + private void MenuDialogUpdate(DialogBase dialog) + { + InputMgr inputMgr = GameMgr.GetIns().GetInputMgr(); + if (inputMgr.IsKeyboardCancel()) + { + _missionDialog.CloseWithoutSelect(); + _menuDialogSelect = MenuDialogSelect.None; + } + bool flag = false; + if (inputMgr.IsKeyboardLeftArrow() || inputMgr.IsKeyboardRightArrow()) + { + _menuDialogSelect = ((_menuDialogSelect == MenuDialogSelect.Button1) ? MenuDialogSelect.ButtonClose : MenuDialogSelect.Button1); + flag = true; + } + if (flag) + { + dialog.KeyboardSelectButton(DialogBase.KeyboardDialogSelect.Button1, _menuDialogSelect == MenuDialogSelect.Button1); + dialog.KeyboardSelectButton(DialogBase.KeyboardDialogSelect.CloseButton, _menuDialogSelect == MenuDialogSelect.ButtonClose); + } + if (inputMgr.IsKeyboardEnter() && _menuDialogSelect != MenuDialogSelect.None) + { + _missionDialog.CloseWithoutSelect(); + _menuDialogSelect = MenuDialogSelect.None; + } + } + + public void SetBackGroundNeedBattlePoint(bool needBattlePoint) + { + _backGroundWithRank.gameObject.SetActive(needBattlePoint); + _backGroundNotNeedRank.gameObject.SetActive(!needBattlePoint); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleSettingBaseData.cs b/SVSim.BattleEngine/Engine/BattleSettingBaseData.cs new file mode 100644 index 0000000..fdd5c18 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleSettingBaseData.cs @@ -0,0 +1,36 @@ +using LitJson; + +public class BattleSettingBaseData +{ + public int PlayerCharaId { get; } + + public int EnemyCharaId { get; } + + public int EnemyClassId { get; } + + public int EnemyAiId { get; } + + public int FieldId { get; } + + public string BgmId { get; } + + public BattleSettingBaseData(JsonData jsonData) + { + PlayerCharaId = jsonData["chara_id"].ToInt(); + EnemyCharaId = jsonData["enemy_chara_id"].ToInt(); + EnemyClassId = jsonData["enemy_class"].ToInt(); + EnemyAiId = jsonData["enemy_ai_id"].ToInt(); + FieldId = jsonData["battle3dfield_id"].ToInt(); + BgmId = GetBgmId(jsonData); + } + + private static string GetBgmId(JsonData jsonData) + { + string text = jsonData["bgm_id"].ToString(); + if (!(text == "0")) + { + return text; + } + return "NONE"; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleSettingData.cs b/SVSim.BattleEngine/Engine/BattleSettingData.cs new file mode 100644 index 0000000..0e6e4c8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleSettingData.cs @@ -0,0 +1,157 @@ +using LitJson; + +public class BattleSettingData +{ + public int DeckClassId { get; } + + public int DeckSkinId { get; } + + public int PlayerCharaId { get; } + + public string PlayerEmotionId { get; } + + public int EnemyCharaId { get; } + + public string EnemyEmotionId { get; } + + public int EnemyClassId { get; } + + public int EnemyAiId { get; } + + public int FieldId { get; } + + public string BgmId { get; } + + public BattleSettingData(JsonData jsonData, BattleSettingBaseData baseData) + { + DeckClassId = jsonData["deck_class_id"].ToInt(); + DeckSkinId = GetDeckSkinId(jsonData, DeckClassId); + PlayerCharaId = GetPlayerCharaId(jsonData, baseData.PlayerCharaId, DeckClassId); + PlayerEmotionId = GetPlayerEmotionId(jsonData, PlayerCharaId); + EnemyCharaId = baseData.EnemyCharaId; + EnemyEmotionId = GetEnemyEmotionId(jsonData, EnemyCharaId); + EnemyClassId = baseData.EnemyClassId; + EnemyAiId = baseData.EnemyAiId; + FieldId = GetFieldId(jsonData, baseData.FieldId); + BgmId = GetBgmId(jsonData, baseData.BgmId); + } + + private static int GetDeckSkinId(JsonData jsonData, int deckClassId) + { + int num = jsonData["deck_skin_id_override"].ToInt(); + if (num == 0) + { + return GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(deckClassId, isCurrentChara: false) + .skin_id; + } + return num; + } + + private static int GetPlayerCharaId(JsonData jsonData, int baseCharaId, int classId) + { + int? overridePlayerCharaId = GetOverridePlayerCharaId(jsonData); + if (overridePlayerCharaId.HasValue) + { + return overridePlayerCharaId.Value; + } + if (baseCharaId == 0) + { + return GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(classId, isCurrentChara: false) + .chara_id; + } + return baseCharaId; + } + + private static int? GetOverridePlayerCharaId(JsonData jsonData) + { + int num = jsonData["skin_id_override"].ToInt(); + if (num == 0) + { + return null; + } + return num; + } + + private static string GetPlayerEmotionId(JsonData jsonData, int charaId) + { + int? overridePlayerEmotionId = GetOverridePlayerEmotionId(jsonData); + return GetEmotionId(charaId, overridePlayerEmotionId); + } + + private static int? GetOverridePlayerEmotionId(JsonData jsonData) + { + int num = jsonData["player_emotion_override"].ToInt(); + if (num == 0) + { + return null; + } + return num; + } + + private static string GetEnemyEmotionId(JsonData jsonData, int charaId) + { + int? overrideEnemyEmotionId = GetOverrideEnemyEmotionId(jsonData); + return GetEmotionId(charaId, overrideEnemyEmotionId); + } + + private static int? GetOverrideEnemyEmotionId(JsonData jsonData) + { + int num = jsonData["enemy_emotion_override"].ToInt(); + if (num == 0) + { + return null; + } + return num; + } + + private static string GetEmotionId(int charaId, int? variationId) + { + int skin_id = GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(charaId) + .skin_id; + if (!variationId.HasValue) + { + return $"{skin_id}"; + } + return $"{skin_id}_{variationId.Value}"; + } + + private static int GetFieldId(JsonData jsonData, int baseFieldId) + { + int? overrideFieldId = GetOverrideFieldId(jsonData); + if (!overrideFieldId.HasValue) + { + return baseFieldId; + } + return overrideFieldId.Value; + } + + private static int? GetOverrideFieldId(JsonData jsonData) + { + int num = jsonData["battle3dfield_id_override"].ToInt(); + if (num == 0) + { + return null; + } + return num; + } + + private static string GetBgmId(JsonData jsonData, string baseBgmId) + { + string overrideBgmId = GetOverrideBgmId(jsonData); + if (overrideBgmId == null) + { + return baseBgmId; + } + return overrideBgmId; + } + + private static string GetOverrideBgmId(JsonData jsonData) + { + string text = jsonData["bgm_id_override"].ToString(); + if (!(text != "0")) + { + return null; + } + return text; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleStageChoiceObject.cs b/SVSim.BattleEngine/Engine/BattleStageChoiceObject.cs new file mode 100644 index 0000000..0a7a6f1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleStageChoiceObject.cs @@ -0,0 +1,36 @@ +using System; +using UnityEngine; + +public class BattleStageChoiceObject : MonoBehaviour +{ + [SerializeField] + private UIButton _button; + + [SerializeField] + private UITexture _texture; + + [SerializeField] + private GameObject _offObject; + + public Action _onButton; + + public void Init() + { + UIEventListener.Get(_button.gameObject).onClick = null; + UIEventListener uIEventListener = UIEventListener.Get(_button.gameObject); + uIEventListener.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onClick, (UIEventListener.VoidDelegate)delegate + { + _onButton(); + }); + } + + public void SettingOffSelect(bool isOff) + { + _offObject.gameObject.SetActive(isOff); + } + + public void SettingTexture(Texture texture) + { + _texture.mainTexture = texture; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleStageChoiceWindow.cs b/SVSim.BattleEngine/Engine/BattleStageChoiceWindow.cs new file mode 100644 index 0000000..70b4c79 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleStageChoiceWindow.cs @@ -0,0 +1,468 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; + +public class BattleStageChoiceWindow : MonoBehaviour +{ + public class PageData + { + public readonly GameObject Obj; + + public BattleStageChoiceObject[] StageList; + + public PageData(BattleStageChoiceObject[] stageList, GameObject obj) + { + StageList = stageList; + Obj = obj; + } + } + + public class StageData + { + public GameObject StageDataObject; + + public string TextureName; + + public StageData(GameObject obj, string textureName) + { + StageDataObject = obj; + TextureName = textureName; + } + } + + private bool _initializeEnd; + + [SerializeField] + private UIButton _leftButton; + + [SerializeField] + private UIButton _rightButton; + + [SerializeField] + private UIButton _allOffButton; + + [SerializeField] + private BoxCollider _flickCollider; + + [SerializeField] + private UIGrid _radioIconsGrid; + + [SerializeField] + private UIGrid _deckTableOriginal; + + [SerializeField] + private GameObject _deckTableRoot; + + private List _stagePageList = new List(); + + [SerializeField] + private BattleStageChoiceObject _battleTageSelectOriginal; + + [SerializeField] + private UISprite _radioIconOriginal; + + [SerializeField] + private GameObject _allOnLabel; + + [SerializeField] + private GameObject _allOffLabel; + + private int _currentPage; + + private bool _isChangePage; + + private float _timeChangePage; + + private List _radioIconClones; + + private List _pageList = new List(); + + private int _maxSelectStageNum; + + private bool _isScroll = true; + + private int _loadDoneStageTextureNum; + + private const int MAXNUM_STAGE_PER_TABLE = 9; + + private List _loadedResourceList = new List(); + + public bool[] SettingOffStageIndexs { get; private set; } + + public Action OnAllOff { get; set; } + + private void Update() + { + if (_isChangePage) + { + _timeChangePage += Time.deltaTime; + if (_timeChangePage >= 0.2f) + { + _isChangePage = false; + _timeChangePage = 0f; + } + } + } + + public IEnumerator LoadResource(Action onLoadEnd) + { + UIManager.GetInstance().createInSceneCenterLoading(); + ResourcesManager resourcesManager = Toolbox.ResourcesManager; + for (int i = 0; i < Data.Load.data.OpenBattleFieldIdList.Count; i++) + { + string path = "BattleStage_" + int.Parse(Data.Load.data.OpenBattleFieldIdList[i]).ToString("00"); + _loadedResourceList.Add(resourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.BattlePass)); + } + yield return StartCoroutine(resourcesManager.LoadAssetGroupAsync(_loadedResourceList, null)); + UIManager.GetInstance().closeInSceneCenterLoading(); + onLoadEnd.Call(); + } + + public void Initialize() + { + if (_initializeEnd) + { + return; + } + _initializeEnd = true; + PlayerPrefsWrapper.TurnOnFirsStageIfStageIdListAllOff(); + _maxSelectStageNum = Data.Load.data.OpenBattleFieldIdList.Count; + if (_maxSelectStageNum <= 9) + { + _isScroll = false; + } + else + { + _isScroll = true; + } + if (_isScroll) + { + UIEventListener uIEventListener = UIEventListener.Get(_flickCollider.gameObject); + uIEventListener.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener.onDrag, new UIEventListener.VectorDelegate(OnDragPanel)); + UIEventListener uIEventListener2 = UIEventListener.Get(_rightButton.gameObject); + uIEventListener2.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener2.onClick, (UIEventListener.VoidDelegate)delegate + { + NextPage(); + }); + UIEventListener uIEventListener3 = UIEventListener.Get(_leftButton.gameObject); + uIEventListener3.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener3.onClick, (UIEventListener.VoidDelegate)delegate + { + PrevPage(); + }); + } + UIEventListener uIEventListener4 = UIEventListener.Get(_allOffButton.gameObject); + uIEventListener4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener4.onClick, (UIEventListener.VoidDelegate)delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + if (IsAllOff()) + { + for (int i = 0; i < SettingOffStageIndexs.Length; i++) + { + SettingOffStageIndexs[i] = false; + } + _allOnLabel.gameObject.SetActive(value: false); + _allOffLabel.gameObject.SetActive(value: true); + OnAllOff(obj: false); + } + else + { + for (int j = 0; j < SettingOffStageIndexs.Length; j++) + { + SettingOffStageIndexs[j] = true; + } + _allOnLabel.gameObject.SetActive(value: true); + _allOffLabel.gameObject.SetActive(value: false); + OnAllOff(obj: true); + } + UpdateStageOffView(); + }); + _radioIconClones = new List(); + SettingOffStageIndexs = new bool[_maxSelectStageNum]; + int num = _maxSelectStageNum; + _loadDoneStageTextureNum = 0; + int num2 = 1 + num / 9; + for (int num3 = 0; num3 < num2; num3++) + { + int num4 = num; + if (num4 >= 9) + { + num4 = 9; + } + AddStageTable(num3, num4); + num -= 9; + if (num <= 0) + { + break; + } + } + if (!_isScroll) + { + _leftButton.gameObject.SetActive(value: false); + _rightButton.gameObject.SetActive(value: false); + } + for (int num5 = 0; num5 < _stagePageList.Count; num5++) + { + _stagePageList[num5].Reposition(); + } + foreach (PageData page in _pageList) + { + page.Obj.SetActive(value: false); + } + _pageList[_currentPage].Obj.SetActive(value: true); + SettingOffStageIndexs = ConvertSaveDataToStageIndexList(); + UpdateStageOffView(); + UpdateAllOnOffLabel(); + UpdateRadioButtonView(); + } + + private bool[] ConvertSaveDataToStageIndexList() + { + string[] array = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.OFF_STAGE_ID).Split(','); + bool[] array2 = new bool[_maxSelectStageNum]; + for (int i = 0; i < array.Length; i++) + { + for (int j = 0; j < _maxSelectStageNum; j++) + { + if (array[i] == Data.Load.data.OpenBattleFieldIdList[j].ToString()) + { + array2[j] = true; + break; + } + } + } + return array2; + } + + public void SaveSetting() + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.OFF_STAGE_ID, PlayerPrefsWrapper.ConvertStageIdListToSaveData(SettingOffStageIndexs)); + } + + private void UpdateStageOffView() + { + int num = 0; + foreach (PageData page in _pageList) + { + BattleStageChoiceObject[] stageList = page.StageList; + foreach (BattleStageChoiceObject battleStageChoiceObject in stageList) + { + if (SettingOffStageIndexs[num]) + { + battleStageChoiceObject.SettingOffSelect(isOff: true); + } + else + { + battleStageChoiceObject.SettingOffSelect(isOff: false); + } + num++; + } + } + } + + private void UpdateAllOnOffLabel() + { + if (IsAllOff()) + { + _allOnLabel.gameObject.SetActive(value: true); + _allOffLabel.gameObject.SetActive(value: false); + OnAllOff(obj: true); + } + else + { + _allOnLabel.gameObject.SetActive(value: false); + _allOffLabel.gameObject.SetActive(value: true); + OnAllOff(obj: false); + } + } + + private bool IsAllOff() + { + bool result = true; + for (int i = 0; i < _maxSelectStageNum; i++) + { + if (!SettingOffStageIndexs[i]) + { + result = false; + break; + } + } + return result; + } + + private void AddStageTable(int tableIndex, int createNum) + { + BattleStageChoiceObject[] array = new BattleStageChoiceObject[createNum]; + UIGrid uIGrid = UnityEngine.Object.Instantiate(_deckTableOriginal); + uIGrid.transform.parent = _deckTableRoot.transform; + uIGrid.transform.localScale = Vector3.one; + uIGrid.transform.localPosition = Vector3.zero; + int num = 0; + uIGrid.sorting = UIGrid.Sorting.Custom; + _stagePageList.Add(uIGrid); + for (int i = 0; i < createNum; i++) + { + string textureId = Data.Load.data.OpenBattleFieldIdList[_loadDoneStageTextureNum]; + BattleStageChoiceObject battleStageChoiceObject = CreateStageFrame(tableIndex * 9 + i, textureId); + _loadDoneStageTextureNum++; + uIGrid.AddChild(battleStageChoiceObject.transform); + battleStageChoiceObject.transform.localScale = Vector3.one; + battleStageChoiceObject.gameObject.name = (num + i).ToString(); + array[i] = battleStageChoiceObject; + } + if (_isScroll) + { + UISprite uISprite = UnityEngine.Object.Instantiate(_radioIconOriginal); + _radioIconClones.Add(uISprite); + _radioIconsGrid.AddChild(uISprite.transform); + uISprite.transform.localScale = Vector3.one; + } + PageData item = new PageData(array, uIGrid.gameObject); + _pageList.Add(item); + } + + private BattleStageChoiceObject CreateStageFrame(int index, string textureId) + { + BattleStageChoiceObject battleStageChoiceObject = UnityEngine.Object.Instantiate(_battleTageSelectOriginal); + battleStageChoiceObject.Init(); + UIEventListener uIEventListener = UIEventListener.Get(battleStageChoiceObject.gameObject); + uIEventListener.onPress = (UIEventListener.BoolDelegate)Delegate.Combine(uIEventListener.onPress, (UIEventListener.BoolDelegate)delegate(GameObject g, bool b) + { + StartCoroutine(PushedAnimation(g)); + }); + battleStageChoiceObject._onButton = (Action)Delegate.Combine(battleStageChoiceObject._onButton, (Action)delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + SettingOffStageIndexs[index] = !SettingOffStageIndexs[index]; + UpdateStageOffView(); + UpdateAllOnOffLabel(); + }); + ResourcesManager resourcesManager = Toolbox.ResourcesManager; + string path = "BattleStage_" + int.Parse(textureId).ToString("00"); + Texture texture = resourcesManager.LoadObject(resourcesManager.GetAssetTypePath(path, ResourcesManager.AssetLoadPathType.BattleStage, isfetch: true)); + battleStageChoiceObject.SettingTexture(texture); + UIEventListener uIEventListener2 = UIEventListener.Get(battleStageChoiceObject.gameObject); + uIEventListener2.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener2.onDrag, new UIEventListener.VectorDelegate(OnDragPanel)); + return battleStageChoiceObject; + } + + private void OnDragPanel(GameObject obj, Vector2 dir) + { + if (_isScroll) + { + if (dir.x >= 70f) + { + PrevPage(); + } + else if (dir.x <= -70f) + { + NextPage(); + } + } + } + + private void NextPage() + { + if (ChangePage(_currentPage + 1)) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + + private void PrevPage() + { + if (ChangePage(_currentPage - 1)) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + + private bool ChangePage(int newPage, bool isImmediate = false) + { + int currentPage = _currentPage; + if (_isChangePage) + { + return false; + } + int count = _radioIconClones.Count; + bool flag = false; + if (newPage < 0) + { + newPage = count - 1; + flag = true; + } + if (newPage >= count) + { + newPage = 0; + flag = true; + } + if (currentPage == newPage) + { + isImmediate = true; + } + _currentPage = newPage; + foreach (PageData page in _pageList) + { + page.Obj.SetActive(value: false); + } + _pageList[_currentPage].Obj.SetActive(value: true); + _pageList[currentPage].Obj.SetActive(value: true); + float num = ((_currentPage < currentPage) ? 1400f : (-1400f)); + if (flag) + { + num = 0f - num; + } + Vector3 pos = new Vector3(num, 0f, 0f); + Vector3 localPosition = new Vector3(0f - num, 0f, 0f); + Vector3 zero = Vector3.zero; + _pageList[_currentPage].Obj.transform.localPosition = localPosition; + TweenPosition.Begin(_pageList[currentPage].Obj, isImmediate ? 0f : 0.2f, pos); + TweenPosition.Begin(_pageList[_currentPage].Obj, isImmediate ? 0f : 0.2f, zero); + if (!isImmediate) + { + _isChangePage = true; + } + UpdateRadioButtonView(); + bool flag2; + bool active = (flag2 = _pageList.Count >= 2) || flag2; + _radioIconsGrid.gameObject.SetActive(active); + return true; + } + + private void UpdateRadioButtonView() + { + for (int i = 0; i < _radioIconClones.Count; i++) + { + if (i == _currentPage) + { + _radioIconClones[i].spriteName = _radioIconClones[i].spriteName.Replace("_off", "_on"); + } + else + { + _radioIconClones[i].spriteName = _radioIconClones[i].spriteName.Replace("_on", "_off"); + } + } + } + + private IEnumerator PushedAnimation(GameObject obj) + { + TweenScale scl = obj.GetComponent(); + if ((bool)scl) + { + scl.PlayForward(); + while (Input.GetMouseButton(0)) + { + yield return null; + } + scl.PlayReverse(); + } + } + + private void OnDestroy() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList); + _loadedResourceList = null; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleStartControl.cs b/SVSim.BattleEngine/Engine/BattleStartControl.cs new file mode 100644 index 0000000..817926b --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleStartControl.cs @@ -0,0 +1,584 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.View.Vfx; + +public class BattleStartControl : MonoBehaviour +{ + [SerializeField] + private UIPanel MainPanel; + + [SerializeField] + private UISprite BgBlack; + + [SerializeField] + private UITexture CharP; + + [SerializeField] + private UITexture CharE; + + [SerializeField] + private ClassInfoParts ClassInfoP; + + [SerializeField] + private ClassInfoParts ClassInfoE; + + [SerializeField] + private UILabel ClassNameP; + + [SerializeField] + private UILabel ClassNameE; + + [SerializeField] + private UILabel CharaNameP; + + [SerializeField] + private UILabel CharaNameE; + + [SerializeField] + private ClassInfoParts _classInfoWithSubClassP; + + [SerializeField] + private ClassInfoParts _classInfoWithSubClassE; + + [SerializeField] + private FlexibleGrid _subClassGridP; + + [SerializeField] + private FlexibleGrid _subClassGridE; + + [SerializeField] + private MyRotationParts _myRotationInfoP; + + [SerializeField] + private MyRotationParts _myRotationInfoE; + + [SerializeField] + private NguiObjs UserPanelP; + + [SerializeField] + private NguiObjs UserPanelE; + + [SerializeField] + private UISprite VsArcane; + + [SerializeField] + private UISprite VsLine; + + [SerializeField] + private UISprite VsTitle; + + [SerializeField] + private UISprite CardP; + + [SerializeField] + private UISprite CardE; + + [SerializeField] + private UILabel CardLabelP; + + [SerializeField] + private UILabel CardLabelE; + + [SerializeField] + private UILabel TurnLabel; + + private IDictionary DefaultPosDict = new Dictionary(); + + private string CardFrontSpriteName = "battle_card_marigan_00"; + + private string CardBackSpriteName = "battle_card_marigan_03"; + + public bool IsReady { get; private set; } + + public void SetUp(SBattleLoad battleLoad) + { + if (GameMgr.GetIns().IsNetworkBattle && !BattleManagerBase.GetIns().IsRecovery && !GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle) + { + StartCoroutine(CheckAbleToInitialize(battleLoad)); + } + else + { + Initialize(); + } + } + + private IEnumerator CheckAbleToInitialize(SBattleLoad battleLoad) + { + while (GameMgr.GetIns().GetNetworkUserInfoData().SelfBattleStartInfo == null || GameMgr.GetIns().GetNetworkUserInfoData().OppoBattleStartInfo == null) + { + yield return null; + } + battleLoad.LoadOpponentAssets(delegate + { + Initialize(); + }); + } + + private void Initialize() + { + MainPanel.alpha = 0f; + InitBattleStartControl(); + base.gameObject.SetActive(value: false); + IsReady = true; + } + + private void InitBattleStartControl() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + NetworkUserInfoData networkUserInfoData = GameMgr.GetIns().GetNetworkUserInfoData(); + PuzzleQuestData puzzleQuestData = null; + bool isPuzzleMgr = BattleManagerBase.GetIns().IsPuzzleMgr; + if (isPuzzleMgr) + { + puzzleQuestData = Data.Master.PuzzleQuestDataList.First((PuzzleQuestData data) => data.Id == GameMgr.GetIns().GetDataMgr().PuzzleQuestId); + } + if (GameMgr.GetIns().IsWatchBattle) + { + DegreeHelper.InitializeDegree(UserPanelP.textures[0], networkUserInfoData.GetSelfDegreeId(), DegreeHelper.DegreeType.MIDDLE); + } + else if (isPuzzleMgr) + { + DegreeHelper.InitializeDegree(UserPanelP.textures[0], puzzleQuestData.PlayerDegreeId, DegreeHelper.DegreeType.MIDDLE); + } + else + { + DegreeHelper.InitializeDegree(UserPanelP.textures[0], PlayerStaticData.UserDegreeID, DegreeHelper.DegreeType.MIDDLE); + } + int num = (GameMgr.GetIns().IsNetworkBattle ? networkUserInfoData.GetOpponentDegreeId() : (isPuzzleMgr ? puzzleQuestData.EnemyDegreeId : ((dataMgr.m_BattleType == DataMgr.BattleType.Quest) ? dataMgr.QuestBattleData.DegreeId : ((dataMgr.m_BattleType != DataMgr.BattleType.BossRushQuest && dataMgr.m_BattleType != DataMgr.BattleType.SecretBossQuest) ? dataMgr.PracticeDifficultyDegreeId : dataMgr.BossRushBattleData.DegreeId)))); + if (GameMgr.GetIns().IsNetworkBattle || (dataMgr.m_BattleType == DataMgr.BattleType.Practice && dataMgr.PracticeDifficultyDegreeId != -1) || (dataMgr.IsQuestBattleType() && num != -1)) + { + DegreeHelper.InitializeDegree(UserPanelE.textures[0], num, DegreeHelper.DegreeType.MIDDLE); + } + if (GameMgr.GetIns().IsWatchBattle) + { + UserPanelP.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (isPuzzleMgr) + { + UserPanelP.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(puzzleQuestData.PlayerEmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + PlayerStaticData.AttachUserEmblemTexture(UserPanelP.textures[1], PlayerStaticData.EmblemTexSize.M); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (isPuzzleMgr) + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(puzzleQuestData.EnemyEmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.Quest) + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(dataMgr.QuestBattleData.EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.BossRushQuest || dataMgr.m_BattleType == DataMgr.BattleType.SecretBossQuest) + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(dataMgr.BossRushBattleData.EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(100000000.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + if (GameMgr.GetIns().IsWatchBattle) + { + UIUtil.SetCountryTexture(UserPanelP.textures[2], networkUserInfoData.GetSelfCountryCode()); + } + else + { + bool flag = !string.IsNullOrEmpty(PlayerStaticData.UserCountryCode); + UserPanelP.textures[2].gameObject.SetActive(flag); + if (flag) + { + PlayerStaticData.AttachUserCountryTexture(UserPanelP.textures[2], PlayerStaticData.CountryTexSize.M); + } + else + { + UserPanelP.textures[2].mainTexture = null; + } + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UIUtil.SetCountryTexture(UserPanelE.textures[2], networkUserInfoData.GetOpponentCountryCode()); + } + else + { + UserPanelE.textures[2].gameObject.SetActive(value: false); + UserPanelE.textures[2].mainTexture = null; + } + if (GameMgr.GetIns().IsWatchBattle) + { + UserPanelP.textures[3].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfRank().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + else if (dataMgr.IsDipslayHighRankFormat()) + { + PlayerStaticData.LoadUserRankTexture(PlayerStaticData.HighRankFormat()); + PlayerStaticData.AttachUserRankTexture(UserPanelP.textures[3], PlayerStaticData.RankTexSize.S); + } + else + { + UserPanelP.textures[3].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(PlayerStaticData.UserRankCurrentFormat().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.textures[3].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentRank().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + if (GameMgr.GetIns().IsWatchBattle) + { + UserPanelP.labels[0].text = networkUserInfoData.GetSelfName(); + } + else + { + UserPanelP.labels[0].text = PlayerStaticData.UserName.ToString(); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.labels[0].text = VideoHostingUtil.GetUserNameHidden(networkUserInfoData.GetOpponentName().ToString()); + } + else + { + UserPanelE.labels[0].text = dataMgr.GetEnemyCharaData().chara_name; + } + Format inFormat = Data.CurrentFormat; + if (dataMgr.IsDipslayHighRankFormat()) + { + inFormat = PlayerStaticData.HighRankFormat(); + } + bool flag2 = dataMgr.m_BattleType == DataMgr.BattleType.RankBattle; + UILabel uILabel = UserPanelP.labels[1]; + UILabel uILabel2 = UserPanelE.labels[1]; + uILabel.gameObject.SetActive(flag2); + uILabel2.gameObject.SetActive(flag2); + if (flag2) + { + if (PlayerStaticData.IsMasterRank(inFormat)) + { + uILabel.text = PlayerStaticData.UserMasterPoint(inFormat).ToString(); + } + else + { + uILabel.text = PlayerStaticData.UserBattlePoint(inFormat).ToString(); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + if (networkUserInfoData.GetOpponentIsMasterRank()) + { + uILabel2.text = networkUserInfoData.GetOpponentMasterPoint().ToString(); + } + else + { + uILabel2.text = networkUserInfoData.GetOpponentBattlePoint().ToString(); + } + } + else + { + uILabel2.text = "0"; + } + } + bool activeOfficialUserIconSprite = (GameMgr.GetIns().IsWatchBattle ? networkUserInfoData.GetSelfIsOfficialUser() : PlayerStaticData.IsOfficialUserDisplay); + bool activeOfficialUserIconSprite2 = GameMgr.GetIns().IsNetworkBattle && networkUserInfoData.GetOpponentIsOfficialUser(); + UserPanelP.gameObject.GetComponent().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite); + UserPanelE.gameObject.GetComponent().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite2); + DefaultPosDict["UserPanelP"] = UserPanelP.transform.localPosition; + DefaultPosDict["UserPanelE"] = UserPanelE.transform.localPosition; + DefaultPosDict["CharP"] = CharP.transform.localPosition; + DefaultPosDict["CharE"] = CharE.transform.localPosition; + DefaultPosDict["ClassNameP"] = ClassNameP.transform.localPosition; + DefaultPosDict["ClassNameE"] = ClassNameE.transform.localPosition; + DefaultPosDict["CharaNameP"] = CharaNameP.transform.localPosition; + DefaultPosDict["CharaNameE"] = CharaNameE.transform.localPosition; + DefaultPosDict["CardP"] = CardP.transform.localPosition; + DefaultPosDict["CardE"] = CardE.transform.localPosition; + DefaultPosDict["TurnLabel"] = TurnLabel.transform.localPosition; + } + + public VfxBase CreateStartVfx(float waitTime) + { + if (BattleManagerBase.GetIns().IsRecovery) + { + return InstantVfx.Create(delegate + { + base.gameObject.SetActive(value: false); + }); + } + base.gameObject.SetActive(value: true); + float rot; + Vector3 p1; + Vector3 p2; + Vector3[] path; + return SequentialVfxPlayer.Create(InstantVfx.Create(delegate + { + int playerSkinId = GameMgr.GetIns().GetDataMgr().GetPlayerSkinId(); + Texture mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId.ToString("00"), ResourcesManager.AssetLoadPathType.ClassCharaBase, isfetch: true)) as Texture; + CharP.mainTexture = mainTexture; + CharP.material = null; + mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(GameMgr.GetIns().GetDataMgr().GetEnemySkinId() + .ToString("00"), ResourcesManager.AssetLoadPathType.ClassCharaBase, isfetch: true)) as Texture; + CharE.mainTexture = mainTexture; + CharE.material = null; + NetworkUserInfoData networkUserInfoData = GameMgr.GetIns().GetNetworkUserInfoData(); + _myRotationInfoP.gameObject.SetActive(value: false); + if (GameMgr.GetIns().GetDataMgr().TryGetPlayerSubClassId(out var subClassId)) + { + SetClassInfoWithSubClass(GameMgr.GetIns().GetDataMgr().GetPlayerCharaData(), networkUserInfoData.GetSelfChaosId(), subClassId, ClassInfoP, _classInfoWithSubClassP, _subClassGridP); + } + else + { + if (GameMgr.GetIns().GetDataMgr().TryGetPlayerMyRotationInfo(out var myRotationInfo)) + { + _myRotationInfoP.gameObject.SetActive(value: true); + _myRotationInfoP.SetMyRotationInfo(myRotationInfo); + _myRotationInfoP.Reposition(); + } + ClassInfoP.InitByCharaPrm(GameMgr.GetIns().GetDataMgr().GetPlayerCharaData(), networkUserInfoData.GetSelfChaosId()); + _classInfoWithSubClassP.gameObject.SetActive(value: false); + } + _myRotationInfoE.gameObject.SetActive(value: false); + if (GameMgr.GetIns().GetDataMgr().TryGetEnemySubClassId(out var subClassId2)) + { + SetClassInfoWithSubClass(GameMgr.GetIns().GetDataMgr().GetEnemyCharaData(), networkUserInfoData.GetOpponentChaosId(), subClassId2, ClassInfoE, _classInfoWithSubClassE, _subClassGridE); + } + else + { + if (GameMgr.GetIns().GetDataMgr().TryGetEnemyMyRotationInfo(out var myRotationInfo2)) + { + _myRotationInfoE.gameObject.SetActive(value: true); + _myRotationInfoE.SetMyRotationInfo(myRotationInfo2); + _myRotationInfoE.Reposition(); + } + ClassInfoE.InitByCharaPrm(GameMgr.GetIns().GetDataMgr().GetEnemyCharaData(), networkUserInfoData.GetOpponentChaosId()); + _classInfoWithSubClassE.gameObject.SetActive(value: false); + } + UserPanelP.transform.localPosition = DefaultPosDict["UserPanelP"]; + UserPanelE.transform.localPosition = DefaultPosDict["UserPanelE"]; + CharP.transform.localPosition = DefaultPosDict["CharP"]; + CharE.transform.localPosition = DefaultPosDict["CharE"]; + ClassNameP.transform.localPosition = DefaultPosDict["ClassNameP"]; + ClassNameE.transform.localPosition = DefaultPosDict["ClassNameE"]; + CharaNameP.transform.localPosition = DefaultPosDict["CharaNameP"]; + CharaNameE.transform.localPosition = DefaultPosDict["CharaNameE"]; + CardP.transform.localPosition = DefaultPosDict["CardP"] + Vector3.down * 1000f; + CardE.transform.localPosition = DefaultPosDict["CardE"] + Vector3.down * 1000f; + TurnLabel.transform.localPosition = DefaultPosDict["TurnLabel"]; + BgBlack.alpha = 0f; + CharP.alpha = 0f; + CharE.alpha = 0f; + ClassNameP.alpha = 0f; + ClassNameE.alpha = 0f; + CharaNameP.alpha = 0f; + CharaNameE.alpha = 0f; + VsArcane.alpha = 0f; + VsLine.alpha = 0f; + VsTitle.alpha = 0f; + CardP.color = Color.white; + CardE.color = Color.white; + TurnLabel.alpha = 0f; + TweenAlpha.Begin(UserPanelP.gameObject, 0f, 0f); + TweenAlpha.Begin(UserPanelE.gameObject, 0f, 0f); + VsArcane.transform.localScale = Vector3.one; + CardLabelP.text = Data.SystemText.Get("Battle_0430"); + CardLabelE.text = Data.SystemText.Get("Battle_0431"); + MainPanel.alpha = 1f; + }), InstantVfx.Create(delegate + { + TweenAlpha.Begin(VsTitle.gameObject, 0.3f, 1f); + VsTitle.transform.localScale = Vector3.one * 10f; + iTween.ScaleTo(VsTitle.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInCubic)); + }), WaitVfx.Create(0.3f), InstantVfx.Create(delegate + { + TweenAlpha.Begin(BgBlack.gameObject, 0.3f, 0.5f); + EffectMgr.EffectType type = EffectMgr.EffectType.CMN_START_VS_1; + Se.TYPE setype = Se.TYPE.BATTLE_START_VS; + DataMgr.SpecialBattleSetting specialBattleSettingInfo = GameMgr.GetIns().GetDataMgr().SpecialBattleSettingInfo; + if (specialBattleSettingInfo != null && specialBattleSettingInfo.IsVsEffectOverride) + { + type = EffectMgr.EffectType.CMN_START_VS_ST2; + setype = Se.TYPE.BATTLE_START_VS_ST2; + } + GameMgr.GetIns().GetSoundMgr().PlaySe(setype); + GameMgr.GetIns().GetEffectMgr().Start(type, Vector3.zero); + TweenAlpha.Begin(VsLine.gameObject, 0.3f, 1f); + VsLine.transform.localScale = new Vector3(0.1f, 1f, 1f); + iTween.ScaleTo(VsLine.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + TweenAlpha.Begin(VsArcane.gameObject, 0.3f, 1f); + VsArcane.transform.localRotation = Quaternion.identity; + VsArcane.transform.localScale = Vector3.one * 0.1f; + iTween.ScaleTo(VsArcane.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + iTween.RotateAdd(VsArcane.gameObject, iTween.Hash("z", 360f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(CharP.gameObject, 0.3f, 1f); + TweenAlpha.Begin(CharE.gameObject, 0.3f, 1f); + CharP.transform.localPosition = DefaultPosDict["CharP"] + Vector3.right * 500f; + CharE.transform.localPosition = DefaultPosDict["CharE"] + Vector3.left * 500f; + if (GameMgr.GetIns().GetDataMgr().GetEnemyBattleSkillReverse() == 0) + { + CharE.uvRect = new Rect(0f, 0f, 1f, 1f); + } + iTween.MoveTo(CharP.gameObject, iTween.Hash("position", DefaultPosDict["CharP"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CharE.gameObject, iTween.Hash("position", DefaultPosDict["CharE"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(ClassNameP.gameObject, 0.3f, 1f).delay = 0.1f; + TweenAlpha.Begin(ClassNameE.gameObject, 0.3f, 1f).delay = 0.1f; + ClassNameP.transform.localPosition = DefaultPosDict["ClassNameP"] + Vector3.right * 200f; + ClassNameE.transform.localPosition = DefaultPosDict["ClassNameE"] + Vector3.left * 200f; + iTween.MoveTo(ClassNameP.gameObject, iTween.Hash("position", DefaultPosDict["ClassNameP"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(ClassNameE.gameObject, iTween.Hash("position", DefaultPosDict["ClassNameE"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(CharaNameP.gameObject, 0.3f, 1f).delay = 0.1f; + TweenAlpha.Begin(CharaNameE.gameObject, 0.3f, 1f).delay = 0.1f; + CharaNameP.transform.localPosition = DefaultPosDict["CharaNameP"] + Vector3.right * 200f; + CharaNameE.transform.localPosition = DefaultPosDict["CharaNameE"] + Vector3.left * 200f; + iTween.MoveTo(CharaNameP.gameObject, iTween.Hash("position", DefaultPosDict["CharaNameP"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CharaNameE.gameObject, iTween.Hash("position", DefaultPosDict["CharaNameE"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(UserPanelP.gameObject, 0.3f, 1f); + TweenAlpha.Begin(UserPanelE.gameObject, 0.3f, 1f); + UserPanelP.transform.localPosition = DefaultPosDict["UserPanelP"] + Vector3.left * 500f; + UserPanelE.transform.localPosition = DefaultPosDict["UserPanelE"] + Vector3.right * 500f; + iTween.MoveTo(UserPanelP.gameObject, iTween.Hash("position", DefaultPosDict["UserPanelP"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(UserPanelE.gameObject, iTween.Hash("position", DefaultPosDict["UserPanelE"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + }), WaitVfx.Create(waitTime), InstantVfx.Create(delegate + { + TweenAlpha.Begin(BgBlack.gameObject, 0.3f, 0.9f); + TweenAlpha.Begin(VsTitle.gameObject, 0.3f, 0f); + iTween.ScaleTo(VsTitle.gameObject, iTween.Hash("scale", Vector3.one * 2f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(VsArcane.gameObject, 0.3f, 0f); + iTween.ScaleTo(VsArcane.gameObject, iTween.Hash("scale", Vector3.one * 5f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(ClassNameP.gameObject, 0.3f, 0f); + iTween.MoveTo(ClassNameP.gameObject, iTween.Hash("x", DefaultPosDict["ClassNameP"].x - 200f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(ClassNameE.gameObject, 0.3f, 0f); + iTween.MoveTo(ClassNameE.gameObject, iTween.Hash("x", DefaultPosDict["ClassNameE"].x + 200f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(CharaNameP.gameObject, 0.3f, 0f); + iTween.MoveTo(CharaNameP.gameObject, iTween.Hash("x", DefaultPosDict["CharaNameP"].x - 200f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(CharaNameE.gameObject, 0.3f, 0f); + iTween.MoveTo(CharaNameE.gameObject, iTween.Hash("x", DefaultPosDict["CharaNameE"].x + 200f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(UserPanelP.gameObject, 0.3f, 0f); + iTween.MoveTo(UserPanelP.gameObject, iTween.Hash("x", DefaultPosDict["UserPanelP"].x + 200f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(UserPanelE.gameObject, 0.3f, 0f); + iTween.MoveTo(UserPanelE.gameObject, iTween.Hash("x", DefaultPosDict["UserPanelE"].x - 200f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + }), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.DRAW); + CardP.spriteName = CardFrontSpriteName; + CardE.spriteName = CardFrontSpriteName; + iTween.MoveTo(CardP.gameObject, iTween.Hash("position", DefaultPosDict["CardP"], "time", 0.4f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CardE.gameObject, iTween.Hash("position", DefaultPosDict["CardE"], "time", 0.4f, "delay", 0.05f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + }), WaitVfx.Create(0.5f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_1); + iTween.MoveTo(CardP.gameObject, iTween.Hash("position", Vector3.zero, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInOutCubic)); + iTween.MoveTo(CardE.gameObject, iTween.Hash("position", Vector3.zero, "time", 0.3f, "delay", 0.05f, "islocal", true, "easetype", iTween.EaseType.easeInOutCubic)); + iTween.ScaleTo(CardP.gameObject, iTween.Hash("scale", new Vector3(0.01f, 1.2f, 1f), "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + iTween.ScaleTo(CardE.gameObject, iTween.Hash("scale", new Vector3(0.01f, 1.2f, 1f), "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + CardP.depth = 0; + CardE.depth = 2; + CardLabelP.text = ""; + CardLabelE.text = ""; + CardP.spriteName = CardBackSpriteName; + CardE.spriteName = CardBackSpriteName; + iTween.ScaleTo(CardP.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + iTween.ScaleTo(CardE.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + }), WaitVfx.Create(0.2f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_2); + rot = Random.value * 30f - 15f; + p1 = (Vector3)MotionUtils.GetPositionByAngle(rot) * 400f; + p2 = (Vector3)MotionUtils.GetPositionByAngle(rot + 180f) * 100f; + path = MotionUtils.GetBezierCubic(Vector3.zero, p1, p2, Vector3.zero, 20); + iTween.MoveTo(CardP.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.linear)); + path = MotionUtils.GetBezierCubic(Vector3.zero, p1 * -1f, p2 * -1f, Vector3.zero, 20); + iTween.MoveTo(CardE.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.linear)); + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + CardP.depth = 2; + CardE.depth = 0; + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_2); + rot = Random.value * 30f - 15f + 180f; + p1 = (Vector3)MotionUtils.GetPositionByAngle(rot) * 320f; + p2 = (Vector3)MotionUtils.GetPositionByAngle(rot + 180f) * 80f; + path = MotionUtils.GetBezierCubic(Vector3.zero, p1, p2, Vector3.zero, 20); + iTween.MoveTo(CardP.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.16f, "islocal", true, "easetype", iTween.EaseType.linear)); + path = MotionUtils.GetBezierCubic(Vector3.zero, p1 * -1f, p2 * -1f, Vector3.zero, 20); + iTween.MoveTo(CardE.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.16f, "islocal", true, "easetype", iTween.EaseType.linear)); + }), WaitVfx.Create(0.08f), InstantVfx.Create(delegate + { + CardP.depth = 0; + CardE.depth = 2; + }), WaitVfx.Create(0.08f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_2); + rot = Random.value * 30f - 15f; + p1 = (Vector3)MotionUtils.GetPositionByAngle(rot) * 320f; + p2 = (Vector3)MotionUtils.GetPositionByAngle(rot + 180f) * 80f; + path = MotionUtils.GetBezierCubic(Vector3.zero, p1, p2, Vector3.zero, 20); + iTween.MoveTo(CardP.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.12f, "islocal", true, "easetype", iTween.EaseType.linear)); + path = MotionUtils.GetBezierCubic(Vector3.zero, p1 * -1f, p2 * -1f, Vector3.zero, 20); + iTween.MoveTo(CardE.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.12f, "islocal", true, "easetype", iTween.EaseType.linear)); + }), WaitVfx.Create(0.06f), InstantVfx.Create(delegate + { + CardP.depth = 2; + CardE.depth = 0; + }), WaitVfx.Create(0.06f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_1); + iTween.MoveTo(CardP.gameObject, iTween.Hash("position", new Vector3(240f, -160f, 0f), "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CardE.gameObject, iTween.Hash("position", new Vector3(-240f, 160f, 0f), "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + }), WaitVfx.Create(0.3f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_3); + iTween.ScaleTo(CardP.gameObject, iTween.Hash("scale", new Vector3(0.01f, 1.2f, 1f), "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + iTween.ScaleTo(CardE.gameObject, iTween.Hash("scale", new Vector3(0.01f, 1.2f, 1f), "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_START_CARD_1, CardP.transform.position); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.DRAW_CARD_OPEN); + CardP.spriteName = CardFrontSpriteName; + CardE.spriteName = CardFrontSpriteName; + if (BattleManagerBase.GetIns().IsFirst) + { + CardLabelP.text = Data.SystemText.Get("Battle_0430"); + CardLabelE.text = Data.SystemText.Get("Battle_0431"); + TurnLabel.text = Data.SystemText.Get("Battle_0432"); + } + else + { + CardLabelP.text = Data.SystemText.Get("Battle_0431"); + CardLabelE.text = Data.SystemText.Get("Battle_0430"); + TurnLabel.text = Data.SystemText.Get("Battle_0433"); + } + TweenAlpha.Begin(TurnLabel.gameObject, 0.3f, 1f); + TurnLabel.transform.localPosition = DefaultPosDict["TurnLabel"] + Vector3.right * 50f; + iTween.MoveTo(TurnLabel.gameObject, iTween.Hash("position", DefaultPosDict["TurnLabel"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenColor.Begin(CardE.gameObject, 0.1f, Color.gray); + TweenColor.Begin(CardLabelE.gameObject, 0.1f, Color.gray); + iTween.ScaleTo(CardP.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + iTween.ScaleTo(CardE.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + }), WaitVfx.Create(1.5f), InstantVfx.Create(delegate + { + TweenAlpha.Begin(BgBlack.gameObject, 0.1f, 0f); + TweenAlpha.Begin(CardP.gameObject, 0.1f, 0f); + TweenAlpha.Begin(CardE.gameObject, 0.1f, 0f); + TweenAlpha.Begin(CharP.gameObject, 0.1f, 0f); + TweenAlpha.Begin(CharE.gameObject, 0.1f, 0f); + TweenAlpha.Begin(VsLine.gameObject, 0.1f, 0f); + TweenAlpha.Begin(TurnLabel.gameObject, 0.1f, 0f); + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + base.gameObject.SetActive(value: false); + })); + } + + private static void SetClassInfoWithSubClass(ClassCharacterMasterData charaData, int chaosId, int subClassId, ClassInfoParts defaultClassInfoParts, ClassInfoParts classInfoParts, FlexibleGrid grid) + { + classInfoParts.gameObject.SetActive(value: true); + defaultClassInfoParts.ClassNameLabel.text = string.Empty; + classInfoParts.InitByCharaPrm(charaData, chaosId); + classInfoParts.SetSubClass((CardBasePrm.ClanType)subClassId); + UIUtil.AdjustClassInfoPartsSize(classInfoParts, grid, 375); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleStopChecker.cs b/SVSim.BattleEngine/Engine/BattleStopChecker.cs new file mode 100644 index 0000000..1c176e0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleStopChecker.cs @@ -0,0 +1,24 @@ +using System; +using Cute; + +public class BattleStopChecker : NetworkBattleIntervalCheckerBase +{ + private const int JUDGE_RESULT_RETRY_TIMER = 95; + + public event Action OnBattleStop; + + public override void StopChecker() + { + base.StopChecker(); + } + + protected override void IntervalCheck() + { + base.IntervalCheck(); + if (NetworkUtility.GetTimeSpanSecond(base.startTick) >= 95) + { + this.OnBattleStop.Call(); + StartChecker(); + } + } +} diff --git a/SVSim.BattleEngine/Engine/BattleUIContainer.cs b/SVSim.BattleEngine/Engine/BattleUIContainer.cs new file mode 100644 index 0000000..cc72aca --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleUIContainer.cs @@ -0,0 +1,220 @@ +using System; +using UnityEngine; +using Wizard; + +public class BattleUIContainer : MonoBehaviour +{ + [SerializeField] + public BattleButtonControl ButtonControl; + + [SerializeField] + private WizardUIButton BattleMenuBtn; + + [SerializeField] + private UIButton TurnEndBtn; + + [SerializeField] + public Transform EnemyChoiceBraveBtn; + + [SerializeField] + private GameObject _battery; + + private const float LONG_PRESS_TIME = 0.2f; + + private float? _predictionWaitTime; + + public Action ShowPrediction; + + private bool _enableMenuRequest; + + private InputMgr _inputMgr; + + public bool PlayerCardPlaying; + + private bool _forceDisableMenu; + + public GameObject Battery => _battery; + + private void Start() + { + BattleMenuBtn.onPress.Clear(); + BattleMenuBtn.onPress.Add(new EventDelegate(delegate + { + ButtonControl.OnPressMenuBtn(); + })); + if (!GameMgr.GetIns().IsWatchBattle) + { + TurnEndBtn.onClick.Clear(); + TurnEndBtn.onClick.Add(new EventDelegate(delegate + { + ButtonControl.OnPressTurnEnd(); + })); + } + _predictionWaitTime = null; + UIEventListener.Get(TurnEndBtn.gameObject).onPress = delegate(GameObject obj, bool isPress) + { + if (isPress) + { + _predictionWaitTime = Time.realtimeSinceStartup; + } + else + { + _predictionWaitTime = null; + if (ShowPrediction != null) + { + ShowPrediction(obj: false); + } + } + }; + UIEventListener.Get(TurnEndBtn.gameObject).onHover = delegate(GameObject obj, bool isHover) + { + if (BattleManagerBase.UseCustomMouse && UIManager.GetInstance().ApplicationHasFocus) + { + if (isHover) + { + _predictionWaitTime = Time.realtimeSinceStartup; + } + else + { + _predictionWaitTime = null; + if (ShowPrediction != null) + { + ShowPrediction(isHover); + } + } + } + }; + UIEventListener.Get(TurnEndBtn.gameObject).onDragOut = delegate + { + _predictionWaitTime = null; + if (ShowPrediction != null) + { + ShowPrediction(obj: false); + } + }; + _inputMgr = GameMgr.GetIns().GetInputMgr(); + } + + public void EnableMenu() + { + if (!PlayerCardPlaying && !_forceDisableMenu) + { + BattleMenuBtn.isEnabled = true; + SetEnableReset(isEnable: true); + SetEnableHint(isEnable: true); + } + } + + public void RequestEnableMenuWhenTouchable() + { + _enableMenuRequest = true; + } + + private void TryEnableMenu() + { + if (BattleManagerBase.GetIns().GetBattlePlayer(isPlayer: true).BattleView.IsTouchable()) + { + EnableMenu(); + _enableMenuRequest = false; + } + } + + public void ForceEnableMenu() + { + _forceDisableMenu = false; + EnableMenu(); + } + + public void DisableMenu(bool isForceDisable = false) + { + if (isForceDisable || (!BattleManagerBase.GetIns().IsRecovery && !GameMgr.GetIns().IsReplayBattle && !GameMgr.GetIns().IsWatchBattle)) + { + BattleMenuBtn.isEnabled = false; + SetEnableReset(isEnable: false); + SetEnableHint(isEnable: false); + } + } + + public void ForceDisableMenu() + { + _forceDisableMenu = true; + _enableMenuRequest = false; + DisableMenu(); + } + + public void SetEnableReset(bool isEnable) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + if (ins is PuzzleBattleManager) + { + (ins as PuzzleBattleManager).ResetButton.SetState((!isEnable) ? UIButtonColor.State.Disabled : UIButtonColor.State.Normal, immediate: false); + } + } + + public void SetEnableHint(bool isEnable) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + if (ins is PuzzleBattleManager) + { + (ins as PuzzleBattleManager).HintButton.isEnabled = isEnable; + } + } + + public bool IsEnableMenu() + { + return BattleMenuBtn.isEnabled; + } + + private void Update() + { + UIManager instance = UIManager.GetInstance(); + GameMgr ins = GameMgr.GetIns(); + BattleManagerBase ins2 = BattleManagerBase.GetIns(); + if (_enableMenuRequest) + { + if (BattleMenuBtn.isEnabled) + { + _enableMenuRequest = false; + } + else + { + TryEnableMenu(); + } + } + if (!Input.GetMouseButton(0) && instance != null && instance.IsCurrentScene(UIManager.ViewScene.Battle) && !instance.isOpenLoading() && !instance.isFading() && ins.GetInputMgr().isBackKeyEnable && !BattleManagerBase.IsTutorial) + { + if (BattleMenuBtn.gameObject.activeInHierarchy && BattleMenuBtn.isActiveAndEnabled && !instance.isOpenDialog()) + { + if (Input.GetKeyDown(KeyCode.Escape) && IsEnableMenu()) + { + ButtonControl.OnPressMenuBtn(); + } + if (BattleManagerBase.UseKeyboardTurnEndSpaceShortcut && _inputMgr.IsKeyboardSpace() && ins2.BattlePlayer.PlayerBattleView.TurnEndButtonUI.GameObject.activeInHierarchy && ins2.BattlePlayer.PlayerBattleView.TurnEndButtonUI.GetEnableLabel && ins2.BattlePlayer.IsSelfTurn && _inputMgr.KeyboardEnableControlSpace) + { + ButtonControl.OnPressTurnEnd(); + } + } + else if (instance.isOpenDialog() && !ButtonControl.IsSettingMenuOpen && !ButtonControl.IsRetireMenuOpen && !ButtonControl.IsQuestMissionOpen && Input.GetKeyDown(KeyCode.Escape)) + { + ins2.BattlePlayer.PlayerBattleView.IsMenuCloseEscape = true; + ButtonControl.HideBattleMenu(); + } + } + if (TurnEndBtn.state == UIButtonColor.State.Pressed || BattleManagerBase.UseCustomMouse) + { + if (ShowPrediction != null && _predictionWaitTime.HasValue && _predictionWaitTime.Value + 0.2f < Time.realtimeSinceStartup) + { + ShowPrediction(obj: true); + _predictionWaitTime = null; + } + } + else + { + _predictionWaitTime = null; + } + if (ins.IsWatchBattle && ins2.IsBattleEnd) + { + ButtonControl.HideAllMenu(isWithoutSE: true); + } + } +} diff --git a/SVSim.BattleEngine/Engine/BattleUtility.cs b/SVSim.BattleEngine/Engine/BattleUtility.cs new file mode 100644 index 0000000..6839c82 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleUtility.cs @@ -0,0 +1,67 @@ +using System.Collections.Generic; +using System.Linq; + +public static class BattleUtility +{ + public class RepeatSkillsAndTiming + { + public List _skills; + + public List _timings; + + public RepeatSkillsAndTiming(List skills, List timings) + { + _timings = timings; + _skills = skills; + } + } + + public static RepeatSkillsAndTiming GetRepeatSkillsWithTiming(List skills) + { + if (skills == null || skills.Count == 0) + { + return null; + } + BattleCardBase ownerCard = skills.First().SkillPrm.ownerCard; + return GetRepeatSkillsWithTiming(ownerCard.SelfBattlePlayer, ownerCard, skills); + } + + public static List GetRepeatSkillsForPrediction(BattlePlayerBase sourcePlayer, BattleCardBase virtualCard) + { + if (virtualCard.Skills == null || virtualCard.Skills.Count() == 0) + { + return null; + } + return GetRepeatSkillsWithTiming(sourcePlayer, virtualCard, virtualCard.Skills.ToList())?._skills; + } + + public static List GetRepeatableWhenPlaySkill(BattleCardBase ownerCard, List activeSkills, bool isInvokeCheck) + { + if (ownerCard.Skills.Any((SkillBase s) => s.IsUserSelectType && !(s is Skill_fusion))) + { + return null; + } + if (isInvokeCheck && !ownerCard.HasSkillWhenPlay(isOnlyNoSelect: true)) + { + return null; + } + if (activeSkills.Count == 1 && activeSkills.Any((SkillBase s) => s is Skill_pp_fixeduse)) + { + return null; + } + return activeSkills.Where((SkillBase c) => c.OnWhenPlayStart != 0).ToList(); + } + + private static RepeatSkillsAndTiming GetRepeatSkillsWithTiming(BattlePlayerBase player, BattleCardBase ownerCard, List activeSkills) + { + List list = new List(); + List list2 = new List(); + IEnumerable enumerable = activeSkills.Where((SkillBase s) => s.IsWhenDestroySkill); + if (player.Class.SkillApplyInformation.RepeatSkillTimingList.Any((RepeatSkillInfo s) => s.Timing == "when_destroy" && Skill_repeat_skill.CheckCardType(s.Target, ownerCard)) && enumerable.Count() > 0) + { + list.AddRange(enumerable); + list2.Add("when_destroy"); + } + return new RepeatSkillsAndTiming(list, list2); + } +} diff --git a/SVSim.BattleEngine/Engine/BetterList.cs b/SVSim.BattleEngine/Engine/BetterList.cs new file mode 100644 index 0000000..3953ba8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BetterList.cs @@ -0,0 +1,229 @@ +using System.Collections.Generic; +using System.Diagnostics; +using UnityEngine; + +public class BetterList +{ + public delegate int CompareFunc(T left, T right); + + public T[] buffer; + + public int size; + + [DebuggerHidden] + public T this[int i] + { + get + { + return buffer[i]; + } + set + { + buffer[i] = value; + } + } + + [DebuggerHidden] + [DebuggerStepThrough] + public IEnumerator GetEnumerator() + { + if (buffer != null) + { + int i = 0; + while (i < size) + { + yield return buffer[i]; + int num = i + 1; + i = num; + } + } + } + + private void AllocateMore() + { + T[] array = ((buffer != null) ? new T[Mathf.Max(buffer.Length << 1, 32)] : new T[32]); + if (buffer != null && size > 0) + { + buffer.CopyTo(array, 0); + } + buffer = array; + } + + private void Trim() + { + if (size > 0) + { + if (size < buffer.Length) + { + T[] array = new T[size]; + for (int i = 0; i < size; i++) + { + array[i] = buffer[i]; + } + buffer = array; + } + } + else + { + buffer = null; + } + } + + public void Clear() + { + size = 0; + } + + public void Release() + { + size = 0; + buffer = null; + } + + public void Add(T item) + { + if (buffer == null || size == buffer.Length) + { + AllocateMore(); + } + buffer[size++] = item; + } + + public void Insert(int index, T item) + { + if (buffer == null || size == buffer.Length) + { + AllocateMore(); + } + if (index > -1 && index < size) + { + for (int num = size; num > index; num--) + { + buffer[num] = buffer[num - 1]; + } + buffer[index] = item; + size++; + } + else + { + Add(item); + } + } + + public bool Contains(T item) + { + if (buffer == null) + { + return false; + } + for (int i = 0; i < size; i++) + { + ref readonly T reference = ref buffer[i]; + object obj = item; + if (reference.Equals(obj)) + { + return true; + } + } + return false; + } + + public int IndexOf(T item) + { + if (buffer == null) + { + return -1; + } + for (int i = 0; i < size; i++) + { + ref readonly T reference = ref buffer[i]; + object obj = item; + if (reference.Equals(obj)) + { + return i; + } + } + return -1; + } + + public bool Remove(T item) + { + if (buffer != null) + { + EqualityComparer equalityComparer = EqualityComparer.Default; + for (int i = 0; i < size; i++) + { + if (equalityComparer.Equals(buffer[i], item)) + { + size--; + buffer[i] = default(T); + for (int j = i; j < size; j++) + { + buffer[j] = buffer[j + 1]; + } + buffer[size] = default(T); + return true; + } + } + } + return false; + } + + public void RemoveAt(int index) + { + if (buffer != null && index > -1 && index < size) + { + size--; + buffer[index] = default(T); + for (int i = index; i < size; i++) + { + buffer[i] = buffer[i + 1]; + } + buffer[size] = default(T); + } + } + + public T Pop() + { + if (buffer != null && size != 0) + { + T result = buffer[--size]; + buffer[size] = default(T); + return result; + } + return default(T); + } + + public T[] ToArray() + { + Trim(); + return buffer; + } + + [DebuggerHidden] + [DebuggerStepThrough] + public void Sort(CompareFunc comparer) + { + int num = 0; + int num2 = size - 1; + bool flag = true; + while (flag) + { + flag = false; + for (int i = num; i < num2; i++) + { + if (comparer(buffer[i], buffer[i + 1]) > 0) + { + T val = buffer[i]; + buffer[i] = buffer[i + 1]; + buffer[i + 1] = val; + flag = true; + } + else if (!flag) + { + num = ((i != 0) ? (i - 1) : 0); + } + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/Bgm.cs b/SVSim.BattleEngine/Engine/Bgm.cs new file mode 100644 index 0000000..8c6f484 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Bgm.cs @@ -0,0 +1,219 @@ +using System; +using System.Collections.Generic; +using CriWare; +using Cute; +using Wizard; + +public class Bgm +{ + public enum BGM_TYPE + { + NONE, + TITLE, + TITLE_SPECIAL_1, + TITLE_SPECIAL_2, + HOME, + BATTLE_STANDBY, + BATTLE, + SYS_WIN_LOOP, + SYS_LOSE_LOOP, + COLOSSEUM_FINAL, + GRANDPRIX_SPECIAL, + GRANDPRIX_SPECIAL_FINAL, + SEALED, + QUEST, + COMPETITION_LOBBY, + BINGO, + MAX + } + + private class BgmInfo + { + public string CueName { get; private set; } + + public string CueSheet { get; private set; } + + public BgmInfo(string cueName, string cueSheet) + { + CueName = cueName; + CueSheet = cueSheet; + } + } + + private const string CATEGORY_NAME = "BGM"; + + private Dictionary m_AudioData; + + private string m_PlayBgmCueName; + + private int m_CurrentBgmIdx; + + private int m_MaxBgmCount; + + private float m_volume; + + private bool m_isMuted; + + public Bgm() + { + m_AudioData = new Dictionary(); + m_PlayBgmCueName = null; + m_CurrentBgmIdx = 0; + m_MaxBgmCount = Toolbox.AudioManager.GetBgmMaxCount(); + SetVolume(PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.BGM_VOLUME)); + Mute(PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SOUND_MUTE)); + } + + public void AddList(BGM_TYPE BgmType, string cueName, string cueSheet = null) + { + if (!m_AudioData.ContainsKey(BgmType)) + { + m_AudioData.Add(BgmType, new BgmInfo(cueName, (cueSheet == null) ? cueName : cueSheet)); + } + } + + public void RemoveList(BGM_TYPE BgmType) + { + if (m_AudioData.ContainsKey(BgmType)) + { + m_AudioData.Remove(BgmType); + } + } + + public virtual void Play(BGM_TYPE BgmType, float FadeTime = 0f, long startTime = 0L) + { + if (BgmType != BGM_TYPE.NONE) + { + BgmInfo bgmInfo = m_AudioData[BgmType]; + string cueSheet = bgmInfo.CueSheet; + m_PlayBgmCueName = bgmInfo.CueName; + Toolbox.AudioManager.PlayBgmFromName(cueSheet, m_PlayBgmCueName, cueSheet, cueSheet, m_CurrentBgmIdx, loop: false, FadeTime, 0f, startTime); + } + } + + public virtual void PlayCrossFade(BGM_TYPE BgmType, float fadeOutTime, float fadeInTime, long startTime) + { + if (BgmType != BGM_TYPE.NONE) + { + BgmInfo bgmInfo = m_AudioData[BgmType]; + string cueSheet = bgmInfo.CueSheet; + m_PlayBgmCueName = bgmInfo.CueName; + Toolbox.AudioManager.StopFadeBgm(m_CurrentBgmIdx, fadeOutTime); + m_CurrentBgmIdx = (m_CurrentBgmIdx + 1) % m_MaxBgmCount; + Toolbox.AudioManager.PlayBgmFromName(cueSheet, m_PlayBgmCueName, cueSheet, cueSheet, m_CurrentBgmIdx, loop: false, fadeInTime, 0f, startTime); + } + } + + public virtual void PlayFadeOut(BGM_TYPE BgmType, float FadeOutTime = 0f, float FadeInTime = 0f) + { + Toolbox.AudioManager.StopFadeBgm(m_CurrentBgmIdx, FadeOutTime); + if (BgmType != BGM_TYPE.NONE) + { + m_CurrentBgmIdx = (m_CurrentBgmIdx + 1) % m_MaxBgmCount; + BgmInfo bgmInfo = m_AudioData[BgmType]; + string cueSheet = bgmInfo.CueSheet; + m_PlayBgmCueName = bgmInfo.CueName; + Toolbox.AudioManager.PlayBgmFromName(cueSheet, m_PlayBgmCueName, cueSheet, cueSheet, m_CurrentBgmIdx, loop: false, FadeInTime, FadeOutTime, 0L); + } + } + + public virtual void Play(string cuename, float fadeInTime, long startTime) + { + if (IsPreInstall(cuename, out var type)) + { + Play(type, fadeInTime, startTime); + return; + } + m_PlayBgmCueName = cuename; + Toolbox.AudioManager.PlayBgmFromName(cuename, cuename, cuename, cuename, m_CurrentBgmIdx, loop: false, fadeInTime, 0f, startTime); + } + + public virtual void PlayCrossFade(string cuename, float fadeOutTime, float fadeInTime, long startTime) + { + if (IsPreInstall(cuename, out var type)) + { + PlayCrossFade(type, fadeOutTime, fadeInTime, startTime); + return; + } + m_PlayBgmCueName = cuename; + Toolbox.AudioManager.StopFadeBgm(m_CurrentBgmIdx, fadeOutTime); + m_CurrentBgmIdx = (m_CurrentBgmIdx + 1) % m_MaxBgmCount; + Toolbox.AudioManager.PlayBgmFromName(cuename, cuename, cuename, cuename, m_CurrentBgmIdx, loop: false, fadeInTime, 0f, startTime); + } + + public virtual void Pause() + { + for (int i = 0; i < m_MaxBgmCount; i++) + { + Toolbox.AudioManager.PauseBgm(isPause: true, i); + } + } + + public virtual void Stop(float FadeTime, Action onStopped) + { + m_PlayBgmCueName = null; + AudioManager audioManager = Toolbox.AudioManager; + audioManager.StopFadeBgm(m_CurrentBgmIdx, FadeTime); + audioManager.StartCoroutine_DelayMethod(FadeTime, onStopped); + } + + public virtual void StopAll(float FadeTime) + { + m_PlayBgmCueName = null; + for (int i = 0; i < m_MaxBgmCount; i++) + { + Toolbox.AudioManager.StopFadeBgm(i, FadeTime); + } + } + + public bool IsPlayBGM(BGM_TYPE bgmType) + { + if (bgmType != BGM_TYPE.NONE) + { + return m_AudioData[bgmType].CueName == m_PlayBgmCueName; + } + return m_PlayBgmCueName != null; + } + + public string GetCueSheet(BGM_TYPE bgmType) + { + return m_AudioData[bgmType].CueSheet; + } + + public bool IsPreInstall(string cuename, out BGM_TYPE type) + { + foreach (KeyValuePair audioDatum in m_AudioData) + { + BgmInfo value = audioDatum.Value; + if (value.CueName == cuename && value.CueSheet == SoundMgr.PREINSTALL_CUESHEET) + { + type = audioDatum.Key; + return true; + } + } + type = BGM_TYPE.NONE; + return false; + } + + public void SetVolume(float Prm) + { + CriAtomExCategory.SetVolume("BGM", Prm); + m_volume = Prm; + } + + public void Mute(bool isMute) + { + CriAtomExCategory.Mute("BGM", isMute); + m_isMuted = isMute; + } + + public float GetVolume() + { + return m_volume; + } + + public bool IsMuted() + { + return m_isMuted; + } +} diff --git a/SVSim.BattleEngine/Engine/BingoBall.cs b/SVSim.BattleEngine/Engine/BingoBall.cs new file mode 100644 index 0000000..f2f9c25 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BingoBall.cs @@ -0,0 +1,163 @@ +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; + +public class BingoBall : MonoBehaviour +{ + public const string NUM_SPRITE_NAME_HEAD = "bingo_ball_"; + + public const string TEXTURE_BINGOBALL_BACK = "bingo_ball_back"; + + public const string TEXTURE_BINGOBALL_FRONT = "bingo_ball_front"; + + public const float NUM_SPACE = 11f; + + [SerializeField] + private UISprite _numSpriteLeft; + + [SerializeField] + private UISprite _numSpriteRight; + + [SerializeField] + private UISprite _ballSprite; + + [SerializeField] + private Transform _bottomPos; + + [SerializeField] + private TweenPositionX _tweenPositionX; + + [SerializeField] + private TweenPositionY _tweenPositionY; + + [SerializeField] + private Vector2 _ballMovement; + + private GameObject _effectObject; + + private GameObject _dustEffect1; + + private GameObject _dustEffect2; + + private int _ballNum; + + private List _inProcessCoroutines = new List(); + + private void Start() + { + _numSpriteLeft.gameObject.SetActive(value: false); + _numSpriteRight.gameObject.SetActive(value: false); + } + + public void SetBallNum(int num) + { + _ballNum = num; + } + + public void SetNumSprite() + { + if (_ballNum >= 0 && _ballNum <= 9) + { + _numSpriteRight.gameObject.SetActive(value: false); + _numSpriteLeft.gameObject.SetActive(value: true); + _numSpriteLeft.transform.localPosition = Vector3.zero; + _numSpriteLeft.spriteName = "bingo_ball_" + _ballNum; + } + else if (_ballNum >= 10) + { + _numSpriteRight.gameObject.SetActive(value: true); + _numSpriteLeft.gameObject.SetActive(value: true); + _numSpriteLeft.spriteName = "bingo_ball_" + _ballNum / 10; + _numSpriteRight.spriteName = "bingo_ball_" + _ballNum % 10; + } + } + + public void SetBallSprite(bool isFront) + { + _ballSprite.spriteName = (isFront ? "bingo_ball_front" : "bingo_ball_back"); + } + + public List PlayEffect(string effectName, bool isOnBottom) + { + List list = new List(); + if (_effectObject != null) + { + Object.Destroy(_effectObject); + } + _effectObject = Object.Instantiate(Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(effectName, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)) as GameObject); + _effectObject.transform.parent = base.gameObject.transform; + list.AddRange(GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(_effectObject, null)); + _effectObject.transform.localPosition = (isOnBottom ? _bottomPos.transform.localPosition : Vector3.zero); + _effectObject.SetActive(value: true); + return list; + } + + public List PlayDustEffect(string effectName, GameObject dustEffectContainer, float fallTime, float endWorldPosY, float delayTime) + { + List list = new List(); + _dustEffect1 = Object.Instantiate(Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(effectName, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)) as GameObject); + _dustEffect2 = Object.Instantiate(Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(effectName, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)) as GameObject); + list.AddRange(GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(_dustEffect1, null)); + list.AddRange(GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(_dustEffect2, null)); + _dustEffect1.transform.parent = dustEffectContainer.transform; + _dustEffect2.transform.parent = dustEffectContainer.transform; + _dustEffect1.SetActive(value: false); + _dustEffect2.SetActive(value: false); + _inProcessCoroutines.Add(UIManager.GetInstance().StartCoroutine(PlayDustEffect(fallTime, endWorldPosY, delayTime))); + return list; + } + + private IEnumerator PlayDustEffect(float fallTime, float endWorldPosY, float delayTime) + { + yield return new WaitForSeconds(delayTime + fallTime * 0.164f); + Vector3 position = base.gameObject.transform.position; + position.y = endWorldPosY - (base.gameObject.transform.position.y - _bottomPos.transform.position.y) * 0.95f; + _dustEffect1.transform.position = position; + _dustEffect1.SetActive(value: true); + yield return new WaitForSeconds(fallTime * 0.323f); + position = base.gameObject.transform.position; + position.y = endWorldPosY - (base.gameObject.transform.position.y - _bottomPos.transform.position.y) * 0.98f; + _dustEffect2.transform.position = position; + _dustEffect2.SetActive(value: true); + yield return new WaitForSeconds(0.4f); + Object.Destroy(_dustEffect1); + Object.Destroy(_dustEffect2); + } + + public void StopCoroutine() + { + if (_inProcessCoroutines.Count <= 0) + { + return; + } + foreach (Coroutine inProcessCoroutine in _inProcessCoroutines) + { + if (inProcessCoroutine != null) + { + UIManager.GetInstance().StopCoroutine(inProcessCoroutine); + } + } + } + + public void PlayTweenAnimation(Vector3 from, float delay) + { + _tweenPositionX.from = from.x; + _tweenPositionX.to = from.x + _ballMovement.x; + _tweenPositionY.from = from.y; + _tweenPositionY.to = from.y + _ballMovement.y; + _inProcessCoroutines.Add(UIManager.GetInstance().StartCoroutine(PlayBallFallAnimation(delay))); + } + + private IEnumerator PlayBallFallAnimation(float delay) + { + yield return new WaitForSeconds(delay); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr("se_sys_bng_ballfall_01", "se_sys_bng_ballfall_01", 0f, 0L); + base.gameObject.SetActive(value: true); + } + + public Vector2 GetBallMovement() + { + return _ballMovement; + } +} diff --git a/SVSim.BattleEngine/Engine/BingoSheetBlock.cs b/SVSim.BattleEngine/Engine/BingoSheetBlock.cs new file mode 100644 index 0000000..65227fa --- /dev/null +++ b/SVSim.BattleEngine/Engine/BingoSheetBlock.cs @@ -0,0 +1,152 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class BingoSheetBlock : MonoBehaviour +{ + [SerializeField] + private UISprite _numSpriteLeft; + + [SerializeField] + private UISprite _numSpriteRight; + + [SerializeField] + private UISprite _blockSprite; + + [SerializeField] + private UISprite _treasureBoxSprite; + + [SerializeField] + private UITexture _stampTexutre; + + [SerializeField] + private UISprite _lightSprite; + + [SerializeField] + private TweenAlpha _lightTextureAlpha; + + private List _inProcessCoroutines = new List(); + + private const string NUM_SPRITE_NAME_HEAD = "bingo_square_"; + + private const float LINES_NUM_SPRITE_SPACE = 16.65f; + + public void SetNumLabel(int num, int maxPerLine) + { + if (num >= 0 && num <= 9) + { + _numSpriteRight.gameObject.SetActive(value: false); + _numSpriteLeft.gameObject.SetActive(value: true); + _numSpriteLeft.transform.localPosition = Vector3.zero; + _numSpriteLeft.spriteName = "bingo_square_" + num; + } + else if (num >= 10) + { + _numSpriteRight.gameObject.SetActive(value: true); + _numSpriteLeft.gameObject.SetActive(value: true); + _numSpriteLeft.spriteName = "bingo_square_" + num / 10; + _numSpriteRight.spriteName = "bingo_square_" + num % 10; + Vector3 zero = Vector3.zero; + zero.x = -16.65f; + _numSpriteLeft.transform.localPosition = zero; + zero.x = 16.65f; + _numSpriteRight.transform.localPosition = zero; + } + } + + public void SetBlockScale(float blockScale) + { + base.transform.localScale *= blockScale; + } + + public void SetPartsVisible(bool blockVisible, int treasureBoxGrade, bool isOpen) + { + _blockSprite.gameObject.SetActive(blockVisible); + SetTreasureBoxSprite(treasureBoxGrade, isOpen); + SetStampVisible(isOpen); + } + + public void SetStampTexture(Texture texture) + { + _stampTexutre.mainTexture = texture; + } + + public void SetTreasureBoxSprite(int treasureBoxGrade, bool isOpen) + { + if (!isOpen) + { + _treasureBoxSprite.spriteName = string.Format("box_2pick_0{0}{1}", (treasureBoxGrade - 1).ToString(), "_close"); + _treasureBoxSprite.gameObject.SetActive(treasureBoxGrade > 0); + } + else + { + _treasureBoxSprite.gameObject.SetActive(value: false); + } + } + + public void SetStampVisible(bool visible) + { + _stampTexutre.gameObject.SetActive(visible); + } + + public void StampDown(float delay) + { + iTween.ScaleTo(_stampTexutre.gameObject, iTween.Hash("scale", Vector3.one * 1f, "delay", delay, "time", 0.15f, "islocal", true, "easetype", iTween.EaseType.easeOutCubic)); + _inProcessCoroutines.Add(UIManager.GetInstance().StartCoroutine(ChangeAlpha(_stampTexutre.gameObject, delay))); + } + + public void LightOn(float delay) + { + _lightTextureAlpha.SetOnFinished(delegate + { + _lightSprite.alpha = 0f; + _lightTextureAlpha.ResetToBeginning(); + _lightTextureAlpha.from = 0f; + }); + _inProcessCoroutines.Add(UIManager.GetInstance().StartCoroutine(LightOn(_lightTextureAlpha, delay))); + } + + public void PlaySe(int lineNum, float delay) + { + _inProcessCoroutines.Add(UIManager.GetInstance().StartCoroutine(PlaySeCoroutine(lineNum, delay))); + } + + private IEnumerator PlaySeCoroutine(int lineNum, float delay) + { + yield return new WaitForSeconds(delay); + string text = string.Format("se_sys_bng_line_{0}", Mathf.Clamp(lineNum + 1, 1, 12).ToString("00")); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(text, text, 0f, 0L); + } + + private IEnumerator ChangeAlpha(GameObject obj, float delay) + { + yield return new WaitForSeconds(delay); + TweenAlpha.Begin(obj, 0.15f, 1f); + } + + private IEnumerator LightOn(TweenAlpha tweenAlpha, float delay) + { + _lightTextureAlpha.ResetToBeginning(); + yield return new WaitForSeconds(delay); + tweenAlpha.PlayForward(); + } + + public void CancelAnimations() + { + _lightSprite.alpha = 0f; + if (_inProcessCoroutines.Count <= 0) + { + return; + } + foreach (Coroutine inProcessCoroutine in _inProcessCoroutines) + { + UIManager.GetInstance().StopCoroutine(inProcessCoroutine); + } + } + + public void ResetStampTexture() + { + _stampTexutre.gameObject.transform.localScale = Vector3.one * 1.5f; + _stampTexutre.alpha = 0f; + } +} diff --git a/SVSim.BattleEngine/Engine/BothBattlePlayerFilter.cs b/SVSim.BattleEngine/Engine/BothBattlePlayerFilter.cs new file mode 100644 index 0000000..996a745 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BothBattlePlayerFilter.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; +using Wizard; + +public class BothBattlePlayerFilter : ISkillBattlePlayerFilter +{ + public IEnumerable Filtering(BattlePlayerReadOnlyInfoPair playerInfoPair) + { + yield return playerInfoPair.ReadOnlySelf; + yield return playerInfoPair.ReadOnlyOpponent; + } +} diff --git a/SVSim.BattleEngine/Engine/BuffCountInfo.cs b/SVSim.BattleEngine/Engine/BuffCountInfo.cs new file mode 100644 index 0000000..7f6f165 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BuffCountInfo.cs @@ -0,0 +1,7 @@ +public class BuffCountInfo : TurnAndIntValue +{ + public BuffCountInfo(int turn, bool isSelfTurn) + : base(-1, turn, isSelfTurn) + { + } +} diff --git a/SVSim.BattleEngine/Engine/BuffDetailInfoUI.cs b/SVSim.BattleEngine/Engine/BuffDetailInfoUI.cs new file mode 100644 index 0000000..0817251 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BuffDetailInfoUI.cs @@ -0,0 +1,395 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Wizard; +using Wizard.Battle.UI; + +public class BuffDetailInfoUI : MonoBehaviour +{ + [SerializeField] + private UILabel _titleLabel; + + [SerializeField] + private UILabel _buffLabel; + + private const float TITLE_HEIGHT = 50f; + + public const string NOT_SHOW_BUFF_DETAIL_STORY_SPECIAL_BATTLE_ID = "42"; + + public float Height => 50f + (float)_buffLabel.height; + + public void Initialize() + { + _titleLabel.text = Data.SystemText.Get("BattleLog_0268"); + } + + public void SetBuffDetailLabel(BattleCardBase cardBase) + { + StringBuilder stringBuilder = new StringBuilder(); + List allBuffSkills = GetAllBuffSkills(cardBase, cardBase.BuffInfoList.Select((BuffInfo b) => b.SkillFrom).ToList()); + if (!cardBase.IsClass) + { + if (cardBase.Cost != cardBase.BaseCost) + { + int num = cardBase.Cost - cardBase.BaseCost; + string text = ((num > 0) ? ("+" + num) : num.ToString()); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0273", text)); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_powerup || s is Skill_power_down)) + { + int currentAtkBuff = cardBase.GetCurrentAtkBuff(); + int currentLifeBuff = cardBase.GetCurrentLifeBuff(); + if (currentAtkBuff != 0 || currentLifeBuff != 0) + { + string retAttack = string.Empty; + string retLife = string.Empty; + BattleLogUtility.GetBuffValueStringFormatted(currentAtkBuff, currentLifeBuff, ref retAttack, ref retLife); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0040", retAttack, retLife)); + } + } + bool flag = allBuffSkills.Any((SkillBase s) => s is Skill_quick && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)); + bool flag2 = allBuffSkills.Any((SkillBase s) => s is Skill_rush && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)); + bool flag3 = allBuffSkills.Any((SkillBase s) => s is Skill_killer && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)); + bool flag4 = allBuffSkills.Any((SkillBase s) => s is Skill_drain && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)); + if (ExistCopiedSkillNeedDetailText(cardBase)) + { + IEnumerable source = cardBase.BuffInfoList.Where((BuffInfo b) => b.IsCopied); + for (int num2 = 0; num2 < source.Count(); num2++) + { + if (source.ElementAt(num2).SkillFrom is SkillBaseCopy skillBaseCopy) + { + switch (skillBaseCopy.SkillType) + { + case "quick": + flag = true; + break; + case "rush": + flag2 = true; + break; + case "killer": + flag3 = true; + break; + case "drain": + flag4 = true; + break; + } + } + } + } + if (flag) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0011")); + } + if (flag2) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0012")); + } + if (flag3) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0009")); + } + if (flag4) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0006")); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_attack_count && (!cardBase.IsInHand || s.OnWhenPlayStart == 0))) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0018", cardBase.MaxAttackableCount.ToString())); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_ignore_guard && (!cardBase.IsInHand || s.OnWhenPlayStart == 0))) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0008")); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_consume_ep_modifier && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)) || NeedNoConsumeEpText(cardBase)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0201")); + } + } + IEnumerable source2 = from s in allBuffSkills + where s is Skill_shield && (!cardBase.IsInHand || s.OnWhenPlayStart == 0) + select (Skill_shield)s; + if (source2.Any()) + { + if (source2.Any((Skill_shield s) => s.IsAllDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0274")); + } + if (source2.Any((Skill_shield s) => s.IsNextDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0275")); + } + if (source2.Any((Skill_shield s) => s.IsSkillDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0276")); + } + if (source2.Any((Skill_shield s) => s.IsSpellDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0277")); + } + } + List source3 = (from s in allBuffSkills + where s is Skill_damage_cut && (!cardBase.IsInHand || s.OnWhenPlayStart == 0) + select (Skill_damage_cut)s).ToList(); + if (source3.Any()) + { + if (source3.Any((Skill_damage_cut s) => s.IsAllDamageCut)) + { + int num3 = -source3.Where((Skill_damage_cut s) => s.IsAllDamageCut).Sum((Skill_damage_cut s) => s.CutAmount); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0278", num3.ToString())); + } + if (source3.Any((Skill_damage_cut s) => s.IsNextDamageCut)) + { + int num4 = -source3.Where((Skill_damage_cut s) => s.IsNextDamageCut).Sum((Skill_damage_cut s) => s.CutAmount); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0279", num4.ToString())); + } + if (source3.Any((Skill_damage_cut s) => s.IsSkillDamageCut)) + { + int num5 = -source3.Where((Skill_damage_cut s) => s.IsSkillDamageCut).Sum((Skill_damage_cut s) => s.CutAmount); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0280", num5.ToString())); + } + if (source3.Any((Skill_damage_cut s) => s.IsDamageClipping)) + { + List list = (from s in source3 + where s.ClippingMax != int.MaxValue + select s.ClippingMax).ToList(); + if (source3.Any((Skill_damage_cut s) => !IsNotShowDamageCutLifeLowerLimitBuffDetail(s))) + { + list.AddRange(from s in source3 + where s.LifeLowerLimit != -1 + select (!(s.SkillPrm.ownerCard is UnitBattleCard)) ? (s.SkillPrm.ownerCard.SelfBattlePlayer.Class.Life - 1) : (s.SkillPrm.ownerCard.Life - 1)); + } + if (list.Any()) + { + int num6 = list.Min(); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0281", (num6 + 1).ToString(), num6.ToString())); + } + } + } + _buffLabel.text = stringBuilder.ToString(); + } + + public void SetBuffDetailLabelInReplay(List buffInfoTextTypeList, BattleCardBase card) + { + StringBuilder stringBuilder = new StringBuilder(); + if (!card.IsClass) + { + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Cost)) + { + int num = card.Cost - card.BaseCost; + string text = ((num > 0) ? ("+" + num) : num.ToString()); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0273", text)); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.StatusBuff)) + { + string retAttack = string.Empty; + string retLife = string.Empty; + BattleLogUtility.GetBuffValueStringFormatted(card.GetCurrentAtkBuff(), card.GetCurrentLifeBuff(), ref retAttack, ref retLife); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0040", retAttack, retLife)); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Quick)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0011")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Rush)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0012")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Killer)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0009")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Drain)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0006")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AttackCount)) + { + int value = buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AttackCount).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0018", value.ToString())); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.IgnoreGuard)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0008")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.ConsumeEpModifier)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0201")); + } + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0274")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0275")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0276")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.SpellDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0277")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageCut)) + { + int num2 = -buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageCut).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0278", num2.ToString())); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageCut)) + { + int num3 = -buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageCut).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0279", num3.ToString())); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageCut)) + { + int num4 = -buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageCut).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0280", num4.ToString())); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.DamageClipping)) + { + int value2 = buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.DamageClipping).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0281", (value2 + 1).ToString(), value2.ToString())); + } + _buffLabel.text = stringBuilder.ToString(); + } + + public static List GetAllBuffSkills(BattleCardBase cardBase, List buffSkills) + { + List list = new List(); + foreach (SkillBase buffSkill in buffSkills) + { + if (buffSkill is Skill_attach_skill) + { + IEnumerable source = from b in buffSkill.GetBuffInfoContainer() + where cardBase == b._targetCard + select b._attachSkill; + list.AddRange(GetAllBuffSkills(cardBase, source.Where((SkillBase s) => !cardBase.IsClass || !ExistClassSkillNeedBuffDetailText(s)).ToList())); + } + else + { + list.Add(buffSkill); + } + } + return list; + } + + public void AppendBuffText(StringBuilder buffTextsStringBuilder, string buffText) + { + if (buffTextsStringBuilder.Length > 0) + { + buffTextsStringBuilder.Append("\r\n"); + } + buffTextsStringBuilder.Append(buffText); + } + + public static bool NeedBuffDetailText(BattleCardBase cardBase) + { + if (cardBase is ClassBattleCardBase) + { + return cardBase.BuffInfoList.Any((BuffInfo s) => ExistClassSkillNeedBuffDetailText(s.SkillFrom)); + } + if (!cardBase.BuffInfoList.Exists((BuffInfo b) => ExistSkillNeedBuffDetailText(cardBase, b.SkillFrom))) + { + return NeedNoConsumeEpText(cardBase); + } + return true; + } + + public static bool IsNotShowDamageCutLifeLowerLimitBuffDetail(SkillBase skill) + { + bool num = skill is Skill_damage_cut { IsDamageClipping: not false } skill_damage_cut && skill_damage_cut.LifeLowerLimit != -1; + DataMgr.SpecialBattleSetting specialBattleSettingInfo = GameMgr.GetIns().GetDataMgr().SpecialBattleSettingInfo; + if (num && specialBattleSettingInfo != null && specialBattleSettingInfo.Id == "42") + { + return skill.SkillPrm.ownerCard is EnemyClassBattleCard; + } + return false; + } + + private static bool ExistSkillNeedBuffDetailText(BattleCardBase cardBase, SkillBase skill) + { + if (cardBase.IsInHand && skill.Option.Contains("(timing:when_play)")) + { + return false; + } + if (!(skill is Skill_quick) && !(skill is Skill_ignore_guard) && !(skill is Skill_attack_count) && !(skill is Skill_shield) && !(skill is Skill_damage_cut) && !(skill is Skill_rush) && !ExistSkillCostChangeNeedDetailText(cardBase, skill) && !(skill is Skill_consume_ep_modifier) && !(skill is Skill_killer) && !(skill is Skill_drain) && !ExistSKillPowerChangeNeedDetailText(cardBase, skill) && !ExistAttachSkillNeedDetailText(cardBase, skill)) + { + return ExistCopiedSkillNeedDetailText(cardBase); + } + return true; + } + + private static bool ExistClassSkillNeedBuffDetailText(SkillBase skill) + { + if (!(skill is Skill_shield)) + { + if (skill is Skill_damage_cut) + { + return !IsNotShowDamageCutLifeLowerLimitBuffDetail(skill); + } + return false; + } + return true; + } + + public static bool NeedNoConsumeEpText(BattleCardBase cardBase) + { + if (cardBase.BuffInfoList.Any((BuffInfo b) => b.SkillFrom is Skill_consume_ep_modifier)) + { + return true; + } + if (DetailPanelControl.IsNeedNoConsumeEp(cardBase)) + { + return true; + } + return false; + } + + private static bool ExistSKillPowerChangeNeedDetailText(BattleCardBase cardBase, SkillBase skill) + { + if (skill is Skill_powerup || skill is Skill_power_down) + { + int currentAtkBuff = cardBase.GetCurrentAtkBuff(); + int currentLifeBuff = cardBase.GetCurrentLifeBuff(); + if (currentAtkBuff == 0) + { + return currentLifeBuff != 0; + } + return true; + } + return false; + } + + private static bool ExistAttachSkillNeedDetailText(BattleCardBase cardBase, SkillBase skill) + { + if (skill is Skill_attach_skill) + { + return skill.GetBuffInfoContainer().Any((SkillBase.BuffInfoContainer b) => cardBase == b._targetCard && ExistSkillNeedBuffDetailText(cardBase, b._attachSkill)); + } + return false; + } + + public static bool ExistCopiedSkillNeedDetailText(BattleCardBase cardBase) + { + return cardBase.BuffInfoList.Any(delegate(BuffInfo b) + { + if (!b.IsCopied) + { + return false; + } + return b.SkillFrom is SkillBaseCopy skillBaseCopy && skillBaseCopy.IsNeedDetail; + }); + } + + private static bool ExistSkillCostChangeNeedDetailText(BattleCardBase cardBase, SkillBase skill) + { + if (skill is Skill_cost_change) + { + return cardBase.Cost != cardBase.BaseCost; + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/BuffInfo.cs b/SVSim.BattleEngine/Engine/BuffInfo.cs new file mode 100644 index 0000000..190ad8c --- /dev/null +++ b/SVSim.BattleEngine/Engine/BuffInfo.cs @@ -0,0 +1,119 @@ +using System.Collections.Generic; +using System.Linq; +using Wizard; + +public class BuffInfo +{ + public List CopiedSkillDescriptionValueList = new List(); + + public List CopiedEvoSkillDescriptionValueList = new List(); + + public int BaseCardIDFrom { get; private set; } + + public int CardIDFrom { get; private set; } + + public SkillBase SkillFrom { get; private set; } + + public BattleCardBase OwnerCard { get; private set; } + + public BattleCardBase PreviousOwner { get; private set; } + + public BattleCardBase TargetCard { get; set; } + + public bool IsCopied { get; set; } + + public bool IsPlayer { get; set; } + + public bool IsCopiedEvolutionSkill { get; set; } + + public bool IsEvolutionSkill { get; set; } + + public bool IsSaveBurialRiteSkill { get; set; } + + public bool IsGetonSkill { get; set; } + + public bool IsHiddenClassLogSkill { get; set; } + + public string DivergenceId { get; set; } + + public bool IsReserveTokenDrawSkill { get; set; } + + public BossRushSpecialSkill SpecialSkillInfo { get; set; } + + public BuffInfo(int fromBaseCardID, int fromCardID, SkillBase fromSkill, BattleCardBase ownerCard = null, bool isPlayer = false, string divergenceId = "") + { + BaseCardIDFrom = fromBaseCardID; + CardIDFrom = fromCardID; + SkillFrom = fromSkill; + PreviousOwner = null; + if (SkillFrom != null) + { + IsPlayer = SkillFrom.SkillPrm.ownerCard.IsPlayer; + IsEvolutionSkill = SkillFrom.SkillPrm.ownerCard.EvolutionSkills != null && SkillFrom.SkillPrm.ownerCard.EvolutionSkills.Any((SkillBase skill) => skill == SkillFrom); + DivergenceId = SkillFrom.OptionValue.GetOption(SkillFilterCreator.ContentKeyword.divergence_id, "_OPT_NULL_"); + OwnerCard = SkillFrom.SkillPrm.ownerCard; + } + else + { + IsPlayer = isPlayer; + DivergenceId = divergenceId; + OwnerCard = ownerCard; + } + } + + public string GetAttachFromCardName() + { + return CardMaster.GetInstanceForBattle().GetCardParameterFromId(BaseCardIDFrom).CardName; + } + + public void SetPreviousOwner(BattleCardBase card) + { + PreviousOwner = card; + } + + private BuffInfo(BuffInfo buff) + { + BaseCardIDFrom = buff.BaseCardIDFrom; + CardIDFrom = buff.CardIDFrom; + SkillFrom = buff.SkillFrom; + OwnerCard = buff.OwnerCard; + PreviousOwner = buff.PreviousOwner; + IsCopied = buff.IsCopied; + IsCopiedEvolutionSkill = buff.IsCopiedEvolutionSkill; + IsPlayer = buff.IsPlayer; + IsEvolutionSkill = buff.IsEvolutionSkill; + IsSaveBurialRiteSkill = buff.IsSaveBurialRiteSkill; + IsGetonSkill = buff.IsGetonSkill; + IsHiddenClassLogSkill = buff.IsHiddenClassLogSkill; + DivergenceId = buff.DivergenceId; + IsReserveTokenDrawSkill = buff.IsReserveTokenDrawSkill; + } + + public BuffInfo Clone() + { + return new BuffInfo(this); + } + + public bool IsBuffGaveSkill(SkillBase skill) + { + if (SkillFrom is SkillBaseCopy skillBaseCopy && skillBaseCopy.CopiedSkillList.Any((SkillBase s) => skill.IsSameSkill(s))) + { + return true; + } + return SkillFrom == skill; + } + + public BattleCardBase GetDisplayCard() + { + BattleCardBase result = OwnerCard; + if (PreviousOwner != null) + { + result = PreviousOwner; + } + if (IsSaveBurialRiteSkill || IsGetonSkill || IsReserveTokenDrawSkill) + { + result = TargetCard; + } + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/BuyCrystal.cs b/SVSim.BattleEngine/Engine/BuyCrystal.cs new file mode 100644 index 0000000..8c500a5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BuyCrystal.cs @@ -0,0 +1,116 @@ +using System; +using Cute; +using UnityEngine; +using Wizard; + +public class BuyCrystal : MonoBehaviour +{ + public static void CreateBuyCrystal(bool isPlaySe = true, string scrollToProductId = null, bool onlyInputBirthday = false, Action onCancel = null, Action onFinish = null, bool isSpecialCrystal = false) + { + if (isPlaySe) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + } + if (!onlyInputBirthday && Data.Load.data._userCrystalCount.EnableSpecialCrystal) + { + SpecialCrystalDialog.Create(UIManager.GetInstance().LegendCrystalBuyDialogPrefab, scrollToProductId, onCancel, onFinish); + } + else + { + InstantiateCrystalDialog(scrollToProductId, onlyInputBirthday, onCancel, onFinish, isSpecialCrystal); + } + } + + public static void InstantiateCrystalDialog(string scrollToProductId = null, bool onlyInputBirthday = false, Action onCancel = null, Action onFinish = null, bool isSpecialCrystal = false) + { + PaymentPC instance = PaymentPC.GetInstance(); + instance.initialize(); + instance.ProductListFailed += PaymentListErrorDialog; + instance.ProductListSucceeded += delegate + { + OpenItemList(scrollToProductId, onlyInputBirthday, onCancel, onFinish, isSpecialCrystal); + }; + } + + private static void CheckVideoHostingRunningAndOpenItemList(string scrollToProductid, bool onlyInputBirthday = false, Action onCancel = null, Action onFinish = null, bool isSpecialCrystal = false) + { + if (SingletonMonoBehaviour.instance.IsRecording() || SingletonMonoBehaviour.instance.IsPublising()) + { + VideoHostingUtil.CreateDialogPrivacyBuyCrystalEnter(delegate + { + OpenItemList(scrollToProductid, onlyInputBirthday, onCancel, onFinish, isSpecialCrystal); + }); + } + else + { + OpenItemList(scrollToProductid, onlyInputBirthday, onCancel, onFinish, isSpecialCrystal); + } + } + + private static void OpenItemList(string scrollToProductId, bool onlyInputBirthday = false, Action onCancel = null, Action onFinish = null, bool isSpecialCrystal = false) + { + BuyCrystal buyCrystal = UnityEngine.Object.Instantiate(UIManager.GetInstance().BuyCrystalPrefab); + UIManager.GetInstance().IsCrystalDialogExe = true; + DialogBase dialog = UIManager.GetInstance().CreateDialogClose(); + dialog.SetSize(DialogBase.Size.M); + dialog.SetTitleLabel(Data.SystemText.Get("Shop_0003")); + dialog.SetObj(buyCrystal.gameObject); + dialog.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialog.isNotCloseWindowButton1 = true; + dialog.SetButtonText(Data.SystemText.Get("Dia_BuyCrystal_001_Button")); + dialog.OnClose = delegate + { + if (!isSpecialCrystal || !onlyInputBirthday) + { + PaymentImpl.GetInstance().finalize(); + } + if (VideoHostingUtil.IsAutoPauseRecording() || VideoHostingUtil.IsAutoPausePublishing()) + { + VideoHostingUtil.CreateDialogPrivacyBuyCrystalExit(); + } + UIManager.GetInstance().IsCrystalDialogExe = false; + }; + UIManager.GetInstance().closeInSceneLoading(); + CreateItemList item_list = buyCrystal.gameObject.GetComponent(); + item_list.ParentDialogBase = dialog; + item_list.ScrollToProductId = scrollToProductId; + item_list.IsOnlyInputBirthday = onlyInputBirthday; + item_list.OnFinishUpdateBirthday = delegate + { + onFinish.Call(); + if (onlyInputBirthday) + { + dialog.Close(); + } + }; + dialog.onPushButton1 = delegate + { + item_list.BirthUpdateButtonClickCallBack(); + }; + dialog.onPushButton2 = delegate + { + item_list.BirthCancelButtonClickCallBack(); + }; + dialog.onCloseWithoutSelect = delegate + { + onCancel.Call(); + }; + } + + public static void PaymentListErrorDialog() + { + if (BattleManagerBase.GetIns() == null) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Shop_0094")); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetText(Data.SystemText.Get("Shop_0093")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(100); + } + } + + public void OnClickCredit() + { + } +} diff --git a/SVSim.BattleEngine/Engine/ByteReader.cs b/SVSim.BattleEngine/Engine/ByteReader.cs new file mode 100644 index 0000000..36b9c1a --- /dev/null +++ b/SVSim.BattleEngine/Engine/ByteReader.cs @@ -0,0 +1,203 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using UnityEngine; + +public class ByteReader +{ + private byte[] mBuffer; + + private int mOffset; + + private static BetterList mTemp = new BetterList(); + + public bool canRead + { + get + { + if (mBuffer != null) + { + return mOffset < mBuffer.Length; + } + return false; + } + } + + public ByteReader(byte[] bytes) + { + mBuffer = bytes; + } + + public ByteReader(TextAsset asset) + { + mBuffer = asset.bytes; + } + + public static ByteReader Open(string path) + { + FileStream fileStream = File.OpenRead(path); + if (fileStream != null) + { + fileStream.Seek(0L, SeekOrigin.End); + byte[] array = new byte[fileStream.Position]; + fileStream.Seek(0L, SeekOrigin.Begin); + fileStream.Read(array, 0, array.Length); + fileStream.Close(); + return new ByteReader(array); + } + return null; + } + + private static string ReadLine(byte[] buffer, int start, int count) + { + return Encoding.UTF8.GetString(buffer, start, count); + } + + public string ReadLine() + { + return ReadLine(skipEmptyLines: true); + } + + public string ReadLine(bool skipEmptyLines) + { + int num = mBuffer.Length; + if (skipEmptyLines) + { + while (mOffset < num && mBuffer[mOffset] < 32) + { + mOffset++; + } + } + int num2 = mOffset; + if (num2 < num) + { + int num3; + do + { + if (num2 < num) + { + num3 = mBuffer[num2++]; + continue; + } + num2++; + break; + } + while (num3 != 10 && num3 != 13); + string result = ReadLine(mBuffer, mOffset, num2 - mOffset - 1); + mOffset = num2; + return result; + } + mOffset = num; + return null; + } + + public Dictionary ReadDictionary() + { + Dictionary dictionary = new Dictionary(); + char[] separator = new char[1] { '=' }; + while (canRead) + { + string text = ReadLine(); + if (text == null) + { + break; + } + if (!text.StartsWith("//")) + { + string[] array = text.Split(separator, 2, StringSplitOptions.RemoveEmptyEntries); + if (array.Length == 2) + { + string key = array[0].Trim(); + string value = array[1].Trim().Replace("\\n", "\n"); + dictionary[key] = value; + } + } + } + return dictionary; + } + + public BetterList ReadCSV() + { + mTemp.Clear(); + string text = ""; + bool flag = false; + int num = 0; + while (canRead) + { + if (flag) + { + string text2 = ReadLine(skipEmptyLines: false); + if (text2 == null) + { + return null; + } + text2 = text2.Replace("\\n", "\n"); + text = text + "\n" + text2; + } + else + { + text = ReadLine(skipEmptyLines: true); + if (text == null) + { + return null; + } + text = text.Replace("\\n", "\n"); + num = 0; + } + int i = num; + for (int length = text.Length; i < length; i++) + { + switch (text[i]) + { + case ',': + if (!flag) + { + mTemp.Add(text.Substring(num, i - num)); + num = i + 1; + } + break; + case '"': + if (flag) + { + if (i + 1 >= length) + { + mTemp.Add(text.Substring(num, i - num).Replace("\"\"", "\"")); + return mTemp; + } + if (text[i + 1] != '"') + { + mTemp.Add(text.Substring(num, i - num).Replace("\"\"", "\"")); + flag = false; + if (text[i + 1] == ',') + { + i++; + num = i + 1; + } + } + else + { + i++; + } + } + else + { + num = i + 1; + flag = true; + } + break; + } + } + if (num < text.Length) + { + if (flag) + { + continue; + } + mTemp.Add(text.Substring(num, text.Length - num)); + } + return mTemp; + } + return null; + } +} diff --git a/SVSim.BattleEngine/Engine/CantPlayCardFilterInfo.cs b/SVSim.BattleEngine/Engine/CantPlayCardFilterInfo.cs new file mode 100644 index 0000000..77dc480 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CantPlayCardFilterInfo.cs @@ -0,0 +1,95 @@ +using System.Collections.Generic; +using System.Linq; +using Wizard; +using Wizard.Battle; + +public class CantPlayCardFilterInfo +{ + private BattlePlayerPair _playerPair; + + private SkillOptionValue _optionValue; + + private SkillConditionCheckerOption _checkerOption; + + private ISkillBattlePlayerFilter _playerFilter; + + private ISkillTargetFilter _targetFilter; + + private List _cardFilterList; + + private ValueWithOperator _cardId; + + private bool _hasCardIdFilter; + + public bool IsCantPlaySpell { get; private set; } + + public bool IsCantPlayField { get; private set; } + + public CantPlayCardFilterInfo(BattleCardBase owner, SkillBase skill) + { + _playerFilter = SkillFilterCreator.CreateBattlePlayerFilter(SkillFilterCreator.ContentKeyword.me); + _targetFilter = new SkillTargetHandFilter(); + _cardFilterList = CreateCardFilterList(skill.OptionValue); + _playerPair = new BattlePlayerPair(owner.SelfBattlePlayer, owner.OpponentBattlePlayer); + _optionValue = skill.OptionValue; + _checkerOption = new SkillConditionCheckerOption(); + _hasCardIdFilter = _cardFilterList.Any((ISkillCardFilter c) => c is SkillParameterBaseCardIdFilter); + IsCantPlaySpell = _cardFilterList.Any((ISkillCardFilter c) => c is SkillSpellFilter); + IsCantPlayField = _cardFilterList.Any((ISkillCardFilter c) => c is SkillFieldFilter); + } + + private List CreateCardFilterList(SkillOptionValue option) + { + List list = new List(); + switch (option.GetString(SkillFilterCreator.ContentKeyword.card_type)) + { + case "unit": + list.Add(new SkillUnitFilter()); + break; + case "class": + list.Add(new SkillClassFilter()); + break; + case "spell": + list.Add(new SkillSpellFilter()); + break; + case "field": + list.Add(new SkillFieldFilter()); + break; + case "all": + list.Add(new SkillAllCardFilter()); + break; + } + ValueWithOperator valueWithOperator = option.GetValueWithOperator(SkillFilterCreator.ContentKeyword.base_card_id); + if (valueWithOperator != null) + { + _cardId = new ValueWithOperator(option.ParseInt(valueWithOperator.Value).ToString(), valueWithOperator.Operator); + list.Add(new SkillParameterBaseCardIdFilter(_cardId.Value, _cardId.Operator)); + } + return list; + } + + public bool CheckCantPlay(BattleCardBase targetCard) + { + IEnumerable battlePlayerInfos = _playerFilter.Filtering(_playerPair); + IEnumerable enumerable = _targetFilter.Filtering(battlePlayerInfos, _checkerOption); + for (int i = 0; i < _cardFilterList.Count; i++) + { + enumerable = _cardFilterList[i].Filtering(enumerable, _optionValue); + } + return enumerable.Any((IReadOnlyBattleCardInfo c) => c.IsPlayer == targetCard.IsPlayer && c.Index == targetCard.Index); + } + + public bool CheckCantPlayTransformId(BattleCardBase originalCard) + { + if (!_hasCardIdFilter || _cardId == null) + { + return false; + } + Skill_transform accelerateOrCrystallizeTransformSkill = originalCard.GetAccelerateOrCrystallizeTransformSkill(); + if (accelerateOrCrystallizeTransformSkill == null) + { + return false; + } + return SkillCompareFuncCreator.Create(_cardId.Operator)(_optionValue.ParseInt(_cardId.Value), accelerateOrCrystallizeTransformSkill.TransformId); + } +} diff --git a/SVSim.BattleEngine/Engine/CardBasePrm.cs b/SVSim.BattleEngine/Engine/CardBasePrm.cs new file mode 100644 index 0000000..a20a3cd --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardBasePrm.cs @@ -0,0 +1,317 @@ +using System; +using System.Collections.Generic; +using Wizard; + +public static class CardBasePrm +{ + public enum CharaType + { + CLASS = 0, + NORMAL = 1, + FIELD = 2, + CHANT_FIELD = 3, + SPELL = 4, + EVOLUTION = 5, + MAX = 6, + NONE = 6 + } + + public enum ClanType + { + ALL = 0, + MIN = 1, + ELF = 1, + ROYAL = 2, + WITCH = 3, + DRAGON = 4, + NECRO = 5, + VAMPIRE = 6, + BISHOP = 7, + NEMESIS = 8, + MAX = 9, + NONE = 10, + SHADOW = 99 + } + + public enum TribeType + { + ALL = 0, + LORD = 1, + LEGION = 2, + WHITE_RITUAL = 3, + MANARIA = 4, + ARTIFACT = 5, + LOOTING = 6, + MACHINE = 7, + FOOD = 8, + LEVIN = 9, + NATURE = 10, + BANQUET = 11, + HERO = 12, + ARMED = 13, + CHESS = 14, + HELLBOUND = 15, + SCHOOL = 16, + MAX = 17, + NONE = 17 + } + + public enum TribeChangeType + { + CHANGE, + ADD + } + + public class TribeInfo + { + public List TribeTypeList { get; private set; } + + public TribeChangeType ChangeType { get; private set; } + + public TribeInfo(List tribe, TribeChangeType type) + { + TribeTypeList = tribe; + ChangeType = type; + } + } + + public const int MAX_LIFE = 20; + + public const int BERSERK_COUNT = 10; + + public const int AVARICE_COUNT = 2; + + public const int WRATH_COUNT = 7; + + public const int AWAKE_PP = 7; + + public const int MAX_DRAW_CARD = 8; + + private static List _defaultType; + + public static List DefaultType + { + get + { + if (_defaultType == null) + { + _defaultType = new List { TribeType.ALL }; + } + return _defaultType; + } + } + + public static CharaType ToStrCharaType(string str) + { + CharaType result = CharaType.MAX; + try + { + result = (CharaType)Enum.Parse(typeof(CharaType), str); + } + catch + { + } + return result; + } + + public static bool ToBoolIsFoil(string str) + { + int num = int.Parse(str); + bool result = false; + if (num == 1) + { + result = true; + } + return result; + } + + public static ClanType ToStrClanType(string str) + { + int value = int.Parse(str); + ClanType result = ClanType.NONE; + try + { + result = (ClanType)Enum.ToObject(typeof(ClanType), value); + } + catch + { + } + return result; + } + + public static bool ClanTypeIsUseable(ClanType type) + { + if (type >= ClanType.MIN) + { + return type < ClanType.MAX; + } + return false; + } + + public static TribeType ToStrTribeType(string str) + { + TribeType result = TribeType.MAX; + try + { + result = (TribeType)Enum.Parse(typeof(TribeType), str); + } + catch + { + } + return result; + } + + public static ClanType GetClanType(string clan) + { + using (IEnumerator enumerator = ((IEnumerable)clan.Split('.', '=')).GetEnumerator()) + { + while (enumerator.MoveNext()) + { + switch (enumerator.Current) + { + case "all": + return ClanType.ALL; + case "elf": + return ClanType.MIN; + case "royal": + return ClanType.ROYAL; + case "witch": + return ClanType.WITCH; + case "dragon": + return ClanType.DRAGON; + case "necro": + return ClanType.NECRO; + case "vampire": + return ClanType.VAMPIRE; + case "bishop": + return ClanType.BISHOP; + case "nemesis": + return ClanType.NEMESIS; + } + } + } + return ClanType.NONE; + } + + public static List CreateTribeTypeList(string tribe, bool isTribeCheck = false, bool notEqual = false) + { + string text = ""; + List list = new List(); + if (isTribeCheck) + { + text = (notEqual ? "tribe!=" : "tribe="); + } + if (tribe.Contains(text + "all")) + { + list.Add(TribeType.ALL); + } + if (tribe.Contains(text + "legion")) + { + list.Add(TribeType.LEGION); + } + if (tribe.Contains(text + "lord")) + { + list.Add(TribeType.LORD); + } + if (tribe.Contains(text + "white_ritual")) + { + list.Add(TribeType.WHITE_RITUAL); + } + if (tribe.Contains(text + "manaria")) + { + list.Add(TribeType.MANARIA); + } + if (tribe.Contains(text + "artifact")) + { + list.Add(TribeType.ARTIFACT); + } + if (tribe.Contains(text + "looting")) + { + list.Add(TribeType.LOOTING); + } + if (tribe.Contains(text + "machine")) + { + list.Add(TribeType.MACHINE); + } + if (tribe.Contains(text + "food")) + { + list.Add(TribeType.FOOD); + } + if (tribe.Contains(text + "levin")) + { + list.Add(TribeType.LEVIN); + } + if (tribe.Contains(text + "nature")) + { + list.Add(TribeType.NATURE); + } + if (tribe.Contains(text + "banquet")) + { + list.Add(TribeType.BANQUET); + } + if (tribe.Contains(text + "hero")) + { + list.Add(TribeType.HERO); + } + if (tribe.Contains(text + "armed")) + { + list.Add(TribeType.ARMED); + } + if (tribe.Contains(text + "chess")) + { + list.Add(TribeType.CHESS); + } + if (tribe.Contains(text + "hellbound")) + { + list.Add(TribeType.HELLBOUND); + } + if (tribe.Contains(text + "school")) + { + list.Add(TribeType.SCHOOL); + } + if (list.Count == 0) + { + list.Add(TribeType.MAX); + } + return list; + } + + public static bool IsFollowerCard(CharaType type) + { + return type == CharaType.NORMAL; + } + + public static bool IsSpellCard(CharaType type) + { + return type == CharaType.SPELL; + } + + public static bool IsAmuletCard(CharaType type) + { + if (type != CharaType.FIELD) + { + return type == CharaType.CHANT_FIELD; + } + return true; + } + + public static string GetCardTypeName(CharaType type) + { + string result = string.Empty; + switch (type) + { + case CharaType.NORMAL: + case CharaType.EVOLUTION: + result = Data.SystemText.Get("Card_0044"); + break; + case CharaType.SPELL: + result = Data.SystemText.Get("Card_0045"); + break; + case CharaType.FIELD: + case CharaType.CHANT_FIELD: + result = Data.SystemText.Get("Card_0046"); + break; + } + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/CardCreatorBase.cs b/SVSim.BattleEngine/Engine/CardCreatorBase.cs new file mode 100644 index 0000000..467c2c8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardCreatorBase.cs @@ -0,0 +1,404 @@ +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Card; +using Wizard.Battle.Resource; + +public class CardCreatorBase +{ + private class CardTypeBuildInfo + { + public bool isActive; + + public Vector3 localPosition; + + public Vector3 localScale; + + public Quaternion localRotation; + + public Transform parent; + } + + private readonly GameObject _cardRootObject; + + protected static Dictionary _classIconCache = new Dictionary(); + + private static BattleCardBase _dummyCardInstance; + + public static Material GetSharedClassIconMaterial(CardBasePrm.ClanType clanType) + { + Material material; + if (_classIconCache.ContainsKey(clanType)) + { + material = _classIconCache[clanType]; + if (material == null || material.mainTexture == null) + { + if (material != null) + { + Object.Destroy(material); + } + _classIconCache.Remove(clanType); + } + material = null; + } + if (_classIconCache.ContainsKey(clanType)) + { + material = _classIconCache[clanType]; + } + else + { + material = Object.Instantiate(Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("CardFrameClassIcon", ResourcesManager.AssetLoadPathType.CardFrameMaterialPlus, isfetch: true)) as Material); + material.mainTexture = ClassCharaPrm.GetClassIconTexture((int)clanType); + _classIconCache[clanType] = material; + } + return material; + } + + public CardCreatorBase(GameObject cardRootObject) + { + _cardRootObject = cardRootObject; + } + + public GameObject LoadRootObject() + { + return _cardRootObject; + } + + public static BattleCardBase CreateCard(int cardId, bool isPlayer, int index, SBattleLoad sBattleLoad, BattleManagerBase battleMgr, IBattleResourceMgr resourceMgr, IInnerOptionsBuilder innerOptionsBuilder, bool isChoiceBrave = false) + { + bool flag = !isPlayer; + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + CardBasePrm.CharaType charType = cardParameterFromId.CharType; + CardCreatorBase cardCreatorBase = null; + switch (charType) + { + case CardBasePrm.CharaType.NORMAL: + cardCreatorBase = new UnitCardCreator(sBattleLoad.UnitCardTemplate.gameObject); + break; + case CardBasePrm.CharaType.FIELD: + case CardBasePrm.CharaType.CHANT_FIELD: + cardCreatorBase = new FieldCardCreator(sBattleLoad.FieldCardTemplate.gameObject); + break; + case CardBasePrm.CharaType.SPELL: + cardCreatorBase = new SpellCardCreator(sBattleLoad.SpellCardTemplate.gameObject); + break; + default: + return null; + } + GameObject gobj = cardCreatorBase.LoadRootObject(); + GameObject gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(gobj, BattleManagerBase.GetIns().Battle3DContainer); + CardTemplate component = gameObject.GetComponent(); + if (flag && !GameMgr.GetIns().IsWatchBattle && !sBattleLoad.isDbgEnableEnemyHandView && !GameMgr.GetIns().IsAdmin) + { + gameObject.GetComponent().CardNormalLodGroup.enabled = false; + } + GameObject gameObject2 = component.CardNormalTemp.gameObject; + if (charType == CardBasePrm.CharaType.NORMAL) + { + gameObject2.SetActive(value: false); + } + component.NormalCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + if (charType == CardBasePrm.CharaType.NORMAL) + { + component.EvolCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + } + Transform transform = gameObject.transform.Find("CardObj"); + Transform transform2 = gameObject.transform.Find("Collider"); + string tag = (transform.tag = (gameObject2.tag = (flag ? "Enemy" : "Player"))); + transform2.tag = tag; + GameObject gameObject3 = null; + if (component.LifeLabelTemp != null) + { + gameObject3 = component.LifeLabelTemp.transform.parent.gameObject; + } + UILabel lifeLabelTemp = component.LifeLabelTemp; + if (lifeLabelTemp != null) + { + lifeLabelTemp.text = cardParameterFromId.Life.ToString(); + } + if (gameObject3 != null) + { + gameObject3.SetActive(value: false); + } + if (isChoiceBrave) + { + component.SetEffectColor(Global.CARD_HBP_LABEL_COST_COLOR); + } + if (cardParameterFromId.IsVariableCost) + { + component.NormalSignLabelTemp.text = "-"; + component.NormalSignedCostLabelTemp.text = "X"; + component.ShowSignedCostLabel(); + component.NormalChoiceBraveNameLabelTemp.text = cardParameterFromId.CardName; + component.ShowChoiceBraveNameLabel(); + } + else if (isChoiceBrave) + { + if (cardParameterFromId.Cost != 0) + { + component.NormalSignLabelTemp.text = ((cardParameterFromId.Cost > 0) ? "-" : "+"); + component.NormalSignedCostLabelTemp.text = Mathf.Abs(cardParameterFromId.Cost).ToString(); + component.ShowSignedCostLabel(); + } + else + { + component.NormalZeroCostLabelTemp.text = "0"; + component.ShowZeroCostLabel(); + } + component.NormalChoiceBraveNameLabelTemp.text = cardParameterFromId.CardName; + component.ShowChoiceBraveNameLabel(); + } + else + { + component.NormalCostLabelTemp.text = cardParameterFromId.Cost.ToString(); + component.NormalNameLabelTemp.text = cardParameterFromId.CardName; + } + component.SetNumberLabelStyle(cardParameterFromId.IsFoil); + component.SetNameLabelStyle(cardParameterFromId.IsFoil, isChoiceBrave); + component.SetRepositionNameLabel(cardParameterFromId.CardName, isChoiceBrave); + if (charType == CardBasePrm.CharaType.NORMAL) + { + component.NormalLifeLabelTemp.text = lifeLabelTemp.text; + GameObject gameObject4 = component.AtkLabelTemp.transform.parent.gameObject; + UILabel atkLabelTemp = component.AtkLabelTemp; + atkLabelTemp.text = cardParameterFromId.Atk.ToString(); + gameObject4.SetActive(value: false); + component.NormalAtkLabelTemp.text = atkLabelTemp.text; + } + UILabel component2 = gameObject2.transform.Find("Cost(Clone)").Find("CostLabel").GetComponent(); + if (charType == CardBasePrm.CharaType.NORMAL) + { + UILabel component3 = gameObject2.transform.Find("Life(Clone)").Find("LifeLabel").GetComponent(); + UILabel component4 = gameObject2.transform.Find("Atk(Clone)").Find("AtkLabel").GetComponent(); + GameObject gameObject5 = component2.gameObject; + GameObject gameObject6 = component3.gameObject; + int num = (component4.gameObject.layer = 12); + int layer = (gameObject6.layer = num); + gameObject5.layer = layer; + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(component.NormalAtkLabelTemp, cardParameterFromId.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(component.NormalLifeLabelTemp, cardParameterFromId.IsFoil); + } + return CreateCard(cardId, gameObject, index, isPlayer, battleMgr, component, transform, innerOptionsBuilder, isChoiceBrave); + } + + public static BattleCardBase CreateSpecialSkillCard(int cardId, bool isPlayer, int index, SBattleLoad sBattleLoad, BattleManagerBase battleMgr, IBattleResourceMgr resourceMgr, IInnerOptionsBuilder innerOptionsBuilder, BossRushSpecialSkill skill) + { + bool flag = !isPlayer; + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + _ = cardParameterFromId.CharType; + GameObject gobj = new SpecialSkillCardCreator(sBattleLoad.SpellCardTemplate.gameObject).LoadRootObject(); + GameObject gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(gobj, BattleManagerBase.GetIns().Battle3DContainer); + CardTemplate component = gameObject.GetComponent(); + if (flag && !GameMgr.GetIns().IsWatchBattle && !sBattleLoad.isDbgEnableEnemyHandView && !GameMgr.GetIns().IsAdmin) + { + gameObject.GetComponent().CardNormalLodGroup.enabled = false; + } + GameObject gameObject2 = component.CardNormalTemp.gameObject; + component.NormalCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + Transform transform = gameObject.transform.Find("CardObj"); + Transform transform2 = gameObject.transform.Find("Collider"); + string tag = (transform.tag = (gameObject2.tag = (flag ? "Enemy" : "Player"))); + transform2.tag = tag; + GameObject gameObject3 = null; + if (component.LifeLabelTemp != null) + { + gameObject3 = component.LifeLabelTemp.transform.parent.gameObject; + } + UILabel lifeLabelTemp = component.LifeLabelTemp; + if (lifeLabelTemp != null) + { + lifeLabelTemp.text = cardParameterFromId.Life.ToString(); + } + if (gameObject3 != null) + { + gameObject3.SetActive(value: false); + } + component.NormalCostLabelTemp.text = cardParameterFromId.Cost.ToString(); + component.NormalNameLabelTemp.text = skill.Name; + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(component.NormalCostLabelTemp, cardParameterFromId.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(component.NormalNameLabelTemp, cardParameterFromId.IsFoil); + Global.SetRepositionNameLabel(component.NormalNameLabelTemp, skill.Name, is2D: false); + string tag2; + if (isPlayer) + { + tag2 = "Player"; + gameObject.name = "P0"; + } + else + { + tag2 = "Enemy"; + gameObject.name = "E0"; + } + CardTypeBuildInfo cardTypeBuildInfo = CreateCardTypeBuildInfo(cardParameterFromId.CharType, isPlayer); + gameObject.SetActive(cardTypeBuildInfo.isActive); + gameObject.transform.localPosition = cardTypeBuildInfo.localPosition; + gameObject.transform.localScale = cardTypeBuildInfo.localScale; + gameObject.transform.localRotation = cardTypeBuildInfo.localRotation; + gameObject.transform.parent = cardTypeBuildInfo.parent; + gameObject.tag = tag2; + transform.tag = tag2; + transform.transform.Find("NormalField").tag = tag2; + transform.transform.Find("EvolField").tag = tag2; + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(cardParameterFromId); + BattleCardBase.BuildInfo buildInfo = new BattleCardBase.BuildInfo(gameObject, cardId, battleMgr.GetBattlePlayer(isPlayer), battleMgr.GetBattlePlayer(!isPlayer), battleMgr.GetBattlePlayer(isPlayer), cardSkillsBuildInfo.normalSkillBuildInfos, cardSkillsBuildInfo.evolveSkillBuildInfos, isPlayer, 0, innerOptionsBuilder.CreateCardOptions(), battleMgr, battleMgr.BattleResourceMgr); + SpecialSkillBattleCard specialSkillBattleCard = new SpecialSkillBattleCard(skill, buildInfo); + specialSkillBattleCard.Setup(createNullView: true); + return specialSkillBattleCard; + } + + public static BattleCardBase CreateCard(int cardId, GameObject gameObject, int battleCardIndex, bool isPlayer, BattleManagerBase battleMgr, CardTemplate CardTemplateIns, Transform parentObject, IInnerOptionsBuilder innerOptionsBuilder, bool isChoiceBrave) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + string tag; + if (isPlayer) + { + tag = "Player"; + gameObject.name = "P" + battleCardIndex; + } + else + { + tag = "Enemy"; + gameObject.name = "E" + battleCardIndex; + } + CardTypeBuildInfo cardTypeBuildInfo = CreateCardTypeBuildInfo(cardParameterFromId.CharType, isPlayer); + gameObject.SetActive(cardTypeBuildInfo.isActive); + gameObject.transform.localPosition = cardTypeBuildInfo.localPosition; + gameObject.transform.localScale = cardTypeBuildInfo.localScale; + gameObject.transform.localRotation = cardTypeBuildInfo.localRotation; + gameObject.transform.parent = cardTypeBuildInfo.parent; + gameObject.tag = tag; + parentObject.tag = tag; + if (cardParameterFromId.CharType == CardBasePrm.CharaType.NORMAL) + { + CardTemplateIns.CardNormalTemp.tag = tag; + CardTemplateIns.CardNormalTemp.gameObject.SetActive(value: true); + } + parentObject.transform.Find("NormalField").tag = tag; + parentObject.transform.Find("EvolField").tag = tag; + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(cardParameterFromId); + return CreateBase(new BattleCardBase.BuildInfo(gameObject, cardId, battleMgr.GetBattlePlayer(isPlayer), battleMgr.GetBattlePlayer(!isPlayer), battleMgr.GetBattlePlayer(isPlayer), cardSkillsBuildInfo.normalSkillBuildInfos, cardSkillsBuildInfo.evolveSkillBuildInfos, isPlayer, battleCardIndex, innerOptionsBuilder.CreateCardOptions(), battleMgr, battleMgr.BattleResourceMgr), createNullView: false, isChoiceBrave); + } + + private static BattleCardBase CreateCardWithoutResources(int cardId, int battleCardIndex, bool isPlayer, BattleManagerBase battleMgr, IInnerOptionsBuilder innerOptionsBuilder) + { + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId)); + return CreateBase(new BattleCardBase.BuildInfo(null, cardId, battleMgr.GetBattlePlayer(isPlayer), battleMgr.GetBattlePlayer(!isPlayer), battleMgr.GetBattlePlayer(isPlayer), cardSkillsBuildInfo.normalSkillBuildInfos, cardSkillsBuildInfo.evolveSkillBuildInfos, isPlayer, battleCardIndex, innerOptionsBuilder.CreateCardOptions(), battleMgr, battleMgr.BattleResourceMgr), createNullView: true); + } + + public static BattleCardBase CreateVirtualClass(bool isPlayer, BattleManagerBase battleMgr, IInnerOptionsBuilder innerOptionsBuilder) + { + return new VirtualClassBattleCard(new ClassBattleCardBase.ClassBuildInfo(isPlayer, 20, battleMgr.GetBattlePlayer(isPlayer), battleMgr.GetBattlePlayer(!isPlayer), battleMgr, NullBattleResourceMgr.GetInstance())); + } + + public static BattleCardBase CreateVirtualCard(int cardId, int index, bool isPlayer, BattleManagerBase battleMgr, BattlePlayerBase selfBattlePlayer, BattlePlayerBase opponentBattlePlayer, IInnerOptionsBuilder innerOptionsBuilder) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(cardParameterFromId); + BattleCardBase.BuildInfo buildInfo = new BattleCardBase.BuildInfo(null, cardId, selfBattlePlayer, opponentBattlePlayer, selfBattlePlayer, cardSkillsBuildInfo.normalSkillBuildInfos, cardSkillsBuildInfo.evolveSkillBuildInfos, isPlayer, index, innerOptionsBuilder.CreateCardOptions(), battleMgr, NullBattleResourceMgr.GetInstance()); + BattleCardBase battleCardBase; + switch (cardParameterFromId.CharType) + { + case CardBasePrm.CharaType.NORMAL: + case CardBasePrm.CharaType.EVOLUTION: + battleCardBase = new VirtualUnitBattleCard(buildInfo); + break; + case CardBasePrm.CharaType.FIELD: + battleCardBase = new VirtualFieldBattleCard(buildInfo); + break; + case CardBasePrm.CharaType.CHANT_FIELD: + battleCardBase = new VirtualChantFieldBattleCard(buildInfo); + break; + case CardBasePrm.CharaType.SPELL: + battleCardBase = new VirtualSpellBattleCard(buildInfo, isChoiceBrave: false); + break; + default: + battleCardBase = NullBattleCard.Create(); + break; + } + battleCardBase.Setup(); + return battleCardBase; + } + + public static BattleCardBase CreateToken(BattleCardBase.BuildInfo buildInfo, bool createNullView = false) + { + return CreateBase(buildInfo, createNullView); + } + + private static BattleCardBase CreateBase(BattleCardBase.BuildInfo buildInfo, bool createNullView = false, bool isChoiceBrave = false) + { + BattleCardBase battleCardBase; + switch (CardMaster.GetInstanceForBattle().GetCardParameterFromId(buildInfo.CardId).CharType) + { + case CardBasePrm.CharaType.NORMAL: + case CardBasePrm.CharaType.EVOLUTION: + battleCardBase = new UnitBattleCard(buildInfo); + break; + case CardBasePrm.CharaType.FIELD: + battleCardBase = new FieldBattleCard(buildInfo); + break; + case CardBasePrm.CharaType.CHANT_FIELD: + battleCardBase = new ChantFieldBattleCard(buildInfo); + break; + case CardBasePrm.CharaType.SPELL: + battleCardBase = new SpellBattleCard(buildInfo, isChoiceBrave); + battleCardBase.IsChoiceBraveSkillCard = isChoiceBrave; + break; + default: + battleCardBase = NullBattleCard.Create(); + break; + } + battleCardBase.Setup(createNullView); + return battleCardBase; + } + + public static BattleCardBase CreateDummyInstance() + { + return NullBattleCard.Create(); + } + + public static BattleCardBase GetDummyInstance() + { + if (_dummyCardInstance == null) + { + _dummyCardInstance = NullBattleCard.Create(); + } + return _dummyCardInstance; + } + + private static CardTypeBuildInfo CreateCardTypeBuildInfo(CardBasePrm.CharaType type, bool isPlayer) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + CardTypeBuildInfo cardTypeBuildInfo = new CardTypeBuildInfo(); + if (type == CardBasePrm.CharaType.CLASS) + { + cardTypeBuildInfo.isActive = true; + cardTypeBuildInfo.localPosition = (isPlayer ? new Vector3(0f, -400f, 30f) : new Vector3(0f, 420f, 30f)); + cardTypeBuildInfo.localScale = Global.CLASS_BATTLE_SCALE; + cardTypeBuildInfo.localRotation = Quaternion.identity; + cardTypeBuildInfo.parent = ins.Battle3DContainer.transform; + } + else + { + cardTypeBuildInfo.isActive = false; + cardTypeBuildInfo.localPosition = (isPlayer ? ins.CardHolder.transform.localPosition : ins.ECardHolder.transform.localPosition); + cardTypeBuildInfo.localScale = Global.CARD_BATTLE_SCALE; + cardTypeBuildInfo.localRotation = Quaternion.Euler(0f, -90f, 90f); + cardTypeBuildInfo.parent = ins.PCardPlace.transform; + } + return cardTypeBuildInfo; + } + + public static void SetupClassMaterialToCenterCharacterMesh(MeshRenderer insideMesh, MeshRenderer outsideMesh, Material cardArtMaterial, Material cardFrameMaterial) + { + Material[] materials = insideMesh.materials; + Material[] materials2 = outsideMesh.materials; + cardFrameMaterial.shader = Shader.Find(cardFrameMaterial.shader.name); + cardArtMaterial.shader = Shader.Find(cardArtMaterial.shader.name); + materials2[0] = cardFrameMaterial; + materials[0] = cardArtMaterial; + insideMesh.materials = materials; + outsideMesh.materials = materials2; + } +} diff --git a/SVSim.BattleEngine/Engine/CardDataModel.cs b/SVSim.BattleEngine/Engine/CardDataModel.cs new file mode 100644 index 0000000..fdf8383 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDataModel.cs @@ -0,0 +1,104 @@ +using System.Collections.Generic; + +public class CardDataModel +{ + public int Index { get; set; } + + public int CardId { get; set; } + + public int RedrawCardPosition { get; set; } + + public bool isOpponent { get; set; } + + public NetworkBattleDefine.NetworkCardPlaceState fromState { get; set; } + + public List ToStateList { get; set; } + + public int skillCardIndex { get; set; } + + public int publishedActiveSkillCount { get; set; } + + public int skillMovementNum { get; set; } + + public bool IsAttachSkill { get; set; } + + public int skillAttachCardIndex { get; set; } + + public int skillAttachSkillIndex { get; set; } + + public List skillKeyCardIdxList { get; set; } + + public List SkillKeyCardIdList { get; set; } + + public int playCardCost { get; set; } + + public int? AddLife { get; set; } + + public int? SetLife { get; set; } + + public int? AddAtk { get; set; } + + public int? SetAtk { get; set; } + + public int Clan { get; set; } + + public string Tribe { get; set; } + + public bool IsOpen { get; set; } + + public int Spellboost { get; set; } = -1; + + public int? AddChantCount { get; set; } + + public int? SetChantCount { get; set; } + + public int UnionBurstCount { get; set; } + + public int SkyboundArtCount { get; set; } + + public int SkillIndex { get; set; } + + public string AttachTarget { get; private set; } + + public int RandomTargetIndex { get; set; } = -1; + + public List FusionIngredientList { get; set; } + + public bool IsInvoked { get; set; } + + public bool IsGotUnapproved { get; set; } + + public int SkillCallCount { get; set; } + + public int SkillValueCount { get; set; } + + public int? SkillValueParameter { get; set; } + + public int activate { get; set; } + + public bool IsHighlander { get; set; } + + public CardDataModel() + { + Clan = -1; + Tribe = "NONE"; + playCardCost = -1; + publishedActiveSkillCount = -1; + SkillCallCount = -1; + SkillValueCount = -1; + SkillValueParameter = null; + activate = -1; + SkillIndex = -1; + IsHighlander = false; + ToStateList = new List(); + skillKeyCardIdxList = new List(); + SkillKeyCardIdList = new List(); + UnionBurstCount = -1; + SkyboundArtCount = -1; + } + + public void SetAttachTarget(string attach) + { + AttachTarget = attach; + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailBase.cs b/SVSim.BattleEngine/Engine/CardDetailBase.cs new file mode 100644 index 0000000..1261e57 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailBase.cs @@ -0,0 +1,188 @@ +using System; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.View; + +public class CardDetailBase : MonoBehaviour +{ + [Serializable] + public class BgSizeInfo + { + public int Line; + + public int BgSize; + } + + [Serializable] + public class DetailPanelInfo + { + public GameObject _root; + + public UILabel _nameLabel; + + public UITexture _logImage; + + public UIScrollView _scrollView; + + public UISprite _bg; + + public int _maxLine; + + public UIPanel DiscPanelObject; + + public UILabel DiscLabel; + + public BoxCollider DiscCollider; + + public UIScrollBar DiscScrollBar; + + public int DefaultBgHeight; + + public UILabel _costLabel; + + public UILabel _signLabel; + + public UILabel _zeroCostLabel; + + public UILabel _signedCostLabel; + + public UISprite _costSprite; + + public UILabel _classLabel; + + public UISprite _classBG; + + public GameObject _myRotationInfo; + + public UILabel _myRotationClassLabel; + + public GameObject _myRotationBonusIconOriginal; + + public UIGrid _myRotationBonusIconGrid; + + public FlexibleGrid _myRotationInfoGrid; + + public UIRect RootAnchor; + + public void Initialize() + { + } + } + + private const int EVO_OR_FUSION_BUTTON_OFFSET = 65; + + private const int CLASS_LABEL_HEIGHT = 89; + + private const int PANEL_BOTTOM__ANCHOR = 4; + + private const int PANEL_BOTTOM__ANCHOR_SCROLL = 16; + + [SerializeField] + protected DetailPanelInfo _followerPanel; + + [SerializeField] + protected DetailPanelInfo _followerEvoPanel; + + [SerializeField] + protected DetailPanelInfo _nonFollowerPanel; + + protected void SetFollowerDetailLabel(string skillDisc, string evoSkillDisc, bool needEvolutionOrFusionButton, bool resetScrollPosition = true) + { + _nonFollowerPanel._root.SetActive(value: false); + _followerPanel._root.SetActive(value: true); + _followerEvoPanel._root.SetActive(value: true); + int num = CheckTextLineCount(_followerPanel.DiscLabel, skillDisc); + int num2 = CheckTextLineCount(_followerEvoPanel.DiscLabel, evoSkillDisc); + if (num >= _followerPanel._maxLine && num2 < _followerEvoPanel._maxLine) + { + num = Mathf.Min(9 - num2, num); + } + else if (num < _followerPanel._maxLine && num2 >= _followerEvoPanel._maxLine) + { + num2 = Mathf.Min(9 - num, num2); + } + else if (num >= _followerPanel._maxLine && num2 >= _followerEvoPanel._maxLine) + { + num = _followerPanel._maxLine; + num2 = _followerEvoPanel._maxLine; + } + SetDescLabelText(_followerPanel, skillDisc, num, needEvolutionOrFusionButton: false, resetScrollPosition); + SetDescLabelText(_followerEvoPanel, evoSkillDisc, num2, needEvolutionOrFusionButton, resetScrollPosition); + _followerEvoPanel.RootAnchor.UpdateAnchors(); + } + + protected void SetDescLabelText(DetailPanelInfo panel, string discText, bool needEvolutionOrFusionButton = false, bool resetScrollPosition = true, bool isClass = false) + { + SetDescLabelText(panel, discText, panel._maxLine, needEvolutionOrFusionButton, resetScrollPosition, isClass); + } + + protected void SetDescLabelText(DetailPanelInfo panel, string discText, int maxLine, bool needEvolutionOrFusionButton = false, bool resetScrollPosition = true, bool isClass = false) + { + UILabel discLabel = panel.DiscLabel; + UIScrollView scrollView = panel._scrollView; + UISprite bg = panel._bg; + discLabel.text = Global.GetConvertWrapText(discLabel, discText); + discLabel.ProcessText(); + int textLineCount = Global.GetTextLineCount(discLabel.processedText); + bool flag = textLineCount > maxLine; + if (bg != null) + { + bg.height = panel.DefaultBgHeight + Mathf.Min(textLineCount, maxLine) * (panel.DiscLabel.fontSize + panel.DiscLabel.spacingY); + if (needEvolutionOrFusionButton) + { + bg.height += 65; + } + if (isClass) + { + bg.height = 89; + } + bg.gameObject.SetActive(value: false); + bg.gameObject.SetActive(value: true); + bg.ResetAndUpdateAnchors(); + } + panel.DiscPanelObject.bottomAnchor.absolute = (flag ? 16 : 4) + (needEvolutionOrFusionButton ? 65 : 0); + panel.DiscPanelObject.gameObject.SetActive(value: false); + panel.DiscPanelObject.gameObject.SetActive(value: true); + panel.DiscPanelObject.UpdateAnchors(); + scrollView.enabled = flag; + panel.DiscScrollBar.gameObject.SetActive(flag); + if (resetScrollPosition) + { + scrollView.ResetPosition(); + } + scrollView.UpdateScrollbars(); + } + + private int CheckTextLineCount(UILabel label, string discText) + { + label.text = Global.GetConvertWrapText(label, discText); + label.ProcessText(); + return Global.GetTextLineCount(label.processedText); + } + + protected void SetDetailKeywordEvents(Action onClick, BattleCardBase card, CardParameter baseParameter, DetailPanelControl control) + { + SetDetailKeywordEvent(_followerPanel, onClick, card, baseParameter, control); + SetDetailKeywordEvent(_followerEvoPanel, onClick, card, baseParameter, control); + SetDetailKeywordEvent(_nonFollowerPanel, onClick, card, baseParameter, control); + } + + private void SetDetailKeywordEvent(DetailPanelInfo panelInfo, Action onClick, BattleCardBase card, CardParameter baseParameter, DetailPanelControl control) + { + UILabel label = panelInfo.DiscLabel; + BoxCollider discCollider = panelInfo.DiscCollider; + if (label.text != " ") + { + UIEventListener.Get(discCollider.gameObject).onClick = delegate + { + onClick.Call(card, label.gameObject, baseParameter); + }; + BattlePlayerView.SetKeyWordColor(discCollider.gameObject, label, control); + } + else + { + UIEventListener.Get(discCollider.gameObject).onClick = null; + } + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailFilterCategory.cs b/SVSim.BattleEngine/Engine/CardDetailFilterCategory.cs new file mode 100644 index 0000000..95cb260 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailFilterCategory.cs @@ -0,0 +1,39 @@ +using System.Collections.Generic; +using UnityEngine; + +public class CardDetailFilterCategory : MonoBehaviour +{ + [SerializeField] + private UILabel _categoryName; + + [SerializeField] + private UIGrid _grid; + + public List AllKeyWord { get; private set; } + + private void Awake() + { + AllKeyWord = new List(); + } + + public void Initialize(string name) + { + _categoryName.text = name; + } + + public void Reset() + { + foreach (CardDetailFilterKeyWord item in AllKeyWord) + { + item.Reset(); + } + } + + public void AddChild(CardDetailFilterKeyWord keyword) + { + keyword.transform.parent = _grid.transform; + keyword.transform.localScale = Vector3.one; + _grid.Reposition(); + AllKeyWord.Add(keyword); + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailFilterDialog.cs b/SVSim.BattleEngine/Engine/CardDetailFilterDialog.cs new file mode 100644 index 0000000..e75e69c --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailFilterDialog.cs @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; + +public class CardDetailFilterDialog : MonoBehaviour +{ + private const int DIALOG_PANEL_DEPTH = 15; + + [SerializeField] + private CardDetailFilterCategory _categoryOriginal; + + [SerializeField] + private CardDetailFilterKeyWord _keywordOriginal; + + [SerializeField] + private FlexibleGrid _grid; + + [SerializeField] + private UIButton _resetButton; + + private List _allCategory = new List(); + + private List _saveList; + + private bool _initializeFinish; + + private bool _isChanged; + + private Dictionary _existKeyWordDictionary; + + public Action OnChange { get; set; } + + public DialogBase Dialog { get; private set; } + + public static CardDetailFilterDialog Create(GameObject prefab, List saveList, Dictionary existKeyWordDictionary) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Card_0227")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.SetPanelDepth(15); + GameObject gameObject = UnityEngine.Object.Instantiate(prefab); + dialogBase.SetObj(gameObject); + CardDetailFilterDialog component = gameObject.GetComponent(); + component.Dialog = dialogBase; + component._saveList = saveList; + component._existKeyWordDictionary = existKeyWordDictionary; + return component; + } + + private bool IsCheckedInSaveList(string keyword) + { + if (_saveList != null) + { + return _saveList.Contains(keyword); + } + return false; + } + + private void Start() + { + _categoryOriginal.gameObject.SetActive(value: false); + _keywordOriginal.gameObject.SetActive(value: false); + foreach (string category in Data.Master.CardFilterKeyWord.CategoryList) + { + AddCategory(Data.SystemText.Get(category), Data.Master.CardFilterKeyWord.GetCategory(category)); + } + _grid.Reposition(); + UIEventListener.Get(_resetButton.gameObject).onClick = delegate + { + OnClickResetButton(); + }; + _initializeFinish = true; + } + + private void AddCategory(string categoryName, List keyList) + { + List list = new List(); + foreach (string key2 in keyList) + { + string key = Data.Master.BattleKeyWordTitleDic[key2]; + if (_existKeyWordDictionary == null || _existKeyWordDictionary.ContainsKey(key)) + { + list.Add(key2); + } + } + if (list.Count == 0) + { + return; + } + CardDetailFilterCategory component = NGUITools.AddChild(_grid.gameObject, _categoryOriginal.gameObject).GetComponent(); + _allCategory.Add(component); + component.name = "category_" + categoryName; + component.gameObject.SetActive(value: true); + component.Initialize(categoryName); + foreach (string item in list) + { + string keyword = Data.Master.BattleKeyWordTitleDic[item]; + CardDetailFilterKeyWord component2 = UnityEngine.Object.Instantiate(_keywordOriginal.gameObject).GetComponent(); + component2.gameObject.SetActive(value: true); + component2.Initialize(keyword); + component2.OnValueChange = delegate + { + if (_initializeFinish) + { + _isChanged = true; + } + }; + component.AddChild(component2); + if (IsCheckedInSaveList(keyword)) + { + component2.SetChecked(); + } + } + } + + private void Update() + { + if (_isChanged) + { + _isChanged = false; + List filterList = GetFilterList(); + if (!IsSameList(_saveList, filterList)) + { + _saveList = filterList; + OnChange.Call(); + } + } + } + + private int GetListCount(List list) + { + return list?.Count ?? 0; + } + + private bool IsSameList(List list1, List list2) + { + if (GetListCount(list1) == 0 && GetListCount(list2) == 0) + { + return true; + } + if (GetListCount(list1) != GetListCount(list2)) + { + return false; + } + foreach (string item in list1) + { + if (!list2.Contains(item)) + { + return false; + } + } + foreach (string item2 in list2) + { + if (!list1.Contains(item2)) + { + return false; + } + } + return true; + } + + private void OnClickResetButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + foreach (CardDetailFilterCategory item in _allCategory) + { + item.Reset(); + } + } + + public List GetFilterList() + { + List list = null; + foreach (CardDetailFilterCategory item in _allCategory) + { + foreach (CardDetailFilterKeyWord item2 in item.AllKeyWord) + { + if (item2.IsEnableKeyWord) + { + if (list == null) + { + list = new List(); + } + list.Add(item2.KeyWord); + } + } + } + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailFilterKeyWord.cs b/SVSim.BattleEngine/Engine/CardDetailFilterKeyWord.cs new file mode 100644 index 0000000..f71dcaa --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailFilterKeyWord.cs @@ -0,0 +1,51 @@ +using System; +using Cute; +using UnityEngine; + +public class CardDetailFilterKeyWord : MonoBehaviour +{ + [SerializeField] + private UIToggle _toggle; + + [SerializeField] + private UILabel _label; + + private bool _checkedCache; + + public bool IsEnableKeyWord => _toggle.value; + + public string KeyWord { get; private set; } + + public Action OnValueChange { get; set; } + + private void Start() + { + } + + public void Reset() + { + _checkedCache = false; + _toggle.value = false; + } + + public void SetChecked() + { + _checkedCache = true; + _toggle.value = true; + } + + public void Initialize(string keyword) + { + EventDelegate.Add(_toggle.onChange, delegate + { + if (_toggle.value != _checkedCache) + { + _checkedCache = _toggle.value; + GameMgr.GetIns().GetSoundMgr().PlaySe(_toggle.value ? Se.TYPE.SYS_TOGGLE_ON : Se.TYPE.SYS_TOGGLE_OFF); + } + OnValueChange.Call(); + }); + _label.text = keyword; + KeyWord = keyword; + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailFilterOffButton.cs b/SVSim.BattleEngine/Engine/CardDetailFilterOffButton.cs new file mode 100644 index 0000000..b06d619 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailFilterOffButton.cs @@ -0,0 +1,36 @@ +using System; +using Cute; +using UnityEngine; + +public class CardDetailFilterOffButton : MonoBehaviour +{ + [SerializeField] + private UILabel _label; + + [SerializeField] + private UIButton _button; + + [SerializeField] + private UISprite _backGround; + + private string _keyword; + + public Action OnClick { get; set; } + + private void Start() + { + EventDelegate.Add(_button.onClick, delegate + { + OnClick.Call(_keyword); + }); + } + + public void Initialize(string text) + { + _keyword = text; + _label.text = text; + _label.InitializeFont(); + _label.ProcessText(); + _backGround.ResetAndUpdateAnchors(); + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailUI.cs b/SVSim.BattleEngine/Engine/CardDetailUI.cs new file mode 100644 index 0000000..a626502 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailUI.cs @@ -0,0 +1,2620 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.View; + +public class CardDetailUI : UIBase +{ + private class CardVoiceData + { + private const string ACC_CARD_ID_GROUP = "ACC_CARD_ID"; + + private const string ACC_CARD_ID_REGEX = "card_id=(?80\\d*)"; + + public readonly string MainVoiceId; + + public readonly List _acceleratedVoiceIdList = new List(); + + public readonly List _voiceListBeforeEvo; + + public readonly List _voiceListAfterEvo; + + private CardMaster.CardMasterId _cardMasterId; + + private List _splitVoiceList; + + public CardVoiceData(CardParameter cardParam, CardMaster.CardMasterId cardMasterId) + { + _cardMasterId = cardMasterId; + VoiceDictionaries voiceDictionaries = new VoiceDictionaries(cardParam.CardId, _cardMasterId); + MainVoiceId = voiceDictionaries.VoiceId; + List list = new List(); + List normalPlayVoices = voiceDictionaries.GetNormalPlayVoices(); + list.AddRange(normalPlayVoices); + list.AddRange(voiceDictionaries.atkVoices.GetAllVoiceList()); + list.AddRange(voiceDictionaries.destroyVoices.GetAllVoiceList()); + AddVoiceList(list, voiceDictionaries.skillVoices); + SkillOptionValue skillOptionValue = new SkillOptionValue(cardParam.SkillOption); + string option = skillOptionValue.GetOption(SkillFilterCreator.ContentKeyword.skill); + if (!string.IsNullOrEmpty(option)) + { + Skill_attach_skill.AttachOptionInfo attachOptionInfo = new Skill_attach_skill.AttachOptionInfo(option); + if (attachOptionInfo.Voice != string.Empty) + { + VoiceDictionary item = new VoiceDictionary(attachOptionInfo.Voice); + voiceDictionaries.attachSkillVoices.Add(item); + } + } + bool flag = skillOptionValue.GetOption(SkillFilterCreator.ContentKeyword.is_evolve, "false") == "true"; + if (voiceDictionaries.attachSkillVoices.Count > 0 && !flag) + { + AddVoiceList(list, voiceDictionaries.attachSkillVoices, list); + } + MatchCollection matchCollection = new Regex("card_id=(?80\\d*)").Matches(cardParam.SkillOption); + _acceleratedVoiceIdList.Clear(); + for (int i = 0; i < matchCollection.Count; i++) + { + VoiceDictionaries voiceDictionaries2 = new VoiceDictionaries(int.Parse(matchCollection[i].Groups["ACC_CARD_ID"].Value), _cardMasterId); + list.AddRange(voiceDictionaries2.playVoices.GetAllVoiceList()); + string voiceId = voiceDictionaries2.VoiceId; + if (!string.IsNullOrEmpty(voiceId)) + { + _acceleratedVoiceIdList.Add(voiceId); + } + } + _voiceListBeforeEvo = GetPlayableVoiceList(list); + List list2 = new List(); + list2.AddRange(voiceDictionaries.evoVoices.GetAllVoiceList()); + list2.AddRange(voiceDictionaries.evoAtkVoices.GetAllVoiceList()); + list2.AddRange(voiceDictionaries.evoDestroyVoices.GetAllVoiceList()); + AddVoiceList(list2, voiceDictionaries.evoSkillVoices, list); + if (voiceDictionaries.attachSkillVoices.Count > 0 && flag) + { + AddVoiceList(list2, voiceDictionaries.attachSkillVoices, list2); + } + _voiceListAfterEvo = GetPlayableVoiceList(list2); + } + + private List GetPlayableVoiceList(List voiceList) + { + List list = new List(); + for (int i = 0; i < voiceList.Count; i++) + { + if (!Data.Master.CardDetailVoiceIgnoreList.Contains(voiceList[i])) + { + list.Add(voiceList[i]); + } + } + return list; + } + + private void AddVoiceList(List tempVoiceList, List voices, List normalVoiceList = null) + { + if (_splitVoiceList != null && normalVoiceList != null) + { + if (voices == null) + { + voices = _splitVoiceList; + } + else + { + for (int num = _splitVoiceList.Count - 1; num >= 0; num--) + { + voices.Insert(0, _splitVoiceList[num]); + } + } + } + if (voices == null || voices.Count <= 0) + { + return; + } + for (int i = 0; i < voices.Count; i++) + { + string[] allVoiceList = voices[i].GetAllVoiceList(); + foreach (string text in allVoiceList) + { + if (text.Contains("none") || tempVoiceList.Contains(text)) + { + continue; + } + if (text.Contains('|')) + { + if (_splitVoiceList == null) + { + _splitVoiceList = new List(); + _splitVoiceList.Add(voices[i]); + } + else if (!_splitVoiceList.Contains(voices[i])) + { + _splitVoiceList.Add(voices[i]); + } + string[] array = text.Split('|'); + if (array.Length == 2) + { + string item = ((normalVoiceList == null) ? array[0] : array[1]); + tempVoiceList.Add(item); + } + } + else if (normalVoiceList == null) + { + tempVoiceList.Add(text); + } + else if (!normalVoiceList.Contains(text)) + { + tempVoiceList.Add(text); + } + } + } + } + } + + private class CardVoiceManager + { + private int _cardId; + + private bool _isPlayEvoVoice; + + private CardVoiceData _voiceData; + + private int _playIndex; + + private List _playVoiceList; + + private List _loadVoiceIdList = new List(); + + private List _unloadVoiceIdList = new List(); + + private List _loadedVoiceIdList = new List(); + + private const string VOICE_DATA_PREFIX = "vo_"; + + public void SequentiallyPlay(CardParameter cardParam, bool isPlayEvoVoice, CardMaster.CardMasterId cardMasterId) + { + int cardId = cardParam.CardId; + if (cardId == _cardId) + { + if (isPlayEvoVoice != _isPlayEvoVoice) + { + _isPlayEvoVoice = isPlayEvoVoice; + _playIndex = 0; + _playVoiceList = (isPlayEvoVoice ? _voiceData._voiceListAfterEvo : _voiceData._voiceListBeforeEvo); + } + else + { + _playIndex = (_playIndex + 1) % _playVoiceList.Count; + } + Stop(); + Play(); + return; + } + _cardId = cardId; + _isPlayEvoVoice = isPlayEvoVoice; + CardVoiceData voiceData = _voiceData; + _voiceData = new CardVoiceData(cardParam, cardMasterId); + _playIndex = 0; + _playVoiceList = (isPlayEvoVoice ? _voiceData._voiceListAfterEvo : _voiceData._voiceListBeforeEvo); + float unloadWaitTime = Stop(); + LoadAndUnload(_voiceData, voiceData, unloadWaitTime, delegate + { + Play(); + }); + } + + private void Play() + { + GameMgr.GetIns().GetSoundMgr().PlayVoiceScenario("vo_" + _playVoiceList[_playIndex]); + } + + public float Stop() + { + return GameMgr.GetIns().GetSoundMgr().StopVoiceAll(); + } + + private void LoadAndUnload(CardVoiceData loadData, CardVoiceData unloadData, float unloadWaitTime = 0f, Action onFinishLoad = null) + { + _loadVoiceIdList.Clear(); + if (loadData != null) + { + _loadVoiceIdList.Add(loadData.MainVoiceId); + _loadVoiceIdList.AddRange(loadData._acceleratedVoiceIdList); + _loadVoiceIdList = _loadVoiceIdList.Distinct().ToList(); + } + _unloadVoiceIdList.Clear(); + if (unloadData != null) + { + _unloadVoiceIdList.Add(unloadData.MainVoiceId); + _unloadVoiceIdList.AddRange(unloadData._acceleratedVoiceIdList); + _unloadVoiceIdList = _unloadVoiceIdList.Distinct().ToList(); + } + List list = _loadVoiceIdList.Intersect(_unloadVoiceIdList).ToList(); + if (list.Count > 0) + { + _loadVoiceIdList = _loadVoiceIdList.Except(list).ToList(); + _unloadVoiceIdList = _unloadVoiceIdList.Except(list).ToList(); + } + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + int loadTargetCount = _loadVoiceIdList.Count; + if (loadTargetCount <= 0) + { + onFinishLoad.Call(); + } + else + { + int loadedCount = 0; + for (int i = 0; i < loadTargetCount; i++) + { + string text = _loadVoiceIdList[i]; + soundMgr.LoadVoice("vo_" + text, delegate + { + if (++loadedCount == loadTargetCount) + { + onFinishLoad.Call(); + } + }); + } + _loadedVoiceIdList.AddRange(_loadVoiceIdList); + } + for (int num = 0; num < _unloadVoiceIdList.Count; num++) + { + string unloadId = _unloadVoiceIdList[num]; + UIManager.GetInstance().StartCoroutine(Timer.DelayMethod(unloadWaitTime, delegate + { + soundMgr.UnloadVoice("vo_" + unloadId); + })); + _loadedVoiceIdList.Remove(unloadId); + } + } + + public void UnloadAll(float unloadWaitTime = 0f) + { + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + for (int i = 0; i < _loadedVoiceIdList.Count; i++) + { + string unloadId = _loadedVoiceIdList[i]; + UIManager.GetInstance().StartCoroutine(Timer.DelayMethod(unloadWaitTime, delegate + { + soundMgr.UnloadVoice("vo_" + unloadId); + })); + } + _loadedVoiceIdList.Clear(); + } + } + + private static readonly string RELATION_CARD_DISABLE_CARD_ID_HEADER = "80"; + + private static readonly int[] RELATION_CARD_BUTTON_DISABLE_CARD_IDS = new int[2] { 810014010, 810034010 }; + + private readonly List RELATION_CARD_SKILLOPTION_EXCLUDED_OPTIONS = new List { "effect_path", "se_path", "skill_voice" }; + + private readonly char[] RELATION_CARD_SKILLOPTION_SEPARATORS = new char[2] { '(', ')' }; + + [SerializeField] + private GameObject DarkPanel; + + [SerializeField] + private GameObject Frame; + + [SerializeField] + private GameObject CardTexture; + + [SerializeField] + private GameObject CardNum; + + [SerializeField] + private GameObject CardText; + + [SerializeField] + private GameObject CardViewBG; + + [SerializeField] + private GameObject CardShadow; + + [SerializeField] + private GameObject UnitCardStatusObj; + + [SerializeField] + private GameObject UnitCardIntroductionObj; + + [SerializeField] + private GameObject SettingCardStatusObj; + + [SerializeField] + private GameObject SettingCardIntroductionObj; + + [SerializeField] + private GameObject SpellCardStatusObj; + + [SerializeField] + private GameObject SpellCardIntroductionObj; + + [SerializeField] + private UIScrollView UnitCardTextScrollView; + + [SerializeField] + private UIScrollView SpellCardTextScrollView; + + [SerializeField] + private UIScrollView SettingCardTextScrollView; + + [SerializeField] + private UILabel UnitCardSkill; + + [SerializeField] + private UILabel UnitCardEvoSkill; + + [SerializeField] + private UILabel UnitCardAtkRight; + + [SerializeField] + private UILabel UnitCardLifeRight; + + [SerializeField] + private UILabel UnitCardEvoAtkRight; + + [SerializeField] + private UILabel UnitCardEvoLifeRight; + + [SerializeField] + private UILabel UnitCardIntroduction; + + [SerializeField] + private UILabel SpellCardSkill; + + [SerializeField] + private UILabel SpellCardIntroduction; + + [SerializeField] + private UILabel SettingCardSkill; + + [SerializeField] + private UILabel SettingCardIntroduction; + + [SerializeField] + private GameObject ReturnButton; + + [SerializeField] + private GameObject CardIntroductionButton; + + [SerializeField] + private UIButton _favoriteButton; + + [SerializeField] + private UIButton _voiceButton; + + [SerializeField] + private GameObject CardEvolButton; + + [SerializeField] + private UIButton _premiumCardConversionButton; + + [SerializeField] + private GameObject RelationWrapperObj; + + [SerializeField] + private GameObject RelationCardButton; + + [SerializeField] + private GameObject RightButton; + + [SerializeField] + private GameObject LeftButton; + + [SerializeField] + private GameObject RelationBackButton; + + [SerializeField] + private UILabel DialogTitleLabel; + + [SerializeField] + private UILabel _cardNumLabel; + + [SerializeField] + private UILabel _nameValueLabel; + + [SerializeField] + private UILabel _classValueLabel; + + [SerializeField] + private UILabel _typeValueLabel; + + [SerializeField] + private UILabel _redEtherHaveValueLabel; + + [SerializeField] + private UILabel _evolutionButtonLabel; + + [SerializeField] + private GameObject _cardVoiceLabelRoot; + + [SerializeField] + private UILabel _cardVoiceValueLabel; + + [SerializeField] + private GameObject _cardSetLabelRoot; + + [SerializeField] + private UILabel _cardSetValueLabel; + + [SerializeField] + private GameObject RedEtherFrame; + + [SerializeField] + private GameObject RedEtherIcon; + + [SerializeField] + private GameObject QuestionMark; + + [SerializeField] + private PurchaseConfirm PurchaseConfirmPrefab; + + [SerializeField] + private PremiumCardConversionDialogParts _premiumCardConversionDialogPrefab; + + [SerializeField] + private CardCraftPanel _craftPanel; + + [SerializeField] + private UIPanel[] _allPanel; + + [SerializeField] + private UIButton _blankColliderButton; + + private GameObject _rotationOnlyIconSpell; + + private GameObject _rotationOnlyIconFollower; + + private GameObject _rotationOnlyIconAmulet; + + private static readonly float kCARD_SCALE = 90f; + + private static readonly float kCARD_POS_Z = -4f; + + private readonly Vector3 CardViewScale = new Vector3(110f, 110f, 1f); + + private const float CARD_ANIMATION_TIME = 0.3f; + + private const float CARD_ROTATION = 0f; + + private static readonly Color CARD_LIQUEFY_PARTICLE_COLOR = new Color(1f, 0.2509804f, 0.2509804f); + + private static readonly Color CARD_CREATE_PARTICLE_COLOR = new Color(1f, 0.2509804f, 0.2509804f); + + private static readonly Color PREMIUM_CARD_CONVERSION_PARTICLE_COLOR = new Color(14f / 85f, 32f / 85f, 0.5568628f); + + private static readonly Vector3 CARD_DESTROY_PARTICLE_OFFSET = new Vector3(0f, 0f, -1f); + + private const string EVO_EFFECT_PATH = "cmn_deckedit_evo_1"; + + private const float EVO_EFFECT_SCALE = 600f; + + private const float FAVORITE_BUTTON_INVALID_TIME = 0.9f; + + private const int PREMIUM_CARD_CONVERSION_PARTICLE_NUM = 4; + + private const int KEYWORD_DIALOG_DEPTH = 120; + + private const int KEYWORD_DIALOG_POSITION_Z = -5; + + private const int KEYWORD_DIALOG_POSITION_Y = 0; + + private static readonly Vector3 KEYWORD_DIALOG_BACK_VIEW_POSITION = new Vector3(0f, 0f, -5f); + + private GameObject UnitCardObject; + + private GameObject SpellCardObject; + + private GameObject FieldCardObject; + + private GameObject ViewCardObject; + + private UILabel UnitCost; + + private UILabel UnitAtk; + + private UILabel UnitLife; + + private UILabel UnitName; + + private UILabel SpellCost; + + private UILabel SpellName; + + private UILabel FieldCost; + + private UILabel FieldName; + + private BoxCollider UnitCardCollider; + + private BoxCollider SpellCardCollider; + + private BoxCollider FieldCardCollider; + + private bool _isFavorite; + + private bool _isFavoriteButtonEnabled; + + private bool _isEvolCard; + + private bool _isShowCardAblityText = true; + + private bool _shouldResetTextScrollView; + + private bool isCardViewMode; + + private bool isAnimation; + + [SerializeField] + private TextLineCreater _cardSkillTextLineCreater; + + [SerializeField] + private TextLineCreater _cardEvoSkillTextLineCreater; + + [SerializeField] + private TextLineCreater _cardSpellTextLineCreater; + + [SerializeField] + private TextLineCreater _cardAmuletTextLineCreater; + + [SerializeField] + private GameObject _evolveInfoObjectRoot; + + [SerializeField] + private UILabel _normalTitleLavel; + + private int _relationIndex; + + private List _relationCardIds = new List(); + + private Dictionary> _relationCardParentDict = new Dictionary>(); + + private GameObject _relationCardBaseGameObject; + + private int LayerDetail = 14; + + private bool isDetailOn; + + private ParticleSystem _evolEffect; + + private bool IsAnimationPlaying; + + private DialogBase _craftDialog; + + private DialogBase _keyWordDialog; + + private List _assetPathList = new List(); + + private List _assetTokenPathList = new List(); + + private CardVoiceManager _cardVoiceManager = new CardVoiceManager(); + + private bool _isAbleTapDialogObject = true; + + private static Shader _normalShader = null; + + private static Shader _premiumShader = null; + + private DialogBase _dialogForClose; + + private Material _cardMaterial; + + private int _originalCardId; + + private CardMaster.CardMasterId _cardMasterId; + + private UIButton[] _enableButtonList; + + private IFormatBehavior _formatBehaviorForCardPoolChange; + + public Action OnCardSellId; + + public Action OnCardBuy; + + public Action OnClose; + + public Action OnDragCard; + + public Action OnLiquefyAllCard; + + public Action OnChangeCardFavoriteState; + + public Action OnConvertedPremiumCard; + + public Action OnCreateFirstCard; + + private bool _isCardTextDialogLayerSet = true; + + private bool _isOwnCardNum; + + public CardParameter CardData { get; private set; } + + public Action OnDetailCardUpdate { get; set; } + + public Action OnCardNumChange { get; set; } + + private bool IsAbleToCraft + { + get + { + if (PlayerStaticData.UserRedEtherCount >= CardData.UseRedEther && !CardData.IsFoil) + { + if (GetPossessionCardNum(isIncludingSpotCard: true) >= 3) + { + return GetPossessionCardNum() == 0; + } + return true; + } + return false; + } + } + + private bool IsAbleToDestruct => GetPossessionCardNum() > 0; + + public bool IsShowFlavorTextButton { get; set; } + + public bool IsShowFavoriteButton { get; set; } + + public bool IsShowVoiceButton { get; set; } + + public bool IsShowEvolutionButton { get; set; } + + public bool IsShowCraftButtons { get; set; } + + public bool IsShowPremiumCardConversionButton { get; set; } + + public bool IsPopularityVote { get; set; } + + public bool IsCardTextDialogLayerSet + { + get + { + return _isCardTextDialogLayerSet; + } + set + { + _isCardTextDialogLayerSet = value; + } + } + + public bool IsOwnCardNum + { + get + { + return _isOwnCardNum; + } + set + { + _isOwnCardNum = value; + } + } + + public bool IsShortageUI { get; set; } + + public bool IsRelationCardViewing => RelationWrapperObj.activeSelf; + + public bool LeftButtonVisible + { + set + { + LeftButton.SetActive(value); + } + } + + public bool RightButtonVisible + { + set + { + RightButton.SetActive(value); + } + } + + public bool IsEvolCard => _isEvolCard; + + public bool IsEnableShowDetail + { + get + { + if (IsAnimationPlaying) + { + return false; + } + return true; + } + } + + private void OnDisable() + { + if (isCardViewMode) + { + RemoveCardViewMode(); + } + isDetailOn = false; + } + + public void Hide() + { + base.gameObject.SetActive(value: false); + if (_keyWordDialog != null) + { + _keyWordDialog.Close(); + } + if (IsAnimationPlaying) + { + iTween.Stop(UnitCardObject); + iTween.Stop(SpellCardObject); + iTween.Stop(FieldCardObject); + OnAnimationOver(); + } + DestroyDialogObject(); + } + + protected override void OnDestroy() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_assetPathList); + _assetPathList.Clear(); + Toolbox.ResourcesManager.RemoveAssetGroup(_assetTokenPathList); + _assetTokenPathList.Clear(); + float unloadWaitTime = _cardVoiceManager.Stop(); + _cardVoiceManager.UnloadAll(unloadWaitTime); + if (_keyWordDialog != null) + { + _keyWordDialog.Close(); + } + if (_cardMaterial != null) + { + UnityEngine.Object.Destroy(_cardMaterial); + } + DestroyDialogObject(); + base.OnDestroy(); + } + + private void DestroyDialogObject() + { + if (_dialogForClose != null) + { + UnityEngine.Object.Destroy(_dialogForClose.gameObject); + _dialogForClose = null; + } + } + + public void Initialize(int DetailLayer, CardMaster.CardMasterId cardMasterId, IFormatBehavior formatBehaviorForCardPoolChange = null) + { + _formatBehaviorForCardPoolChange = formatBehaviorForCardPoolChange; + ChangeCardMaster(cardMasterId); + LayerDetail = DetailLayer; + base.gameObject.layer = LayerDetail; + InitializeCard(); + SetButtonEvent(); + SetDisableArrowButton(); + _enableButtonList = GetComponentsInChildren(includeInactive: true); + } + + public void ChangeCardMaster(CardMaster.CardMasterId cardMasterId) + { + _cardMasterId = cardMasterId; + } + + private void InitializeCard() + { + InitializeCardObject(); + InitializeCardMesh(); + InitializeCardDecoration(); + } + + private void InitializeCardObject() + { + UnitCardObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("Unit", ResourcesManager.AssetLoadPathType.HandCard, isfetch: true)) as GameObject; + SpellCardObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("Spell", ResourcesManager.AssetLoadPathType.HandCard, isfetch: true)) as GameObject; + FieldCardObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("Field", ResourcesManager.AssetLoadPathType.HandCard, isfetch: true)) as GameObject; + UnitCardObject = NGUITools.AddChild(CardTexture, UnitCardObject); + UnitCardObject.SetActive(value: false); + SpellCardObject = NGUITools.AddChild(CardTexture, SpellCardObject); + SpellCardObject.SetActive(value: false); + FieldCardObject = NGUITools.AddChild(CardTexture, FieldCardObject); + FieldCardObject.SetActive(value: false); + Transform obj = SpellCardObject.transform; + Vector3 localPosition = (FieldCardObject.transform.localPosition = new Vector3(0f, 0f, -500f)); + obj.localPosition = localPosition; + UIManager.GetInstance().SetLayerRecursive(UnitCardObject.transform, LayerDetail); + UIManager.GetInstance().SetLayerRecursive(SpellCardObject.transform, LayerDetail); + UIManager.GetInstance().SetLayerRecursive(FieldCardObject.transform, LayerDetail); + UnitCardCollider = UnitCardObject.AddComponent(); + SpellCardCollider = SpellCardObject.AddComponent(); + FieldCardCollider = FieldCardObject.AddComponent(); + BoxCollider unitCardCollider = UnitCardCollider; + BoxCollider spellCardCollider = SpellCardCollider; + Vector3 vector2 = (FieldCardCollider.size = new Vector3(3.6f, 5.5f, 1f)); + localPosition = (spellCardCollider.size = vector2); + unitCardCollider.size = localPosition; + UIWidget uIWidget = UnitCardObject.AddComponent(); + UIWidget uIWidget2 = SpellCardObject.AddComponent(); + UIWidget uIWidget3 = FieldCardObject.AddComponent(); + int num = (uIWidget3.depth = 1); + int depth = (uIWidget2.depth = num); + uIWidget.depth = depth; + GameObject prefab = Resources.Load("Prefab/CardDeco/RotationOnlyIcon") as GameObject; + _rotationOnlyIconSpell = NGUITools.AddChild(SpellCardObject, prefab); + _rotationOnlyIconFollower = NGUITools.AddChild(UnitCardObject, prefab); + _rotationOnlyIconAmulet = NGUITools.AddChild(FieldCardObject, prefab); + } + + private void InitializeCardMesh() + { + MeshFilter[] componentsInChildren = UnitCardObject.GetComponentsInChildren(); + Mesh sharedMesh = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_unit", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + Mesh sharedMesh2 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_unit_low", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + componentsInChildren[0].sharedMesh = sharedMesh; + componentsInChildren[1].sharedMesh = sharedMesh2; + Quaternion quaternion = Quaternion.Euler(0f, componentsInChildren[0].transform.rotation.y + 180f, 0f); + Transform obj = componentsInChildren[0].transform; + Quaternion rotation = (componentsInChildren[1].transform.rotation = quaternion); + obj.rotation = rotation; + MeshFilter[] componentsInChildren2 = SpellCardObject.GetComponentsInChildren(); + Mesh sharedMesh3 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_spell", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + Mesh sharedMesh4 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_spell_low", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + componentsInChildren2[0].sharedMesh = sharedMesh3; + componentsInChildren2[1].sharedMesh = sharedMesh4; + Quaternion quaternion3 = Quaternion.Euler(0f, componentsInChildren2[0].transform.rotation.y + 180f, 0f); + Transform obj2 = componentsInChildren2[0].transform; + rotation = (componentsInChildren2[1].transform.rotation = quaternion3); + obj2.rotation = rotation; + MeshFilter[] componentsInChildren3 = FieldCardObject.GetComponentsInChildren(); + Mesh sharedMesh5 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_field", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + Mesh sharedMesh6 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_field_low", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + componentsInChildren3[0].sharedMesh = sharedMesh5; + componentsInChildren3[1].sharedMesh = sharedMesh6; + Quaternion quaternion5 = Quaternion.Euler(0f, componentsInChildren3[0].transform.rotation.y + 180f, 0f); + Transform obj3 = componentsInChildren3[0].transform; + rotation = (componentsInChildren3[1].transform.rotation = quaternion5); + obj3.rotation = rotation; + } + + private void InitializeCardDecoration() + { + GameObject prefab = Resources.Load("Prefab/CardDeco/Cost") as GameObject; + GameObject prefab2 = Resources.Load("Prefab/CardDeco/Atk") as GameObject; + GameObject prefab3 = Resources.Load("Prefab/CardDeco/Life") as GameObject; + GameObject prefab4 = Resources.Load("Prefab/CardDeco/Name") as GameObject; + GameObject gameObject = NGUITools.AddChild(UnitCardObject, prefab); + GameObject gameObject2 = NGUITools.AddChild(UnitCardObject, prefab2); + GameObject gameObject3 = NGUITools.AddChild(UnitCardObject, prefab3); + GameObject gameObject4 = NGUITools.AddChild(UnitCardObject, prefab4); + GameObject gameObject5 = NGUITools.AddChild(SpellCardObject, prefab); + GameObject gameObject6 = NGUITools.AddChild(SpellCardObject, prefab4); + GameObject gameObject7 = NGUITools.AddChild(FieldCardObject, prefab); + GameObject gameObject8 = NGUITools.AddChild(FieldCardObject, prefab4); + Transform obj = gameObject.transform; + Transform obj2 = gameObject5.transform; + Vector3 vector = (gameObject7.transform.localPosition = Global.POSITION_COST_ICON); + Vector3 localPosition = (obj2.localPosition = vector); + obj.localPosition = localPosition; + Transform obj3 = gameObject.transform; + Transform obj4 = gameObject5.transform; + vector = (gameObject7.transform.localScale = Global.SCALE_CARD_ICON); + localPosition = (obj4.localScale = vector); + obj3.localScale = localPosition; + Transform obj5 = gameObject4.transform; + Transform obj6 = gameObject6.transform; + vector = (gameObject8.transform.localPosition = Global.POSITION_NAME_TEXT); + localPosition = (obj6.localPosition = vector); + obj5.localPosition = localPosition; + Transform obj7 = gameObject4.transform; + Transform obj8 = gameObject6.transform; + vector = (gameObject8.transform.localScale = Global.SCALE_NAME_TEXT); + localPosition = (obj8.localScale = vector); + obj7.localScale = localPosition; + gameObject2.transform.localPosition = Global.POSITION_ATK_ICON; + gameObject3.transform.localPosition = Global.POSITION_LIFE_ICON; + Transform obj9 = gameObject2.transform; + localPosition = (gameObject3.transform.localScale = Global.SCALE_CARD_ICON); + obj9.localScale = localPosition; + UnitCost = gameObject.transform.Find("CostLabel").GetComponent(); + UnitAtk = gameObject2.transform.Find("AtkLabel").GetComponent(); + UnitLife = gameObject3.transform.Find("LifeLabel").GetComponent(); + UnitName = gameObject4.transform.Find("NameLabel").GetComponent(); + SpellCost = gameObject5.transform.Find("CostLabel").GetComponent(); + SpellName = gameObject6.transform.Find("NameLabel").GetComponent(); + FieldCost = gameObject7.transform.Find("CostLabel").GetComponent(); + FieldName = gameObject8.transform.Find("NameLabel").GetComponent(); + } + + private void SetButtonEvent() + { + UIEventListener uIEventListener = UIEventListener.Get(ReturnButton); + uIEventListener.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onClick, new UIEventListener.VoidDelegate(OnPushCardDetailOn)); + UIEventListener uIEventListener2 = UIEventListener.Get(_blankColliderButton.gameObject); + uIEventListener2.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener2.onClick, new UIEventListener.VoidDelegate(OnPushCardDetailOn)); + UIEventListener uIEventListener3 = UIEventListener.Get(DarkPanel.gameObject); + uIEventListener3.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener3.onClick, new UIEventListener.VoidDelegate(OnPushCardDetailOn)); + UIEventListener uIEventListener4 = UIEventListener.Get(Frame.gameObject); + uIEventListener4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener4.onClick, new UIEventListener.VoidDelegate(OnPushCardDetailOn)); + UIEventListener uIEventListener5 = UIEventListener.Get(CardIntroductionButton); + uIEventListener5.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener5.onClick, new UIEventListener.VoidDelegate(OnClickChangeCardTextTypeButton)); + UIEventListener uIEventListener6 = UIEventListener.Get(CardViewBG); + uIEventListener6.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener6.onClick, new UIEventListener.VoidDelegate(OnCloseCardViewMode)); + UIEventListener uIEventListener7 = UIEventListener.Get(UnitCardObject); + uIEventListener7.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener7.onClick, new UIEventListener.VoidDelegate(OnOpenCardViewMode)); + UIEventListener uIEventListener8 = UIEventListener.Get(SpellCardObject); + uIEventListener8.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener8.onClick, new UIEventListener.VoidDelegate(OnOpenCardViewMode)); + UIEventListener uIEventListener9 = UIEventListener.Get(FieldCardObject); + uIEventListener9.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener9.onClick, new UIEventListener.VoidDelegate(OnOpenCardViewMode)); + UIEventListener uIEventListener10 = UIEventListener.Get(_favoriteButton.gameObject); + uIEventListener10.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener10.onClick, new UIEventListener.VoidDelegate(OnClickFavoriteButton)); + UIEventListener uIEventListener11 = UIEventListener.Get(_voiceButton.gameObject); + uIEventListener11.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener11.onClick, new UIEventListener.VoidDelegate(OnClickVoiceButton)); + UIEventListener uIEventListener12 = UIEventListener.Get(_premiumCardConversionButton.gameObject); + uIEventListener12.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener12.onClick, new UIEventListener.VoidDelegate(OnClickPremiumCardConversionButton)); + UIEventListener uIEventListener13 = UIEventListener.Get(CardEvolButton); + uIEventListener13.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener13.onClick, new UIEventListener.VoidDelegate(OnClickEvolutionButton)); + UIEventListener uIEventListener14 = UIEventListener.Get(UnitCardObject); + uIEventListener14.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener14.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener15 = UIEventListener.Get(SpellCardObject); + uIEventListener15.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener15.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener16 = UIEventListener.Get(FieldCardObject); + uIEventListener16.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener16.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener17 = UIEventListener.Get(Frame); + uIEventListener17.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener17.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener18 = UIEventListener.Get(CardText); + uIEventListener18.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener18.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener19 = UIEventListener.Get(QuestionMark); + uIEventListener19.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener19.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener20 = UIEventListener.Get(RelationCardButton); + uIEventListener20.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener20.onClick, new UIEventListener.VoidDelegate(OnPushRelationCardButton)); + UIEventListener uIEventListener21 = UIEventListener.Get(RelationBackButton); + uIEventListener21.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener21.onClick, new UIEventListener.VoidDelegate(OnPushRelationBackButton)); + UIEventListener uIEventListener22 = UIEventListener.Get(RightButton); + uIEventListener22.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener22.onClick, new UIEventListener.VoidDelegate(OnPushRightButton)); + UIEventListener uIEventListener23 = UIEventListener.Get(LeftButton); + uIEventListener23.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener23.onClick, new UIEventListener.VoidDelegate(OnPushLeftButton)); + Action onClickDestructBtn = delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + CreateDialog(StartCardDestruct, buy: false); + }; + Action onClickCreateBtn = delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + CreateDialog(StartCardCraft, buy: true); + }; + _craftPanel.Init(onClickCreateBtn, onClickDestructBtn); + UIEventListener.Get(QuestionMark).onClick = delegate + { + if (_isAbleTapDialogObject) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + UILabel keyWordLabel = GetKeyWordLabel(); + string empty = string.Empty; + empty = ((!CardData.IsEvolveChoiceCard) ? (CardData.ConvertedSkillDescription + CardData.ConvertedEvoSkillDescription) : CardData.ConvertedEvoSkillDescription); + _keyWordDialog = BattlePlayerView.CreateKeyPanel(empty, keyWordLabel, _cardMasterId); + UIManager.ViewScene currentScene = UIManager.GetInstance().GetCurrentScene(); + if ((currentScene == UIManager.ViewScene.Battle || currentScene == UIManager.ViewScene.LoginBonus || currentScene == UIManager.ViewScene.Colosseum || currentScene == UIManager.ViewScene.LotteryPage || currentScene == UIManager.ViewScene.QuestSelectionPage) && IsCardTextDialogLayerSet) + { + _keyWordDialog.SetPanelDepth(120); + Vector3 localPosition = _keyWordDialog.gameObject.transform.localPosition; + localPosition.z = -5f; + localPosition.y = 0f; + _keyWordDialog.gameObject.transform.localPosition = localPosition; + ChangeLayer(_keyWordDialog.gameObject, LayerDetail); + _keyWordDialog.SetBackViewLayer(LayerDetail); + _keyWordDialog.SetBackViewPosition(KEYWORD_DIALOG_BACK_VIEW_POSITION); + UIPanel[] componentsInChildren = _keyWordDialog.InsideObject.GetComponentsInChildren(); + for (int i = 0; i < componentsInChildren.Length; i++) + { + componentsInChildren[i].depth += 120; + } + } + } + }; + UIEventListener uIEventListener24 = UIEventListener.Get(QuestionMark); + uIEventListener24.onPress = (UIEventListener.BoolDelegate)Delegate.Combine(uIEventListener24.onPress, (UIEventListener.BoolDelegate)delegate(GameObject g, bool b) + { + UILabel keyWordLabel = GetKeyWordLabel(); + if (keyWordLabel != null) + { + BattlePlayerView.PressKeyWordColorChange(keyWordLabel, b); + } + }); + UIEventListener uIEventListener25 = UIEventListener.Get(QuestionMark); + uIEventListener25.onDragStart = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener25.onDragStart, (UIEventListener.VoidDelegate)delegate + { + if (UnitCardTextScrollView.gameObject.activeInHierarchy) + { + BattlePlayerView.SetKeyWordLabelColor(UnitCardSkill); + BattlePlayerView.SetKeyWordLabelColor(UnitCardEvoSkill); + } + else + { + UILabel keyWordLabel = GetKeyWordLabel(); + if (keyWordLabel != null) + { + BattlePlayerView.SetKeyWordLabelColor(keyWordLabel); + } + } + }); + } + + private void AddAtlasOverrider(DialogBase dialog) + { + UIAtlas component = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("dummy", ResourcesManager.AssetLoadPathType.QuestAtlas, isfetch: true)).GetComponent(); + UISpriteAtlasOverwriter.TargetObject[] targetObjects = new UISpriteAtlasOverwriter.TargetObject[1] + { + new UISpriteAtlasOverwriter.TargetObject(dialog.gameObject, includeChildren: true) + }; + dialog.gameObject.AddMissingComponent().Init(component, targetObjects); + } + + private UILabel GetKeyWordLabel() + { + if (UnitCardTextScrollView.gameObject.activeInHierarchy) + { + Transform parent = UnitCardSkill.transform.parent; + UnitCardSkill.transform.SetParent(base.transform); + Vector3 vector = UnitCardSkill.transform.localPosition - new Vector3(0f, UnitCardSkill.printedSize.y, 0f); + UnitCardSkill.transform.SetParent(parent); + Vector3 vector2 = base.transform.InverseTransformPoint(UICamera.lastHit.point); + if (vector.y < vector2.y) + { + if (!string.IsNullOrEmpty(UnitCardSkill.text) && UnitCardSkill.text != " ") + { + return UnitCardSkill; + } + if (!string.IsNullOrEmpty(UnitCardEvoSkill.text) && UnitCardEvoSkill.text != " ") + { + return UnitCardEvoSkill; + } + } + else + { + if (!string.IsNullOrEmpty(UnitCardEvoSkill.text) && UnitCardEvoSkill.text != " ") + { + return UnitCardEvoSkill; + } + if (!string.IsNullOrEmpty(UnitCardSkill.text) && UnitCardSkill.text != " ") + { + return UnitCardSkill; + } + } + } + else + { + if (SpellCardTextScrollView.gameObject.activeInHierarchy) + { + return SpellCardSkill; + } + if (SettingCardTextScrollView.gameObject.activeInHierarchy) + { + return SettingCardSkill; + } + } + return null; + } + + public void OnPushCardDetailOn(GameObject g) + { + if (_isAbleTapDialogObject && ShowCardDetail(g)) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_INFO); + } + } + + public bool ShowCardDetail(GameObject g) + { + if (isDetailOn) + { + CloseDefault(playSe: true); + return false; + } + if (!IsEnableShowDetail) + { + return false; + } + CharIdx component = g.GetComponent(); + if (!component) + { + return false; + } + isDetailOn = true; + IsAnimationPlaying = true; + base.gameObject.SetActive(value: true); + DarkPanel.SetActive(value: true); + DestroyDialogObject(); + _dialogForClose = UIManager.GetInstance().DialogManager.CreateDialogBaseOpenCardDetail(this); + SetCardDetail(component.GetCardId(), g); + OpenCardAnimation(); + return true; + } + + private void OpenCardAnimation() + { + iTween.Stop(CardNum.gameObject); + if (GetPossessionCardNum(isIncludingSpotCard: true) > 0) + { + CardNum.transform.localScale = new Vector3(0.01f, 0.01f, 1f); + iTween.ScaleTo(CardNum.gameObject, iTween.Hash("scale", new Vector3(1f, 1f, 1f), "time", 0.3f)); + } + else + { + CardNum.transform.localScale = new Vector3(1f, 1f, 1f); + } + GameObject gameObject = null; + CardBasePrm.CharaType charType = CardData.CharType; + gameObject = (CardBasePrm.IsFollowerCard(charType) ? UnitCardObject : ((!CardBasePrm.IsSpellCard(charType)) ? FieldCardObject : SpellCardObject)); + gameObject.transform.localScale = new Vector3(1f, 1f, 1f); + iTween.Stop(gameObject); + iTween.ScaleTo(gameObject, iTween.Hash("islocal", true, "scale", new Vector3(kCARD_SCALE, kCARD_SCALE, 1f), "time", 0.3f, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(gameObject, iTween.Hash("islocal", true, "x", 0f, "y", 0f, "z", kCARD_POS_Z, "time", 0.3f, "oncompletetarget", base.gameObject, "oncomplete", "OnAnimationOver", "easetype", iTween.EaseType.easeOutExpo)); + } + + private void OnAnimationOver() + { + IsAnimationPlaying = false; + BoxCollider unitCardCollider = UnitCardCollider; + BoxCollider spellCardCollider = SpellCardCollider; + Vector3 vector = (FieldCardCollider.size = new Vector3(3.6f, 5.5f, 1f)); + Vector3 size = (spellCardCollider.size = vector); + unitCardCollider.size = size; + } + + public void CloseDefault(bool playSe) + { + if (!isDetailOn || isAnimation || IsAnimationPlaying) + { + return; + } + if (isCardViewMode) + { + OnCloseCardViewMode(); + return; + } + isDetailOn = false; + DarkPanel.SetActive(value: false); + if (base.gameObject.activeSelf && playSe) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL); + } + base.gameObject.SetActive(value: false); + if (_evolEffect != null) + { + UnityEngine.Object.Destroy(_evolEffect.gameObject); + } + Toolbox.ResourcesManager.RemoveAssetGroup(_assetPathList); + Toolbox.ResourcesManager.RemoveAssetGroup(_assetTokenPathList); + _assetTokenPathList.Clear(); + DestroyDialogObject(); + OnClose.Call(); + } + + private void SetCardDetail(int cardId, GameObject card2dObj = null, bool isUpdateRelation = true) + { + CardData = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId); + if (isUpdateRelation) + { + RelationWrapperObj.SetActive(value: false); + } + iTween.Stop(base.gameObject); + _isEvolCard = CardData.IsEvolveChoiceCard; + _isShowCardAblityText = true; + UpdateCardImage(); + SystemText systemText = Data.SystemText; + _nameValueLabel.text = CardData.CardName; + string key = "Common_01" + ((int)(4 + CardData.Clan)).ToString("00"); + _classValueLabel.text = systemText.Get(key); + _typeValueLabel.text = CardData.TribeName; + if (_typeValueLabel.text == "ALL") + { + _typeValueLabel.text = "-"; + } + UpdateCardText(); + _isFavoriteButtonEnabled = true; + UpdateButtonState(); + UpdateCreateLiquefyButton(); + if (isUpdateRelation) + { + UpdateRelation(cardId); + DialogTitleLabel.text = Data.SystemText.Get("Card_0135"); + } + UpdateCardNum(card2dObj); + if (!IsRelationCardViewing) + { + _relationCardBaseGameObject = card2dObj; + OnDetailCardUpdate.Call(); + } + } + + private void UpdateRelation(int cardId) + { + _relationCardIds.Clear(); + _relationCardParentDict.Clear(); + _relationIndex = 0; + _originalCardId = cardId; + if (RELATION_CARD_BUTTON_DISABLE_CARD_IDS.Contains(cardId)) + { + RelationCardButton.SetActive(value: false); + return; + } + CardMaster instance = CardMaster.GetInstance(_cardMasterId); + if (instance != null) + { + List allParams = new List(instance.GetAllParameters()); + ParseIdsFunc(allParams, cardId); + } + IDictionary> relationCardSortDic = Data.Master.RelationCardSortDic; + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + if (relationCardSortDic.ContainsKey(cardParameterFromId.NormalCardId)) + { + _relationCardIds = new List(relationCardSortDic[cardParameterFromId.NormalCardId]); + } + else + { + _relationCardIds = SortRelationCardByKeyWordTextOrder(_relationCardIds); + } + bool flag = false; + foreach (int relationCardId in _relationCardIds) + { + if (relationCardSortDic.ContainsKey(relationCardId)) + { + flag = true; + break; + } + } + if (!relationCardSortDic.ContainsKey(cardParameterFromId.NormalCardId) && flag) + { + _relationCardIds = SortPartOfRelationCard(_relationCardIds, cardParameterFromId.NormalCardId); + } + } + + private static List SortPartOfRelationCard(List originalList, int cardId) + { + List list = new List(); + list.AddRange(originalList); + IDictionary> relationCardSortDic = Data.Master.RelationCardSortDic; + foreach (int original in originalList) + { + if (!relationCardSortDic.TryGetValue(original, out var value)) + { + continue; + } + List list2 = new List(); + for (int i = 0; i < value.Count; i++) + { + int num = value[i]; + for (int j = 0; j < originalList.Count; j++) + { + if (originalList[j] == num) + { + list2.Add(j); + break; + } + } + } + list2.Sort(); + for (int k = 0; k < list2.Count; k++) + { + int index = list2[k]; + list[index] = value[k]; + } + } + return list; + } + + private List SortRelationCardByKeyWordTextOrder(List originalList) + { + if (originalList.Count < 2) + { + return originalList; + } + List sortedCardIdList = new List(); + List keywordListInCard = GetKeywordListInCard(CardData.CardId); + for (int i = 0; i < keywordListInCard.Count; i++) + { + List cardIdsInKeyword = GetCardIdsInKeyword(keywordListInCard[i]); + if (cardIdsInKeyword.Count == 0) + { + continue; + } + int num = cardIdsInKeyword[0]; + if (!originalList.Contains(num)) + { + continue; + } + if (!sortedCardIdList.Contains(num)) + { + sortedCardIdList.Add(num); + } + List keywordListInCard2 = GetKeywordListInCard(num); + for (int j = 0; j < keywordListInCard2.Count; j++) + { + List cardIdsInKeyword2 = GetCardIdsInKeyword(keywordListInCard2[j]); + if (cardIdsInKeyword2.Count == 0) + { + continue; + } + for (int k = 0; k < cardIdsInKeyword2.Count; k++) + { + int num2 = cardIdsInKeyword2[k]; + if (originalList.Contains(num2) && !sortedCardIdList.Contains(num2)) + { + sortedCardIdList.Add(num2); + } + if (k > 0) + { + AddNonAppearedRelationCardId(num2, ref sortedCardIdList); + } + } + AddNonAppearedRelationCardId(cardIdsInKeyword2[0], ref sortedCardIdList); + } + AddNonAppearedRelationCardId(num, ref sortedCardIdList); + } + foreach (int original in originalList) + { + if (!sortedCardIdList.Contains(original)) + { + sortedCardIdList.Add(original); + } + } + return sortedCardIdList; + } + + private void AddNonAppearedRelationCardId(int parentCardId, ref List sortedCardIdList) + { + if (!_relationCardParentDict.TryGetValue(parentCardId, out var value)) + { + return; + } + foreach (int item in value) + { + if (!sortedCardIdList.Contains(item)) + { + sortedCardIdList.Add(item); + } + } + } + + private List GetKeywordListInCard(int cardId) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId); + List list = BattleKeywordInfoListMgr.GetKeywords(cardParameterFromId.ConvertedSkillDescription).ToList(); + if (CardBasePrm.IsFollowerCard(CardData.CharType)) + { + list.AddRange(BattleKeywordInfoListMgr.GetKeywords(cardParameterFromId.ConvertedEvoSkillDescription).ToList()); + } + return list; + } + + private List GetCardIdsInKeyword(string keyword) + { + List list = new List(); + if (Data.Master.BattleKeyWordDic.ContainsKey(keyword)) + { + list.AddRange(BattleKeywordInfoListMgr.GetCardIdsInDesc(Data.Master.BattleKeyWordDic[keyword])); + } + return list; + } + + private void UpdateCardImage() + { + CardMaster instance = CardMaster.GetInstance(_cardMasterId); + int cardId = CardData.CardId; + CardParameter cardParameterFromId = instance.GetCardParameterFromId(cardId); + int resourceCardId = cardParameterFromId.ResourceCardId; + int rarity = CardData.Rarity; + CardBasePrm.CharaType charType = CardData.CharType; + GameObject gameObject = null; + Material material = null; + bool flag = CardBasePrm.IsFollowerCard(charType); + bool flag2 = CardBasePrm.IsSpellCard(charType); + bool flag3 = CardBasePrm.IsAmuletCard(charType); + UnitCardObject.SetActive(flag && !flag2 && !flag3); + SpellCardObject.SetActive(!flag && flag2 && !flag3); + FieldCardObject.SetActive(!flag && !flag2 && flag3); + if (flag2) + { + gameObject = SpellCardObject; + try + { + material = Toolbox.ResourcesManager.FindCardMaterial(resourceCardId, ResourcesManager.AssetLoadPathType.SpellCardMaterial, isEvol: false, CardMaster.IsMutationCardCheck(instance.GetCardParameterFromId(cardId).BaseCardId), instance.GetCardParameterFromId(resourceCardId).CharType); + CardShaderDefine.ReplaceShader(material); + } + catch (Exception ex) + { + Debug.LogError(ex.ToString()); + LocalLog.AccumulateTraceLog(ex.ToString()); + } + _rotationOnlyIconSpell.SetActive(cardParameterFromId.IsResurgentCard); + SpellCost.text = CardData.Cost.ToString(); + SpellName.text = CardData.CardName; + Global.SetRepositionNameLabel(SpellName, CardData.CardName, is2D: false); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(SpellCost, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(SpellName, CardData.IsFoil); + } + else if (flag3) + { + gameObject = FieldCardObject; + try + { + material = Toolbox.ResourcesManager.FindCardMaterial(resourceCardId, ResourcesManager.AssetLoadPathType.SpellCardMaterial, isEvol: false, CardMaster.IsMutationCardCheck(instance.GetCardParameterFromId(cardId).BaseCardId), instance.GetCardParameterFromId(resourceCardId).CharType); + CardShaderDefine.ReplaceShader(material); + } + catch (Exception ex2) + { + Debug.LogError(ex2.ToString()); + LocalLog.AccumulateTraceLog(ex2.ToString()); + } + _rotationOnlyIconAmulet.SetActive(cardParameterFromId.IsResurgentCard); + FieldCost.text = CardData.Cost.ToString(); + FieldName.text = CardData.CardName; + Global.SetRepositionNameLabel(FieldName, CardData.CardName, is2D: false); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(FieldCost, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(FieldName, CardData.IsFoil); + } + else if (flag) + { + gameObject = UnitCardObject; + try + { + material = Toolbox.ResourcesManager.FindCardMaterial(resourceCardId, ResourcesManager.AssetLoadPathType.UnitCardMaterial, _isEvolCard); + CardShaderDefine.ReplaceShader(material); + } + catch (Exception ex3) + { + Debug.LogError(ex3.ToString()); + LocalLog.AccumulateTraceLog(ex3.ToString()); + } + _rotationOnlyIconFollower.SetActive(cardParameterFromId.IsResurgentCard); + UnitCost.text = CardData.Cost.ToString(); + UnitAtk.text = (_isEvolCard ? CardData.EvoAtk.ToString() : CardData.Atk.ToString()); + UnitLife.text = (_isEvolCard ? CardData.EvoLife.ToString() : CardData.Life.ToString()); + UnitName.text = CardData.CardName; + Global.SetRepositionNameLabel(UnitName, CardData.CardName, is2D: false); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(UnitCost, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(UnitAtk, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(UnitLife, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(UnitName, CardData.IsFoil); + } + if (material != null) + { + if (cardParameterFromId.IsFoil) + { + if (_premiumShader == null) + { + _premiumShader = Shader.Find("Wizard/VariantCardShader"); + } + if (material.shader != _premiumShader) + { + material.shader = _premiumShader; + material.color = Color.white; + } + } + else + { + if (_normalShader == null) + { + _normalShader = Shader.Find("Wizard/Card/Basic_Front0_Back0_Normal"); + } + if (material.shader != _normalShader) + { + material.shader = _normalShader; + material.color = Color.white; + } + } + } + if (_cardMaterial != null) + { + UnityEngine.Object.Destroy(_cardMaterial); + } + Material cardMaterial = ((material != null) ? UnityEngine.Object.Instantiate(material) : null); + Material[] sharedMaterials = new Material[3] + { + UIManager.GetInstance().getUIBase_CardManager()._3dCardFrameManager.GetFrameMaterial(cardParameterFromId.IsPhantomCard, charType, rarity), + _cardMaterial = cardMaterial, + CardCreatorBase.GetSharedClassIconMaterial(CardData.Clan) + }; + LOD[] lODs = gameObject.GetComponent().GetLODs(); + for (int i = 0; i < lODs.Length; i++) + { + lODs[i].renderers[0].sharedMaterials = sharedMaterials; + } + AttachShadow(gameObject, CardShadow.gameObject); + bool active = UIManager.GetInstance().GetCurrentScene() == UIManager.ViewScene.CardAllList && GetPossessionCardNum(isIncludingSpotCard: true) <= 0; + CardShadow.SetActive(active); + } + + private static void AttachShadow(GameObject parentObj, GameObject shadowObj) + { + Transform parent = parentObj.transform; + Transform obj = shadowObj.transform; + obj.parent = parent; + obj.localPosition = new Vector3(0f, 0f, kCARD_POS_Z - 1f); + obj.localRotation = Quaternion.identity; + obj.localScale = new Vector3(1f / kCARD_SCALE, 1f / kCARD_SCALE, 1f); + shadowObj.layer = parentObj.layer; + } + + private void UpdateCardNum(GameObject card2dObj = null) + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (_isOwnCardNum || card2dObj == null) + { + int possessionCardNum = GetPossessionCardNum(); + if (dataMgr.SpotCardData.ExistsSpotCard(CardData.CardId)) + { + int spotCardNum = dataMgr.SpotCardData.GetSpotCardNum(CardData.CardId); + SetCardNumLabel(possessionCardNum, spotCardNum); + } + else + { + SetCardNumLabel(possessionCardNum); + } + return; + } + CardListTemplate component = card2dObj.GetComponent(); + if (component != null && component.IsShowNum()) + { + if (component.IsIncludingSpotCard) + { + SetCardNumLabel(component.GetNum(), component.GetSpotCardNum()); + } + else + { + SetCardNumLabel(component.GetNum()); + } + } + else + { + SetCardNumLabel(0); + } + } + + private static bool IsTokenId(int cardId) + { + return cardId / 100000000 == 9; + } + + private int GetPossessionCardNumOnRelationCard(bool isIncludingSpotCard) + { + if (IsTokenId(CardData.CardId)) + { + return GetPosessionCardNum(_originalCardId, isIncludingSpotCard); + } + int posessionCardNum = GetPosessionCardNum(_originalCardId, isIncludingSpotCard); + int posessionCardNum2 = GetPosessionCardNum(CardData.CardId, isIncludingSpotCard); + if (posessionCardNum > 0 || posessionCardNum2 > 0) + { + return 1; + } + return 0; + } + + private int GetPosessionCardNum(int cardId, bool isIncludingSpotCard) + { + if (_formatBehaviorForCardPoolChange != null) + { + return _formatBehaviorForCardPoolChange.GetPossessionCardNum(cardId, isIncludingSpotCard); + } + return GameMgr.GetIns().GetDataMgr().GetPossessionCardNum(cardId, isIncludingSpotCard); + } + + private int GetPossessionCardNum(bool isIncludingSpotCard = false) + { + if (IsRelationCardViewing) + { + return GetPossessionCardNumOnRelationCard(isIncludingSpotCard); + } + return GetPosessionCardNum(CardData.CardId, isIncludingSpotCard); + } + + private void SetCardNumLabel(int num) + { + SetCardNumActive(num > 0); + _cardNumLabel.text = num.ToString(); + } + + private void SetCardNumLabel(int cardNum, int spotCardNum) + { + SetCardNumActive(cardNum + spotCardNum > 0); + _cardNumLabel.text = $"{cardNum}[fcd24a]+{spotCardNum}"; + } + + private void SetCardNumActive(bool isEnabled) + { + if (IsRelationCardViewing) + { + CardNum.SetActive(value: false); + } + else + { + CardNum.SetActive(isEnabled); + } + } + + private void UpdateCardText() + { + if (_isShowCardAblityText) + { + UpdateCardAbilityText(); + StartCoroutine(DelayResetScrollViewPosition()); + _shouldResetTextScrollView = true; + } + else + { + UpdateCardFlavorText(); + if (_shouldResetTextScrollView) + { + ResetScrollViewPosition(); + _shouldResetTextScrollView = false; + } + } + CardBasePrm.CharaType charType = CardData.CharType; + bool flag = CardBasePrm.IsFollowerCard(charType); + bool flag2 = CardBasePrm.IsSpellCard(charType); + bool flag3 = CardBasePrm.IsAmuletCard(charType); + UnitCardTextScrollView.gameObject.SetActive(flag && !flag2 && !flag3); + if (UnitCardTextScrollView.gameObject.activeSelf) + { + UnitCardStatusObj.gameObject.SetActive(_isShowCardAblityText); + UnitCardIntroductionObj.gameObject.SetActive(!_isShowCardAblityText); + } + SpellCardTextScrollView.gameObject.SetActive(!flag && flag2 && !flag3); + if (SpellCardTextScrollView.gameObject.activeSelf) + { + SpellCardStatusObj.gameObject.SetActive(_isShowCardAblityText); + SpellCardIntroductionObj.gameObject.SetActive(!_isShowCardAblityText); + } + SettingCardTextScrollView.gameObject.SetActive(!flag && !flag2 && flag3); + if (SettingCardTextScrollView.gameObject.activeSelf) + { + SettingCardStatusObj.gameObject.SetActive(_isShowCardAblityText); + SettingCardIntroductionObj.gameObject.SetActive(!_isShowCardAblityText); + } + _cardVoiceLabelRoot.gameObject.SetActive(!_isShowCardAblityText && CardData.CardVoice != string.Empty); + _cardSetLabelRoot.gameObject.SetActive(!_isShowCardAblityText); + } + + private void UpdateCardAbilityText() + { + CardBasePrm.CharaType charType = CardData.CharType; + string convertedSkillDescription = CardData.ConvertedSkillDescription; + if (CardBasePrm.IsFollowerCard(charType)) + { + FollowerCardAbilityTexActive(); + } + else if (CardBasePrm.IsSpellCard(charType)) + { + SpellCardSkill.SetWrapText(convertedSkillDescription); + SpellCardSkill.gameObject.SetActive(value: false); + SpellCardSkill.gameObject.SetActive(value: true); + _cardSpellTextLineCreater.ShowLines(GetLineNumber(SpellCardSkill), isOriginalActive: true); + } + else if (CardBasePrm.IsAmuletCard(charType)) + { + SettingCardSkill.SetWrapText(convertedSkillDescription); + SettingCardSkill.gameObject.SetActive(value: false); + SettingCardSkill.gameObject.SetActive(value: true); + _cardAmuletTextLineCreater.ShowLines(GetLineNumber(SettingCardSkill), isOriginalActive: true); + } + } + + private void FollowerCardAbilityTexActive() + { + bool isEvolveChoiceCard = CardData.IsEvolveChoiceCard; + UILabel normalTitleLavel = _normalTitleLavel; + string text3; + if (!isEvolveChoiceCard) + { + string text = (_normalTitleLavel.text = Data.SystemText.Get("Card_0037")); + text3 = text; + } + else + { + text3 = Data.SystemText.Get("Card_0038"); + } + normalTitleLavel.text = text3; + _evolveInfoObjectRoot.gameObject.SetActive(!isEvolveChoiceCard); + UnitCardSkill.SetWrapText(isEvolveChoiceCard ? CardData.ConvertedEvoSkillDescription : CardData.ConvertedSkillDescription); + UnitCardEvoSkill.SetWrapText(isEvolveChoiceCard ? string.Empty : CardData.ConvertedEvoSkillDescription); + UnitCardAtkRight.text = (isEvolveChoiceCard ? CardData.EvoAtk.ToString() : CardData.Atk.ToString()); + UnitCardLifeRight.text = (isEvolveChoiceCard ? CardData.EvoLife.ToString() : CardData.Life.ToString()); + UnitCardEvoAtkRight.text = (isEvolveChoiceCard ? string.Empty : CardData.EvoAtk.ToString()); + UnitCardEvoLifeRight.text = (isEvolveChoiceCard ? string.Empty : CardData.EvoLife.ToString()); + UnitCardSkill.gameObject.SetActive(value: false); + UnitCardSkill.gameObject.SetActive(value: true); + UnitCardEvoSkill.gameObject.SetActive(value: false); + UnitCardEvoSkill.gameObject.SetActive(!isEvolveChoiceCard); + _cardSkillTextLineCreater.ShowLines(GetLineNumber(UnitCardSkill)); + _cardEvoSkillTextLineCreater.ShowLines(GetLineNumber(UnitCardEvoSkill)); + } + + private int GetLineNumber(UILabel uILabel) + { + return Global.GetTextLineCount(uILabel.text); + } + + private void UpdateCardFlavorText() + { + string wrapText = "???"; + NGUIText.Alignment alignment = NGUIText.Alignment.Center; + if (IsPopularityVote || GetPossessionCardNum(isIncludingSpotCard: true) > 0) + { + wrapText = (_isEvolCard ? CardData.EvoDescription : CardData.Description); + alignment = NGUIText.Alignment.Left; + } + CardBasePrm.CharaType charType = CardData.CharType; + UILabel uILabel = null; + if (CardBasePrm.IsFollowerCard(charType)) + { + uILabel = UnitCardIntroduction; + } + else if (CardBasePrm.IsSpellCard(charType)) + { + uILabel = SpellCardIntroduction; + } + else if (CardBasePrm.IsAmuletCard(charType)) + { + uILabel = SettingCardIntroduction; + } + uILabel.SetWrapText(wrapText); + uILabel.alignment = alignment; + _cardVoiceValueLabel.text = CardData.CardVoice; + _cardSetValueLabel.text = Data.Master.CardSetNameMgr.Get(CardData.CardSetId).LongName; + } + + private void UpdateButtonState() + { + UpdateFavoriteButton(); + UpdateVoiceButton(); + CardIntroductionButton.SetActive(IsShowFlavorTextButton); + UpdateEvolutionButton(); + UpdatePremiumCardConversionButton(); + QuestionMark.SetActive(_isShowCardAblityText && BattlePlayerView.HasKeyword(CardData)); + } + + private void OnSwipeCard(GameObject g, Vector2 dir) + { + if (IsRelationCardViewing) + { + if (_relationCardIds.Count > 1) + { + if (dir.x >= 70f) + { + OnPushLeftButton(LeftButton); + } + if (dir.x <= -70f) + { + OnPushRightButton(RightButton); + } + } + } + else if (!IsAnimationPlaying && (!(_craftDialog != null) || !_craftDialog.IsOpen())) + { + OnDragCard.Call(dir); + } + } + + private void ParseIdsFunc(List allParams, int cardId) + { + foreach (CardParameter allParam in allParams) + { + if (allParam.CardId == cardId) + { + ParseIds(allParams, allParam.Skill, cardId); + ParseIds(allParams, allParam.SkillCondition, cardId); + ParseIds(allParams, allParam.SkillOption, cardId, RELATION_CARD_SKILLOPTION_EXCLUDED_OPTIONS, RELATION_CARD_SKILLOPTION_SEPARATORS); + ParseIds(allParams, allParam.SkillPreprocess, cardId); + ParseIds(allParams, allParam.SkillTarget, cardId); + break; + } + } + } + + private void ParseIds(List allParams, string str, int cardId, List excludedOptions = null, char[] separators = null) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId); + string normalSkillText = Global.ConvertToWithoutBBCode(cardParameterFromId.SkillDescription); + string evolSkillText = Global.ConvertToWithoutBBCode(cardParameterFromId.EvoSkillDescription); + if (excludedOptions != null && separators != null) + { + string[] sub = str.Split(separators, StringSplitOptions.RemoveEmptyEntries); + int i; + for (i = 0; i < sub.Length; i++) + { + if (excludedOptions.Any((string x) => sub[i].Contains(x))) + { + continue; + } + foreach (Match item in Regex.Matches(sub[i], "\\d{9}")) + { + int validateCardId = int.Parse(item.Value); + ValidateAddId(validateCardId, cardParameterFromId, normalSkillText, evolSkillText, allParams); + } + } + } + else + { + foreach (Match item2 in Regex.Matches(str, "\\d{9}")) + { + int validateCardId2 = int.Parse(item2.Value); + ValidateAddId(validateCardId2, cardParameterFromId, normalSkillText, evolSkillText, allParams); + } + } + if (_relationCardIds.Count > 0) + { + RelationCardButton.SetActive(value: true); + UpdateRelationCount(); + } + else + { + RelationCardButton.SetActive(value: false); + } + } + + private void ValidateAddId(int validateCardId, CardParameter refRootCardParam, string normalSkillText, string evolSkillText, List allParams) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(_originalCardId); + CardParameter cardParameterFromId2 = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(validateCardId); + int validateBaseCardId = cardParameterFromId2.BaseCardId; + if ((validateBaseCardId == cardParameterFromId.BaseCardId && !cardParameterFromId2.IsEvolveChoiceCard) || validateCardId == 0 || _relationCardIds.Contains(validateCardId) || validateCardId == refRootCardParam.CardId || validateCardId == refRootCardParam.NormalCardId) + { + return; + } + if (refRootCardParam.CardId != _originalCardId) + { + int num = _relationCardIds.FindIndex((int cardId) => CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId).BaseCardId == validateBaseCardId); + if (num >= 0) + { + CardParameter cardParameterFromId3 = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(_relationCardIds[num]); + if (cardParameterFromId3.BaseCardId == cardParameterFromId3.CardId || validateBaseCardId != validateCardId) + { + return; + } + _relationCardIds.RemoveAt(num); + } + } + if (validateCardId == 100011010) + { + string value = Global.ConvertToWithoutBBCode(CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(validateCardId).CardName); + if (!normalSkillText.Contains(value) && !evolSkillText.Contains(value)) + { + return; + } + } + if (!validateCardId.ToString().StartsWith(RELATION_CARD_DISABLE_CARD_ID_HEADER, StringComparison.Ordinal)) + { + _relationCardIds.Add(validateCardId); + if (!_relationCardParentDict.TryGetValue(refRootCardParam.CardId, out var value2)) + { + value2 = new List(); + _relationCardParentDict.Add(refRootCardParam.CardId, value2); + } + value2.Add(validateCardId); + } + ParseIdsFunc(allParams, validateCardId); + } + + private void OnPushRelationCardButton(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + if (!IsAnimationPlaying) + { + IsAnimationPlaying = true; + RelationCardButton.SetActive(value: false); + RelationWrapperObj.SetActive(value: true); + _relationIndex = 0; + RereshRelation(g); + } + } + + private void OnPushRelationBackButton(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SWITCH_MENU); + if (!IsAnimationPlaying) + { + RelationWrapperObj.SetActive(value: false); + IsAnimationPlaying = true; + _relationIndex = 0; + SetCardDetail(_originalCardId, _relationCardBaseGameObject); + OpenCardAnimation(); + DialogTitleLabel.text = Data.SystemText.Get("Card_0135"); + } + } + + private void OnPushRightButton(GameObject g) + { + if (IsRelationCardViewing) + { + if (!IsAnimationPlaying) + { + IsAnimationPlaying = true; + _relationIndex++; + if (_relationIndex >= _relationCardIds.Count) + { + _relationIndex = 0; + } + RereshRelation(g); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + else + { + OnDragCard.Call(new Vector2(-70f, 0f)); + } + } + + private void OnPushLeftButton(GameObject g) + { + if (IsRelationCardViewing) + { + if (!IsAnimationPlaying) + { + IsAnimationPlaying = true; + _relationIndex--; + if (_relationIndex < 0) + { + _relationIndex = _relationCardIds.Count - 1; + } + RereshRelation(g); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + else + { + OnDragCard.Call(new Vector2(70f, 0f)); + } + } + + private void UpdateRelationCount() + { + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(_originalCardId); + DialogTitleLabel.text = string.Format(Data.SystemText.Get("Card_0217") + "\u3000({1}/{2})", cardParameterFromId.CardName, _relationIndex + 1, _relationCardIds.Count); + } + + private void RereshRelation(GameObject g) + { + UpdateRelationCount(); + if (IsRelationCardViewing) + { + bool active = _relationCardIds.Count > 1; + RightButton.SetActive(active); + LeftButton.SetActive(active); + } + Toolbox.ResourcesManager.RemoveAssetGroup(_assetTokenPathList); + _assetTokenPathList.Clear(); + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(_originalCardId); + int id = _relationCardIds[_relationIndex]; + CardParameter cardParameterFromId2 = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(id); + if (cardParameterFromId.IsFoil) + { + id = cardParameterFromId2.FoilCardId; + } + AddResourceList(cardParameterFromId2); + CardTexture.SetActive(value: false); + SetEnableButtons(isEnable: false); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(_assetTokenPathList, delegate + { + CardTexture.SetActive(value: true); + SetCardDetail(id, g, isUpdateRelation: false); + OpenCardAnimation(); + SetEnableButtons(isEnable: true); + }); + } + + private void AddResourceList(CardParameter CardPrm) + { + int resourceCardId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(CardPrm.NormalCardId).ResourceCardId; + switch (CardPrm.CharType) + { + case CardBasePrm.CharaType.NORMAL: + { + string assetTypePath3 = Toolbox.ResourcesManager.GetAssetTypePath(resourceCardId.ToString(), ResourcesManager.AssetLoadPathType.UnitCardMaterial); + _assetTokenPathList.Add(assetTypePath3); + break; + } + case CardBasePrm.CharaType.SPELL: + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(resourceCardId.ToString(), ResourcesManager.AssetLoadPathType.SpellCardMaterial); + _assetTokenPathList.Add(assetTypePath2); + break; + } + default: + { + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(resourceCardId.ToString(), ResourcesManager.AssetLoadPathType.SpellCardMaterial); + _assetTokenPathList.Add(assetTypePath); + break; + } + } + } + + private void OnOpenCardViewMode(GameObject g) + { + if (_isAbleTapDialogObject && !IsAnimationPlaying && !isAnimation && !isCardViewMode && (UIManager.GetInstance().GetCurrentScene() != UIManager.ViewScene.CardAllList || GetPossessionCardNum(isIncludingSpotCard: true) > 0)) + { + isCardViewMode = true; + IsAnimationPlaying = true; + CardViewBG.SetActive(value: true); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_INFO); + CardBasePrm.CharaType charType = CardData.CharType; + if (CardBasePrm.IsSpellCard(charType)) + { + ViewCardObject = NGUITools.AddChild(base.gameObject, SpellCardObject); + } + else if (CardBasePrm.IsAmuletCard(charType)) + { + ViewCardObject = NGUITools.AddChild(base.gameObject, FieldCardObject); + } + else if (CardBasePrm.IsFollowerCard(charType)) + { + ViewCardObject = NGUITools.AddChild(base.gameObject, UnitCardObject); + } + iTween.ScaleTo(ViewCardObject, iTween.Hash("Scale", CardViewScale, "time", 0.3f)); + iTween.RotateTo(ViewCardObject, iTween.Hash("z", 0f, "time", 0.3f, "oncompletetarget", base.gameObject, "oncomplete", "OnAnimationOver")); + ViewCardObject.transform.localPosition = new Vector3(0f, 0f, -100f); + } + } + + private void OnCloseCardViewMode() + { + if (!IsAnimationPlaying && isCardViewMode) + { + IsAnimationPlaying = true; + RemoveCardViewMode(); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL); + CardBasePrm.CharaType charType = CardData.CharType; + GameObject target = null; + if (CardBasePrm.IsSpellCard(charType)) + { + target = SpellCardObject; + } + else if (CardBasePrm.IsAmuletCard(charType)) + { + target = FieldCardObject; + } + else if (CardBasePrm.IsFollowerCard(charType)) + { + target = UnitCardObject; + } + iTween.MoveTo(target, iTween.Hash("islocal", true, "z", kCARD_POS_Z, "time", 0.3f, "oncompletetarget", base.gameObject, "oncomplete", "OnAnimationOver")); + } + } + + private void RemoveCardViewMode() + { + if (isCardViewMode) + { + UnityEngine.Object.Destroy(ViewCardObject); + CardViewBG.SetActive(value: false); + isCardViewMode = false; + } + } + + private void OnCloseCardViewMode(GameObject g) + { + OnCloseCardViewMode(); + } + + private void UpdateFavoriteButton() + { + _isFavorite = GameMgr.GetIns().GetDataMgr().FavoriteCardList.Contains(CardData.CardId); + _favoriteButton.gameObject.SetActive(IsShowFavoriteButton && GetPossessionCardNum() > 0 && CardData.IsEnableFavorite && !IsRelationCardViewing); + SetFavoriteButtonSprite(_isFavorite); + } + + private void SetFavoriteButtonSprite(bool isFavorite) + { + string text = "btn_favorite_"; + string text2 = "off"; + string text3 = "on"; + _favoriteButton.normalSprite = text + (isFavorite ? text3 : text2); + _favoriteButton.pressedSprite = text + (isFavorite ? text2 : text3); + } + + private void OnClickFavoriteButton(GameObject g) + { + if (_isFavoriteButtonEnabled && GetPossessionCardNum() > 0) + { + _isFavoriteButtonEnabled = false; + StartCoroutine(Timer.DelayMethod(0.9f, delegate + { + _isFavoriteButtonEnabled = true; + })); + bool flag = !_isFavorite; + GameMgr.GetIns().GetSoundMgr().PlaySe(flag ? Se.TYPE.SYS_TOGGLE_ON : Se.TYPE.SYS_TOGGLE_OFF); + ChangeFavoriteState(); + } + } + + private void ChangeFavoriteState() + { + bool is_protected = !_isFavorite; + CardProtectTask cardProtectTask = new CardProtectTask(); + cardProtectTask.SetParameter(CardData.CardId, is_protected); + StartCoroutine(Toolbox.NetworkManager.Connect(cardProtectTask, OnSuccessProtectCard, null, OnErrorProtectCard)); + } + + private void OnSuccessProtectCard(NetworkTask.ResultCode code) + { + UpdateButtonState(); + UpdateCreateLiquefyButton(); + OnChangeCardFavoriteState.Call(); + } + + private void OnErrorProtectCard(int code) + { + UpdateButtonState(); + UpdateCreateLiquefyButton(); + } + + private void UpdateVoiceButton() + { + CardVoiceData cardVoiceData = new CardVoiceData(CardData, _cardMasterId); + bool flag = (!_isEvolCard && cardVoiceData._voiceListBeforeEvo.Count > 0) || (_isEvolCard && cardVoiceData._voiceListAfterEvo.Count > 0); + _voiceButton.gameObject.SetActive(flag && IsShowVoiceButton && (IsPopularityVote || GetPossessionCardNum(isIncludingSpotCard: true) > 0)); + } + + private void OnClickVoiceButton(GameObject g) + { + _cardVoiceManager.SequentiallyPlay(CardData, _isEvolCard, _cardMasterId); + } + + private void OnClickChangeCardTextTypeButton(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + _isShowCardAblityText = !_isShowCardAblityText; + UpdateCardText(); + UpdateButtonState(); + } + + private void UpdateEvolutionButton() + { + if (CardBasePrm.IsFollowerCard(CardData.CharType) && !CardData.IsEvolveChoiceCard) + { + CardEvolButton.gameObject.SetActive(IsShowEvolutionButton && (IsPopularityVote || GetPossessionCardNum(isIncludingSpotCard: true) > 0)); + _evolutionButtonLabel.text = Data.SystemText.Get(_isEvolCard ? "Card_0067" : "Card_0030"); + } + else + { + CardEvolButton.gameObject.SetActive(value: false); + } + } + + private void OnClickEvolutionButton(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_MYPAGE_EVOLVE); + _isEvolCard = !_isEvolCard; + UpdateCardImage(); + UpdateCardText(); + UpdateButtonState(); + _cardVoiceManager.Stop(); + if (_evolEffect != null) + { + _evolEffect.Play(); + return; + } + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("cmn_deckedit_evo_1", ResourcesManager.AssetLoadPathType.Effect2D); + _assetPathList.Add(assetTypePath); + StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(assetTypePath, delegate + { + GameObject gameObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_deckedit_evo_1", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)) as GameObject; + if (gameObject != null) + { + ParticleSystem component = gameObject.GetComponent(); + ParticleSystem.MainModule main = component.main; + main.playOnAwake = false; + _evolEffect = UnityEngine.Object.Instantiate(component); + _evolEffect.transform.parent = CardTexture.transform; + _evolEffect.transform.localPosition = Vector3.back * 10f; + _evolEffect.transform.localRotation = Quaternion.identity; + _evolEffect.transform.localScale = Vector3.one * 600f; + _evolEffect.gameObject.layer = base.gameObject.layer; + Transform[] componentsInChildren = _evolEffect.GetComponentsInChildren(); + for (int i = 0; i < componentsInChildren.Length; i++) + { + componentsInChildren[i].gameObject.layer = base.gameObject.layer; + } + GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(new List { _evolEffect.gameObject }, delegate + { + if ((bool)_evolEffect) + { + _evolEffect.gameObject.SetActive(value: true); + _evolEffect.Play(); + } + }, isBattle: true); + } + })); + } + + private void UpdatePremiumCardConversionButton() + { + GameObject gameObject = _premiumCardConversionButton.gameObject; + UIManager.SetObjectToGrey(gameObject, PlayerStaticData.UserOrbNum <= 0); + if (!IsShowPremiumCardConversionButton || IsRelationCardViewing || GetPossessionCardNum() <= 0 || CardData.IsFoil || (CardData.IsNotCraftDestruct && !CardData.IsPreReleaseCard)) + { + gameObject.SetActive(value: false); + } + else + { + gameObject.SetActive(value: true); + } + } + + private void OnClickPremiumCardConversionButton(GameObject g) + { + if (GetPossessionCardNum() <= 0) + { + return; + } + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (isAnimation) + { + return; + } + SystemText systemText = Data.SystemText; + if (PlayerStaticData.UserOrbNum <= 0) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Card_0163_1")); + dialogBase.SetText(systemText.Get("Card_0163_2")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + } + else if (GameMgr.GetIns().GetDataMgr().GetPossessionCardNum(CardData.FoilCardId, isIncludingSpotCard: true) >= 3) + { + DialogBase dialogBase2 = UIManager.GetInstance().CreateDialogClose(); + dialogBase2.SetTitleLabel(systemText.Get("Card_0164_1")); + dialogBase2.SetText(systemText.Get("Card_0164_2")); + dialogBase2.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + } + else if (_isFavorite) + { + DialogBase dialogBase3 = UIManager.GetInstance().CreateDialogClose(); + dialogBase3.SetTitleLabel(systemText.Get("Card_0165_1")); + dialogBase3.SetText(systemText.Get("Card_0165_2")); + dialogBase3.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase3.SetButtonText(systemText.Get("Card_0165_3")); + dialogBase3.onPushButton1 = delegate + { + CreatePremiumCardConversionDialog(); + }; + } + else + { + CreatePremiumCardConversionDialog(); + } + } + + private void CreatePremiumCardConversionDialog() + { + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + PremiumCardConversionDialogParts premiumCardConversionDialogParts = UnityEngine.Object.Instantiate(_premiumCardConversionDialogPrefab); + premiumCardConversionDialogParts.Initialize(CardData); + dialogBase.SetObj(premiumCardConversionDialogParts.gameObject); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(systemText.Get("Card_0162_1")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(systemText.Get("Card_0162_7")); + dialogBase.onPushButton1 = delegate + { + if (!_isFavorite) + { + ConvertPremiumCard(); + } + else + { + ChangeFavoriteState(); + OnChangeCardFavoriteState = (Action)Delegate.Combine(OnChangeCardFavoriteState, new Action(ConvertPremiumCard)); + } + }; + } + + private void ConvertPremiumCard() + { + OnChangeCardFavoriteState = (Action)Delegate.Remove(OnChangeCardFavoriteState, new Action(ConvertPremiumCard)); + PremiumCardConversionTask premiumCardConversionTask = new PremiumCardConversionTask(); + premiumCardConversionTask.SetParameter(CardData.CardId, GetPossessionCardNum()); + StartCoroutine(Toolbox.NetworkManager.Connect(premiumCardConversionTask, OnSuccessPremiumCardConversion)); + } + + private void OnSuccessPremiumCardConversion(NetworkTask.ResultCode code) + { + OnConvertedPremiumCard.Call(CardData); + StartCoroutine(StartPremiumCardConversionAnimation()); + } + + private IEnumerator StartPremiumCardConversionAnimation() + { + isAnimation = true; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_USE_RED_ETHER); + yield return StartCoroutine(PlayCardCreateEffect(PREMIUM_CARD_CONVERSION_PARTICLE_COLOR, _premiumCardConversionButton.transform.position, _cardNumLabel.transform.position, 4)); + SetCardDetail(CardData.FoilCardId); + isAnimation = false; + } + + private void UpdateCreateLiquefyButton(bool isUpdateHaveRedether = true) + { + if (IsShowCraftButtons && !IsRelationCardViewing) + { + _craftPanel.gameObject.SetActive(value: true); + _craftPanel.UpdateCraftPanel(CardData, isUpdateHaveRedether); + } + else + { + _craftPanel.gameObject.SetActive(value: false); + } + } + + private void StartCardDestruct() + { + if (!IsAbleToDestruct) + { + return; + } + CardMake component = base.gameObject.GetComponent(); + component.OnCardSell = delegate + { + if (GetPossessionCardNum() <= 0) + { + OnLiquefyAllCard.Call(CardData); + } + StartCoroutine(RunCardDestruct()); + }; + component.StartCardDestruct(CardData.CardId); + } + + private IEnumerator RunCardDestruct() + { + isAnimation = true; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GET_RED_ETHER); + yield return StartCoroutine(PlayCardLiquefyEffect(CARD_LIQUEFY_PARTICLE_COLOR, _cardNumLabel.transform.position, RedEtherIcon.transform.position, CardData.Rarity)); + iTween.ValueTo(base.gameObject, iTween.Hash("from", int.Parse(_redEtherHaveValueLabel.text), "to", PlayerStaticData.UserRedEtherCount, "time", 0.5f, "onupdate", "OnUpdateRedEther", "oncomplete", "OnCompleteRedEther", "easetype", iTween.EaseType.easeOutQuad)); + UpdateCardNum(); + CardShadow.gameObject.SetActive(GetPossessionCardNum(isIncludingSpotCard: true) <= 0 && !IsShortageUI); + UpdateCardText(); + UpdateButtonState(); + OnCardNumChange.Call(); + UpdateCreateLiquefyButton(isUpdateHaveRedether: false); + OnCardSellId.Call(CardData.CardId); + yield return new WaitForSeconds(0.2f); + isAnimation = false; + } + + private IEnumerator PlayCardLiquefyEffect(Color particleColor, Vector3 particleStartPos, Vector3 particleEndPos, int particleNum) + { + particleStartPos += CARD_DESTROY_PARTICLE_OFFSET; + particleEndPos += CARD_DESTROY_PARTICLE_OFFSET; + EffectMgr effectMgr = GameMgr.GetIns().GetEffectMgr(); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_CARD_1); + for (int i = 0; i < CardData.Rarity; i++) + { + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_TRACK_1); + } + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_ICON_1); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_1); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_2); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_3); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_4); + effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_CARD_1, CardTexture.transform.position).ChangeParticleColor(particleColor); + for (int j = 0; j < particleNum; j++) + { + Effect effect = effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_TRACK_1, particleStartPos); + effect.ChangeParticleColor(particleColor); + Vector3 vector = new Vector3(UnityEngine.Random.value * 3f - 1.5f, UnityEngine.Random.value * 3f - 1.5f, -1f); + Vector3[] bezierQuad = MotionUtils.GetBezierQuad(particleStartPos, particleStartPos + vector, particleEndPos, 10); + iTween.MoveTo(effect.GetGameObjIns(), iTween.Hash("path", bezierQuad, "time", 0.5f, "movetopath", false, "easetype", iTween.EaseType.linear)); + } + yield return new WaitForSeconds(0.5f); + effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_ICON_1, particleEndPos).ChangeParticleColor(particleColor); + EffectMgr.EffectType type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_1; + switch (particleNum) + { + case 1: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_1; + break; + case 2: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_2; + break; + case 3: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_3; + break; + case 4: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_4; + break; + } + effectMgr.Start(type, particleEndPos).ChangeParticleColor(particleColor); + } + + private void StartCardCraft() + { + if (!IsAbleToCraft) + { + return; + } + CardMake component = base.gameObject.GetComponent(); + component.OnCardBuy = delegate + { + if (GetPossessionCardNum(isIncludingSpotCard: true) == 1) + { + OnCreateFirstCard.Call(); + } + StartCoroutine(RunCardCraft()); + }; + component.StartCardCraft(CardData.CardId); + } + + private IEnumerator RunCardCraft() + { + isAnimation = true; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_USE_RED_ETHER); + yield return StartCoroutine(PlayCardCreateEffect(CARD_CREATE_PARTICLE_COLOR, RedEtherIcon.transform.position, _cardNumLabel.transform.position, CardData.Rarity)); + iTween.ValueTo(base.gameObject, iTween.Hash("from", int.Parse(_redEtherHaveValueLabel.text), "to", PlayerStaticData.UserRedEtherCount, "time", 0.5f, "onupdate", "OnUpdateRedEther", "oncomplete", "OnCompleteRedEther", "easetype", iTween.EaseType.easeOutQuad)); + UpdateCardNum(); + CardShadow.gameObject.SetActive(value: false); + UpdateCardText(); + UpdateButtonState(); + UpdateCreateLiquefyButton(isUpdateHaveRedether: false); + OnCardNumChange.Call(); + OnCardBuy.Call(); + yield return new WaitForSeconds(0.2f); + isAnimation = false; + } + + private IEnumerator PlayCardCreateEffect(Color particleColor, Vector3 particleStartPos, Vector3 particleEndPos, int particleNum) + { + EffectMgr effectMgr = GameMgr.GetIns().GetEffectMgr(); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_ICON_1); + for (int i = 0; i < particleNum; i++) + { + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_TRACK_1); + } + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_CARD_2); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_1); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_2); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_3); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_4); + effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_ICON_1, particleStartPos).ChangeParticleColor(particleColor); + for (int j = 0; j < particleNum; j++) + { + Effect effect = effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_TRACK_1, particleStartPos); + effect.ChangeParticleColor(particleColor); + Vector3 vector = new Vector3(UnityEngine.Random.value * 3f - 1.5f, UnityEngine.Random.value * 3f - 1.5f, -1f); + Vector3[] bezierQuad = MotionUtils.GetBezierQuad(particleStartPos, particleStartPos + vector, particleEndPos, 10); + iTween.MoveTo(effect.GetGameObjIns(), iTween.Hash("path", bezierQuad, "time", 0.5f, "movetopath", false, "easetype", iTween.EaseType.linear)); + } + yield return new WaitForSeconds(0.5f); + effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_CARD_2, CardTexture.transform.position + Vector3.back); + EffectMgr.EffectType type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_1; + switch (particleNum) + { + case 1: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_1; + break; + case 2: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_2; + break; + case 3: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_3; + break; + case 4: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_4; + break; + } + effectMgr.Start(type, particleEndPos).ChangeParticleColor(particleColor); + } + + private void OnUpdateRedEther(int value) + { + _redEtherHaveValueLabel.text = value.ToString(); + } + + private void OnCompleteRedEther() + { + _redEtherHaveValueLabel.text = PlayerStaticData.UserRedEtherCount.ToString(); + } + + private void CreateDialog(Action onOk, bool buy) + { + if (!isAnimation) + { + _craftDialog = UIManager.GetInstance().CreateDialogClose(); + _craftDialog.onPushButton1 = onOk; + PurchaseConfirm purchaseConfirm = UnityEngine.Object.Instantiate(PurchaseConfirmPrefab); + _craftDialog.SetObj(purchaseConfirm.gameObject); + int userRedEtherCount = PlayerStaticData.UserRedEtherCount; + SystemText systemText = Data.SystemText; + if (buy) + { + _craftDialog.SetTitleLabel(systemText.Get("Card_0081")); + _craftDialog.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + _craftDialog.SetButtonText(systemText.Get("Dia_CardList_003_Button")); + int useRedEther = CardData.UseRedEther; + purchaseConfirm.SetCardBuy(systemText.Get("Common_0205"), userRedEtherCount, useRedEther, CardData); + } + else + { + _craftDialog.SetTitleLabel(systemText.Get("Card_0080")); + _craftDialog.SetButtonLayout(DialogBase.ButtonLayout.RedBtn_CancelBtn); + _craftDialog.SetButtonText(systemText.Get("Dia_CardList_002_Button")); + int getRedEther = CardData.GetRedEther; + purchaseConfirm.SetCardSell(systemText.Get("Common_0205"), userRedEtherCount, getRedEther, CardData.CardName, CardData.IsFoil); + } + } + } + + private IEnumerator DelayResetScrollViewPosition() + { + yield return null; + ResetScrollViewPosition(); + } + + private void ResetScrollViewPosition() + { + UnitCardTextScrollView.ResetPosition(); + SpellCardTextScrollView.ResetPosition(); + SettingCardTextScrollView.ResetPosition(); + UnitCardTextScrollView.UpdateScrollbars(recalculateBounds: true); + SpellCardTextScrollView.UpdateScrollbars(recalculateBounds: true); + SettingCardTextScrollView.UpdateScrollbars(recalculateBounds: true); + } + + private void ChangeLayer(GameObject o, int layer) + { + o.layer = layer; + for (int i = 0; i < o.transform.childCount; i++) + { + ChangeLayer(o.transform.GetChild(i).gameObject, layer); + } + } + + public bool GetIsDetailOn() + { + return isDetailOn; + } + + public void SetDisableArrowButton() + { + OnDetailCardUpdate = delegate + { + RightButtonVisible = false; + LeftButtonVisible = false; + }; + } + + public void SetEnableButtons(bool isEnable) + { + for (int i = 0; i < _enableButtonList.Length; i++) + { + _enableButtonList[i].isEnabled = isEnable; + } + _isAbleTapDialogObject = isEnable; + if (isEnable) + { + UpdateButtonState(); + UpdateCreateLiquefyButton(); + } + } + + private void LateUpdate() + { + if (!UIManager.GetInstance().IsCurrentScene(UIManager.ViewScene.QuestSelectionPage)) + { + return; + } + for (int i = 0; i < base.transform.childCount; i++) + { + Transform child = base.transform.GetChild(i); + if (child.name != "CardTexture" && child.name != "CardText") + { + AllLabelColorChanger.ChangeAllLabel(child.gameObject, AllLabelColorChanger.COLOR_TABLE_DETAIL); + } + } + } + + public void SetSortOrder(int sortOrder) + { + for (int i = 0; i < _allPanel.Length; i++) + { + _allPanel[i].sortingOrder = sortOrder + i; + } + } +} diff --git a/SVSim.BattleEngine/Engine/CardFilterKeyWordMaster.cs b/SVSim.BattleEngine/Engine/CardFilterKeyWordMaster.cs new file mode 100644 index 0000000..5ac21d9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardFilterKeyWordMaster.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +public class CardFilterKeyWordMaster +{ + private Dictionary> _allData = new Dictionary>(); + + public List CategoryList { get; private set; } + + public CardFilterKeyWordMaster() + { + CategoryList = new List(); + } + + public void Add(string[] line) + { + string item = line[0]; + string text = line[1]; + if (!CategoryList.Contains(text)) + { + CategoryList.Add(text); + _allData[text] = new List(); + } + _allData[text].Add(item); + } + + public List GetCategory(string category) + { + return _allData[category]; + } +} diff --git a/SVSim.BattleEngine/Engine/CardKeyWordCache.cs b/SVSim.BattleEngine/Engine/CardKeyWordCache.cs new file mode 100644 index 0000000..6201e88 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardKeyWordCache.cs @@ -0,0 +1,68 @@ +using System.Collections.Generic; +using System.Text.RegularExpressions; +using Wizard; + +public class CardKeyWordCache +{ + public enum Option + { + None, + OnlyCardNames, + OnlyCardNamesHiranaga + } + + private Dictionary> _cache = new Dictionary>(); + + private Option _option; + + public CardKeyWordCache(Option option = Option.None) + { + _option = option; + } + + public IList Get(CardParameter param, CardKeyWordCommonCache commonCache) + { + if (_cache.TryGetValue(param.CardId, out var value)) + { + return value; + } + IList cloneList = commonCache.GetCloneList(param); + if (_option == Option.OnlyCardNames) + { + foreach (string item in new List(cloneList)) + { + if (Data.Master.BattleKeyWordDic.ContainsKey(item) && commonCache.GetCardListFromKeyWord(item).Count == 0) + { + cloneList.Remove(item); + } + } + } + else if (_option == Option.OnlyCardNamesHiranaga) + { + foreach (string item2 in new List(cloneList)) + { + if (!Data.Master.BattleKeyWordDic.ContainsKey(item2)) + { + continue; + } + if (commonCache.GetCardListFromKeyWord(item2).Count == 0) + { + cloneList.Remove(item2); + continue; + } + cloneList.Remove(item2); + foreach (int item3 in commonCache.GetCardListFromKeyWord(item2)) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(item3); + if (Regex.Replace(cardParameterFromId.CardName, "(\\[[a-zA-Z0-9\\/\\-]*(rub\\<[^\\>]*\\>)*\\])", "") == item2) + { + cloneList.Add(cardParameterFromId.CardHiragana); + break; + } + } + } + } + _cache[param.CardId] = cloneList; + return cloneList; + } +} diff --git a/SVSim.BattleEngine/Engine/CardMake.cs b/SVSim.BattleEngine/Engine/CardMake.cs new file mode 100644 index 0000000..bf708eb --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardMake.cs @@ -0,0 +1,175 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; + +public class CardMake : MonoBehaviour +{ + public const int CAN_CREATE_MAX = 3; + + public const string FORMAT_CARD_CRAFT_PARAM = "{0},{1}"; + + private IDictionary DestructDict; + + private IDictionary _craftDict; + + public Action OnCardSell; + + public Action OnCardSellId; + + public Action OnCardBuy; + + public Action OnClose; + + private Action _onFinishCardDestruct; + + public void StartCardDestruct(int cardId) + { + if (DestructDict == null) + { + DestructDict = new Dictionary(); + } + else + { + DestructDict.Clear(); + } + int possessionCardNum = GameMgr.GetIns().GetDataMgr().GetPossessionCardNum(cardId, isIncludingSpotCard: false); + DestructDict = new Dictionary(); + DestructDict.Add(cardId.ToString(), "1," + possessionCardNum); + DestructCard(); + } + + private void DestructCard() + { + CardDestructTask cardDestructTask = GameMgr.GetIns().GetCardDestructTask(); + cardDestructTask.SetParameter(DestructDict); + StartCoroutine(Toolbox.NetworkManager.Connect(cardDestructTask, OnRequestFinishDestruct, OnError, OnError)); + } + + private void OnRequestFinishDestruct(NetworkTask.ResultCode error) + { + TriggerUpdateUserDeck(); + if (_onFinishCardDestruct != null) + { + _onFinishCardDestruct(); + } + } + + private void TriggerUpdateUserDeck() + { + List list = new List(DestructDict.Keys); + for (int i = 0; i < list.Count; i++) + { + int obj = int.Parse(list[i]); + if (OnCardSellId != null) + { + OnCardSellId(obj); + } + } + if (OnCardSell != null) + { + OnCardSell(); + } + if (OnClose != null) + { + OnClose(); + } + list = null; + } + + public void StartCardCraft(int cardId) + { + if (_craftDict == null) + { + _craftDict = new Dictionary(); + } + else + { + _craftDict.Clear(); + } + int possessionCardNum = GameMgr.GetIns().GetDataMgr().GetPossessionCardNum(cardId, isIncludingSpotCard: false); + _craftDict.Add(cardId.ToString(), $"{1},{possessionCardNum}"); + CraftCard(); + } + + private void CraftCard() + { + CardCreateTask cardCreateTask = GameMgr.GetIns().GetCardCreateTask(); + cardCreateTask.SetParameter(_craftDict); + StartCoroutine(Toolbox.NetworkManager.Connect(cardCreateTask, OnRequestFinishCraft, OnError, OnError)); + } + + private void OnRequestFinishCraft(NetworkTask.ResultCode error) + { + if (OnCardBuy != null) + { + OnCardBuy(); + } + if (OnClose != null) + { + OnClose(); + } + } + + public void StartDestructAll(IDictionary destructDict, Action onFinishCallBack = null) + { + _onFinishCardDestruct = onFinishCallBack; + DestructDict = destructDict; + if (DestructDict.Count > 0) + { + DestructCard(); + } + } + + public void StartDestructAll(IDictionary destructDict, Action callback = null) + { + Dictionary dictionary = new Dictionary(); + foreach (KeyValuePair item in destructDict) + { + string value = CreateRequestParam(item.Key, item.Value); + dictionary.Add(item.Key.ToString(), value); + } + StartDestructAll(dictionary, callback); + } + + public void StartCraftAll(IDictionary craftDict) + { + if (_craftDict == null) + { + _craftDict = new Dictionary(); + } + else + { + _craftDict.Clear(); + } + foreach (KeyValuePair item in craftDict) + { + if (item.Value > 0) + { + string value = CreateRequestParam(item.Key, item.Value); + _craftDict.Add(item.Key.ToString(), value); + } + } + if (_craftDict.Count > 0) + { + CraftCard(); + } + } + + private string CreateRequestParam(int cardId, int num) + { + int possessionCardNum = GameMgr.GetIns().GetDataMgr().GetPossessionCardNum(cardId, isIncludingSpotCard: false); + return $"{num},{possessionCardNum}"; + } + + private void OnError(NetworkTask.ResultCode code) + { + OnClose.Call(); + } + + private void OnError(int code) + { + OnClose.Call(); + } +} diff --git a/SVSim.BattleEngine/Engine/CardPack.cs b/SVSim.BattleEngine/Engine/CardPack.cs new file mode 100644 index 0000000..e3131ae --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardPack.cs @@ -0,0 +1,22 @@ +public class CardPack : HeaderData +{ + public int card_id; + + public int base_card_id; + + public int rarity; + + public string create_time; + + public string update_time; + + public string delete_time; + + public string affected_rows; + + public int SleeveId { get; set; } = 3000011; + + public bool IsSpecialCard { get; set; } + + public bool IsFreePackLeaderSkin { get; set; } +} diff --git a/SVSim.BattleEngine/Engine/CardPackManager.cs b/SVSim.BattleEngine/Engine/CardPackManager.cs new file mode 100644 index 0000000..7874f08 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardPackManager.cs @@ -0,0 +1,1179 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; + +public class CardPackManager : MonoBehaviour +{ + public class GachaMaskDark + { + public int PackId; + + public Rect UvRect; + + public Color Color; + + public GachaMaskDark(string[] columns) + { + int num = 0; + PackId = int.Parse(columns[num]); + num++; + UvRect = new Rect(float.Parse(columns[num]), float.Parse(columns[num + 1]), float.Parse(columns[num + 2]), float.Parse(columns[num + 3])); + num += 4; + Color = new Color(float.Parse(columns[num]), float.Parse(columns[num + 1]), float.Parse(columns[num + 2]), float.Parse(columns[num + 3])); + } + } + + private InputMgr m_InputMgrIns; + + private EffectMgr m_EfcMgrIns; + + private const int DRAW_NUM = 8; + + private const int ANIM_CNT_NONE = 100; + + private const int CARD_TOUCH_POS_DIV_CNT = 10; + + private const float DELAY_FADEOUT_SE = 1.5f; + + private const float WAIT_FADEOUT_FOR_DISPOSE = 1f; + + private const float SCALE_3D_OBJECT = 0.003125f; + + private const string PACK_BOX_NAME = "md_gachabox_{0}"; + + private const string PACK_EFFECT_IDLE_1 = "gch_box_idle_1_{0}"; + + private const string PACK_EFFECT_TAP_1 = "gch_box_tap_1_{0}"; + + private const string PACK_EFFECT_SHINE_1 = "gch_box_shine_1_{0}"; + + private const string PACK_EFFECT_SPECIAL_1 = "gch_box_special_1"; + + private const string PACK_EFFECT_SPECIAL_2 = "gch_box_special_2"; + + private const string CUESHEETNAME_GACHA_SE = "se_gacha"; + + private const string CUENAME_SE_GACHA_APPEAR = "se_sys_gacha_appear_{0}"; + + private const string CUENAME_SE_GACHA_OPEN = "se_sys_gacha_open_{0}"; + + private const int EFFECT_LAYER = 30; + + private const float FOV_ASPECT_BORDER = 1.5f; + + private const int FOV_UNDER_BORDER_SIZE = 70; + + private const int FOV_OVER_BORDER_SIZE = 64; + + private readonly Vector3 POSITION_CARDVIEW_CAMERA = new Vector3(9600f, 92f, -2900f); + + [HideInInspector] + public GameObject CardPackParent; + + private IList m_CardPackList; + + private IList m_CardAnimList; + + private Queue m_openCardQueue = new Queue(); + + private IList m_CardOpenList; + + private IList m_CardPosList; + + private IList m_CardRotList; + + private IList m_RarityList; + + private IList m_CostIconList; + + private IList m_LifeIconList; + + private IList m_AtkIconList; + + private IList m_NameLabelList; + + private int layer_Gacha = 18; + + private int animCnt = 100; + + private int currentCnt; + + private int packOpenCnt = 1; + + private bool _isAutoOpen; + + private bool _isCoutainSpecialCard; + + private Camera GachaCamera; + + private GameObject GachaLight; + + private GameObject GachaBox; + + private Animation GachaBoxAnim; + + private GameObject ClanLabels; + + private IList ClanLabelList = new List(); + + private UITexture DarkSideTex; + + private UITexture BgBlackTex; + + private GameObject PackEffectIdle1; + + private GameObject PackEffectTap1; + + private GameObject PackEffectShine1; + + private GameObject PackEffectSpecial1; + + private GameObject PackEffectSpecial2; + + private GameObject CardBefore; + + private Vector3 GachaObjScale = new Vector3(250f, 250f, 50f); + + private int cardPackSize; + + private int cardPackNum; + + private int lastLoadedCardIndex; + + private Vector3 mousePosPrev = Vector3.zero; + + private const int PAGE_CARD_COUNT = 8; + + private float m_BackupBgmVolume; + + private List PackAssetNameList = new List(); + + private List EffectAssetPathList; + + private GameObject GachaStay1Pool; + + private GameObject GachaStay2Pool; + + private GameObject GachaStay3Pool; + + private GameObject GachaSpecialStay1Pool; + + private GameObject GachaTwinkle1Pool; + + private bool m_IsNextCardCreated = true; + + private bool m_IsHideCardFinish = true; + + private const float DelayOpenCard = 0.05f; + + [SerializeField] + private UIButton SkipBtn; + + [SerializeField] + private UIButton OkBtn; + + [SerializeField] + private UILabel LabelPackNum; + + [SerializeField] + private UILabel LabelPackUnit; + + [SerializeField] + private NguiObjs TouchObj; + + private CardDetailUI _cardDetail; + + private UIManager.ViewScene _nextScene; + + private List _boxEffectList = new List(); + + private bool _isNextCardAnim; + + private bool _isDispose; + + private string _seNameGachaAppear = ""; + + private string _seNameGachaOpen = ""; + + private bool _isSpecialCardPackSet; + + public bool IsSkipped { get; private set; } + + public void Init(bool isAutoOpen, CardDetailUI cardDetail, UIManager.ViewScene nextScene, bool isCoutainSpecialCard, Action callback) + { + _isAutoOpen = isAutoOpen; + _isCoutainSpecialCard = isCoutainSpecialCard; + _cardDetail = cardDetail; + _nextScene = nextScene; + IsSkipped = false; + GameMgr.GetIns().GetPrefabMgr().Load("Gacha/GachaObj"); + m_InputMgrIns = GameMgr.GetIns().GetInputMgr(); + m_EfcMgrIns = GameMgr.GetIns().GetEffectMgr(); + CardPackParent = GameMgr.GetIns().GetGameObjMgr().AddUIManagerChildPrefab(GameMgr.GetIns().GetPrefabMgr().GetObj("Gacha/GachaObj") as GameObject); + CardPackParent.layer = layer_Gacha; + CardPackParent.transform.localScale = new Vector3(0.003125f, 0.003125f, 0.003125f); + GachaObj component = CardPackParent.GetComponent(); + CardPackParent.SetActive(value: false); + GachaCamera = component.GachaCamera; + GachaLight = component.GachaLight; + GachaBox = component.GachaBox; + ClanLabels = component.ClanLabels; + DarkSideTex = component.DarkSideTex; + BgBlackTex = component.BgBlackTex; + ClanLabelList.Clear(); + for (int i = 0; i < ClanLabels.transform.childCount; i++) + { + ClanLabelList.Add(ClanLabels.transform.GetChild(i).GetComponent()); + } + OkBtn.onClick.Clear(); + OkBtn.onClick.Add(new EventDelegate(delegate + { + OnClickNextBtn(); + })); + SkipBtn.onClick.Clear(); + SkipBtn.onClick.Add(new EventDelegate(delegate + { + if (!_cardDetail.GetIsDetailOn()) + { + OnClickSkipBtn(); + } + })); + TouchObj.labels[0].text = Data.SystemText.Get("Common_0146"); + EffectAssetPathList = GameMgr.GetIns().GetEffectMgr().InitCommonEffect("Json/CardPackEffectData", isBattle: false, isField: false, isBattleEffect: false, delegate + { + callback.Call(); + }); + } + + public void StartInstantiateCardPack(PackConfig packConfig) + { + _isDispose = false; + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + m_BackupBgmVolume = soundMgr.GetBgmVolume(); + soundMgr.FadeBgmVolume(0f); + animCnt = 0; + currentCnt = 0; + packOpenCnt = 1; + m_CardPackList = new List(); + m_CardAnimList = new List(); + m_CardOpenList = new List(); + m_CardPosList = new List(); + m_CardRotList = new List(); + m_RarityList = new List(); + m_CostIconList = new List(); + m_LifeIconList = new List(); + m_AtkIconList = new List(); + m_NameLabelList = new List(); + CardBefore = null; + GachaCamera.transform.localPosition = new Vector3(0f, 360f, -840f); + GachaCamera.transform.localRotation = Quaternion.Euler(new Vector3(0f, 0f, 0f)); + GachaCamera.fieldOfView = ((GameMgr.GetIns().ScreenAspect < 1.5f) ? 70 : 64); + GachaBox.SetActive(value: true); + LabelPackNum.gameObject.SetActive(value: false); + OkBtn.gameObject.SetActive(value: true); + OkBtn.isEnabled = false; + SkipBtn.gameObject.SetActive(value: true); + ClanLabels.SetActive(value: false); + DarkSideTex.alpha = 1f; + DarkSideTex.transform.localScale = Vector3.one * 2f; + BgBlackTex.alpha = 0f; + CardPackParent.SetActive(value: true); + lastLoadedCardIndex = 0; + GachaCamera.gameObject.SetActive(value: true); + _isSpecialCardPackSet = packConfig.IsSpecialCardPack; + GameMgr.GetIns().GetSoundMgr().LoadSe("se_gacha", delegate + { + InstantiateCardPack(packConfig.GetGachaIdForEffectResource()); + }); + } + + private IEnumerator loadNextPage(Action onFinish) + { + m_IsNextCardCreated = false; + int b = cardPackSize - lastLoadedCardIndex; + int takeNum = Mathf.Min(8, b); + List targetCardList = Data.PackOpen.data.pack_list.Skip(lastLoadedCardIndex).Take(takeNum).ToList(); + List assetList = Toolbox.ResourcesManager.CardListAssetPathList; + Dictionary> cardObjectDic = new Dictionary>(); + foreach (IGrouping item in from x in targetCardList + group x by x.SleeveId) + { + PackAssetNameList.AddRange(assetList); + assetList.Clear(); + int sleeveId = item.Key; + yield return CreateGachaCardPack(item.Select((CardPack x) => x.card_id).ToList(), sleeveId); + cardObjectDic.Add(sleeveId, UIManager.GetInstance().getSelectCardListObjs()); + } + List SetShaderList = new List(); + List specialEffectList = new List(); + for (int num = 0; num < takeNum; num++) + { + CardPack cardPack = targetCardList[num]; + int card_id = cardPack.card_id; + List list = cardObjectDic[cardPack.SleeveId]; + UIBase_CardManager.CardObjData cardObjData = list[0]; + list.RemoveAt(0); + GameObject gameObject = cardObjData.CardObj.gameObject; + gameObject.SetActive(value: true); + Transform transform = gameObject.transform; + AttachCardDetailButton(gameObject); + if (CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(card_id).CharType == CardBasePrm.CharaType.NORMAL) + { + GameObject gameObject2 = transform.Find("Life(Clone)").gameObject; + gameObject2.transform.localPosition = Global.POSITION_LIFE_ICON; + m_LifeIconList.Add(gameObject2); + GameObject gameObject3 = transform.Find("Atk(Clone)").gameObject; + gameObject3.transform.localPosition = Global.POSITION_ATK_ICON; + m_AtkIconList.Add(gameObject3); + } + else + { + m_LifeIconList.Add(null); + m_AtkIconList.Add(null); + } + GameObject gameObject4 = transform.Find("Cost(Clone)").gameObject; + gameObject4.transform.localPosition = Global.POSITION_COST_ICON; + m_CostIconList.Add(gameObject4); + GameObject gameObject5 = transform.Find("Name(Clone)").gameObject; + gameObject5.SetActive(value: false); + m_NameLabelList.Add(gameObject5); + Transform transform2 = transform.Find("CardBase"); + GameObject gameObject6 = null; + if (transform2 != null) + { + gameObject6 = transform2.Find("CardBase_Specular").gameObject; + gameObject6.layer = layer_Gacha; + gameObject6.SetActive(value: true); + } + if (!Data.Master.PackRarityEffectOverrideDic.TryGetValue(card_id, out var value)) + { + value = CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(card_id).Rarity; + } + m_RarityList.Add(value); + if (value > 1) + { + GameObject gobj = null; + switch (value) + { + case 2: + gobj = GachaStay1Pool; + break; + case 3: + gobj = GachaStay2Pool; + break; + case 4: + gobj = GachaStay3Pool; + break; + } + GameObject gameObject7 = GameMgr.GetIns().GetGameObjMgr().AddUIManagerChildPrefab(gobj); + gameObject7.transform.parent = transform; + gameObject7.name = "cmn_gacha_stay"; + gameObject7.transform.localPosition = Vector3.zero; + gameObject7.transform.localScale = Vector3.one; + gameObject7.layer = 30; + SetShaderList.Add(gameObject7); + } + GameObject gameObject8 = GameMgr.GetIns().GetGameObjMgr().AddUIManagerChildPrefab(GachaTwinkle1Pool); + gameObject8.transform.parent = transform; + gameObject8.name = "cmn_gacha_move"; + gameObject8.transform.localPosition = Vector3.back * 0.2f; + gameObject8.transform.localScale = Vector3.one; + gameObject8.layer = 30; + SetShaderList.Add(gameObject8); + if (cardPack.IsSpecialCard || cardPack.IsFreePackLeaderSkin) + { + gameObject6?.SetActive(value: false); + GameObject gameObject9 = GameMgr.GetIns().GetGameObjMgr().AddUIManagerChildPrefab(GachaSpecialStay1Pool); + gameObject9.transform.parent = transform; + gameObject9.name = "cmn_gacha_special"; + gameObject9.transform.localPosition = Vector3.forward * 0.1f; + gameObject9.transform.localScale = Vector3.one; + gameObject9.layer = 30; + SetShaderList.Add(gameObject9); + specialEffectList.Add(gameObject9); + } + gameObject.GetComponent().SetIdx(lastLoadedCardIndex + num); + transform.parent = CardPackParent.transform; + gameObject.layer = layer_Gacha; + transform.localScale = GachaObjScale; + m_CardPackList.Add(gameObject); + } + lastLoadedCardIndex += takeNum; + List collection = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(SetShaderList, delegate + { + for (int i = 0; i < SetShaderList.Count; i++) + { + SetShaderList[i].SetActive(value: false); + } + specialEffectList.ForEach(delegate(GameObject effect) + { + effect.SetActive(value: true); + }); + m_IsNextCardCreated = true; + onFinish?.Invoke(); + }); + EffectAssetPathList.AddRange(collection); + } + + private IEnumerator CreateGachaCardPack(IList cardPackList, int sleeveId) + { + UIManager.GetInstance().CardLoadGachaPack(base.gameObject, cardPackList, layer_Gacha, is2D: false, sleeveId); + while (UIManager.GetInstance().getSelectCardListObjs() == null) + { + yield return null; + } + while (UIManager.GetInstance().getSelectCardListObjs().Count < cardPackList.Count) + { + yield return null; + } + while (!UIManager.GetInstance().getUIBase_CardManager().getCreateEndFlag() || !UIManager.GetInstance().getUIBase_CardManager().isAssetAllReady) + { + yield return null; + } + } + + private void AttachCardDetailButton(GameObject cardObject) + { + cardObject.GetComponentInChildren().gameObject.AddComponent().onClick.Add(new EventDelegate(delegate + { + OnClickCard(cardObject); + })); + } + + private void InstantiateCardPack(int parent_id) + { + _seNameGachaAppear = $"se_sys_gacha_appear_{parent_id}"; + _seNameGachaOpen = $"se_sys_gacha_open_{parent_id}"; + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_2", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_3", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_4", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_move_1", ResourcesManager.AssetLoadPathType.Effect2D)); + bool isExistFreePackLeaderSkin = false; + foreach (CardPack item in Data.PackOpen.data.pack_list) + { + if (item.IsFreePackLeaderSkin) + { + isExistFreePackLeaderSkin = true; + break; + } + } + if (_isSpecialCardPackSet || isExistFreePackLeaderSkin) + { + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_special_1", ResourcesManager.AssetLoadPathType.Effect2D)); + } + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_idle_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_tap_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_shine_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("gch_box_special_1", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("gch_box_special_2", ResourcesManager.AssetLoadPathType.Effect2D)); + string packBoxName = $"md_gachabox_{parent_id}"; + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath(packBoxName, ResourcesManager.AssetLoadPathType.PackBox)); + StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(PackAssetNameList, delegate + { + GameObject prefab = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(packBoxName, ResourcesManager.AssetLoadPathType.PackBox, isfetch: true)) as GameObject; + GameObject gameObject = NGUITools.AddChild(GachaBox, prefab); + GachaBoxAnim = gameObject.GetComponent(); + GachaBoxAnim[GachaBoxAnim.clip.name].speed = -1f; + GachaBoxAnim.Play(); + GameObject original = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_idle_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GameObject original2 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_tap_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GameObject original3 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_shine_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + PackEffectIdle1 = UnityEngine.Object.Instantiate(original); + PackEffectIdle1.transform.position = Vector3.zero; + PackEffectIdle1.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectIdle1.SetActive(value: false); + PackEffectTap1 = UnityEngine.Object.Instantiate(original2); + PackEffectTap1.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectTap1.transform.position = Vector3.zero; + PackEffectTap1.SetActive(value: false); + PackEffectShine1 = UnityEngine.Object.Instantiate(original3); + PackEffectShine1.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectShine1.transform.position = Vector3.zero; + PackEffectShine1.SetActive(value: false); + _boxEffectList.Add(PackEffectIdle1); + _boxEffectList.Add(PackEffectTap1); + _boxEffectList.Add(PackEffectShine1); + if (_isCoutainSpecialCard) + { + GameObject original4 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("gch_box_special_1", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GameObject original5 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("gch_box_special_2", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + PackEffectSpecial1 = UnityEngine.Object.Instantiate(original4); + PackEffectSpecial1.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectSpecial1.transform.position = Vector3.zero; + PackEffectSpecial1.SetActive(value: false); + PackEffectSpecial2 = UnityEngine.Object.Instantiate(original5); + PackEffectSpecial2.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectSpecial2.transform.position = Vector3.zero; + PackEffectSpecial2.SetActive(value: false); + _boxEffectList.Add(PackEffectSpecial1); + _boxEffectList.Add(PackEffectSpecial2); + } + GachaStay1Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_2", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GachaStay2Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_3", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GachaStay3Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_4", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GachaTwinkle1Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_move_1", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + if (_isSpecialCardPackSet || isExistFreePackLeaderSkin) + { + GachaSpecialStay1Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_special_1", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + } + cardPackSize = Data.PackOpen.data.pack_list.Count; + cardPackNum = (cardPackSize - 1) / 8 + 1; + LabelPackUnit.text = Data.SystemText.Get("Shop_0089", cardPackNum.ToString()); + List collection = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(_boxEffectList, delegate + { + StartCoroutine(loadNextPage(delegate + { + for (int i = 0; i < m_CardPackList.Count; i++) + { + if (m_CardPackList[i] != null) + { + m_CardPackList[i].SetActive(value: false); + } + } + ToolboxGame.UIManager.closeInSceneLoading(); + UIManager.GetInstance().CreatFadeOpen(); + SetLabelPackOpenCount(); + RunGachaAnim(); + })); + }); + EffectAssetPathList.AddRange(collection); + SetDarkSideParameter(parent_id); + })); + } + + private void SetDarkSideParameter(int packId) + { + if (Data.Master.GachaMaskDarkDic.TryGetValue(packId, out var value)) + { + DarkSideTex.color = value.Color; + DarkSideTex.uvRect = value.UvRect; + } + } + + private IEnumerator DisposeCardPackSecen() + { + _isDispose = true; + yield return new WaitForSeconds(1f); + while (_isNextCardAnim) + { + yield return null; + } + animCnt = 100; + StartCoroutine(WaitForCreateCards(delegate + { + for (int i = 0; i < m_CardPackList.Count; i++) + { + UnityEngine.Object.Destroy(m_CardPackList[i]); + } + m_CardPackList.Clear(); + m_EfcMgrIns.DisposeLatestMadeEffects(); + UnityEngine.Object.Destroy(PackEffectIdle1); + UnityEngine.Object.Destroy(PackEffectTap1); + UnityEngine.Object.Destroy(PackEffectShine1); + if (_isCoutainSpecialCard) + { + UnityEngine.Object.Destroy(PackEffectSpecial1); + UnityEngine.Object.Destroy(PackEffectSpecial2); + } + _boxEffectList.Clear(); + UnityEngine.Object.Destroy(CardPackParent); + SkipBtn.gameObject.SetActive(value: false); + OkBtn.gameObject.SetActive(value: false); + LabelPackNum.gameObject.SetActive(value: false); + TouchObj.gameObject.SetActive(value: false); + GameMgr.GetIns().GetSoundMgr().FadeBgmVolume(m_BackupBgmVolume); + RemoveAssets(); + MyPageMenu.SetEnableReloadCard(); + UIManager instance = UIManager.GetInstance(); + UIBase uIBase = instance.GetUIBase(_nextScene); + if (uIBase != null) + { + uIBase.Open(); + } + else + { + instance.ChangeViewScene(_nextScene); + } + })); + } + + private IEnumerator WaitForCreateCards(Action callback, bool isCenterLoading = false) + { + if (isCenterLoading && !m_IsNextCardCreated) + { + UIManager.GetInstance().createInSceneCenterLoading(notBlack: false, notCollider: true); + } + while (true) + { + if (!m_IsNextCardCreated) + { + yield return null; + continue; + } + if (m_IsHideCardFinish) + { + break; + } + yield return null; + } + callback.Call(); + } + + private void OnClickNextBtn() + { + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + if (currentCnt < cardPackSize) + { + packOpenCnt++; + SetLabelPackOpenCount(); + RunGachaAnim(); + soundMgr.PlaySe(Se.TYPE.SYS_BTN_DECIDE); + soundMgr.PlaySe(Se.TYPE.SYS_GACHA_CARD_OUT); + } + else + { + soundMgr.PlaySe(Se.TYPE.SYS_BTN_CANCEL_TRANS); + animCnt = 100; + UIManager.GetInstance().CreatFadeClose(); + StartCoroutine(DisposeCardPackSecen()); + } + } + + private void OnClickSkipBtn() + { + UIManager.GetInstance().createInSceneCenterLoading(); + GameMgr.GetIns().GetSoundMgr().StopSeAll(1.5f); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL_TRANS); + IsSkipped = true; + UIManager.GetInstance().CreatFadeClose(); + StartCoroutine(DisposeCardPackSecen()); + } + + private void RemoveAssets() + { + PackAssetNameList.AddRange(EffectAssetPathList); + PackAssetNameList.AddRange(Toolbox.ResourcesManager.CardListAssetPathList); + Toolbox.ResourcesManager.RemoveAssetGroup(PackAssetNameList); + PackAssetNameList.Clear(); + EffectAssetPathList.Clear(); + Toolbox.ResourcesManager.CardListAssetPathList.Clear(); + GameMgr.GetIns().GetPrefabMgr().UnLoad("Gacha/GachaObj"); + GameMgr.GetIns().GetSoundMgr().UnloadSe("se_gacha"); + } + + private void Update() + { + if (animCnt == 100) + { + return; + } + switch (animCnt) + { + case 2: + if (m_InputMgrIns.IsDown()) + { + RunGachaAnim(); + } + break; + case 6: + if (m_InputMgrIns.IsDown() || m_InputMgrIns.IsPress()) + { + CheckPressCardOpen(); + mousePosPrev = Input.mousePosition; + } + else + { + mousePosPrev = Vector3.zero; + } + break; + case 8: + if (!_cardDetail.GetIsDetailOn() && GameMgr.GetIns().GetInputMgr().isBackKeyEnable) + { + GameMgr.GetIns().GetInputMgr().isBackKeyEnable = false; + } + break; + } + } + + private void OnClickCard(GameObject cardObject) + { + if (animCnt == 8 && !_isDispose && !_cardDetail.GetIsDetailOn()) + { + GameMgr.GetIns().GetInputMgr().isBackKeyEnable = true; + _cardDetail.OnPushCardDetailOn(cardObject); + } + } + + private void RunGachaAnim() + { + animCnt++; + switch (animCnt) + { + default: + _ = 100; + break; + case 1: + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(_seNameGachaAppear, "se_gacha", 0f, 0L); + GachaLight.transform.localRotation = Quaternion.Euler(Vector3.up * 45f); + iTween.RotateBy(GachaLight, iTween.Hash("z", -1f, "time", 2f, "looptype", iTween.LoopType.loop, "easetype", iTween.EaseType.linear)); + PackEffectIdle1.SetActive(value: true); + if (_isCoutainSpecialCard) + { + PackEffectSpecial1.SetActive(value: true); + } + iTween.MoveTo(GachaCamera.gameObject, iTween.Hash("position", new Vector3(0f, -1200f, -2000f), "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.RotateTo(GachaCamera.gameObject, iTween.Hash("rotation", Vector3.left * 30f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.ScaleTo(DarkSideTex.gameObject, iTween.Hash("scale", Vector3.one, "time", 2f, "easetype", iTween.EaseType.easeInOutExpo)); + Invoke("RunGachaAnim", 2f); + break; + case 2: + TouchObj.gameObject.SetActive(value: true); + DarkSideTex.transform.localScale = Vector3.one; + iTween.ScaleTo(DarkSideTex.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 1f, "looptype", iTween.LoopType.pingPong, "easetype", iTween.EaseType.easeInOutQuad)); + break; + case 3: + PackEffectIdle1.SetActive(value: false); + PackEffectTap1.SetActive(value: true); + if (_isCoutainSpecialCard) + { + PackEffectSpecial1.SetActive(value: false); + PackEffectSpecial2.SetActive(value: true); + } + iTween.Stop(DarkSideTex.gameObject); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(_seNameGachaOpen, "se_gacha", 0f, 0L); + TouchObj.gameObject.SetActive(value: false); + Invoke("RunGachaAnim", 1f); + break; + case 4: + GachaBoxAnim[GachaBoxAnim.clip.name].speed = 1f; + GachaBoxAnim.Play(); + PackEffectShine1.SetActive(value: true); + iTween.ScaleTo(DarkSideTex.gameObject, iTween.Hash("scale", Vector3.one * 1.5f, "time", 1f, "delay", 2.5f, "easetype", iTween.EaseType.easeInOutExpo)); + Invoke("RunGachaAnim", 3.5f); + break; + case 5: + { + for (int num2 = 0; num2 < m_CardPackList.Count; num2++) + { + if (!(m_CardPackList[num2] == null)) + { + m_CardPackList[num2].transform.localPosition = Vector3.back * 200f; + m_CardPackList[num2].transform.localRotation = Quaternion.Euler(Vector3.up * 180f); + m_CardPackList[num2].SetActive(value: true); + } + } + if (m_CardPackList.Count <= 8) + { + iTween.MoveTo(GachaCamera.gameObject, iTween.Hash("position", POSITION_CARDVIEW_CAMERA, "time", 2.5f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.RotateTo(GachaCamera.gameObject, iTween.Hash("rotation", Vector3.zero, "time", 2.5f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + TweenAlpha.Begin(DarkSideTex.gameObject, 2.5f, 0f); + TweenAlpha.Begin(BgBlackTex.gameObject, 2.5f, 0.8f); + iTween.RotateTo(GachaLight, iTween.Hash("x", -45f, "y", 0f, "time", 2.5f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + } + SetCardAnimList(); + if (_isAutoOpen) + { + SetCardPosResult(); + for (int num3 = 0; num3 < m_CardAnimList.Count; num3++) + { + StartCoroutine(AlignCardFirst(num3)); + } + animCnt = 7; + Invoke("OpenCardAuto", 1.5f); + } + else + { + SetCardPosFirst(); + for (int num4 = 0; num4 < m_CardAnimList.Count; num4++) + { + StartCoroutine(AlignCardFirst(num4)); + } + } + float time = 0.1f; + float time2 = 1.6f; + if (m_CardPackList.Count <= 8) + { + time = 1.1f; + time2 = 2.6f; + } + else if (_isAutoOpen) + { + for (int num5 = 0; num5 < m_CardAnimList.Count; num5++) + { + int idx2 = m_CardAnimList[num5].GetComponent().m_Idx; + if (m_NameLabelList[idx2] != null) + { + m_NameLabelList[idx2].SetActive(value: true); + } + } + } + Invoke("drawSound", time); + Invoke("RunGachaAnim", time2); + m_openCardQueue.Clear(); + break; + } + case 6: + mousePosPrev = Vector3.zero; + _isNextCardAnim = false; + LabelPackNum.gameObject.SetActive(value: true); + m_CardOpenList.Clear(); + m_EfcMgrIns.Start(EffectMgr.EffectType.CMN_GACHA_CURSOR_1, new Vector3(30f, 0f, -1.5f)); + StartCoroutine("OpenCardList_Coroutine"); + break; + case 7: + SetCardPosResult(); + AlignCard(0.5f, 0.5f); + Invoke("RunGachaAnim", 1.1f); + break; + case 8: + _isNextCardAnim = false; + SetClanLabels(flg: true); + if (currentCnt < cardPackSize) + { + StartCoroutine(loadNextPage(null)); + } + if (_isAutoOpen) + { + for (int num = 0; num < m_CardAnimList.Count; num++) + { + int idx = m_CardAnimList[num].GetComponent().m_Idx; + if (m_LifeIconList[idx] != null) + { + m_LifeIconList[idx].SetActive(value: true); + } + if (m_AtkIconList[idx] != null) + { + m_AtkIconList[idx].SetActive(value: true); + } + if (m_CostIconList[idx] != null) + { + m_CostIconList[idx].SetActive(value: true); + } + if (m_NameLabelList[idx] != null) + { + m_NameLabelList[idx].SetActive(value: true); + } + } + LabelPackNum.gameObject.SetActive(value: true); + } + OkBtn.isEnabled = true; + break; + case 9: + _isNextCardAnim = true; + SetClanLabels(flg: false); + OkBtn.isEnabled = false; + HideCard(); + RunGachaAnim(); + break; + case 10: + StartCoroutine(WaitForCreateCards(delegate + { + animCnt = 4; + RunGachaAnim(); + UIManager.GetInstance().closeInSceneCenterLoading(); + }, isCenterLoading: true)); + break; + } + } + + private void SetCardAnimList() + { + foreach (GameObject cardAnim in m_CardAnimList) + { + UnityEngine.Object.Destroy(cardAnim); + } + m_CardAnimList.Clear(); + for (int i = 0; i < currentCnt; i++) + { + m_CardPackList[i] = null; + } + for (int j = 0; j < m_CardPackList.Count; j++) + { + if (m_CardAnimList.Count >= 8) + { + break; + } + if (currentCnt >= m_CardPackList.Count) + { + break; + } + m_CardAnimList.Add(m_CardPackList[currentCnt]); + currentCnt++; + } + } + + private void CheckPressCardOpen() + { + Vector3 mousePosition = Input.mousePosition; + if (mousePosPrev != Vector3.zero) + { + Vector3 vector = (mousePosition - mousePosPrev) / 10f; + for (int i = 1; i <= 10; i++) + { + RaycastHit[] array = Physics.RaycastAll(GachaCamera.ScreenPointToRay(vector * i + mousePosPrev)); + for (int j = 0; j < array.Length; j++) + { + SetOpenCardQueue(array[j].collider.transform.parent.gameObject); + } + } + } + else + { + RaycastHit[] array = Physics.RaycastAll(GachaCamera.ScreenPointToRay(mousePosition)); + for (int k = 0; k < array.Length; k++) + { + SetOpenCardQueue(array[k].collider.transform.parent.gameObject); + } + } + } + + private void SetOpenCardQueue(GameObject obj) + { + if (obj.CompareTag("Card") && !m_openCardQueue.Contains(obj) && !IsOpenedCard(obj)) + { + m_openCardQueue.Enqueue(obj); + } + } + + private IEnumerator OpenCardList_Coroutine() + { + while (animCnt == 6) + { + if (m_openCardQueue.Count > 0) + { + OpenCard(m_openCardQueue.Dequeue()); + yield return new WaitForSeconds(0.05f); + } + else + { + yield return null; + } + } + } + + private void AppearCardComplete(int cnt) + { + m_CardPackList[cnt].SetActive(value: false); + } + + private bool IsOpenedCard(GameObject obj) + { + for (int i = 0; i < m_CardOpenList.Count; i++) + { + if (m_CardOpenList[i] == obj.GetComponent().m_Idx) + { + return true; + } + } + return false; + } + + private void OpenCard(GameObject obj) + { + if (!IsOpenedCard(obj)) + { + m_EfcMgrIns.Stop(EffectMgr.EffectType.CMN_GACHA_CURSOR_1); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_COMMON); + float num = 0f; + int idx = obj.GetComponent().m_Idx; + switch (m_RarityList[idx]) + { + case 1: + num = 0.3f; + iTween.MoveTo(obj, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.95f + 30f, "y", obj.transform.position.y * 0.95f, "z", obj.transform.position.z - 0.5f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + break; + case 2: + { + GameMgr.GetIns().GetSoundMgr().StopSe(Se.TYPE.SYS_GACHA_COMMON); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_RARE); + num = 0.3f; + GameObject gameObjIns = m_EfcMgrIns.Start(EffectMgr.EffectType.CMN_GACHA_OPEN_2, obj.transform.position).GetGameObjIns(); + iTween.MoveTo(obj, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.9f + 30f, "y", obj.transform.position.y * 0.9f, "z", obj.transform.position.z - 1f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(gameObjIns, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.9f + 30f, "y", obj.transform.position.y * 0.9f, "z", obj.transform.position.z - 1f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + break; + } + case 3: + { + GameMgr.GetIns().GetSoundMgr().StopSe(Se.TYPE.SYS_GACHA_COMMON); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_EPIC); + num = 0.5f; + GameObject gameObjIns = m_EfcMgrIns.Start(EffectMgr.EffectType.CMN_GACHA_OPEN_3, obj.transform.position).GetGameObjIns(); + iTween.MoveTo(obj, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.5f + 30f, "y", obj.transform.position.y * 0.5f, "z", obj.transform.position.z - 4f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(gameObjIns, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.5f + 30f, "y", obj.transform.position.y * 0.5f, "z", obj.transform.position.z - 4f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.ShakePosition(GachaCamera.gameObject, iTween.Hash("amount", Vector3.one * 0.1f, "time", num, "oncomplete", "InitCameraPos", "oncompletetarget", base.gameObject)); + break; + } + case 4: + { + GameMgr.GetIns().GetSoundMgr().StopSe(Se.TYPE.SYS_GACHA_COMMON); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_LEGEND); + num = 0.7f; + GameObject gameObjIns = m_EfcMgrIns.Start(EffectMgr.EffectType.CMN_GACHA_OPEN_4, obj.transform.position).GetGameObjIns(); + iTween.MoveTo(obj, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.25f + 30f, "y", obj.transform.position.y * 0.25f, "z", obj.transform.position.z - 6f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(gameObjIns, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.25f + 30f, "y", obj.transform.position.y * 0.25f, "z", obj.transform.position.z - 6f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.ShakePosition(GachaCamera.gameObject, iTween.Hash("amount", Vector3.one * 0.2f, "time", num, "oncomplete", "InitCameraPos", "oncompletetarget", base.gameObject)); + break; + } + } + iTween.MoveTo(obj, iTween.Hash("position", obj.transform.position, "time", num, "delay", num, "easetype", iTween.EaseType.easeInExpo)); + float num2 = ((CardBefore != null) ? ((!(obj.transform.localPosition.x > CardBefore.transform.localPosition.x)) ? 180f : (-180f)) : ((!(obj.transform.localPosition.x - 9600f < 0f)) ? 180f : (-180f))); + iTween.RotateAdd(obj, iTween.Hash("y", num2, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + CardBefore = obj; + m_CardOpenList.Add(idx); + if (m_CardOpenList.Count >= m_CardAnimList.Count) + { + Invoke("RunGachaAnim", 2f); + } + OpenCardSetting(obj); + } + } + + private void InitCameraPos() + { + GachaCamera.transform.localPosition = POSITION_CARDVIEW_CAMERA; + } + + private void OpenCardSetting(GameObject obj) + { + int idx = obj.GetComponent().m_Idx; + if (m_RarityList[idx] > 1) + { + obj.transform.Find("cmn_gacha_stay").gameObject.SetActive(value: true); + } + if (_isSpecialCardPackSet) + { + obj.transform.Find("cmn_gacha_special")?.gameObject.SetActive(value: false); + } + m_CostIconList[idx].SetActive(value: true); + if (m_LifeIconList[idx] != null) + { + m_LifeIconList[idx].SetActive(value: true); + } + if (m_AtkIconList[idx] != null) + { + m_AtkIconList[idx].SetActive(value: true); + } + if (m_NameLabelList[idx] != null) + { + m_NameLabelList[idx].SetActive(value: true); + } + } + + private void OpenCardAuto() + { + if (!_isDispose) + { + for (int i = 0; i < m_CardAnimList.Count; i++) + { + OpenCardSetting(m_CardAnimList[i]); + } + } + } + + private IEnumerator AlignCardFirst(int idx) + { + iTween.Stop(m_CardAnimList[idx]); + yield return new WaitForSeconds((float)idx / ((float)m_CardAnimList.Count - 1f) * 0.5f); + if (_isDispose) + { + yield break; + } + if (m_CardPackList.Count <= 8) + { + iTween.MoveTo(m_CardAnimList[idx], iTween.Hash("z", -1000f, "time", 1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + yield return new WaitForSeconds(1f); + if (_isDispose) + { + yield break; + } + } + else + { + m_CardAnimList[idx].transform.localPosition += Vector3.back * 1000f; + } + m_CardAnimList[idx].transform.Find("cmn_gacha_move").gameObject.SetActive(value: true); + iTween.MoveTo(m_CardAnimList[idx], iTween.Hash("position", m_CardPosList[idx], "time", 1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.RotateTo(m_CardAnimList[idx], iTween.Hash("rotation", m_CardRotList[idx], "time", 1f, "easetype", iTween.EaseType.easeOutExpo)); + } + + private void drawSound() + { + if (currentCnt != 8) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_CARD_IN); + } + } + + private void AlignCard(float time, float delay) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_MOVE); + for (int i = 0; i < m_CardAnimList.Count; i++) + { + iTween.MoveTo(m_CardAnimList[i], iTween.Hash("position", m_CardPosList[i], "time", time, "delay", (float)i / ((float)m_CardAnimList.Count - 1f) * delay, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.RotateTo(m_CardAnimList[i], iTween.Hash("rotation", m_CardRotList[i], "time", time, "delay", (float)i / ((float)m_CardAnimList.Count - 1f) * delay, "easetype", iTween.EaseType.easeOutExpo)); + } + } + + private void HideCard() + { + m_IsHideCardFinish = false; + for (int i = 0; i < m_CardAnimList.Count; i++) + { + iTween.MoveTo(m_CardAnimList[i], iTween.Hash("x", 14400f, "time", 0.3f, "delay", (float)i / ((float)m_CardAnimList.Count - 1f) * 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + } + Invoke("HideCardFinish", 0.6f); + } + + private void HideCardFinish() + { + m_IsHideCardFinish = true; + } + + private void SetCardPosFirst() + { + m_CardPosList.Clear(); + m_CardRotList.Clear(); + for (int i = 0; i < m_CardAnimList.Count; i++) + { + float num = (float)i / ((float)m_CardAnimList.Count - 1f); + float num2 = ((!(num < 0.5f)) ? (MotionUtils.GetEase(num * 2f - 1f, MotionUtils.EaseType.easeInQuad) * 0.5f + 0.5f) : (MotionUtils.GetEase(num * 2f, MotionUtils.EaseType.easeOutQuad) * 0.5f)); + Vector3 item = new Vector3(num * 4000f - 2000f + 9600f, Mathf.Abs(num2 - 0.5f) * -500f + 250f, (float)i * -10f - 100f); + Vector3 item2 = new Vector3(0f, -185f, num * 10f - 5f); + m_CardPosList.Add(item); + m_CardRotList.Add(item2); + } + } + + private void SetCardPosResult() + { + float num = 5000f; + float num2 = 2800f; + m_CardPosList.Clear(); + m_CardRotList.Clear(); + int num3 = ((m_CardAnimList.Count <= 5) ? m_CardAnimList.Count : ((int)Mathf.Ceil((float)m_CardAnimList.Count / 2f))); + int num4 = (int)Mathf.Ceil((float)m_CardAnimList.Count / (float)num3); + for (int i = 0; i < m_CardAnimList.Count; i++) + { + int num5 = ((i >= m_CardAnimList.Count - m_CardAnimList.Count % num3) ? (m_CardAnimList.Count % num3) : num3); + float num6 = num / (float)num5; + float num7 = num2 / (float)num4; + float x = (float)(i % num3) * num6 + num6 / 2f - num / 2f + 9600f; + float y = Mathf.Floor((float)i / (float)num3) * (0f - num7) - num7 / 2f + num2 / 2f + 220f; + m_CardPosList.Add(new Vector3(x, y, -100f)); + m_CardRotList.Add(Vector3.zero); + } + } + + private void SetLabelPackOpenCount() + { + LabelPackNum.text = packOpenCnt + "/" + cardPackNum; + } + + private void SetClanLabels(bool flg) + { + } +} diff --git a/SVSim.BattleEngine/Engine/CardPanelMaintenancePlate.cs b/SVSim.BattleEngine/Engine/CardPanelMaintenancePlate.cs new file mode 100644 index 0000000..52d7152 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardPanelMaintenancePlate.cs @@ -0,0 +1,21 @@ +using UnityEngine; + +public class CardPanelMaintenancePlate : MonoBehaviour +{ + [SerializeField] + private UISprite _sprite; + + [SerializeField] + private UILabel _label; + + public void SetDepth(int depth) + { + _sprite.depth = depth; + _label.depth = depth + 1; + } + + public void SetText(string text) + { + _label.text = text; + } +} diff --git a/SVSim.BattleEngine/Engine/CardSelectListUI_Positioning.cs b/SVSim.BattleEngine/Engine/CardSelectListUI_Positioning.cs new file mode 100644 index 0000000..6b12e54 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardSelectListUI_Positioning.cs @@ -0,0 +1,210 @@ +using System.Collections.Generic; +using UnityEngine; + +public class CardSelectListUI_Positioning : MonoBehaviour +{ + [SerializeField] + private List m_objList = new List(); + + [SerializeField] + private Vector3 m_offset = Vector3.zero; + + [SerializeField] + private Vector3 m_lineDirection = Vector3.down; + + [SerializeField] + private float m_lineWidth = 170f; + + [SerializeField] + private Vector3 m_breakDirection = Vector3.right; + + [SerializeField] + private float m_breakHeight = 130f; + + [SerializeField] + private float m_breakNum = 2f; + + [SerializeField] + private float m_speed = 0.2f; + + private float m_prog; + + public Vector3 Offset + { + get + { + return m_offset; + } + set + { + m_offset = value; + StartAnim(); + } + } + + public Vector3 LineDirection + { + get + { + return m_lineDirection; + } + set + { + m_lineDirection = value; + StartAnim(); + } + } + + public float LineWidth + { + get + { + return m_lineWidth; + } + set + { + m_lineWidth = value; + StartAnim(); + } + } + + public Vector3 BreakDirection + { + get + { + return m_breakDirection; + } + set + { + m_breakDirection = value; + StartAnim(); + } + } + + public float BreakWidth + { + get + { + return m_breakHeight; + } + set + { + m_breakHeight = value; + StartAnim(); + } + } + + public int BreakNum + { + get + { + return (int)m_breakNum; + } + set + { + m_breakNum = value; + StartAnim(); + } + } + + public float Speed + { + get + { + return m_speed; + } + set + { + m_speed = value; + StartAnim(); + } + } + + public bool IsMoving => m_prog < 0.95f; + + public void Clear() + { + m_objList.Clear(); + } + + public void Add(GameObject[] addList) + { + int num = m_objList.Count; + if (num == 0) + { + m_objList.AddRange(addList); + } + else + { + int num2 = addList.Length; + int i = 0; + int num3 = 0; + while (num3 < num && i < num2) + { + int num4 = 0; + while (i < num2 && m_objList[num3] != addList[i]) + { + m_objList.Insert(num3, addList[i]); + } + i++; + num3 += num4; + num += num4; + num3++; + } + for (; i < num2; i++) + { + m_objList.Add(addList[i]); + } + } + StartAnim(); + } + + public void Change(GameObject[] addList) + { + m_objList.Clear(); + m_objList.AddRange(addList); + StartAnim(); + } + + public void Immediate() + { + float speed = m_speed; + m_speed = 1f; + Update_Anim(); + m_speed = speed; + } + + public Vector3 GetPositionAtIndex(int idx) + { + int num = idx % (int)m_breakNum; + int num2 = idx / (int)m_breakNum; + float num3 = m_lineWidth * (float)num; + float num4 = m_breakHeight * (float)num2; + return m_offset + m_lineDirection * num3 + m_breakDirection * num4; + } + + private void LateUpdate() + { + Update_Anim(); + } + + private void Update_Anim() + { + m_prog += (1f - m_prog) * m_speed; + int count = m_objList.Count; + for (int i = 0; i < count; i++) + { + if (!(m_objList[i] == null)) + { + Vector3 localPosition = m_objList[i].transform.localPosition; + Vector3 vector = (GetPositionAtIndex(i) - localPosition) * m_speed; + m_objList[i].transform.localPosition = localPosition + vector; + } + } + } + + private void StartAnim() + { + m_prog = 0f; + } +} diff --git a/SVSim.BattleEngine/Engine/CardShaderDefine.cs b/SVSim.BattleEngine/Engine/CardShaderDefine.cs new file mode 100644 index 0000000..c30e2c6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardShaderDefine.cs @@ -0,0 +1,39 @@ +using UnityEngine; +using Wizard; + +public static class CardShaderDefine +{ + public const string CARD_SHADER_DEFAULT = "Wizard/Card/Basic_Front0_Back0_Normal"; + + public const string CARD_SHADER_FOIL = "Wizard/VariantCardShader"; + + public static void ReplaceShader(Material mat) + { + if (!(mat == null)) + { + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SHOW_FOIL_CARD_ANIMATION)) + { + mat.shader = Shader.Find(mat.shader.name); + } + else + { + mat.shader = Shader.Find("Wizard/Card/Basic_Front0_Back0_Normal"); + } + } + } + + public static void ReplaceBaseShader(Material mat, bool isFoil) + { + if (!(mat == null)) + { + if (isFoil && mat.shader.name != "Wizard/VariantCardShader") + { + mat.shader = Shader.Find("Wizard/VariantCardShader"); + } + else + { + mat.shader = Shader.Find(mat.shader.name); + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/CardTemplate.cs b/SVSim.BattleEngine/Engine/CardTemplate.cs new file mode 100644 index 0000000..c431be2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardTemplate.cs @@ -0,0 +1,319 @@ +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.Resource; + +public class CardTemplate : MonoBehaviour +{ + public GameObject CardWrapObjTemp; + + public Transform CardNormalTemp; + + public LODGroup CardNormalLodGroup; + + public MeshRenderer FieldNormalMeshTemp; + + public MeshRenderer FieldEvolMeshTemp; + + public MeshRenderer NormalCardBaseMeshTemp; + + public MeshRenderer EvolCardBaseMeshTemp; + + public UISprite SkillIconTemp; + + public UILabel SkillIconLabelTemp; + + public UILabel LifeLabelTemp; + + public UILabel AtkLabelTemp; + + public UILabel NormalCostLabelTemp; + + public UILabel NormalZeroCostLabelTemp; + + public UILabel NormalSignLabelTemp; + + public UILabel NormalSignedCostLabelTemp; + + public UILabel NormalLifeLabelTemp; + + public UILabel NormalAtkLabelTemp; + + public UILabel NormalNameLabelTemp; + + public UILabel NormalChoiceBraveNameLabelTemp; + + public GameObject FrameEffectNormal; + + public GameObject FrameEffectEvolve; + + public GameObject FrameEffectHandCard; + + public ParticleSystemRenderer[] FrameEffectHandRenderer; + + public GameObject _spellBoostFrameEffect; + + public BoxCollider Collider; + + public BoxCollider NotCancelCollider; + + private bool isPlayer = true; + + private bool _isChoiceBrave; + + public void DynamicSetupMaterials(BattleCardBase card, IBattleResourceMgr resourceMgr) + { + isPlayer = card.IsPlayer; + if (card.IsUnit) + { + DynamicSetupNormalObjMaterials(card.BaseParameter, resourceMgr); + } + else if (card.IsSpell) + { + DynamicSetupSpellObjMaterials(card.BaseParameter, resourceMgr); + } + else if (card.IsField) + { + DynamicSetupFieldObjMaterials(card.BaseParameter, resourceMgr); + } + } + + public void DynamicSetupNormalObjMaterials(CardParameter cardParameter, IBattleResourceMgr resourceMgr) + { + Material CTexNormal = null; + try + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardParameter.NormalCardId); + string materialPath = Toolbox.ResourcesManager.GetAssetTypePath(cardParameterFromId.ResourceCardId.ToString(), ResourcesManager.AssetLoadPathType.UnitCardMaterial); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(materialPath, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(materialPath); + if (!(CardWrapObjTemp == null)) + { + CTexNormal = Toolbox.ResourcesManager.FindCardMaterial(cardParameter.ResourceCardId, ResourcesManager.AssetLoadPathType.UnitCardMaterial); + CardShaderDefine.ReplaceShader(CTexNormal); + UnitCardCreator.SetupUnitCardMaterialToCardMesh(CardWrapObjTemp.transform, cardParameter, CTexNormal); + } + }); + NormalCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + EvolCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + AtkLabelTemp.text = cardParameter.Atk.ToString(); + NormalAtkLabelTemp.text = cardParameter.Atk.ToString(); + LifeLabelTemp.text = cardParameter.Life.ToString(); + NormalLifeLabelTemp.text = cardParameter.Life.ToString(); + NormalCostLabelTemp.text = cardParameter.Cost.ToString(); + NormalNameLabelTemp.text = cardParameter.CardName; + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(NormalCostLabelTemp, cardParameter.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(NormalNameLabelTemp, cardParameter.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(NormalAtkLabelTemp, cardParameter.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(NormalLifeLabelTemp, cardParameter.IsFoil); + Global.SetRepositionNameLabel(NormalNameLabelTemp, cardParameter.CardName, is2D: false); + } + catch + { + CTexNormal = null; + } + } + + public void DynamicSetupSpellObjMaterials(CardParameter cardParameter, IBattleResourceMgr resourceMgr) + { + CardMaster cardMaster = CardMaster.GetInstanceForBattle(); + Material[] MaterialArrayNormal = new Material[3]; + Material CTexNormal = null; + try + { + string materialPath = Toolbox.ResourcesManager.GetAssetTypePath(cardMaster.GetCardParameterFromId(cardParameter.NormalCardId).ResourceCardId.ToString(), ResourcesManager.AssetLoadPathType.SpellCardMaterial); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(materialPath, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(materialPath); + if (!(CardWrapObjTemp == null)) + { + bool flag2 = CardMaster.IsChoiceBraveCardCheck(cardParameter.BaseCardId); + CTexNormal = Toolbox.ResourcesManager.FindCardMaterial(cardParameter.ResourceCardId, ResourcesManager.AssetLoadPathType.SpellCardMaterial, isEvol: false, CardMaster.IsMutationCardCheck(cardParameter.BaseCardId), cardMaster.GetCardParameterFromId((cardParameter.ResourceCardId / 1000000000 == 1) ? (cardParameter.ResourceCardId / 10) : cardParameter.ResourceCardId).CharType, flag2); + CardShaderDefine.ReplaceShader(CTexNormal); + UIManager.GetInstance().SetLayerRecursive(CardNormalTemp, 10); + if (flag2) + { + BattleManagerBase.GetIns().BattleResourceMgr.LoadChoiceBraveCardMesh(); + MeshFilter[] componentsInChildren = CardNormalTemp.GetComponentsInChildren(); + componentsInChildren[0].sharedMesh = resourceMgr.GetChoiceBraveCardMesh(isLow: false); + componentsInChildren[1].sharedMesh = resourceMgr.GetChoiceBraveCardMesh(isLow: true); + } + Material rerityMaterial = resourceMgr.GetRerityMaterial(isHand: true, isSpell: true, cardParameter.Rarity, flag2); + if (rerityMaterial != null) + { + rerityMaterial.shader = Shader.Find(rerityMaterial.shader.name); + } + MaterialArrayNormal[0] = rerityMaterial; + MaterialArrayNormal[1] = CTexNormal; + MaterialArrayNormal[2] = CardCreatorBase.GetSharedClassIconMaterial(cardParameter.Clan); + LOD[] lODs = CardNormalLodGroup.GetLODs(); + for (int i = 0; i < lODs.Length; i++) + { + lODs[i].renderers[0].sharedMaterials = MaterialArrayNormal; + } + } + }); + NormalCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + if (CardMaster.IsChoiceBraveCardCheck(cardParameter.NormalCardId)) + { + SetEffectColor(Global.CARD_HBP_LABEL_COST_COLOR); + } + bool flag = cardParameter.NormalCardId / 1000000 == 930; + if (cardParameter.IsVariableCost) + { + NormalSignLabelTemp.text = "-"; + NormalSignedCostLabelTemp.text = "X"; + ShowSignedCostLabel(); + NormalChoiceBraveNameLabelTemp.text = cardParameter.CardName; + ShowChoiceBraveNameLabel(); + } + else if (flag) + { + if (cardParameter.Cost != 0) + { + NormalSignLabelTemp.text = ((cardParameter.Cost > 0) ? "-" : "+"); + NormalSignedCostLabelTemp.text = Mathf.Abs(cardParameter.Cost).ToString(); + ShowSignedCostLabel(); + } + else + { + NormalZeroCostLabelTemp.text = "0"; + ShowZeroCostLabel(); + } + NormalChoiceBraveNameLabelTemp.text = cardParameter.CardName; + ShowChoiceBraveNameLabel(); + } + else + { + NormalCostLabelTemp.text = cardParameter.Cost.ToString(); + NormalNameLabelTemp.text = cardParameter.CardName; + } + SetNumberLabelStyle(cardParameter.IsFoil); + SetNameLabelStyle(cardParameter.IsFoil, flag); + SetRepositionNameLabel(cardParameter.CardName, flag); + } + catch + { + CTexNormal = null; + } + } + + public void DynamicSetupFieldObjMaterials(CardParameter cardParameter, IBattleResourceMgr resourceMgr) + { + CardMaster cardMaster = CardMaster.GetInstanceForBattle(); + Material CTexNormal = null; + try + { + string materialPath = Toolbox.ResourcesManager.GetAssetTypePath(CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardParameter.NormalCardId).ResourceCardId.ToString(), ResourcesManager.AssetLoadPathType.SpellCardMaterial); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(materialPath, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(materialPath); + if (!(CardWrapObjTemp == null)) + { + CTexNormal = Toolbox.ResourcesManager.FindCardMaterial(cardParameter.ResourceCardId, ResourcesManager.AssetLoadPathType.SpellCardMaterial, isEvol: false, CardMaster.IsMutationCardCheck(cardParameter.BaseCardId), cardMaster.GetCardParameterFromId(cardParameter.ResourceCardId).CharType); + CardShaderDefine.ReplaceShader(CTexNormal); + FieldCardCreator.SetupFieldCardMaterialToCardMesh(CardWrapObjTemp.transform, cardParameter, CTexNormal); + } + }); + NormalCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + NormalCostLabelTemp.text = cardParameter.Cost.ToString(); + NormalNameLabelTemp.text = cardParameter.CardName; + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(NormalCostLabelTemp, cardParameter.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(NormalNameLabelTemp, cardParameter.IsFoil); + Global.SetRepositionNameLabel(NormalNameLabelTemp, cardParameter.CardName, is2D: false); + } + catch + { + CTexNormal = null; + } + } + + public void ShowNameLabel() + { + if (_isChoiceBrave) + { + NormalChoiceBraveNameLabelTemp.alpha = 1f; + } + else + { + NormalNameLabelTemp.alpha = 1f; + } + } + + public void HideNameLabel() + { + if (_isChoiceBrave) + { + NormalChoiceBraveNameLabelTemp.alpha = 0f; + } + else + { + NormalNameLabelTemp.alpha = 0f; + } + } + + public void SetEffectStyle(UILabel.Effect effectStyle) + { + NormalCostLabelTemp.effectStyle = effectStyle; + NormalZeroCostLabelTemp.effectStyle = effectStyle; + NormalSignLabelTemp.effectStyle = effectStyle; + NormalSignedCostLabelTemp.effectStyle = effectStyle; + } + + public void SetEffectColor(Color color) + { + NormalCostLabelTemp.effectColor = color; + NormalZeroCostLabelTemp.effectColor = color; + NormalSignLabelTemp.effectColor = color; + NormalSignedCostLabelTemp.effectColor = color; + } + + public void ShowZeroCostLabel() + { + NormalZeroCostLabelTemp.gameObject.SetActive(value: true); + NormalCostLabelTemp.gameObject.SetActive(value: false); + NormalSignLabelTemp.gameObject.SetActive(value: false); + NormalSignedCostLabelTemp.gameObject.SetActive(value: false); + } + + public void ShowSignedCostLabel() + { + NormalSignLabelTemp.gameObject.SetActive(value: true); + NormalSignedCostLabelTemp.gameObject.SetActive(value: true); + NormalCostLabelTemp.gameObject.SetActive(value: false); + NormalZeroCostLabelTemp.gameObject.SetActive(value: false); + } + + public void SetNumberLabelStyle(bool isFoil) + { + UIBase_CardManager uIBase_CardManager = UIManager.GetInstance().getUIBase_CardManager(); + uIBase_CardManager.SetNumberLabelStyle(NormalCostLabelTemp, isFoil); + uIBase_CardManager.SetNumberLabelStyle(NormalZeroCostLabelTemp, isFoil); + uIBase_CardManager.SetNumberLabelStyle(NormalSignLabelTemp, isFoil); + uIBase_CardManager.SetNumberLabelStyle(NormalSignedCostLabelTemp, isFoil); + } + + public void ShowChoiceBraveNameLabel() + { + NormalNameLabelTemp.gameObject.SetActive(value: false); + NormalChoiceBraveNameLabelTemp.gameObject.SetActive(value: true); + _isChoiceBrave = true; + } + + public void SetNameLabelStyle(bool isFoil, bool isChoiceBrave) + { + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(isChoiceBrave ? NormalChoiceBraveNameLabelTemp : NormalNameLabelTemp, isFoil); + } + + public void SetRepositionNameLabel(string cardName, bool isChoiceBrave) + { + Global.SetRepositionNameLabel(isChoiceBrave ? NormalChoiceBraveNameLabelTemp : NormalNameLabelTemp, cardName, is2D: false); + } + + public void SetNormalLabelEnable(bool isEnable) + { + NormalNameLabelTemp.enabled = isEnable; + NormalChoiceBraveNameLabelTemp.enabled = isEnable; + } +} diff --git a/SVSim.BattleEngine/Engine/CastleField.cs b/SVSim.BattleEngine/Engine/CastleField.cs new file mode 100644 index 0000000..a6b0902 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CastleField.cs @@ -0,0 +1,182 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class CastleField : BackGroundBase +{ + public override int FieldId => 2; + + public CastleField(string bgmId = "NONE") + : base(bgmId) + { + } + + protected override void BattleFieldBuild() + { + BattleCoroutine.GetInstance().StartCoroutine(BackGroundBase.ObjectChecker(0.5f, _str3DFieldPath, delegate + { + base.Field = GameObject.Find(_str3DFieldPath); + base.Field.transform.parent = GameMgr.GetIns().m_GameManagerObj.transform; + GimicAudioList = base.Field.GetComponent().GimicAudioList; + _fieldModel = base.Field.transform.Find("md_bf_ocsl_root").gameObject; + _fieldParticles = _fieldModel.transform.Find("Particles02").gameObject; + _fieldObjDictionary.Add(_fieldParticles.name, _fieldParticles); + _fieldObjDictionary.Add("coffin", _fieldModel.transform.Find("md_bf_ocsl_01_coffin").gameObject); + _fieldObjDictionary.Add("sword", _fieldModel.transform.Find("md_bf_ocsl_01_sword").gameObject); + _fieldObjDictionary.Add("tapestry_a", _fieldModel.transform.Find("md_bf_ocsl_01_tapestry_a").gameObject); + _fieldObjDictionary.Add("tapestry_b", _fieldModel.transform.Find("md_bf_ocsl_01_tapestry_b").gameObject); + _fieldObjDictionary.Add("chain_a", _fieldModel.transform.Find("md_bf_ocsl_01_chain_a").gameObject); + _fieldObjDictionary.Add("chain_b", _fieldModel.transform.Find("md_bf_ocsl_01_chain_b").gameObject); + _fieldObjDictionary.Add("chain_c", _fieldModel.transform.Find("md_bf_ocsl_01_chain_c").gameObject); + _fieldObjDictionary.Add("chain_d", _fieldModel.transform.Find("md_bf_ocsl_01_chain_d").gameObject); + _fieldObjDictionary.Add("chain_e", _fieldModel.transform.Find("md_bf_ocsl_01_chain_e").gameObject); + _fieldObjDictionary.Add("grate", _fieldModel.transform.Find("md_bf_ocsl_01_grate").gameObject); + m_FieldAnimatorDictionary.Add("coffin", _fieldObjDictionary["coffin"].GetComponent()); + m_FieldAnimatorDictionary.Add("sword", _fieldObjDictionary["sword"].GetComponent()); + m_FieldAnimatorDictionary.Add("tapestry_a", _fieldObjDictionary["tapestry_a"].GetComponent()); + m_FieldAnimatorDictionary.Add("tapestry_b", _fieldObjDictionary["tapestry_b"].GetComponent()); + m_FieldAnimatorDictionary.Add("chain_a", _fieldObjDictionary["chain_a"].GetComponent()); + m_FieldAnimatorDictionary.Add("chain_b", _fieldObjDictionary["chain_b"].GetComponent()); + m_FieldAnimatorDictionary.Add("chain_c", _fieldObjDictionary["chain_c"].GetComponent()); + m_FieldAnimatorDictionary.Add("chain_d", _fieldObjDictionary["chain_d"].GetComponent()); + m_FieldAnimatorDictionary.Add("chain_e", _fieldObjDictionary["chain_e"].GetComponent()); + m_FieldAnimatorDictionary.Add("grate", _fieldObjDictionary["grate"].GetComponent()); + _fieldParticleSystemDictionary.Add("opening", _fieldParticles.transform.Find("opening").GetComponent()); + _fieldParticleSystemDictionary.Add("coffin_open", _fieldParticles.transform.Find("coffin_open").GetComponent()); + _fieldParticleSystemDictionary.Add("coffin_close", _fieldParticles.transform.Find("coffin_close").GetComponent()); + _fieldParticleSystemDictionary.Add("coffin_gimic_1", _fieldParticles.transform.Find("coffin_gimic_1").GetComponent()); + _fieldParticleSystemDictionary.Add("coffin_gimic_2", _fieldParticles.transform.Find("coffin_gimic_2").GetComponent()); + _fieldParticleSystemDictionary.Add("fog", _fieldParticles.transform.Find("fog").GetComponent()); + _fieldParticleSystemDictionary.Add("candle", _fieldParticles.transform.Find("candle").GetComponent()); + List list = new List(_fieldObjDictionary.Keys); + List list2 = new List(); + for (int i = 0; i < _fieldObjDictionary.Count; i++) + { + list2.Add(_fieldObjDictionary[list[i]]); + } + GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list2, delegate + { + base.SetShaderGlobalColorBG = base.Field.transform.Find("SetMaterialColorBGManager").GetComponent(); + base.IsLoadDone = true; + }, isBattle: true, isField: true); + })); + } + + public override void StartFieldSetEffect(Vector3 pos) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_SET_2, pos); + } + + public override void StartFieldTapEffect(int areaId, Vector3 pos) + { + base.StartFieldTapEffect(areaId, pos); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_2_1, pos); + } + + protected override IEnumerator RunFieldOpening() + { + GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_appear_1", "se_field_" + _str3DFieldNo, 0f, 0L); + m_FieldAnimatorDictionary["tapestry_a"].speed = 0.4f + Random.value * 0.2f; + m_FieldAnimatorDictionary["tapestry_b"].speed = 0.4f + Random.value * 0.2f; + _fieldParticleSystemDictionary["opening"].Play(); + _fieldParticleSystemDictionary["fog"].gameObject.SetActive(value: false); + _fieldParticleSystemDictionary["candle"].gameObject.SetActive(value: false); + m_RandomActionTime = 20f; + _battleCamera.Camera.transform.localPosition = new Vector3(2550f, -830f, -200f); + _battleCamera.Camera.transform.localRotation = Quaternion.Euler(new Vector3(-19f, -90f, 90f)); + Vector3[] bezierQuad = MotionUtils.GetBezierQuad(new Vector3(2550f, -830f, -200f), new Vector3(840f, -250f, -200f), new Vector3(-240f, -190f, -70f), 10); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("path", bezierQuad, "movetopath", false, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", new Vector3(-37f, -117f, 107f), "time", 1f, "delay", 1f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + yield return new WaitForSeconds(0.6f); + m_FieldAnimatorDictionary["grate"].SetTrigger("Open"); + _fieldParticleSystemDictionary["candle"].gameObject.SetActive(value: true); + yield return new WaitForSeconds(1.4f); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CAMERA_ZOOM_OUT); + m_FieldAnimatorDictionary["grate"].SetTrigger("Close"); + _fieldParticleSystemDictionary["fog"].gameObject.SetActive(value: true); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", _battleCamera.BattleCameraPos, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", _battleCamera.BattleCameraRot, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + yield return new WaitForSeconds(0f); + } + + protected override IEnumerator RunFieldGimic(GameObject obj) + { + string tag = obj.tag; + if (tag != null && tag == "FieldGimic1" && _gimicCntDictionary[obj.tag] == 0) + { + _gimicCntDictionary[obj.tag]++; + int num = Random.Range(1, 3); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_gim_{num}", "se_field_" + _str3DFieldNo, 0f, 0L); + switch (num) + { + case 1: + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(GimicAudioList[0], "se_field_" + _str3DFieldNo, 0f, 0L); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(GimicAudioList[1], "se_field_" + _str3DFieldNo, 0f, 0L); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(GimicAudioList[2], "se_field_" + _str3DFieldNo, 0f, 0L); + m_FieldAnimatorDictionary["coffin"].SetTrigger("Open"); + m_FieldAnimatorDictionary["sword"].SetTrigger("Open"); + _fieldParticleSystemDictionary["coffin_open"].Play(); + yield return new WaitForSeconds(1.5f); + _fieldParticleSystemDictionary["coffin_gimic_1"].Play(); + yield return new WaitForSeconds(2.5f); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(GimicAudioList[4], "se_field_" + _str3DFieldNo, 0f, 0L); + m_FieldAnimatorDictionary["coffin"].SetTrigger("Close"); + yield return new WaitForSeconds(1f); + m_FieldAnimatorDictionary["sword"].SetTrigger("Close"); + yield return new WaitForSeconds(1f); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(GimicAudioList[6], "se_field_" + _str3DFieldNo, 0f, 0L); + _fieldParticleSystemDictionary["coffin_close"].Play(); + yield return new WaitForSeconds(1f); + break; + case 2: + m_FieldAnimatorDictionary["coffin"].SetTrigger("Act"); + m_FieldAnimatorDictionary["sword"].SetTrigger("Act"); + yield return new WaitForSeconds(0.5f); + break; + } + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(GimicAudioList[5], "se_field_" + _str3DFieldNo, 0f, 0L); + _gimicCntDictionary[obj.tag] = 0; + } + } + + protected override IEnumerator RunFieldShake() + { + m_FieldAnimatorDictionary["chain_a"].speed = 0.8f + Random.value * 0.4f; + m_FieldAnimatorDictionary["chain_b"].speed = 0.8f + Random.value * 0.4f; + m_FieldAnimatorDictionary["chain_c"].speed = 0.8f + Random.value * 0.4f; + m_FieldAnimatorDictionary["chain_d"].speed = 0.8f + Random.value * 0.4f; + m_FieldAnimatorDictionary["chain_e"].speed = 0.8f + Random.value * 0.4f; + m_FieldAnimatorDictionary["chain_a"].SetTrigger("Shake"); + m_FieldAnimatorDictionary["chain_b"].SetTrigger("Shake"); + m_FieldAnimatorDictionary["chain_c"].SetTrigger("Shake"); + m_FieldAnimatorDictionary["chain_d"].SetTrigger("Shake"); + m_FieldAnimatorDictionary["chain_e"].SetTrigger("Shake"); + m_FieldAnimatorDictionary["tapestry_a"].speed = 0.8f + Random.value * 0.4f; + m_FieldAnimatorDictionary["tapestry_b"].speed = 0.8f + Random.value * 0.4f; + m_FieldAnimatorDictionary["tapestry_a"].SetTrigger("Shake"); + m_FieldAnimatorDictionary["tapestry_b"].SetTrigger("Shake"); + if (_gimicCntDictionary["FieldGimic1"] == 0) + { + m_FieldAnimatorDictionary["coffin"].SetTrigger("Shake"); + m_FieldAnimatorDictionary["sword"].SetTrigger("Shake"); + } + yield return new WaitForSeconds(3f); + m_FieldAnimatorDictionary["tapestry_a"].speed = 0.4f + Random.value * 0.2f; + m_FieldAnimatorDictionary["tapestry_b"].speed = 0.4f + Random.value * 0.2f; + yield return new WaitForSeconds(0f); + } + + public override void UpdateFieldRandom() + { + if (IsFieldRandom) + { + m_RandomActionTime -= Time.deltaTime; + if (m_RandomActionTime <= 0f) + { + m_FieldAnimatorDictionary["tapestry_a"].SetTrigger("LoopRandom"); + m_FieldAnimatorDictionary["tapestry_b"].SetTrigger("LoopRandom"); + m_RandomActionTime = Random.value * 20f + 20f; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/CausedDamageCardParameterModifier.cs b/SVSim.BattleEngine/Engine/CausedDamageCardParameterModifier.cs new file mode 100644 index 0000000..5afa38b --- /dev/null +++ b/SVSim.BattleEngine/Engine/CausedDamageCardParameterModifier.cs @@ -0,0 +1,9 @@ +public class CausedDamageCardParameterModifier : TurnAndIntValue +{ + public int Damage => base.Value; + + public CausedDamageCardParameterModifier(int damage, int turn, bool isSelfTurn) + : base(damage, turn, isSelfTurn) + { + } +} diff --git a/SVSim.BattleEngine/Engine/ChallengeConfig.cs b/SVSim.BattleEngine/Engine/ChallengeConfig.cs new file mode 100644 index 0000000..a9a4246 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ChallengeConfig.cs @@ -0,0 +1,6 @@ +public class ChallengeConfig +{ + public bool UseTwoPickPremiumCard { get; set; } + + public long TwoPickSleeveId { get; set; } +} diff --git a/SVSim.BattleEngine/Engine/ChallengeData.cs b/SVSim.BattleEngine/Engine/ChallengeData.cs new file mode 100644 index 0000000..b37fc48 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ChallengeData.cs @@ -0,0 +1,43 @@ +using System; +using LitJson; +using Wizard; + +public class ChallengeData +{ + public TwoPickFormat TwoPickFormat { get; private set; } + + public string CardPoolName { get; private set; } + + public string CardPoolUrl { get; private set; } = string.Empty; + + public string AnnounceId { get; private set; } + + public string StartTime { get; private set; } + + public string EndTime { get; private set; } + + public int LatestCardPackId { get; private set; } + + public int ChaosNum { get; private set; } + + public ChallengeData(JsonData forMatIndoJson) + { + TwoPickFormat = (TwoPickFormat)forMatIndoJson["two_pick_type"].ToInt(); + CardPoolName = forMatIndoJson["card_pool_name"].ToString(); + if (forMatIndoJson.TryGetValue("card_pool_url", out var value)) + { + CardPoolUrl = value.ToString(); + } + AnnounceId = forMatIndoJson["announce_id"].ToString(); + StartTime = ConvertTime.ToLocal(DateTime.Parse(forMatIndoJson["start_time"].ToString())); + EndTime = ConvertTime.ToLocal(DateTime.Parse(forMatIndoJson["end_time"].ToString())); + if (forMatIndoJson.TryGetValue("last_card_pack_set_id", out var value2)) + { + LatestCardPackId = value2.ToInt(); + } + if (forMatIndoJson.TryGetValue("strategy_pick_num", out var value3)) + { + ChaosNum = value3.ToInt(); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ChangeAffiliationVfx.cs b/SVSim.BattleEngine/Engine/ChangeAffiliationVfx.cs new file mode 100644 index 0000000..9fe7440 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ChangeAffiliationVfx.cs @@ -0,0 +1,52 @@ +using UnityEngine; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class ChangeAffiliationVfx : SequentialVfxPlayer +{ + private readonly IBattleCardView _view; + + public ChangeAffiliationVfx(BattleCardBase card, CardBasePrm.ClanType clan) + { + ChangeAffiliationVfx changeAffiliationVfx = this; + GameObject effectGameObject = null; + _view = card.BattleCardView; + if ((card.IsPlayer || GameMgr.GetIns().IsAdminWatch || !card.IsInHand) && clan != CardBasePrm.ClanType.NONE) + { + Register(new WaitLoadEffectAndSetSeVfx("cmn_card_classchange_1", "se_cmn_card_classchange_1", delegate(GameObject e) + { + effectGameObject = e; + })); + Register(new PlayEffectAndSeVfx(delegate + { + effectGameObject.GetComponent().ChangeParticleColor(changeAffiliationVfx.GetClanColor(clan)); + return effectGameObject; + }, _view.Transform)); + Register(WaitVfx.Create(0.3f)); + } + } + + private VfxBase ChangeEffectColor(Effect effect, Color color) + { + return InstantVfx.Create(delegate + { + effect.ChangeParticleColor(color); + }); + } + + private Color GetClanColor(CardBasePrm.ClanType clan) + { + return clan switch + { + CardBasePrm.ClanType.ALL => Color.white, + CardBasePrm.ClanType.MIN => new Color(0.2f, 1f, 0.8f), + CardBasePrm.ClanType.ROYAL => new Color(1f, 0.9f, 0.5f), + CardBasePrm.ClanType.WITCH => new Color(0.7f, 0.5f, 1f), + CardBasePrm.ClanType.DRAGON => new Color(1f, 0.5f, 0f), + CardBasePrm.ClanType.NECRO => new Color(0.5f, 0.4f, 1f), + CardBasePrm.ClanType.VAMPIRE => new Color(1f, 0.2f, 0.2f), + CardBasePrm.ClanType.BISHOP => new Color(0.5f, 0.7f, 1f), + _ => Color.white, + }; + } +} diff --git a/SVSim.BattleEngine/Engine/ChantCountAddModifier.cs b/SVSim.BattleEngine/Engine/ChantCountAddModifier.cs new file mode 100644 index 0000000..dfa1564 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ChantCountAddModifier.cs @@ -0,0 +1,21 @@ +public class ChantCountAddModifier : ICardChantCountModifier +{ + public int ChantCount { get; private set; } + + public bool IsClearBeforeModifier => false; + + public ChantCountAddModifier(int chantCount) + { + ChantCount = chantCount; + } + + public int CalcChantCount(int chantCount) + { + return chantCount + ChantCount; + } + + public ICardChantCountModifier Clone() + { + return new ChantCountAddModifier(ChantCount); + } +} diff --git a/SVSim.BattleEngine/Engine/ChantCountSetModifier.cs b/SVSim.BattleEngine/Engine/ChantCountSetModifier.cs new file mode 100644 index 0000000..f1c59a4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ChantCountSetModifier.cs @@ -0,0 +1,21 @@ +public class ChantCountSetModifier : ICardChantCountModifier +{ + public readonly int ChantCount; + + public bool IsClearBeforeModifier => true; + + public ChantCountSetModifier(int chantCount) + { + ChantCount = chantCount; + } + + public int CalcChantCount(int chantCount) + { + return ChantCount; + } + + public ICardChantCountModifier Clone() + { + return new ChantCountSetModifier(ChantCount); + } +} diff --git a/SVSim.BattleEngine/Engine/ChantFieldBattleCard.cs b/SVSim.BattleEngine/Engine/ChantFieldBattleCard.cs new file mode 100644 index 0000000..f7a6496 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ChantFieldBattleCard.cs @@ -0,0 +1,120 @@ +using Wizard; +using Wizard.Battle.Card; +using Wizard.Battle.View.Vfx; + +public class ChantFieldBattleCard : FieldBattleCard +{ + protected readonly int _baseChantCount; + + public override bool IsChantField => true; + + public ChantFieldBattleCard(BuildInfo buildInfo) + : base(buildInfo) + { + _baseChantCount = base.BaseParameter.ChantCount; + AddChantSkill(buildInfo); + } + + public void AddChantSkill(BuildInfo buildInfo) + { + if (!_normalSkillCollection.HaveNotAttachedResidentChantCountChangeSkill()) + { + SkillBase skillBase = CreateSkillCreator(buildInfo.SelfBattlePlayer, buildInfo.OpponentBattlePlayer, buildInfo.ResourceMgr).Create(ChantSkillInfoCreate()); + SetChantSkill(skillBase); + _normalSkillCollection.Add(skillBase); + } + } + + public override void FlagCardAsDestroyedBySkill() + { + base.IsDestroyedBySkill = true; + base.DeathTypeInfo.ChantDestroy = true; + } + + public override VfxBase SetUpInplay() + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(base.SetUpInplay()); + parallelVfxPlayer.Register(new ShowChantCountVfx(this, base.ChantCount, base.SelfBattlePlayer.BattleMgr.BattleResourceMgr)); + return parallelVfxPlayer; + } + + protected override void InitSkillApplyInformationOnWhenReturn() + { + base.SkillApplyInformation.InitializeInformation(isReturnCard: true); + base.SkillApplyInformation.ClearParameterModifier(); + ClearCostModifier(); + base.TransformInfo = default(TransformInformation); + base.SkillApplyInformation.AttachedSkillsInfo.Clear(); + _normalSkillCollection.Clear(); + _evolveSkillCollection.Clear(); + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(CardMaster.GetInstanceForBattle().GetCardParameterFromId(base.CardId)); + foreach (SkillBase item in CreateSkillCondition(cardSkillsBuildInfo.normalSkillBuildInfos, base.SelfBattlePlayer, base.OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _normalSkillCollection.Add(item); + item.SetInductionVoiceIndex(); + } + foreach (SkillBase item2 in CreateSkillCondition(cardSkillsBuildInfo.evolveSkillBuildInfos, base.SelfBattlePlayer, base.OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _evolveSkillCollection.Add(item2); + item2.SetInductionVoiceIndex(); + } + AddChantSkill(_buildInfo); + base.Skills = _normalSkillCollection; + base.Skills.Complete(); + } + + public override VfxBase ReturnCard(SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(base.SkillApplyInformation.AllSkillEffectStop()); + InitializeParameterOnWhenReturn(); + VfxBase vfx = base.ReturnCard(skillProcessor); + sequentialVfxPlayer.Register(vfx); + return sequentialVfxPlayer; + } + + public override VfxBase RecoveryInPlay(int inPlayIndex, bool newReplayMoveTurn = false) + { + return ParallelVfxPlayer.Create(base.RecoveryInPlay(inPlayIndex, newReplayMoveTurn), new ShowChantCountVfx(this, base.ChantCount, _buildInfo.ResourceMgr)); + } + + public override BattleCardBase VirtualClone(BattlePlayerBase virtualSelfBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer) + { + VirtualChantFieldBattleCard virtualChantFieldBattleCard = new VirtualChantFieldBattleCard(_buildInfo.VirtualClone(virtualSelfBattlePlayer, virtualOpponentBattlePlayer)); + CopyToVirtualCardBase(virtualChantFieldBattleCard); + return virtualChantFieldBattleCard; + } + + public override VfxBase CombineVirtualCardSkill(BattleCardBase target) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + base.IsSkillLost = false; + foreach (SkillBase item in CreateSkillCondition(target.GetBuildInfo.NormalSkillBuildInfos, base.SelfBattlePlayer, base.OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _normalSkillCollection.Add(item); + } + AddChantSkill(_buildInfo); + base.Skills = _normalSkillCollection; + base.SkillApplyInformation.Combine(target.SkillApplyInformation); + int count = target.BuffInfoList.Count; + for (int i = 0; i < count; i++) + { + BuffInfo buffInfo = target.BuffInfoList[i]; + if (!(buffInfo.SkillFrom is Skill_powerup) && !(buffInfo.SkillFrom is Skill_power_down) && !base.BuffInfoList.Contains(buffInfo)) + { + AddBuffInfo(buffInfo); + } + } + base.Skills.Complete(); + CostModifierList.AddRange(target.CostModifierList); + if (!base.SelfBattlePlayer.BattleMgr.IsVirtualBattle && !base.SelfBattlePlayer.BattleMgr.IsRecovery) + { + parallelVfxPlayer.Register(SequentialVfxPlayer.Create(base.SkillApplyInformation.AllSkillEffectRestart(), InstantVfx.Create(delegate + { + base.BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect(); + }), base.BattleCardView.BattleCardIconAnimations.Initialize(this, base.Skills))); + } + return parallelVfxPlayer; + } +} diff --git a/SVSim.BattleEngine/Engine/ChapterExtraData.cs b/SVSim.BattleEngine/Engine/ChapterExtraData.cs new file mode 100644 index 0000000..e3b6e7d --- /dev/null +++ b/SVSim.BattleEngine/Engine/ChapterExtraData.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using UnityEngine; + +public class ChapterExtraData +{ + public int SectionId { get; set; } + + public int ExtraTextureChapter { get; set; } + + public CardBasePrm.ClanType ClanType { get; set; } = CardBasePrm.ClanType.NONE; + + public string BGSuffix { get; set; } = string.Empty; + + public List ExtraTextureIndex { get; set; } = new List(); + + public int BGSectionId { get; set; } = -1; + + public Dictionary BGTexture { get; set; } = new Dictionary(); + + public string BGExtraEffectPath { get; set; } = string.Empty; + + public bool AttachExtraEffectToBgRoot { get; set; } + + public GameObject ExtraEffect { get; set; } + + public Se.TYPE SeType { get; set; } + + public float ChapterMoveTime { get; set; } = 1.5f; + + public string BGFirstClearEffectPath { get; set; } = string.Empty; + + public GameObject FirstClearEffect { get; set; } + + public Se.TYPE FirstClearSeType { get; set; } + + public float FirstClearEffectDelayTime { get; set; } + + public float FirstClearMoveDelayTime { get; set; } + + public float FirstClearMoveOutDelayTime { get; set; } + + public bool AddTreeEffect { get; set; } + + public bool IsUseOtherSectionBG() + { + return BGSectionId != -1; + } + + public bool IsChangeBG() + { + if (!IsUseOtherSectionBG()) + { + return ExtraTextureIndex.Count > 0; + } + return true; + } +} diff --git a/SVSim.BattleEngine/Engine/CharIdx.cs b/SVSim.BattleEngine/Engine/CharIdx.cs new file mode 100644 index 0000000..b9193b3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CharIdx.cs @@ -0,0 +1,28 @@ +using UnityEngine; + +public class CharIdx : MonoBehaviour +{ + public int m_Idx { get; protected set; } + + public int m_CardId { get; protected set; } + + public void SetIdx(int idx) + { + m_Idx = idx; + } + + public int GetIdx() + { + return m_Idx; + } + + public void SetCardId(int cardid) + { + m_CardId = cardid; + } + + public int GetCardId() + { + return m_CardId; + } +} diff --git a/SVSim.BattleEngine/Engine/Charactor3dInformation.cs b/SVSim.BattleEngine/Engine/Charactor3dInformation.cs new file mode 100644 index 0000000..92476f9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Charactor3dInformation.cs @@ -0,0 +1,430 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using Wizard.Battle.Player.ClassCharacter; + +public class Charactor3dInformation : MonoBehaviour +{ + public GameObject[] Meshes; + + public Material[] Materials; + + public Animator[] Animators; + + public Transform[] LeftEyeInfoObject; + + public Transform[] RightEyeInfoObject; + + public Effect3dInformation EffectInfo; + + public Transform BodyNeck; + + public Transform FaceNeck; + + public Transform BodyHead; + + public Transform FaceHead; + + public Transform BodyHip; + + public Transform TailHip; + + public Transform BodyProp; + + public Transform PropProp; + + public GameObject Prop; + + public Transform HeadAttach; + + public Transform HeadCenterOffset; + + public Transform HeadTubeCenterOffset; + + public Transform HeadAttachR; + + public Transform HeadAttachL; + + private Material EyeMaterial; + + private Material FaceSkinMaterial; + + private Material HairMaterial; + + private Material BodyMaterial; + + public GameObject Quad; + + private string _oldMotion = ""; + + private Class3dCharacterBase _characterBase; + + private string _characterId = ""; + + private bool _isInitialized; + + private bool _isLoadMesh; + + private bool _isLoadedMesh; + + public bool IsTestScene; + + private List _meshList = new List(); + + private Class3dPostImageEffect _postEffect; + + private void Start() + { + string text = base.name; + text = text.Replace("chr", ""); + _characterId = text.Replace("(Clone)", ""); + if (Prop != null) + { + Prop.SetActive(value: true); + } + if (!IsTestScene) + { + _isLoadMesh = true; + } + } + + private void Update() + { + if ((_isLoadedMesh && !_isInitialized) || (IsTestScene && !_isInitialized)) + { + Initialize(); + _isInitialized = true; + } + if (_isLoadMesh && !_isLoadedMesh) + { + InitializeMesh(_characterBase, _postEffect); + _isLoadedMesh = true; + } + if (EyeMaterial != null) + { + Vector4[] values = new Vector4[3] + { + new Vector4(LeftEyeInfoObject[0].localPosition.x, LeftEyeInfoObject[0].localPosition.y, LeftEyeInfoObject[0].localPosition.z, LeftEyeInfoObject[0].localScale.x), + new Vector4(LeftEyeInfoObject[1].localPosition.x, LeftEyeInfoObject[1].localPosition.y, LeftEyeInfoObject[1].localPosition.z, LeftEyeInfoObject[1].localScale.x), + new Vector4(LeftEyeInfoObject[2].localPosition.x, LeftEyeInfoObject[2].localPosition.y, LeftEyeInfoObject[2].localPosition.z, LeftEyeInfoObject[2].localScale.x) + }; + EyeMaterial.SetVectorArray("_HighParam1", values); + Vector4[] values2 = new Vector4[2] + { + new Vector4(RightEyeInfoObject[0].localPosition.x, RightEyeInfoObject[0].localPosition.y, RightEyeInfoObject[0].localPosition.z, RightEyeInfoObject[0].localScale.x), + new Vector4(RightEyeInfoObject[1].localPosition.x, RightEyeInfoObject[1].localPosition.y, RightEyeInfoObject[1].localPosition.z, RightEyeInfoObject[1].localScale.x) + }; + EyeMaterial.SetVectorArray("_HighParam2", values2); + } + } + + private void Initialize() + { + SkinnedMeshRenderer[] componentsInChildren = GetComponentsInChildren(); + MeshRenderer meshRenderer = null; + if (Prop != null) + { + MeshRenderer[] componentsInChildren2 = Prop.GetComponentsInChildren(); + if (componentsInChildren2.Length != 0) + { + meshRenderer = componentsInChildren2[0]; + } + } + int num = 0; + SkinnedMeshRenderer[] array = componentsInChildren; + for (int i = 0; i < array.Length; i++) + { + Material[] materials = array[i].materials; + num += materials.Length; + } + num += ((meshRenderer != null) ? 1 : 0); + Materials = new Material[num]; + int num2 = 0; + array = componentsInChildren; + foreach (SkinnedMeshRenderer skinnedMeshRenderer in array) + { + Material[] materials2 = skinnedMeshRenderer.materials; + for (int j = 0; j < materials2.Length; j++) + { + skinnedMeshRenderer.sharedMaterials[j].shader = Shader.Find(materials2[j].shader.name); + Materials[num2] = skinnedMeshRenderer.sharedMaterials[j]; + if (skinnedMeshRenderer.sharedMaterials[j].name.Contains("face")) + { + FaceSkinMaterial = skinnedMeshRenderer.sharedMaterials[j]; + } + if (skinnedMeshRenderer.sharedMaterials[j].name.Contains("hair")) + { + HairMaterial = skinnedMeshRenderer.sharedMaterials[j]; + } + if (skinnedMeshRenderer.sharedMaterials[j].name.Contains("eye")) + { + EyeMaterial = skinnedMeshRenderer.sharedMaterials[j]; + } + if (skinnedMeshRenderer.sharedMaterials[j].name.Contains("bdy")) + { + BodyMaterial = skinnedMeshRenderer.sharedMaterials[j]; + } + num2++; + } + } + if (meshRenderer != null) + { + meshRenderer.sharedMaterial.shader = Shader.Find(meshRenderer.sharedMaterial.shader.name); + Materials[num2] = meshRenderer.sharedMaterial; + } + InitializeMaterials(); + EffectInfo = GetComponent(); + if (Prop != null) + { + Prop.SetActive(value: false); + } + } + + public void OnApplicationFocus(bool focus) + { + if (focus) + { + InitializeMaterials(); + } + } + + public void InitializeMaterials() + { + Material[] materials = Materials; + foreach (Material material in materials) + { + if (!(material == null)) + { + material.SetColor("_GlobalToonColor", Color.white); + material.SetColor("_GlobalRimColor", Color.white); + material.SetFloat("_GlobalOutlineWidth", 1f); + material.SetFloat("_GlobalOutlineOffset", 1f); + material.SetColor("_Global_FogColor", new Color(0.76f, 1f, 1f, 1f)); + material.SetVector("_Global_FogMinDistance", Vector4.zero); + material.SetVector("_Global_FogLength", new Vector4(1000f, 1000f, 1000f, 1000f)); + material.SetInt("_Global_MaxDensity", 1); + material.SetFloat("_Global_MaxHeight", 100f); + material.SetVector("_Global_FogWorld_Origin", Vector4.zero); + material.SetColor("_LightColorWizard", Color.white); + material.SetFloat("_RimStep", 0.5f); + material.SetFloat("_RimStep2", 0.1f); + material.SetFloat("_RimSpecRate", 0.5f); + } + } + } + + private void LateUpdate() + { + AnimatorClipInfo[] currentAnimatorClipInfo = Animators[0].GetCurrentAnimatorClipInfo(0); + if (currentAnimatorClipInfo != null && currentAnimatorClipInfo.Length != 0) + { + string text = currentAnimatorClipInfo[0].clip.name; + foreach (ClassCharaPrm.MotionType value5 in Enum.GetValues(typeof(ClassCharaPrm.MotionType))) + { + if (text.Contains(value5.ToString())) + { + if (EffectInfo != null) + { + EffectInfo.UpdateInfo(value5); + } + break; + } + } + Vector3 localScale = HeadAttach.localScale; + Color value = new Color(localScale.x, localScale.y, localScale.z); + Vector3 vector = HeadAttach.localRotation * Vector3.up; + Material[] materials = Materials; + foreach (Material material in materials) + { + if (!(material == null)) + { + material.SetColor("_CharaColor", value); + material.SetVector("_WorldSpaceLightPosWizard", vector); + } + } + string value2 = ClassCharaPrm.MotionType.extra.ToString(); + if (_characterBase != null && _characterBase.IsPlayer) + { + if (text.Equals(value2) && !_oldMotion.Equals(value2)) + { + _characterBase.EnableEvolve(enable: true); + } + else if (!text.Equals(value2) && _oldMotion.Equals(value2)) + { + _characterBase.EnableEvolve(enable: false); + } + } + if (_postEffect != null && text.Equals(value2)) + { + AnimatorStateInfo currentAnimatorStateInfo = Animators[0].GetCurrentAnimatorStateInfo(0); + float num = (float)currentAnimatorClipInfo.Length * currentAnimatorStateInfo.normalizedTime; + int num2 = (int)(85f * num) + 1; + if (_postEffect._param.FadeOutEndFrame <= num2) + { + _postEffect._param.DiffusionThreshold = _postEffect._param.EndDiffusionThreshold; + } + else if (_postEffect._param.FadeOutStartFrame <= num2) + { + float num3 = _postEffect._param.FadeOutEndFrame - _postEffect._param.FadeOutStartFrame; + float t = 0f; + if (num3 > 0f) + { + t = 1f / num3; + } + _postEffect._param.DiffusionThreshold = Mathf.Lerp(_postEffect._param.DiffusionThreshold, _postEffect._param.EndDiffusionThreshold, t); + } + else + { + _postEffect._param.DiffusionThreshold = _postEffect._param.DefaultDiffusionThreshold; + } + } + if (text != _oldMotion && BodyMaterial != null) + { + if (text.Contains(ClassCharaPrm.MotionType.idle.ToString())) + { + BodyMaterial.renderQueue = 1999; + } + if ((_characterId == "3606" && text.Contains("extra_2")) || (_characterId == "3603" && (text.Contains("extra_2") || text.Contains("shock") || text == "positive")) || (_characterId == "3617" && text.Contains("nagative_2_a"))) + { + BodyMaterial.renderQueue = 2001; + } + } + if (Prop != null) + { + if (text.Equals(value2) && !_oldMotion.Equals(value2)) + { + Prop.SetActive(value: true); + } + else if (!text.Equals(value2) && _oldMotion.Equals(value2)) + { + Prop.SetActive(value: false); + } + } + _oldMotion = text; + } + if (HeadCenterOffset != null && FaceSkinMaterial != null) + { + Vector3 forward = BodyHead.forward; + Vector3 up = BodyHead.up; + Vector3 vector2 = BodyHead.position + up * HeadCenterOffset.localPosition.y + forward * HeadCenterOffset.localPosition.z; + Vector3 vector3 = BodyHead.position + forward * HeadTubeCenterOffset.localPosition.z; + FaceSkinMaterial.SetVector("_FaceCenterPos", vector3); + HairMaterial.SetVector("_FaceCenterPos", vector2); + EyeMaterial.SetVector("_FaceCenterPos", vector3); + FaceSkinMaterial.SetVector("_FaceUp", up); + HairMaterial.SetVector("_FaceUp", up); + EyeMaterial.SetVector("_FaceUp", up); + FaceSkinMaterial.SetVector("_FaceForward", forward); + HairMaterial.SetVector("_FaceForward", forward); + EyeMaterial.SetVector("_FaceForward", forward); + if (HeadAttachR != null) + { + Material[] materials = Materials; + foreach (Material material2 in materials) + { + if (!(material2 == null)) + { + Vector3 localPosition = HeadAttachR.localPosition; + material2.SetFloat("_RimStep", localPosition.x); + material2.SetFloat("_RimFeather", localPosition.y); + material2.SetFloat("_RimSpecRate", localPosition.z); + if (material2.HasProperty("_RimColor")) + { + Color color = material2.GetColor("_RimColor"); + Vector3 localScale2 = HeadAttachR.localScale; + Color value3 = new Color(localScale2.x, localScale2.y, localScale2.z, color.a); + material2.SetColor("_RimColor", value3); + } + Vector3 localScale3 = HeadAttachL.localScale; + Color value4 = new Color(localScale3.x, localScale3.y, localScale3.z, 0f); + material2.SetColor("_ToonDarkColor", value4); + } + } + } + } + UpdateTransform(FaceNeck, BodyNeck); + FaceHead.localPosition = BodyHead.localPosition; + FaceHead.localRotation = BodyHead.localRotation; + UpdateTransform(TailHip, BodyHip); + if (Prop != null && Prop.activeSelf && BodyProp != null && PropProp != null) + { + UpdateTransform(PropProp, BodyProp); + } + } + + private void UpdateTransform(Transform face, Transform body) + { + face.position = body.position; + face.localRotation = body.rotation; + } + + public void InitializeMesh(Class3dCharacterBase characterBase = null, Class3dPostImageEffect postEffect = null) + { + _characterBase = characterBase; + _postEffect = postEffect; + Mesh mesh = new Mesh(); + mesh.vertices = new Vector3[4] + { + new Vector3(-0.5f, -0.5f, 0f), + new Vector3(-0.5f, 0.5f, 0f), + new Vector3(0.5f, 0.5f, 0f), + new Vector3(0.5f, -0.5f, 0f) + }; + mesh.triangles = new int[6] { 0, 1, 3, 1, 2, 3 }; + mesh.uv = new Vector2[4] + { + new Vector2(0.65f, 0.39f), + new Vector2(0.65f, 0.69f), + new Vector2(0.35f, 0.69f), + new Vector2(0.35f, 0.39f) + }; + mesh.RecalculateBounds(); + mesh.RecalculateNormals(); + mesh.RecalculateTangents(); + Quad.GetComponent().mesh = mesh; + } + + public void Destroy() + { + if (Materials != null) + { + for (int i = 0; i < Materials.Length; i++) + { + Material material = Materials[i]; + if (!(material == null)) + { + UnityEngine.Object.Destroy(material); + Materials[i] = null; + } + } + Materials = null; + } + if (Quad != null) + { + if (Quad.GetComponent().mesh != null) + { + UnityEngine.Object.Destroy(Quad.GetComponent().mesh); + Quad.GetComponent().mesh = null; + } + MeshRenderer component = Quad.GetComponent(); + if (component != null && component.sharedMaterial != null) + { + RenderTexture renderTexture = component.sharedMaterial.mainTexture as RenderTexture; + component.sharedMaterial.mainTexture = null; + if (renderTexture != null) + { + renderTexture.Release(); + } + UnityEngine.Object.Destroy(component.sharedMaterial); + component.sharedMaterial = null; + } + UnityEngine.Object.Destroy(Quad); + Quad = null; + } + if (_postEffect != null) + { + _postEffect.Destroy(); + _postEffect = null; + } + } +} diff --git a/SVSim.BattleEngine/Engine/ChateauField.cs b/SVSim.BattleEngine/Engine/ChateauField.cs new file mode 100644 index 0000000..9a1119b --- /dev/null +++ b/SVSim.BattleEngine/Engine/ChateauField.cs @@ -0,0 +1,110 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ChateauField : BackGroundBase +{ + public override int FieldId => 6; + + public ChateauField(string bgmId = "NONE") + : base(bgmId) + { + } + + protected override void BattleFieldBuild() + { + BattleCoroutine.GetInstance().StartCoroutine(BackGroundBase.ObjectChecker(0.5f, _str3DFieldPath, delegate + { + base.Field = GameObject.Find(_str3DFieldPath); + base.Field.transform.parent = GameMgr.GetIns().m_GameManagerObj.transform; + GimicAudioList = base.Field.GetComponent().GimicAudioList; + _fieldModel = base.Field.transform.Find("md_bf_hous_root").gameObject; + _fieldParticles = _fieldModel.transform.Find("Particles06").gameObject; + _fieldObjDictionary.Add(_fieldParticles.name, _fieldParticles); + _fieldObjDictionary.Add("door", _fieldModel.transform.Find("md_bf_hous_01_door").gameObject); + _fieldObjDictionary.Add("shelf_door", _fieldModel.transform.Find("md_bf_hous_01_shelf_door").gameObject); + m_FieldAnimatorDictionary.Add("door", _fieldObjDictionary["door"].GetComponent()); + m_FieldAnimatorDictionary.Add("shelf_door", _fieldObjDictionary["shelf_door"].GetComponent()); + _fieldParticleSystemDictionary.Add("clock_gimic_1", _fieldParticles.transform.Find("clock_gimic_1").GetComponent()); + _fieldParticleSystemDictionary.Add("clock_gimic_2", _fieldParticles.transform.Find("clock_gimic_2").GetComponent()); + List list = new List(_fieldObjDictionary.Keys); + List list2 = new List(); + for (int i = 0; i < _fieldObjDictionary.Count; i++) + { + list2.Add(_fieldObjDictionary[list[i]]); + } + GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list2, delegate + { + base.SetShaderGlobalColorBG = base.Field.transform.Find("SetMaterialColorBGManager").GetComponent(); + base.IsLoadDone = true; + }, isBattle: true, isField: true); + })); + } + + public override void StartFieldSetEffect(Vector3 pos) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_SET_6, pos); + } + + public override void StartFieldTapEffect(int areaId, Vector3 pos) + { + base.StartFieldTapEffect(areaId, pos); + switch (areaId) + { + case 1: + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_6_1, pos); + break; + case 2: + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_6_2, pos); + break; + } + } + + protected override IEnumerator RunFieldOpening() + { + GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_appear_1", "se_field_" + _str3DFieldNo, 0f, 0L); + m_FieldAnimatorDictionary["door"].SetTrigger("Open"); + _battleCamera.Camera.transform.localPosition = new Vector3(-870f, -690f, -40f); + _battleCamera.Camera.transform.localRotation = Quaternion.Euler(new Vector3(-37f, 90f, -90f)); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", new Vector3(10f, -10f, -100f), "time", 1.7f, "delay", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", new Vector3(-35f, 105f, -100f), "time", 1.7f, "delay", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + yield return new WaitForSeconds(2f); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CAMERA_ZOOM_OUT); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", new Vector3(0f, -20f, -200f), "time", 1f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", new Vector3(-35f, 10f, -15f), "time", 1f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + iTween.MoveTo(_battleCamera.Camera.gameObject, iTween.Hash("position", _battleCamera.BattleCameraPos, "time", 1f, "delay", 1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.RotateTo(_battleCamera.Camera.gameObject, iTween.Hash("rotation", _battleCamera.BattleCameraRot, "time", 1f, "delay", 1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + yield return new WaitForSeconds(0f); + } + + protected override IEnumerator RunFieldGimic(GameObject obj) + { + string tag = obj.tag; + if (tag != null && tag == "FieldGimic1" && _gimicCntDictionary[obj.tag] == 0) + { + _gimicCntDictionary[obj.tag]++; + int num = Random.Range(1, 3); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr($"se_field_{_str3DFieldNo}_gim_{num}", "se_field_" + _str3DFieldNo, 0f, 0L); + switch (num) + { + case 1: + _fieldParticleSystemDictionary["clock_gimic_1"].Play(); + yield return new WaitForSeconds(5f); + break; + case 2: + m_FieldAnimatorDictionary["shelf_door"].SetTrigger("Open"); + yield return new WaitForSeconds(0.5f); + _fieldParticleSystemDictionary["clock_gimic_2"].Play(); + yield return new WaitForSeconds(5f); + break; + } + _gimicCntDictionary[obj.tag] = 0; + } + yield return new WaitForSeconds(0f); + } + + protected override IEnumerator RunFieldShake() + { + yield return new WaitForSeconds(0f); + } +} diff --git a/SVSim.BattleEngine/Engine/Class3dPostImageEffect.cs b/SVSim.BattleEngine/Engine/Class3dPostImageEffect.cs new file mode 100644 index 0000000..01faea5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Class3dPostImageEffect.cs @@ -0,0 +1,339 @@ +using UnityEngine; + +[ExecuteInEditMode] +public class Class3dPostImageEffect : MonoBehaviour +{ + public int BLOOM_DIVIDER = 4; + + public float BLOOM_WIDTHMOD = 0.5f; + + private const int PASS_FASTBLOOM_DOWNSAMPLE = 1; + + private const int PASS_FASTBLOOM_VERTICALBLUR = 2; + + private const int PASS_FASTBLOOM_HORIZONTALBLUR = 3; + + private const int PASS_POSTDIFFUSIONBLOOM_VERTICALGAUSS = 0; + + private const int PASS_POSTDIFFUSIONBLOOM_HORIZONGAUSS = 1; + + private const int PASS_POSTDIFFUSIONBLOOM_BLOOM = 2; + + private const int PASS_POSTDIFFUSIONBLOOM_OVERLAY1 = 3; + + private const int PASS_POSTDIFFUSIONBLOOM_OVERLAY2 = 5; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_APPLYBG = 0; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_APPLYBGDEBUG = 1; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_COC2ALPHA = 2; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_DOWNSAMPLE = 3; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_FOGBLOOM = 4; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_BLOOMCOLOR = 5; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_VERTICALGAUSS = 6; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_HORIZONGAUSS = 7; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_BLOOM = 8; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_COCBG_RICH = 9; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_COCBGFG = 10; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_OVERLAY1 = 11; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_OVERLAY1_INVERSE = 12; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_OVERLAY2 = 13; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_OVERLAY2_INVERSE = 14; + + private const int PASS_POSTDIFFUSIONDOFBLOOM_COCFG = 15; + + private const float DOF_HEIGHT_BASE_SIZE_HORIZONTAL = 0.0034722222f; + + private const float DOF_HEIGHT_BASE_SIZE_VERTICAL = 0.0010986328f; + + private const float DIVIDE_SCREEN = 1f; + + private const float DOFONEOVERBASESIZE = 0.001953125f; + + private const float DOFBASESIZE = 512f; + + private float _dofWidthOverHeight = 1.25f; + + private float _dofHeightBaseSize = 0.0024414062f; + + private int _rezworkWidth; + + private int _rezworkHeight; + + [SerializeField] + public DofDiffusionBloomOverlayParam _param = new DofDiffusionBloomOverlayParam(); + + [SerializeField] + private Material _postDiffusionBloomMaterial; + + [SerializeField] + private Material _postDiffusionDofBloomMaterial; + + [SerializeField] + private Material _fastBloomMaterial; + + [Header("Antialiasing")] + public bool EnableAntialiasing = true; + + public float edgeThresholdMin = 0.05f; + + public float edgeThreshold = 0.2f; + + public float edgeshilhouette = 4f; + + private Material antialiasingMaterial; + + public void Initialize() + { + _postDiffusionDofBloomMaterial = (_postDiffusionBloomMaterial = new Material(Shader.Find("Class3D/ImageEffects/Rich/PostDiffusionDofBloom_Rich"))); + _fastBloomMaterial = new Material(Shader.Find("Class3D/ImageEffects/FastBloom")); + Shader shader = Shader.Find("Hidden/FXAA III (Console)"); + if (shader != null && shader.isSupported) + { + antialiasingMaterial = new Material(shader); + } + _param.TargetCamera = GetComponent(); + } + + public void Destroy() + { + if (_fastBloomMaterial != null) + { + Object.Destroy(_fastBloomMaterial); + _fastBloomMaterial = null; + } + if (_postDiffusionBloomMaterial != null) + { + Object.Destroy(_postDiffusionBloomMaterial); + _postDiffusionBloomMaterial = null; + } + if (_postDiffusionDofBloomMaterial != null) + { + Object.Destroy(_postDiffusionDofBloomMaterial); + _postDiffusionDofBloomMaterial = null; + } + if (antialiasingMaterial != null) + { + Object.Destroy(antialiasingMaterial); + antialiasingMaterial = null; + } + } + + private static float GetLowResolutionDividerBasedOnQuality(float baseDivider) + { + return baseDivider * 0.5f; + } + + private RenderTexture CreateBloomTexture(RenderTexture source, RenderTexture downSample) + { + RenderTexture renderTexture = null; + int width = source.width / BLOOM_DIVIDER; + int height = source.height / BLOOM_DIVIDER; + if (_param.BloomBlurSize > 0f) + { + Vector4 zero = Vector4.zero; + bool flag = false; + RenderTexture renderTexture2 = downSample; + if (renderTexture2 == null) + { + zero.z = 0f; + zero.w = 1f; + _fastBloomMaterial.SetVector("_Parameter", zero); + renderTexture2 = RenderTexture.GetTemporary(width, height, 0); + renderTexture2.filterMode = FilterMode.Bilinear; + Graphics.Blit(source, renderTexture2, _fastBloomMaterial, 1); + flag = true; + } + float num = 1f * (float)source.width / (1f * (float)source.height); + float bloomBlurSize = _param.BloomBlurSize; + float num2 = 0.001953125f; + zero.x = bloomBlurSize / num * num2; + zero.y = bloomBlurSize * num2; + zero.z = _param.BloomThreshold; + zero.w = _param.BloomIntensity; + _fastBloomMaterial.SetVector("_Parameter", zero); + RenderTexture temporary = RenderTexture.GetTemporary(width, height, 0); + temporary.filterMode = FilterMode.Bilinear; + Graphics.Blit(renderTexture2, temporary, _fastBloomMaterial, 2); + renderTexture = temporary; + temporary = RenderTexture.GetTemporary(width, height, 0); + temporary.filterMode = FilterMode.Bilinear; + Graphics.Blit(renderTexture, temporary, _fastBloomMaterial, 3); + renderTexture.DiscardContents(); + RenderTexture.ReleaseTemporary(renderTexture); + if (flag) + { + renderTexture2.DiscardContents(); + RenderTexture.ReleaseTemporary(renderTexture2); + } + return temporary; + } + Vector4 zero2 = Vector4.zero; + zero2.z = _param.BloomThreshold; + zero2.w = _param.BloomIntensity; + _fastBloomMaterial.SetVector("_Parameter", zero2); + RenderTexture temporary2 = RenderTexture.GetTemporary(width, height, 0); + temporary2.filterMode = FilterMode.Bilinear; + Graphics.Blit(source, temporary2, _fastBloomMaterial, 1); + return temporary2; + } + + private RenderTexture OnRenderImageDiffusionDofBloom(RenderTexture source, RenderTexture destination) + { + PrepareDofParam(source, _postDiffusionDofBloomMaterial); + int num = 2; + RenderTexture temporary = RenderTexture.GetTemporary(source.width, source.height, 0); + RenderTexture temporary2 = RenderTexture.GetTemporary(_rezworkWidth, _rezworkHeight, 0); + RenderTexture temporary3 = RenderTexture.GetTemporary(_rezworkWidth, _rezworkHeight, 0); + RenderTexture temporary4 = RenderTexture.GetTemporary(_rezworkWidth, _rezworkHeight, 0); + num = 9; + if (_param.DofQualityType == DepthBlurAndBloom.DofQuality.BackgroundAndForeground) + { + _postDiffusionDofBloomMaterial.SetFloat("_dofForegroundSize", _param.DofForegroundSize); + num = 10; + } + Graphics.Blit(source, temporary, _postDiffusionDofBloomMaterial, num); + Graphics.Blit(temporary, temporary4, _postDiffusionDofBloomMaterial, 3); + BlurBlt(temporary4, temporary2, _param.DofMaxBlurSpread); + DiffusionFilterProcess(temporary2, temporary3); + _postDiffusionDofBloomMaterial.SetTexture("_TapLowBackground", temporary3); + RenderTexture renderTexture = null; + if (_param.IsEnableBloom) + { + renderTexture = CreateBloomTexture(temporary, temporary4); + _postDiffusionDofBloomMaterial.SetTexture("_Bloom", renderTexture); + _postDiffusionDofBloomMaterial.SetFloat("_BloomIsScreenBlend", (_param.BloomBlendMode == DofDiffusionBloomOverlayParam.BloomScreenBlendMode.Screen) ? 1f : 0f); + _param.ScreenOverlay.PostFilmBlit(temporary, destination, _postDiffusionDofBloomMaterial, 8, 11, 13); + } + else + { + _postDiffusionDofBloomMaterial.SetFloat("_BloomIsScreenBlend", 0f); + _param.ScreenOverlay.PostFilmBlit(temporary, destination, _postDiffusionDofBloomMaterial, -1, 11, 13); + } + if (renderTexture != null) + { + renderTexture.DiscardContents(); + RenderTexture.ReleaseTemporary(renderTexture); + renderTexture = null; + } + if (temporary != source) + { + temporary.DiscardContents(); + RenderTexture.ReleaseTemporary(temporary); + temporary = null; + } + if (temporary2 != null) + { + temporary2.DiscardContents(); + RenderTexture.ReleaseTemporary(temporary2); + temporary2 = null; + } + if (temporary3 != null) + { + temporary3.DiscardContents(); + RenderTexture.ReleaseTemporary(temporary3); + temporary3 = null; + } + if (temporary4 != null) + { + temporary4.DiscardContents(); + RenderTexture.ReleaseTemporary(temporary4); + temporary4 = null; + } + return destination; + } + + private void PrepareDofParam(RenderTexture source, Material mtrl) + { + source.filterMode = FilterMode.Bilinear; + source.wrapMode = TextureWrapMode.Clamp; + Camera targetCamera = _param.TargetCamera; + float num = targetCamera.farClipPlane - targetCamera.nearClipPlane; + float num2 = 0.1f; + Vector4 zero = Vector4.zero; + switch (_param.DofFocalType) + { + case DepthBlurAndBloom.DofFocalType.Transform: + num2 = ((!(_param.DofFocalTransfrom != null)) ? FocalDistance01(_param.DofFocalPoint) : (targetCamera.WorldToViewportPoint(_param.DofFocalTransfrom.position).z / num)); + break; + case DepthBlurAndBloom.DofFocalType.Position: + num2 = targetCamera.WorldToViewportPoint(_param.DofFocalPosition).z / num; + break; + case DepthBlurAndBloom.DofFocalType.Point: + num2 = FocalDistance01(_param.DofFocalPoint); + break; + } + if (num2 < 0f) + { + num2 = 0f; + } + if (_param.DofSmoothness < 0.1f) + { + _param.DofSmoothness = 0.1f; + } + zero.x = 1f / (float)source.width; + zero.y = 1f / (float)source.height; + mtrl.SetVector("_InvRenderTargetSize", zero); + float num3 = num2 * _param.DofSmoothness; + float num4 = num3; + _dofWidthOverHeight = (float)source.width / (float)source.height; + _dofHeightBaseSize = ((source.width > source.height) ? 0.0034722222f : 0.0010986328f); + float num5 = 1E-06f; + zero.x = ((num3 < num5) ? 0f : (1f / num3)); + zero.y = ((num4 < num5) ? 0f : (1f / num4)); + zero.z = _param.DofFocalSize / num * 0.5f + num2; + mtrl.SetVector("_CurveParams", zero); + mtrl.SetFloat("_bloomDofWeight", _param.BloomDofWeight); + float lowResolutionDividerBasedOnQuality = GetLowResolutionDividerBasedOnQuality(1f); + _rezworkWidth = (int)((float)source.width * lowResolutionDividerBasedOnQuality); + _rezworkHeight = (int)((float)source.height * lowResolutionDividerBasedOnQuality); + } + + private float FocalDistance01(float worldDist) + { + return _param.TargetCamera.WorldToViewportPoint((worldDist - _param.TargetCamera.nearClipPlane) * _param.TargetCamera.transform.forward + _param.TargetCamera.transform.position).z / (_param.TargetCamera.farClipPlane - _param.TargetCamera.nearClipPlane); + } + + private void DiffusionFilterProcess(RenderTexture source, RenderTexture destination) + { + float lowResolutionDividerBasedOnQuality = GetLowResolutionDividerBasedOnQuality(1f); + RenderTexture temporary = RenderTexture.GetTemporary(_rezworkWidth, _rezworkHeight, 0); + Vector4 zero = Vector4.zero; + zero.x = _param.DiffusionBlurSize * lowResolutionDividerBasedOnQuality / (float)_rezworkWidth; + zero.y = _param.DiffusionBlurSize * lowResolutionDividerBasedOnQuality / (float)_rezworkHeight; + _postDiffusionDofBloomMaterial.SetVector("_PixelSize", zero); + zero.x = _param.DiffusionBright; + zero.y = _param.DiffusionSaturation; + zero.z = _param.DiffusionContrast; + zero.w = _param.DiffusionThreshold; + _postDiffusionDofBloomMaterial.SetVector("_ColorParam", zero); + _postDiffusionDofBloomMaterial.mainTexture = source; + Graphics.Blit(null, temporary, _postDiffusionDofBloomMaterial, 6); + _postDiffusionDofBloomMaterial.mainTexture = temporary; + Graphics.Blit(null, destination, _postDiffusionDofBloomMaterial, 7); + _postDiffusionDofBloomMaterial.mainTexture = null; + if (temporary != null) + { + temporary.DiscardContents(); + RenderTexture.ReleaseTemporary(temporary); + temporary = null; + } + } + + private void BlurBlt(RenderTexture from, RenderTexture to, float spread) + { + } +} diff --git a/SVSim.BattleEngine/Engine/Class3dScreenOverlay.cs b/SVSim.BattleEngine/Engine/Class3dScreenOverlay.cs new file mode 100644 index 0000000..c33cab2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Class3dScreenOverlay.cs @@ -0,0 +1,343 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class Class3dScreenOverlay +{ + [Serializable] + public class Overlay + { + public enum PostFilmMode + { + None, + Lerp, + Add, + Mul, + VignetteLerp, + VignetteAdd, + VignetteMul, + Monochrome, + ScreenBlend, + VignetteScreenBlend + } + + public enum LayerMode + { + Color, + UVMovie, + UVMovieNoScale + } + + public enum ColorBlend + { + None, + Lerp, + Additive, + Multiply + } + + public static readonly string[] SHADER_KEYWORD_MODE = new string[10] { "MODE_NONE", "MODE_LERP", "MODE_ADD", "MODE_MUL", "MODE_VIGNETTE_LERP", "MODE_VIGNETTE_ADD", "MODE_VIGNETTE_MUL", "MODE_MONOCHROME", "MODE_SCREENBLEND", "MODE_VIGNETT_SCREENBLEND" }; + + public static readonly string[] SHADER_KEYWORD_BLEND = new string[5] { "COLOR_ONLY", "BLEND_NONE", "BLEND_LERP", "BLEND_ADD", "BLEND_MUL" }; + + public const float DEFAULT_DEPTH_CLIP = 2f; + + public PostFilmMode postFilmMode; + + public float postFilmPower; + + public float depthPower; + + public float DepthClip = 2f; + + public Vector2 postFilmOffsetParam = Vector2.zero; + + public Vector4 postFilmOptionParam = Vector4.zero; + + public Color postFilmColor0 = Color.black; + + public Color postFilmColor1 = Color.black; + + public Color postFilmColor2 = Color.black; + + public Color postFilmColor3 = Color.black; + + public bool inverseVignette; + + public LayerMode layerMode; + + public ColorBlend colorBlend; + + public int movieResId; + + private bool _isExistMovieMask; + + private Texture _movieTexture; + + private Texture _movieMaskTexture; + + private Vector2 _movieTextureScale = Vector2.one; + + private Vector2 _movieTextureOffset = Vector2.zero; + + public float colorBlendFactor; + + public Vector4 RollParameter; + + public Vector4 ScaleParameter = Vector4.one; + + private bool _isUVMovieNoScale; + + public bool IsEnableDepth = true; + + public void SetMovieInfo(Texture texMovie, Texture texMask, Vector2 scale, Vector2 offset) + { + _movieTexture = texMovie; + _movieMaskTexture = texMask; + _movieTextureScale = scale; + _movieTextureOffset = offset; + _isExistMovieMask = !(texMask == null); + } + + public void SetScale(Vector2 scale) + { + ScaleParameter.x = 1f / scale.x; + ScaleParameter.y = 1f / scale.y; + } + + public void SetRollAngle(float angle) + { + RollParameter.x = Mathf.Sin(angle * (float)Math.PI / 180f); + RollParameter.y = Mathf.Cos(angle * (float)Math.PI / 180f); + } + + public Overlay() + { + SetRollAngle(0f); + } + + private static void SetShaderKeyword(int id, string[] _arrKeywords, Material mtrl) + { + for (int i = 0; i < _arrKeywords.Length; i++) + { + if (id != i) + { + mtrl.DisableKeyword(_arrKeywords[i]); + } + } + if (0 < id && id < _arrKeywords.Length) + { + mtrl.EnableKeyword(_arrKeywords[id]); + } + } + + public void Update(Material mtrl, RenderTexture mainTexture) + { + if (mtrl == null) + { + return; + } + SetShaderKeyword((int)postFilmMode, SHADER_KEYWORD_MODE, mtrl); + switch (layerMode) + { + case LayerMode.Color: + SetShaderKeyword((int)layerMode, SHADER_KEYWORD_BLEND, mtrl); + break; + case LayerMode.UVMovie: + case LayerMode.UVMovieNoScale: + SetShaderKeyword((int)layerMode + (int)colorBlend, SHADER_KEYWORD_BLEND, mtrl); + if (_movieTexture != null) + { + mtrl.SetTexture("_texMovie", _movieTexture); + float num = 0f; + float num2 = (float)mainTexture.width / num; + float num3 = (float)mainTexture.height / num; + float num4 = 7f; + float num5 = 3f; + if (2.3333333f > num2 / num3) + { + num4 *= Mathf.Ceil(num2 / num4); + num5 *= Mathf.Ceil(num3 / num5); + } + ScaleParameter.z = num2 / num4; + ScaleParameter.w = num3 / num5; + } + break; + } + _isUVMovieNoScale = layerMode == LayerMode.UVMovieNoScale; + if (_isExistMovieMask && _movieMaskTexture != null) + { + mtrl.SetTexture("_texMovieMask", _movieMaskTexture); + } + mtrl.SetVector("_movieScale", _movieTextureScale); + mtrl.SetVector("_movieOffset", _movieTextureOffset); + mtrl.SetFloat("_colorBlendFactor", colorBlendFactor); + } + + public bool IsDepthValid() + { + if (!IsEnableDepth) + { + return false; + } + return IsValid(); + } + + public bool IsValid() + { + bool result = true; + switch (postFilmMode) + { + case PostFilmMode.Monochrome: + result = postFilmColor0.a > 0f; + break; + case PostFilmMode.None: + result = false; + break; + default: + result = postFilmPower > 0f; + break; + case PostFilmMode.Mul: + case PostFilmMode.VignetteLerp: + case PostFilmMode.VignetteMul: + break; + } + return result; + } + + public void Blit(RenderTexture source, RenderTexture destination, Material material, int pass) + { + if (inverseVignette) + { + pass++; + } + Update(material, source); + Vector4 value = new Vector4(postFilmOffsetParam.x, postFilmOffsetParam.y); + material.SetFloat("_PostFilmPower", postFilmPower); + material.SetFloat("_DepthPower", depthPower); + float value2 = ((!(DepthClip > 1.5f)) ? (1.5f - DepthClip) : 0f); + material.SetFloat("_DepthClip", value2); + material.SetVector("_PostFilmOffsetParam", value); + material.SetVector("_PostFilmOptionParam", postFilmOptionParam); + material.SetColor("_PostFilmColor0", postFilmColor0); + material.SetColor("_PostFilmColor1", postFilmColor1); + material.SetColor("_PostFilmColor2", postFilmColor2); + material.SetColor("_PostFilmColor3", postFilmColor3); + RollParameter.z = (float)source.width / (float)source.height; + material.SetVector("_PostFilmRollParameter", RollParameter); + material.SetVector("_PostFilmScaleParameter", ScaleParameter); + material.SetFloat("_PostFilmIsUVMovieNoScale", _isUVMovieNoScale ? 1f : 0f); + material.SetFloat("_PostFilmIsInverseVignette", inverseVignette ? 1f : 0f); + material.SetFloat("_PostFilmIsAlphaMasking", _isExistMovieMask ? 1f : 0f); + material.SetFloat("_PostFilmIsWithoutDepth", IsEnableDepth ? 0f : 1f); + Graphics.Blit(source, destination, material, pass); + } + } + + [SerializeField] + [Header("Screen Overlay - First layer")] + private Overlay _overlay1 = new Overlay(); + + [SerializeField] + [Header("Screen Overlay - Second layer")] + private Overlay _overlay2 = new Overlay(); + + [SerializeField] + [Header("Screen Overlay - Third layer")] + private Overlay _overlay3 = new Overlay(); + + public bool IsScreenOverlay = true; + + public Overlay Overlay1 => _overlay1; + + public Overlay Overlay2 => _overlay2; + + public Overlay Overlay3 => _overlay3; + + public bool IsEnable + { + get + { + if (!_overlay1.IsValid() && !_overlay2.IsValid()) + { + return _overlay3.IsValid(); + } + return true; + } + } + + public bool IsUseDepthTexture + { + get + { + if (!_overlay1.IsDepthValid() && !_overlay2.IsDepthValid()) + { + return _overlay3.IsDepthValid(); + } + return true; + } + } + + public void PostFilmBlit(RenderTexture source, RenderTexture destination, Material material, int defaultPass, int filmPass1st, int filmPass2nd) + { + if (material == null || !IsScreenOverlay) + { + Graphics.Blit(source, destination); + return; + } + bool num = Overlay1.IsValid(); + bool flag = Overlay2.IsValid(); + bool flag2 = Overlay3.IsValid(); + RenderTexture renderTexture = destination; + RenderTexture source2 = source; + if (flag || flag2) + { + renderTexture = RenderTexture.GetTemporary(source.width, source.height, source.depth); + } + if (num) + { + Overlay1.Blit(source2, renderTexture, material, filmPass1st); + } + else if (defaultPass >= 0) + { + Graphics.Blit(source2, renderTexture, material, defaultPass); + } + else + { + Graphics.Blit(source2, renderTexture); + } + source2 = renderTexture; + renderTexture = destination; + if (flag) + { + if (flag2) + { + renderTexture = RenderTexture.GetTemporary(source.width, source.height, source.depth); + } + Overlay2.Blit(source2, renderTexture, material, filmPass2nd); + if (source2 != source) + { + RenderTexture.ReleaseTemporary(source2); + source2 = renderTexture; + renderTexture = destination; + } + } + if (flag2) + { + Overlay3.Blit(source2, renderTexture, material, filmPass2nd); + if (source2 != source) + { + RenderTexture.ReleaseTemporary(source2); + source2 = renderTexture; + renderTexture = destination; + } + } + } + + public static void SetShaderVariantKeyword(List keywordList) + { + keywordList.AddRange(Overlay.SHADER_KEYWORD_MODE); + keywordList.AddRange(Overlay.SHADER_KEYWORD_BLEND); + } +} diff --git a/SVSim.BattleEngine/Engine/ClassBasicCardList.cs b/SVSim.BattleEngine/Engine/ClassBasicCardList.cs new file mode 100644 index 0000000..b2624fe --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassBasicCardList.cs @@ -0,0 +1,68 @@ +public class ClassBasicCardList +{ + private static int[] AllBasicCardList = new int[8] { 100011010, 100011020, 100011030, 100011040, 100011050, 100012010, 100031010, 100031020 }; + + private static int[] ElfBasicCardList = new int[11] + { + 100111010, 100111020, 100111030, 100111040, 100111050, 100111060, 100111070, 100114010, 100121010, 100121020, + 100121030 + }; + + private static int[] RoyalBasicCardList = new int[11] + { + 100211010, 100211020, 100211030, 100211040, 100211050, 100211060, 100214010, 100214020, 100221010, 100221020, + 100222010 + }; + + private static int[] WitchBasicCardList = new int[11] + { + 100311010, 100314010, 100314020, 100314030, 100314040, 100314050, 100314060, 100314070, 100321010, 100321020, + 100321030 + }; + + private static int[] DragonBasicCardList = new int[11] + { + 100411010, 100411020, 100411030, 100411040, 100411050, 100414010, 100414020, 100414030, 100421010, 100421020, + 100424010 + }; + + private static int[] NecroBasicCardList = new int[11] + { + 100511010, 100511020, 100511030, 100511040, 100511050, 100511060, 100514010, 100514020, 100521010, 100521020, + 100521030 + }; + + private static int[] VampireBasicCardList = new int[11] + { + 100611010, 100611020, 100611030, 100611040, 100611050, 100614010, 100614020, 100614030, 100621010, 100621020, + 100624010 + }; + + private static int[] BishopBasicCardList = new int[11] + { + 100711010, 100711020, 100713010, 100713020, 100713030, 100714010, 100714020, 100714030, 100721010, 100721020, + 100723010 + }; + + private static int[] NemesisBasicCardList = new int[11] + { + 100811010, 100811020, 100811030, 100811040, 100811050, 100811060, 100811070, 100814010, 100821010, 100821020, + 100824010 + }; + + public static int[] GetRandomBasicCardId(CardBasePrm.ClanType classType) + { + return classType switch + { + CardBasePrm.ClanType.MIN => ElfBasicCardList, + CardBasePrm.ClanType.ROYAL => RoyalBasicCardList, + CardBasePrm.ClanType.WITCH => WitchBasicCardList, + CardBasePrm.ClanType.DRAGON => DragonBasicCardList, + CardBasePrm.ClanType.NECRO => NecroBasicCardList, + CardBasePrm.ClanType.VAMPIRE => VampireBasicCardList, + CardBasePrm.ClanType.BISHOP => BishopBasicCardList, + CardBasePrm.ClanType.NEMESIS => NemesisBasicCardList, + _ => AllBasicCardList, + }; + } +} diff --git a/SVSim.BattleEngine/Engine/ClassBattleCardBase.cs b/SVSim.BattleEngine/Engine/ClassBattleCardBase.cs new file mode 100644 index 0000000..125a3ca --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassBattleCardBase.cs @@ -0,0 +1,387 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.Card; +using Wizard.Battle.Card.InnerOptions; +using Wizard.Battle.Resource; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public abstract class ClassBattleCardBase : BattleCardBase +{ + public class ClassBuildInfo + { + public int charaId; + + public bool isPlayer; + + public int life; + + public BattlePlayerBase selfBattlePlayer; + + public BattlePlayerBase opponentBattlePlayer; + + public BattleManagerBase battleMgr; + + public IBattleResourceMgr resourceMgr; + + public ClassBuildInfo(bool _isPlayer, int _life, BattlePlayerBase _selfBattlePlayer, BattlePlayerBase _opponentBattlePlayer, BattleManagerBase _battleMgr, IBattleResourceMgr _resourceMgr) + { + isPlayer = _isPlayer; + life = _life; + selfBattlePlayer = _selfBattlePlayer; + opponentBattlePlayer = _opponentBattlePlayer; + battleMgr = _battleMgr; + resourceMgr = _resourceMgr; + } + + public ClassBuildInfo VirtualClone(BattlePlayerBase virtualSelfBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer) + { + return new ClassBuildInfo(isPlayer, life, virtualSelfBattlePlayer, virtualOpponentBattlePlayer, battleMgr, resourceMgr); + } + } + + protected readonly ClassBuildInfo _classBuildInfo; + + private readonly ClassBattleCardViewBase _classCardView; + + protected int _baseMaxLife; + + public int BossRushStartLife; + + private static SkillCreator.CardSkillsBuildInfo _sharedEmptySkillInfo; + + public override int BaseMaxLife => _baseMaxLife; + + public override bool IsDead + { + get + { + if (base.IsDead) + { + return true; + } + if (base.SelfBattlePlayer.IsShortageDeck && !base.SelfBattlePlayer.IsShortageDeckWin) + { + return true; + } + if (base.OpponentBattlePlayer.IsShortageDeck && base.OpponentBattlePlayer.IsShortageDeckWin) + { + return true; + } + return false; + } + } + + public override bool IsLifeZeroDead + { + get + { + if (base.Life <= 0) + { + return !base.SkillApplyInformation.IsLifeZeroActivateLeonSkill; + } + return false; + } + } + + public int CharaId + { + get + { + if (!_classBuildInfo.isPlayer) + { + return GameMgr.GetIns().GetDataMgr().GetEnemyCharaId(); + } + return GameMgr.GetIns().GetDataMgr().GetPlayerCharaId(); + } + } + + public override bool Attackable => false; + + public override bool IsClass => true; + + public override bool IsOnDraw => false; + + public override bool IsCantAttackClass => base.SkillApplyInformation.IsSkillCantAtkClass; + + public IClassBattleCardView ClassBattleCardView { get; private set; } + + public event Action OnDamageDestroy; + + public event Action OnForceBerserkChange; + + public event Func OnBerserkCheck; + + public event Action OnForceAvariceChange; + + public event Func OnAvariceCheck; + + public event Action OnForceWrathChange; + + public event Func OnWrathCheck; + + public event Func OnRetire; + + public VfxBase GetOnBerserkCheck(bool flg) + { + return this.OnBerserkCheck.GetAllFuncVfxResults(flg); + } + + public void CallOnForceBerserkChange(int num) + { + this.OnForceBerserkChange.Call(base.SelfBattlePlayer, num); + } + + public VfxBase GetOnAvariceCheck(bool flag) + { + return this.OnAvariceCheck.GetAllFuncVfxResults(flag); + } + + public void CallOnForceAvariceChange(int number) + { + this.OnForceAvariceChange.Call(base.SelfBattlePlayer, number); + } + + public VfxBase GetOnWrathCheck(bool flag) + { + return this.OnWrathCheck.GetAllFuncVfxResults(flag); + } + + public void CallOnForceWrathChange(int number) + { + this.OnForceWrathChange.Call(base.SelfBattlePlayer, number); + } + + protected ClassBattleCardBase(ClassBuildInfo classBuildInfo) + : base(CreateBaseBuildInfo(classBuildInfo)) + { + _classBuildInfo = classBuildInfo; + } + + public override void Setup(bool createNullView = false, bool isRecreate = false) + { + base.Setup(); + _CacheBattlePlayer(); + ClassBattleCardView = (IClassBattleCardView)base.BattleCardView; + } + + public void InitBaseMaxLife(int baseMaxLife) + { + _baseMaxLife = baseMaxLife; + } + + protected virtual void _CacheBattlePlayer() + { + base.SelfBattlePlayer = (base.IsPlayer ? ((BattlePlayerBase)_classBuildInfo.battleMgr.BattlePlayer) : ((BattlePlayerBase)_classBuildInfo.battleMgr.BattleEnemy)); + base.OpponentBattlePlayer = ((!base.IsPlayer) ? ((BattlePlayerBase)_classBuildInfo.battleMgr.BattlePlayer) : ((BattlePlayerBase)_classBuildInfo.battleMgr.BattleEnemy)); + } + + public override DamageResult ApplyDamage(SkillBase skill, DamageParam damageParam, bool doesAttackerPossessKiller, bool isReflectedDamage, SkillProcessor skillProcessor, BattleCardBase reflectCard) + { + int damage = damageParam.Damage; + bool isSkillDamage = skill != null; + bool isSpellDamage = skill?.SkillPrm.ownerCard.IsSpell ?? false; + BattleCardBase damageReflectionTarget = GetDamageReflectionTarget(isSkillDamage); + if (damageReflectionTarget != this) + { + return damageReflectionTarget.ApplyDamage(skill, damageParam, doesAttackerPossessKiller: false, isReflectedDamage: true, skillProcessor, this); + } + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + damageParam.Damage = CalculateFinalDamageAmount(damageParam.Damage, isSkillDamage, isSpellDamage, parallelVfxPlayer); + int damage2 = damageParam.Damage; + new SkillConditionCheckerOption + { + DefaultDamage = new DamageInfo(skill, damage), + FixedDamage = new DamageInfo(skill, damage2) + }; + BattleManagerBase ins = BattleManagerBase.GetIns(); + base.SkillApplyInformation.DamageLife(damageParam.Damage, ins.CurrentTurn, ins.BattlePlayer.IsSelfTurn); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(ParallelVfxPlayer.Create(CreateVfxWithCardPlayabilityRefresh(base.VfxCreator.CreateDamage(damageParam.Damage, base.Life, base.MaxLife, BaseMaxLife, isReflectedDamage, isSkillDamage)), parallelVfxPlayer)); + SequentialVfxPlayer sequentialVfxPlayer2 = SequentialVfxPlayer.Create(); + if (IsDead) + { + sequentialVfxPlayer2.Register(CreatePullHandInVfx()); + this.OnDamageDestroy.Call(); + } + base.SelfBattlePlayer.BattleMgr.VfxMgr.RegisterImmediateVfx(this.OnBerserkCheck.GetAllFuncVfxResults(arg1: false)); + skillProcessor?.Register(base.Skills.CreateWhenDamageInfo(skill, skillProcessor, new BattlePlayerReadOnlyInfoPair(base.SelfBattlePlayer, base.OpponentBattlePlayer), damage, damageParam.Damage)); + sequentialVfxPlayer.Register(base.ApplyDamage(skill, damageParam, doesAttackerPossessKiller, isReflectedDamage, skillProcessor, reflectCard).Vfx); + sequentialVfxPlayer.Register(base.SelfBattlePlayer.StartSkillWhenChangeClassLife(skillProcessor)); + return new DamageResult(sequentialVfxPlayer, damageParam.Damage, damage2, sequentialVfxPlayer2, null, isReflectedDamage); + } + + public override HealResult ApplyHealing(HealParam healParam, SkillProcessor skillProcessor) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + int num = HealLife(healParam.HealAmount, ins.CurrentTurn, ins.BattlePlayer.IsSelfTurn); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(CreateVfxWithCardPlayabilityRefresh(base.VfxCreator.CreateHealing(num, base.Life, base.MaxLife, BaseMaxLife))); + new SkillConditionCheckerOption().HealingCardAndValue = new List + { + new BattlePlayerBase.CardAndValue(this, num) + }; + base.SelfBattlePlayer.BattleMgr.VfxMgr.RegisterImmediateVfx(this.OnBerserkCheck.GetAllFuncVfxResults(arg1: false)); + if (skillProcessor != null) + { + sequentialVfxPlayer.Register(base.SelfBattlePlayer.StartSkillWhenChangeClassLife(skillProcessor)); + } + return new HealResult(num, sequentialVfxPlayer, CreatePullHandInVfx()); + } + + private VfxBase CreatePullHandInVfx() + { + return base.SelfBattlePlayer.BattleView.HandView.HandUnfocus(); + } + + private VfxBase CreatePullHandOutVfx() + { + if (base.IsSelfTurn) + { + return base.SelfBattlePlayer.BattleView.HandView.HandFocus(); + } + return NullVfx.GetInstance(); + } + + public VfxBase DestroyBySpecialWin() + { + return ((ClassCardVfxCreatorBase)base.VfxCreator).CreateDestroy(base.DeathTypeInfo, base.SelfBattlePlayer); + } + + public VfxBase Retire() + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(this.OnRetire.GetAllFuncVfxResults(this, new SkillProcessor())); + sequentialVfxPlayer.Register(((ClassCardVfxCreatorBase)base.VfxCreator).CreateRetire(base.SelfBattlePlayer)); + return sequentialVfxPlayer; + } + + public VfxBase LifeZeroActivateLeonSkill() + { + if (base.IsDestroyedBySkill || base.SelfBattlePlayer.IsShortageDeck || base.OpponentBattlePlayer.Class.IsDead || (base.OpponentBattlePlayer.IsShortageDeck && base.OpponentBattlePlayer.IsShortageDeckWin)) + { + base.SkillApplyInformation.DepriveLifeZeroActivateLeonSkill(); + return NullVfx.GetInstance(); + } + int num = 10; + int cardId = 104741020; + string fileName = "stt_quest_leon_1"; + string criSeName = "se_stt_quest_leon_1"; + float waitTime = 0.6f; + string fileName2 = "stt_quest_leon_2"; + string criSeName2 = "se_stt_quest_leon_2"; + float waitTime2 = 0.5f; + float num2 = 2f; + float num3 = 3.5f; + float waitTime3 = 0f; + float waitTime4 = 1.5f; + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + ParallelVfxPlayer parallelVfxPlayer2 = ParallelVfxPlayer.Create(); + List list = new List(); + list.AddRange(base.SelfBattlePlayer.InPlayCards); + list.AddRange(base.OpponentBattlePlayer.InPlayCards); + VfxBase vfxBase = null; + vfxBase = ((!base.OpponentBattlePlayer.IsSelfTurn) ? WaitVfx.Create(waitTime3) : WaitVfx.Create(waitTime4)); + parallelVfxPlayer.Register(SequentialVfxPlayer.Create(vfxBase, base.SelfBattlePlayer.Emotion.PlayEmotion(ClassCharaPrm.EmotionType.PROVOCATION, 0f))); + sequentialVfxPlayer.Register(WaitVfx.Create(base.OpponentBattlePlayer.IsSelfTurn ? num3 : num2)); + MaxLifeSetModifier lifeModifier = new MaxLifeSetModifier(num); + sequentialVfxPlayer.Register(base.SkillApplyInformation.GiveCombatValueModifier(null, lifeModifier, new SkillProcessor())); + int num4 = ((base.Life < 0) ? (base.Life * -1) : 0); + if (num4 != 0) + { + HealLife(num4, base.SelfBattlePlayer.Turn, base.SelfBattlePlayer.IsSelfTurn); + } + sequentialVfxPlayer.Register(new LoadAndPlayEffectVfx(fileName, criSeName, base.SelfBattlePlayer.BattleMgr.IsRecovery ? null : base.BattleCardView.Transform, waitTime)); + HealParam healParam = new HealParam(num, this, this, applyModifier: false); + HealResult healResult = ApplyHealing(healParam, new SkillProcessor()); + sequentialVfxPlayer.Register(healResult.PrehealVfxVfx); + sequentialVfxPlayer.Register(healResult.HealVfx); + sequentialVfxPlayer.Register(healResult.PosthealVfxVfx); + base.SkillApplyInformation.DepriveLifeZeroActivateLeonSkill(); + sequentialVfxPlayer.Register(new LoadAndPlayEffectVfx(fileName2, criSeName2, Vector3.zero, waitTime2)); + for (int i = 0; i < list.Count; i++) + { + if (list[i].SkillApplyInformation.IsIndependent) + { + sequentialVfxPlayer.Register(new OneShotHeavenlyAegisPlayVfx(list[i].BattleCardView)); + continue; + } + list[i].FlagCardAsDestroyedBySkill(); + parallelVfxPlayer2.Register(list[i].SelfBattlePlayer.CardManagement(list[i], new SkillProcessor(), BattlePlayerBase.CARD_MANAGEMENT.BANISH, isRandom: false)); + } + sequentialVfxPlayer.Register(parallelVfxPlayer2); + SkillBaseSummon.SummonedCardsList summonedCardsList = new SkillBaseSummon.SummonedCardsList(); + summonedCardsList.AddCardToSummonedCards(base.SelfBattlePlayer.CreateNextIndexCard(cardId)); + BattlePlayerBase.SummonInfo summonInfo = new BattlePlayerBase.SummonInfo(base.SelfBattlePlayer.IsPlayer, summonedCardsList, SkillBaseSummon.SUMMON_TYPE.TOKEN); + VfxWithLoadingSequential vfxWithLoadingToRegister = base.SelfBattlePlayer.CardManagement(null, new SkillProcessor(), BattlePlayerBase.CARD_MANAGEMENT.SUMMON, isRandom: false, null, null, null, summonInfo) as VfxWithLoadingSequential; + base.SelfBattlePlayer.UpdateHandCardsPlayability(); + StartPickMultiCardVfx vfxToRegister = new StartPickMultiCardVfx(summonedCardsList, BattleManagerBase.GetIns().BattleResourceMgr, base.SelfBattlePlayer.IsPlayer, isToken: true, isIgnoreVoice: false, isRandomVoice: false, isGetoff: false, isEvoVoice: false, 0f); + if (!base.SelfBattlePlayer.BattleMgr.IsVirtualBattle) + { + BattleLogManager.GetInstance().BeginLogBlockTurnChangeReactive(); + BattleLogManager.GetInstance().AddLogSkillBuffSetLife(this, Wizard.Battle.UI.LogType.WhenDestroy, new List { this }, num, isTargetInOpponentHand: false); + BattleLogManager.GetInstance().AddLogSkillHeal(new List { this }, new List { healResult }); + BattleLogManager.GetInstance().AddLogSkillDeath(list.Where((BattleCardBase c) => !c.SkillApplyInformation.IsIndependent).ToList()); + BattleLogManager.GetInstance().AddLogSkillSummon(summonedCardsList.summonedCards.ToList()); + BattleLogManager.GetInstance().EndLogBlockTurnChangeReactive(); + } + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + vfxWithLoadingSequential.RegisterToMainVfx(vfxToRegister); + vfxWithLoadingSequential.RegisterVfxWithLoading(vfxWithLoadingToRegister); + sequentialVfxPlayer.Register(vfxWithLoadingSequential); + parallelVfxPlayer.Register(sequentialVfxPlayer); + return parallelVfxPlayer; + } + + public override VfxBase LoadResource(bool isLogging = false) + { + return ClassBattleCardView.LoadResource(); + } + + public override VfxBase UnloadResource() + { + return ClassBattleCardView.UnloadResource(); + } + + public override VfxBase RecoveryInPlay(int inPlayIndex, bool newReplayMoveTurn = false) + { + return SequentialVfxPlayer.Create(base.BattleCardView.RecoveryInPlay(), new RefreshHealthVfx(base.SelfBattlePlayer)); + } + + public override BattleCardBase VirtualClone(BattlePlayerBase virtualSelfBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer) + { + VirtualClassBattleCard virtualClassBattleCard = new VirtualClassBattleCard(_classBuildInfo.VirtualClone(virtualSelfBattlePlayer, virtualOpponentBattlePlayer)); + virtualClassBattleCard.InitBaseMaxLife(BaseMaxLife); + CopyToVirtualCardBase(virtualClassBattleCard); + return virtualClassBattleCard; + } + + public void ClearSpineObject() + { + if (ClassBattleCardView != null) + { + ClassBattleCardView.ClearSpineObject(); + } + } + + private static BuildInfo CreateBaseBuildInfo(ClassBuildInfo classBuildInfo) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(0); + if (_sharedEmptySkillInfo == null) + { + _sharedEmptySkillInfo = SkillCreator.CreateBuildInfo(cardParameterFromId); + } + return new BuildInfo(null, 0, classBuildInfo.selfBattlePlayer, classBuildInfo.opponentBattlePlayer, classBuildInfo.selfBattlePlayer, _isPlayer: classBuildInfo.isPlayer, _innerOptions: new CardInnerOptionsBase(), _normalSkillBuildInfos: _sharedEmptySkillInfo.normalSkillBuildInfos, _evolveSkillBuildInfos: _sharedEmptySkillInfo.evolveSkillBuildInfos, _battleCardIndex: 0, _battleMgr: classBuildInfo.battleMgr, _resourceMgr: classBuildInfo.resourceMgr); + } + + protected override ISkillApplyInformation CreateSkillApplyInformation(BattleCardBase card, ICardVfxCreator vfxCreator) + { + return new ClassSkillApplyInformation(card, vfxCreator); + } +} diff --git a/SVSim.BattleEngine/Engine/ClassCardCreator.cs b/SVSim.BattleEngine/Engine/ClassCardCreator.cs new file mode 100644 index 0000000..811e24b --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassCardCreator.cs @@ -0,0 +1,9 @@ +using UnityEngine; + +public class ClassCardCreator : CardCreatorBase +{ + public ClassCardCreator(GameObject rootObject) + : base(rootObject) + { + } +} diff --git a/SVSim.BattleEngine/Engine/ClassCharaExp.cs b/SVSim.BattleEngine/Engine/ClassCharaExp.cs new file mode 100644 index 0000000..ae1cd10 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassCharaExp.cs @@ -0,0 +1,8 @@ +public class ClassCharaExp : HeaderData +{ + public int level; + + public int necessary_exp; + + public int accumulate_exp; +} diff --git a/SVSim.BattleEngine/Engine/ClassCharaPrm.cs b/SVSim.BattleEngine/Engine/ClassCharaPrm.cs new file mode 100644 index 0000000..913f624 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassCharaPrm.cs @@ -0,0 +1,332 @@ +using System.Collections.Generic; +using Cute; +using LitJson; +using UnityEngine; +using Wizard; + +public class ClassCharaPrm +{ + public enum MotionType + { + idle = 1, + positive, + negative, + extra, + damage, + think, + greet, + shock, + positive_2, + negative_2, + extra_2, + extra_3, + negative_2_a, + damege_a, + extra_1_a, + extra_1_b, + extra_1_c, + extra_2_a, + extra_2_b, + extra_2_c, + z_extra_2, + z_damage, + z_greet, + z_idle, + z_negative, + z_negative_2, + z_negative_2_a, + z_positive, + z_positive_2, + z_shock, + z_think + } + + public enum FaceType + { + skin_01 = 1, + skin_02, + skin_03, + skin_04, + skin_05, + skin_06, + skin_07, + skin_08, + skin_09, + skin_10 + } + + public enum EmotionType + { + NULL, + GREET, + THANK, + APOLOGY, + PRAISE, + SURPRISE, + CONFUSE, + WORRY, + PROVOCATION, + EXTRA1, + EXTRA2, + EXTRA3, + BATTLESTART_DIFF, + BATTLESTART_SAME, + WIN, + LOSE, + SURRENDER_LOSE, + EVOLUTION_1, + EVOLUTION_2, + EVOLUTION_3, + DAMAGE_S_1, + DAMAGE_S_2, + DAMAGE_S_3, + DAMAGE_L_1, + DAMAGE_L_2, + IDLE_1, + IDLE_2, + IDLE_3, + SELECT, + STORY_LOSE, + LEADER_SELECT, + NEGOTIATION_1, + NEGOTIATION_2, + NEGOTIATION_3, + PLAYER_TURN_START_1 + } + + private static readonly Dictionary OUTLINE_COLOR = new Dictionary + { + { + CardBasePrm.ClanType.MIN, + eColorCodeId.CLASS_ELF_OUTLINE + }, + { + CardBasePrm.ClanType.ROYAL, + eColorCodeId.CLASS_ROYAL_OUTLINE + }, + { + CardBasePrm.ClanType.WITCH, + eColorCodeId.CLASS_WITCH_OUTLINE + }, + { + CardBasePrm.ClanType.DRAGON, + eColorCodeId.CLASS_DRAGON_OUTLINE + }, + { + CardBasePrm.ClanType.NECRO, + eColorCodeId.CLASS_NECROMANCER_OUTLINE + }, + { + CardBasePrm.ClanType.VAMPIRE, + eColorCodeId.CLASS_VANPIRE_OUTLINE + }, + { + CardBasePrm.ClanType.BISHOP, + eColorCodeId.CLASS_BISHOP_OUTLINE + }, + { + CardBasePrm.ClanType.NEMESIS, + eColorCodeId.CLASS_NEMESIS_OUTLINE + }, + { + CardBasePrm.ClanType.SHADOW, + eColorCodeId.CLASS_SHADOW_OUTLINE + } + }; + + private int _defaultCharaId; + + private int _currentCharaId; + + private int ClassCharaLv; + + private int ClassCharaExp; + + private int ClassCharaBattleCount; + + private int ClassCharaWin; + + public ClassCharacterMasterData DefaultCharaData => GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(_defaultCharaId); + + public ClassCharacterMasterData CurrentCharaData + { + get + { + ClassCharacterMasterData classCharacterMasterData = GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(_currentCharaId); + if (classCharacterMasterData == null) + { + classCharacterMasterData = DefaultCharaData; + } + return classCharacterMasterData; + } + } + + public bool IsRandomLeaderSkin { get; set; } + + public List LeaderSkinIdList { get; private set; } = new List(); + + public string EmoteNameGreet { get; set; } + + public string TextIdGreet { get; set; } + + public string VoiceIdGreet { get; set; } + + public string EmoteNameThank { get; set; } + + public string TextIdThank { get; set; } + + public string VoiceIdThank { get; set; } + + public string EmoteNameApology { get; set; } + + public string TextIdApology { get; set; } + + public string VoiceIdApology { get; set; } + + public string EmoteNamePraise { get; set; } + + public string TextIdPraise { get; set; } + + public string VoiceIdPraise { get; set; } + + public string EmoteNameSurprise { get; set; } + + public string TextIdSurprise { get; set; } + + public string VoiceIdSurprise { get; set; } + + public string EmoteNameConfuse { get; set; } + + public string TextIdConfuse { get; set; } + + public string VoiceIdConfuse { get; set; } + + public string EmoteNameWorry { get; set; } + + public string TextIdWorry { get; set; } + + public string VoiceIdWorry { get; set; } + + public string EmoteNameProvocation { get; set; } + + public string TextIdProvocation { get; set; } + + public string VoiceIdProvocation { get; set; } + + public void SetDefaultCharaId(int charaId) + { + _defaultCharaId = charaId; + } + + public void SetCurrentCharaId(int charaId) + { + _currentCharaId = charaId; + } + + public void SetClassCharaLv(int classlv) + { + ClassCharaLv = classlv; + } + + public void SetClassCharaExp(int classexp) + { + ClassCharaExp = classexp; + } + + public void SetClassCharaBattleCount(int classbattlecnt) + { + ClassCharaBattleCount = classbattlecnt; + } + + public void AddClassCharaBattleCount() + { + ClassCharaBattleCount++; + } + + public void SetClassCharaWin(int classwin) + { + ClassCharaWin = classwin; + } + + public void AddClassCharaWin() + { + ClassCharaWin++; + } + + public void SetLeaderRandomSkinIdList(JsonData skinIdList) + { + LeaderSkinIdList.Clear(); + for (int i = 0; i < skinIdList.Count; i++) + { + LeaderSkinIdList.Add(skinIdList[i].ToInt()); + } + } + + public int GetClassCharaLv() + { + return ClassCharaLv; + } + + public int GetClassCharaExp() + { + return ClassCharaExp; + } + + public int GetClassCharaBattleCount() + { + return ClassCharaBattleCount; + } + + public int GetClassCharaWin() + { + return ClassCharaWin; + } + + public static Texture GetClassIconTexture(int clan_id) + { + return Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("class_card_" + clan_id.ToString("00"), ResourcesManager.AssetLoadPathType.CardFrameClassIcon, isfetch: true)) as Texture; + } + + public static bool IsEvolutionEmotionType(EmotionType type) + { + if ((uint)(type - 17) <= 2u) + { + return true; + } + return false; + } + + public static string GetIconSpriteName(CardBasePrm.ClanType inClassId) + { + int num = (int)inClassId; + return "icon_class_color_" + num.ToString("00"); + } + + public static string GetLargeIconSpriteName(CardBasePrm.ClanType inClassId) + { + int num = (int)inClassId; + return "icon_class_color_large_" + num.ToString("00"); + } + + public static string GetNameText(CardBasePrm.ClanType inClassId) + { + return Data.SystemText.Get("Common_" + ((int)(104 + inClassId)).ToString("0000")); + } + + public static void SetClassLabelSetting(UILabel inLabel, CardBasePrm.ClanType inClassId) + { + inLabel.effectStyle = LabelDefine.OUTLINE_STYLE_CLASS_NAME; + inLabel.effectDistance = LabelDefine.OUTLINE_DISTANCE_CLASS_NAME; + inLabel.effectColor = ColorCode.Get(OUTLINE_COLOR[inClassId]); + } + + public void SetParamWithUserClassJson(JsonData classJson) + { + IsRandomLeaderSkin = classJson["is_random_leader_skin"].ToBoolean(); + SetClassCharaLv(classJson["level"].ToInt()); + SetClassCharaExp(classJson["exp"].ToInt()); + SetCurrentCharaId(classJson["leader_skin_id"].ToInt()); + SetDefaultCharaId(classJson["default_leader_skin_id"].ToInt()); + SetLeaderRandomSkinIdList(classJson["leader_skin_id_list"]); + } +} diff --git a/SVSim.BattleEngine/Engine/ClassInformationUIController.cs b/SVSim.BattleEngine/Engine/ClassInformationUIController.cs new file mode 100644 index 0000000..b07d341 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassInformationUIController.cs @@ -0,0 +1,226 @@ +using System.Collections.Generic; +using UnityEngine; +using Wizard.Battle.UI; +using Wizard.Battle.View.Vfx; + +public class ClassInformationUIController +{ + private List _classInformationUIList; + + public ClassInformationUIController(List classInformationUIList) + { + _classInformationUIList = classInformationUIList; + } + + public void SetUpEvent(BattlePlayerBase player) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].SetUpEvent(player); + } + } + } + + public VfxBase LoadResources(Transform parent, bool isPlayer) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + for (int i = 0; i < _classInformationUIList.Count; i++) + { + parallelVfxPlayer.Register(_classInformationUIList[i].LoadResources(parent, isPlayer)); + } + return parallelVfxPlayer; + } + + public void ShowInfomation(bool playEffect = true) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].ShowInfomation(playEffect); + } + } + } + + public void NewReplayUpdateInfomation(NetworkBattleReceiver.ClassInfoUiInfo classInfo) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].NewReplayUpdateInfomation(classInfo); + } + } + } + + public bool HaveSpecificClassInformationUi(CardBasePrm.ClanType clanType) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + switch (clanType) + { + case CardBasePrm.ClanType.MIN: + if (_classInformationUIList[i] is ElfInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.ROYAL: + if (_classInformationUIList[i] is RoyalInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.WITCH: + if (_classInformationUIList[i] is WitchInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.DRAGON: + if (_classInformationUIList[i] is DragonInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.NECRO: + if (_classInformationUIList[i] is NecromanceInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.VAMPIRE: + if (_classInformationUIList[i] is VampireInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.BISHOP: + if (_classInformationUIList[i] is BishopInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.NEMESIS: + if (_classInformationUIList[i] is NemesisInfomationUI) + { + return true; + } + break; + } + } + return false; + } + + public void HideInfomation() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].HideInfomation(); + } + } + } + + public void HideOtherInfomation() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].HideOtherInfomation(); + } + } + } + + public void HideAllInfomation() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].HideAllInfomation(); + } + } + } + + public void Recovery() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].Recovery(); + } + } + } + + public void SetIsSelect(bool isSelect) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].SetIsSelect(isSelect); + } + } + } + + public void SetInCardFocus(bool inCardFocus) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].SetInCardFocus(inCardFocus); + } + } + } + + public void SetTouchable(bool isTouchable) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].SetTouchable(isTouchable); + } + } + } + + public void SetClassInformationUiPosition(bool isPlayer) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + (_classInformationUIList[i] as ClassInfomationUIBase).SetClassInformationUiPosition(isPlayer); + } + } + } + + public void UpdateStatusPanelOnBattle(bool isPlayer) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + (_classInformationUIList[i] as ClassInfomationUIBase).UpdateStatusPanelOnBattle(isPlayer); + } + } + } + + public void UpdateInfomation() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + (_classInformationUIList[i] as ClassInfomationUIBase).UpdateInfomation(); + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/ClassSkillApplyInformation.cs b/SVSim.BattleEngine/Engine/ClassSkillApplyInformation.cs new file mode 100644 index 0000000..e7fb030 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassSkillApplyInformation.cs @@ -0,0 +1,478 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Wizard.Battle.View.Vfx; + +public class ClassSkillApplyInformation : SkillApplyInformation +{ + public class LifeInfomation + { + public int Life { get; private set; } + + public int MaxLife { get; private set; } + + public int BeforeLife { get; private set; } + + public int BeforeMaxLife { get; private set; } + + public LifeInfomation(int life, int maxLife, int beforeLife, int beforeMaxLife) + { + Life = life; + MaxLife = maxLife; + BeforeLife = beforeLife; + BeforeMaxLife = beforeMaxLife; + } + } + + public class PpModifyInformation + { + public int AddPpValue { get; private set; } + + public PpModifyInformation(int addPpValue) + { + AddPpValue = addPpValue; + } + } + + public event Action OnLifeChange; + + public event Action OnPpChange; + + public ClassSkillApplyInformation(BattleCardBase card, ICardVfxCreator vfxCreator) + : base(card, vfxCreator) + { + } + + public override void DamageLife(int damage, int turn, bool isSelfTurn) + { + int life = _card.Life; + int maxLife = _card.MaxLife; + base.DamageLife(damage, turn, isSelfTurn); + if (this.OnLifeChange != null) + { + this.OnLifeChange(RegisterActionBase.ActionBaseParameter.damage, new LifeInfomation(_card.Life, _card.MaxLife, life, maxLife)); + } + } + + public override void HealLife(int healAmount, int turn, bool isSelfTurn) + { + int life = _card.Life; + int maxLife = _card.MaxLife; + base.HealLife(healAmount, turn, isSelfTurn); + if (this.OnLifeChange != null) + { + this.OnLifeChange(RegisterActionBase.ActionBaseParameter.heal, new LifeInfomation(_card.Life, _card.MaxLife, life, maxLife)); + } + } + + public override void AddPp(int addPp, int currentTurn, bool isSelfTurn) + { + base.AddPp(addPp, currentTurn, isSelfTurn); + if (this.OnPpChange != null) + { + this.OnPpChange(RegisterActionBase.ActionBaseParameter.addPP, new PpModifyInformation(addPp)); + } + } + + public override VfxBase GiveForceBerserk(SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + VfxBase vfx = SetForceBerserkCount(base.ForceBerserkCount + 1, skillProcessor); + sequentialVfxPlayer.Register(((ClassBattleCardBase)_card).GetOnBerserkCheck(base.ForceBerserkCount == 1 && _card.Life > 10)); + sequentialVfxPlayer.Register(vfx); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return sequentialVfxPlayer; + } + + public override VfxBase DepriveForceBerserk(SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(SetForceBerserkCount(base.ForceBerserkCount - 1, skillProcessor)); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(((ClassBattleCardBase)_card).GetOnBerserkCheck(flg: false), NullVfx.GetInstance(), InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return sequentialVfxPlayer; + } + + public override VfxBase ForceDepriveForceBerserk(SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(SetForceBerserkCount(0, skillProcessor)); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(((ClassBattleCardBase)_card).GetOnBerserkCheck(flg: false), NullVfx.GetInstance(), InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return sequentialVfxPlayer; + } + + private VfxBase SetForceBerserkCount(int count, SkillProcessor skillProcessor) + { + base.ForceBerserkCount = count; + base.IsForceBerserk = base.ForceBerserkCount > 0; + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (skillProcessor != null) + { + sequentialVfxPlayer.Register(base.Player.StartSkillWhenChangeClassLife(skillProcessor)); + } + ((ClassBattleCardBase)_card).CallOnForceBerserkChange(base.ForceBerserkCount); + return sequentialVfxPlayer; + } + + public override VfxBase GiveForceAvarice(SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + SetForceAvariceCount(base.ForceAvariceCount + 1); + sequentialVfxPlayer.Register(((ClassBattleCardBase)_card).GetOnAvariceCheck(base.ForceAvariceCount == 1 && base.Player.TurnDrawCards.Count() > 2)); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return sequentialVfxPlayer; + } + + public override VfxBase DepriveForceAvarice() + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + SetForceAvariceCount(base.ForceAvariceCount - 1); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(((ClassBattleCardBase)_card).GetOnAvariceCheck(flag: false), NullVfx.GetInstance(), InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return result; + } + + public override VfxBase ForceDepriveForceAvarice() + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + SetForceAvariceCount(0); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(((ClassBattleCardBase)_card).GetOnAvariceCheck(flag: false), NullVfx.GetInstance(), InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return result; + } + + private void SetForceAvariceCount(int count) + { + base.ForceAvariceCount = count; + base.IsForceAvarice = base.ForceAvariceCount > 0; + ((ClassBattleCardBase)_card).CallOnForceAvariceChange(base.ForceAvariceCount); + } + + public override VfxBase GiveForceWrath(SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + SetForceWrathCount(base.ForceWrathCount + 1); + sequentialVfxPlayer.Register(((ClassBattleCardBase)_card).GetOnWrathCheck(base.ForceWrathCount == 1 && base.Player.SkillInfoClass.DamagedCounter.GetDamageCount(selfTurn: true) > 7)); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return sequentialVfxPlayer; + } + + public override VfxBase DepriveForceWrath() + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + SetForceWrathCount(base.ForceWrathCount - 1); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(((ClassBattleCardBase)_card).GetOnWrathCheck(flag: false), NullVfx.GetInstance(), InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return result; + } + + public override VfxBase ForceDepriveForceWrath() + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + SetForceWrathCount(0); + base.Player.BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(((ClassBattleCardBase)_card).GetOnWrathCheck(flag: false), NullVfx.GetInstance(), InstantVfx.Create(delegate + { + base.Player.UpdateHandCardsPlayability(); + }))); + return result; + } + + private void SetForceWrathCount(int count) + { + base.ForceWrathCount = count; + base.IsForceWrath = base.ForceWrathCount > 0; + ((ClassBattleCardBase)_card).CallOnForceWrathChange(base.ForceWrathCount); + } + + public override VfxBase GiveCantActivateFanfare(string type) + { + if (type == "unit") + { + base.CantActivateFanfareUnitCount++; + } + else if (type == "field") + { + base.CantActivateFanfareFieldCount++; + } + else + { + base.CantActivateFanfareUnitCount++; + base.CantActivateFanfareFieldCount++; + } + base.IsCantActivateFanfareUnit = base.CantActivateFanfareUnitCount > 0; + base.IsCantActivateFanfareField = base.CantActivateFanfareFieldCount > 0; + return NullVfx.GetInstance(); + } + + public override VfxBase SetCantActivateFanfareCount(int count) + { + base.CantActivateFanfareUnitCount = count; + base.CantActivateFanfareFieldCount = count; + base.IsCantActivateFanfareUnit = base.CantActivateFanfareUnitCount > 0; + base.IsCantActivateFanfareField = base.CantActivateFanfareFieldCount > 0; + return NullVfx.GetInstance(); + } + + public override VfxBase DepriveCantActivateFanfare(string type) + { + if (type == "unit") + { + base.CantActivateFanfareUnitCount--; + } + else if (type == "field") + { + base.CantActivateFanfareFieldCount--; + } + else + { + base.CantActivateFanfareUnitCount--; + base.CantActivateFanfareFieldCount--; + } + base.IsCantActivateFanfareUnit = base.CantActivateFanfareUnitCount > 0; + base.IsCantActivateFanfareField = base.CantActivateFanfareFieldCount > 0; + return NullVfx.GetInstance(); + } + + public override VfxBase ForceDepriveCantActivateFanfare(string type) + { + if (type == "unit") + { + base.CantActivateFanfareUnitCount = 0; + } + else if (type == "field") + { + base.CantActivateFanfareFieldCount = 0; + } + else + { + base.CantActivateFanfareUnitCount = 0; + base.CantActivateFanfareFieldCount = 0; + } + base.IsCantActivateFanfareUnit = base.CantActivateFanfareUnitCount > 0; + base.IsCantActivateFanfareField = base.CantActivateFanfareFieldCount > 0; + return NullVfx.GetInstance(); + } + + public override VfxBase GiveCantActivateShortageDeckWin() + { + base.CantActivateShortageDeckWinCount++; + base.IsCantActivateShortageDeckWin = base.CantActivateShortageDeckWinCount > 0; + return NullVfx.GetInstance(); + } + + public override VfxBase DepriveCantActivateShortageDeckWin() + { + base.CantActivateShortageDeckWinCount--; + base.IsCantActivateShortageDeckWin = base.CantActivateShortageDeckWinCount > 0; + return NullVfx.GetInstance(); + } + + public override VfxBase ForceDepriveCantActivateShortageDeckWin() + { + base.CantActivateShortageDeckWinCount = 0; + base.IsCantActivateShortageDeckWin = false; + return NullVfx.GetInstance(); + } + + public override VfxBase GiveRepeatSkill(string repeatTiming, string repeatTarget, SkillBase skill) + { + base.RepeatSkillTimingList.Add(new RepeatSkillInfo(repeatTiming, repeatTarget, skill)); + return NullVfx.GetInstance(); + } + + public override VfxBase DepriveRepeatSkill(string repeatTiming, string repeatTarget, bool reservation, bool isProcess, SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + List list = new List(); + for (int i = 0; i < base.RepeatSkillTimingList.Count; i++) + { + if (base.RepeatSkillTimingList[i].Timing == repeatTiming && base.RepeatSkillTimingList[i].Target == repeatTarget) + { + if (reservation) + { + base.RepeatSkillTimingList[i].IsRemoveReservation = true; + } + else if (isProcess || !base.RepeatSkillTimingList.Any((RepeatSkillInfo s) => s.IsRemoveReservation && s.Timing == repeatTiming && s.Target == repeatTarget)) + { + sequentialVfxPlayer.Register(base.RepeatSkillTimingList[i].Skill.Stop(skillProcessor)); + list.Add(base.RepeatSkillTimingList[i]); + } + } + } + if (list.Count != 0 && !reservation) + { + for (int num = 0; num < list.Count; num++) + { + base.RepeatSkillTimingList.Remove(list[num]); + } + } + return sequentialVfxPlayer; + } + + public override VfxBase ReservationAllDepriveRepeatSkill() + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + List list = new List(); + for (int i = 0; i < base.RepeatSkillTimingList.Count; i++) + { + if (base.RepeatSkillTimingList[i].IsRemoveReservation) + { + sequentialVfxPlayer.Register(base.RepeatSkillTimingList[i].Skill.Stop(null)); + list.Add(base.RepeatSkillTimingList[i]); + } + } + if (list.Count != 0) + { + for (int j = 0; j < list.Count; j++) + { + base.RepeatSkillTimingList.Remove(list[j]); + } + } + return sequentialVfxPlayer; + } + + public override VfxBase ForceDepriveRepeatSkill() + { + base.RepeatSkillTimingList.Clear(); + return NullVfx.GetInstance(); + } + + public override VfxBase GiveCantPlay(CantPlayCardFilterInfo cantPlayCardFilter) + { + base.CantPlayFilterList.Add(cantPlayCardFilter); + return InstantVfx.Create(delegate + { + foreach (BattleCardBase handCard in _card.SelfBattlePlayer.HandCardList) + { + handCard.BattleCardView.UpdateMovability(); + } + }); + } + + public override VfxBase DepriveCantPlay(CantPlayCardFilterInfo cantPlayCardFilter) + { + base.CantPlayFilterList.Remove(cantPlayCardFilter); + return InstantVfx.Create(delegate + { + foreach (BattleCardBase handCard in _card.SelfBattlePlayer.HandCardList) + { + handCard.BattleCardView.UpdateMovability(); + } + }); + } + + public override VfxBase ForceDepriveCantPlay() + { + base.CantPlayFilterList.Clear(); + return InstantVfx.Create(delegate + { + foreach (BattleCardBase handCard in _card.SelfBattlePlayer.HandCardList) + { + handCard.BattleCardView.UpdateMovability(); + } + }); + } + + public override VfxBase GiveAddTarget(AddTargetInfo info) + { + base.AddTargetList.Add(info); + return NullVfx.GetInstance(); + } + + public override VfxBase DepriveAddTarget(AddTargetInfo info) + { + base.AddTargetList.Remove(info); + return NullVfx.GetInstance(); + } + + public override VfxBase ForceDepriveAddTarget() + { + base.AddTargetList.Clear(); + return NullVfx.GetInstance(); + } + + public override VfxBase GiveDecreaseTurnStartPP(int value) + { + base.DecreaseTurnStartPPList.Add(value); + return NullVfx.GetInstance(); + } + + public override VfxBase DepriveDecreaseTurnStartPP(int value) + { + base.DecreaseTurnStartPPList.Remove(value); + return NullVfx.GetInstance(); + } + + public override VfxBase ForceDepriveDecreaseTurnStartPP() + { + base.DecreaseTurnStartPPList.Clear(); + return NullVfx.GetInstance(); + } + + public override VfxBase GiveCombatValueModifier(ICardOffenseModifier offenseModifier, ICardLifeModifier lifeModifier, SkillProcessor skillProcessor) + { + int life = _card.Life; + int maxLife = _card.MaxLife; + VfxBase vfxBase = base.GiveCombatValueModifier(offenseModifier, lifeModifier, skillProcessor); + VfxBase vfxBase2 = _card.SelfBattlePlayer.StartSkillWhenChangeClassLife(skillProcessor); + if (this.OnLifeChange != null) + { + this.OnLifeChange(RegisterActionBase.ActionBaseParameter.set, new LifeInfomation(_card.Life, _card.MaxLife, life, maxLife)); + } + return SequentialVfxPlayer.Create(vfxBase, vfxBase2); + } + + public override VfxBase DepriveCombatValueModifire(ICardOffenseModifier offenseModifier, ICardLifeModifier lifeModifier) + { + VfxBase vfxBase = base.DepriveCombatValueModifire(offenseModifier, lifeModifier); + return SequentialVfxPlayer.Create(vfxBase); + } + + public override VfxBase ForceDepriveCombatValueModifire() + { + VfxBase vfxBase = base.ForceDepriveCombatValueModifire(); + return SequentialVfxPlayer.Create(vfxBase); + } + + protected override VfxBase CombatModifierChangeCalc(bool isOldAtkBuff, bool isNowAtkBuff, bool isOldMaxLifeBuff, bool isNowMaxLifeBuff, bool isOldAtkDebuff, bool isNowAtkDebuff, bool isOldMaxLifeDebuff, bool isNowMaxLifeDebuff, bool isSkillPowerDown = false, bool isNoBuff = false, bool skipWait = false) + { + return _vfxCreator.CreateParameterChange(_card.CreateParameterChangeInfo()); + } + + public override void AddTokenDrawModifier(TokenDrawModifier modifier) + { + base.TokenDrawModifiers.Add(modifier); + } + + public override void RemoveTokenDrawModifier(TokenDrawModifier modifier) + { + foreach (TokenDrawModifier tokenDrawModifier in base.TokenDrawModifiers) + { + if (tokenDrawModifier.Equals(modifier)) + { + base.TokenDrawModifiers.Remove(tokenDrawModifier); + break; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/ClassSkinPlate.cs b/SVSim.BattleEngine/Engine/ClassSkinPlate.cs new file mode 100644 index 0000000..036bfcd --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassSkinPlate.cs @@ -0,0 +1,208 @@ +using System; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Scripts.Network.Data.TaskData.SkinPurchase; + +public class ClassSkinPlate : MonoBehaviour +{ + private const int MAX_LENGTH_VIEW_SINGLE_PRODUCT_NAME = 15; + + private const int MAX_LENGTH_VIEW_SINGLE_PRODUCT_NAME_ALPHABET = 35; + + private const int MAX_LENGTH_VIEW_LARGE_SIZE_PRODUCT_NAME = 20; + + private const int MAX_LENGTH_VIEW_LARGE_SIZE_PRODUCT_NAME_ALPHABET = 39; + + private const int WIDTH_PRODUCT_BG_SPRITE_NORMAL = 357; + + private const int WIDTH_PRODUCT_BG_SPRITE_LARGE = 411; + + private readonly Vector3 POS_VIEW_SINGLE_PRODUCT_NAME = new Vector3(13f, -52f, 0f); + + private readonly Vector3 POS_VIEW_MULTI_PRODUCT_NAME = new Vector3(0f, -52f, 0f); + + [SerializeField] + private UIEventListener _eventListenerSkinImage; + + [SerializeField] + private UISprite _spritePlateBG; + + [SerializeField] + private UILabel _labelFree; + + [SerializeField] + private UILabel _labelCostCrystal; + + [SerializeField] + private UILabel _labelCostRupy; + + [SerializeField] + private UILabel _labelCostTicket; + + [SerializeField] + private UIButton m_BtnBuy; + + [SerializeField] + private UILabel m_LabelBuy; + + [SerializeField] + private UILabel m_LabelPurchased; + + [SerializeField] + private UILabel _LabelProductName; + + [SerializeField] + private UITexture _uiClassSkinTexture; + + [SerializeField] + private UITexture _uiClassSkinTextureLarge; + + [SerializeField] + private UISprite _spriteClassColorIcon; + + [SerializeField] + private UITexture _leaderSkinTicketIcon; + + public SkinProductInfo ProductInfo { get; private set; } + + public SkinSeriesPurchaseInfo SeriesInfo { get; private set; } + + public Texture ImageTexture { get; private set; } + + private void Start() + { + m_LabelPurchased.text = Data.SystemText.Get("Shop_0100"); + } + + public void SetMultiData(SkinSeriesPurchaseInfo seriesInfo, EventDelegate onPushBuyBtnCallback = null, Action onTapSkinImage = null) + { + SetBuyButtonToGrey(isGrey: false); + bool isLargeImage = Data.Master.LeaderSkinSeriesIdDic[seriesInfo.series_id].IsLargeImage; + ProductInfo = null; + SeriesInfo = seriesInfo; + Texture mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(seriesInfo.saleInfo.path, ResourcesManager.AssetLoadPathType.ShopClassSkin, isfetch: true)); + if (isLargeImage) + { + _uiClassSkinTexture.gameObject.SetActive(value: false); + _uiClassSkinTextureLarge.gameObject.SetActive(value: true); + _uiClassSkinTextureLarge.mainTexture = mainTexture; + _spritePlateBG.width = 411; + int maxLength = (Global.IsAlphabetLanguage() ? 39 : 20); + _LabelProductName.text = ShopCommonUtility.TrimProductName(seriesInfo.saleInfo.name, maxLength); + } + else + { + _uiClassSkinTexture.gameObject.SetActive(value: true); + _uiClassSkinTextureLarge.gameObject.SetActive(value: false); + _uiClassSkinTexture.mainTexture = mainTexture; + _spritePlateBG.width = 357; + _LabelProductName.text = ShopCommonUtility.TrimProductName(seriesInfo.saleInfo.name); + } + _LabelProductName.transform.localPosition = POS_VIEW_MULTI_PRODUCT_NAME; + _LabelProductName.effectStyle = UILabel.Effect.None; + _spriteClassColorIcon.gameObject.SetActive(value: false); + m_BtnBuy.onClick.Clear(); + m_BtnBuy.onClick.Add(onPushBuyBtnCallback); + _eventListenerSkinImage.onClick = null; + _eventListenerSkinImage.onClick = delegate + { + onTapSkinImage.Call(); + }; + if (seriesInfo.saleInfo.costTicketItemId.HasValue) + { + _leaderSkinTicketIcon.mainTexture = Toolbox.ResourcesManager.LoadObject(ShopCommonUtility.GetTicketIconPath(seriesInfo.saleInfo.costTicketItemId.Value.ToString(), isFetch: true)); + } + if (seriesInfo.is_completed && seriesInfo._rewardStatus != SkinSeriesPurchaseInfo.RewardStatus.not_got) + { + _labelCostCrystal.gameObject.SetActive(value: false); + _labelCostRupy.gameObject.SetActive(value: false); + _labelFree.gameObject.SetActive(value: false); + _labelCostTicket.gameObject.SetActive(value: false); + } + else + { + ShopCommonUtility.SetCostInfo(seriesInfo.saleInfo, _labelCostCrystal, _labelCostRupy, _labelFree, _labelCostTicket); + } + _SetMultiBuyButton(seriesInfo); + } + + public void SetBuyButtonToGrey(bool isGrey) + { + UIManager.SetObjectToGrey(m_BtnBuy.gameObject, isGrey); + } + + public void SetData(SkinProductInfo productInfo, EventDelegate onPushBuyBtnCallback = null, Action onTapSkinImage = null) + { + SeriesInfo = null; + ProductInfo = productInfo; + ClassCharacterMasterData charaPrmBySkinId = GameMgr.GetIns().GetDataMgr().GetCharaPrmBySkinId(productInfo.leader_skin_id); + _LabelProductName.transform.localPosition = POS_VIEW_SINGLE_PRODUCT_NAME; + int maxLength = (Global.IsAlphabetLanguage() ? 35 : 15); + _LabelProductName.text = ShopCommonUtility.TrimProductName(productInfo.saleInfo.name, maxLength); + ClassCharaPrm.SetClassLabelSetting(_LabelProductName, charaPrmBySkinId.ClassColorId); + _uiClassSkinTextureLarge.gameObject.SetActive(value: false); + _uiClassSkinTexture.gameObject.SetActive(value: true); + _uiClassSkinTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(productInfo.saleInfo.path, ResourcesManager.AssetLoadPathType.ClassCharaSkinThumbnail, isfetch: true)); + _spritePlateBG.width = 357; + _spriteClassColorIcon.gameObject.SetActive(value: true); + _spriteClassColorIcon.spriteName = ClassCharaPrm.GetIconSpriteName(charaPrmBySkinId.clan); + m_BtnBuy.onClick.Clear(); + m_BtnBuy.onClick.Add(onPushBuyBtnCallback); + _eventListenerSkinImage.onClick = null; + _eventListenerSkinImage.onClick = delegate + { + onTapSkinImage.Call(); + }; + if (productInfo.IsEnableBuyTicket) + { + _leaderSkinTicketIcon.mainTexture = Toolbox.ResourcesManager.LoadObject(ShopCommonUtility.GetTicketIconPath(productInfo.saleInfo.costTicketItemId.Value.ToString(), isFetch: true)); + } + ShopCommonUtility.SetCostInfo(productInfo.saleInfo, _labelCostCrystal, _labelCostRupy, _labelFree, _labelCostTicket); + _SetBuyButton(productInfo); + } + + private void _SetBuyButton(SkinProductInfo productInfo) + { + if (!productInfo.is_purchased) + { + m_BtnBuy.gameObject.SetActive(value: true); + m_BtnBuy.isEnabled = true; + m_LabelPurchased.gameObject.SetActive(value: false); + if (productInfo.saleInfo.isFree) + { + m_LabelBuy.text = Data.SystemText.Get("Shop_0099"); + } + else + { + m_LabelBuy.text = Data.SystemText.Get("Shop_0095"); + } + } + else + { + m_BtnBuy.gameObject.SetActive(value: false); + m_LabelPurchased.gameObject.SetActive(value: true); + } + } + + private void _SetMultiBuyButton(SkinSeriesPurchaseInfo seriesInfo) + { + if (seriesInfo.is_completed && seriesInfo._rewardStatus != SkinSeriesPurchaseInfo.RewardStatus.not_got) + { + m_BtnBuy.gameObject.SetActive(value: false); + m_LabelPurchased.gameObject.SetActive(value: true); + return; + } + m_BtnBuy.gameObject.SetActive(value: true); + m_BtnBuy.isEnabled = true; + m_LabelPurchased.gameObject.SetActive(value: false); + if (seriesInfo.saleInfo.isFree) + { + m_LabelBuy.text = Data.SystemText.Get("Shop_0099"); + } + else + { + m_LabelBuy.text = Data.SystemText.Get("Shop_0095"); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ClassSkinPurchasePage.cs b/SVSim.BattleEngine/Engine/ClassSkinPurchasePage.cs new file mode 100644 index 0000000..abc8599 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassSkinPurchasePage.cs @@ -0,0 +1,691 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Scripts.Network.Data.TaskData.SkinPurchase; + +public class ClassSkinPurchasePage : BaseShopPurchasePage +{ + private enum eBuyType + { + single, + multi, + rewardOnly + } + + private const int DEFAULT_INDEX = 0; + + [SerializeField] + private UITable _uiTableProducts; + + [SerializeField] + private GameObject _PrefabDialogSelectBuyMeans; + + [SerializeField] + private PurchaseConfirm _PrefabDialogPurchaseConfirm; + + [SerializeField] + private ClassSkinDetailWindow _PrefabDialogSkinDetail; + + [SerializeField] + private ShopDrumrollScrollManager _drumrollManager; + + private SkinSeriesPurchaseInfo _selectSeriesInfo; + + private string _purchaseProductName; + + private SkinProductInfo _purchaseProductInfo; + + private ClassSkinPlate _selectPlate; + + private GameObject _MultiPlateObj; + + private DialogBase _tempCloseDialog; + + private DialogBase _dialogPurchaseConfirm; + + private DialogBase _dialogSelectBuyMeans; + + private DialogBase _dialogProductDetail; + + private DialogBase _dialogCrystalShortage; + + private bool _isBuyConnect; + + private List _productPlateObjList = new List(); + + private readonly List _loadedVoiceList = new List(); + + public override void onFirstStart() + { + CreateTopBar(Data.SystemText.Get("Shop_0104"), delegate + { + MyPageMenu.Instance.GoToShopSupply(); + }); + base.onFirstStart(); + } + + protected override void SetupScrollView() + { + _productPlateOriginal.gameObject.SetActive(value: false); + } + + protected override void ResetProductListScroll(int productCount) + { + if (productCount > _productPlateObjList.Count) + { + int num = productCount - _productPlateObjList.Count; + for (int i = 0; i < num; i++) + { + GameObject item = NGUITools.AddChild(_uiTableProducts.gameObject, _productPlateOriginal); + _productPlateObjList.Add(item); + } + } + for (int j = 0; j < _productPlateObjList.Count; j++) + { + UpdateScrollItem(_productPlateObjList[j], j); + } + _uiTableProducts.Reposition(); + _scrollView.ResetPosition(); + } + + protected override void onOpen() + { + base.onOpen(); + _loadedResourceList = new List(); + StartGetClassSkinInfo(OnClassSkinInfoRequestFinished); + } + + protected override void onClose() + { + if (_loadedVoiceList.Count > 0) + { + GameMgr.GetIns().GetSoundMgr().StopVoiceAll(0f); + Toolbox.ResourcesManager.RemoveAssetGroup(_loadedVoiceList); + _loadedVoiceList.Clear(); + } + base.onClose(); + } + + private void StartGetClassSkinInfo(Action callbackOnSuccess) + { + SkinPurchaseInfoTask skinPurchaseInfoTask = new SkinPurchaseInfoTask(); + skinPurchaseInfoTask.SetParameter(); + StartCoroutine(Toolbox.NetworkManager.Connect(skinPurchaseInfoTask, callbackOnSuccess)); + } + + private void StartBuySkin(eBuyType buyType, ShopCommonUtility.SalesType costType, int id, long? itemId) + { + if (!_isBuyConnect) + { + _isBuyConnect = true; + UIManager.GetInstance().createInSceneCenterLoading(); + switch (buyType) + { + case eBuyType.single: + { + SkinBuySingleTask skinBuySingleTask = new SkinBuySingleTask(); + skinBuySingleTask.SetParameter(id, costType, itemId); + StartCoroutine(Toolbox.NetworkManager.Connect(skinBuySingleTask, onSuccessPurchaseSingle, _OnFailurePurchase, _OnResultCodeError)); + break; + } + case eBuyType.multi: + { + SkinBuyMultiTask skinBuyMultiTask = new SkinBuyMultiTask(); + skinBuyMultiTask.SetParameter(id, costType, itemId); + StartCoroutine(Toolbox.NetworkManager.Connect(skinBuyMultiTask, onSuccessPurchaseMulti, _OnFailurePurchase, _OnResultCodeError)); + break; + } + case eBuyType.rewardOnly: + { + SkinBuyMultiRewardTask skinBuyMultiRewardTask = new SkinBuyMultiRewardTask(); + skinBuyMultiRewardTask.SetParameter(id); + StartCoroutine(Toolbox.NetworkManager.Connect(skinBuyMultiRewardTask, onSuccessPurchaseMulti, _OnFailurePurchase, _OnResultCodeError)); + break; + } + } + } + } + + public static void SetFirstDisplaySeries(int seriesId) + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.SCENE_TRANSITION_VIEW_SKIN_SERIES_ID, seriesId); + } + + private int GetViewSeriesId() + { + int series_id = Data.SkinPurchaseInfo.seriesList[0].series_id; + int value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LATEST_SKIN_SERIES_ID); + if (series_id != value) + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.LATEST_SKIN_SERIES_ID, series_id); + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.LAST_PURCHASE_SKIN_SERIES_ID, series_id); + } + int value2 = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.SCENE_TRANSITION_VIEW_SKIN_SERIES_ID); + if (value2 > -1) + { + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.SCENE_TRANSITION_VIEW_SKIN_SERIES_ID, -1); + return value2; + } + return PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_PURCHASE_SKIN_SERIES_ID); + } + + private void OnClassSkinInfoRequestFinished(NetworkTask.ResultCode error) + { + List seriesIdList = GetSeriesIdList(); + Dictionary seriesDataDictionary = GetSeriesDataDictionary(); + StartCoroutine(loadSeriesImages(ResourcesManager.AssetLoadPathType.ShopClassSkin, seriesIdList, seriesDataDictionary, delegate + { + if (_drumrollSeriesImageList.Count <= 0) + { + UIManager.GetInstance().OnReadyViewScene(isFadein: true); + } + else + { + int viewSeriesId = GetViewSeriesId(); + int seriesIndex = Data.SkinPurchaseInfo.seriesList.FindIndex((SkinSeriesPurchaseInfo data) => data.series_id == viewSeriesId); + if (seriesIndex < 0) + { + seriesIndex = 0; + } + List seriesList = Data.SkinPurchaseInfo.seriesList; + List itemList = _drumrollSeriesImageList.Select((Texture tex, int index) => new ShopDrumrollScrollManager.DrumrollItem(tex, seriesList[index].IsNew)).ToList(); + StartCoroutine(_drumrollManager.CreateDrumrollScroll_Coroutine(itemList, seriesIndex, onSelectSeries, delegate + { + onSelectSeries(seriesIndex, delegate + { + UIManager.GetInstance().OnReadyViewScene(isFadein: true); + }); + })); + } + })); + } + + private List GetSeriesIdList() + { + return Data.SkinPurchaseInfo.seriesList.ConvertAll((SkinSeriesPurchaseInfo info) => info.series_id); + } + + private Dictionary GetSeriesDataDictionary() + { + Dictionary dictionary = new Dictionary(); + foreach (KeyValuePair item in Data.Master.LeaderSkinSeriesIdDic) + { + dictionary.Add(item.Key, item.Value); + } + return dictionary; + } + + private void onSelectSeries(int seriesIndex) + { + onSelectSeries(seriesIndex, null); + } + + private void onSelectSeries(int seriesIndex, Action onFinish) + { + SkinSeriesPurchaseInfo seriesInfo = Data.SkinPurchaseInfo.seriesList[seriesIndex]; + _selectSeriesInfo = seriesInfo; + _titleLogoTexture.mainTexture = _seriesTitleImageList[seriesIndex]; + _labelSeriesDescription.text = seriesInfo.description; + int num = _cacheSeriesIdList.IndexOf(seriesInfo.series_id); + if (num != -1) + { + _cacheRefCountList[num]++; + ResetProductListScroll(seriesInfo.GetProductCount()); + onFinish.Call(); + return; + } + if (_cacheSeriesIdList.Count >= 4) + { + int num2 = _cacheRefCountList[0]; + int cacheIndex = 0; + for (int i = 1; i < _cacheRefCountList.Count; i++) + { + if (num2 > _cacheRefCountList[i]) + { + num2 = _cacheRefCountList[i]; + cacheIndex = i; + } + } + DeleteCacheSeriesByCashIndex(cacheIndex); + } + StartCoroutine(loadClassSkins(delegate + { + if (_selectSeriesInfo == seriesInfo) + { + ResetProductListScroll(seriesInfo.GetProductCount()); + } + _cacheSeriesIdList.Add(seriesInfo.series_id); + _cacheRefCountList.Add(1); + onFinish.Call(); + })); + } + + private void DeleteCacheSeriesByCashIndex(int cacheIndex) + { + List listResource = new List(); + SkinSeriesPurchaseInfo skinSeriesPurchaseInfo = Data.SkinPurchaseInfo.seriesList.Find((SkinSeriesPurchaseInfo m) => m.series_id == _cacheSeriesIdList[cacheIndex]); + if (skinSeriesPurchaseInfo != null) + { + if (skinSeriesPurchaseInfo.SetSalesStatus != SkinSeriesPurchaseInfo.eSetSalesStatus.None) + { + listResource.Add(Toolbox.ResourcesManager.GetAssetTypePath(skinSeriesPurchaseInfo.saleInfo.path, ResourcesManager.AssetLoadPathType.ShopClassSkin)); + } + skinSeriesPurchaseInfo.productList.ForEach(delegate(SkinProductInfo s) + { + listResource.Add(Toolbox.ResourcesManager.GetAssetTypePath(s.saleInfo.path, ResourcesManager.AssetLoadPathType.ClassCharaSkinThumbnail)); + }); + } + Toolbox.ResourcesManager.RemoveAssetGroup(listResource); + _cacheSeriesIdList.RemoveAt(cacheIndex); + _cacheRefCountList.RemoveAt(cacheIndex); + for (int num = 0; num < listResource.Count; num++) + { + _cacheResourceList.Remove(listResource[num]); + } + } + + private IEnumerator loadClassSkins(Action callBack = null) + { + UIManager.GetInstance().createInSceneCenterLoading(); + List listResource = new List(); + if (_selectSeriesInfo.SetSalesStatus != SkinSeriesPurchaseInfo.eSetSalesStatus.None) + { + listResource.Add(Toolbox.ResourcesManager.GetAssetTypePath(_selectSeriesInfo.saleInfo.path, ResourcesManager.AssetLoadPathType.ShopClassSkin)); + } + foreach (SkinProductInfo product in _selectSeriesInfo.productList) + { + if (product.IsEnableBuyTicket) + { + listResource.Add(ShopCommonUtility.GetTicketIconPath(product.saleInfo.costTicketItemId.Value.ToString(), isFetch: false)); + listResource.Add(ShopCommonUtility.GetTicketIconRightDownPath(product.saleInfo.costTicketItemId.Value.ToString(), isFetch: false)); + } + } + _selectSeriesInfo.productList.ForEach(delegate(SkinProductInfo s) + { + listResource.Add(Toolbox.ResourcesManager.GetAssetTypePath(s.saleInfo.path, ResourcesManager.AssetLoadPathType.ClassCharaSkinThumbnail)); + }); + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(listResource, null)); + UIManager.GetInstance().closeInSceneCenterLoading(); + for (int num = 0; num < listResource.Count; num++) + { + _cacheResourceList.Add(listResource[num]); + } + callBack.Call(); + } + + private void UpdateScrollItem(GameObject go, int index) + { + if (_selectSeriesInfo == null) + { + return; + } + if (index >= _selectSeriesInfo.GetProductCount() || index < 0) + { + go.SetActive(value: false); + return; + } + go.SetActive(value: true); + ClassSkinPlate plate = go.GetComponent(); + EventDelegate eventDelegate = new EventDelegate(this, "onPushBuyButton"); + eventDelegate.parameters[0].value = plate; + plate.SetBuyButtonToGrey(isGrey: false); + if (_selectSeriesInfo.SetSalesStatus != SkinSeriesPurchaseInfo.eSetSalesStatus.None) + { + if (index == 0) + { + _MultiPlateObj = go; + eventDelegate.parameters[1].value = true; + plate.SetMultiData(_selectSeriesInfo, eventDelegate, delegate + { + _onTapClassSkinImage(plate, isMulti: true); + }); + if (_selectSeriesInfo.SetSalesStatus == SkinSeriesPurchaseInfo.eSetSalesStatus.Disable) + { + plate.SetBuyButtonToGrey(isGrey: true); + } + } + else + { + if (_MultiPlateObj == go) + { + _MultiPlateObj = null; + } + eventDelegate.parameters[1].value = false; + plate.SetData(_selectSeriesInfo.productList[index - 1], eventDelegate, delegate + { + _onTapClassSkinImage(plate, isMulti: false); + }); + } + } + else + { + _MultiPlateObj = null; + eventDelegate.parameters[1].value = false; + plate.SetData(_selectSeriesInfo.productList[index], eventDelegate, delegate + { + _onTapClassSkinImage(plate, isMulti: false); + }); + } + } + + private void _onTapClassSkinImage(ClassSkinPlate plate, bool isMulti) + { + if (!(_dialogProductDetail != null)) + { + _dialogProductDetail = UIManager.GetInstance().CreateDialogClose(); + _dialogProductDetail.SetSize(DialogBase.Size.M); + _dialogProductDetail.SetTitleLabel(Data.SystemText.Get("Dia_BuySkin_003_Title")); + _dialogProductDetail.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + ClassSkinDetailWindow component = UnityEngine.Object.Instantiate(_PrefabDialogSkinDetail).GetComponent(); + _dialogProductDetail.SetObj(component.gameObject); + if (isMulti) + { + component.SetMultiData(plate.SeriesInfo); + } + else + { + component.SetSingleData(plate.ProductInfo, _loadedVoiceList); + } + } + } + + private void onPushBuyButton(ClassSkinPlate plate, bool isMulti) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + _selectPlate = plate; + if (isMulti) + { + createClassSkinSelectBuyMeansMultiDialog(plate.SeriesInfo); + } + else + { + createClassSkinSelectBuyMeansDialog(plate.ProductInfo); + } + } + + private void createClassSkinSelectBuyMeansMultiDialog(SkinSeriesPurchaseInfo sInfo) + { + if (_dialogSelectBuyMeans != null) + { + return; + } + if (sInfo.is_completed) + { + _ = sInfo._rewardStatus; + _ = 2; + } + _dialogSelectBuyMeans = _createBaseDialogForSelectBuyMeans(sInfo.saleInfo); + ClassSkinSelectBuyMeansDialog component = UnityEngine.Object.Instantiate(_PrefabDialogSelectBuyMeans).GetComponent(); + _dialogSelectBuyMeans.SetObj(component.gameObject); + Action onPushBuyCrystalBtnCallBack = null; + Action onPushBuyRupyBtnCallBack = null; + Action onPushBuyTicketButtonCallBack = null; + if (sInfo.saleInfo.isFree) + { + _dialogSelectBuyMeans.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + _dialogSelectBuyMeans.SetButtonText(Data.SystemText.Get("Shop_0082")); + _dialogSelectBuyMeans.onPushButton1 = delegate + { + _purchaseProductName = sInfo.saleInfo.name; + UIManager.GetInstance().createInSceneCenterLoading(); + if (sInfo.is_completed && sInfo._rewardStatus == SkinSeriesPurchaseInfo.RewardStatus.not_got) + { + StartBuySkin(eBuyType.rewardOnly, ShopCommonUtility.SalesType.free, sInfo.series_id, null); + } + else + { + StartBuySkin(eBuyType.multi, ShopCommonUtility.SalesType.free, sInfo.series_id, null); + } + }; + } + else + { + _dialogSelectBuyMeans.SetButtonLayout(DialogBase.ButtonLayout.NONE); + onPushBuyCrystalBtnCallBack = delegate + { + _createPurchaseConfirmDialog(sInfo.saleInfo, ShopCommonUtility.SalesType.crystal, delegate + { + StartBuySkin(eBuyType.multi, ShopCommonUtility.SalesType.crystal, sInfo.series_id, null); + }); + }; + onPushBuyRupyBtnCallBack = delegate + { + _createPurchaseConfirmDialog(sInfo.saleInfo, ShopCommonUtility.SalesType.rupy, delegate + { + StartBuySkin(eBuyType.multi, ShopCommonUtility.SalesType.rupy, sInfo.series_id, null); + }); + }; + onPushBuyTicketButtonCallBack = delegate + { + _createPurchaseConfirmDialog(sInfo.saleInfo, ShopCommonUtility.SalesType.ticket, delegate + { + StartBuySkin(eBuyType.multi, ShopCommonUtility.SalesType.ticket, sInfo.series_id, sInfo.saleInfo.costTicketItemId); + }); + }; + } + component.Init(sInfo, _dialogSelectBuyMeans, onPushBuyCrystalBtnCallBack, onPushBuyRupyBtnCallBack, onPushBuyTicketButtonCallBack); + } + + private void createClassSkinSelectBuyMeansDialog(SkinProductInfo pInfo) + { + if (_dialogSelectBuyMeans != null) + { + return; + } + _ = pInfo.is_purchased; + _dialogSelectBuyMeans = _createBaseDialogForSelectBuyMeans(pInfo.saleInfo); + ClassSkinSelectBuyMeansDialog component = UnityEngine.Object.Instantiate(_PrefabDialogSelectBuyMeans).GetComponent(); + _dialogSelectBuyMeans.SetObj(component.gameObject); + Action onPushBuyCrystalBtnCallBack = null; + Action onPushBuyRupyBtnCallBack = null; + Action onPushBuyTicketButtonCallBack = null; + if (pInfo.saleInfo.isFree) + { + _dialogSelectBuyMeans.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + _dialogSelectBuyMeans.SetButtonText(Data.SystemText.Get("Shop_0082")); + _dialogSelectBuyMeans.onPushButton1 = delegate + { + _purchaseProductName = pInfo.saleInfo.name; + _purchaseProductInfo = pInfo; + UIManager.GetInstance().createInSceneCenterLoading(); + StartBuySkin(eBuyType.single, ShopCommonUtility.SalesType.free, pInfo.product_id, null); + }; + } + else + { + _dialogSelectBuyMeans.SetButtonLayout(DialogBase.ButtonLayout.NONE); + onPushBuyCrystalBtnCallBack = delegate + { + _createPurchaseConfirmDialog(pInfo.saleInfo, ShopCommonUtility.SalesType.crystal, delegate + { + _purchaseProductInfo = pInfo; + StartBuySkin(eBuyType.single, ShopCommonUtility.SalesType.crystal, pInfo.product_id, null); + }); + }; + onPushBuyRupyBtnCallBack = delegate + { + _createPurchaseConfirmDialog(pInfo.saleInfo, ShopCommonUtility.SalesType.rupy, delegate + { + _purchaseProductInfo = pInfo; + StartBuySkin(eBuyType.single, ShopCommonUtility.SalesType.rupy, pInfo.product_id, null); + }); + }; + onPushBuyTicketButtonCallBack = delegate + { + _createPurchaseConfirmDialog(pInfo.saleInfo, ShopCommonUtility.SalesType.ticket, delegate + { + _purchaseProductInfo = pInfo; + StartBuySkin(eBuyType.single, ShopCommonUtility.SalesType.ticket, pInfo.product_id, pInfo.saleInfo.costTicketItemId); + }); + }; + } + component.Init(pInfo, _dialogSelectBuyMeans, onPushBuyCrystalBtnCallBack, onPushBuyRupyBtnCallBack, onPushBuyTicketButtonCallBack); + } + + private DialogBase _createBaseDialogForSelectBuyMeans(ShopCommonSaleInfo info) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Dia_BuySkin_002_Title")); + dialogBase.SetReturnMsg(null, ""); + return dialogBase; + } + + private void _createPurchaseConfirmDialog(ShopCommonSaleInfo info, ShopCommonUtility.SalesType costType, Action buyApiFunc) + { + if (!(_dialogPurchaseConfirm != null) && ShopCommonUtility.IsHaveEnoughCost(info, costType, delegate + { + if (_dialogCrystalShortage == null) + { + _dialogCrystalShortage = ShopCommonUtility.CreateCrystalShortagePopup(); + } + })) + { + _dialogPurchaseConfirm = ShopCommonUtility.CreatePurchaseConfirmPopup(info, costType, _PrefabDialogPurchaseConfirm, delegate + { + _purchaseProductName = info.name; + buyApiFunc(); + }); + _dialogPurchaseConfirm.SetTitleLabel(Data.SystemText.Get("Dia_BuySkin_001_Title")); + } + } + + private void _OnFailurePurchase(NetworkTask.ResultCode code) + { + _isBuyConnect = false; + UIManager.GetInstance().closeInSceneCenterLoading(); + } + + private void _OnResultCodeError(int code) + { + if (code != 110) + { + _isBuyConnect = false; + UIManager.GetInstance().closeInSceneCenterLoading(); + _ReloadSkinInfo(); + } + } + + private void onSuccessPurchaseSingle(NetworkTask.ResultCode error) + { + _isBuyConnect = false; + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.LAST_PURCHASE_SKIN_SERIES_ID, _selectSeriesInfo.series_id); + if (_purchaseProductName != null) + { + DialogBase diaChange = UIManager.GetInstance().CreateDialogClose(); + int skinId = _purchaseProductInfo.leader_skin_id; + ClassCharacterMasterData charaData = GameMgr.GetIns().GetDataMgr().GetCharaPrmBySkinId(skinId); + string text = Data.SystemText.Get("Shop_0022", _purchaseProductName.Replace("\n", "")); + text = text + "\n\n" + Data.SystemText.Get("Shop_0108", GameMgr.GetIns().GetDataMgr().GetClanNameByKey(charaData.class_id), charaData.chara_name); + diaChange.SetText(text); + diaChange.SetTitleLabel(Data.SystemText.Get("Dia_BuySkin_004_Title")); + diaChange.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + diaChange.SetButtonText(Data.SystemText.Get("Dia_BuySkin_001_Button")); + diaChange.onPushButton1 = delegate + { + _tempCloseDialog = diaChange; + LeaderSkinUpdateTask leaderSkinUpdateTask = new LeaderSkinUpdateTask(); + leaderSkinUpdateTask.SetParameter(charaData.class_id, skinId); + StartCoroutine(Toolbox.NetworkManager.Connect(leaderSkinUpdateTask, onSuccessChangeSkin)); + }; + } + _ReloadSkinInfo(); + } + + private void onSuccessChangeSkin(NetworkTask.ResultCode error) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetText(Data.SystemText.Get("Shop_0109")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + _purchaseProductInfo = null; + if (_tempCloseDialog != null) + { + _tempCloseDialog.Close(); + } + } + + private void onSuccessPurchaseMulti(NetworkTask.ResultCode error) + { + _isBuyConnect = false; + PlayerPrefsWrapper.SetValue(PlayerPrefsWrapper.LAST_PURCHASE_SKIN_SERIES_ID, _selectSeriesInfo.series_id); + if (_purchaseProductName != null) + { + ShopCommonUtility.CreatePurchaseSuccess(_purchaseProductName.Replace("\n", "")); + _purchaseProductName = null; + } + _ReloadSkinInfo(); + } + + private void _ReloadSkinInfo() + { + MyPageMenu.Instance.UpdateCrystalCount(); + MyPageMenu.Instance.UpdateRupyCount(); + List oldSeriesList = new List(Data.SkinPurchaseInfo.seriesList); + StartGetClassSkinInfo(delegate + { + bool flag = false; + List seriesList = Data.SkinPurchaseInfo.seriesList; + for (int i = 0; i < seriesList.Count; i++) + { + if (oldSeriesList[i].series_id != seriesList[i].series_id) + { + flag = true; + } + if (seriesList[i].series_id == _selectSeriesInfo.series_id) + { + if (_selectPlate.ProductInfo == null) + { + onSelectSeries(i); + } + else if (_selectPlate.ProductInfo.product_id == _purchaseProductInfo.product_id) + { + _selectSeriesInfo = seriesList[i]; + int num = ((_selectSeriesInfo.SetSalesStatus != SkinSeriesPurchaseInfo.eSetSalesStatus.None) ? 1 : 0); + for (int j = 0; j < _selectSeriesInfo.productList.Count; j++) + { + UpdateScrollItem(_productPlateObjList[j + num], j + num); + } + if (_MultiPlateObj != null) + { + UpdateScrollItem(_MultiPlateObj, 0); + } + } + else + { + onSelectSeries(i); + } + } + } + if (oldSeriesList.Count != seriesList.Count) + { + flag = true; + } + _purchaseProductName = null; + _purchaseProductInfo = null; + _selectPlate = null; + if (flag) + { + List seriesIdList = GetSeriesIdList(); + Dictionary seriesDataDictionary = GetSeriesDataDictionary(); + StartCoroutine(loadSeriesImages(ResourcesManager.AssetLoadPathType.ShopClassSkin, seriesIdList, seriesDataDictionary, delegate + { + List seriesList2 = Data.SkinPurchaseInfo.seriesList; + List itemList = _drumrollSeriesImageList.Select((Texture tex, int index) => new ShopDrumrollScrollManager.DrumrollItem(tex, seriesList2[index].IsNew)).ToList(); + StartCoroutine(_drumrollManager.CreateDrumrollScroll_Coroutine(itemList, 0, onSelectSeries, delegate + { + onSelectSeries(0); + UIManager.GetInstance().closeInSceneCenterLoading(); + })); + })); + } + else + { + UIManager.GetInstance().closeInSceneCenterLoading(); + } + }); + } +} diff --git a/SVSim.BattleEngine/Engine/ClipboardHelper.cs b/SVSim.BattleEngine/Engine/ClipboardHelper.cs new file mode 100644 index 0000000..20dd236 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClipboardHelper.cs @@ -0,0 +1,16 @@ +using UnityEngine; + +public class ClipboardHelper +{ + public static string Clipboard + { + get + { + return GUIUtility.systemCopyBuffer; + } + set + { + GUIUtility.systemCopyBuffer = value; + } + } +} diff --git a/SVSim.BattleEngine/Engine/ColorOverwrite.cs b/SVSim.BattleEngine/Engine/ColorOverwrite.cs new file mode 100644 index 0000000..bc828ee --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColorOverwrite.cs @@ -0,0 +1,27 @@ +using UnityEngine; + +public class ColorOverwrite : MonoBehaviour +{ + public enum Change + { + No, + Yes, + UseDeckColorSet, + UseBingoButtonSet + } + + [SerializeField] + private Change _change; + + [SerializeField] + private bool _dontChangeEffectDistance; + + [SerializeField] + private bool _dontChangeEffectStyle; + + public Change ColorChange => _change; + + public bool DontChangeEffectDistance => _dontChangeEffectDistance; + + public bool DontChangeEffectStyle => _dontChangeEffectStyle; +} diff --git a/SVSim.BattleEngine/Engine/ColosseumBattleFinish.cs b/SVSim.BattleEngine/Engine/ColosseumBattleFinish.cs new file mode 100644 index 0000000..f857a5e --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumBattleFinish.cs @@ -0,0 +1,4 @@ +public class ColosseumBattleFinish : HeaderData +{ + public ColosseumBattleFinishDetail data; +} diff --git a/SVSim.BattleEngine/Engine/ColosseumBattleFinishDetail.cs b/SVSim.BattleEngine/Engine/ColosseumBattleFinishDetail.cs new file mode 100644 index 0000000..b65d9e2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumBattleFinishDetail.cs @@ -0,0 +1,3 @@ +public class ColosseumBattleFinishDetail : MatchFinishBase +{ +} diff --git a/SVSim.BattleEngine/Engine/ColosseumCardPanel.cs b/SVSim.BattleEngine/Engine/ColosseumCardPanel.cs new file mode 100644 index 0000000..7e84702 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumCardPanel.cs @@ -0,0 +1,190 @@ +using Cute; +using UnityEngine; +using Wizard; + +internal class ColosseumCardPanel : MyPageCardPanel +{ + private const string DEFAULT_GRAND_PRIX_ID = "0"; + + [SerializeField] + private GameObject _infoRoot; + + [SerializeField] + private UILabel _infoTitleLabel; + + [SerializeField] + private UILabel _infoNextRoundLabel; + + [SerializeField] + private UILabel _infoTimeLabel; + + [SerializeField] + private UILabel _nameLabel; + + [SerializeField] + private GameObject _freeEntryIcon; + + [SerializeField] + private UISprite _panelLineSprite; + + private const int SECONDS_PER_MINUTE = 60; + + private const float SECONDS_TASK_END_NEXT_INTERVAL = 0.5f; + + private float _updateTimer; + + private bool _isFreeEntryIconDisplayPermission; + + public GameObject MyPageFreeEntryIcon { private get; set; } + + public override void CheckMaintenanceType() + { + base.CheckMaintenanceType(); + if (Data.MaintenanceCodeList.Contains(maintenanceType)) + { + _infoRoot.SetActive(value: false); + } + else + { + _infoRoot.SetActive(value: true); + } + } + + public void SetIconDisplayPermission(bool isPermission) + { + _isFreeEntryIconDisplayPermission = isPermission; + NowUpdate(); + } + + public override string GetResourcePath(bool isfetch) + { + if (Data.ArenaData.ColosseumData.ColorCodeId == "0") + { + return base.GetResourcePath(isfetch); + } + return Toolbox.ResourcesManager.GetAssetTypePath("menu_arena_colosseum_gp_" + Data.ArenaData.ColosseumData.ColorCodeId, ResourcesManager.AssetLoadPathType.CardMenu, isfetch); + } + + public void NowUpdate() + { + _updateTimer = 0f; + } + + private void OnEnable() + { + NowUpdate(); + } + + private void OnApplicationPause(bool pause) + { + if (!pause) + { + NowUpdate(); + } + } + + private void Update() + { + ArenaColosseum colosseumData = Data.ArenaData.ColosseumData; + if (colosseumData.IsColosseumPeriod) + { + _updateTimer -= Time.deltaTime; + if (_updateTimer < 0f) + { + SystemText systemText = Data.SystemText; + double num = colosseumData.RemainingServerUnixTime + (double)Time.realtimeSinceStartup - (double)colosseumData.RemainingSinceTime; + _updateTimer = (float)(60.0 - num % 60.0); + _nameLabel.text = colosseumData.Name; + string id; + string id2; + string id3; + if (colosseumData.IsRoundPeriod) + { + id = "Colosseum_0044"; + id2 = "Colosseum_0057"; + id3 = "Colosseum_0058"; + } + else + { + id = "Colosseum_0059"; + id2 = "Colosseum_0060"; + id3 = "Colosseum_0061"; + } + string text; + if (num > colosseumData.RemainingUnixTime) + { + text = systemText.Get(id3, "0"); + if (colosseumData.StageNo != ArenaColosseum.eStageNo.FinalStage || (!colosseumData.IsRoundPeriod && colosseumData.IsColosseumPeriod)) + { + ColosseumEntryInfoTask task = new ColosseumEntryInfoTask(); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, ColosseumEntryInfoTaskSuccess)); + } + } + else + { + double num2 = colosseumData.RemainingUnixTime - num; + text = ((num2 < 3600.0) ? systemText.Get(id3, ((int)(num2 / 60.0) + 1).ToString()) : ((!(num2 < 86400.0)) ? systemText.Get(id, ((int)(num2 / 86400.0)).ToString()) : systemText.Get(id2, ((int)(num2 / 3600.0)).ToString()))); + } + if (colosseumData.IsRoundPeriod) + { + string text2 = ((colosseumData.StageNo != ArenaColosseum.eStageNo.FinalStage) ? systemText.Get("Colosseum_0062", systemText.Get("Colosseum_0007", ((int)colosseumData.StageNo).ToString())) : systemText.Get("Colosseum_0062", systemText.Get("Colosseum_0008"))); + _infoTitleLabel.text = text2; + _infoNextRoundLabel.text = systemText.Get("Colosseum_0043"); + _infoTimeLabel.text = text; + if (_isFreeEntryIconDisplayPermission) + { + _freeEntryIcon.SetActive(colosseumData.IsFreeEntry); + } + else + { + _freeEntryIcon.SetActive(value: false); + } + UIManager.GetInstance()._Footer.UpdateArenaBadgeIcon(); + MyPageFreeEntryIcon.SetActive(colosseumData.IsFreeEntry); + } + else + { + string text3 = ((colosseumData.StageNo != ArenaColosseum.eStageNo.Stage1) ? systemText.Get("Colosseum_0045") : systemText.Get("Colosseum_0041")); + string text4 = ((colosseumData.StageNo != ArenaColosseum.eStageNo.FinalStage) ? systemText.Get("Colosseum_0042", systemText.Get("Colosseum_0007", ((int)colosseumData.StageNo).ToString())) : systemText.Get("Colosseum_0042", systemText.Get("Colosseum_0008"))); + _infoTitleLabel.text = text3; + _infoNextRoundLabel.text = text4; + _infoTimeLabel.text = text; + _freeEntryIcon.SetActive(value: false); + UIManager.GetInstance()._Footer.UpdateArenaBadgeIcon(); + MyPageFreeEntryIcon.SetActive(value: false); + } + } + } + SetUILabelParam(); + } + + private void ColosseumEntryInfoTaskSuccess(NetworkTask.ResultCode inResult) + { + _updateTimer = 0.5f; + } + + private void SetUILabelParam() + { + string colorCodeId = Data.ArenaData.ColosseumData.ColorCodeId; + if (colorCodeId == "0") + { + _panelLineSprite.color = ColorCode.Get(eColorCodeId.CARD_PANEL_GP_LINE_SPRITE_COLOR); + base.TitleLabel.applyGradient = true; + base.TitleLabel.gradientTop = ColorCode.Get(eColorCodeId.CARD_PANEL_GP_TITLE_GRAD_TOP); + base.TitleLabel.gradientBottom = ColorCode.Get(eColorCodeId.CARD_PANEL_GP_TITLE_GRAD_BOTTOM); + base.TitleLabel.effectStyle = UILabel.Effect.Outline8; + base.TitleLabel.effectColor = ColorCode.Get(eColorCodeId.CARD_PANEL_GP_TITLE_OUTLINE); + _infoTitleLabel.effectStyle = UILabel.Effect.None; + } + else + { + _panelLineSprite.color = ColorCode.GetWithString("GP" + colorCodeId + "_CARD_PANEL_LINE_SPRITE_COLOR"); + base.TitleLabel.gradientTop = ColorCode.GetWithString("GP" + colorCodeId + "_CARD_PANEL_TITLE_GRAD_TOP"); + base.TitleLabel.gradientBottom = ColorCode.GetWithString("GP" + colorCodeId + "_CARD_PANEL_TITLE_GRAD_BOTTOM"); + base.TitleLabel.effectStyle = UILabel.Effect.Outline8; + base.TitleLabel.effectColor = ColorCode.GetWithString("GP" + colorCodeId + "_CARD_PANEL_TITLE_OUTLINE"); + _infoTitleLabel.effectStyle = UILabel.Effect.Outline8; + _infoTitleLabel.effectColor = ColorCode.GetWithString("GP" + colorCodeId + "_CARD_PANEL_ROUND_INFO_OUTLINE"); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumDetail.cs b/SVSim.BattleEngine/Engine/ColosseumDetail.cs new file mode 100644 index 0000000..db4f1bf --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumDetail.cs @@ -0,0 +1,270 @@ +using System.Collections.Generic; +using UnityEngine; +using Wizard; +using Wizard.ErrorDialog; + +public class ColosseumDetail : MonoBehaviour +{ + private enum eTitleLabel + { + StageName, + TimeStart, + TimeEnd, + Max + } + + private enum eGroupLabel + { + Group, + BattleNum, + BreakThrough, + Retry + } + + [SerializeField] + private UILabel _formatLabel; + + [SerializeField] + private UILabel _timeLabel; + + [SerializeField] + private UILabel _ownStatusLabel; + + [SerializeField] + private UILabel[] _round1TitleLabels; + + [SerializeField] + private UILabel[] _round2TitleLabels; + + [SerializeField] + private UILabel[] _round3TitleLabels; + + [SerializeField] + private UILabel[] _round1GroupLabels; + + [SerializeField] + private UILabel[] _round2GroupALabels; + + [SerializeField] + private UILabel[] _round2GroupBLabels; + + [SerializeField] + private UILabel[] _round3GroupALabels; + + [SerializeField] + private UILabel[] _round3GroupBLabels; + + public void Init(DialogBase inDialog) + { + SystemText systemText = Wizard.Data.SystemText; + ArenaColosseum colosseumData = Wizard.Data.ArenaData.ColosseumData; + inDialog.SetSize(DialogBase.Size.M); + inDialog.SetTitleLabel(systemText.Get("Common_0022")); + inDialog.SetButtonLayout(DialogBase.ButtonLayout.GrayBtn_GrayBtn); + inDialog.SetButtonText(systemText.Get("Colosseum_0023"), systemText.Get("Colosseum_0025")); + inDialog.onPushButton1 = delegate + { + if (!string.IsNullOrEmpty(Wizard.Data.ArenaData.ColosseumData.AnnounceNo)) + { + UIManager.GetInstance().WebViewHelper.OpenAnnounceWebView(Wizard.Data.ArenaData.ColosseumData.AnnounceNo); + } + else + { + Dialog.Create(4416); + } + }; + inDialog.onPushButton2 = delegate + { + if (Wizard.Data.ArenaData.ColosseumData.Rule == ArenaColosseum.eRule.Avatar) + { + UIManager.GetInstance().StartFirstTips(FirstTips.TipsType.HeroesGrandPrix); + } + else if (Wizard.Data.ArenaData.ColosseumData.Rule == ArenaColosseum.eRule.WindFall) + { + UIManager.GetInstance().StartFirstTips(FirstTips.TipsType.ColosseumWindFall); + } + else if (Wizard.Data.ArenaData.ColosseumData.Rule == ArenaColosseum.eRule.TwoPickChaos) + { + UIManager.GetInstance().StartFirstTips(FirstTips.TipsType.Colosseum2PickChaos, null, 0, Wizard.Data.ArenaData.ColosseumData.ChaoseTipsId); + } + else + { + UIManager.GetInstance().CheckFirstTips(FirstTips.TipsType.ColosseumInfo); + } + }; + inDialog.isNotCloseWindowButton1 = true; + inDialog.isNotCloseWindowButton2 = true; + string text = colosseumData.Rule switch + { + ArenaColosseum.eRule.TwoPick => (colosseumData.IsNormalTwoPick ? systemText.Get("Arena_0002") : systemText.Get("Colosseum_0105")) + " " + systemText.Get("Colosseum_0093"), + ArenaColosseum.eRule.TwoPickChaos => systemText.Get("Chaos_FormatName"), + ArenaColosseum.eRule.HOF => systemText.Get("Colosseum_0108"), + ArenaColosseum.eRule.WindFall => systemText.Get("Colosseum_0115"), + ArenaColosseum.eRule.Crossover => systemText.Get("Common_0166"), + ArenaColosseum.eRule.MyRotation => systemText.Get("Common_0178"), + ArenaColosseum.eRule.Avatar => systemText.Get("HeroesBattle_0001"), + _ => ((colosseumData.DeckFormat == Format.Rotation) ? systemText.Get("Common_0154") : systemText.Get("Common_0155")) + systemText.Get("Colosseum_0093"), + }; + _formatLabel.text = systemText.Get("Colosseum_0054", text); + _timeLabel.text = systemText.Get("Colosseum_0084", colosseumData.ColosseumTimeText); + OwnStatusLabelUpdate(); + List list = new List(); + list.Add(_round1TitleLabels); + list.Add(_round2TitleLabels); + list.Add(_round3TitleLabels); + for (int num = 1; num < 4; num++) + { + UILabel[] array = list[num - 1]; + ArenaColosseum.eRound eRound = (ArenaColosseum.eStageNo)num switch + { + ArenaColosseum.eStageNo.Stage1 => ArenaColosseum.eRound.Round1, + ArenaColosseum.eStageNo.Stage2 => ArenaColosseum.eRound.Round2A, + _ => ArenaColosseum.eRound.FinalA, + }; + UILabel uILabel = array[0]; + if (num == 3) + { + uILabel.text = systemText.Get("Colosseum_0008"); + } + else + { + uILabel.text = systemText.Get("Colosseum_0007", num.ToString()); + } + UILabel uILabel2 = array[1]; + uILabel2.text = colosseumData.DetailData[(int)(eRound - 1)].RoundTimeStartText; + UILabel uILabel3 = array[2]; + uILabel3.text = colosseumData.DetailData[(int)(eRound - 1)].RoundTimeEndText; + if (num == (int)colosseumData.FocusStageNo) + { + uILabel.text = AddColorCode(uILabel.text); + uILabel2.text = AddColorCode(uILabel2.text); + uILabel3.text = AddColorCode(uILabel3.text); + } + } + List list2 = new List(); + list2.Add(_round1GroupLabels); + list2.Add(_round2GroupBLabels); + list2.Add(_round2GroupALabels); + list2.Add(_round3GroupBLabels); + list2.Add(_round3GroupALabels); + for (int num2 = 1; num2 < 6; num2++) + { + UILabel[] array = list2[num2 - 1]; + array[0].text = colosseumData.DetailData[num2 - 1].GroupName; + array[1].text = systemText.Get("Colosseum_0075", colosseumData.DetailData[num2 - 1].MaxBattleNum.ToString()); + if (num2 >= 4) + { + array[3].text = systemText.Get("Colosseum_0088", colosseumData.DetailData[num2 - 1].MaxEntryNum.ToString()); + } + else + { + array[3].text = systemText.Get("Colosseum_0078", colosseumData.DetailData[num2 - 1].MaxEntryNum.ToString()); + } + UILabel uILabel4 = array[2]; + if (num2 == 1) + { + string text2 = systemText.Get("Colosseum_0076", colosseumData.DetailData[num2 - 1].BreakThroughNum.ToString(), systemText.Get("Colosseum_0020")); + string text3 = systemText.Get("Colosseum_0080", (colosseumData.DetailData[num2 - 1].BreakThroughNum - 1).ToString(), systemText.Get("Colosseum_0021")); + uILabel4.text = text2 + "\n" + text3; + } + else if (num2 >= 4) + { + uILabel4.text = systemText.Get("Colosseum_0104", colosseumData.FinalRoundEliminateCount.ToString()); + } + else + { + switch (num2) + { + case 3: + { + string text4 = systemText.Get("Colosseum_0076_Group", colosseumData.DetailData[num2 - 1].BreakThroughNum.ToString(), systemText.Get("Colosseum_0020")); + string text5 = systemText.Get("Colosseum_0076_Group", colosseumData.DetailData[1].BreakThroughNum.ToString(), systemText.Get("Colosseum_0021")); + uILabel4.text = text4 + "\n" + text5; + break; + } + case 2: + uILabel4.text = systemText.Get("Colosseum_0076_Group", colosseumData.DetailData[num2 - 1].BreakThroughNum.ToString(), systemText.Get("Colosseum_0021")); + break; + } + } + if (colosseumData.GetStageNoFromRoundId((ArenaColosseum.eRound)num2) == colosseumData.FocusStageNo) + { + for (int num3 = 0; num3 < array.Length; num3++) + { + array[num3].text = AddColorCode(array[num3].text); + } + } + } + } + + private void OwnStatusLabelUpdate() + { + SystemText systemText = Wizard.Data.SystemText; + ArenaColosseum colosseumData = Wizard.Data.ArenaData.ColosseumData; + _ownStatusLabel.text = string.Empty; + if (colosseumData.IsClear) + { + _ownStatusLabel.text = systemText.Get("Colosseum_0038", colosseumData.Name); + } + else if (colosseumData.IsFinalRound()) + { + _ownStatusLabel.text = string.Empty; + } + else if (!colosseumData.IsRoundPeriod && colosseumData.StageNo == ArenaColosseum.eStageNo.Stage1) + { + _ownStatusLabel.text = string.Empty; + } + else if (!colosseumData.IsRoundPeriod) + { + if (colosseumData.StageNo == ArenaColosseum.eStageNo.Stage2) + { + if (colosseumData.NextRound == ArenaColosseum.eRound.Round2A || colosseumData.NextRound == ArenaColosseum.eRound.Round2B) + { + _ownStatusLabel.text = systemText.Get("Colosseum_0048", colosseumData.GetGroupText(colosseumData.NextRound)); + } + } + else if (colosseumData.StageNo == ArenaColosseum.eStageNo.FinalStage) + { + if (colosseumData.NextRound == ArenaColosseum.eRound.Undecided || colosseumData.NextRound == ArenaColosseum.eRound.Lose) + { + _ownStatusLabel.text = systemText.Get("Colosseum_0052"); + } + else if (colosseumData.NextRound == ArenaColosseum.eRound.FinalA || colosseumData.NextRound == ArenaColosseum.eRound.FinalB) + { + _ownStatusLabel.text = systemText.Get("Colosseum_0037_Group", colosseumData.GetGroupText(colosseumData.NextRound)); + } + } + } + else if (colosseumData.Round == ArenaColosseum.eRound.Round1) + { + if (colosseumData.NextRound == ArenaColosseum.eRound.Round2A || colosseumData.NextRound == ArenaColosseum.eRound.Round2B) + { + _ownStatusLabel.text = systemText.Get("Colosseum_0048", colosseumData.GetGroupText(colosseumData.NextRound)); + } + } + else if ((colosseumData.Round == ArenaColosseum.eRound.Round2A || colosseumData.Round == ArenaColosseum.eRound.Round2B) && colosseumData.NextRound != ArenaColosseum.eRound.Lose) + { + if (colosseumData.NextRound == ArenaColosseum.eRound.Undecided) + { + _ownStatusLabel.text = systemText.Get("Colosseum_0052"); + } + else if (colosseumData.NextRound == ArenaColosseum.eRound.FinalA || colosseumData.NextRound == ArenaColosseum.eRound.FinalB) + { + _ownStatusLabel.text = systemText.Get("Colosseum_0037_Group", colosseumData.GetGroupText(colosseumData.NextRound)); + } + } + else + { + _ownStatusLabel.text = string.Empty; + } + if (_ownStatusLabel.text != string.Empty) + { + _ownStatusLabel.text = AddColorCode(_ownStatusLabel.text); + } + } + + private string AddColorCode(string inOriginalText) + { + return "[fcd24a]" + inOriginalText + "[-]"; + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumEntry.cs b/SVSim.BattleEngine/Engine/ColosseumEntry.cs new file mode 100644 index 0000000..fb088e2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumEntry.cs @@ -0,0 +1,580 @@ +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; + +public class ColosseumEntry : ArenaEntryBase +{ + [SerializeField] + private GameObject _detailPrefab; + + [SerializeField] + private MyPageItemArena _myPageItemArena; + + [SerializeField] + private GameObject _costRoot; + + [SerializeField] + private GameObject _entryStatusRoot; + + [SerializeField] + private UILabel _entryStatusLabel; + + [SerializeField] + private UIButton _entryButton; + + [SerializeField] + private GameObject _infoBase; + + [SerializeField] + private UILabel _formatLabel; + + [SerializeField] + private UILabel _periodLabel; + + [SerializeField] + private UILabel _ownStatusLabel; + + [SerializeField] + private GameObject _twoPickRound1InfoBase; + + [SerializeField] + private UILabel _twoPickFormatLabel; + + [SerializeField] + private UILabel _twoPickPoolLabel; + + [SerializeField] + private UILabel _twoPickPeriodLabel; + + [SerializeField] + private UILabel _twoPickStatusLabel; + + [SerializeField] + private GameObject _twoPickRound2InfoBase; + + [SerializeField] + private UILabel _twoPickRound2FormatLabel; + + [SerializeField] + private UILabel _twoPickRound2PoolLabel; + + [SerializeField] + private UILabel _twoPickRound2PeriodLabel; + + [SerializeField] + private UILabel _twoPickRound2StatusLabel; + + [SerializeField] + private UILabel _retryNumberLabel; + + [SerializeField] + public GameObject _freeEntryIcon; + + private const string ORANGE_COLOR_CODE = "[fcd24a]"; + + private const int FORMAT_LABEL_UP_Y = 49; + + private const int FORMAT_LABEL_CENTER_Y = 14; + + private const int FORMAT_LABEL_UP_Y_FIVE_LINES = 56; + + private const int FORMAT_LABEL_CENTER_FIVE_LINES = 30; + + private const string DECK_DECISION_COLOSSEUM_PATH = "UI/DeckList/DeckDecisionColosseum"; + + private const string DECK_DECISION_COLOSSEUM_FINAL_PATH = "UI/DeckList/DeckDecisionColosseumFinal"; + + private void Awake() + { + EntryBaseInit(_costRoot); + } + + protected override void EntryBaseInit(GameObject costRootObject) + { + base.EntryBaseInit(costRootObject); + SystemText systemText = Data.SystemText; + _entryDialogTitleText = systemText.Get("Colosseum_0003"); + _resumeFunc = Resume; + _isJoinFunc = IsJoin; + _initFunc = Init; + } + + private void Init() + { + if (Data.ArenaData.ColosseumData.IsFreeEntry) + { + _isFreeEntry = true; + _freeEntryFunc = FreeEntry; + } + else + { + _isFreeEntry = false; + } + EntryStatusLabelInit(); + UIManager.SetObjectToGrey(_entryButton.gameObject, !isEntryPossible()); + UILabel componentInChildren = _entryButton.GetComponentInChildren(); + if (isEntryPossible() && _isFreeEntry) + { + componentInChildren.text = Data.SystemText.Get("Colosseum_0103"); + } + else + { + componentInChildren.text = Data.SystemText.Get("Arena_0034"); + } + } + + protected override void EntryDialogCreate(GameObject inDialogObject) + { + inDialogObject.AddComponent().ColosseumEntryClass = this; + } + + private void Resume() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE_TRANS); + if (Data.ArenaData.ColosseumData.IsDeckEntry) + { + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.Colosseum); + } + else + { + EntryTaskSuccess(NetworkTask.ResultCode.Success); + } + } + + private bool IsJoin() + { + return Data.ArenaData.ColosseumData.isJoin; + } + + public void OnClickDetailButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + OpenDetail(); + } + + private void FreeEntry() + { + ColosseumEntryTask colosseumEntryTask = new ColosseumEntryTask(); + colosseumEntryTask.SetParameter(ArenaData.eARENA_PAY.Free); + StartCoroutine(Toolbox.NetworkManager.Connect(colosseumEntryTask, FreeEntryTaskSuccess)); + } + + private void FreeEntryTaskSuccess(NetworkTask.ResultCode inResult) + { + EntryTaskSuccess(inResult); + Data.ArenaData.ColosseumData.IsFreeEntry = false; + _myPageItemArena._colosseumCardPanel.GetComponent().NowUpdate(); + } + + public void EntryTaskSuccess(NetworkTask.ResultCode inResult) + { + Data.ArenaData.ColosseumData.isJoin = true; + if (Data.ArenaData.ColosseumData.IsTwoPickRule || Data.ArenaData.ColosseumData.DeckFormat == Format.Avatar) + { + GameMgr.GetIns().GetDataMgr().m_BattleType = DataMgr.BattleType.ColosseumTwoPick; + Data.CurrentFormat = Format.Max; + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.Colosseum); + } + else + { + UpdateEntryResumeButton(); + GameMgr.GetIns().GetDataMgr().m_BattleType = DataMgr.BattleType.ColosseumNormal; + Data.CurrentFormat = Data.ArenaData.ColosseumData.DeckFormat; + DeckInfoTask task = new DeckInfoTask(); + task.SetParameter(Data.ArenaData.ColosseumData.DeckFormat); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + if (!RunSpecialDeckSelectEntry()) + { + DeckSelectUI.InitOptions initOptions = new DeckSelectUI.InitOptions + { + CanUseNonPossessionCard = Data.ArenaData.ColosseumData.CanUseNonPossessionCard + }; + DeckSelectUIDialog.Create(Data.SystemText.Get("Battle_0488"), task.DeckGroupListData, Data.ArenaData.ColosseumData.DeckFormat, DeckSelectUIDialog.eFormatChangeUIType.SingleFormat, isVisibleCreateNew: true, CreateDeckSelectConfirmDialog, initOptions); + } + })); + } + HeadLineObject.GetComponent().UpdateHeadLine(); + } + + private bool RunSpecialDeckSelectEntry() + { + if (Data.ArenaData.ColosseumData.Rule == ArenaColosseum.eRule.HOF) + { + GameMgr.GetIns().GetDataMgr().m_BattleType = DataMgr.BattleType.ColosseumHof; + ColosseumHOFDeckInfoTask task = new ColosseumHOFDeckInfoTask(); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + List deckGroupList = new List + { + new DeckGroup(task.DeckList, Format.Max, DeckAttributeType.CustomDeck) + }; + DeckSelectUIDialog.Create(Data.SystemText.Get("Colosseum_0109"), new DeckGroupListData(deckGroupList), Format.Max, DeckSelectUIDialog.eFormatChangeUIType.SingleFormat, isVisibleCreateNew: false, CreateDeckSelectConfirmDialog); + })); + return true; + } + if (Data.ArenaData.ColosseumData.Rule == ArenaColosseum.eRule.WindFall) + { + GameMgr.GetIns().GetDataMgr().m_BattleType = DataMgr.BattleType.ColosseumWindFall; + ColosseumWindFallDeckInfoTask task2 = new ColosseumWindFallDeckInfoTask(); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task2, delegate + { + List deckGroupList = new List + { + new DeckGroup(task2.DeckList, Format.Max, DeckAttributeType.CustomDeck) + }; + DeckSelectUIDialog.Create(Data.SystemText.Get("Colosseum_0117"), new DeckGroupListData(deckGroupList), Format.Max, DeckSelectUIDialog.eFormatChangeUIType.SingleFormat, isVisibleCreateNew: false, CreateDeckSelectConfirmDialog); + })); + return true; + } + return false; + } + + private void CreateDeckSelectConfirmDialog(DialogBase dialogDeckList, DeckData deck) + { + if (!deck.IsUsable(Data.ArenaData.ColosseumData.CanUseNonPossessionCard)) + { + InCompleteDeckDecideDialog.Create(dialogDeckList, deck); + return; + } + CompleteDeckDecideDialog completeDeckDecideDialog = CompleteDeckDecideDialog.CreateForSingleDeck(dialogDeckList, deck, showSimpleStageOption: true, delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + DeckSetAndMoveColosseum(deck); + }); + completeDeckDecideDialog.DecisionUI.CardDetailCustomize = delegate(CardDetailUI detailUI) + { + detailUI.IsShowFlavorTextButton = false; + detailUI.IsShowVoiceButton = false; + detailUI.IsShowEvolutionButton = false; + }; + completeDeckDecideDialog.DecisionUI.CardListCustomize = delegate(UICardList cardList) + { + if (Data.ArenaData.ColosseumData.IsSpecialDeckSelectRule) + { + cardList.SetShareButtonUse(isUse: false); + } + if (Data.ArenaData.ColosseumData.IsDeckMaxNumberChange) + { + cardList.SetMaxCardNum(Data.ArenaData.ColosseumData.DeckMaxNumber); + } + }; + if (Data.ArenaData.ColosseumData.Rule == ArenaColosseum.eRule.HOF) + { + completeDeckDecideDialog.DecisionUI.IsCanShowQRCode = false; + } + if (GameMgr.GetIns().GetDataMgr().m_BattleType == DataMgr.BattleType.ColosseumNormal) + { + completeDeckDecideDialog.DecisionUI.gameObject.GetComponent().alpha = 0f; + DeckDecisionColosseum deckDecisionColosseum = Object.Instantiate(Toolbox.ResourcesManager.LoadObject("UI/DeckList/DeckDecisionColosseum", isServerResources: false)); + completeDeckDecideDialog.Dialog.SetObj(deckDecisionColosseum.gameObject); + deckDecisionColosseum.Init(deck); + completeDeckDecideDialog.DecisionUI.transform.SetParent(deckDecisionColosseum.transform.parent.transform); + } + } + + private void DeckSetAndMoveColosseum(DeckData inDeckData) + { + Data.ArenaData.ColosseumData.DeckList.Clear(); + Data.ArenaData.ColosseumData.DeckList.Add(inDeckData); + if (!Data.ArenaData.ColosseumData.IsSpecialDeckSelectRule) + { + DeckListUtility.SaveLastSelectDeck(inDeckData.GetDeckID(), isDefaultDeck: false, isTrialDeck: false, Data.ArenaData.ColosseumData.DeckFormat); + } + BaseTask baseTask = null; + if (Data.ArenaData.ColosseumData.Rule == ArenaColosseum.eRule.HOF) + { + ((ColosseumDeckEntryHOFTask)(baseTask = new ColosseumDeckEntryHOFTask())).SetParameter(Data.ArenaData.ColosseumData.DeckList); + } + else if (Data.ArenaData.ColosseumData.Rule == ArenaColosseum.eRule.WindFall) + { + ((ColosseumWindFallDeckEntry)(baseTask = new ColosseumWindFallDeckEntry())).SetParameter(Data.ArenaData.ColosseumData.DeckList); + } + else if (Data.ArenaData.ColosseumData.DeckFormat == Format.Avatar) + { + ((ColosseumDeckEntryAvatarTask)(baseTask = new ColosseumDeckEntryAvatarTask())).SetParameter(Data.ArenaData.ColosseumData.DeckList); + } + else + { + ((ColosseumDeckEntryTask)(baseTask = new ColosseumDeckEntryTask())).SetParameter(Data.ArenaData.ColosseumData.DeckList, isPublished: false); + } + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(baseTask, delegate + { + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.Colosseum); + })); + } + + public void OpenDetail() + { + ColosseumDetailTask task = new ColosseumDetailTask(); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, DetailTaskSuccess)); + } + + private void DetailTaskSuccess(NetworkTask.ResultCode inResultCode) + { + Data.ArenaData.ColosseumData.CreateDetailDialog(_detailPrefab); + } + + private bool isEntryPossible() + { + ArenaColosseum colosseumData = Data.ArenaData.ColosseumData; + if ((!colosseumData.IsRetry || colosseumData.IsClear || colosseumData.IsFinalRoundTry) && !colosseumData.isJoin) + { + return false; + } + return true; + } + + protected void EntryStatusLabelInit() + { + InfoTextUpdate(); + EntryTextUpdate(); + } + + private void ColosseumDeckDeletedDialogMessageReceiver() + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.S); + if (Data.ArenaData.ColosseumData.IsTwoPickRule) + { + dialogBase.SetText(Data.SystemText.Get("Colosseum_0102")); + } + else + { + dialogBase.SetText(Data.SystemText.Get("Error_4403")); + } + dialogBase.SetTitleLabel(Data.SystemText.Get("Common_0021")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + Data.ArenaData.ColosseumData.IsDeckDeleted = false; + } + + private void InfoTextUpdate() + { + ArenaColosseum colosseumData = Data.ArenaData.ColosseumData; + SystemText systemText = Data.SystemText; + UILabel uILabel = null; + string text = colosseumData.Rule switch + { + ArenaColosseum.eRule.TwoPick => (colosseumData.IsNormalTwoPick ? systemText.Get("Arena_0002") : systemText.Get("Colosseum_0105")) + " " + systemText.Get("Colosseum_0093"), + ArenaColosseum.eRule.TwoPickChaos => systemText.Get("Chaos_FormatName") + " " + systemText.Get("Colosseum_0093"), + ArenaColosseum.eRule.HOF => systemText.Get("Colosseum_0108"), + ArenaColosseum.eRule.WindFall => systemText.Get("Colosseum_0116"), + _ => UIUtil.GetFormatName(colosseumData.DeckFormat) + systemText.Get("Colosseum_0093"), + }; + UILabel uILabel2; + UILabel uILabel3; + UILabel uILabel4; + if (colosseumData.Rule == ArenaColosseum.eRule.TwoPick || colosseumData.Rule == ArenaColosseum.eRule.TwoPickChaos) + { + if (colosseumData.StageNo == ArenaColosseum.eStageNo.Stage2) + { + _infoBase.SetActive(value: false); + _twoPickRound1InfoBase.SetActive(value: false); + _twoPickRound2InfoBase.SetActive(value: true); + uILabel2 = _twoPickRound2FormatLabel; + uILabel3 = _twoPickRound2PoolLabel; + uILabel4 = _twoPickRound2PeriodLabel; + uILabel = _twoPickRound2StatusLabel; + } + else + { + _infoBase.SetActive(value: false); + _twoPickRound1InfoBase.SetActive(value: true); + _twoPickRound2InfoBase.SetActive(value: false); + uILabel2 = _twoPickFormatLabel; + uILabel3 = _twoPickPoolLabel; + uILabel4 = _twoPickPeriodLabel; + uILabel = _twoPickStatusLabel; + } + } + else + { + _infoBase.SetActive(value: true); + _twoPickRound1InfoBase.SetActive(value: false); + _twoPickRound2InfoBase.SetActive(value: false); + uILabel2 = _formatLabel; + uILabel3 = null; + uILabel4 = _periodLabel; + uILabel = _ownStatusLabel; + } + uILabel2.text = systemText.Get("Colosseum_0054", text); + if (colosseumData.IsRoundPeriod) + { + uILabel4.text = colosseumData.NowRoundTimeText; + } + else + { + string text2 = ((colosseumData.StageNo != ArenaColosseum.eStageNo.FinalStage) ? systemText.Get("Colosseum_0007", ((int)colosseumData.StageNo).ToString()) : systemText.Get("Colosseum_0008")); + uILabel4.text = text2 + systemText.Get("Colosseum_0101") + colosseumData.NowRoundTimeText; + } + if (colosseumData.Rule == ArenaColosseum.eRule.TwoPick || colosseumData.Rule == ArenaColosseum.eRule.TwoPickChaos) + { + uILabel3.text = systemText.Get("Arena_0142", colosseumData.CardPool); + } + _ownStatusLabel.text = string.Empty; + _twoPickStatusLabel.text = string.Empty; + _twoPickRound2StatusLabel.text = string.Empty; + if (colosseumData.StageNo == ArenaColosseum.eStageNo.Stage1) + { + if (colosseumData.NextRound == ArenaColosseum.eRound.Round2A || colosseumData.NextRound == ArenaColosseum.eRound.Round2B) + { + uILabel.text = systemText.Get("Colosseum_0048", colosseumData.GetGroupText(colosseumData.NextRound)); + } + } + else if (colosseumData.StageNo == ArenaColosseum.eStageNo.Stage2) + { + string text3 = string.Empty; + string text4 = string.Empty; + if (colosseumData.IsRoundPeriod) + { + if (colosseumData.Round == ArenaColosseum.eRound.Round2A || colosseumData.Round == ArenaColosseum.eRound.Round2B) + { + text3 = systemText.Get("Colosseum_0100", colosseumData.GetGroupText(colosseumData.Round)); + } + if (colosseumData.NextRound == ArenaColosseum.eRound.Undecided) + { + text4 = systemText.Get("Colosseum_0052"); + } + else if (colosseumData.NextRound == ArenaColosseum.eRound.FinalA || colosseumData.NextRound == ArenaColosseum.eRound.FinalB) + { + text4 = systemText.Get("Colosseum_0037_Group", colosseumData.GetGroupText(colosseumData.NextRound)); + } + uILabel.text = text3 + "\n" + text4; + } + else if (colosseumData.NextRound == ArenaColosseum.eRound.Round2A || colosseumData.NextRound == ArenaColosseum.eRound.Round2B) + { + uILabel.text = systemText.Get("Colosseum_0048", colosseumData.GetGroupText(colosseumData.NextRound)); + } + } + else if (colosseumData.StageNo == ArenaColosseum.eStageNo.FinalStage && colosseumData.Round != ArenaColosseum.eRound.Lose) + { + if (colosseumData.IsClear) + { + uILabel.text = systemText.Get("Colosseum_0038", colosseumData.Name); + } + else if (!colosseumData.IsFinalRoundTry) + { + string text5 = string.Empty; + if (colosseumData.IsRoundPeriod) + { + if (colosseumData.Round == ArenaColosseum.eRound.FinalA || colosseumData.Round == ArenaColosseum.eRound.FinalB) + { + text5 = systemText.Get("Colosseum_0100", colosseumData.GetGroupText(colosseumData.Round)); + } + uILabel.text = text5; + } + else if (colosseumData.NextRound == ArenaColosseum.eRound.Lose) + { + uILabel.text = string.Empty; + } + else + { + if (colosseumData.NextRound == ArenaColosseum.eRound.FinalA || colosseumData.NextRound == ArenaColosseum.eRound.FinalB) + { + text5 = systemText.Get("Colosseum_0100", colosseumData.GetGroupText(colosseumData.NextRound)); + } + uILabel.text = text5 + "\n" + systemText.Get("Colosseum_0037"); + } + } + } + if (uILabel.text == string.Empty) + { + if ((colosseumData.Rule == ArenaColosseum.eRule.TwoPick || colosseumData.Rule == ArenaColosseum.eRule.TwoPickChaos) && colosseumData.StageNo == ArenaColosseum.eStageNo.FinalStage) + { + uILabel2.transform.localPosition = new Vector3(uILabel2.transform.localPosition.x, 30f); + } + else + { + uILabel2.transform.localPosition = new Vector3(uILabel2.transform.localPosition.x, 14f); + } + return; + } + if ((colosseumData.Rule == ArenaColosseum.eRule.TwoPick || colosseumData.Rule == ArenaColosseum.eRule.TwoPickChaos) && colosseumData.StageNo == ArenaColosseum.eStageNo.Stage2) + { + uILabel2.transform.localPosition = new Vector3(uILabel2.transform.localPosition.x, 56f); + } + else + { + uILabel2.transform.localPosition = new Vector3(uILabel2.transform.localPosition.x, 49f); + } + uILabel.text = "[fcd24a]" + uILabel.text + "[-]"; + } + + private void EntryTextUpdate() + { + ArenaColosseum colosseumData = Data.ArenaData.ColosseumData; + SystemText systemText = Data.SystemText; + if (!isEntryPossible()) + { + _costRoot.SetActive(value: false); + _entryStatusRoot.SetActive(value: true); + _entryStatusLabel.text = string.Empty; + if (colosseumData.IsClear || colosseumData.IsFinalRoundTry) + { + _entryStatusLabel.text = systemText.Get("Colosseum_0086"); + } + else if (colosseumData.Round == ArenaColosseum.eRound.Lose) + { + _entryStatusLabel.text = systemText.Get("Colosseum_0022"); + } + else if (!colosseumData.IsRoundPeriod) + { + if (colosseumData.StageNo == ArenaColosseum.eStageNo.Stage1) + { + _entryStatusLabel.text = systemText.Get("Colosseum_0064"); + } + else if (colosseumData.NextRound == ArenaColosseum.eRound.Lose) + { + _entryStatusLabel.text = systemText.Get("Colosseum_0022"); + } + else + { + _entryStatusLabel.text = systemText.Get("Colosseum_0056"); + } + } + else if (!colosseumData.IsRetry) + { + if (colosseumData.IsLastDay) + { + _entryStatusLabel.text = systemText.Get("Colosseum_0068"); + } + else + { + _entryStatusLabel.text = systemText.Get("Colosseum_0067"); + } + } + } + else if (colosseumData.IsFreeEntry || colosseumData.IsFinalRound()) + { + _costRoot.SetActive(value: false); + _entryStatusRoot.SetActive(value: true); + if (!colosseumData.IsFinalRound()) + { + string id = "Colosseum_0047"; + if (colosseumData.IsLastDay) + { + id = "Colosseum_0050"; + } + _entryStatusLabel.text = "[fcd24a]" + systemText.Get(id, colosseumData.RetryRemainingNum.ToString()) + "[-]\n\n" + systemText.Get("Colosseum_0026"); + } + else + { + _entryStatusLabel.text = systemText.Get("Colosseum_0092"); + } + } + else + { + _costRoot.SetActive(value: true); + _entryStatusRoot.SetActive(value: false); + } + if (colosseumData.IsLastDay) + { + _retryNumberLabel.text = systemText.Get("Colosseum_0050", colosseumData.RetryRemainingNum.ToString()); + } + else + { + _retryNumberLabel.text = systemText.Get("Colosseum_0047", colosseumData.RetryRemainingNum.ToString()); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumEntryDialog.cs b/SVSim.BattleEngine/Engine/ColosseumEntryDialog.cs new file mode 100644 index 0000000..761beed --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumEntryDialog.cs @@ -0,0 +1,51 @@ +using Cute; +using Wizard; + +public class ColosseumEntryDialog : ArenaEntryDialogBase +{ + public ColosseumEntry ColosseumEntryClass { get; set; } + + protected override void Init() + { + _mainTextId = "Colosseum_0004"; + _ticketSpriteName = "icon_colosseum_s"; + _arenaNameTextId = "Colosseum_0006"; + _entryButtonSe = Se.TYPE.SYS_BTN_DECIDE; + } + + protected override int GetTicketNum() + { + return PlayerStaticData.UserColosseumTicketNum; + } + + protected override ArenaEntryDataBase GetEntryData() + { + return Data.ArenaData.ColosseumData; + } + + protected override void Entry() + { + base.Entry(); + ColosseumEntryTask colosseumEntryTask = new ColosseumEntryTask(); + colosseumEntryTask.SetParameter(_payType); + StartCoroutine(Toolbox.NetworkManager.Connect(colosseumEntryTask, EntryTaskSuccess)); + } + + private void EntryTaskSuccess(NetworkTask.ResultCode inResult) + { + base.ParentDialog.CloseWithoutSelect(); + ColosseumEntryClass.EntryTaskSuccess(inResult); + } + + private void DeckSetAndMoveColosseum(DeckData inDeckData, bool isBattleEnd) + { + Data.ArenaData.ColosseumData.DeckList.Clear(); + Data.ArenaData.ColosseumData.DeckList.Add(inDeckData); + ColosseumDeckEntryTask colosseumDeckEntryTask = new ColosseumDeckEntryTask(); + colosseumDeckEntryTask.SetParameter(Data.ArenaData.ColosseumData.DeckList, isPublished: false); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(colosseumDeckEntryTask, delegate + { + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.Colosseum); + })); + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumHeadLine.cs b/SVSim.BattleEngine/Engine/ColosseumHeadLine.cs new file mode 100644 index 0000000..d2868d1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumHeadLine.cs @@ -0,0 +1,51 @@ +using UnityEngine; +using Wizard; + +public class ColosseumHeadLine : MonoBehaviour +{ + [SerializeField] + private UILabel _ticketNum; + + [SerializeField] + private UILabel _ticketCost; + + [SerializeField] + private UILabel _rupyNum; + + [SerializeField] + private UILabel _rupyCost; + + [SerializeField] + private UILabel _crystalNum; + + [SerializeField] + private UILabel _crystalCost; + + private void OnEnable() + { + UpdateHeadLine(); + } + + public void UpdateHeadLine() + { + int ticketCost = Data.ArenaData.ColosseumData.ticketCost; + int rupyCost = Data.ArenaData.ColosseumData.rupyCost; + int crystalCost = Data.ArenaData.ColosseumData.crystalCost; + SystemText systemText = Data.SystemText; + if (_ticketNum != null) + { + _ticketNum.text = PlayerStaticData.UserColosseumTicketNum.ToString(); + _ticketCost.text = systemText.Get("Arena_0045", ticketCost.ToString()); + } + if (_rupyNum != null) + { + _rupyNum.text = PlayerStaticData.UserRupyCount.ToString(); + _rupyCost.text = systemText.Get("Arena_0047", rupyCost.ToString()); + } + if (_crystalNum != null) + { + _crystalNum.text = PlayerStaticData.UserCrystalCount.ToString(); + _crystalCost.text = systemText.Get("Arena_0046", crystalCost.ToString()); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumResultAnimationAgent.cs b/SVSim.BattleEngine/Engine/ColosseumResultAnimationAgent.cs new file mode 100644 index 0000000..eeead7c --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumResultAnimationAgent.cs @@ -0,0 +1,220 @@ +using System.Collections; +using UnityEngine; +using Wizard; + +public class ColosseumResultAnimationAgent : ResultAnimationAgent +{ + private const float OBJECT_APPEAR_MOVE_SEC = 0.5f; + + private const float RESULT_TITLE_DELAY_SEC = 0f; + + private const float CLASS_CHAR_DELAY_SEC = 0.1f; + + private const float CLASS_INFO_DELAY_SEC = 0.3f; + + private const float GAUGE_WAIT_SEC = 0.5f; + + public override IEnumerator RunUI(BattleResultUIController battleResultControl, INextSceneSelector nextSceneSelector, bool isWin) + { + m_BattleCamera.m_CutInCamera.gameObject.SetActive(value: false); + if (battleResultControl.ResultReporter.LotteryData.IsEnable) + { + yield return LoadLotteryImage(battleResultControl.ResultReporter.LotteryData); + } + if (battleResultControl.IsDraw) + { + battleResultControl.TitleWin.gameObject.SetActive(value: false); + battleResultControl.TitleLose.gameObject.SetActive(value: false); + battleResultControl.TitleDraw.gameObject.SetActive(value: true); + battleResultControl.TitleDraw.transform.localScale = Vector3.one * 10f; + battleResultControl.TitleDraw.alpha = 0f; + battleResultControl.Bg.color = new Color32(0, 48, 16, 0); + battleResultControl.ResultTitle.spriteName = "result_top_lose"; + } + else if (isWin) + { + battleResultControl.TitleWin.gameObject.SetActive(value: true); + battleResultControl.TitleLose.gameObject.SetActive(value: false); + battleResultControl.TitleDraw.gameObject.SetActive(value: false); + battleResultControl.TitleWin.transform.localScale = Vector3.one * 10f; + battleResultControl.TitleWin.alpha = 0f; + battleResultControl.Bg.color = new Color32(32, 24, 0, 0); + battleResultControl.ResultTitle.spriteName = "result_top_win"; + } + else + { + battleResultControl.TitleWin.gameObject.SetActive(value: false); + battleResultControl.TitleLose.gameObject.SetActive(value: true); + battleResultControl.TitleDraw.gameObject.SetActive(value: false); + battleResultControl.TitleLose.transform.localScale = Vector3.one * 10f; + battleResultControl.TitleLose.alpha = 0f; + battleResultControl.Bg.color = new Color32(0, 24, 48, 0); + battleResultControl.ResultTitle.spriteName = "result_top_lose"; + } + battleResultControl.MainPanel.alpha = 1f; + yield return new WaitForSeconds(0.1f); + if (battleResultControl.IsDraw) + { + TweenAlpha.Begin(battleResultControl.TitleDraw.gameObject, 0.2f, 1f); + iTween.ScaleTo(battleResultControl.TitleDraw.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_YOULOSE); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_JINGLE_LOSE); + } + else if (isWin) + { + TweenAlpha.Begin(battleResultControl.TitleWin.gameObject, 0.2f, 1f); + iTween.ScaleTo(battleResultControl.TitleWin.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_YOUWIN); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_JINGLE_WIN); + } + else + { + TweenAlpha.Begin(battleResultControl.TitleLose.gameObject, 0.2f, 1f); + iTween.ScaleTo(battleResultControl.TitleLose.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_YOULOSE); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_JINGLE_LOSE); + } + TweenAlpha.Begin(battleResultControl.Bg.gameObject, 0.5f, 0.75f); + yield return new WaitForSeconds(0.2f); + TweenAlpha.Begin(battleResultControl.ArcaneIn.gameObject, 0.5f, 1f); + TweenAlpha.Begin(battleResultControl.ArcaneOut.gameObject, 0.5f, 1f); + iTween.ScaleTo(battleResultControl.ArcaneIn.gameObject, iTween.Hash("scale", Vector3.one, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.ScaleTo(battleResultControl.ArcaneOut.gameObject, iTween.Hash("scale", Vector3.one, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + if (battleResultControl.IsDraw) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_TITLE_3, Vector3.zero); + battleResultControl.TitleDraw.transform.localScale = Vector3.one; + iTween.ScaleTo(battleResultControl.TitleDraw.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.linear)); + } + else if (isWin) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_TITLE_1, Vector3.zero); + battleResultControl.TitleWin.transform.localScale = Vector3.one; + iTween.ScaleTo(battleResultControl.TitleWin.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.linear)); + } + else + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_TITLE_2, Vector3.zero); + battleResultControl.TitleLose.transform.localScale = Vector3.one; + iTween.ScaleTo(battleResultControl.TitleLose.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.linear)); + } + HideEmotionMessage(); + if (battleResultControl.ResultMsgWindowFlag) + { + StartCoroutine(battleResultControl.ShowSpecialResultInfo()); + } + yield return new WaitForSeconds(2f); + if (battleResultControl.IsDraw) + { + TweenAlpha.Begin(battleResultControl.TitleDraw.gameObject, 0.2f, 0f); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_BACK_3, battleResultControl.AnchorBottom.transform.position, battleResultControl.AnchorBottom.gameObject); + } + else + { + if (ShowRewardDialog(battleResultControl)) + { + while (battleResultControl.IsRewardWait) + { + yield return null; + } + } + if (battleResultControl.ResultReporter.LotteryData.IsEnable) + { + yield return CreateLotteryDialog(battleResultControl.ResultReporter.LotteryData); + } + if (isWin) + { + TweenAlpha.Begin(battleResultControl.TitleWin.gameObject, 0.2f, 0f); + iTween.ScaleTo(battleResultControl.TitleWin.gameObject, iTween.Hash("scale", Vector3.one * 3f, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_BACK_1, battleResultControl.AnchorBottom.transform.position, battleResultControl.AnchorBottom.gameObject); + } + else + { + TweenAlpha.Begin(battleResultControl.TitleLose.gameObject, 0.2f, 0f); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_BACK_2, battleResultControl.AnchorBottom.transform.position, battleResultControl.AnchorBottom.gameObject); + } + } + yield return new WaitForSeconds(0.2f); + if (isWin) + { + GameMgr.GetIns().GetSoundMgr().PlayBGM(Bgm.BGM_TYPE.SYS_WIN_LOOP); + } + else + { + GameMgr.GetIns().GetSoundMgr().PlayBGM(Bgm.BGM_TYPE.SYS_LOSE_LOOP); + } + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_WINDOW_APPER); + iTween.MoveTo(battleResultControl.ClassCharObj.gameObject, iTween.Hash("position", battleResultControl.DefaultPosDict["ClassCharObj"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(battleResultControl.ResultTitle.gameObject, iTween.Hash("position", battleResultControl.DefaultPosDict["ResultTitle"], "time", 0.5f, "delay", 0f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(battleResultControl.ClassInfo.gameObject, iTween.Hash("position", battleResultControl.DefaultPosDict["ClassInfo"], "time", 0.5f, "delay", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + yield return new WaitForSeconds(1f); + if (isWin) + { + PlayWinVoice(); + } + if (battleResultControl.AddClassExp > 0) + { + battleResultControl.SettingAddClassExpTextAnimation(); + yield return new WaitForSeconds(0.5f); + yield return PlayGaugeUpSe(); + yield return new WaitForSeconds(0.5f); + } + ArenaColosseum colosseumData = Data.ArenaData.ColosseumData; + if (colosseumData.ResultEffect != ArenaColosseum.eResultEffect.None) + { + if (colosseumData.ResultEffect == ArenaColosseum.eResultEffect.GroupA) + { + battleResultControl.TitleMatch.spriteName = "colosseum_battle_title_01"; + } + else if (colosseumData.ResultEffect == ArenaColosseum.eResultEffect.Final) + { + battleResultControl.TitleMatch.spriteName = "colosseum_battle_title_02"; + } + else + { + battleResultControl.TitleMatch.spriteName = "colosseum_battle_title_03"; + } + StartCoroutine(battleResultControl.RunMatch()); + yield return new WaitForSeconds(3f); + } + bool isFinishBattlePass = false; + battleResultControl.SetBattlePassGauge(delegate + { + isFinishBattlePass = true; + }); + while (!isFinishBattlePass) + { + yield return null; + } + if (Data.RedEtherCampaignResultData != null) + { + bool isFinishRedEther = false; + RedEtherCampaignPanel.Create(battleResultControl.gameObject, Data.RedEtherCampaignResultData, battleResultControl, delegate + { + isFinishRedEther = true; + }); + while (!isFinishRedEther) + { + yield return null; + } + yield return ShowRewardDialog(Data.RedEtherCampaignResultData.RewardList); + } + nextSceneSelector.Show(); + battleResultControl.PrepareAchievementLog(); + battleResultControl.FinishResult(); + battleResultControl.GreySpriteBGVisible = false; + } + + private IEnumerator PlayGaugeUpSe() + { + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + int i = 0; + while (i < 10) + { + soundMgr.PlaySe(Se.TYPE.SYS_RESULT_GAUGEUP); + yield return new WaitForSeconds(0.05f); + int num = i + 1; + i = num; + } + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumResultAnimationHandler.cs b/SVSim.BattleEngine/Engine/ColosseumResultAnimationHandler.cs new file mode 100644 index 0000000..b33fb21 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumResultAnimationHandler.cs @@ -0,0 +1,22 @@ +using UnityEngine; + +public class ColosseumResultAnimationHandler : IResultAnimationHandler +{ + private readonly GameObject m_resultAnimationAgentObj; + + private readonly ColosseumResultAnimationAgent m_resultAnimationAgentIns; + + public ResultAnimationAgent m_resultAnimationAgent => m_resultAnimationAgentIns; + + public ColosseumResultAnimationHandler(BattleCamera battleCamera) + { + m_resultAnimationAgentObj = new GameObject(); + m_resultAnimationAgentIns = m_resultAnimationAgentObj.AddComponent(); + m_resultAnimationAgentIns.GetComponent().SetBattleCamera(battleCamera); + } + + public void Destroy() + { + Object.Destroy(m_resultAnimationAgentObj); + } +} diff --git a/SVSim.BattleEngine/Engine/ColosseumResultReporter.cs b/SVSim.BattleEngine/Engine/ColosseumResultReporter.cs new file mode 100644 index 0000000..17fa231 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ColosseumResultReporter.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using LitJson; +using Wizard; +using Wizard.Lottery; + +public class ColosseumResultReporter : IBattleResultReporter +{ + public bool IsEnd => Data.ColosseumBattleFinish.data != null; + + public int ClassExp => GetClassExp(); + + public List UserAchievement => GetUserAchievementList(); + + public List UserMission => GetUserMissionList(); + + public List MissionRewards => Data.ColosseumBattleFinish.data._missionRewards; + + public List VictoryRewards => null; + + public LotteryApplyData LotteryData => Data.ColosseumBattleFinish.data.AchievedInfo._lotteryData; + + public bool IsDataExist + { + get + { + if (Data.ColosseumBattleFinish.data != null) + { + return Data.ColosseumBattleFinish.data.IsProcessed; + } + return false; + } + } + + public MyPageHomeDialogData HomeDialogData => null; + + public void Report(bool isWin) + { + } + + public void Destroy() + { + } + + public JsonData GetFinishResponseData() + { + return Data.ColosseumBattleFinish.data._responseData; + } + + public List GetUserAchievementList() + { + return Data.ColosseumBattleFinish.data.achieved_achievement_list; + } + + public List GetUserMissionList() + { + return Data.ColosseumBattleFinish.data.achieved_mission_list; + } + + public int GetClassExp() + { + return Data.ColosseumBattleFinish.data.get_class_chara_experience; + } +} diff --git a/SVSim.BattleEngine/Engine/CommonBackGround.cs b/SVSim.BattleEngine/Engine/CommonBackGround.cs new file mode 100644 index 0000000..6f22246 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CommonBackGround.cs @@ -0,0 +1,166 @@ +using System; +using Cute; +using UnityEngine; + +public class CommonBackGround : UIBase +{ + public enum eBGType + { + NONE, + MORNING, + DAYTIME, + NIGHTTIME + } + + private const string LAYER_NAME_FRONT = "FrontUI"; + + private const int MorningStartTime = 4; + + private const int DayStartTime = 10; + + private const int NightStartTime = 18; + + private const string MorningTimeBGStr = "bg_mypage_morning"; + + private const string DayTimeBGStr = "bg_mypage_day"; + + private const string NightTimeBGStr = "bg_mypage_night"; + + private static CommonBackGround _instance; + + [SerializeField] + private UITexture MypageBG; + + [SerializeField] + private GameObject MagicCircle; + + [SerializeField] + public ParticleSystem[] BgEffects; + + [SerializeField] + private GameObject _effectRoot; + + private eBGType _BGType; + + private bool _bgFinishLoad; + + private string _bgPath; + + private EffectSetUp _currentEffectSetup; + + public static CommonBackGround Instance => _instance; + + public eBGType BGType => _BGType; + + public bool IsFinishLod => _bgFinishLoad; + + public bool EffectVisible + { + set + { + _effectRoot.SetActive(value); + } + } + + private void Awake() + { + _instance = this; + } + + protected override void onOpen() + { + base.onOpen(); + ChangeMyPageBG(); + } + + protected override void OnDestroy() + { + base.OnDestroy(); + _instance = null; + ReleaseMyPageBG(); + _BGType = eBGType.NONE; + MagicCircle.GetComponent().mainTexture = null; + } + + private void ReleaseMyPageBG() + { + MypageBG.mainTexture = null; + Toolbox.ResourcesManager.RemoveAsset(_bgPath); + _bgPath = ""; + } + + public void ChangeMyPageBG() + { + int hour = DateTime.Now.Hour; + eBGType eBGType; + string newBgStr; + if (hour >= 4 && hour < 10) + { + eBGType = eBGType.MORNING; + newBgStr = "bg_mypage_morning"; + } + else if (hour >= 10 && hour < 18) + { + eBGType = eBGType.DAYTIME; + newBgStr = "bg_mypage_day"; + } + else + { + eBGType = eBGType.NIGHTTIME; + newBgStr = "bg_mypage_night"; + } + if (_BGType == eBGType) + { + return; + } + _bgFinishLoad = false; + _BGType = eBGType; + ResourcesManager resMgr = Toolbox.ResourcesManager; + string newBgPath = resMgr.GetAssetTypePath(newBgStr, ResourcesManager.AssetLoadPathType.Background); + resMgr.StartCoroutine_LoadAssetGroupAsync(newBgPath, delegate + { + _bgFinishLoad = true; + MypageBG.mainTexture = resMgr.LoadObject(resMgr.GetAssetTypePath(newBgStr, ResourcesManager.AssetLoadPathType.Background, isfetch: true)) as Texture; + if (_bgPath != null) + { + resMgr.RemoveAsset(_bgPath); + } + _bgPath = newBgPath; + ChangeBgEffect(); + }); + } + + private void ChangeBgEffect() + { + BgEffects[0].gameObject.SetActive(value: false); + BgEffects[1].gameObject.SetActive(value: false); + BgEffects[2].gameObject.SetActive(value: false); + ParticleSystem bgEffectNow = GetBgEffectNow(_BGType); + bgEffectNow.gameObject.SetActive(value: true); + _currentEffectSetup = bgEffectNow.GetComponent(); + } + + public ParticleSystem GetBgEffectNow(eBGType myPageBgType) + { + return myPageBgType switch + { + eBGType.MORNING => BgEffects[2], + eBGType.DAYTIME => BgEffects[0], + _ => BgEffects[1], + }; + } + + public void SetMagicCircle(bool isVisible) + { + MagicCircle.SetActive(isVisible); + } + + public bool IsFinishEffectLoading() + { + if (_currentEffectSetup != null) + { + return _currentEffectSetup.isFinished; + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/ConditionSkillFilterCollection.cs b/SVSim.BattleEngine/Engine/ConditionSkillFilterCollection.cs new file mode 100644 index 0000000..b6e7e9c --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConditionSkillFilterCollection.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Wizard; + +public class ConditionSkillFilterCollection : SkillFilterCollectionBase +{ + private const int CAP_CONDITION = 8; + + public List ConditionCheckerFilterList { get; set; } + + public List VariableCompareFilter { get; set; } + + public List AnyConditionFilter { get; set; } + + public ConditionSkillFilterCollection() + { + ConditionCheckerFilterList = new List(8); + VariableCompareFilter = new List(); + AnyConditionFilter = new List(); + } + + public bool Filtering(BattlePlayerReadOnlyInfoPair playerInfoPair, BattleCardBase ownerCard, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue, bool isPrePlay, SkillBase skill, bool isSkipTargetAiSelect = false) + { + SkillCollectionBase.SetupOptionValue(optionValue, playerInfoPair, ownerCard, skill, checkerOption, isPrePlay); + bool flag = true; + bool flag2 = true; + bool flag3 = true; + bool flag4 = true; + if (VariableCompareFilter.Count() != 0) + { + bool flag5 = VariableCompareFilter.All((SkillVariableComareFilter s) => s.Filtering(optionValue)); + if (isSkipTargetAiSelect && VariableCompareFilter.FirstOrDefault().Lhs.Contains("hand_other_self") && ownerCard.SelfBattlePlayer.HandCardList.Count > 0) + { + flag5 = true; + } + bool flag6 = ConditionCheckerFilterList.Where((ISkillConditionChecker f) => f is SkillPreprocessBase).All((ISkillConditionChecker f) => f.IsRight(playerInfoPair, checkerOption)); + flag = flag5 && flag6; + } + Func> checkRightFunc; + if (isPrePlay) + { + checkRightFunc = (ISkillConditionChecker f) => f.IsRightPrePlay; + } + else + { + checkRightFunc = (ISkillConditionChecker f) => f.IsRight; + } + if (ConditionCheckerFilterList.Count() != 0) + { + flag2 = ConditionCheckerFilterList.All((ISkillConditionChecker c) => checkRightFunc(c)(playerInfoPair, checkerOption, arg3: false)); + } + if (AnyConditionFilter.Count > 0) + { + flag3 = AnyConditionFilter.All((SkillAnyConditionFilter c) => c.Filtering(playerInfoPair, ownerCard, checkerOption, optionValue, isPrePlay, skill, isSkipTargetAiSelect)); + } + if (base.BattlePlayerFilter != null) + { + flag4 = FilteringBase(playerInfoPair, checkerOption, optionValue, isSkipTargetAiSelect).Any(); + } + return flag && flag2 && flag4 && flag3; + } +} diff --git a/SVSim.BattleEngine/Engine/ConnectionReportTrigger.cs b/SVSim.BattleEngine/Engine/ConnectionReportTrigger.cs new file mode 100644 index 0000000..c05e016 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConnectionReportTrigger.cs @@ -0,0 +1,12 @@ +using Wizard; + +public class ConnectionReportTrigger +{ + public static void ConnectionReport(NetworkBattleManagerBase networkBattleManager) + { + LocalLog.AddGungnirLog("ConnectionReport"); + networkBattleManager.disconnectToDispChecker.StartChecker(); + networkBattleManager.disconnectToDispChecker.EraseDisp(); + networkBattleManager.disconnectToLoseChecker.StartChecker(); + } +} diff --git a/SVSim.BattleEngine/Engine/ConnectionReporter.cs b/SVSim.BattleEngine/Engine/ConnectionReporter.cs new file mode 100644 index 0000000..fab6daa --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConnectionReporter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections; +using Cute; +using UnityEngine; + +public class ConnectionReporter +{ + private const float DEFAULT_INTERVAL = 10f; + + private Coroutine coroutine; + + private readonly MonoBehaviour runner; + + private readonly Action report; + + private readonly float interval; + + public ConnectionReporter(MonoBehaviour runner, Action report, float interval = 10f) + { + this.runner = runner; + this.report = report; + this.interval = interval; + } + + public void StopReporter() + { + if (coroutine != null) + { + runner.StopCoroutine(coroutine); + coroutine = null; + } + } + + public void StartReporter() + { + if (coroutine == null && runner != null) + { + coroutine = runner.StartCoroutine(LoopCoroutine()); + } + } + + private IEnumerator LoopCoroutine() + { + WaitForSeconds secondWait = new WaitForSeconds(interval); + while (true) + { + report.Call(); + yield return secondWait; + } + } +} diff --git a/SVSim.BattleEngine/Engine/ConsistencyReportButtonAction.cs b/SVSim.BattleEngine/Engine/ConsistencyReportButtonAction.cs new file mode 100644 index 0000000..6e668fd --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConsistencyReportButtonAction.cs @@ -0,0 +1,10 @@ +using Wizard; +using Wizard.UI.ReportToManagement; + +public static class ConsistencyReportButtonAction +{ + public static void CreateReportConfirmWindow() + { + DialogReportToManagement.Create(ToolboxGame.RealTimeNetworkAgent.GetBattleId()); + } +} diff --git a/SVSim.BattleEngine/Engine/ContentKeywordExt.cs b/SVSim.BattleEngine/Engine/ContentKeywordExt.cs new file mode 100644 index 0000000..0ef284d --- /dev/null +++ b/SVSim.BattleEngine/Engine/ContentKeywordExt.cs @@ -0,0 +1,14 @@ +internal static class ContentKeywordExt +{ + public static string ToStringCustom(this SkillFilterCreator.ContentKeyword type) + { + return type switch + { + SkillFilterCreator.ContentKeyword._class => "class", + SkillFilterCreator.ContentKeyword._true => "true", + SkillFilterCreator.ContentKeyword._false => "false", + SkillFilterCreator.ContentKeyword._ref_prev => "<-", + _ => type.ToString(), + }; + } +} diff --git a/SVSim.BattleEngine/Engine/Convention/Offline.cs b/SVSim.BattleEngine/Engine/Convention/Offline.cs new file mode 100644 index 0000000..ae4c9e3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Convention/Offline.cs @@ -0,0 +1,13 @@ +namespace Convention; + +public class Offline +{ + public const int CARD_NUMBER_OF_POSSESSION = 3; + + public static bool IsConventionMode { get; set; } + + public static void OnSoftwareReset() + { + IsConventionMode = false; + } +} diff --git a/SVSim.BattleEngine/Engine/ConventionDeckDeleteTask.cs b/SVSim.BattleEngine/Engine/ConventionDeckDeleteTask.cs new file mode 100644 index 0000000..60cfd1b --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConventionDeckDeleteTask.cs @@ -0,0 +1,27 @@ +using Wizard; + +public class ConventionDeckDeleteTask : BaseTask +{ + public class ConventionDeckDeleteTaskParam : BaseParam + { + public string tournament_id; + + public int[] deck_no_list; + + public int deck_format; + } + + public ConventionDeckDeleteTask() + { + base.type = ApiType.Type.ConventionDeckDelete; + } + + public void SetParameter(string tournament_id, int[] deck_no, Format format) + { + ConventionDeckDeleteTaskParam conventionDeckDeleteTaskParam = new ConventionDeckDeleteTaskParam(); + conventionDeckDeleteTaskParam.tournament_id = tournament_id; + conventionDeckDeleteTaskParam.deck_no_list = deck_no; + conventionDeckDeleteTaskParam.deck_format = Data.FormatConvertApi(format); + base.Params = conventionDeckDeleteTaskParam; + } +} diff --git a/SVSim.BattleEngine/Engine/ConventionInfo.cs b/SVSim.BattleEngine/Engine/ConventionInfo.cs new file mode 100644 index 0000000..9d0c7b8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConventionInfo.cs @@ -0,0 +1,41 @@ +using System; +using LitJson; +using Wizard; + +public class ConventionInfo +{ + public enum ConventionStatus + { + DeckEntry = 1, + GameStart + } + + public ConventionStatus Status { get; private set; } + + public string Id { get; private set; } + + public string Name { get; private set; } + + public string DeckEntryLimitText { get; private set; } + + public string StartTime { get; private set; } + + public BattleParameter BattleParameterInstance { get; set; } + + public bool IsSelectableTurn { get; private set; } + + public ConventionInfo(JsonData data) + { + Id = data["tournament_id"].ToString(); + Name = data["name"].ToString(); + BattleParameterInstance = BattleParameter.JsonToBattleParameter(data); + Status = (ConventionStatus)data["status"].ToInt(); + DeckEntryLimitText = ConvertTime.ToLocal(DateTime.Parse(data["tournament_start_date"].ToString())).ToString(); + IsSelectableTurn = data["is_selectable_turn"].ToInt() == 1; + } + + public ConventionInfo(string id) + { + Id = id; + } +} diff --git a/SVSim.BattleEngine/Engine/ConventionList.cs b/SVSim.BattleEngine/Engine/ConventionList.cs new file mode 100644 index 0000000..f2e44cf --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConventionList.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using LitJson; + +public class ConventionList +{ + public List List { get; private set; } + + public void Parse(JsonData data) + { + List = new List(); + for (int i = 0; i < data.Count; i++) + { + List.Add(new ConventionInfo(data[i])); + } + } +} diff --git a/SVSim.BattleEngine/Engine/ConventionListPlate.cs b/SVSim.BattleEngine/Engine/ConventionListPlate.cs new file mode 100644 index 0000000..17f81e7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConventionListPlate.cs @@ -0,0 +1,59 @@ +using System; +using Cute; +using UnityEngine; +using Wizard; + +public class ConventionListPlate : MonoBehaviour +{ + private const string DECK_ENTRY_SPRITE = "btn_decklogin"; + + private const string GAME_START_SPRITE = "btn_competition"; + + [SerializeField] + private UIButton _button; + + [SerializeField] + private UILabel _conventionName; + + [SerializeField] + private UILabel _deckSetTimeLimit; + + private ConventionInfo _conventionInfo; + + public Action OnSelect { get; set; } + + private void Start() + { + _button.onClick.Add(new EventDelegate(delegate + { + OnClickConvention(); + })); + } + + public void Initialize(ConventionInfo convention) + { + _conventionInfo = convention; + _conventionName.text = convention.Name; + if (convention.Status == ConventionInfo.ConventionStatus.GameStart) + { + _deckSetTimeLimit.gameObject.SetActive(value: false); + _button.normalSprite = "btn_competition"; + return; + } + _deckSetTimeLimit.gameObject.SetActive(value: true); + _deckSetTimeLimit.text = Data.SystemText.Get("Arena_0126", convention.DeckEntryLimitText); + _button.normalSprite = "btn_decklogin"; + } + + public void FadeOutHide() + { + FadeUtility.FadeOutObjectAndNonActive(_button.gameObject); + _button.enabled = false; + } + + private void OnClickConvention() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + OnSelect.Call(_conventionInfo); + } +} diff --git a/SVSim.BattleEngine/Engine/ConventionListUI.cs b/SVSim.BattleEngine/Engine/ConventionListUI.cs new file mode 100644 index 0000000..efd731c --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConventionListUI.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; + +public class ConventionListUI : UIBase +{ + private const int SCROLL_CONVENTION_COUNT = 3; + + [SerializeField] + private ConventionListPlate _conventionItemOriginal; + + [SerializeField] + private UIScrollView _scrollView; + + [SerializeField] + private UIGrid _grid; + + [SerializeField] + private GameObject _conventionListPlateRoot; + + [SerializeField] + private GameObject _backGround; + + [SerializeField] + private GameObject _layout1; + + [SerializeField] + private GameObject[] _layout2; + + [SerializeField] + private GameObject _scrollBar; + + private List _plateList = new List(); + + public Action OnSelect { get; set; } + + private void Awake() + { + _conventionItemOriginal.gameObject.SetActive(value: false); + } + + public void Show(ConventionList conventionList) + { + List list = conventionList.List; + int num = 0; + foreach (ConventionInfo item in list) + { + GameObject parent = _conventionListPlateRoot; + switch (list.Count) + { + case 1: + parent = _layout1; + break; + case 2: + parent = _layout2[num]; + break; + } + num++; + GameObject obj = NGUITools.AddChild(parent, _conventionItemOriginal.gameObject); + obj.SetActive(value: true); + ConventionListPlate component = obj.GetComponent(); + component.Initialize(item); + component.OnSelect = OnSelectConvention; + _plateList.Add(component); + } + _backGround.SetActive(list.Count > 3); + _grid.Reposition(); + _scrollView.ResetPosition(); + } + + private void OnSelectConvention(ConventionInfo convention) + { + OnSelect.Call(convention); + foreach (ConventionListPlate plate in _plateList) + { + plate.FadeOutHide(); + } + } + + public void Hide() + { + _backGround.SetActive(value: false); + _scrollBar.SetActive(value: false); + } +} diff --git a/SVSim.BattleEngine/Engine/CostAddModifier.cs b/SVSim.BattleEngine/Engine/CostAddModifier.cs new file mode 100644 index 0000000..6fa8975 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CostAddModifier.cs @@ -0,0 +1,24 @@ +public class CostAddModifier : ICardCostModifier +{ + public int Cost { get; private set; } + + public bool IsClearBeforeModifier => false; + + public bool IsResidentModifier { get; } + + public CostAddModifier(int cost, bool isResidentModifier = false) + { + Cost = cost; + IsResidentModifier = isResidentModifier; + } + + public int CalcCost(int cost) + { + return cost + Cost; + } + + public ICardCostModifier Clone() + { + return new CostAddModifier(Cost, IsResidentModifier); + } +} diff --git a/SVSim.BattleEngine/Engine/CostCurveUI.cs b/SVSim.BattleEngine/Engine/CostCurveUI.cs new file mode 100644 index 0000000..d0db330 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CostCurveUI.cs @@ -0,0 +1,195 @@ +using System; +using UnityEngine; +using Wizard; + +public class CostCurveUI : MonoBehaviour +{ + [Serializable] + private class CostStruct + { + [SerializeField] + public GameObject Parent; + + [SerializeField] + public UILabel LabelCost; + + [SerializeField] + public UILabel LabelCount; + + [SerializeField] + public UIProgressBar Bar; + + public int Count; + } + + [SerializeField] + private int m_maxBarValue = 15; + + [SerializeField] + private CostStruct m_original; + + [SerializeField] + private UIProgressBar m_barAdditiveEffect; + + [SerializeField] + private int m_barNum = 8; + + [SerializeField] + private int m_minCost = 1; + + [SerializeField] + private float m_barWidth = 25f; + + private CostStruct[] m_costArray; + + private CardMaster.CardMasterId _cardMasterId; + + public void Initialize(CardMaster.CardMasterId cardMasterId) + { + _cardMasterId = cardMasterId; + } + + public void Refresh() + { + if (m_costArray != null) + { + for (int i = 0; i < m_costArray.Length; i++) + { + m_costArray[i].Count = 0; + m_costArray[i].LabelCount.text = "0"; + m_costArray[i].Bar.value = 0f; + } + } + } + + public void Refresh(int[] array) + { + Refresh(); + if (array != null) + { + for (int i = 0; i < array.Length; i++) + { + Add(array[i], withAnim: false); + } + } + } + + public void Refresh(UIBase_CardManager.CardObjData[] array) + { + Refresh(); + if (array == null) + { + return; + } + for (int i = 0; i < array.Length; i++) + { + int num = array[i].mainCardNum + array[i].subCardNum; + for (int j = 0; j < num; j++) + { + Add(array[i].ids, withAnim: false); + } + } + } + + public void Add(int cardId, bool withAnim) + { + ChangeValue(1, cardId, withAnim); + } + + public void Add(UIBase_CardManager.CardObjData card, bool withAnim) + { + Add(card.ids, withAnim); + } + + public void Sub(int cardId, bool withAnim) + { + ChangeValue(-1, cardId, withAnim); + } + + public void Sub(UIBase_CardManager.CardObjData card, bool withAnim) + { + Sub(card.ids, withAnim); + } + + private void ChangeValue(int addnum, int cardId, bool withAnim) + { + int num = Mathf.Min(Mathf.Max(CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId).Cost, m_minCost), m_barNum) - m_minCost; + CostStruct cost_this = m_costArray[num]; + cost_this.Count += addnum; + if (withAnim && m_barAdditiveEffect != null) + { + m_barAdditiveEffect.gameObject.SetActive(value: true); + UIProgressBar barAdditiveEffect = m_barAdditiveEffect; + float value = (cost_this.Bar.value = (float)(cost_this.Count + addnum) / (float)m_maxBarValue); + barAdditiveEffect.value = value; + m_barAdditiveEffect.transform.position = cost_this.Bar.transform.position; + m_barAdditiveEffect.alpha = 0.8f; + TweenAlpha.Begin(m_barAdditiveEffect.gameObject, 0.4f, 0f); + TweenScale anim = TweenScale.Begin(cost_this.LabelCount.gameObject, 0.2f, Vector3.one * 1.2f); + TweenAlpha.Begin(cost_this.LabelCount.gameObject, 0.2f, 0f); + EventDelegate ev = null; + ev = new EventDelegate(delegate + { + anim.RemoveOnFinished(ev); + cost_this.Bar.value = (float)cost_this.Count / (float)m_maxBarValue; + cost_this.LabelCount.text = cost_this.Count.ToString() ?? ""; + cost_this.LabelCount.transform.localScale = Vector3.one * 0.8f; + TweenScale.Begin(cost_this.LabelCount.gameObject, 0.2f, Vector3.one); + TweenAlpha.Begin(cost_this.LabelCount.gameObject, 0.2f, 1f); + }); + anim.onFinished.Add(ev); + } + else + { + cost_this.LabelCount.text = cost_this.Count.ToString() ?? ""; + cost_this.Bar.value = (float)cost_this.Count / (float)m_maxBarValue; + } + } + + private void Awake() + { + m_costArray = new CostStruct[m_barNum]; + m_original.LabelCost.text = m_minCost.ToString() ?? ""; + m_original.LabelCount.text = 0.ToString() ?? ""; + m_original.Bar.value = 0f; + m_costArray[0] = m_original; + for (int i = 1; i < m_barNum; i++) + { + m_costArray[i] = new CostStruct(); + GameObject obj = (m_costArray[i].Parent = UnityEngine.Object.Instantiate(m_original.Parent)); + obj.transform.parent = m_original.Parent.transform.parent; + obj.transform.localScale = m_original.Parent.transform.localScale; + Vector3 localPosition = m_original.Parent.transform.localPosition; + localPosition.x += m_barWidth * (float)i; + obj.transform.localPosition = localPosition; + UIWidget[] componentsInChildren = obj.GetComponentsInChildren(); + for (int j = 0; j < componentsInChildren.Length; j++) + { + if (componentsInChildren[j].name == m_original.LabelCost.name) + { + m_costArray[i].LabelCost = componentsInChildren[j].GetComponent(); + m_costArray[i].LabelCost.text = (i + m_minCost).ToString() ?? ""; + if (i == m_barNum - 1) + { + m_costArray[i].LabelCost.text += "⁺"; + } + } + else if (componentsInChildren[j].name == m_original.LabelCount.name) + { + m_costArray[i].LabelCount = componentsInChildren[j].GetComponent(); + m_costArray[i].LabelCount.text = 0.ToString() ?? ""; + } + else if (componentsInChildren[j].name == m_original.Bar.name) + { + m_costArray[i].Bar = componentsInChildren[j].GetComponent(); + m_costArray[i].Bar.value = 0f; + } + m_costArray[i].Count = 0; + } + } + if (m_barAdditiveEffect != null) + { + m_barAdditiveEffect.gameObject.SetActive(value: false); + } + } +} diff --git a/SVSim.BattleEngine/Engine/CostHalfModifier.cs b/SVSim.BattleEngine/Engine/CostHalfModifier.cs new file mode 100644 index 0000000..2e0c855 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CostHalfModifier.cs @@ -0,0 +1,17 @@ +public abstract class CostHalfModifier : ICardCostModifier +{ + public int Cost { get; private set; } + + public bool IsClearBeforeModifier => false; + + public bool IsResidentModifier { get; } + + public CostHalfModifier(bool isResidentModifier) + { + IsResidentModifier = isResidentModifier; + } + + public abstract int CalcCost(int cost); + + public abstract ICardCostModifier Clone(); +} diff --git a/SVSim.BattleEngine/Engine/CostHalfRoundDownModifier.cs b/SVSim.BattleEngine/Engine/CostHalfRoundDownModifier.cs new file mode 100644 index 0000000..a06a296 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CostHalfRoundDownModifier.cs @@ -0,0 +1,19 @@ +using System; + +public class CostHalfRoundDownModifier : CostHalfModifier +{ + public CostHalfRoundDownModifier(bool isResidentModifier) + : base(isResidentModifier) + { + } + + public override int CalcCost(int cost) + { + return (int)Math.Floor((float)cost / 2f); + } + + public override ICardCostModifier Clone() + { + return new CostHalfRoundDownModifier(base.IsResidentModifier); + } +} diff --git a/SVSim.BattleEngine/Engine/CostHalfRoundUpModifier.cs b/SVSim.BattleEngine/Engine/CostHalfRoundUpModifier.cs new file mode 100644 index 0000000..ccba9b6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CostHalfRoundUpModifier.cs @@ -0,0 +1,19 @@ +using System; + +public class CostHalfRoundUpModifier : CostHalfModifier +{ + public CostHalfRoundUpModifier(bool isResidentModifier) + : base(isResidentModifier) + { + } + + public override int CalcCost(int cost) + { + return (int)Math.Ceiling((float)cost / 2f); + } + + public override ICardCostModifier Clone() + { + return new CostHalfRoundUpModifier(base.IsResidentModifier); + } +} diff --git a/SVSim.BattleEngine/Engine/CostSetModifier.cs b/SVSim.BattleEngine/Engine/CostSetModifier.cs new file mode 100644 index 0000000..7e17007 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CostSetModifier.cs @@ -0,0 +1,24 @@ +public class CostSetModifier : ICardCostModifier +{ + public int Cost { get; private set; } + + public bool IsClearBeforeModifier => true; + + public bool IsResidentModifier { get; } + + public CostSetModifier(int cost, bool isResidentModifier = false) + { + Cost = cost; + IsResidentModifier = isResidentModifier; + } + + public int CalcCost(int cost) + { + return Cost; + } + + public ICardCostModifier Clone() + { + return new CostSetModifier(Cost, IsResidentModifier); + } +} diff --git a/SVSim.BattleEngine/Engine/CreateItemList.cs b/SVSim.BattleEngine/Engine/CreateItemList.cs new file mode 100644 index 0000000..8d9287c --- /dev/null +++ b/SVSim.BattleEngine/Engine/CreateItemList.cs @@ -0,0 +1,564 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using Cute; +using UnityEngine; +using Wizard; + +public class CreateItemList : MonoBehaviour +{ + private static CreateItemList main; + + [SerializeField] + private GameObject ItemListObj; + + [SerializeField] + private GameObject BirthInputObj; + + [SerializeField] + private NguiObjs BuyButtons; + + [SerializeField] + private UIScrollView CrystalScrollView; + + [SerializeField] + private UIScrollBar ScrollBar; + + [SerializeField] + private GameObject ButtonBase; + + [SerializeField] + private GameObject OneButtonBase; + + [SerializeField] + private UILabel BtnInfo0Label; + + [SerializeField] + private UILabel BtnInfo1Label; + + [SerializeField] + private UILabel OneButtonLabel; + + [SerializeField] + private TweenAlpha ItemListWindowAlpha; + + [SerializeField] + private TweenAlpha BirthWindowAlpha; + + [SerializeField] + private UILabel MyCrystalNumLabel; + + [SerializeField] + private GameObject BtnFundSettlementObj; + + [SerializeField] + private GameObject BtnLegalObj; + + [SerializeField] + private UILabel BirthLabel1; + + [SerializeField] + private UILabel BirthLabel2; + + [SerializeField] + private UILabel BirthAgeLabel; + + [SerializeField] + private UILabel BirthLimitLabel; + + [SerializeField] + private UILabel BirthPriceLabel; + + [SerializeField] + private UILabel BirthWarnLabel; + + [SerializeField] + private UILabel InputExampleLabel; + + [SerializeField] + private UIInput UIInputObject; + + [SerializeField] + private GameObject _noInputCollider; + + public static int BirthDayUpdateServerTime; + + public static float BirthDayUpdateRealTime; + + private string productId = ""; + + private int ProductIndex; + + private string DateOfBirth = ""; + + private NetworkManager networkManager; + + private DateTime NowTime; + + private List _itemObjectList; + + private List _notDispItemList = new List(); + + [HideInInspector] + public DialogBase ParentDialogBase; + + private const int BIRTH_DAY_NUMBER_DIGITS = 6; + + private const int CHILD_YEAR = 18; + + private const int CRYSTAL_LIMIT_UNDER = 2500; + + private const int CRYSTAL_LIMIT_TOP = 5000; + + private const int EN_LIMIT_UNDER = 5000; + + private const int EN_LIMIT_TOP = 10000; + + private const int ERROR_WINDOW_DEPTH = 50; + + private const string DEFAULT_BIRTH_DAY = "0"; + + private const string FORMAT_CONVERT_DATE_BIRTH = "{0}/{1}/15"; + + private const int NGUI_SEPARATOR = 0; + + private const int NGUI_ITEM_SPRITE = 0; + + public string ScrollToProductId; + + private Vector3 _lastScrollPosition; + + private const float SCROLL_OFFSET = 10f; + + private const float SCROLL_DELAY = 0f; + + private const float SCROLL_DELAY_LONG = 0f; + + private const float SCROLL_TIME = 0f; + + public bool IsOnlyInputBirthday { get; set; } + + public Action OnFinishUpdateBirthday { get; set; } + + public static CreateItemList GetInstance() + { + return main; + } + + private void Start() + { + main = this; + if (networkManager == null) + { + networkManager = Toolbox.NetworkManager; + } + SystemText systemText = Data.SystemText; + PaymentPC instance = PaymentPC.GetInstance(); + instance.ConsumePurchaseSucceeded += PaymentSuccessed; + BirthLabel1.text = systemText.Get("Shop_0029"); + BirthLabel2.text = systemText.Get("Shop_0030"); + BirthAgeLabel.text = systemText.Get("Shop_0035") + "\n" + systemText.Get("Shop_0036") + "\n" + systemText.Get("Shop_0037"); + BirthLimitLabel.text = systemText.Get("Shop_0038") + "\n" + systemText.Get("Shop_0038") + "\n" + systemText.Get("Shop_0040"); + string text; + string text2; + if (Data.SystemText.RegionCode == Global.LANG_TYPE.Ger.ToString()) + { + CultureInfo cultureInfo = new CultureInfo("de-de"); + text = 2500.ToString("N0", cultureInfo); + text2 = 5000.ToString("N0", cultureInfo); + } + else + { + text = $"{2500:N0}"; + text2 = $"{5000:N0}"; + } + BirthPriceLabel.text = systemText.Get("Shop_0039", text) + "\n" + systemText.Get("Shop_0039", text2); + BirthWarnLabel.text = systemText.Get("Shop_0031"); + InputExampleLabel.text = systemText.Get("Shop_0068"); + InputExampleLabel.gameObject.SetActive(value: true); + ParentDialogBase.SetButtonDisable(isEnableOK: true); + Dictionary productPurchaseLimitList = instance.ProductPurchaseLimitList; + Dictionary productPurchaseNumberList = instance.ProductPurchaseNumberList; + Dictionary productCsvIdList = instance.ProductCsvIdList; + _notDispItemList.Clear(); + if (productPurchaseNumberList.Count != 0) + { + foreach (KeyValuePair item in productCsvIdList) + { + if (productPurchaseNumberList.ContainsKey(item.Value) && int.Parse(productPurchaseLimitList[item.Value]) <= int.Parse(productPurchaseNumberList[item.Value])) + { + _notDispItemList.Add(item.Value); + } + } + } + InitScrollView(_notDispItemList); + UpdateCrystalCount(); + if (IsBirthdayNotInput()) + { + BirthInputObj.SetActive(value: true); + BirthWindowAlpha.PlayForward(); + return; + } + ItemListObj.SetActive(value: true); + ItemListWindowAlpha.PlayForward(); + ParentDialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + ParentDialogBase.SetButtonDisable(isEnableOK: false); + ParentDialogBase.onPushButton1 = delegate + { + ParentDialogBase.Close(); + }; + UIManager.GetInstance().closeInSceneCenterLoading(); + CrystalScrollView.ResetPosition(); + ScrollBar.value = 0f; + } + + public static bool IsBirthdayNotInput() + { + return PlayerStaticData.UserBirthDay == "0"; + } + + private void Update() + { + CheckScrollToItem(0f); + if (PlayerStaticData.UserBirthDay.Length != 6) + { + if (UIInputObject.isSelected) + { + InputExampleLabel.gameObject.SetActive(value: false); + } + else if (UIInputObject.value.Length == 0) + { + InputExampleLabel.gameObject.SetActive(value: true); + } + } + } + + protected void InitScrollView(List inDeleteIdList = null) + { + PaymentPC instance = PaymentPC.GetInstance(); + List productIdList = instance.ProductIdList; + Dictionary productCsvIdList = instance.ProductCsvIdList; + Dictionary productNameList = instance.ProductNameList; + Dictionary formatProductPriceList = instance.FormatProductPriceList; + Dictionary productImageNameList = instance.ProductImageNameList; + Dictionary productIsSpecialShop = instance.ProductIsSpecialShop; + SystemText systemText = Data.SystemText; + float num = 0f; + float num2 = 0f; + int num3 = 0; + _itemObjectList = new List(productIdList.Count); + for (int i = 0; i < productIdList.Count; i++) + { + string key = productIdList[i]; + if ((inDeleteIdList == null || !inDeleteIdList.Contains(productCsvIdList[key])) && !productIsSpecialShop[key] && productNameList.ContainsKey(key) && formatProductPriceList.ContainsKey(key)) + { + NguiObjs component = NGUITools.AddChild(CrystalScrollView.gameObject, BuyButtons.gameObject).GetComponent(); + _itemObjectList.Add(component); + component.gameObject.SetActive(value: true); + component.labels[0].text = productNameList[key]; + component.labels[1].text = systemText.Get("Shop_0083") + "$" + formatProductPriceList[key]; + component.labels[2].text = systemText.Get("Shop_0041"); + component.buttons[0].gameObject.name = i.ToString(); + UIEventListener uIEventListener = UIEventListener.Get(component.buttons[0].gameObject); + uIEventListener.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onClick, new UIEventListener.VoidDelegate(BuyCrystalButtonClickCallBack)); + num2 = component.GetComponent().height; + num = (float)num3 * num2; + component.transform.localPosition = new Vector3(0f, 0f - num, 0f); + component.sprites[0].spriteName = productImageNameList[key]; + if (i == productIdList.Count - 1) + { + component.objs[0].SetActive(value: false); + } + else + { + component.objs[0].SetActive(value: true); + } + num3++; + } + } + OneButtonBase.SetActive(value: false); + ButtonBase.SetActive(value: false); + if (CustomPreference.GetTextLanguage() == Global.LANG_TYPE.Kor.ToString()) + { + OneButtonBase.SetActive(value: true); + OneButtonBase.transform.localPosition = new Vector3(0f, 0f - (num + num2 / 2f), 0f); + OneButtonLabel.text = systemText.Get("Shop_0125"); + } + CrystalScrollView.ResetPosition(); + ScrollBar.value = 0f; + } + + private void _PaymentListErrorDialog() + { + if (BattleManagerBase.GetIns() == null) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Shop_0094")); + dialogBase.SetText(Data.SystemText.Get("Shop_0093")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(100); + } + } + + public void BirthUpdateButtonClickCallBack() + { + DateOfBirth = UIInputObject.value; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetReturnMsg(base.gameObject, "BirthUpdateTask"); + dialogBase.SetTitleLabel(Data.SystemText.Get("Shop_0070")); + if (DateTime.TryParse($"{DateOfBirth.Substring(0, 4)}/{DateOfBirth.Substring(4, 2)}/15", out var result)) + { + result = TimeZoneInfo.ConvertTimeToUtc(result); + string text = ConvertTime.ToLocal(result, ConvertTime.FORMAT.YEAR_MONTH); + dialogBase.SetText(Data.SystemText.Get("Shop_0071", text)); + } + else + { + dialogBase.SetText(Data.SystemText.Get("Shop_0071", DateOfBirth)); + } + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(Data.SystemText.Get("Dia_BuyCrystal_002_Button")); + dialogBase.SetPanelDepth(100); + } + + private void BirthUpdateTask() + { + UpdateBirthTask updateBirthTask = new UpdateBirthTask(); + updateBirthTask.SetParameter(DateOfBirth); + StartCoroutine(networkManager.Connect(updateBirthTask, OnUpdateBirthFinished)); + } + + private void OnUpdateBirthFinished(NetworkTask.ResultCode code) + { + PlayerStaticData.UserBirthDay = UIInputObject.value; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Dia_BuyCrystal_003_Title")); + dialogBase.SetText(Data.SystemText.Get("Shop_0069")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(100); + if (!IsOnlyInputBirthday) + { + dialogBase.OnClose = BirthCloseAndItemOpen; + return; + } + dialogBase.OnClose = delegate + { + OnFinishUpdateBirthday.Call(); + }; + } + + protected void BirthCloseAndItemOpen() + { + BirthWindowAlpha.PlayReverse(); + if (IsChildCheckDialog()) + { + ChildWarningDialog(); + } + else + { + ActivateItemList(); + } + } + + private void ActivateItemList() + { + ItemListObj.SetActive(value: true); + ParentDialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + ParentDialogBase.SetButtonDisable(isEnableOK: false); + ParentDialogBase.onPushButton1 = delegate + { + ParentDialogBase.Close(); + }; + ItemListWindowAlpha.PlayForward(); + CheckScrollToItem(0f); + } + + public void BirthCancelButtonClickCallBack() + { + ParentDialogBase.CloseWithoutSelect(); + } + + public void BirthInputOnChange() + { + if (UIInputObject.value.Length == 6) + { + ParentDialogBase.SetButtonDisable(isEnableOK: false); + } + else + { + ParentDialogBase.SetButtonDisable(isEnableOK: true); + } + } + + private void ChildWarningDialog() + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Shop_0078")); + dialogBase.SetText(Data.SystemText.Get("Shop_0079")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(100); + dialogBase.OnClose = ActivateItemList; + } + + private void BuyCrystalButtonClickCallBack(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + ProductIndex = int.Parse(g.name); + StartPaymentDialog(); + } + + private void StartPaymentDialog() + { + productId = PaymentPC.GetInstance().ProductIdList[ProductIndex]; + Dictionary productNameList = PaymentPC.GetInstance().ProductNameList; + if (PlayerStaticData.IsPurchaseNotificationOfLootBox()) + { + LootBoxDialogUtility.CreatePurchaseNotificationLootBoxDialog(Data.SystemText.Get("Dia_BuyCrystal_004_Title"), productNameList[productId], StartPayment, CancelPayment); + return; + } + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Dia_BuyCrystal_004_Title")); + dialogBase.SetText(Data.SystemText.Get("Shop_0017", productNameList[productId])); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(Data.SystemText.Get("Dia_BuyCrystal_004_Button")); + dialogBase.SetReturnMsg(base.gameObject, "StartPayment", "CancelPayment"); + dialogBase.SetPanelDepth(100); + } + + private void CancelPayment() + { + UIManager.GetInstance().WebViewHelper.DestroyWebView(); + } + + private void StartPayment() + { + PaymentPC.GetInstance().purchaceStart(productId); + } + + private void PaymentSuccessed() + { + try + { + Dictionary productPurchaseLimitList = PaymentPC.GetInstance().ProductPurchaseLimitList; + string lastPaymentId = Data.Load.data._userCrystalCount._lastPaymentId; + int lastPaymentItemBuyNumber = Data.Load.data._userCrystalCount._lastPaymentItemBuyNumber; + if (lastPaymentId != null && int.Parse(productPurchaseLimitList[lastPaymentId]) <= lastPaymentItemBuyNumber) + { + if (!_notDispItemList.Contains(lastPaymentId)) + { + _notDispItemList.Add(lastPaymentId); + } + for (int i = 0; i < _itemObjectList.Count; i++) + { + UnityEngine.Object.Destroy(_itemObjectList[i].gameObject); + } + _itemObjectList.Clear(); + InitScrollView(_notDispItemList); + } + } + catch (Exception ex) + { + LocalLog.AccumulateTraceLog("Payment suceeded but exception is captured :" + ex); + } + } + + public void UpdateCrystalCount() + { + MyCrystalNumLabel.text = PlayerStaticData.UserCrystalCount.ToString(); + } + + public void FundSettlementButtonClickCallBack() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + UIManager.GetInstance().WebViewHelper.OpenWebView(WebViewHelper.WebViewType.FUND_SETTLEMENT); + } + + public void LegalButtonClickCallBack() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + UIManager.GetInstance().WebViewHelper.OpenWebView(WebViewHelper.WebViewType.LEGALTEXT); + } + + public void OneButtonClickCallBack() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (CustomPreference.GetTextLanguage() == Global.LANG_TYPE.Kor.ToString()) + { + UIManager.GetInstance().WebViewHelper.OpenWebView(WebViewHelper.WebViewType.KOREA_CRYSTAL_PAGE); + } + } + + public bool IsChildCheckDialog() + { + if (BirthDayUpdateServerTime != 0) + { + int year = int.Parse(PlayerStaticData.UserBirthDay.Substring(0, 4)); + int month = int.Parse(PlayerStaticData.UserBirthDay.Substring(4, 2)); + DateTime dateTime = new DateTime(year, month, 1); + DateTime dateTime2 = UnixTimeToDateTime(BirthDayUpdateServerTime + (int)(Time.realtimeSinceStartup - BirthDayUpdateRealTime)); + DateTime dateTime3 = new DateTime(1, 1, 1); + TimeSpan timeSpan = dateTime2 - dateTime; + int num = (dateTime3 + timeSpan).Year - 1; + int num2 = (dateTime3 + timeSpan).Month - 1; + if (num < 18 || (num == 18 && num2 == 0)) + { + return true; + } + return false; + } + return false; + } + + protected DateTime UnixTimeToDateTime(int unixTime) + { + return new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(unixTime); + } + + private void StartScrollToIndex(int index, float delay) + { + Vector3 localPosition = CrystalScrollView.transform.localPosition; + Vector3 vector = localPosition - _itemObjectList[index].transform.localPosition; + vector.y += 10f; + _lastScrollPosition = localPosition; + _noInputCollider.SetActive(value: true); + iTween.ValueTo(base.gameObject, iTween.Hash("from", localPosition, "to", vector, "delay", delay, "time", 0f, "easetype", iTween.EaseType.easeInOutQuad, "onupdate", "ScrollViewUpdate", "oncomplete", "DeactivateCollider")); + } + + private void ScrollViewUpdate(Vector3 v) + { + CrystalScrollView.MoveRelative(v - _lastScrollPosition); + CrystalScrollView.RestrictWithinBounds(instant: true); + _lastScrollPosition = v; + } + + private void DeactivateCollider() + { + _noInputCollider.SetActive(value: false); + } + + private int GetIndexFromProductId(string id) + { + List idList = PaymentPC.GetInstance().IdList; + if (_notDispItemList != null) + { + for (int i = 0; i < _notDispItemList.Count; i++) + { + idList.Remove(_notDispItemList[i]); + } + } + return idList.FindIndex((string x) => x == id); + } + + private void CheckScrollToItem(float delay) + { + if (CrystalScrollView.isActiveAndEnabled && !string.IsNullOrEmpty(ScrollToProductId)) + { + int indexFromProductId = GetIndexFromProductId(ScrollToProductId); + if (indexFromProductId > 0) + { + StartScrollToIndex(indexFromProductId, delay); + } + ScrollToProductId = null; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute.Payment/IPaymentCommonCallback.cs b/SVSim.BattleEngine/Engine/Cute.Payment/IPaymentCommonCallback.cs new file mode 100644 index 0000000..ce17611 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute.Payment/IPaymentCommonCallback.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace Cute.Payment; + +public interface IPaymentCommonCallback +{ + void OnInitializeSucceeded(); + + void OnInitializeFailed(int errorCode, string errorMessage); + + void OnPurchaseFailed(string error); + + void OnPurchaseFailed(int errorCode, string message); + + void OnPurchaseCancelled(string productId, string price, string currencyCode); + + void OnGetProductListSucceeded(List productInfo, bool waitUnfinishedTransaction); + + void OnGetProductListFailed(int errorCode, string errorMessage); + + void OnConsumePurchaseSucceeded(); + + void OnConsumePurchaseFailed(int errorCode, string errorMessage); +} diff --git a/SVSim.BattleEngine/Engine/Cute.Payment/StringExtensions.cs b/SVSim.BattleEngine/Engine/Cute.Payment/StringExtensions.cs new file mode 100644 index 0000000..4e40f9a --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute.Payment/StringExtensions.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +namespace Cute.Payment; + +public static class StringExtensions +{ + public static string[] SubstringAtCount(this string self, int count) + { + List list = new List(); + int num = (int)Math.Ceiling((double)self.Length / (double)count); + for (int i = 0; i < num; i++) + { + int num2 = count * i; + if (self.Length <= num2) + { + break; + } + if (self.Length < num2 + count) + { + list.Add(self.Substring(num2)); + } + else + { + list.Add(self.Substring(num2, count)); + } + } + return list.ToArray(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AchievementManager.cs b/SVSim.BattleEngine/Engine/Cute/AchievementManager.cs new file mode 100644 index 0000000..cf9734d --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AchievementManager.cs @@ -0,0 +1,61 @@ +using System; +using UnityEngine; + +namespace Cute; + +public static class AchievementManager +{ + private static IAchievementCallback mCallback; + + public static void Initialize(IAchievementCallback callback) + { + mCallback = callback; + } + + public static void ShowAchievementsUI() + { + Social.ShowAchievementsUI(); + } + + public static void ReleaseAchievement(string id) + { + Social.ReportProgress(id, 100.0, delegate(bool success) + { + if (mCallback != null) + { + mCallback.OnReleaseAchievement(success); + } + }); + } + + public static void ProceedAchievement(string id, float value) + { + Social.ReportProgress(id, value, delegate(bool success) + { + if (mCallback != null) + { + mCallback.OnProceedAchievement(success); + } + }); + } + + public static void ResetAchievements(Action callback) + { + } + + public static void LoadAchievements() + { + if (mCallback != null) + { + Social.LoadAchievements(mCallback.OnLoadAchievements); + } + } + + public static void LoadAchievementDescriptions() + { + if (mCallback != null) + { + Social.LoadAchievementDescriptions(mCallback.OnLoadAchievementDescriptions); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AdjustManager.cs b/SVSim.BattleEngine/Engine/Cute/AdjustManager.cs new file mode 100644 index 0000000..e2c4332 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AdjustManager.cs @@ -0,0 +1,22 @@ +namespace Cute; + +public static class AdjustManager +{ + private const string _viewerIDEventToken = "qxq65x"; + + private const string _tutorialEventToken = "wlojkf"; + + private const string _paymentEventToken = "sgqjsc"; + + public static void ViewerIDEvent() + { + } + + public static void TutorialCompleteEvent() + { + } + + public static void PaymentEvent(double price, string currencycode, string transactionId, string itemTitle, string productId) + { + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetBundleObject.cs b/SVSim.BattleEngine/Engine/Cute/AssetBundleObject.cs new file mode 100644 index 0000000..80ef894 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetBundleObject.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace Cute; + +public class AssetBundleObject +{ + public AssetBundle assetBundle { get; set; } + + public List objectArray { get; set; } + + public AssetBundleObject() + { + assetBundle = null; + objectArray = new List(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetErrorState.cs b/SVSim.BattleEngine/Engine/Cute/AssetErrorState.cs new file mode 100644 index 0000000..8dd5fd6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetErrorState.cs @@ -0,0 +1,93 @@ +using System.Collections.Generic; + +namespace Cute; + +public class AssetErrorState +{ + public enum Code + { + NONE = 0, + SERVER_TIMEOUT = 1, + SERVER_UNDEFINED_ERROR = 2, + LOCAL_CAPACITY_OVER = 4, + CANCELED = 8, + FILE_READ_ERROR = 0x10, + SERVER_NOT_FOUND_ERROR = 0x20 + } + + public enum DialogDecision + { + UNDECIDED, + RETRY, + TERMINATE + } + + private Dictionary errors = new Dictionary(); + + public DialogDecision lastDialogDecision; + + public int errorFlag { get; private set; } + + public bool canceled { get; private set; } + + public bool HasError() + { + return errorFlag != 0; + } + + public bool HasError(Code code) + { + return ((uint)errorFlag & (uint)code) != 0; + } + + public void SetCanceled() + { + canceled = true; + } + + public int ErrorCount() + { + return errors.Count; + } + + public AssetErrorState() + { + Reset(); + } + + public void Report(string filename, Code errorCode) + { + if (errorCode != Code.NONE) + { + errorFlag |= (int)errorCode; + errors[filename] = errorCode; + } + } + + public Code Query(string filename) + { + if (!errors.TryGetValue(filename, out var value)) + { + return Code.NONE; + } + return value; + } + + public void Reset() + { + errorFlag = 0; + lastDialogDecision = DialogDecision.UNDECIDED; + errors.Clear(); + canceled = false; + } + + public List GatherErrorFilenames() + { + List list = new List(); + foreach (KeyValuePair error in errors) + { + list.Add(error.Key); + } + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetHandle.cs b/SVSim.BattleEngine/Engine/Cute/AssetHandle.cs new file mode 100644 index 0000000..9b29998 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetHandle.cs @@ -0,0 +1,1231 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using UnityEngine; +using UnityEngine.Networking; +using Wizard; + +namespace Cute; + +public class AssetHandle +{ + public enum AssetType + { + Manifests, + AssetBundle, + Sound, + TemporarySound, + Movie, + Font + } + + private enum RequestType + { + None, + Download, + Load + } + + private AssetRequestContext requestContext; + + private static SHA1CryptoServiceProvider sha1; + + private static UTF8Encoding utf8; + + private string _cryptFilename; + + private const byte MultipleHandleIgnor = 2; + + private const byte SubManifest = 4; + + private byte _HandleAttribute; + + private const float BACKGROUND_DOWNLOAD_WAIT_BEFORE_RETRY_SECONDS = 5f; + + private Action phase; + + private RequestType requestType; + + public const int MANIFEST_INDEX_FILE_NAME = 0; + + public const int MANIFEST_INDEX_DATA_HASH = 1; + + private const int MANIFEST_INDEX_CATEGORY = 2; + + private const int MANIFEST_INDEX_FILE_SIZE = 3; + + private const int MANIFEST_INDEX_SMALL_HASH = 4; + + private const int MANIFEST_INDEX_SMALL_SIZE = 5; + + public string manifestDataHash { get; set; } + + public string SmallDataHash { get; private set; } + + public float manifestDataSize { get; protected set; } + + public float ManifestSmallDataSize { get; private set; } + + private string SelectedHash + { + get + { + if (!CustomPreference.IsNormalResource) + { + return SmallDataHash; + } + return manifestDataHash; + } + } + + public AssetType assetType { get; private set; } + + public string directory { get; private set; } + + public string filename { get; private set; } + + public string AssetName { get; private set; } + + public string dataHash => Toolbox.AssetManager.GetLocalDatahash(directory + filename); + + public int reference { get; set; } + + public bool isPreDownload { get; set; } + + public bool isTutorialDownload { get; set; } + + public bool unloadCommon { get; set; } + + public bool unloadTemporary { get; set; } + + public string cryptFilename + { + get + { + if (_cryptFilename == null) + { + string extension = Path.GetExtension(filename); + string name = ((!(extension != "")) ? "" : filename.Replace(extension, "")); + _cryptFilename = GenCryptoAssetFileName(name); + } + return _cryptFilename; + } + } + + public bool useStreamingAsset { get; set; } + + public bool isMultipleHandleIgnorAsset + { + get + { + if ((_HandleAttribute & 2) != 2) + { + return false; + } + return true; + } + set + { + if (value) + { + _HandleAttribute |= 2; + } + else + { + _HandleAttribute = (byte)(_HandleAttribute & -3); + } + } + } + + public bool isSubManifest + { + get + { + return (_HandleAttribute & 4) == 4; + } + set + { + if (value) + { + _HandleAttribute |= 4; + } + else + { + _HandleAttribute = (byte)(_HandleAttribute & -5); + } + } + } + + public string GetHash(bool isNormalSizeResource) + { + if (!isNormalSizeResource) + { + return SmallDataHash; + } + return manifestDataHash; + } + + public float GetSize(bool isNormalSizeResource) + { + if (!isNormalSizeResource) + { + return ManifestSmallDataSize; + } + return manifestDataSize; + } + + public bool isReDownloadAsset(bool isNormalSizeResource) + { + bool flag = false; + if (!flag && !dataHash.Equals(GetHash(isNormalSizeResource))) + { + flag = true; + } + return flag; + } + + public string BuildURL() + { + if (assetType == AssetType.Manifests) + { + if (!filename.Contains("manifest")) + { + return CustomPreference.GetAssetBundleURL() + filename; + } + if (filename.Equals("soundmanifest")) + { + return CustomPreference.GetSubManifestURL() + filename; + } + if (filename.StartsWith("moviemanifest")) + { + return CustomPreference.GetManifestURL() + filename; + } + if (filename.StartsWith("fontmanifest")) + { + return CustomPreference.GetManifestURL() + filename; + } + if (!isSubManifest) + { + return CustomPreference.GetManifestURL() + filename; + } + return CustomPreference.GetSubManifestURL() + filename; + } + if (IsSound()) + { + return CustomPreference.GetSoundResourceURL() + manifestDataHash; + } + if (assetType == AssetType.Movie) + { + return CustomPreference.GetMoiveResourceURL() + manifestDataHash; + } + return CustomPreference.GetAssetBundleURL() + SelectedHash; + } + + public string BuildLocalCachePath() + { + AssetManager assetManager = Toolbox.AssetManager; + bool isCryptAssetFileName = AssetManager.isCryptAssetFileName; + return assetType switch + { + AssetType.Manifests => assetManager.getAssetSavePath(assetType) + filename, + AssetType.Sound => assetManager.getAssetSavePath(assetType) + directory + filename, + AssetType.TemporarySound => assetManager.getAssetSavePath(assetType) + directory + filename, + AssetType.Movie => assetManager.getAssetSavePath(assetType) + directory + filename, + AssetType.Font => assetManager.getAssetSavePath(assetType) + directory + filename, + _ => assetManager.getAssetSavePath(assetType) + (isCryptAssetFileName ? cryptFilename : filename), + }; + } + + public AssetHandle(string _name, string expectedDataHash, string category, string size, string smallHash, string smallSize, bool isManifest = false, bool isUseStreaming = false) + { + directory = ""; + string[] array = _name.Split('/'); + for (int i = 0; i < array.Length - 1; i++) + { + directory = directory + array[i] + "/"; + } + filename = Path.GetFileName(_name); + AssetName = _name; + useStreamingAsset = isUseStreaming; + string extension = Path.GetExtension(filename); + if (extension.Equals(".mp4") || extension.Equals(".ogg") || extension.Equals(".usm")) + { + assetType = AssetType.Movie; + } + else if (extension.Equals(".unity3d") || extension.Equals(".lz4")) + { + assetType = AssetType.AssetBundle; + } + else if (extension.Equals(".acb") || extension.Equals(".awb")) + { + assetType = (_name.Contains("/t/") ? AssetType.TemporarySound : AssetType.Sound); + } + else if (extension.Equals(".otf") || extension.Equals(".ttf") || extension.Equals(".TTF")) + { + assetType = AssetType.Font; + } + else + { + if (!isManifest) + { + Debug.LogError("error invalid asset name : " + filename); + return; + } + assetType = AssetType.Manifests; + } + string.IsNullOrEmpty(expectedDataHash); + isPreDownload = category != null && Toolbox.AssetManager.predownloadCategories.Contains(category); + isTutorialDownload = category != null && Toolbox.AssetManager.tutorialdownloadCategories.Contains(category); + phase = PhaseIdle; + requestType = RequestType.None; + unloadCommon = false; + unloadTemporary = false; + manifestDataHash = expectedDataHash; + SmallDataHash = smallHash; + if (string.IsNullOrEmpty(size)) + { + manifestDataSize = 0f; + } + else + { + float result; + bool flag = float.TryParse(size, out result); + manifestDataSize = ((!flag) ? 0.1f : result); + } + if (string.IsNullOrEmpty(smallSize)) + { + ManifestSmallDataSize = 0f; + return; + } + float result2; + bool flag2 = float.TryParse(smallSize, out result2); + ManifestSmallDataSize = ((!flag2) ? 0.1f : result2); + } + + private void PhaseNone() + { + if (requestType != RequestType.None) + { + Debug.LogError("need initialize"); + } + } + + private void PhaseIdle() + { + if (requestType == RequestType.Download) + { + phase = PhaseDownloading; + Toolbox.AssetManager.AddDownloadJob(_Download(), _DownloadCancel); + } + if (requestType == RequestType.Load) + { + phase = PhaseLoading; + Toolbox.AssetManager.AddLoadJob(_PlatformDependentLoad(), _LoadCancel); + } + } + + private IEnumerator _PlatformDependentLoad() + { + return _Load(); + } + + private void PhaseDownloading() + { + } + + private void PhaseLoading() + { + } + + private void LoadManifestOfManifest(string text) + { + ArrayList arrayList = null; + arrayList = Utility.ConvertCSV(text, removeTitle: false); + for (int i = 0; i < arrayList.Count; i++) + { + string[] array = (string[])((ArrayList)arrayList[i]).ToArray(typeof(string)); + string text2 = array[0]; + string text3 = array[1]; + AssetHandle handle = new AssetHandle(text2, text3, array[2], null, text3, null, isManifest: true); + Toolbox.AssetManager.RegistHandle(text2, handle); + } + } + + public void LoadMergeManifestOfManifest(string main_manifest, string overwrite_manifest) + { + if (string.IsNullOrEmpty(main_manifest) || string.IsNullOrEmpty(overwrite_manifest)) + { + return; + } + ArrayList arrayList = null; + ArrayList arrayList2 = null; + arrayList = Utility.ConvertCSV(main_manifest, removeTitle: false); + arrayList2 = Utility.ConvertCSV(overwrite_manifest, removeTitle: false); + string text = Toolbox.AssetManager.MovieManifesHeadtName + "_" + CustomPreference.GetSoundMovieLanguage().ToLower(); + for (int i = 0; i < arrayList.Count; i++) + { + string[] array = (string[])((ArrayList)arrayList[i]).ToArray(typeof(string)); + ArrayList arrayList3 = null; + if (Toolbox.AssetManager.SoundManifesHeadtName.Contains(array[0])) + { + int num = 0; + for (num = 0; num < arrayList2.Count; num++) + { + arrayList3 = (ArrayList)arrayList2[num]; + if (arrayList3[0].ToString() == array[0].ToString()) + { + array = (string[])arrayList3.ToArray(typeof(string)); + break; + } + } + } + if (!array[0].Contains(Toolbox.AssetManager.MovieManifesHeadtName) || !(text != array[0])) + { + string text2 = array[0]; + AssetHandle handle = new AssetHandle(text2, array[1], array[2], array[3], array[1], array[3], isManifest: true); + Toolbox.AssetManager.RegistHandle(text2, handle); + } + } + } + + private void LoadManifest(string text) + { + List list = Utility.ConvertCSV_Array(text, removeTitle: false); + int count = list.Count; + for (int i = 0; i < count; i++) + { + string[] array = list[i]; + string text2 = array[0]; + if (!(text2 == "master_card_master.unity3d")) + { + bool isUseStreaming = false; + AssetHandle handle = new AssetHandle(text2, array[1], array[2], array[3], array[4], array[5], isManifest: false, isUseStreaming); + if (!Toolbox.AssetManager.RegistHandle(text2, handle)) + { + handle = null; + } + } + } + } + + private IEnumerator _Download() + { + if (requestContext != null) + { + Utility.LeanSemaphore semaphore = requestContext.semaphore; + if (semaphore != null) + { + AssetErrorState errorState = requestContext.errorState; + while (!semaphore.TryWait()) + { + yield return 0; + } + if (errorState != null && errorState.canceled) + { + errorState.Report(filename, AssetErrorState.Code.CANCELED); + Fin(); + yield break; + } + } + } + string url = BuildURL(); + int QuickRetryCount_Cache = 0; + int QuickRetryCount_Hash = 0; + while (true) + { + string errorMessage = ""; + string errorCode = ""; + if (!isReDownloadAsset(CustomPreference.IsNormalResource)) + { + break; + } + using (UnityWebRequest www = UnityWebRequest.Get(url)) + { + if (www == null) + { + break; + } + yield return www.SendWebRequest(); + bool isTimeOut = false; + float noProgressTime = Time.realtimeSinceStartup; + float oldProgress = 0f; + float timeOut = 30f; + while (!www.isDone) + { + float downloadProgress = www.downloadProgress; + if (downloadProgress <= oldProgress) + { + oldProgress = downloadProgress; + if (Time.realtimeSinceStartup - noProgressTime > timeOut) + { + isTimeOut = true; + break; + } + } + else + { + oldProgress = downloadProgress; + noProgressTime = Time.realtimeSinceStartup; + } + yield return null; + } + if (!string.IsNullOrEmpty(www.error) || isTimeOut) + { + if (isTimeOut) + { + Debug.LogError("download timeout error:" + url); + errorMessage = Data.SystemText.Get("System_0004"); + } + else + { + if (www.GetResponseHeaders() == null || !www.GetResponseHeaders().TryGetValue("STATUS", out var _)) + { + } + Debug.LogError($"download error: {www.error} ({url}) ({filename})"); + if (www.error.StartsWith("Failed to initialize cache for the AssetBundle") && QuickRetryCount_Cache < 5) + { + QuickRetryCount_Cache++; + continue; + } + if (www.error.StartsWith("Failed to decompress data for the AssetBundle") && QuickRetryCount_Cache < 5) + { + QuickRetryCount_Cache++; + continue; + } + yield return new WaitForSeconds(0.1f); + errorMessage = Data.SystemText.Get("System_0005"); + } + UIManager.GetInstance().isErrorProc = false; + if (!Toolbox.AssetManager.IsBackgroundDownload) + { + string titleLabel = Data.SystemText.Get("System_0003"); + string text = errorMessage; + QuickRetryCount_Cache = 0; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(isSystem: true); + if (dialogBase != null) + { + dialogBase.SetFadeButtonEnabled(flag: false); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(titleLabel); + dialogBase.SetText((text == "") ? Data.SystemText.Get("Battle_0300") : (text + Environment.NewLine + Data.SystemText.Get("Battle_0300"))); + dialogBase.SetReturnMsg(UIManager.GetInstance().gameObject, "CommonRetry", "CommonResetGame"); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_GrayBtn); + dialogBase.SetButtonText(Data.SystemText.Get("Battle_0301"), Data.SystemText.Get("System_0006")); + dialogBase.ClickSe_Btn2 = Se.TYPE.SYS_BTN_CANCEL_TRANS; + dialogBase.SetPanelDepth(6000); + } + UIManager.GetInstance().isNoAvailMemory = true; + } + UIManager.GetInstance().isRetryProc = false; + if (Toolbox.AssetManager.IsBackgroundDownload) + { + yield return new WaitForSeconds(5f); + UIManager.GetInstance().CommonRetry(); + } + while (!UIManager.GetInstance().isErrorProc) + { + yield return 0; + } + UIManager.GetInstance().isNoAvailMemory = false; + if (UIManager.GetInstance().isRetryProc) + { + disposeWebRequest(www); + yield return 0; + continue; + } + disposeWebRequest(www); + yield break; + } + Toolbox.AssetManager.AddDownloadCompletedSize(GetSize(CustomPreference.IsNormalResource)); + string localCachePath = BuildLocalCachePath(); + if (assetType == AssetType.Manifests) + { + try + { + string text2 = www.downloadHandler.text; + if (filename == "manifest_assetmanifest") + { + if (!isSubManifest) + { + Toolbox.AssetManager.manifestOfManifests = text2; + } + else + { + Toolbox.AssetManager.manifestOfManifests_sub = text2; + } + goto IL_0684; + } + string text3 = Utility.CreateHash(text2).ToString(); + if (!string.IsNullOrEmpty(manifestDataHash) && !text3.Equals(manifestDataHash) && QuickRetryCount_Hash < 5) + { + QuickRetryCount_Hash++; + disposeWebRequest(www); + continue; + } + manifestDataHash = text3; + File.WriteAllText(localCachePath, text2, Encoding.UTF8); + Toolbox.AssetManager.SaveLocalDatahash(filename, text3); + goto IL_0684; + IL_0684: + Toolbox.AssetManager.AddManifestCount(); + goto IL_08bd; + } + catch (Exception ex) + { + errorMessage = ex.Message; + Debug.LogError(errorMessage); + errorCode = "ERROR_CAPACITY_OVER"; + goto IL_08bd; + } + } + Exception e = null; + byte[] bytes = www.downloadHandler.data; + string dataHash = null; + ParallelJob threadJob = ParallelJob.Dispatch(delegate + { + dataHash = Utility.CreateHash(bytes).ToString(); + }); + while (!threadJob.isDone) + { + yield return null; + } + if (!string.IsNullOrEmpty(SelectedHash) && !dataHash.Equals(SelectedHash) && QuickRetryCount_Hash < 5) + { + QuickRetryCount_Hash++; + disposeWebRequest(www); + continue; + } + if (CustomPreference.IsNormalResource) + { + manifestDataHash = dataHash; + } + else + { + SmallDataHash = dataHash; + } + int num = 0; + while (num < 5) + { + e = TryWriteAllBytes(localCachePath, bytes); + if (e == null) + { + break; + } + num++; + Debug.LogError("error System.IO.File.WriteAllBytes ct " + num); + } + while (!threadJob.isDone) + { + yield return null; + } + if (e == null) + { + Toolbox.AssetManager.SaveLocalDatahash(directory + filename, dataHash.ToString()); + } + else + { + manifestDataHash = (dataHash = null); + errorMessage = e.Message; + Debug.LogError(errorMessage); + errorCode = "ERROR_CAPACITY_OVER"; + } + goto IL_08bd; + IL_08bd: + QuickRetryCount_Hash = 0; + if (errorCode.Contains("ERROR")) + { + Debug.LogError("download error:" + errorMessage + " : " + filename); + if (requestContext != null && requestContext.errorState != null) + { + AssetErrorState errorState2 = requestContext.errorState; + errorState2.Report(filename, AssetErrorState.Code.LOCAL_CAPACITY_OVER); + errorState2.lastDialogDecision = AssetErrorState.DialogDecision.TERMINATE; + } + LocalLog.AccumulateTraceLog("Not enough available storage."); + UIManager.GetInstance().isErrorProc = false; + string titleLabel2 = Data.SystemText.Get("System_0020"); + DialogBase dialogBase2 = UIManager.GetInstance().CreateDialogClose(isSystem: true); + if (dialogBase2 != null) + { + dialogBase2.SetFadeButtonEnabled(flag: false); + dialogBase2.SetTitleLabel(titleLabel2); + dialogBase2.SetText(Data.SystemText.Get("System_0021")); + dialogBase2.SetReturnMsg(UIManager.GetInstance().gameObject, "CommonResetGame", "CommonResetGame", "CommonResetGame", "CommonResetGame"); + dialogBase2.SetButtonLayout(DialogBase.ButtonLayout.GrayBtn); + dialogBase2.SetButtonText(Data.SystemText.Get("System_0006")); + dialogBase2.ClickSe_Btn1 = Se.TYPE.SYS_BTN_CANCEL_TRANS; + dialogBase2.SetPanelDepth(6000); + } + UIManager.GetInstance().isNoAvailMemory = true; + UIManager.GetInstance().isRetryProc = false; + while (!UIManager.GetInstance().isErrorProc) + { + yield return 0; + } + UIManager.GetInstance().isNoAvailMemory = false; + UIManager.GetInstance().isNoAvailMemory = false; + if (!UIManager.GetInstance().isRetryProc) + { + SoftwareResetBase.SoftwareReset(null, null); + } + } + disposeWebRequest(www); + } + break; + } + Fin(); + } + + private Exception TryWriteAllBytes(string localCachePath, byte[] bytes) + { + try + { + File.WriteAllBytes(localCachePath, bytes); + return null; + } + catch (Exception ex) + { + Debug.LogError("error System.IO.File.WriteAllBytes " + localCachePath + "," + ex.GetType().FullName + "," + ex.Message); + return ex; + } + } + + private void _DownloadCancel() + { + phase = PhaseIdle; + requestType = RequestType.None; + Fin(); + } + + private void _LoadPostProcess() + { + switch (assetType) + { + case AssetType.AssetBundle: + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + break; + case AssetType.Sound: + case AssetType.TemporarySound: + if (filename.Substring(filename.Length - 4).Equals(".awb")) + { + Toolbox.AudioManager.RemoveCueSheet(filename); + } + else + { + Toolbox.AudioManager.AddCueSheet(filename, Path.GetFileName(filename), directory); + } + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + break; + case AssetType.Movie: + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + break; + case AssetType.Font: + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + break; + case AssetType.Manifests: + if (filename == "manifest_assetmanifest") + { + string manifestOfManifests = Toolbox.AssetManager.manifestOfManifests; + if (manifestOfManifests == null) + { + Debug.LogError("Failed to load manifest of manifests"); + } + else if (Toolbox.AssetManager.manifestOfManifests_sub != null) + { + LoadMergeManifestOfManifest(manifestOfManifests, Toolbox.AssetManager.manifestOfManifests_sub); + } + else + { + LoadManifestOfManifest(manifestOfManifests); + } + } + else + { + string text = File.ReadAllText(BuildLocalCachePath(), Encoding.UTF8); + LoadManifest(text); + } + break; + } + } + + private IEnumerator _Load() + { + if (requestContext != null) + { + Utility.LeanSemaphore semaphore = requestContext.semaphore; + if (semaphore != null) + { + AssetErrorState errorState = requestContext.errorState; + while (!semaphore.TryWait()) + { + yield return 0; + } + if (errorState != null && errorState.canceled) + { + errorState.Report(filename, AssetErrorState.Code.CANCELED); + Fin(); + yield break; + } + } + } + if (assetType == AssetType.AssetBundle && ++reference == 1) + { + string errorMessage = ""; + string localCachePath = BuildLocalCachePath(); + AssetBundle unityAssetBundle; + if (requestContext != null && requestContext.preferSynchronousLoad) + { + unityAssetBundle = AssetBundle.LoadFromFile(localCachePath); + } + else + { + AssetBundleCreateRequest acr = AssetBundle.LoadFromFileAsync(localCachePath); + yield return acr; + unityAssetBundle = acr.assetBundle; + } + if (unityAssetBundle == null) + { + string text = errorMessage + " : " + localCachePath; + Debug.LogError("_DownloadCancel load error:" + text); + if (requestContext != null && requestContext.errorState != null) + { + requestContext.errorState.Report(filename, AssetErrorState.Code.FILE_READ_ERROR); + } + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + Fin(); + if (UIManager.GetInstance() != null) + { + UIManager.GetInstance().CreateAssetFileErrorDialog(); + } + yield break; + } + Toolbox.AssetManager.SetAssetBundle(filename, unityAssetBundle, isMultipleHandleIgnorAsset); + string[] pathlist = unityAssetBundle.GetAllAssetNames(); + AssetBundleRequest request = unityAssetBundle.LoadAllAssetsAsync(); + yield return request; + UnityEngine.Object[] allAssets = request.allAssets; + bool flag = false; + for (int i = 0; i < Toolbox.AssetManager.NoUnloadAssetName.Count; i++) + { + if (filename.StartsWith(Toolbox.AssetManager.NoUnloadAssetName[i])) + { + flag = true; + } + } + if (!unloadCommon && !flag && unityAssetBundle != null) + { + unityAssetBundle.Unload(unloadAllLoadedObjects: false); + } + int num = pathlist.Length; + int num2 = allAssets.Length; + List list = new List(); + for (int j = 0; j < num2; j++) + { + for (int k = 0; k < num; k++) + { + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(pathlist[k]); + if (allAssets[j].name.ToLower().Equals(fileNameWithoutExtension.ToLower())) + { + string path = Path.ChangeExtension(pathlist[k], ".any"); + list.Add(new AssetObject(path, allAssets[j])); + break; + } + } + } + Toolbox.AssetManager.SetObjectList(filename, list); + } + _LoadPostProcess(); + Fin(); + } + + private IEnumerator _LoadStreamingAsset() + { + if (requestContext != null) + { + Utility.LeanSemaphore semaphore = requestContext.semaphore; + if (semaphore != null) + { + AssetErrorState errorState = requestContext.errorState; + while (!semaphore.TryWait()) + { + yield return 0; + } + if (errorState != null && errorState.canceled) + { + errorState.Report(filename, AssetErrorState.Code.CANCELED); + Fin(); + yield break; + } + } + } + if (assetType == AssetType.Manifests) + { + _LoadPostProcess(); + Fin(); + yield break; + } + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + if (assetType == AssetType.AssetBundle && ++reference == 1) + { + int RetryCount = 0; + while (true) + { + string errorMessage = ""; + string localCachePath = BuildLocalCachePath(); + using (UnityWebRequest www = UnityWebRequest.Get(localCachePath)) + { + if (www == null) + { + break; + } + yield return www.SendWebRequest(); + bool isTimeOut = false; + float noProgressTime = Time.realtimeSinceStartup; + float oldProgress = 0f; + float timeOut = 30f; + while (!www.isDone) + { + float downloadProgress = www.downloadProgress; + if (downloadProgress <= oldProgress) + { + if (Time.realtimeSinceStartup - noProgressTime > timeOut) + { + isTimeOut = true; + break; + } + } + else + { + oldProgress = downloadProgress; + noProgressTime = Time.realtimeSinceStartup; + } + yield return null; + } + if (!string.IsNullOrEmpty(www.error) || isTimeOut) + { + string text = errorMessage + " : " + localCachePath; + Debug.LogError("_LoadStreamingAsset 01 load error:" + text); + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + if (RetryCount > 5) + { + Fin(); + disposeWebRequest(www); + yield break; + } + RetryCount++; + disposeWebRequest(www); + continue; + } + AssetBundle content = DownloadHandlerAssetBundle.GetContent(www); + if (content == null) + { + string text2 = errorMessage + " : " + localCachePath; + Debug.LogError("_LoadStreamingAsset02 load error:" + text2); + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + Fin(); + disposeWebRequest(www); + yield break; + } + Toolbox.AssetManager.SetAssetBundle(filename, content, isMultipleHandleIgnorAsset); + AssetBundle assetBundle = Toolbox.AssetManager.GetAssetBundleObject(filename).assetBundle; + string[] allAssetNames = assetBundle.GetAllAssetNames(); + UnityEngine.Object[] array = assetBundle.LoadAllAssets(); + int num = allAssetNames.Length; + int num2 = array.Length; + List list = new List(); + for (int i = 0; i < num2; i++) + { + for (int j = 0; j < num; j++) + { + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(allAssetNames[j]); + if (array[i].name.ToLower().Equals(fileNameWithoutExtension.ToLower())) + { + string path = Path.ChangeExtension(allAssetNames[j], ".any"); + list.Add(new AssetObject(path, array[i])); + break; + } + } + } + Toolbox.AssetManager.SetObjectList(filename, list); + disposeWebRequest(www); + } + break; + } + } + _LoadPostProcess(); + Fin(); + } + + private void _LoadCancel() + { + } + + private bool _Unload() + { + if (--reference == 0) + { + if (assetType == AssetType.AssetBundle) + { + if (!unloadCommon && !unloadTemporary) + { + Toolbox.AssetManager.UnloadAssetBundle(filename); + } + else + { + int num = reference + 1; + reference = num; + } + } + } + else if (reference < 0) + { + reference = 0; + } + if (IsSound()) + { + Toolbox.AudioManager.RemoveCueSheet(filename); + } + return true; + } + + private bool _UnloadTemporary() + { + if (--reference == 0) + { + if (assetType == AssetType.AssetBundle) + { + if (unloadTemporary) + { + Toolbox.AssetManager.UnloadAssetBundle(filename); + unloadTemporary = false; + } + else + { + int num = reference + 1; + reference = num; + } + } + } + else if (reference < 0) + { + reference = 0; + } + if (IsSound()) + { + Toolbox.AudioManager.RemoveCueSheet(filename); + } + return true; + } + + private bool _UnloadCommon() + { + if (--reference == 0) + { + if (assetType == AssetType.AssetBundle) + { + if (unloadCommon) + { + Toolbox.AssetManager.UnloadAssetBundle(filename); + } + else + { + int num = reference + 1; + reference = num; + } + } + } + else if (reference < 0) + { + reference = 0; + } + return true; + } + + private void Fin() + { + Action action = null; + if (requestContext != null) + { + requestContext.semaphore?.Post(); + action = requestContext.callback; + } + phase = PhaseIdle; + requestContext = null; + action?.Invoke(this); + } + + public bool Download(AssetRequestContext requestContext) + { + requestType = RequestType.Download; + this.requestContext = requestContext; + phase(); + return true; + } + + public bool Download(Action callback) + { + return Download(new AssetRequestContext(callback)); + } + + public void Unload() + { + if (_Unload()) + { + phase = PhaseIdle; + } + requestType = RequestType.None; + } + + public void UnloadCommon() + { + if (_UnloadCommon()) + { + phase = PhaseIdle; + } + requestType = RequestType.None; + } + + public void UnloadTemporary() + { + if (_UnloadTemporary()) + { + phase = PhaseIdle; + } + requestType = RequestType.None; + } + + public bool Load(AssetRequestContext requestContext) + { + requestType = RequestType.Load; + this.requestContext = requestContext; + phase(); + return true; + } + + public bool Load(Action callback) + { + return Load(new AssetRequestContext(callback)); + } + + public bool QuickLoadIfPossible() + { + if (phase != new Action(PhaseIdle)) + { + return false; + } + bool flag = false; + switch (assetType) + { + case AssetType.Manifests: + flag = false; + break; + case AssetType.AssetBundle: + flag = reference > 0 && Toolbox.AssetManager.HasObjectList(filename); + if (flag) + { + int num = reference + 1; + reference = num; + } + break; + case AssetType.Movie: + flag = !isReDownloadAsset(CustomPreference.IsNormalResource); + break; + case AssetType.Font: + flag = !isReDownloadAsset(CustomPreference.IsNormalResource); + break; + case AssetType.Sound: + case AssetType.TemporarySound: + flag = !isReDownloadAsset(CustomPreference.IsNormalResource); + break; + default: + flag = false; + break; + } + if (flag) + { + _LoadPostProcess(); + } + return flag; + } + + public bool IsAssetBundle() + { + if (assetType != AssetType.AssetBundle) + { + return false; + } + return true; + } + + public bool IsManifests() + { + if (assetType != AssetType.Manifests) + { + return false; + } + return true; + } + + public bool IsSound() + { + if (assetType != AssetType.Sound && assetType != AssetType.TemporarySound) + { + return false; + } + return true; + } + + public bool IsSoundVoice() + { + if (IsSound() && (filename.Substring(0, 1).Equals("v") || filename.Substring(0, 1).Equals("c"))) + { + return true; + } + return false; + } + + public bool IsMovie() + { + if (assetType != AssetType.Movie) + { + return false; + } + return true; + } + + public static string GenCryptoAssetFileName(string name) + { + if (sha1 == null) + { + sha1 = new SHA1CryptoServiceProvider(); + } + if (utf8 == null) + { + utf8 = new UTF8Encoding(); + } + byte[] bytes = utf8.GetBytes(name); + byte[] array = sha1.ComputeHash(bytes); + StringBuilder stringBuilder = new StringBuilder(); + int num = array.Length; + for (int i = 0; i < num; i++) + { + stringBuilder.Append(Convert.ToString(array[i], 16).PadLeft(2, '0')); + } + return stringBuilder.ToString(); + } + + private void disposeWebRequest(UnityWebRequest www) + { + www.Dispose(); + } + + public void CopyWithCatchException(AssetHandle src) + { + manifestDataHash = src.manifestDataHash; + SmallDataHash = src.SmallDataHash; + isPreDownload = src.isPreDownload; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetManager.cs b/SVSim.BattleEngine/Engine/Cute/AssetManager.cs new file mode 100644 index 0000000..ccda1fd --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetManager.cs @@ -0,0 +1,1554 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using Sqlite3Plugin; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class AssetManager : MonoBehaviour, IManager +{ + public enum _tag_datamode + { + DATAMODE_PREIN, + DATAMODE_ALLDL, + DATAMODE_HYBRID + } + + private Dictionary handleDictionary = new Dictionary(); + + private Dictionary objectDictionary = new Dictionary(); + + private const int BACKGROUND_DOWNLOAD_BETWEEN_JOBS_WAIT_FRAMES = 5; + + private string[] categoryNameList; + + private static bool _isCryptAssetFileName = false; + + private AsyncJob _asyncJobDownload; + + private AsyncJob _asyncJobLoad; + + private bool _isCompressionAssetBundle = true; + + public bool _isUsePersistSound_PreIncircumstance; + + public const string assetbundleManifestName = "_assetmanifest"; + + public const string manifestOfManifestName = "manifest_assetmanifest"; + + public const string soundManifestName = "soundmanifest"; + + public const string movieManifestName = "moviemanifest"; + + public const string fontManifestName = "fontmanifest"; + + public string currentMovieManifestName = ""; + + private static string _savePath = null; + + private static string _packageDataPath = null; + + public bool _isUseStreamingAsset; + + private const string DIRECTORY_ASSET_BUNDLE = "a"; + + public const string DIRECTORY_MOVIE = "m"; + + public const string DIRECTORY_FONT = "f"; + + public const string DIRECTORY_BGM = "b"; + + public const string DIRECTORY_SE = "s"; + + public const string DIRECTORY_VOICE = "v"; + + public const string DIRECTORY_TEMPORARY = "t"; + + public const string DIRECTORY_TEMPORARY_VOICE = "v/t"; + + private const string DIRECTORY_MANIFEST = "manifest"; + + private const string commonShaderAssetName = "card_shader_common.unity3d"; + + private string manifestSavePath = ""; + + private string bundleSavePath = ""; + + private string soundSavePath = ""; + + private string movieSavePath = ""; + + private string fontSavePath = ""; + + private string manifestPackagePath = ""; + + private string bundlePackagePath = ""; + + private string soundPackagePath = ""; + + private string moviePackagePath = ""; + + private string fontPackagePath = ""; + + private int downloadReqCount; + + private int downloadCompCount; + + private int loadingReqCount; + + private int loadingCompCount; + + private int loadingManifestCompCount; + + public HashSet predownloadCategories = new HashSet { "common", "tutorial" }; + + public HashSet tutorialdownloadCategories = new HashSet { "tutorial" }; + + public List NoUnloadAssetName = new List(); + + private static List assetList = new List(); + + private static List soundList = new List(); + + private static List movieList = new List(); + + private float _normalResourceDownloadSize; + + private float _smallResourceDownloadSize; + + private float _downloadCompletedSize; + + private float _prevFrameEndTime; + + private List _temporaryVoiceNameList = new List(); + + public string MovieManifesHeadtName = "moviemanifest"; + + public string SoundManifesHeadtName = "soundmanifest"; + + private bool _isLocalDatahashStoreRecoveryMode; + + private ManifestDatahashKVS _localDatahashStore; + + public static bool isCryptAssetFileName => _isCryptAssetFileName; + + public bool IsResourceDataBaseError { get; private set; } + + public bool IsBackgroundDownload { get; private set; } + + public bool isCompressionAssetBundle + { + get + { + return _isCompressionAssetBundle; + } + set + { + _isCompressionAssetBundle = value; + } + } + + public string manifestOfManifests { get; set; } + + public string manifestOfManifests_sub { get; set; } + + public bool IsDownloadJobIdle() + { + return _asyncJobDownload.IsIdle; + } + + public void CancelDownloadAsyncJob() + { + _asyncJobDownload.Cancel(); + } + + public void SetDownloadAsBg(bool isBackground) + { + IsBackgroundDownload = isBackground; + if (isBackground) + { + _asyncJobDownload.WantedWaitFramesBetweenJobs = 5; + } + else + { + _asyncJobDownload.WantedWaitFramesBetweenJobs = null; + } + } + + public void ClearManifestOfManifests() + { + manifestOfManifests = null; + manifestOfManifests_sub = null; + } + + private ManifestDatahashKVS GetLocalDatahashStore() + { + if (_localDatahashStore == null && !_isLocalDatahashStoreRecoveryMode) + { + string localDatahashStorePath = GetLocalDatahashStorePath(); + try + { + _localDatahashStore = new ManifestDatahashKVS(localDatahashStorePath); + } + catch (Exception ex) + { + HandleLocalDatahashException(ex); + } + } + return _localDatahashStore; + } + + public string GetLocalDatahashStorePath() + { + return GetAssetSaveRootPath() + "manifest.db"; + } + + private void HandleLocalDatahashException(Exception ex) + { + if (ex is DatabaseCorruptionException) + { + IsResourceDataBaseError = true; + _isLocalDatahashStoreRecoveryMode = true; + UnloadManifestHashDB(); + string localDatahashStorePath = GetLocalDatahashStorePath(); + if (File.Exists(localDatahashStorePath)) + { + File.Delete(localDatahashStorePath); + } + UIManager instance = UIManager.GetInstance(); + if ((bool)instance) + { + instance.CreateConfirmationDialog(Data.SystemText.Get("System_0058")).OnClose = delegate + { + SoftwareReset.setAction(); + SoftwareReset.exec(); + }; + } + else + { + SoftwareResetBase.SoftwareReset(null, null); + } + return; + } + throw ex; + } + + public void SaveLocalDatahash(string name, string hash) + { + ManifestDatahashKVS localDatahashStore = GetLocalDatahashStore(); + if (localDatahashStore != null) + { + try + { + localDatahashStore.Set(name, hash); + } + catch (Exception ex) + { + HandleLocalDatahashException(ex); + } + } + } + + public string GetLocalDatahash(string name) + { + ManifestDatahashKVS localDatahashStore = GetLocalDatahashStore(); + if (localDatahashStore != null) + { + try + { + return localDatahashStore.Get(name); + } + catch (Exception ex) + { + HandleLocalDatahashException(ex); + } + } + return ""; + } + + public void DeleteLocalDatahashByPrefix(string prefix) + { + ManifestDatahashKVS localDatahashStore = GetLocalDatahashStore(); + if (localDatahashStore != null) + { + try + { + localDatahashStore.DeleteByPrefix(prefix); + } + catch (Exception ex) + { + HandleLocalDatahashException(ex); + } + } + } + + public List FindLocalDatahashByPattern(string patternEscaped) + { + List result = null; + ManifestDatahashKVS localDatahashStore = GetLocalDatahashStore(); + if (localDatahashStore != null) + { + try + { + result = localDatahashStore.FindLike(patternEscaped); + } + catch (Exception ex) + { + HandleLocalDatahashException(ex); + } + } + return result; + } + + public string EscapeLocalDatahashPattern(string patternNoEscaped) + { + string result = null; + ManifestDatahashKVS localDatahashStore = GetLocalDatahashStore(); + if (localDatahashStore != null) + { + try + { + result = localDatahashStore.EscapeLikePattern(patternNoEscaped); + } + catch (Exception ex) + { + HandleLocalDatahashException(ex); + } + } + return result; + } + + public void UnloadManifestHashDB() + { + if (_localDatahashStore != null) + { + _localDatahashStore.Dispose(); + _localDatahashStore = null; + } + } + + public void DisableDatahashCache() + { + if (_localDatahashStore != null) + { + _localDatahashStore.DisableCache(); + } + } + + public static string GetCryptFileName(string name) + { + return Cryptographer.ComputeSHA1(name); + } + + public static string GetAssetSaveRootPath() + { + return _savePath; + } + + public static string BuildAssetLocalCachePath(string directory, string filename) + { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.Append(GetAssetSaveRootPath()); + stringBuilder.Append(directory); + stringBuilder.Append(isCryptAssetFileName ? GetCryptFileName(filename) : filename); + return stringBuilder.ToString(); + } + + public static string BuildAssetLocalCachePath(string assetName) + { + string fileName = Path.GetFileName(assetName); + return BuildAssetLocalCachePath(assetName.Substring(0, assetName.Length - fileName.Length), fileName); + } + + public static bool AssetFileExists(string assetName) + { + return File.Exists(BuildAssetLocalCachePath(assetName)); + } + + private IEnumerator Start() + { + _isUseStreamingAsset = false; + _savePath = Application.persistentDataPath + "/"; + _packageDataPath = Application.streamingAssetsPath + "/"; + while (Toolbox.ResourcesManager == null) + { + yield return 0; + } + int preferredParallelLoadNum = Toolbox.ResourcesManager.GetPreferredParallelLoadNum(); + int preferredParallelDownloadNum = Toolbox.ResourcesManager.GetPreferredParallelDownloadNum(); + preferredParallelLoadNum = ((preferredParallelLoadNum > preferredParallelDownloadNum) ? preferredParallelLoadNum : preferredParallelDownloadNum); + _asyncJobDownload = new AsyncJob(this, preferredParallelLoadNum); + _asyncJobDownload.Start(); + _asyncJobLoad = new AsyncJob(this, preferredParallelLoadNum); + _asyncJobLoad.Start(); + Toolbox.AssetManager = this; + yield return 0; + } + + private void OnDestroy() + { + UnloadManifestHashDB(); + } + + public int GetManifestCount() + { + int num = categoryNameList.Length; + int num2 = 1; + int num3 = 1; + int num4 = 1; + return num + num2 + num3 + num4; + } + + public bool CreateLocalFileCacheDirectories() + { + try + { + Directory.CreateDirectory(_savePath + "a"); + Directory.CreateDirectory(_savePath + "b"); + Directory.CreateDirectory(_savePath + "s"); + Directory.CreateDirectory(_savePath + "v"); + Directory.CreateDirectory(_savePath + "v/t"); + Directory.CreateDirectory(_savePath + "m"); + Directory.CreateDirectory(_savePath + "f"); + Directory.CreateDirectory(_savePath + "manifest"); + } + catch (Exception) + { + return false; + } + return true; + } + + private IEnumerator TryDownloadManifestOfManifest() + { + bool isError = false; + ClearManifestOfManifests(); + if (CustomPreference.GetResourceLanguage() != CustomPreference.GetSoundMovieLanguage()) + { + yield return StartCoroutine(DownloadManifestOfManifest("manifest_assetmanifest", delegate + { + isError = true; + }, isSubMani: true)); + } + if (isError) + { + yield break; + } + yield return StartCoroutine(DownloadManifestOfManifest("manifest_assetmanifest", delegate + { + isError = true; + }, isSubMani: false)); + if (!isError) + { + bool isDone = false; + CacheAsset("manifest_assetmanifest", delegate + { + isDone = true; + }); + while (!isDone) + { + yield return 0; + } + } + } + + private IEnumerator DownloadManifestOfManifest(string manifestOfManifestName, Action errorCallback, bool isSubMani) + { + bool isDone = false; + AssetErrorState errorState = new AssetErrorState(); + RequestDownload(manifestOfManifestName, isManifest: true, new AssetRequestContext(delegate + { + isDone = true; + }, null, errorState), isSubMani); + while (!isDone) + { + yield return 0; + } + if (errorState.HasError()) + { + errorCallback?.Invoke(); + } + } + + private bool CheckExtraDownload() + { + return true; + } + + private void DecideMovieManifestName() + { + currentMovieManifestName = string.Format("{0}_{1}", "moviemanifest", CustomPreference.GetSoundMovieLanguage().ToLower()); + } + + private void PrepareManifestList(out List downloadList, out List loadList, bool extraDownload) + { + List list = new List(); + loadList = new List(); + for (int i = 0; i < categoryNameList.Length; i++) + { + string item = categoryNameList[i] + "_assetmanifest"; + list.Add(item); + loadList.Add(item); + } + DecideMovieManifestName(); + if (extraDownload) + { + string[] array = new string[3] { "soundmanifest", currentMovieManifestName, "fontmanifest" }; + foreach (string item2 in array) + { + list.Add(item2); + loadList.Add(item2); + } + } + downloadList = new List(); + foreach (string item3 in list) + { + if (handleDictionary.TryGetValue(item3, out var value)) + { + if (value.isReDownloadAsset(CustomPreference.IsNormalResource)) + { + downloadList.Add(item3); + } + } + else + { + value = new AssetHandle(item3, null, null, null, null, null, isManifest: true); + handleDictionary.Add(item3, value); + downloadList.Add(item3); + } + } + } + + public IEnumerator InitializeManifest(Action completeCallback, bool isTutorialDL) + { + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = 60; + if (!CreateLocalFileCacheDirectories()) + { + UIManager.GetInstance().isErrorProc = false; + string titleLabel = Data.SystemText.Get("System_0020"); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(isSystem: true); + if (dialogBase != null) + { + dialogBase.SetFadeButtonEnabled(flag: false); + dialogBase.SetTitleLabel(titleLabel); + dialogBase.SetText(Data.SystemText.Get("System_0021")); + dialogBase.SetReturnMsg(UIManager.GetInstance().gameObject, "CommonResetGame"); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.GrayBtn); + dialogBase.SetButtonText(Data.SystemText.Get("System_0006")); + dialogBase.ClickSe_Btn1 = Se.TYPE.SYS_BTN_CANCEL_TRANS; + dialogBase.SetPanelDepth(6000); + } + UIManager.GetInstance().isNoAvailMemory = true; + UIManager.GetInstance().isRetryProc = false; + while (!UIManager.GetInstance().isErrorProc) + { + yield return 0; + } + UIManager.GetInstance().isNoAvailMemory = false; + if (!UIManager.GetInstance().isRetryProc) + { + SoftwareResetBase.SoftwareReset(null, null); + } + } + LoadPreinManifest(); + yield return StartCoroutine(TryDownloadManifestOfManifest()); + bool extraDownload = CheckExtraDownload(); + PrepareManifestList(out var downloadList, out var loadList, extraDownload); + if (downloadList.Count > 0) + { + yield return StartCoroutine(Toolbox.ResourcesManager.DownloadAssetGroup(downloadList, null, isProgress: false)); + } + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupSync(loadList, null, isProgress: false)); + bool isDone = false; + if (extraDownload) + { + isDone = false; + RequestDownload("card_shader_common.unity3d", isManifest: false, delegate + { + isDone = true; + }); + while (!isDone) + { + yield return 0; + } + } + CacheAsset("card_shader_common.unity3d", delegate + { + isDone = true; + }); + while (!isDone) + { + yield return 0; + } + loadList.Sort(); + ClearManifestOfManifests(); + Toolbox.SavedataManager.Save(); + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = Toolbox.QualityManager.GetFrameRate(); + completeCallback?.Invoke(); + } + + public bool IsShouldLoadPreinResource(string fileName) + { + return false; + } + + public bool IsUseDownloadResource(string fileName) + { + return true; + } + + private void LoadPreinManifest() + { + } + + private string CalcWholeResourceHash(List loadedManfiestList) + { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.Append(Toolbox.SavedataManager.GetResourceVersion()); + stringBuilder.Append("|"); + int i = 0; + for (int count = loadedManfiestList.Count; i < count; i++) + { + string text = loadedManfiestList[i]; + if (handleDictionary.TryGetValue(text, out var value)) + { + if (string.IsNullOrEmpty(value.dataHash)) + { + Debug.LogError("manifest hash not found: " + text); + return ""; + } + stringBuilder.Append(text); + stringBuilder.Append(","); + stringBuilder.Append(value.dataHash); + stringBuilder.Append("|"); + } + } + SHA1CryptoServiceProvider sHA1CryptoServiceProvider = new SHA1CryptoServiceProvider(); + byte[] array = sHA1CryptoServiceProvider.ComputeHash(new UTF8Encoding().GetBytes(stringBuilder.ToString())); + StringBuilder stringBuilder2 = new StringBuilder(); + for (int j = 0; j < array.Length; j++) + { + stringBuilder2.Append(Convert.ToString(array[j], 16).PadLeft(2, '0')); + } + sHA1CryptoServiceProvider.Clear(); + return stringBuilder2.ToString(); + } + + public void SetCategoryList(string[] _categoryList) + { + categoryNameList = _categoryList; + } + + public string[] GetCategoryList() + { + return categoryNameList; + } + + public bool RegistHandle(string key, AssetHandle handle) + { + try + { + handleDictionary.Add(key, handle); + if (handle.directory.StartsWith("v/t", StringComparison.Ordinal)) + { + _temporaryVoiceNameList.Add(Path.GetFileNameWithoutExtension(handle.filename)); + } + } + catch (Exception ex) + { + AssetHandle assetHandle = GetAssetHandle(key); + if (assetHandle != null && assetHandle.isMultipleHandleIgnorAsset) + { + assetHandle.CopyWithCatchException(handle); + assetHandle.reference--; + return true; + } + Debug.LogError(ex.Message); + return false; + } + return true; + } + + public AssetBundleObject GetAssetBundleObject(string assetName) + { + AssetBundleObject value = null; + if (objectDictionary.TryGetValue(assetName, out value)) + { + return value; + } + return null; + } + + public void DownloadAsset(string assetName, AssetRequestContext requestContext, bool isManifest = false) + { + RequestDownload(assetName, isManifest, requestContext); + } + + public void SetAssetBundle(string filename, AssetBundle assetbundle, bool isMultipleHandleIgnorAsset = false) + { + if (objectDictionary.TryGetValue(filename, out var value)) + { + if (!isMultipleHandleIgnorAsset) + { + for (int i = 0; i < value.objectArray.Count; i++) + { + UnityEngine.Object.DestroyImmediate(value.objectArray[i].baseObject, allowDestroyingAssets: true); + } + } + value.objectArray.Clear(); + if (value.assetBundle != null) + { + value.assetBundle.Unload(unloadAllLoadedObjects: true); + } + value.assetBundle = assetbundle; + } + else + { + value = new AssetBundleObject(); + value.assetBundle = assetbundle; + objectDictionary.Add(filename, value); + } + } + + public void SetObjectList(string filename, List objectList) + { + if (objectDictionary.TryGetValue(filename, out var value)) + { + value.objectArray = objectList; + } + } + + public bool HasObjectList(string filename) + { + return objectDictionary.ContainsKey(filename); + } + + public void UnloadAssetBundle(string assetName) + { + if (objectDictionary.TryGetValue(assetName, out var value)) + { + for (int i = 0; i < value.objectArray.Count; i++) + { + UnityEngine.Object.DestroyImmediate(value.objectArray[i].baseObject, allowDestroyingAssets: true); + } + value.objectArray.Clear(); + if (value.assetBundle != null) + { + value.assetBundle.Unload(unloadAllLoadedObjects: true); + value.assetBundle = null; + } + objectDictionary.Remove(assetName); + } + } + + public void UnloadAssetAll() + { + foreach (KeyValuePair item in handleDictionary) + { + item.Value.Unload(); + } + } + + public void UnloadAsset(string assetName) + { + if (!string.IsNullOrEmpty(assetName) && handleDictionary.TryGetValue(assetName, out var value) && value.assetType != AssetHandle.AssetType.Movie) + { + value.Unload(); + } + } + + public void UnloadTemporaryAssetAll() + { + foreach (KeyValuePair item in handleDictionary) + { + if (item.Value.unloadTemporary) + { + item.Value.UnloadTemporary(); + } + } + } + + public void UnloadTemporaryAsset(string assetName) + { + if (handleDictionary.TryGetValue(assetName, out var value) && value.unloadTemporary) + { + value.UnloadTemporary(); + } + } + + public void UnloadCommonAssetAll() + { + foreach (KeyValuePair item in handleDictionary) + { + if (item.Value.unloadCommon) + { + item.Value.UnloadCommon(); + } + } + } + + public void UnloadCommonAsset(string assetName) + { + if (handleDictionary.TryGetValue(assetName, out var value) && value.unloadCommon) + { + value.UnloadCommon(); + } + } + + public void CacheAsset(string assetName, Action callback = null) + { + CacheAsset(assetName, new AssetRequestContext(delegate + { + if (callback != null) + { + callback(); + } + })); + } + + public void CacheAsset(string assetName, AssetRequestContext requestContext) + { + AssetHandle value = null; + if (handleDictionary.TryGetValue(assetName, out value) && !value.useStreamingAsset) + { + value.Load(requestContext); + } + else if (requestContext != null && requestContext.callback != null) + { + requestContext.callback(value); + } + } + + public void CachePersistantAssetBeforeManifestLoad(string assetName, Action callback = null) + { + CachePersistantAssetBeforeManifestLoad(assetName, new AssetRequestContext(delegate + { + if (callback != null) + { + callback(); + } + })); + } + + public void CachePersistantAssetBeforeManifestLoad(string assetName, AssetRequestContext requestContext) + { + AssetHandle value = null; + if (handleDictionary.TryGetValue(assetName, out value)) + { + requestContext.callback(value); + return; + } + value = new AssetHandle(assetName, "", null, null, null, null); + if (File.Exists(value.BuildLocalCachePath())) + { + Toolbox.AssetManager.RegistHandle(assetName, value); + value.Load(requestContext); + } + else if (requestContext != null && requestContext.callback != null) + { + requestContext.callback(value); + } + } + + public UnityEngine.Object LoadObject(string objectName, Type type, bool isIfFindLoad = false) + { + string value = objectName.ToLower() + "."; + foreach (AssetBundleObject value2 in objectDictionary.Values) + { + int count = value2.objectArray.Count; + for (int i = 0; i < count; i++) + { + AssetObject assetObject = value2.objectArray[i]; + if (assetObject.baseObject != null && (assetObject.baseObject.GetType() == type || assetObject.baseObject.GetType().IsSubclassOf(type)) && assetObject.basePath.IndexOf(value, StringComparison.Ordinal) != -1) + { + return assetObject.baseObject; + } + } + } + return null; + } + + public UnityEngine.Object LoadObject(string assetName, string objectName, Type type) + { + string text = objectName.ToLower() + "."; + if (objectDictionary.TryGetValue(assetName, out var value)) + { + int count = value.objectArray.Count; + for (int i = 0; i < count; i++) + { + if (value.objectArray[i].baseObject != null && text.Equals(value.objectArray[i].basePath) && (value.objectArray[i].baseObject.GetType() == type || value.objectArray[i].baseObject.GetType().IsSubclassOf(type))) + { + return value.objectArray[i].baseObject; + } + } + } + return null; + } + + public object LoadObjectByte(string objectName, Type type, bool isIfFindLoad = false) + { + if (string.IsNullOrEmpty(objectName)) + { + Debug.LogError("empty name for AssetManager.LoadObject"); + return null; + } + foreach (KeyValuePair item in objectDictionary) + { + AssetBundleObject value = item.Value; + for (int i = 0; i < value.objectArray.Count; i++) + { + if (value.objectArray[i] != null && value.objectArray[i].baseObject != null && (type == typeof(UnityEngine.Object) || value.objectArray[i].baseObject.GetType() == type)) + { + return value.objectArray[i].baseObject; + } + } + } + return null; + } + + public void RegistCommonAsset(string assetName) + { + AssetHandle assetHandle = GetAssetHandle(assetName); + if (assetHandle != null) + { + assetHandle.unloadCommon = true; + } + } + + public void RegistTemporaryAsset(string assetName) + { + AssetHandle assetHandle = GetAssetHandle(assetName); + if (assetHandle != null) + { + assetHandle.unloadTemporary = true; + } + } + + public void AddDownloadJob(IEnumerator enumerator, Action cancelAction) + { + _asyncJobDownload.Add(enumerator, cancelAction); + } + + public void AddLoadJob(IEnumerator enumerator, Action cancelAction) + { + _asyncJobLoad.Add(enumerator, cancelAction); + } + + private void RequestDownload(string name, bool isManifest, Action callback, bool isSubMani = false) + { + RequestDownload(name, isManifest, new AssetRequestContext(delegate + { + if (callback != null) + { + callback(); + } + }), isSubMani); + } + + private void RequestDownload(string name, bool isManifest, AssetRequestContext requestContext, bool isSubMani = false) + { + if (isManifest && !handleDictionary.TryGetValue(name, out var value)) + { + value = new AssetHandle(name, null, null, null, null, null, isManifest); + handleDictionary.Add(name, value); + } + value = GetAssetHandle(name); + if (value == null) + { + value = new AssetHandle(name, "", null, null, null, null); + handleDictionary.Add(name, value); + } + value.isSubManifest = isSubMani; + value.Download(requestContext); + } + + public bool IsEnableAssetName(string assetName) + { + return handleDictionary.ContainsKey(assetName); + } + + public AssetHandle GetAssetHandle(string assetName, bool isWarning = true) + { + AssetHandle value = null; + handleDictionary.TryGetValue(assetName, out value); + return value; + } + + public void ClearAssetCacheAssetBundle() + { + foreach (KeyValuePair item in objectDictionary) + { + AssetBundleObject value = item.Value; + List objectArray = item.Value.objectArray; + if (objectArray != null) + { + for (int i = 0; i < objectArray.Count; i++) + { + UnityEngine.Object.DestroyImmediate(objectArray[i].baseObject, allowDestroyingAssets: true); + } + } + if (value.assetBundle != null) + { + value.assetBundle.Unload(unloadAllLoadedObjects: true); + } + } + objectDictionary.Clear(); + handleDictionary.Clear(); + } + + public void ClearAllAssetFile() + { + ClearManifestAll(); + ClearAssetBundleAll(forceCleanCache: true); + ClearSoundFileAll(); + ClearMovieAll(); + ClearFontAll(); + ClearTemporaryFileAll(); + Caching.ClearCache(); + } + + public void ClearManifestAll() + { + ClearManifestOfManifests(); + ClearLocalCache("manifest"); + if (_localDatahashStore != null) + { + _localDatahashStore.DeleteAll(); + } + } + + public void ClearAssetBundleAll(bool forceCleanCache) + { + ClearLocalCache("a"); + if (forceCleanCache) + { + Caching.ClearCache(); + } + } + + public void ClearMovieAll() + { + ClearLocalCache("m"); + } + + public void ClearFontAll() + { + ClearLocalCache("f"); + } + + public void ClearSoundFileAll() + { + ClearSoundFileBgm(); + ClearSoundFileSe(); + ClearSoundFileVoice(); + } + + public void ClearSoundFileBgm() + { + ClearLocalCache("b"); + } + + public void ClearSoundFileSe() + { + ClearLocalCache("s"); + } + + public void ClearSoundFileVoice() + { + ClearLocalCache("v"); + } + + public void ClearTemporaryFileAll() + { + ClearTemporaryVoiceFile(); + } + + public void ClearTemporaryVoiceFile() + { + ClearLocalCache("v/t"); + } + + private void ClearLocalCache(string keyword) + { + string value = keyword + "/"; + try + { + List list = new List(); + foreach (KeyValuePair item in handleDictionary) + { + if (item.Key.StartsWith(value)) + { + list.Add(item.Key); + } + } + int count = list.Count; + for (int i = 0; i < count; i++) + { + handleDictionary.Remove(list[i]); + } + DeleteLocalDatahashByPrefix(keyword + "/"); + string path = _savePath + keyword; + if (Directory.Exists(path)) + { + Directory.Delete(path, recursive: true); + } + } + catch (Exception ex) + { + Debug.LogError(ex.Message); + } + } + + public IEnumerator DownloadAssetBundleAll(Action callback) + { + assetList.Clear(); + foreach (KeyValuePair item in handleDictionary) + { + if (item.Value.IsAssetBundle()) + { + assetList.Add(item.Key); + } + } + yield return StartCoroutine(Toolbox.ResourcesManager.DownloadAssetGroup(assetList, callback)); + } + + public IEnumerator DownloadSoundAll(Action callback) + { + soundList.Clear(); + foreach (KeyValuePair item in handleDictionary) + { + if (item.Value.IsSound()) + { + soundList.Add(item.Key); + } + } + yield return StartCoroutine(Toolbox.ResourcesManager.DownloadAssetGroup(soundList, callback)); + } + + public IEnumerator DownloadMovieAll(Action callback) + { + movieList.Clear(); + foreach (KeyValuePair item in handleDictionary) + { + if (item.Value.IsMovie()) + { + movieList.Add(item.Key); + } + } + yield return StartCoroutine(Toolbox.ResourcesManager.DownloadAssetGroup(movieList, callback)); + } + + public IEnumerator PreDownloadListCoroutine(Action, List> onFinish) + { + Action, List, float, float> finish = delegate(List normalResourceDownloadList, List smallResourceDownloadList, float size, float smallResourceDownloadSize) + { + _normalResourceDownloadSize = size; + _smallResourceDownloadSize = smallResourceDownloadSize; + onFinish(normalResourceDownloadList, smallResourceDownloadList); + }; + while (!Toolbox.ResourcesManager.CanStartDownload()) + { + yield return new WaitForSeconds(1f); + } + PreDownloadListCoroutine(finish, withTutorial: true); + } + + public void RefreshNeedDownloadFile() + { + Action, List, float, float> onFinish = delegate(List normalResourceDownloadList, List smallResourceDownloadList, float size, float smallResourceDownloadSize) + { + _normalResourceDownloadSize = size; + _smallResourceDownloadSize = smallResourceDownloadSize; + }; + PreDownloadListCoroutine(onFinish, withTutorial: true); + } + + public void PreDownloadListCoroutine(Action, List, float, float> onFinish, bool withTutorial) + { + List list = new List(); + List list2 = new List(); + float num = 0f; + float num2 = 0f; + foreach (KeyValuePair item in handleDictionary) + { + AssetHandle value = item.Value; + bool flag = withTutorial || !value.isTutorialDownload; + if (!value.IsManifests() && value.isPreDownload && flag) + { + if (value.isReDownloadAsset(isNormalSizeResource: true)) + { + list.Add(item.Key); + num += value.manifestDataSize; + } + if (value.isReDownloadAsset(isNormalSizeResource: false)) + { + list2.Add(item.Key); + num2 += value.ManifestSmallDataSize; + } + } + } + onFinish.Call(list, list2, num, num2); + } + + public float GetNeedDownloadSize(bool isNormalResource, bool isTutorial) + { + float num = 0f; + foreach (KeyValuePair item in handleDictionary) + { + AssetHandle value = item.Value; + if ((!isTutorial || value.isTutorialDownload) && value.isPreDownload && !value.IsManifests() && value.isReDownloadAsset(isNormalResource)) + { + num += (isNormalResource ? value.manifestDataSize : value.ManifestSmallDataSize); + } + } + return num; + } + + public float GetTotalStrageUseSize(bool isNormalResource) + { + float num = 0f; + foreach (KeyValuePair item in handleDictionary) + { + AssetHandle value = item.Value; + if (value.isPreDownload && !value.IsManifests()) + { + num += (isNormalResource ? value.manifestDataSize : value.ManifestSmallDataSize); + } + } + return num; + } + + public float GetDownloadSize(bool isNormalResource) + { + if (!isNormalResource) + { + return _smallResourceDownloadSize; + } + return _normalResourceDownloadSize; + } + + public static string GetSuffixByDigit(float num) + { + int num2 = Mathf.FloorToInt(Mathf.Log(num, 2f)) + 1; + if (num2 <= 0) + { + return (num * 1024f).ToString("0.0") + "KB"; + } + if (num2 >= 11) + { + return (num / 1024f).ToString("0.0") + "GB"; + } + return num.ToString("0.0") + "MB"; + } + + public List GetTutorialDownloadList(bool isNormalResource) + { + List list = new List(); + if (isNormalResource) + { + _normalResourceDownloadSize = 0f; + } + else + { + _smallResourceDownloadSize = 0f; + } + foreach (KeyValuePair item in handleDictionary) + { + AssetHandle value = item.Value; + if (value.IsManifests() || !value.isTutorialDownload) + { + continue; + } + if (isNormalResource) + { + if (value.isReDownloadAsset(isNormalSizeResource: true)) + { + list.Add(item.Key); + _normalResourceDownloadSize += value.manifestDataSize; + } + } + else if (value.isReDownloadAsset(isNormalSizeResource: false)) + { + list.Add(item.Key); + _smallResourceDownloadSize += value.manifestDataSize; + } + } + return list; + } + + public int assetbundleOpenCount() + { + int num = 0; + foreach (KeyValuePair item in objectDictionary) + { + if (item.Value.assetBundle != null) + { + num++; + } + } + return num; + } + + public int assetbundleListCount() + { + return objectDictionary.Count; + } + + public IEnumerator InitializeSoundManifest() + { + handleDictionary.Remove("soundmanifest"); + bool isDone = false; + RequestDownload("soundmanifest", isManifest: true, delegate + { + Directory.CreateDirectory(_savePath + "b"); + Directory.CreateDirectory(_savePath + "s"); + Directory.CreateDirectory(_savePath + "v"); + isDone = true; + }); + while (!isDone) + { + yield return 0; + } + } + + public IEnumerator InitializeMovieManifest() + { + handleDictionary.Remove("moviemanifest"); + bool isDone = false; + RequestDownload("moviemanifest", isManifest: true, delegate + { + Directory.CreateDirectory(_savePath + "m"); + isDone = true; + }); + while (!isDone) + { + yield return 0; + } + } + + public void ResetDownloadCount() + { + downloadReqCount = 0; + downloadCompCount = 0; + _downloadCompletedSize = 0f; + ResetLoadCount(); + } + + public void ResetLoadCount() + { + loadingReqCount = 0; + loadingCompCount = 0; + loadingManifestCompCount = 0; + } + + public void createSavePath() + { + manifestSavePath = _savePath + "manifest/"; + bundleSavePath = _savePath + "a/"; + soundSavePath = _savePath; + movieSavePath = _savePath; + fontSavePath = _savePath; + } + + public string getAssetSavePath(AssetHandle.AssetType _assetType) + { + switch (_assetType) + { + case AssetHandle.AssetType.Manifests: + return manifestSavePath; + case AssetHandle.AssetType.AssetBundle: + return bundleSavePath; + case AssetHandle.AssetType.Sound: + case AssetHandle.AssetType.TemporarySound: + return soundSavePath; + case AssetHandle.AssetType.Movie: + return movieSavePath; + case AssetHandle.AssetType.Font: + return fontSavePath; + default: + return bundleSavePath; + } + } + + public void createPackagePath() + { + manifestPackagePath = _packageDataPath + "manifest/"; + bundlePackagePath = _packageDataPath + "a/"; + soundPackagePath = _packageDataPath; + moviePackagePath = _packageDataPath + CustomPreference.GetLanguageFolderName(); + } + + public string getAssetPackagePath(AssetHandle.AssetType _assetType) + { + switch (_assetType) + { + case AssetHandle.AssetType.Manifests: + return manifestPackagePath; + case AssetHandle.AssetType.AssetBundle: + return bundlePackagePath; + case AssetHandle.AssetType.Sound: + case AssetHandle.AssetType.TemporarySound: + return soundPackagePath; + case AssetHandle.AssetType.Movie: + return moviePackagePath; + case AssetHandle.AssetType.Font: + return fontPackagePath; + default: + return bundlePackagePath; + } + } + + public int GetDownloadMaxCount() + { + return downloadReqCount; + } + + public int GetDownloadCurrentCount() + { + return downloadCompCount; + } + + public float GetDownloadCompletedSize() + { + return _downloadCompletedSize; + } + + public int GetLoadingMaxCount() + { + return loadingReqCount; + } + + public int GetLoadingCurrentCount() + { + return loadingCompCount; + } + + public int GetManifestMaxCount() + { + return categoryNameList.Length; + } + + public int GetManifestCompleteCount() + { + return loadingManifestCompCount; + } + + public void AddManifestCount() + { + loadingManifestCompCount++; + } + + public void AddDownloadMaxCount(int cnt = -1) + { + if (cnt == -1) + { + downloadReqCount++; + } + else + { + downloadReqCount += cnt; + } + } + + public void AddDownloadCurrentCount() + { + downloadCompCount++; + } + + public void AddDownloadCompletedSize(float size) + { + _downloadCompletedSize += size; + } + + public void AddLoadingMaxCount(int cnt = -1) + { + if (cnt == -1) + { + loadingReqCount++; + } + else + { + loadingReqCount += cnt; + } + } + + public void AddLoadingCurrentCount(string strFileName) + { + loadingCompCount++; + } + + public void AddNoUnloadAssetGroupName(string name) + { + if (name == "") + { + return; + } + for (int i = 0; i < NoUnloadAssetName.Count; i++) + { + if (NoUnloadAssetName[i].CompareTo(name) == 0) + { + return; + } + } + NoUnloadAssetName.Add(name); + } + + public void RemoveUnloadAssetGroupName(string name) + { + if (!(name == "")) + { + NoUnloadAssetName.Remove(name); + } + } + + public bool CheckSavedDataAccuracy(List DataNameList) + { + if (DataNameList == null) + { + return true; + } + SHA1CryptoServiceProvider sHA1CryptoServiceProvider = new SHA1CryptoServiceProvider(); + int i = 0; + for (int count = DataNameList.Count; i < count; i++) + { + string key = DataNameList[i]; + if (handleDictionary.TryGetValue(key, out var value)) + { + string value2 = Utility.CreateHash(File.ReadAllBytes(value.BuildLocalCachePath())).ToString(); + if (!value.dataHash.Equals(value2)) + { + sHA1CryptoServiceProvider.Clear(); + return false; + } + } + } + sHA1CryptoServiceProvider.Clear(); + return true; + } + + public bool DeleteUnity3dAssetHash(List deleteDataNameList) + { + int i = 0; + for (int count = deleteDataNameList.Count; i < count; i++) + { + string key = deleteDataNameList[i]; + if (handleDictionary.TryGetValue(key, out var value)) + { + Toolbox.SavedataManager.DeleteKey(value.directory + value.filename); + } + } + return true; + } + + public bool IsTemporaryVoice(string fileName) + { + return _temporaryVoiceNameList.Contains(fileName); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetObject.cs b/SVSim.BattleEngine/Engine/Cute/AssetObject.cs new file mode 100644 index 0000000..7fdef4d --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetObject.cs @@ -0,0 +1,16 @@ +using UnityEngine; + +namespace Cute; + +public class AssetObject +{ + public string basePath { get; private set; } + + public Object baseObject { get; private set; } + + public AssetObject(string path, Object obj) + { + basePath = path; + baseObject = obj; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetRequestContext.cs b/SVSim.BattleEngine/Engine/Cute/AssetRequestContext.cs new file mode 100644 index 0000000..09fc9b5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetRequestContext.cs @@ -0,0 +1,22 @@ +using System; + +namespace Cute; + +public class AssetRequestContext +{ + public Action callback { get; set; } + + public AssetErrorState errorState { get; set; } + + public Utility.LeanSemaphore semaphore { get; set; } + + public bool preferSynchronousLoad { get; set; } + + public AssetRequestContext(Action callback = null, Utility.LeanSemaphore semaphore = null, AssetErrorState errorState = null, bool preferSynchronousLoad = false) + { + this.callback = callback; + this.semaphore = semaphore; + this.errorState = errorState; + this.preferSynchronousLoad = preferSynchronousLoad; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AsyncJob.cs b/SVSim.BattleEngine/Engine/Cute/AsyncJob.cs new file mode 100644 index 0000000..511e02d --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AsyncJob.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Cute; + +public class AsyncJob +{ + private class Unit + { + public object action; + + public Action cancelAction; + + public Unit(object action, Action cancelAction) + { + this.action = action; + this.cancelAction = cancelAction; + } + } + + private int num; + + private MonoBehaviour mono; + + private List jobList = new List(); + + private bool isCancel; + + private int? _waitFramesBetweenJobs; + + private int _waitFramesBetweenJobsMin; + + private FramerateProfiler _framerateProfiler = new FramerateProfiler(); + + public int WAIT_FRAMES_INCREMENT = 5; + + public int WAIT_FRAMES_DECREMENT = 1; + + public bool IsIdle + { + get + { + if (!isCancel) + { + return jobList.Count == 0; + } + return false; + } + } + + public int? WantedWaitFramesBetweenJobs + { + set + { + _waitFramesBetweenJobs = value; + _waitFramesBetweenJobsMin = value.GetValueOrDefault(); + } + } + + public AsyncJob(MonoBehaviour mono, int num) + { + this.mono = mono; + this.num = num; + } + + public void Add(IEnumerator enumerator) + { + jobList.Add(new Unit(enumerator, null)); + } + + public void Add(IEnumerator enumerator, Action calcelAction) + { + jobList.Add(new Unit(enumerator, calcelAction)); + } + + public void Add(Action action) + { + jobList.Add(new Unit(action, null)); + } + + public void Add(Action action, Action calcelAction) + { + jobList.Add(new Unit(action, calcelAction)); + } + + public void Cancel() + { + if (!isCancel && jobList.Count != 0) + { + isCancel = true; + Add(CancelTerminator, CancelTerminator); + } + } + + public void CancelTerminator() + { + isCancel = false; + } + + public void Start() + { + for (int i = 0; i < num; i++) + { + mono.StartCoroutine(MicroThread()); + } + _framerateProfiler = new FramerateProfiler(); + mono.StartCoroutine(RunFpsProfiler()); + } + + private IEnumerator RunFpsProfiler() + { + _framerateProfiler.Init(); + while (true) + { + _framerateProfiler.Update(); + yield return null; + } + } + + private IEnumerator MicroThread() + { + while (true) + { + if (jobList.Count <= 0) + { + yield return null; + continue; + } + Unit unit = jobList[0]; + jobList.RemoveAt(0); + if (isCancel) + { + if (unit.cancelAction != null) + { + unit.cancelAction(); + } + } + else if (unit.action is IEnumerator) + { + yield return mono.StartCoroutine((IEnumerator)unit.action); + if (!_waitFramesBetweenJobs.HasValue) + { + continue; + } + float? fps = _framerateProfiler.Fps; + if (fps.HasValue) + { + if (fps < 20f) + { + _waitFramesBetweenJobs += WAIT_FRAMES_INCREMENT; + _framerateProfiler.Init(); + } + else if (fps > 30f) + { + _waitFramesBetweenJobs -= WAIT_FRAMES_INCREMENT; + if (_waitFramesBetweenJobs.Value < _waitFramesBetweenJobsMin) + { + _waitFramesBetweenJobs = _waitFramesBetweenJobsMin; + } + _framerateProfiler.Init(); + } + } + yield return WaitFrames(_waitFramesBetweenJobs.Value); + } + else if (unit.action is Action) + { + ((Action)unit.action)(); + } + } + } + + private static IEnumerator WaitFrames(int frameCount) + { + while (frameCount > 0) + { + frameCount--; + yield return null; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AudioManager.cs b/SVSim.BattleEngine/Engine/Cute/AudioManager.cs new file mode 100644 index 0000000..f1a5cb5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AudioManager.cs @@ -0,0 +1,808 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using CriWare; +using UnityEngine; + +namespace Cute; + +public class AudioManager : MonoBehaviour, IManager +{ + [SerializeField] + private GameObject _bgmParent; + + [SerializeField] + private CriAtomSource[] _bgm; + + private int _bgmSourceCount; + + [SerializeField] + private GameObject _seParent; + + [SerializeField] + private CriAtomSource[] _se; + + private int _seSourceCount; + + private SoundData[] _playingSe; + + [SerializeField] + private GameObject _voiceParent; + + [SerializeField] + private CriAtomSource[] _voice; + + private int _voiceSourceCount; + + private bool _bgmPlaySuspend; + + private const int BGM_FADEOUT_TIME = 500; + + private const int SONG_PREVIEW_FADE_TIME = 500; + + private const int SONG_PREVIEW_FADE_SPACE_TIME = 1500; + + private const float SE_FADE_TIME = 0.5f; + + public const int DELAY_TIME_OFFSET = -4; + + private const float VOULMN_BOOST_FACTOR = 1.5f; + + public const string ACB_EXTENSION_WITHPARAM = "{0}.acb"; + + public const string ACB_EXTENSION = ".acb"; + + public const string AWB_EXTENSION_WITHPARAM = "{0}.awb"; + + public const string AWB_EXTENSION = ".awb"; + + private const string STR_SUBFOLDER_BGM = "b/"; + + public const string STR_SUBFOLDER_SE = "s/"; + + private const string STR_SUBFOLDER_SONG = "l/"; + + private const string STR_SUBFOLDER_VOICE = "v/"; + + private const string STR_SUBFOLDER_STORY = "c/"; + + private const string STR_SUBFOLDER_ROOM = "r/"; + + public bool isDownloadVoiceUse = true; + + protected bool _isRedy; + + private bool _noSeMode; + + private CriAtomExPlayback _playback; + + private CriAtomExPlayback _bgmPlayback; + + private float _sampleTime; + + private int _delayTime; + + private int _criDelayTime; + + private int _criInitializeCount; + + private const int CRI_RETRY_COUNT = 3; + + private Dictionary _acbDictionary = new Dictionary(); + + private string[] STR_PREINSTALL_FILENAME = new string[1] { "preinstall" }; + + public const float VOICE_MASTER_VOLUME = 0.8f; + + private Action _callbackVoiseEnd; + + private string _bgmName = ""; + + private int _cueId = -1; + + private string _bgmCue = ""; + + public bool isRedy => _isRedy; + + public int delayTime + { + get + { + return _delayTime; + } + set + { + _delayTime = value; + } + } + + public string bgmName + { + get + { + return _bgmName; + } + set + { + _bgmName = value; + } + } + + public int cueId + { + get + { + return _cueId; + } + set + { + _cueId = value; + } + } + + public string bgmCue + { + get + { + return _bgmCue; + } + set + { + _bgmCue = value; + } + } + + private void Awake() + { + } + + private IEnumerator Start() + { + _bgm = _bgmParent.GetComponentsInChildren(); + _bgmSourceCount = _bgm.Length; + for (int i = 0; i < _bgmSourceCount; i++) + { + CriAtomExPlayer player = _bgm[i].player; + player.AttachFader(); + player.ResetFaderParameters(); + player.SetFadeOutTime(500); + } + _se = _seParent.GetComponentsInChildren(); + _seSourceCount = _se.Length; + _playingSe = new SoundData[_seSourceCount]; + for (int j = 0; j < _seSourceCount; j++) + { + CriAtomExPlayer player2 = _se[j].player; + player2.AttachFader(); + player2.ResetFaderParameters(); + } + _voice = _voiceParent.GetComponentsInChildren(); + _voiceSourceCount = _voice.Length; + for (int k = 0; k < _voiceSourceCount; k++) + { + CriAtomExPlayer player3 = _voice[k].player; + player3.AttachFader(); + player3.ResetFaderParameters(); + } + Toolbox.AudioManager = this; + yield break; + } + + public void ResetSoundMode() + { + _noSeMode = false; + } + + private void Update() + { + } + + public void PauseAllBgm(bool pauseStatus) + { + if (pauseStatus) + { + _bgmPlaySuspend = false; + for (int i = 0; i < _bgmSourceCount; i++) + { + if (_bgm[i].status == CriAtomSource.Status.Prep || _bgm[i].status == CriAtomSource.Status.Playing) + { + _bgm[i].Pause(sw: true); + _bgmPlaySuspend = true; + } + } + } + else if (_bgmPlaySuspend) + { + for (int j = 0; j < _bgmSourceCount; j++) + { + _bgm[j].Pause(sw: false); + } + } + } + + public long GetMusicLength(string acbName) + { + CriAtomExAcb acb = CriAtom.GetAcb(acbName); + if (acb != null && acb.GetCueInfo(0, out var info)) + { + return info.length; + } + return -1L; + } + + public bool IsAvailableCueSheet(string cueName) + { + CriAtomCueSheet cueSheet = CriAtom.GetCueSheet(cueName); + if (cueSheet != null) + { + return cueSheet.acb != null; + } + return false; + } + + public bool AddCueSheet(string _name, string acbFile, string subFolderPath, string awbname = "") + { + _name = _name.Replace(".acb", ""); + if (CriAtom.GetCueSheet(_name) != null || CriAtom.GetCueSheet(acbFile) != null) + { + return true; + } + bool flag = false; + int num = STR_PREINSTALL_FILENAME.Length; + for (int i = 0; i < num; i++) + { + if (string.Compare(_name, STR_PREINSTALL_FILENAME[i]) == 0) + { + flag = true; + break; + } + } + if (flag) + { + acbFile = $"{subFolderPath}{acbFile}"; + awbname = $"{subFolderPath}{awbname}"; + } + else + { + acbFile = string.Format("{0}{1}{2}{3}", Application.persistentDataPath, "/", subFolderPath, acbFile); + awbname = string.Format("{0}{1}{2}{3}", Application.persistentDataPath, "/", subFolderPath, awbname); + } + CriAtomCueSheet criAtomCueSheet = CriAtom.AddCueSheet(_name, acbFile, awbname); + if (criAtomCueSheet == null) + { + return false; + } + if (criAtomCueSheet.acb == null) + { + RemoveCueSheet(_name); + return false; + } + return true; + } + + public bool AddCueSheetFromFileName(string _name, string acbFile, string awbname) + { + _name = _name.Replace(".acb", ""); + int num = STR_PREINSTALL_FILENAME.Length; + for (int i = 0; i < num && string.Compare(_name, STR_PREINSTALL_FILENAME[i]) != 0; i++) + { + } + if (CriAtom.GetCueSheet(_name) != null) + { + return true; + } + CriAtomCueSheet criAtomCueSheet = CriAtom.AddCueSheet(_name, acbFile, awbname); + if (criAtomCueSheet == null) + { + return false; + } + if (criAtomCueSheet.acb == null) + { + RemoveCueSheet(_name); + return false; + } + return true; + } + + public void RemoveCueSheet(string name) + { + name = name.Replace(".awb", ""); + name = name.Replace(".acb", ""); + name = name.Replace("s/", ""); + name = name.Replace("b/", ""); + CriAtom.RemoveCueSheet(name); + } + + public void RemoveCueSheet(List nameList) + { + for (int i = 0; i < nameList.Count; i++) + { + RemoveCueSheet(nameList[i]); + } + } + + public float GetSampleTime() + { + long numSamples = 0L; + int samplingRate = 0; + if (_playback.GetNumPlayedSamples(out numSamples, out samplingRate)) + { + _sampleTime = (float)numSamples / (float)samplingRate; + } + return _sampleTime; + } + + private void OnDestroy() + { + foreach (KeyValuePair item in _acbDictionary) + { + item.Value.Dispose(); + } + } + + public int GetDelayTimeFromCRI() + { + int result = 0; + if (_criInitializeCount >= 3) + { + return result; + } + return _criDelayTime / 10; + } + + public CriAtomSource GetBgmSource(int bgmId) + { + return _bgm[bgmId]; + } + + public int GetBgmMaxCount() + { + return _bgmSourceCount; + } + + public void VolumeUpdate_Bgm(int level, bool mute, int bgmId = -1) + { + if (bgmId < 0) + { + int num = _bgm.Length; + for (int i = 0; i < num; i++) + { + Volume_Bgm((float)level * 0.1f, mute, i); + } + } + else + { + Volume_Bgm((float)level * 0.1f, mute, bgmId); + } + } + + public void Volume_Bgm(float level, bool mute, int bgmId = -1) + { + if (mute) + { + level = 0f; + } + if (bgmId < 0) + { + int num = _bgm.Length; + for (int i = 0; i < num; i++) + { + _bgm[i].volume = level; + _bgm[i].player.Update(_bgmPlayback); + } + } + else + { + _bgm[bgmId].volume = level; + _bgm[bgmId].player.Update(_bgmPlayback); + } + } + + public bool IsPlayBgm(int bgmId = 0) + { + if (_bgm[bgmId].status == CriAtomSource.Status.Prep || _bgm[bgmId].status == CriAtomSource.Status.Playing) + { + return true; + } + return false; + } + + public int PlayBgmFromName(string cueSheet, string cueName, string acbName, string awbName = "", int bgmId = 0, bool loop = true, float FadeInfime = 0f, float OffsetTime = 0f, long startTime = 0L) + { + if (_bgmName == cueName) + { + return -1; + } + string acbFile = ""; + string awbname = ""; + if (acbName.CompareTo("") != 0) + { + acbFile = acbName + ".acb"; + } + if (awbName.CompareTo("") != 0) + { + awbname = awbName + ".awb"; + } + if (AddCueSheet(cueSheet, acbFile, "b/", awbname)) + { + StopBgm(bgmId); + _bgm[bgmId].cueSheet = cueSheet; + _bgm[bgmId].cueName = cueName; + _bgm[bgmId].player.ResetFaderParameters(); + _bgm[bgmId].player.SetStartTime(startTime); + _bgm[bgmId].player.SetFadeInTime((int)(FadeInfime * 1000f)); + _bgm[bgmId].player.SetFadeInStartOffset((int)(OffsetTime * 1000f)); + _bgm[bgmId].loop = loop; + _bgmPlayback = _bgm[bgmId].Play(); + _bgmName = cueName; + return 0; + } + return -1; + } + + public int PlayBgmFromId(string cueSheet, int cueId, int bgmId = 0, bool loop = true, float FadeInfime = 0f, float OffsetTime = 0f, long startTime = 0L) + { + if (_bgmCue == cueSheet && cueId == _cueId) + { + return -1; + } + if (CriAtom.GetCueSheet(cueSheet) != null) + { + StopBgm(bgmId); + _bgm[bgmId].cueSheet = cueSheet; + _bgm[bgmId].player.ResetFaderParameters(); + _bgm[bgmId].player.SetStartTime(startTime); + _bgm[bgmId].player.SetFadeInTime((int)(FadeInfime * 1000f)); + _bgm[bgmId].player.SetFadeInStartOffset((int)(OffsetTime * 1000f)); + _bgm[bgmId].loop = loop; + _bgmPlayback = _bgm[bgmId].Play(cueId); + _cueId = cueId; + _bgmCue = ""; + return 1; + } + return 0; + } + + public void StopBgm(int bgmId = 0) + { + _bgmName = ""; + _bgm[bgmId].Stop(); + } + + public void PauseBgm(bool isPause, int bgmId = 0) + { + _bgm[bgmId].Pause(isPause); + } + + public void StopFadeBgm(int bgmId = 0, float time = 0.5f) + { + _bgm[bgmId].player.SetFadeOutTime((int)(time * 1000f)); + StopBgm(bgmId); + } + + public void SetBgmVolume(float volume) + { + GameMgr.GetIns().GetSoundMgr().SetBgmVolume(volume); + } + + public void StartCoroutine_DelayMethod(float waitTime, Action process) + { + StartCoroutine(Timer.DelayMethod(waitTime, process)); + } + + public void VolumeUpdate_Se(int level, bool mute) + { + Volume_Se((float)level * 0.1f, mute); + } + + public void Volume_Se(float level, bool mute) + { + if (mute) + { + level = 0f; + } + for (int i = 0; i < _seSourceCount; i++) + { + _se[i].volume = level; + } + } + + public int PlaySeFromId(ref SoundData seData, bool loop = false) + { + int index = -1; + CriAtomSource criAtomSource = FindSe(ref seData, out index); + if (criAtomSource != null) + { + criAtomSource.cueSheet = seData._acbName; + criAtomSource.loop = loop; + CriAtomExPlayer player = criAtomSource.player; + player.ResetFaderParameters(); + player.SetFadeOutTime(0); + criAtomSource.Play(seData._cueName); + return index; + } + return index; + } + + public int PlaySeFromId(string cueName, int cueId, bool loop = false) + { + if (!IsAvailableCueSheet(cueName)) + { + return -1; + } + for (int i = 0; i < _seSourceCount; i++) + { + if (_se[i].status == CriAtomSource.Status.PlayEnd) + { + _se[i].Stop(); + } + if (_se[i].status == CriAtomSource.Status.Stop) + { + _se[i].cueSheet = cueName; + _se[i].loop = loop; + _se[i].Play(cueId); + return i; + } + } + return -1; + } + + private CriAtomSource FindSe(ref SoundData seData, out int index) + { + index = -1; + if (_noSeMode) + { + return null; + } + if (!IsAvailableCueSheet(seData._acbName)) + { + Debug.LogError($"No Include Acb!!!:{seData._acbName},{seData._cueName}"); + return null; + } + for (int i = 0; i < _seSourceCount; i++) + { + if (_se[i].status == CriAtomSource.Status.PlayEnd) + { + _se[i].Stop(); + } + if (_se[i].status == CriAtomSource.Status.Stop) + { + index = i; + return _se[i]; + } + } + return null; + } + + public int PlaySe(string cueName, int cueId, bool loop = false) + { + if (!IsAvailableCueSheet(cueName)) + { + return -1; + } + for (int i = 0; i < _seSourceCount; i++) + { + if (_se[i].status == CriAtomSource.Status.PlayEnd) + { + _se[i].Stop(); + } + if (_se[i].status == CriAtomSource.Status.Stop) + { + _se[i].cueSheet = cueName; + _se[i].loop = loop; + _se[i].Play(cueId); + return i; + } + } + return -1; + } + + public void StopSe(int index, float fadeout = 500f) + { + if (index >= 0 && index < _seSourceCount) + { + ResumeSe(index); + _se[index].player.SetFadeOutTime((int)(fadeout * 1000f)); + _se[index].Stop(); + } + } + + public void StopSe(string cuename, float fadeout = 500f) + { + for (int i = 0; i < _se.Length; i++) + { + if (_se[i].cueName.CompareTo(cuename) == 0) + { + ResumeSe(i); + _se[i].player.SetFadeOutTime((int)(fadeout * 1000f)); + _se[i].Stop(); + } + } + } + + public void StopSeAll(float fadeout = 500f) + { + for (int i = 0; i < _seSourceCount; i++) + { + StopSe(i, fadeout); + } + } + + public void PauseSe(int index) + { + if (index >= 0 && index < _seSourceCount && (_se[index].status == CriAtomSource.Status.Playing || _se[index].status == CriAtomSource.Status.Prep)) + { + _se[index].Pause(sw: true); + } + } + + public void ResumeSe(int index) + { + if (index >= 0 && index < _seSourceCount && _se[index].status == CriAtomSource.Status.Playing) + { + _se[index].Pause(sw: false); + } + } + + public bool IsPlaySe(string cueName, int cueId) + { + for (int i = 0; i < _seSourceCount; i++) + { + if (_playingSe[i]._cueName == cueName && _playingSe[i]._cueId == cueId && (_se[i].status == CriAtomSource.Status.Prep || _se[i].status == CriAtomSource.Status.Playing)) + { + return true; + } + } + return false; + } + + public bool IsPlaySe(string cueSheetName, string cueName, out int number) + { + number = 0; + for (int i = 0; i < _seSourceCount; i++) + { + if (_playingSe[i]._acbName == cueSheetName && _playingSe[i]._cueName == cueName && _se[i].status == CriAtomSource.Status.Playing) + { + number++; + } + } + if (number > 0) + { + return true; + } + return false; + } + + public bool IsPrepSe(string cueSheetName, string cueName, out int number) + { + number = 0; + for (int i = 0; i < _seSourceCount; i++) + { + if (_playingSe[i]._acbName == cueSheetName && _playingSe[i]._cueName == cueName && _se[i].status == CriAtomSource.Status.Prep) + { + number++; + } + } + if (number > 0) + { + return true; + } + return false; + } + + public void ResetSe() + { + for (int i = 0; i < _seSourceCount; i++) + { + _se[i].Stop(); + _se[i].Pause(sw: false); + } + } + + public bool IsPlaySe(int index) + { + if (_se[index].status == CriAtomSource.Status.Prep || _se[index].status == CriAtomSource.Status.Playing) + { + return true; + } + return false; + } + + public void SetAisac(string cuename, string param, float num) + { + for (int i = 0; i < _se.Length; i++) + { + if (_se[i].cueName.CompareTo(cuename) == 0) + { + _se[i].SetAisacControl(param, num); + } + } + } + + public int PlaySeFromName(string acbName, string seName, bool loop = false, float fadeInfime = 0f, long startTime = 0L) + { + if (!IsAvailableCueSheet(acbName)) + { + return -1; + } + for (int i = 0; i < _seSourceCount; i++) + { + if (_se[i].status == CriAtomSource.Status.PlayEnd) + { + _se[i].Stop(); + } + if (_se[i].status == CriAtomSource.Status.Stop) + { + _se[i].cueSheet = acbName; + _se[i].cueName = seName; + _se[i].loop = loop; + _se[i].player.ResetFaderParameters(); + _se[i].player.SetStartTime(startTime); + _se[i].player.SetFadeInTime((int)(fadeInfime * 1000f)); + _se[i].Play(seName); + return i; + } + } + return -1; + } + + public int GetVoiceSourceCount() + { + return _voiceSourceCount; + } + + public void VolumeUpdate_Voice(int level, bool mute, int voiceId = -1) + { + Volume_Voice((float)level * 0.1f, mute, voiceId); + } + + public void Volume_Voice(float level, bool mute, int voiceId = -1) + { + if (mute) + { + level = 0f; + } + if (voiceId < 0) + { + int num = _voice.Length; + for (int i = 0; i < num; i++) + { + _voice[i].volume = level; + } + } + else + { + _voice[voiceId].volume = level; + } + } + + public bool IsPlayVoice(int index) + { + if (_voice[index].status == CriAtomSource.Status.Prep || _voice[index].status == CriAtomSource.Status.Playing) + { + return true; + } + return false; + } + + public void PlayVoice(int voiceId, string acbFile, string cueSheet, string cueName) + { + AddCueSheet(cueSheet, acbFile, "v/"); + _voice[voiceId].Play(cueName); + } + + public void PlayVoice(int voiceId, string cueName) + { + _voice[voiceId].Play(cueName); + } + + public void StopVoice(int voiceId, float fadetout = 500f) + { + CriAtomSource criAtomSource = _voice[voiceId]; + if (criAtomSource != null && criAtomSource.player != null) + { + criAtomSource.player.SetFadeOutTime((int)(fadetout * 1000f)); + criAtomSource.Stop(); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/BootApp.cs b/SVSim.BattleEngine/Engine/Cute/BootApp.cs new file mode 100644 index 0000000..be8f444 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/BootApp.cs @@ -0,0 +1,75 @@ +using System.Collections; +using System.Globalization; +using System.Threading; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class BootApp : MonoBehaviour +{ + public static string BootScene; + + private Coroutine _logCoroutine; + + private string _logMsg = ""; + + private IEnumerator Start() + { + _logCoroutine = StartCoroutine(WaitToAccumulateTraceLog()); + _logMsg += "start"; + createMutex(); + restrainOSXProcess(); + startSteamClient(); + while (Toolbox.BootSystem == null) + { + yield return 0; + } + _logMsg += "start2"; + CultureInfo.DefaultThreadCurrentUICulture = (CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("ja-JP", useUserOverride: false)); + Toolbox.AssetManager.createSavePath(); + yield return StartCoroutine(FontChanger.FontTryChangePersistant(null)); + _logMsg += "start3"; + _logMsg += "start4"; + StopCoroutine(_logCoroutine); + changeScene(); + } + + private IEnumerator WaitToAccumulateTraceLog() + { + yield return new WaitForSeconds(5f); + LocalLog.AccumulateTraceInquiryLog("BootApp " + _logMsg); + } + + private void createMutex() + { + Toolbox.mute = new Mutex(initiallyOwned: false, "Global\\ShadowversePcPlatformGlobalThread"); + if (Toolbox.mute != null && !Toolbox.mute.WaitOne(0, exitContext: false)) + { + Toolbox.mute.Close(); + Toolbox.mute = null; + Application.Quit(); + } + } + + private void startSteamClient() + { + _ = SteamManager.Initialized; + } + + private void restrainOSXProcess() + { + } + + private void changeScene() + { + if (BootScene != null) + { + Toolbox.SceneManager.ChangeScene(BootScene); + } + else + { + Toolbox.SceneManager.ChangeScene(SceneType._Splash); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/BootNetwork.cs b/SVSim.BattleEngine/Engine/Cute/BootNetwork.cs new file mode 100644 index 0000000..e1275ec --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/BootNetwork.cs @@ -0,0 +1,93 @@ +using System.Collections; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class BootNetwork : MonoBehaviour +{ + public bool _autoSetup; + + public static bool IsDoneLanguageSetting; + + public bool IsDoneGameStartCheck { get; set; } + + private void Awake() + { + Object.DontDestroyOnLoad(base.gameObject); + } + + private IEnumerator Start() + { + while (Toolbox.BootSystem == null) + { + yield return 0; + } + while (Toolbox.NetworkManager == null) + { + yield return 0; + } + Toolbox.BootNetwork = this; + if (_autoSetup) + { + SetupNetwork(); + } + SetupNetworkLanguage(); + while (!IsDoneLanguageSetting) + { + yield return 0; + } + } + + private void OnDestroy() + { + } + + public void SetupNetwork() + { + if (!IsDoneGameStartCheck) + { + StartCoroutine(SetupNetworkCoroutine()); + } + } + + public void SetupNetworkLanguage() + { + string text = Toolbox.SavedataManager.GetString("LANG_SETTING"); + if (text == "Jpn") + { + Toolbox.SavedataManager.DeleteKey("LANG_SETTING"); + Toolbox.SavedataManager.DeleteKey("LANG_SOUND_SETTING"); + text = ""; + Toolbox.AssetManager.ClearAllAssetFile(); + Toolbox.AssetManager.ClearAssetCacheAssetBundle(); + } + if (string.IsNullOrEmpty(text)) + { + CustomPreference.SetScemeMode(CustomPreference.eSchemeType.Https); + CustomPreference.SetApplicationServerURL("utoongaize.shadowverse.jp/shadowverse/"); + } + else + { + IsDoneLanguageSetting = true; + } + } + + private IEnumerator SetupNetworkCoroutine() + { + if (!IsDoneGameStartCheck) + { + yield return StartCoroutine(Toolbox.NetworkManager._certification.Login()); + } + } + + public IEnumerator SetupNetworkCertification() + { + SetupNetwork(); + while (!IsDoneGameStartCheck) + { + yield return 0; + } + yield return StartCoroutine(Toolbox.AssetManager.InitializeManifest(null, Data.Load.data._userTutorial.tutorial_step != 100)); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/BootSystem.cs b/SVSim.BattleEngine/Engine/Cute/BootSystem.cs new file mode 100644 index 0000000..9bb024c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/BootSystem.cs @@ -0,0 +1,145 @@ +#define STEAM +using System; +using System.Collections; +using System.Diagnostics; +using com.adjust.sdk; +using RedShellUnity; +using Steamworks; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class BootSystem : MonoBehaviour +{ + [SerializeField] + [Tooltip("チェックするとMaxFramerateが有効")] + private bool _dontVsync; + + [SerializeField] + [Range(0f, 60f)] + private int _maxFramerate; + + public static bool isRootBootCamera; + + private Coroutine _logCoroutine; + + private string _logMsg = ""; + + private void Awake() + { + _logMsg += "Awake"; + if (isRootBootCamera) + { + UnityEngine.Object.Destroy(GameObject.Find("BootCamera")); + isRootBootCamera = false; + } + VisibleBootCamera(enable: true); + UnityEngine.Object.DontDestroyOnLoad(base.gameObject); + } + + private IEnumerator Start() + { + _logCoroutine = StartCoroutine(WaitToAccumulateTraceLog()); + _logMsg += " Start"; + while (Toolbox.DeviceManager == null) + { + yield return 0; + } + _logMsg += " DeviceManager"; + while (Toolbox.SavedataManager == null) + { + yield return 0; + } + _logMsg += " SavedataManager"; + while (Toolbox.QualityManager == null) + { + yield return 0; + } + _logMsg += " QualityManager"; + while (Toolbox.SceneManager == null) + { + yield return 0; + } + _logMsg += " SceneManager"; + while (Toolbox.ResourcesManager == null) + { + yield return 0; + } + _logMsg += " ResourcesManager"; + while (Toolbox.AssetManager == null) + { + yield return 0; + } + _logMsg += " AssetManager"; + while (Toolbox.AudioManager == null) + { + yield return 0; + } + _logMsg += " AudioManager"; + while (Toolbox.MovieManager == null) + { + yield return 0; + } + _logMsg += " MovieManager"; + SocialServiceUtility.CreateInstance(); + bootAdjust(); + setupRedShell(); + if (_dontVsync) + { + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = _maxFramerate; + } + StopCoroutine(_logCoroutine); + Toolbox.BootSystem = this; + } + + private IEnumerator WaitToAccumulateTraceLog() + { + yield return new WaitForSeconds(5f); + LocalLog.AccumulateTraceInquiryLog("BootSystem " + _logMsg); + } + + private void bootAdjust() + { + try + { + } + catch (Exception ex) + { + LocalLog.AccumulateTraceLog(ex.ToString()); + } + Adjust.addSessionCallbackParameter("viewer_id", Certification.ViewerId.ToString()); + } + + private void OnDestroy() + { + } + + public void VisibleBootCamera(bool enable) + { + GameObject gameObject = base.transform.Find("BootCamera").gameObject; + if (gameObject != null) + { + gameObject.SetActive(enable); + } + } + + [Conditional("STEAM")] + private void setupRedShell() + { + RedShell.SetVerboseLogs(verboseLogs: true); + RedShell.SetApiKey("04b8d4a58416140132fdcd680b17a0d8"); + try + { + RedShell.SetUserId(SteamUser.GetSteamID().m_SteamID.ToString()); + } + catch (Exception ex) + { + Debug.LogError("steam client が起動していない。steamの機能を使えません。"); + Debug.LogError(ex.Message); + Debug.LogError(ex.StackTrace); + } + RedShell.MarkConversion(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/Certification.cs b/SVSim.BattleEngine/Engine/Cute/Certification.cs new file mode 100644 index 0000000..89cc843 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/Certification.cs @@ -0,0 +1,365 @@ +using System; +using System.Collections; +using System.Text; +using Steamworks; +using UnityEngine; +using Wizard; +using Wizard.Title; + +namespace Cute; + +public class Certification : MonoBehaviour +{ + public static bool CheckUrlScheme; + + private const int ERROR_CODE_ACCOUNT_REMOVED = 5607; + + private static string udid; + + private static int short_udid; + + private static string sessionId; + + private const float DELAY_TIME = 0.02f; + + protected Callback m_GetAuthSessionTicketResponse; + + public static string Udid + { + get + { + if (string.IsNullOrEmpty(udid)) + { + udid = Cryptographer.decode(Toolbox.SavedataManager.GetString("UDID")); + } + return udid; + } + } + + public static int ViewerId + { + // Post-Task-8: strictly ambient. The historical SavedataManager-backed lazy decode was the + // client process's single-viewer-id source; in the headless multi-instance world the viewer + // id MUST come from the per-session ambient context. Setter is a no-op (BattleAmbientContext + // .ViewerId is `init`-only — fixed at scope entry per design — and the historical caller + // (SavedataManager.SetInt + Save) is dead in the server world). + get => SVSim.BattleEngine.Ambient.BattleAmbient.Require().ViewerId; + set { /* ambient ViewerId is init-only; SavedataManager path is dead headless */ } + } + + public static int ShortUdid + { + get + { + if (short_udid == 0) + { + short_udid = Toolbox.SavedataManager.GetInt("SHORT_UDID"); + } + return short_udid; + } + set + { + Toolbox.SavedataManager.SetInt("SHORT_UDID", value); + short_udid = value; + } + } + + public static string SessionId + { + get + { + if (string.IsNullOrEmpty(sessionId)) + { + sessionId = ViewerId + Udid; + } + return Cryptographer.MakeMd5(sessionId); + } + set + { + sessionId = value; + } + } + + public static string dmmViewerId { get; private set; } + + public static string dmmOnetimeToken { get; private set; } + + public static ulong SteamID { get; private set; } + + public static string SteamSessionTicket { get; private set; } + + public static bool IsExistsViewerId() + { + if (ViewerId != 0) + { + return true; + } + return false; + } + + public static string GetEncodedViewerId() + { + string s = CryptAES.encrypt(ViewerId.ToString()); + return Convert.ToBase64String(Encoding.UTF8.GetBytes(s)); + } + + public static string GetEncodedSessionId() + { + return Convert.ToBase64String(Encoding.UTF8.GetBytes(SessionId)); + } + + public static string GetEncodedShortUdid() + { + return Convert.ToBase64String(Encoding.UTF8.GetBytes(ShortUdid.ToString())); + } + + public static string GetKeyChainViewerId() + { + return ""; + } + + public static string GetIDFA() + { + return ""; + } + + public static void SetKeyChainViewerId(string viewerId) + { + } + + public static void DeleteKeyChainViewerId() + { + } + + public static void InitializeFileds() + { + sessionId = null; + udid = null; + short_udid = 0; + Toolbox.SavedataManager.SetInt("VIEWER_ID", 0); + Toolbox.SavedataManager.SetInt("SHORT_UDID", 0); + Toolbox.SavedataManager.SetString("UDID", ""); + } + + public IEnumerator Login() + { + if (ViewerId == 0) + { + GenerateUdid(); + SignUpTask signUpTask = new SignUpTask(); + signUpTask.SetParameter(); + yield return StartCoroutine(Toolbox.NetworkManager.Connect(signUpTask, delegate + { + StartCoroutine(GameStartCheckTaskExec()); + }, delegate + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + OutOfService.ShowServiceEndedDialogIfNeeded(); + }, delegate + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + })); + } + else + { + yield return StartCoroutine(GameStartCheckTaskExec()); + } + } + + public static bool IsiCloudAvailable() + { + return false; + } + + public static void SetiCloudUser() + { + } + + public static void EraseiCloudUser() + { + } + + public static string GetiCloudUser() + { + return ""; + } + + public void CheckiCloudUserData(Action callback) + { + GetiCloudUserDataTask.VerifiediCloudUserData.Reset(); + string text = GetiCloudUser(); + if (string.IsNullOrEmpty(text)) + { + callback(NetworkTask.ResultCode.Success); + return; + } + GenerateUdid(); + GetiCloudUserDataTask getiCloudUserDataTask = new GetiCloudUserDataTask(); + getiCloudUserDataTask.SetParameter(text); + StartCoroutine(Toolbox.NetworkManager.Connect(getiCloudUserDataTask, callback)); + } + + public void MigrateiCloudUserData(Action callback) + { + string parameter = GetiCloudUser(); + UpdateiCloudUserDataTask updateiCloudUserDataTask = new UpdateiCloudUserDataTask(); + updateiCloudUserDataTask.SetParameter(parameter); + StartCoroutine(Toolbox.NetworkManager.Connect(updateiCloudUserDataTask, callback)); + } + + public void FirstTimeSaveiCloudUserData() + { + if (IsiCloudAvailable() && string.IsNullOrEmpty(GetiCloudUser())) + { + SetiCloudUser(); + } + } + + public IEnumerator GameStartCheckTaskExec() + { + GameStartCheckTask gameStartCheckTask = new GameStartCheckTask(); + gameStartCheckTask.AddSkipCuteCheckResultCode(5607); + gameStartCheckTask.SetParameter(); + bool isRemoveAccount = false; + yield return StartCoroutine(Toolbox.NetworkManager.Connect(gameStartCheckTask, delegate + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = true; + } + URLScheme.ClearCampaignData(); + }, delegate + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + OutOfService.ShowServiceEndedDialogIfNeeded(); + }, delegate(int resultCode) + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + URLScheme.ClearCampaignData(); + if (resultCode == 5607) + { + isRemoveAccount = true; + OnRemoveAccount(); + } + })); + if (isRemoveAccount) + { + while (true) + { + yield return null; + } + } + } + + private void OnRemoveAccount() + { + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("MyPage_0097")); + dialogBase.SetTitleLabel(Data.SystemText.Get("ErrorHeader_0001")); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.OnClose = delegate + { + UserInfoRequest.DeleteUserData(); + }; + } + + public void GenerateUdid() + { + udid = Cryptographer.decode(Toolbox.SavedataManager.GetString("UDID")); + if (string.IsNullOrEmpty(udid)) + { + Toolbox.SavedataManager.SetString("UDID", Cryptographer.encode(Guid.NewGuid().ToString())); + Toolbox.SavedataManager.Save(); + } + } + + public static bool IsLogined() + { + return !string.IsNullOrEmpty(sessionId); + } + + private IEnumerator Start() + { + while (Toolbox.BootSystem == null) + { + yield return 0; + } + SessionId = ""; + setDmmPlatformData(); + setSTEAMPlatformData(); + URLSchemeStart(); + } + + private void OnApplicationFocus(bool focus) + { + if (focus) + { + URLSchemeStart(); + } + } + + private void URLSchemeStart() + { + if (CheckUrlScheme) + { + StartCoroutine(Delay(0.02f, delegate + { + })); + } + } + + private IEnumerator Delay(float waitTime, Action action) + { + yield return new WaitForSeconds(waitTime); + action(); + } + + private void setSTEAMPlatformData() + { + try + { + SteamID = SteamUser.GetSteamID().m_SteamID; + m_GetAuthSessionTicketResponse = Callback.Create(OnGetAuthSessionTicketResponse); + byte[] array = new byte[1024]; + SteamNetworkingIdentity pSteamNetworkingIdentity = default(SteamNetworkingIdentity); + SteamUser.GetAuthSessionTicket(array, array.Length, out var pcbTicket, ref pSteamNetworkingIdentity); + Array.Resize(ref array, (int)pcbTicket); + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0; i < pcbTicket; i++) + { + stringBuilder.AppendFormat("{0:x2}", array[i]); + } + SteamSessionTicket = stringBuilder.ToString(); + } + catch (Exception ex) + { + Debug.LogError("steam client が起動していない。steamの機能を使えません。"); + Debug.LogError(ex.Message); + Debug.LogError(ex.StackTrace); + } + } + + private void OnGetAuthSessionTicketResponse(GetAuthSessionTicketResponse_t pCallback) + { + } + + private void setDmmPlatformData() + { + } + + public void URLSchemeStartiOS(string message) + { + URLScheme.URLSchemeStartiOS(message); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/CryptAES.cs b/SVSim.BattleEngine/Engine/Cute/CryptAES.cs new file mode 100644 index 0000000..7f2fafb --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/CryptAES.cs @@ -0,0 +1,248 @@ +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; + +namespace Cute; + +public class CryptAES +{ + public static byte[] encrypt(byte[] byteSrc) + { + return EncryptRJ256Api(byteSrc); + } + + public static string encrypt(string byteSrc) + { + return Convert.ToBase64String(EncryptRJ256Api(Encoding.UTF8.GetBytes(byteSrc))); + } + + public static string encryptForNode(string src) + { + return EncryptRJ256ForNode(src); + } + + public static byte[] decrypt(string src) + { + return DecryptRJ256Api(Convert.FromBase64String(src)); + } + + public static string decryptForNode(string src) + { + return DecryptRJ256ForNode(src); + } + + private static byte[] EncryptRJ256Api(byte[] toEncryptData) + { + using RijndaelManaged rijndaelManaged = new RijndaelManaged(); + rijndaelManaged.Mode = CipherMode.CBC; + rijndaelManaged.KeySize = 256; + rijndaelManaged.BlockSize = 128; + byte[] array = new byte[0]; + byte[] array2 = new byte[0]; + string s = Cryptographer.generateKeyString(); + string s2 = Certification.Udid.Replace("-", "").Substring(0, 16); + array = Encoding.UTF8.GetBytes(s); + array2 = Encoding.UTF8.GetBytes(s2); + ICryptoTransform transform = rijndaelManaged.CreateEncryptor(array, array2); + using MemoryStream memoryStream = new MemoryStream(); + using CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write); + cryptoStream.Write(toEncryptData, 0, toEncryptData.Length); + cryptoStream.FlushFinalBlock(); + byte[] array3 = memoryStream.ToArray(); + byte[] array4 = new byte[array3.Length + array.Length]; + Array.Copy(array3, 0, array4, 0, array3.Length); + Array.Copy(array, 0, array4, array3.Length, array.Length); + rijndaelManaged.Clear(); + memoryStream.Flush(); + memoryStream.Close(); + cryptoStream.Flush(); + cryptoStream.Close(); + return array4; + } + + public static string EncryptRJ256(string prm_text_to_encrypt) + { + using RijndaelManaged rijndaelManaged = new RijndaelManaged(); + rijndaelManaged.Padding = PaddingMode.Zeros; + rijndaelManaged.Mode = CipherMode.CBC; + rijndaelManaged.KeySize = 256; + rijndaelManaged.BlockSize = 256; + byte[] array = new byte[0]; + byte[] array2 = new byte[0]; + string s = Cryptographer.generateKeyString(); + string s2 = Certification.Udid.Replace("-", ""); + array = Encoding.UTF8.GetBytes(s); + array2 = Encoding.UTF8.GetBytes(s2); + ICryptoTransform transform = rijndaelManaged.CreateEncryptor(array, array2); + using MemoryStream memoryStream = new MemoryStream(); + using CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write); + byte[] bytes = Encoding.UTF8.GetBytes(prm_text_to_encrypt); + cryptoStream.Write(bytes, 0, bytes.Length); + cryptoStream.FlushFinalBlock(); + byte[] array3 = memoryStream.ToArray(); + byte[] array4 = new byte[array3.Length + array.Length]; + Array.Copy(array3, 0, array4, 0, array3.Length); + Array.Copy(array, 0, array4, array3.Length, array.Length); + rijndaelManaged.Clear(); + memoryStream.Flush(); + memoryStream.Close(); + cryptoStream.Flush(); + cryptoStream.Close(); + return Convert.ToBase64String(array4); + } + + public static string EncryptRJ256ForNode(string prm_text_to_encrypt) + { + using AesManaged aesManaged = new AesManaged(); + string text = Cryptographer.generateKeyString(); + string s = text.Substring(0, 16); + aesManaged.BlockSize = 128; + aesManaged.KeySize = 256; + aesManaged.IV = Encoding.UTF8.GetBytes(s); + aesManaged.Key = Encoding.UTF8.GetBytes(text); + aesManaged.Mode = CipherMode.CBC; + aesManaged.Padding = PaddingMode.PKCS7; + byte[] bytes = Encoding.UTF8.GetBytes(prm_text_to_encrypt); + using ICryptoTransform cryptoTransform = aesManaged.CreateEncryptor(); + byte[] inArray = cryptoTransform.TransformFinalBlock(bytes, 0, bytes.Length); + aesManaged.Clear(); + return text + Convert.ToBase64String(inArray); + } + + private static byte[] DecryptRJ256Api(byte[] sEncryptedString) + { + using RijndaelManaged rijndaelManaged = new RijndaelManaged(); + rijndaelManaged.Mode = CipherMode.CBC; + rijndaelManaged.KeySize = 256; + rijndaelManaged.BlockSize = 128; + byte[] array = new byte[32]; + byte[] array2 = new byte[16]; + byte[] array3 = new byte[sEncryptedString.Length - array.Length]; + Array.Copy(sEncryptedString, 0, array3, 0, array3.Length); + Array.Copy(sEncryptedString, sEncryptedString.Length - array.Length, array, 0, array.Length); + array2 = Encoding.UTF8.GetBytes(Certification.Udid.Replace("-", "").Substring(0, 16)); + ICryptoTransform transform = rijndaelManaged.CreateDecryptor(array, array2); + byte[] array4 = new byte[array3.Length]; + using MemoryStream memoryStream = new MemoryStream(array3); + using CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Read); + cryptoStream.Read(array4, 0, array4.Length); + rijndaelManaged.Clear(); + cryptoStream.Flush(); + cryptoStream.Close(); + memoryStream.Flush(); + memoryStream.Close(); + return array4; + } + + public static string DecryptRJ256(string prm_text_to_decrypt) + { + byte[] array = Convert.FromBase64String(prm_text_to_decrypt); + using RijndaelManaged rijndaelManaged = new RijndaelManaged(); + rijndaelManaged.Padding = PaddingMode.Zeros; + rijndaelManaged.Mode = CipherMode.CBC; + rijndaelManaged.KeySize = 256; + rijndaelManaged.BlockSize = 256; + byte[] array2 = new byte[32]; + byte[] array3 = new byte[32]; + byte[] array4 = new byte[array.Length - array2.Length]; + Array.Copy(array, 0, array4, 0, array4.Length); + Array.Copy(array, array.Length - array2.Length, array2, 0, array2.Length); + array3 = Encoding.UTF8.GetBytes(Certification.Udid.Replace("-", "")); + ICryptoTransform transform = rijndaelManaged.CreateDecryptor(array2, array3); + byte[] array5 = new byte[array4.Length]; + using MemoryStream memoryStream = new MemoryStream(array4); + using CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Read); + cryptoStream.Read(array5, 0, array5.Length); + rijndaelManaged.Clear(); + cryptoStream.Flush(); + cryptoStream.Close(); + memoryStream.Flush(); + memoryStream.Close(); + return Encoding.UTF8.GetString(array5).TrimEnd(default(char)); + } + + public static string DecryptRJ256ForNode(string prm_text_to_decrypt) + { + using AesManaged aesManaged = new AesManaged(); + string text = prm_text_to_decrypt.Substring(0, 32); + string s = text.Substring(0, 16); + string s2 = prm_text_to_decrypt.Substring(32); + aesManaged.BlockSize = 128; + aesManaged.KeySize = 256; + aesManaged.Key = Encoding.UTF8.GetBytes(text); + aesManaged.IV = Encoding.UTF8.GetBytes(s); + aesManaged.Mode = CipherMode.CBC; + aesManaged.Padding = PaddingMode.PKCS7; + byte[] array = Convert.FromBase64String(s2); + using ICryptoTransform cryptoTransform = aesManaged.CreateDecryptor(); + byte[] bytes = cryptoTransform.TransformFinalBlock(array, 0, array.Length); + string result = Encoding.UTF8.GetString(bytes); + aesManaged.Clear(); + return result; + } + + public static byte[] EncryptRJ256(byte[] binData) + { + using RijndaelManaged rijndaelManaged = new RijndaelManaged(); + rijndaelManaged.Padding = PaddingMode.PKCS7; + rijndaelManaged.Mode = CipherMode.CBC; + rijndaelManaged.KeySize = 256; + rijndaelManaged.BlockSize = 256; + byte[] array = new byte[0]; + byte[] array2 = new byte[0]; + string s = Cryptographer.generateKeyString(); + string s2 = Certification.Udid.Replace("-", ""); + array = Encoding.UTF8.GetBytes(s); + array2 = Encoding.UTF8.GetBytes(s2); + ICryptoTransform transform = rijndaelManaged.CreateEncryptor(array, array2); + using MemoryStream memoryStream = new MemoryStream(); + using CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Write); + byte[] bytes = BitConverter.GetBytes(binData.Length); + byte[] array3 = new byte[4 + binData.Length]; + Array.Copy(bytes, 0, array3, 0, 4); + Array.Copy(binData, 0, array3, 4, binData.Length); + cryptoStream.Write(array3, 0, array3.Length); + cryptoStream.FlushFinalBlock(); + byte[] array4 = memoryStream.ToArray(); + byte[] array5 = new byte[array.Length + array4.Length]; + Array.Copy(array4, 0, array5, 0, array4.Length); + Array.Copy(array, 0, array5, array4.Length, array.Length); + rijndaelManaged.Clear(); + memoryStream.Flush(); + memoryStream.Close(); + cryptoStream.Flush(); + cryptoStream.Close(); + return array5; + } + + public static byte[] DecryptRJ256(byte[] binData) + { + using RijndaelManaged rijndaelManaged = new RijndaelManaged(); + rijndaelManaged.Padding = PaddingMode.PKCS7; + rijndaelManaged.Mode = CipherMode.CBC; + rijndaelManaged.KeySize = 256; + rijndaelManaged.BlockSize = 256; + byte[] array = new byte[32]; + byte[] array2 = new byte[32]; + byte[] array3 = new byte[binData.Length - array.Length]; + Array.Copy(binData, 0, array3, 0, array3.Length); + Array.Copy(binData, binData.Length - array.Length, array, 0, array.Length); + array2 = Encoding.UTF8.GetBytes(Certification.Udid.Replace("-", "")); + ICryptoTransform transform = rijndaelManaged.CreateDecryptor(array, array2); + byte[] array4 = new byte[array3.Length]; + using MemoryStream memoryStream = new MemoryStream(array3); + using CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Read); + cryptoStream.Read(array4, 0, array4.Length); + byte[] array5 = new byte[4]; + Array.Copy(array4, 0, array5, 0, 4); + byte[] array6 = new byte[BitConverter.ToInt32(array5, 0)]; + Array.Copy(array4, 4, array6, 0, array6.Length); + rijndaelManaged.Clear(); + memoryStream.Flush(); + memoryStream.Close(); + cryptoStream.Flush(); + cryptoStream.Close(); + return array6; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/Cryptographer.cs b/SVSim.BattleEngine/Engine/Cute/Cryptographer.cs new file mode 100644 index 0000000..5df1daf --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/Cryptographer.cs @@ -0,0 +1,144 @@ +using System; +using System.Globalization; +using System.Security.Cryptography; +using System.Text; + +namespace Cute; + +public class Cryptographer +{ + public const int FBENCRYPT_BLOCK_SIZE = 32; + + private static string encode_buf; + + private static Random cRandom = new Random(); + + private static SHA1CryptoServiceProvider sha1 = null; + + private static UTF8Encoding utf8 = null; + + private static int random() + { + return cRandom.Next(1, 9); + } + + public static string generateIvString() + { + string text = ""; + for (int i = 0; i < 32; i++) + { + text += $"{random()}"; + } + return text; + } + + public static string generateKeyString() + { + string text = ""; + for (int i = 0; i < 32; i++) + { + text += $"{cRandom.Next(0, 65535):x}"; + } + return Convert.ToBase64String(Encoding.ASCII.GetBytes(text.ToString())).Substring(0, 32); + } + + public static string encode(string dat) + { + int length = dat.Length; + encode_buf = $"{length:x4}"; + foreach (char value in dat) + { + encode_buf += $"{random(),1:x}"; + encode_buf += $"{random(),1:x}"; + encode_buf += (char)(Convert.ToInt32(value) + 10); + encode_buf += $"{random(),1:x}"; + } + encode_buf += generateIvString(); + return encode_buf; + } + + public static string decode(string dat) + { + if (dat == null || dat.Length < 4) + { + return dat; + } + int num = int.Parse(dat.Substring(0, 4), NumberStyles.AllowHexSpecifier); + string text = ""; + int num2 = 2; + string text2 = dat.Substring(4, dat.Length - 4); + foreach (char value in text2) + { + if (num2 % 4 == 0) + { + text += (char)(Convert.ToInt32(value) - 10); + } + num2++; + if (text.Length >= num) + { + break; + } + } + return text; + } + + public static string ComputeHash(string data) + { + if (string.IsNullOrEmpty(data)) + { + return null; + } + SHA1CryptoServiceProvider sHA1CryptoServiceProvider = new SHA1CryptoServiceProvider(); + byte[] bytes = Encoding.UTF8.GetBytes(data); + byte[] array = sHA1CryptoServiceProvider.ComputeHash(bytes); + string text = ""; + byte[] array2 = array; + foreach (byte b in array2) + { + text += $"{b:x2}"; + } + sHA1CryptoServiceProvider.Clear(); + return text; + } + + public static string MakeMd5(string input) + { + MD5CryptoServiceProvider mD5CryptoServiceProvider = new MD5CryptoServiceProvider(); + byte[] bytes = Encoding.UTF8.GetBytes(input + "r!I@ws8e5i="); + byte[] array = mD5CryptoServiceProvider.ComputeHash(bytes); + string text = ""; + byte[] array2 = array; + foreach (byte b in array2) + { + text += b.ToString("x2"); + } + mD5CryptoServiceProvider.Clear(); + return text; + } + + public static string ComputeSHA1(string seed) + { + if (sha1 == null) + { + sha1 = new SHA1CryptoServiceProvider(); + } + if (utf8 == null) + { + utf8 = new UTF8Encoding(); + } + if (string.IsNullOrEmpty(seed)) + { + return ""; + } + byte[] bytes = utf8.GetBytes(seed); + byte[] array = sha1.ComputeHash(bytes); + StringBuilder stringBuilder = new StringBuilder(); + int num = array.Length; + for (int i = 0; i < num; i++) + { + stringBuilder.Append(Convert.ToString(array[i], 16).PadLeft(2, '0')); + } + sha1.Initialize(); + return stringBuilder.ToString(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/CustomPreference.cs b/SVSim.BattleEngine/Engine/Cute/CustomPreference.cs new file mode 100644 index 0000000..ad040e0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/CustomPreference.cs @@ -0,0 +1,318 @@ +using Wizard; + +namespace Cute; + +public class CustomPreference +{ + public enum eSchemeType + { + Http, + Https, + File, + Node, + StreamingAssets + } + + public enum PlatformType + { + NONE, + APPLE, + GOOGLE, + DMM, + STEAM + } + + public enum SmallResourceStatus + { + NO_SELECT, + USE_NORMAL, + USE_SMALL + } + + private const string fileScheme = "file:///"; + + private const string httpScheme = "http://"; + + private const string httpsScheme = "https://"; + + private const string jarFileScheme = "jar:file://"; + + private static string nodeServerScheme = "ws://"; + + private const string directoryLowLevelResources = "Low/"; + + private const string directoryHighLevelResources = "High/"; + + private static string directoryRoot = "dl/"; + + private static string _applicationServerUrl = ""; + + private static string _resourceServerUrl = ""; + + private static string _nodeServerUrl = ""; + + private static string _deckBuilderServerUrl = ""; + + public static string _localePref = "Eng"; + + private static string _signaturePref = ""; + + private static string _languagePref = "Eng"; + + private static string _languageSoundPref = "Eng"; + + private static string _assetbundleurl = ""; + + private static string _manifestsuburl = ""; + + private static string _soundurl = ""; + + private static string _movieurl = ""; + + private static string _manifestUrl = ""; + + private static eSchemeType _schemeType = eSchemeType.Http; + + private static eSchemeType _schemeCDNType = eSchemeType.Http; + + private static bool _isPreferenceComplete = false; + + private static bool _isLocalAssetBundles = false; + + public static bool isPreferenceComplete + { + get + { + return _isPreferenceComplete; + } + set + { + _isPreferenceComplete = value; + } + } + + public static bool isLocalAssetBundles + { + get + { + return _isLocalAssetBundles; + } + set + { + _isLocalAssetBundles = value; + } + } + + public static bool IsNormalResource => !IsSmallResource; + + public static bool IsSmallResource => PlayerPrefsCache.Instance.GetValue(PlayerPrefsWrapper.SMALL_RESOURCE_STATUS) == 2; + + public static string GetApplicationServerURL() + { + return GetScheme() + _applicationServerUrl; + } + + public static void SetApplicationServerURL(string strApplicationServer) + { + _applicationServerUrl = strApplicationServer; + } + + public static string GetResourceServerURL() + { + return GetCDNScheme() + _resourceServerUrl; + } + + public static void SetResourceServerURL(string strResourceServer) + { + _resourceServerUrl = strResourceServer; + } + + public static string GetNodeServerURL() + { + return nodeServerScheme + _nodeServerUrl; + } + + public static void SetNodeServerURL(string strNodeServer) + { + if (!string.IsNullOrEmpty(strNodeServer)) + { + _nodeServerUrl = strNodeServer; + } + } + + public static string GetDeckBuilderServerURL() + { + return GetScheme() + _deckBuilderServerUrl; + } + + public static void SetDeckBuilderServerURL(string strDeckBuilderServer) + { + _deckBuilderServerUrl = strDeckBuilderServer; + } + + public static int GetPlatform() + { + return 4; + } + + public static string GetAssetBundleURL() + { + return _assetbundleurl; + } + + public static string GetManifestURL() + { + return _manifestUrl; + } + + public static string GetSubManifestURL() + { + if (_isLocalAssetBundles) + { + _manifestsuburl = GetResourceServerURL() + Utility.GetRuntimePlatform() + "/"; + } + else + { + _manifestsuburl = GetResourceServerURL() + directoryRoot + "Manifest/" + GetVersionFolderName() + GetSoundMovieLanguageFolderName() + Utility.GetRuntimePlatform() + "/"; + } + return _manifestsuburl; + } + + public static string GetSoundResourceURL() + { + return _soundurl; + } + + public static string GetMoiveResourceURL() + { + return _movieurl; + } + + public static string GetScheme() + { + return _schemeType switch + { + eSchemeType.Http => "http://", + eSchemeType.Https => "https://", + eSchemeType.File => "file:///", + eSchemeType.Node => nodeServerScheme, + eSchemeType.StreamingAssets => "file:///", + _ => "http://", + }; + } + + public static string GetCDNScheme() + { + return _schemeCDNType switch + { + eSchemeType.Http => "http://", + eSchemeType.Https => "https://", + _ => "http://", + }; + } + + public static string GetVersionFolderName() + { + return Toolbox.SavedataManager.GetResourceVersion() + "/"; + } + + public static void SetScemeMode(eSchemeType schemeType) + { + _schemeType = schemeType; + } + + public static void SetScemeModeCDN(eSchemeType schemeCDNType) + { + _schemeCDNType = schemeCDNType; + } + + public static void SetOptionalNodeSceme() + { + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_SELECT_WSS)) + { + SetNodeSceme("wss://"); + } + else + { + SetNodeSceme("ws://"); + } + } + + private static void SetNodeSceme(string scheme) + { + nodeServerScheme = scheme; + } + + public static void SetRootFolderName(string strDir) + { + directoryRoot = strDir; + } + + public static void SetTextLanguage(string strLanguage) + { + _languagePref = strLanguage; + } + + public static void SetLocale(string strLocale) + { + _localePref = strLocale; + } + + public static string GetLanguageFolderName() + { + return _languagePref + "/"; + } + + public static string GetTextLanguage() + { + return GetResourceLanguage(); + } + + public static string GetResourceLanguage() + { + return _languagePref; + } + + public static void SetSoundLanguage(string strLanguage) + { + _languageSoundPref = strLanguage; + } + + public static string GetSoundMovieLanguageFolderName() + { + return _languageSoundPref + "/"; + } + + public static string GetSoundMovieLanguage() + { + return _languageSoundPref; + } + + public static void SetSignature(string strSignature) + { + _signaturePref = strSignature; + } + + public static string GetSignaturePath() + { + return "/../" + _signaturePref; + } + + public static void createResourcePath() + { + if (_isLocalAssetBundles) + { + _assetbundleurl = GetResourceServerURL() + Utility.GetRuntimePlatform() + "/"; + _manifestsuburl = GetResourceServerURL() + Utility.GetRuntimePlatform() + "/"; + } + else + { + _assetbundleurl = GetResourceServerURL() + directoryRoot + "Resource/" + GetLanguageFolderName() + Utility.GetRuntimePlatform() + "/"; + string text = "Manifest/"; + _manifestsuburl = GetResourceServerURL() + directoryRoot + text + GetVersionFolderName() + GetSoundMovieLanguageFolderName() + Utility.GetRuntimePlatform() + "/"; + _manifestUrl = GetResourceServerURL() + directoryRoot + text + GetVersionFolderName() + GetLanguageFolderName() + Utility.GetRuntimePlatform() + "/"; + } + _soundurl = GetResourceServerURL() + directoryRoot + "Sound/" + GetSoundMovieLanguageFolderName(); + _movieurl = GetResourceServerURL() + directoryRoot + "Resource/" + GetSoundMovieLanguageFolderName() + Utility.GetRuntimePlatform() + "/"; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/CuteNetworkDefine.cs b/SVSim.BattleEngine/Engine/Cute/CuteNetworkDefine.cs new file mode 100644 index 0000000..6631b78 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/CuteNetworkDefine.cs @@ -0,0 +1,190 @@ +using System.Collections.Generic; + +namespace Cute; + +public static class CuteNetworkDefine +{ + public enum ApiType + { + SignUp, + GameStartCheck, + CheckSpecialTitle, + PaymentItemList, + PaymentStart, + PaymentCancel, + PaymentFinish, + PaymentSendLog, + PaymentPCItemList, + PaymentPCStart, + PaymentPCCancel, + PaymentPCFinish, + SteamGetUserInfo, + SteamMicroTxnInit, + BirthUpdate, + AccountMigration, + GetGameDataBySocialAccount, + GetTransitionCode, + TransitionCodeMigration, + GetGameDataByTransitionCode, + GetFacebookNonce, + CheckiCloudUser, + MigrateiCloudUser + } + + public enum ACCOUNT_TYPE + { + NONE, + GOOGLE_PLAY, + GAME_CENTER, + FACEBOOK, + DMM, + STEAM, + APPLE_ID + } + + public enum CONNECT_TYPE + { + SOCIAL_ACCOUNT_CONNECT = 1, + SOCIAL_ACCOUNT_DISCONNECT, + SOCIAL_ACCOUNT_GAME_DATA_UPDATE, + TRANS_CODE_GAME_DATA_UPDATE + } + + public const int API_RESULT_SUCCESS_CODE = 1; + + public const int RESULT_CODE_DATABASE_ERROR = 100; + + public const int RESULT_CODE_MAINTENANCE_COMMON = 101; + + public const int RESULT_CODE_SERVER_ERROR = 102; + + public const int API_RESULT_SESSION_ERROR = 201; + + public const int RESULT_CODE_ACCOUNT_BLOCK_ERROR = 203; + + public const int RESULT_CODE_ACCOUNT_LIMITED_BLOCK_ERROR = 217; + + public const string ACCOUNT_LIMITED_BLOCK_END_TIME = "account_block_end_time"; + + public const int RESULT_CODE_NETEASE_ACCOUNT_BLOCK_ERROR = 330; + + public const int API_RESULT_VERSION_ERROR = 204; + + public const int RESULT_CODE_PROCESSED_ERROR = 213; + + public const int RESULT_CODE_PAYMENT_VALIDATION_ERROR = 308; + + public const int RESULT_CODE_DMM_ONETIMETOKEN_EXPIRED = 317; + + public const int RESULT_CODE_SOLO_PLAY_ALREADY_FINISH = 1352; + + public const int RESULT_CODE_MAINTENANCE_FROM = 2000; + + public const int RESULT_CODE_MAINTENANCE_TO = 2999; + + public const string MAINTENACE_END_TIME = "maintenance_end_time"; + + public const int RESULT_CODE_MAINTENANCE_CARD_TWO_PICK = 1710; + + public const int RESULT_CODE_MAINTENANCE_CARD_OPEN_SIX = 5013; + + public const int RESULT_CODE_ALREADY_BATTLE_RESULT = 3502; + + public const int RC_OPEN_ROOM_SET_DECK_IN_BATTLE_PHASE = 1768; + + public static Dictionary ApiUrlList = new Dictionary + { + { + ApiType.SignUp, + "tool/signup" + }, + { + ApiType.CheckSpecialTitle, + "check/special_title" + }, + { + ApiType.GameStartCheck, + "check/game_start" + }, + { + ApiType.PaymentItemList, + "payment/item_list" + }, + { + ApiType.PaymentStart, + "payment/start" + }, + { + ApiType.PaymentCancel, + "payment/cancel" + }, + { + ApiType.PaymentFinish, + "payment/finish" + }, + { + ApiType.PaymentSendLog, + "payment/send_log" + }, + { + ApiType.PaymentPCItemList, + "payment_pc/item_list" + }, + { + ApiType.PaymentPCStart, + "payment_pc/start" + }, + { + ApiType.PaymentPCCancel, + "payment_pc/cancel" + }, + { + ApiType.PaymentPCFinish, + "payment_pc/finish" + }, + { + ApiType.SteamGetUserInfo, + "payment_pc/steam_get_user_info" + }, + { + ApiType.SteamMicroTxnInit, + "payment_pc/steam_micro_txn_init" + }, + { + ApiType.BirthUpdate, + "account/update_birth" + }, + { + ApiType.AccountMigration, + "account/chain_by_social_account" + }, + { + ApiType.GetGameDataBySocialAccount, + "account/get_by_social_account" + }, + { + ApiType.GetTransitionCode, + "account/publish_transition_code" + }, + { + ApiType.TransitionCodeMigration, + "account/chain_by_transition_code" + }, + { + ApiType.GetGameDataByTransitionCode, + "account/get_by_transition_code" + }, + { + ApiType.GetFacebookNonce, + "account/get_facebook_nonce" + }, + { + ApiType.CheckiCloudUser, + "account/get_by_icloud_data" + }, + { + ApiType.MigrateiCloudUser, + "account/chain_by_icloud_data" + } + }; +} diff --git a/SVSim.BattleEngine/Engine/Cute/DataMigration.cs b/SVSim.BattleEngine/Engine/Cute/DataMigration.cs new file mode 100644 index 0000000..b3e93ef --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/DataMigration.cs @@ -0,0 +1,74 @@ +using Wizard; + +namespace Cute; + +public class DataMigration +{ + public enum status + { + NONE, + OVER, + FAIL + } + + private static bool inProgress; + + public static bool canCombine() + { + if (Certification.ViewerId != 0) + { + return true; + } + return false; + } + + public static void CombineStart(string url) + { + BrowserURL.Open(url); + inProgress = true; + } + + public static bool isCombineSucceed() + { + if (Toolbox.SavedataManager.GetInt("COMBINED") != 1) + { + return false; + } + return true; + } + + public static bool isProgressing() + { + return inProgress; + } + + public static void ProgressOver() + { + inProgress = false; + URLScheme.Clear(); + } + + public static void CombineSucceed() + { + Toolbox.SavedataManager.SetInt("COMBINED", 1); + } + + public static void CombineFailed() + { + } + + public static void MigrationStart(string url) + { + BrowserURL.Open(url); + inProgress = true; + } + + public static void MigrationSucceed() + { + CombineSucceed(); + } + + public static void MigrationFailed() + { + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/DebugManager.cs b/SVSim.BattleEngine/Engine/Cute/DebugManager.cs new file mode 100644 index 0000000..7b687b2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/DebugManager.cs @@ -0,0 +1,102 @@ +using System; +using System.Diagnostics; +using UnityEngine; + +namespace Cute; + +public class DebugManager : MonoBehaviour +{ + public enum LOG_LEVEL + { + NORMAL, + HIGH, + VERY_HIGH, + VERY_HIGH2, + VERY_HIGH3, + VERY_HIGH4 + } + + [Conditional("USE_DBGSYS")] + public void Log(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void LogWarning(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void LogAppend(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void LogAppendWarning(string text) + { + } + + public void ClearLog() + { + } + + [Conditional("USE_DBGSYS")] + public void TextLog(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void SoundLog(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void SoundLogWarning(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void SoundLogAppend(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void SoundLogAppendWarning(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void ClearSoundLog() + { + } + + [Conditional("USE_DBGSYS")] + public void BattleLogAppend(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void BattleLogAppendWarning(string text) + { + } + + [Conditional("USE_DBGSYS")] + public void ClearBattleLog() + { + } + + [Conditional("USE_DBGSYS")] + public void Log(object log, LOG_LEVEL level) + { + } + + [Conditional("USE_DBGSYS")] + public void LogError(object log) + { + } + + [Conditional("USE_DBGSYS")] + public void LogException(Exception e) + { + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/DeviceManager.cs b/SVSim.BattleEngine/Engine/Cute/DeviceManager.cs new file mode 100644 index 0000000..5ffb492 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/DeviceManager.cs @@ -0,0 +1,284 @@ +using System; +using System.Collections; +using System.IO; +using System.Net; +using System.Net.NetworkInformation; +using System.Net.Sockets; +using System.Text; +using System.Xml; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class DeviceManager : MonoBehaviour, IManager +{ + public enum TextureCompression + { + ETC, + DXT, + ATC, + PVRTC + } + + public enum DeviceType + { + NONE, + IPHONE, + ANDROID, + WINDOWS, + OSX + } + + private const string BUILDPARAMFILE = "/CuteBuildParam.xml"; + + private string strBuildVersionName = "9.9.9"; + + private TextureCompression textureCommpression; + + private IPAddress _ipAddress; + + private string _winOsVersion; + + private bool tokenSent; + + private string _getIpAddressWithFamilyTypeLog = ""; + + private void Awake() + { + CheckTextureCompression(); + } + + private void Start() + { + SetBuildVersionName(); + Toolbox.DeviceManager = this; + } + + private void Update() + { + } + + private void OnDestroy() + { + } + + public TextureCompression GetTextureCompression() + { + return textureCommpression; + } + + private void CheckTextureCompression() + { + textureCommpression = TextureCompression.DXT; + } + + public string GetModelName() + { + return SystemInfo.deviceModel; + } + + public string GetOsVersion() + { + if (string.IsNullOrEmpty(_winOsVersion)) + { + try + { + string operatingSystem = SystemInfo.operatingSystem; + string value = Environment.OSVersion.Version.ToString(); + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.Append(operatingSystem.Substring(0, operatingSystem.IndexOf('(') + 1)); + stringBuilder.Append(value); + stringBuilder.Append(operatingSystem.Substring(operatingSystem.IndexOf(')'))); + _winOsVersion = stringBuilder.ToString(); + } + catch (Exception) + { + _winOsVersion = SystemInfo.operatingSystem; + } + } + return _winOsVersion; + } + + public int GetDeviceType() + { + return 3; + } + + public string GetAppVersionName() + { + return strBuildVersionName; + } + + public string GetLocale() + { + return CustomPreference._localePref; + } + + public string getSignature() + { + return ""; + } + + public bool isRootUser() + { + return false; + } + + public string GetDeviceUniqueIdentifier() + { + string text = ""; + text = SystemInfo.deviceUniqueIdentifier; + if (string.IsNullOrEmpty(text)) + { + text = ""; + } + return text; + } + + public string GetDeviceName() + { + return SystemInfo.deviceModel; + } + + public string GetGraphicsDeviceName(bool textureCheck = false) + { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.Append(SystemInfo.graphicsDeviceName); + if (textureCheck) + { + if (SystemInfo.SupportsTextureFormat(TextureFormat.ETC2_RGB) && SystemInfo.SupportsTextureFormat(TextureFormat.ETC2_RGBA8)) + { + stringBuilder.Append("[ETC2=1]"); + } + else + { + stringBuilder.Append("[ETC2=0]"); + } + if (SystemInfo.SupportsTextureFormat(TextureFormat.ASTC_6x6) && SystemInfo.SupportsTextureFormat(TextureFormat.ASTC_6x6)) + { + stringBuilder.Append("[ASTC=1]"); + } + else + { + stringBuilder.Append("[ASTC=0]"); + } + } + return stringBuilder.ToString(); + } + + private IPAddress GetIpAddressWithFamilyType(AddressFamily family = AddressFamily.InterNetwork) + { + _getIpAddressWithFamilyTypeLog = ""; + _getIpAddressWithFamilyTypeLog += "GetIpAddressWithFamilyType "; + if (family == AddressFamily.InterNetworkV6 && !Socket.OSSupportsIPv6) + { + return null; + } + UnicastIPAddressInformation unicastIPAddressInformation = null; + NetworkInterface[] allNetworkInterfaces = NetworkInterface.GetAllNetworkInterfaces(); + _getIpAddressWithFamilyTypeLog += "GetIpAddressWithFamilyType2 "; + NetworkInterface[] array = allNetworkInterfaces; + foreach (NetworkInterface networkInterface in array) + { + if (networkInterface.OperationalStatus != OperationalStatus.Up) + { + _getIpAddressWithFamilyTypeLog = _getIpAddressWithFamilyTypeLog + " OperationalStatus" + networkInterface.OperationalStatus; + continue; + } + NetworkInterfaceType networkInterfaceType = networkInterface.NetworkInterfaceType; + if (networkInterfaceType != NetworkInterfaceType.Wireless80211 && networkInterfaceType != NetworkInterfaceType.Ethernet) + { + _getIpAddressWithFamilyTypeLog = _getIpAddressWithFamilyTypeLog + " Type " + networkInterfaceType; + continue; + } + IPInterfaceProperties iPProperties = networkInterface.GetIPProperties(); + if (iPProperties.GatewayAddresses.Count == 0) + { + _getIpAddressWithFamilyTypeLog += " GatewayAddresses.Count 0 "; + continue; + } + foreach (UnicastIPAddressInformation unicastAddress in iPProperties.UnicastAddresses) + { + if (unicastAddress.Address.AddressFamily != family) + { + continue; + } + if (IPAddress.IsLoopback(unicastAddress.Address)) + { + _getIpAddressWithFamilyTypeLog += " IsLoopback "; + continue; + } + if (!unicastAddress.IsDnsEligible) + { + if (unicastIPAddressInformation == null) + { + unicastIPAddressInformation = unicastAddress; + } + _getIpAddressWithFamilyTypeLog += " ip.IsDnsEligible "; + continue; + } + return unicastAddress.Address; + } + } + _getIpAddressWithFamilyTypeLog += "GetIpAddressWithFamilyType3 "; + return unicastIPAddressInformation?.Address; + } + + public string GetIpAddress() + { + if (_ipAddress != null) + { + return _ipAddress.ToString(); + } + LocalLog.AccumulateTraceInquiryLog("GetIpAddress " + StackTraceUtility.ExtractStackTrace()); + _ipAddress = GetIpAddressWithFamilyType(); + if (_ipAddress == null) + { + LocalLog.AccumulateTraceInquiryLog("GetIpAddress Empty " + _getIpAddressWithFamilyTypeLog + " " + StackTraceUtility.ExtractStackTrace()); + return string.Empty; + } + return _ipAddress.ToString(); + } + + public void ClearIpAddress() + { + _ipAddress = null; + LocalLog.AccumulateTraceInquiryLog("ClearIpAddress " + StackTraceUtility.ExtractStackTrace()); + } + + public string GetCarrier() + { + return ""; + } + + public void SetVersionName() + { + SetBuildVersionName(); + } + + public void SetBuildVersionName() + { + string text = Application.streamingAssetsPath + "/CuteBuildParam.xml"; + if (!File.Exists(text)) + { + return; + } + XmlDocument xmlDocument = new XmlDocument(); + xmlDocument.Load(text); + if (xmlDocument.FirstChild == null || xmlDocument.FirstChild.NextSibling == null) + { + return; + } + IEnumerator enumerator = xmlDocument.FirstChild.NextSibling.GetEnumerator(); + while (enumerator.MoveNext()) + { + XmlNode xmlNode = (XmlNode)enumerator.Current; + if (xmlNode.Name.Equals("versionName")) + { + strBuildVersionName = xmlNode.InnerText; + break; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/EventExtension.cs b/SVSim.BattleEngine/Engine/Cute/EventExtension.cs new file mode 100644 index 0000000..61ad990 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/EventExtension.cs @@ -0,0 +1,159 @@ +using System; + +namespace Cute; + +public static class EventExtension +{ + public static void Call(this Action action) + { + action?.Invoke(); + } + + public static void Call(this Action action, T1 arg1) + { + action?.Invoke(arg1); + } + + public static void Call(this Action action, T1 arg1, T2 arg2) + { + action?.Invoke(arg1, arg2); + } + + public static void Call(this Action action, T1 arg1, T2 arg2, T3 arg3) + { + action?.Invoke(arg1, arg2, arg3); + } + + public static void Call(this Action action, T1 arg1, T2 arg2, T3 arg3, T4 arg4) + { + action?.Invoke(arg1, arg2, arg3, arg4); + } + + public static void Call(this Action action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) + { + action?.Invoke(arg1, arg2, arg3, arg4, arg5); + } + + public static void Call(this Action action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) + { + action?.Invoke(arg1, arg2, arg3, arg4, arg5, arg6); + } + + public static void Call(this Action action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) + { + action?.Invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7); + } + + public static void Call(this Action action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8) + { + action?.Invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + } + + public static void Call(this Action action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) + { + action?.Invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); + } + + public static TR Call(this Func func) + { + if (func == null) + { + return default(TR); + } + return func(); + } + + public static TR Call(this Func func, T1 arg1) + { + if (func == null) + { + return default(TR); + } + return func(arg1); + } + + public static TR Call(this Func func, T1 arg1, T2 arg2) + { + if (func == null) + { + return default(TR); + } + return func(arg1, arg2); + } + + public static TR Call(this Func func, T1 arg1, T2 arg2, T3 arg3) + { + if (func == null) + { + return default(TR); + } + return func(arg1, arg2, arg3); + } + + public static TR Call(this Func func, T1 arg1, T2 arg2, T3 arg3, T4 arg4) + { + if (func == null) + { + return default(TR); + } + return func(arg1, arg2, arg3, arg4); + } + + public static TR Call(this Func func, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) + { + if (func == null) + { + return default(TR); + } + return func(arg1, arg2, arg3, arg4, arg5); + } + + public static TR[] GetAllFuncCallResults(this Func func) + { + if (func == null) + { + return new TR[0]; + } + return CallAllFunc(func, (Delegate f) => ((Func)f)()); + } + + public static TR[] GetAllFuncCallResults(this Func func, T1 arg1) + { + if (func == null) + { + return new TR[0]; + } + return CallAllFunc(func, (Delegate f) => ((Func)f)(arg1)); + } + + public static TR[] GetAllFuncCallResults(this Func func, T1 arg1, T2 arg2) + { + if (func == null) + { + return new TR[0]; + } + return CallAllFunc(func, (Delegate f) => ((Func)f)(arg1, arg2)); + } + + public static TR[] GetAllFuncCallResults(this Func func, T1 arg1, T2 arg2, T3 arg3) + { + if (func == null) + { + return new TR[0]; + } + return CallAllFunc(func, (Delegate f) => ((Func)f)(arg1, arg2, arg3)); + } + + private static TR[] CallAllFunc(Delegate func, Func call) + { + Delegate[] invocationList = func.GetInvocationList(); + int num = invocationList.Length; + TR[] array = new TR[num]; + for (int i = 0; i < num; i++) + { + TR val = call(invocationList[i]); + array[i] = val; + } + return array; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/GameStartCheckTask.cs b/SVSim.BattleEngine/Engine/Cute/GameStartCheckTask.cs new file mode 100644 index 0000000..505ddad --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/GameStartCheckTask.cs @@ -0,0 +1,139 @@ +using System.Collections.Generic; +using LitJson; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class GameStartCheckTask : NetworkTask +{ + private class CheckParams : PostParams + { + public int app_type; + + public string campaign_data = ""; + + public string campaign_sign = ""; + + public int campaign_user; + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.GameStartCheck; + + public static bool IsSocialAccountDataTransNotSetAndTutorialClear = false; + + public static bool IsTutorialClear = false; + + public static List IsSocialAccountDataTransSet; + + public static bool IsSetTransitionPassword; + + public static int _tosId; + + public static int _privacyPolicyId; + + public static bool HasAppliedForAccountDeletion { get; private set; } = false; + + public static string RefundUrl { get; private set; } = string.Empty; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public GameStartCheckTask() + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + IsSocialAccountDataTransSet = new List(); + } + + public void SetParameter() + { + CheckParams checkParams = new CheckParams(); + if (URLScheme.AppType != 0) + { + checkParams.campaign_data = URLScheme.CampaignData; + checkParams.app_type = URLScheme.AppType; + } + checkParams.campaign_sign = Toolbox.DeviceManager.getSignature(); + int num = Random.Range(0, 100000); + if (Toolbox.DeviceManager.isRootUser()) + { + checkParams.campaign_user = 2 * num + 1; + } + else + { + checkParams.campaign_user = 2 * num; + } + base.Params = checkParams; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + IsSocialAccountDataTransNotSetAndTutorialClear = false; + IsSocialAccountDataTransSet.Clear(); + IsSetTransitionPassword = false; + RefundUrl = string.Empty; + if (base.ResponseData["data"].Keys.Contains("transition_account_data")) + { + JsonData jsonData = base.ResponseData["data"]["transition_account_data"]; + for (int i = 0; i < jsonData.Count; i++) + { + if (jsonData[i]["social_account_type"].ToInt() == 1) + { + IsSocialAccountDataTransSet.Add(CuteNetworkDefine.ACCOUNT_TYPE.GOOGLE_PLAY); + } + else if (jsonData[i]["social_account_type"].ToInt() == 2) + { + IsSocialAccountDataTransSet.Add(CuteNetworkDefine.ACCOUNT_TYPE.GAME_CENTER); + } + else if (jsonData[i]["social_account_type"].ToInt() == 3) + { + IsSocialAccountDataTransSet.Add(CuteNetworkDefine.ACCOUNT_TYPE.FACEBOOK); + } + else if (jsonData[i]["social_account_type"].ToInt() == 6) + { + IsSocialAccountDataTransSet.Add(CuteNetworkDefine.ACCOUNT_TYPE.APPLE_ID); + } + } + if (base.ResponseData["data"]["now_tutorial_step"].ToInt() == 100) + { + IsTutorialClear = true; + } + if (jsonData.Count == 0 && base.ResponseData["data"]["now_tutorial_step"].ToInt() == 100) + { + IsSocialAccountDataTransNotSetAndTutorialClear = true; + } + } + if (base.ResponseData["data"].Keys.Contains("rewrite_viewer_id")) + { + Certification.ViewerId = base.ResponseData["data"]["rewrite_viewer_id"].ToInt(); + } + if (base.ResponseData["data"].Keys.Contains("is_set_transition_password")) + { + IsSetTransitionPassword = base.ResponseData["data"]["is_set_transition_password"].ToBoolean(); + } + HasAppliedForAccountDeletion = base.ResponseData["data"].Keys.Contains("account_delete_reservation_status"); + ParseAgreementData(base.ResponseData); + if (base.ResponseData["data"].Keys.Contains("refund_url")) + { + RefundUrl = base.ResponseData["data"]["refund_url"].ToString(); + } + return num; + } + + private void ParseAgreementData(JsonData responseData) + { + PlayerStaticData._tosAgreementState = (PlayerStaticData.AgreementState)responseData["data"]["tos_state"].ToInt(); + PlayerStaticData._privacyPolicyAgreementState = (PlayerStaticData.AgreementState)responseData["data"]["policy_state"].ToInt(); + PlayerStaticData.KorAuthorityAgreementState = (PlayerStaticData.AgreementState)responseData["data"]["kor_authority_state"].ToInt(); + AcceptAgreementTask._tosId = responseData["data"]["tos_id"].ToInt(); + AcceptAgreementTask._privacyPolicyId = responseData["data"]["policy_id"].ToInt(); + AcceptAgreementTask.KorAuthorityId = responseData["data"]["kor_authority_id"].ToInt(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/GetGameDataByTransitionCode.cs b/SVSim.BattleEngine/Engine/Cute/GetGameDataByTransitionCode.cs new file mode 100644 index 0000000..13cc6b9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/GetGameDataByTransitionCode.cs @@ -0,0 +1,97 @@ +using LitJson; +using Wizard; + +namespace Cute; + +public class GetGameDataByTransitionCode : NetworkTask +{ + public class ChainedPlayData + { + public string ChainedViewerId { get; set; } + + public string Password { get; set; } + + public string UserName { get; set; } + + public string UserRankRotation { get; set; } + + public string UserRankUnlimited { get; set; } + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.GetGameDataByTransitionCode; + + public static ChainedPlayData ChainedPlayDatas { get; private set; } + + public static string NowUserName { get; private set; } + + public static string NowUserRankRotation { get; private set; } + + public static string NowUserRankUnlimited { get; private set; } + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public GetGameDataByTransitionCode() + { + ChainedPlayDatas = new ChainedPlayData(); + } + + public void SetParameter(string input_viewer_id, string password) + { + TransitionCodeParams transitionCodeParams = new TransitionCodeParams(); + transitionCodeParams.input_viewer_id = input_viewer_id; + transitionCodeParams.password = password; + base.Params = transitionCodeParams; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + ChainedPlayDatas.ChainedViewerId = ""; + ChainedPlayDatas.Password = ""; + ChainedPlayDatas.UserName = " - "; + ChainedPlayDatas.UserRankRotation = " - "; + ChainedPlayDatas.UserRankUnlimited = " - "; + NowUserName = " - "; + NowUserRankRotation = " - "; + NowUserRankUnlimited = " - "; + if (base.ResponseData["data"].Count > 0) + { + if (base.ResponseData["data"].Keys.Contains("chained_viewer_id") && base.ResponseData["data"]["chained_viewer_id"] != null && base.ResponseData["data"]["chained_viewer_id"].ToString() != "") + { + ChainedPlayDatas.ChainedViewerId = base.ResponseData["data"]["chained_viewer_id"].ToString(); + } + if (base.ResponseData["data"].Keys.Contains("password") && base.ResponseData["data"]["password"] != null && base.ResponseData["data"]["password"].ToString() != "") + { + ChainedPlayDatas.Password = base.ResponseData["data"]["password"].ToString(); + } + if (base.ResponseData["data"].Keys.Contains("name") && base.ResponseData["data"]["name"] != null && base.ResponseData["data"]["name"].ToString() != "") + { + ChainedPlayDatas.UserName = base.ResponseData["data"]["name"].ToString(); + } + string text = 1.ToString(); + string text2 = 2.ToString(); + SystemText systemText = Data.SystemText; + if (base.ResponseData["data"].Keys.Contains("rank") && base.ResponseData["data"]["rank"] != null) + { + JsonData jsonData = base.ResponseData["data"]["rank"]; + if (jsonData.Keys.Contains(text)) + { + ChainedPlayDatas.UserRankRotation = systemText.Get(jsonData[text].ToString()); + } + if (jsonData.Keys.Contains(text2)) + { + ChainedPlayDatas.UserRankUnlimited = systemText.Get(jsonData[text2].ToString()); + } + } + NowUserName = base.ResponseData["data"]["now_name"].ToString(); + JsonData jsonData2 = base.ResponseData["data"]["now_rank"]; + NowUserRankRotation = systemText.Get(jsonData2[text].ToString()); + NowUserRankUnlimited = systemText.Get(jsonData2[text2].ToString()); + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/GetiCloudUserDataTask.cs b/SVSim.BattleEngine/Engine/Cute/GetiCloudUserDataTask.cs new file mode 100644 index 0000000..3429bcd --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/GetiCloudUserDataTask.cs @@ -0,0 +1,77 @@ +using LitJson; +using Wizard; + +namespace Cute; + +public class GetiCloudUserDataTask : NetworkTask +{ + private class iCloudUserParams : PostParams + { + public string icloud_data = ""; + } + + public class VerifiediCloudBackupUserData + { + public int iCloudViewerId { get; set; } + + public string iCloudUserName { get; set; } = " - "; + + public string UserRankRotation { get; set; } + + public string UserRankUnlimited { get; set; } + + public bool HasUserData() + { + return iCloudViewerId != 0; + } + + public void Reset() + { + iCloudViewerId = 0; + iCloudUserName = " - "; + } + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.CheckiCloudUser; + + public static readonly VerifiediCloudBackupUserData VerifiediCloudUserData = new VerifiediCloudBackupUserData(); + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(string iCloudData) + { + iCloudUserParams iCloudUserParams = new iCloudUserParams(); + iCloudUserParams.icloud_data = iCloudData; + base.Params = iCloudUserParams; + } + + protected override int Parse() + { + if (resultCode != 1) + { + return resultCode; + } + JsonData jsonData = base.ResponseData["data"]; + if (jsonData["icloud_data_verified"].ToBoolean()) + { + VerifiediCloudUserData.iCloudViewerId = jsonData["icloud_viewer_id"].ToInt(); + VerifiediCloudUserData.iCloudUserName = jsonData["icloud_name"].ToString(); + string text = 1.ToString(); + string text2 = 2.ToString(); + SystemText systemText = Data.SystemText; + if (base.ResponseData["data"].Keys.Contains("rank") && base.ResponseData["data"]["rank"] != null) + { + JsonData jsonData2 = base.ResponseData["data"]["rank"]; + if (jsonData2.Keys.Contains(text)) + { + VerifiediCloudUserData.UserRankRotation = systemText.Get(jsonData2[text].ToString()); + } + if (jsonData2.Keys.Contains(text2)) + { + VerifiediCloudUserData.UserRankUnlimited = systemText.Get(jsonData2[text2].ToString()); + } + } + } + return resultCode; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/HangulManager.cs b/SVSim.BattleEngine/Engine/Cute/HangulManager.cs new file mode 100644 index 0000000..8949eb9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/HangulManager.cs @@ -0,0 +1,224 @@ +using System; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using UnityEngine; + +namespace Cute; + +public static class HangulManager +{ + private class JosiConversionRule + { + public char Type { get; private set; } + + public string Text1 { get; private set; } + + public string Text2 { get; private set; } + + public Func IsConvertToText1 { get; private set; } + + public JosiConversionRule(char type, string text1, string text2, Func isConvertToText1) + { + Type = type; + Text1 = text1; + Text2 = text2; + IsConvertToText1 = isConvertToText1; + } + } + + private class DecomposedHangul + { + public char? Chosung { get; set; } + + public char? Jungsung { get; set; } + + public char? Jongsung { get; set; } + + public DecomposedHangul() + { + Chosung = null; + Jungsung = null; + Jongsung = null; + } + + public DecomposedHangul(char hangulCharacter) + { + int num = hangulCharacter - 44032; + int num2 = (int)Mathf.Floor((float)num / (float)JUNGSUNG_TABLE.Length / (float)JONGSUNG_TABLE.Length); + Chosung = CHOSUNG_TABLE[num2]; + int num3 = (int)Mathf.Floor((float)num / (float)JONGSUNG_TABLE.Length - (float)(num2 * JUNGSUNG_TABLE.Length)); + Jungsung = JUNGSUNG_TABLE[num3]; + Jongsung = JONGSUNG_TABLE[num % JONGSUNG_TABLE.Length]; + } + } + + private const int STRING_BUILDER_CAPACITY = 512; + + private const char dHANGUL_START = '가'; + + private const char dHANGUL_END = '힣'; + + private const char JOSI_TYPE_IDENTIFIER = '@'; + + private static readonly char[] CHOSUNG_TABLE = new char[19] + { + 'ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ', 'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', + 'ㅆ', 'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' + }; + + private static readonly char[] JUNGSUNG_TABLE = new char[21] + { + 'ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ', 'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', + 'ㅙ', 'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅠ', 'ㅡ', 'ㅢ', + 'ㅣ' + }; + + private static readonly char?[] JONGSUNG_TABLE = new char?[28] + { + null, 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ', 'ㄺ', + 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅁ', 'ㅂ', 'ㅄ', 'ㅅ', + 'ㅆ', 'ㅇ', 'ㅈ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ' + }; + + private static readonly JosiConversionRule[] RULE_TABLE = new JosiConversionRule[6] + { + new JosiConversionRule('a', "이", "가", IsConvertToText1_common), + new JosiConversionRule('b', "은", "는", IsConvertToText1_common), + new JosiConversionRule('c', "을", "를", IsConvertToText1_common), + new JosiConversionRule('d', "과", "와", IsConvertToText1_common), + new JosiConversionRule('e', "으로", "로", IsConvertToText1_typeE), + new JosiConversionRule('f', "이라면", "라면", IsConvertToText1_common) + }; + + private static StringBuilder _strBuilder = new StringBuilder(512); + + private const string START_TAG = "START_TAG"; + + private const string END_TAG = "END_TAG"; + + private const string ENCLOSED = "ENCLOSED"; + + private const string NUMERAL_PATTERN = "(?\\[num\\])(?.*?)(?\\[/num\\])"; + + private static readonly string[] NUMERAL_TABLE = new string[100] + { + "0", "하나", "둘", "셋", "넷", "다섯", "여섯", "일곱", "여덟", "아홉", + "열", "열하나", "열둘", "열셋", "열넷", "열다섯", "열여섯", "열일곱", "열여덟", "열아홉", + "스물", "스물하나", "스물둘", "스물셋", "스물넷", "스물다섯", "스물여섯", "스물일곱", "스물여덟", "스물아홉", + "서른", "서른하나", "서른둘", "서른셋", "서른넷", "서른다섯", "서른여섯", "서른일곱", "서른여덟", "서른아홉", + "마흔", "마흔하나", "마흔둘", "마흔셋", "마흔넷", "마흔다섯", "마흔여섯", "마흔일곱", "마흔여덟", "마흔아홉", + "쉰", "쉰하나", "쉰둘", "쉰셋", "쉰넷", "쉰다섯", "쉰여섯", "쉰일곱", "쉰여덟", "쉰아홉", + "예순", "예순하나", "예순둘", "예순셋", "예순넷", "예순다섯", "예순여섯", "예순일곱", "예순여덟", "예순아홉", + "일흔", "일흔하나", "일흔둘", "일흔셋", "일흔넷", "일흔다섯", "일흔여섯", "일흔일곱", "일흔여덟", "일흔아홉", + "여든", "여든하나", "여든둘", "여든셋", "여든넷", "여든다섯", "여든여섯", "여든일곱", "여든여덟", "여든아홉", + "아흔", "아흔하나", "아흔둘", "아흔셋", "아흔넷", "아흔다섯", "아흔여섯", "아흔일곱", "아흔여덟", "아흔아홉" + }; + + public static string ConvertRule(string inputStr) + { + return ConvertJosiType(ConvertNumeral(inputStr)); + } + + private static string ConvertNumeral(string inputStr) + { + foreach (Match item in Regex.Matches(inputStr, "(?\\[num\\])(?.*?)(?\\[/num\\])").Cast().Reverse()) + { + Group obj = item.Groups["END_TAG"]; + inputStr = inputStr.Remove(obj.Index, obj.Length); + Group obj2 = item.Groups["ENCLOSED"]; + foreach (Match item2 in Regex.Matches(obj2.Value, "\\d+").Cast().Reverse()) + { + Group obj3 = item2.Groups[0]; + int num = int.Parse(obj3.Value); + if (0 < num && num < NUMERAL_TABLE.Length) + { + int startIndex = obj2.Index + obj3.Index; + inputStr = inputStr.Remove(startIndex, obj3.Length).Insert(startIndex, NUMERAL_TABLE[num]); + } + } + Group obj4 = item.Groups["START_TAG"]; + inputStr = inputStr.Remove(obj4.Index, obj4.Length); + } + return inputStr; + } + + private static string ConvertJosiType(string inputStr) + { + if (inputStr.Length <= 0) + { + return inputStr; + } + _strBuilder.Length = 0; + _strBuilder.Append(inputStr[0]); + int length = inputStr.Length; + for (int i = 1; i < length; i++) + { + char c = inputStr[i]; + if (c != '@') + { + _strBuilder.Append(c); + continue; + } + if (i + 1 == length) + { + _strBuilder.Append(c); + break; + } + bool flag = false; + char c2 = inputStr[i + 1]; + for (int j = 0; j < RULE_TABLE.Length; j++) + { + JosiConversionRule josiConversionRule = RULE_TABLE[j]; + if (josiConversionRule.Type == c2) + { + flag = true; + _strBuilder.Append(josiConversionRule.IsConvertToText1(inputStr[i - 1]) ? josiConversionRule.Text1 : josiConversionRule.Text2); + i++; + break; + } + } + if (!flag) + { + _strBuilder.Append(c); + } + } + return _strBuilder.ToString(); + } + + private static char? GetJongsung(char character) + { + if (character < '가' || '힣' < character) + { + return null; + } + return JONGSUNG_TABLE[(character - 44032) % JONGSUNG_TABLE.Length]; + } + + private static bool IsConvertToText1_common(char latestCharacter) + { + if (GetJongsung(latestCharacter).HasValue) + { + return true; + } + if ("013678".IndexOf(latestCharacter) >= 0) + { + return true; + } + return false; + } + + private static bool IsConvertToText1_typeE(char latestCharacter) + { + char? jongsung = GetJongsung(latestCharacter); + if (jongsung.HasValue && jongsung.Value != 'ㄹ') + { + return true; + } + if ("036".IndexOf(latestCharacter) >= 0) + { + return true; + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/IAchievementCallback.cs b/SVSim.BattleEngine/Engine/Cute/IAchievementCallback.cs new file mode 100644 index 0000000..c0a24d0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/IAchievementCallback.cs @@ -0,0 +1,18 @@ +using UnityEngine.SocialPlatforms; + +namespace Cute; + +public interface IAchievementCallback +{ + void OnSignIn(bool success); + + void OnSignOut(); + + void OnReleaseAchievement(bool success); + + void OnProceedAchievement(bool success); + + void OnLoadAchievements(IAchievement[] achievements); + + void OnLoadAchievementDescriptions(IAchievementDescription[] descriptions); +} diff --git a/SVSim.BattleEngine/Engine/Cute/IEnumerableExtensions.cs b/SVSim.BattleEngine/Engine/Cute/IEnumerableExtensions.cs new file mode 100644 index 0000000..8d9d832 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/IEnumerableExtensions.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; +using System.Linq; + +namespace Cute; + +public static class IEnumerableExtensions +{ + public static bool IsNotNullOrEmpty(this IEnumerable enumerable) + { + return enumerable?.Any() ?? false; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/ILocalKVS.cs b/SVSim.BattleEngine/Engine/Cute/ILocalKVS.cs new file mode 100644 index 0000000..26e4dd6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/ILocalKVS.cs @@ -0,0 +1,20 @@ +using System; + +namespace Cute; + +public interface ILocalKVS : IDisposable +{ + string savePath { get; } + + string Get(string key); + + void Set(string key, string value); + + void Delete(string key); + + void DeleteAll(); + + void Transaction(Action block); + + void Optimize(); +} diff --git a/SVSim.BattleEngine/Engine/Cute/INetworkUI.cs b/SVSim.BattleEngine/Engine/Cute/INetworkUI.cs new file mode 100644 index 0000000..0c5c44d --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/INetworkUI.cs @@ -0,0 +1,54 @@ +namespace Cute; + +public interface INetworkUI +{ + string GetText(string code); + + void StartLoading(bool notEditor = false); + + void StopLoading(); + + void GoToMypage(); + + void SoftwareRest(); + + bool IsKeepLastRequest(); + + void SetKeepLastRequest(bool flag); + + void OpenRetryAndToTitleErrorPopUp(string title, string message, string code); + + void OpenGoToMypageErrorPopUp(string title, string message, string code); + + void OpenGoToTitleErrorPopUp(string title, string message, string code); + + void OpenGotoStoreErrorPopup(); + + void OpenRetryFailErrorPopup(); + + void OpenTimeOutErrorPopUp(); + + void OpenHttpStatusErrorPopUp(); + + void OpenResourceVersionUpPopUp(); + + void OpenSessionErrorPopUp(); + + bool isCloseDialogGroupError(int resultCode); + + void OpenCloseOnlyErrorPopUp(int resultCode); + + void OpenStrictServerErrorPopUp(int resultCode); + + void OpenAccountBlockErrorPopUp(int resultCode); + + void OpenAccountLimitedBlockErrorPopUp(int resultCode, string endTimeText); + + void OpenAllMaintenancePopUp(int resultCode, string endTime); + + void OpenEachFunctionMaintenancePopUp(int resultCode); + + void OpenOtherServerErrorPopUp(int resultCode); + + void OpenSocialServiceNoResponseErrorPopup(); +} diff --git a/SVSim.BattleEngine/Engine/Cute/LeanThreadPool.cs b/SVSim.BattleEngine/Engine/Cute/LeanThreadPool.cs new file mode 100644 index 0000000..ec5cb98 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/LeanThreadPool.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using UnityEngine; + +namespace Cute; + +public class LeanThreadPool +{ + private static LeanThreadPool _instance; + + private Thread[] _threads; + + private Semaphore _semaphore; + + private object _jobsLock; + + private object _convergeLock; + + private List _jobs; + + private bool _quit; + + private int _convergeCount; + + public static LeanThreadPool Instance + { + get + { + if (_instance == null) + { + _instance = new LeanThreadPool(); + } + return _instance; + } + } + + public int ThreadsCount => _threads.Length; + + private LeanThreadPool() + { + int processorCount = SystemInfo.processorCount; + _jobs = new List(); + _jobsLock = new object(); + _convergeLock = new object(); + _semaphore = new Semaphore(0, int.MaxValue); + _threads = new Thread[processorCount]; + for (int i = 0; i < _threads.Length; i++) + { + _threads[i] = new Thread(ThreadFunction); + _threads[i].Start(); + } + } + + private void ThreadFunction() + { + ParallelJob parallelJob = null; + while (!_quit) + { + _semaphore.WaitOne(); + lock (_jobsLock) + { + if (_jobs.Count > 0) + { + parallelJob = _jobs[0]; + _jobs.Remove(parallelJob); + } + } + if (parallelJob != null) + { + parallelJob.Run(); + parallelJob = null; + } + } + lock (_convergeLock) + { + _convergeCount++; + } + } + + public IEnumerator KillAll(Action callback = null) + { + _quit = true; + _convergeCount = 0; + lock (_jobsLock) + { + _jobs.Clear(); + } + _semaphore.Release(_threads.Length); + while (_convergeCount < _threads.Length) + { + yield return 0; + } + callback.Call(); + } + + public void AddJob(ParallelJob job) + { + lock (_jobsLock) + { + _jobs.Add(job); + } + _semaphore.Release(); + } +} 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/Engine/Cute/LocalSqliteKVS.cs b/SVSim.BattleEngine/Engine/Cute/LocalSqliteKVS.cs new file mode 100644 index 0000000..7b986a5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/LocalSqliteKVS.cs @@ -0,0 +1,281 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text.RegularExpressions; +using Sqlite3Plugin; + +namespace Cute; + +public class LocalSqliteKVS : ILocalKVS, IDisposable +{ + protected DBProxy _db; + + protected PreparedQuery _keyQuery; + + protected PreparedQuery _upsertQuery; + + protected PreparedQuery _deleteQuery; + + protected PreparedQuery _likeQuery; + + protected PreparedQuery _selectAllQuery; + + protected bool _enableCache; + + protected Dictionary _tableCache; + + public string savePath => _db.dbPath; + + protected LocalSqliteKVS(string path, bool enableCache) + { + try + { + string directoryName = Path.GetDirectoryName(path); + if (!Directory.Exists(directoryName)) + { + Directory.CreateDirectory(directoryName); + } + _db = new DBProxy(); + if (!_db.OpenWritable(path)) + { + throw new ApplicationException($"Failed to open LocalKVS at {path}"); + } + if (!_db.Exec("CREATE TABLE IF NOT EXISTS t (k TEXT NOT NULL, v TEXT NOT NULL, PRIMARY KEY(k));")) + { + throw new ApplicationException($"Failed to initialize LocalKVS at {path}"); + } + _db.Exec("pragma cache_size=0"); + _keyQuery = _db.PreparedQuery("SELECT v FROM t WHERE k=?;"); + _upsertQuery = _db.PreparedQuery("REPLACE INTO t(k,v)VALUES(?,?);"); + _deleteQuery = _db.PreparedQuery("DELETE FROM t WHERE k=?;"); + _likeQuery = _db.PreparedQuery("SELECT k FROM t WHERE k LIKE ? ESCAPE '!';"); + _selectAllQuery = _db.PreparedQuery("SELECT k FROM t;"); + _enableCache = enableCache; + if (!_enableCache) + { + return; + } + using (Query query = _db.Query("SELECT COUNT(*) FROM t;")) + { + query.Step(); + int capacity = query.GetInt(0); + _tableCache = new Dictionary(capacity); + } + using Query query2 = _db.Query("SELECT k,v FROM t;"); + while (query2.Step()) + { + string text = query2.GetText(0); + string text2 = query2.GetText(1); + _tableCache[text] = text2; + } + } + catch (Exception ex) + { + Dispose(); + throw ex; + } + } + + public static LocalSqliteKVS Open(string path, bool enableCache) + { + return new LocalSqliteKVS(path, enableCache); + } + + ~LocalSqliteKVS() + { + Dispose(); + } + + public virtual void Dispose() + { + if (_db != null) + { + if (_keyQuery != null) + { + _keyQuery.Dispose(); + _keyQuery = null; + } + if (_upsertQuery != null) + { + _upsertQuery.Dispose(); + _upsertQuery = null; + } + if (_deleteQuery != null) + { + _deleteQuery.Dispose(); + _deleteQuery = null; + } + if (_likeQuery != null) + { + _likeQuery.Dispose(); + _likeQuery = null; + } + if (_selectAllQuery != null) + { + _selectAllQuery.Dispose(); + _selectAllQuery = null; + } + _db.Dispose(); + _db = null; + _tableCache = null; + } + } + + public List FindLike(string pattern) + { + List list = new List(); + try + { + _likeQuery.BindText(1, pattern); + while (_likeQuery.Step()) + { + list.Add(_likeQuery.GetText(0)); + } + return list; + } + catch (Exception ex) + { + throw ex; + } + finally + { + _likeQuery.Reset(); + } + } + + public string EscapeLikePattern(string pattern) + { + return Regex.Replace(pattern, "[_%\\[!]", "!$0"); + } + + public void DisableCache() + { + _enableCache = false; + _tableCache = null; + } + + public List GetAll() + { + List list = new List(); + try + { + while (_selectAllQuery.Step()) + { + list.Add(_selectAllQuery.GetText(0)); + } + return list; + } + catch (Exception ex) + { + throw ex; + } + finally + { + _selectAllQuery.Reset(); + } + } + + public string Get(string key) + { + if (_enableCache) + { + if (!_tableCache.TryGetValue(key, out var value)) + { + return null; + } + return value; + } + try + { + _keyQuery.BindText(1, key); + if (_keyQuery.Step()) + { + return _keyQuery.GetText(0); + } + return null; + } + catch (Exception ex) + { + throw ex; + } + finally + { + _keyQuery.Reset(); + } + } + + public void Set(string key, string value) + { + if (_enableCache) + { + _tableCache[key] = value; + } + try + { + _upsertQuery.BindText(1, key); + _upsertQuery.BindText(2, value); + _upsertQuery.Step(); + } + catch (Exception ex) + { + throw ex; + } + finally + { + _upsertQuery.Reset(); + } + } + + public void Delete(string key) + { + if (_enableCache && !_tableCache.Remove(key)) + { + return; + } + try + { + _deleteQuery.BindText(1, key); + _deleteQuery.Step(); + } + catch (Exception ex) + { + throw ex; + } + finally + { + _deleteQuery.Reset(); + } + } + + public void Transaction(Action block) + { + if (!_db.Begin()) + { + throw new ApplicationException("Failed to begin LocalKVS transaction"); + } + try + { + block(); + _db.Commit(); + } + catch (Exception ex) + { + _db.Rollback(); + throw ex; + } + } + + public void DeleteAll() + { + _db.Exec("DELETE FROM t;"); + if (_enableCache) + { + _tableCache.Clear(); + } + } + + public void Optimize() + { + _db.Vacuum(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/ManifestDatahashKVS.cs b/SVSim.BattleEngine/Engine/Cute/ManifestDatahashKVS.cs new file mode 100644 index 0000000..73056ba --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/ManifestDatahashKVS.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; + +namespace Cute; + +public class ManifestDatahashKVS : ILocalKVS, IDisposable +{ + protected LocalSqliteKVS _kvs; + + public string savePath => _kvs.savePath; + + public ManifestDatahashKVS(string path) + { + _kvs = LocalSqliteKVS.Open(path, enableCache: true); + } + + ~ManifestDatahashKVS() + { + Dispose(); + } + + public virtual void Dispose() + { + if (_kvs != null) + { + _kvs.Dispose(); + _kvs = null; + } + } + + public string Get(string name) + { + string text = _kvs.Get(name); + return (text == null) ? "" : text; + } + + public void Set(string name, string hash) + { + _kvs.Set(name, hash); + } + + public void Set(Dictionary _dictionary) + { + if (_dictionary.Count <= 0) + { + return; + } + foreach (KeyValuePair item in _dictionary) + { + Set(item.Key, item.Value); + } + } + + public void Delete(string name) + { + _kvs.Delete(name); + } + + public void DeleteAll() + { + _kvs.DeleteAll(); + Optimize(); + } + + public void DisableCache() + { + _kvs.DisableCache(); + } + + public void DeleteByList(List _deleteList) + { + if (_deleteList.Count > 0) + { + Transaction(delegate + { + _deleteList.ForEach(Delete); + }); + Optimize(); + } + } + + public void DeleteByPrefix(string prefix) + { + List deleteList = _kvs.FindLike(_kvs.EscapeLikePattern(prefix) + "%"); + if (deleteList.Count <= 0) + { + return; + } + Transaction(delegate + { + foreach (string item in deleteList) + { + Delete(item); + } + }); + Optimize(); + } + + public List GetAll() + { + return _kvs.GetAll(); + } + + public List FindLike(string patternEscaped) + { + return _kvs.FindLike(patternEscaped); + } + + public string EscapeLikePattern(string patternNoEscape) + { + return _kvs.EscapeLikePattern(patternNoEscape); + } + + public void Optimize() + { + _kvs.Optimize(); + } + + public void Transaction(Action block) + { + _kvs.Transaction(block); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/MovieManager.cs b/SVSim.BattleEngine/Engine/Cute/MovieManager.cs new file mode 100644 index 0000000..64e26c8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/MovieManager.cs @@ -0,0 +1,217 @@ +using System; +using System.Collections; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class MovieManager : MonoBehaviour, IManager +{ + private string fileRootPath; + + private string streamingAssetfileRootPath; + + private MoviePlayer _player; + + private float _volume = 1f; + + private MovieSubtitles _movieSubtitles; + + private IEnumerator Start() + { + Toolbox.MovieManager = this; + while (!CustomPreference.isPreferenceComplete) + { + yield return null; + } + fileRootPath = "file:///" + Application.persistentDataPath + "/"; + streamingAssetfileRootPath = "file:///" + Application.streamingAssetsPath + "/"; + } + + private void CreateMoviePlayer() + { + GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("Prefab/Movie/MoviePlayer")) as GameObject; + gameObject.transform.parent = base.transform; + _player = gameObject.GetComponent(); + _player.SetVolume(_volume); + } + + public void Load(string filename) + { + if (!_player) + { + CreateMoviePlayer(); + } + _player.Load(fileRootPath + filename); + } + + public void Unload() + { + if ((bool)_player) + { + UnityEngine.Object.Destroy(_player.gameObject); + } + } + + public void Play() + { + if (IsReady() || IsPaused() || IsStopped()) + { + _player.Play(); + } + } + + public void PlayWithSubtitles(string subtitlesCSV) + { + GameObject prefab = (GameObject)Resources.Load("UI/MovieSubtitles"); + _movieSubtitles = NGUITools.AddChild(UIManager.GetInstance().UIManagerRoot.gameObject, prefab).GetComponent(); + SetCallbackStart(delegate + { + _movieSubtitles.PlaySubtitles(subtitlesCSV); + }); + Play(); + } + + public void Stop() + { + if (_movieSubtitles != null) + { + _movieSubtitles.Finish(); + _movieSubtitles = null; + } + if (IsPlaying() || IsPaused()) + { + _player.Stop(); + } + } + + public void Pause() + { + if (IsPlaying()) + { + _player.Pause(); + } + } + + public void SetVolume(float volume) + { + _volume = volume; + if ((bool)_player) + { + _player.SetVolume(volume); + } + } + + public int GetSeekPosition() + { + if (!_player) + { + return 0; + } + return _player.GetSeekPosition(); + } + + public int GetDuration() + { + if (!_player) + { + return 0; + } + return _player.GetDuration(); + } + + public int GetCurrentSeekPercent() + { + if (!_player) + { + return 0; + } + return _player.GetCurrentSeekPercent(); + } + + public void SeekTo(int seek) + { + if ((bool)_player) + { + _player.SeekTo(seek); + } + } + + public bool IsReady() + { + if (!_player) + { + return false; + } + return _player.IsReady(); + } + + public bool IsPlaying() + { + if (!_player) + { + return false; + } + return _player.IsPlaying(); + } + + public bool IsPaused() + { + if (!_player) + { + return false; + } + return _player.IsPaused(); + } + + public bool IsStopped() + { + if (!_player) + { + return false; + } + return _player.IsStopped(); + } + + public bool IsFinished() + { + if (!_player) + { + return false; + } + return _player.IsFinished(); + } + + public bool IsError() + { + if (!_player) + { + return true; + } + return _player.IsError(); + } + + public void SetCallbackReady(Action callback) + { + if ((bool)_player) + { + _player.CallbackReady += callback; + } + } + + public void SetCallbackStart(Action callback) + { + if ((bool)_player) + { + _player.CallbackStart += callback; + } + } + + public void SetCallbackEnd(Action callback) + { + if ((bool)_player) + { + _player.CallbackEnd += callback; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/MoviePlayer.cs b/SVSim.BattleEngine/Engine/Cute/MoviePlayer.cs new file mode 100644 index 0000000..524a0af --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/MoviePlayer.cs @@ -0,0 +1,155 @@ +using System; +using CriWare; +using CriWare.CriMana; +using UnityEngine; + +namespace Cute; + +public class MoviePlayer : MonoBehaviour +{ + [SerializeField] + private CriManaMovieMaterial _movieController; + + [SerializeField] + private Camera _camera; + + public event Action CallbackReady; + + public event Action CallbackStart; + + public event Action CallbackEnd; + + private void Update() + { + if (_movieController.player == null) + { + return; + } + switch (_movieController.player.status) + { + case Player.Status.Playing: + if (this.CallbackStart != null) + { + this.CallbackStart(); + this.CallbackStart = null; + } + break; + case Player.Status.PlayEnd: + Stop(); + if (this.CallbackEnd != null) + { + this.CallbackEnd(); + this.CallbackEnd = null; + } + break; + } + } + + public void Load(string filePath) + { + filePath = filePath.Replace("file:///", ""); + _movieController.maxFrameDrop = CriManaMovieMaterial.MaxFrameDrop.Ten; + _movieController.player.Stop(); + _movieController.player.SetFile(null, filePath); + _movieController.player.Prepare(); + if (this.CallbackReady != null) + { + this.CallbackReady(); + this.CallbackReady = null; + } + } + + public void Play() + { + _camera.enabled = true; + if (IsPaused()) + { + _movieController.player.Pause(sw: false); + } + else + { + _movieController.player.Start(); + } + } + + public void Stop() + { + QualitySettings.vSyncCount = 0; + _camera.enabled = false; + _movieController.player.Stop(); + } + + public void Pause() + { + _movieController.player.Pause(!_movieController.player.IsPaused()); + } + + public void SetVolume(float volume) + { + _movieController.player.SetVolume(volume); + } + + public int GetSeekPosition() + { + return (int)(_movieController.player.GetTime() / 1000); + } + + public int GetDuration() + { + int totalFrames = (int)_movieController.player.movieInfo.totalFrames; + int num = (int)(_movieController.player.movieInfo.framerateN / 1000); + if (num == 0) + { + return -1; + } + return totalFrames / num * 1000; + } + + public int GetCurrentSeekPercent() + { + return GetSeekPosition() / GetDuration() * 100; + } + + public void SeekTo(int seek) + { + int num = (int)(_movieController.player.movieInfo.framerateN / 1000); + int seekPosition = seek * num / 1000; + _movieController.player.Stop(); + _movieController.player.SetSeekPosition(seekPosition); + _movieController.player.Start(); + } + + public bool IsReady() + { + return _movieController.player.status == Player.Status.Ready; + } + + public bool IsPlaying() + { + if (_movieController.player.status == Player.Status.Playing) + { + return !IsPaused(); + } + return false; + } + + public bool IsPaused() + { + return _movieController.player.IsPaused(); + } + + public bool IsStopped() + { + return _movieController.player.status == Player.Status.Stop; + } + + public bool IsFinished() + { + return _movieController.player.status == Player.Status.PlayEnd; + } + + public bool IsError() + { + return _movieController.player.status == Player.Status.Error; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/NativePluginWrapper.cs b/SVSim.BattleEngine/Engine/Cute/NativePluginWrapper.cs new file mode 100644 index 0000000..707f472 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/NativePluginWrapper.cs @@ -0,0 +1,199 @@ +using UnityEngine; + +namespace Cute; + +public static class NativePluginWrapper +{ + public enum BatteryState + { + UNKNOWN, + DISCHARGING, + CHARGING, + FULL + } + + public enum NetworkMode + { + UNCONNECTED, + WIFI, + MOBILE + } + + public static void DeviceInit() + { + } + + public static int GetUseResidentMemory() + { + return 0; + } + + public static int GetUseVirtualMemory() + { + return 0; + } + + public static int GetDeviceFreeMemory() + { + return 0; + } + + public static int GetVmUseMemory() + { + return 0; + } + + public static int GetVmFreeMemory() + { + return 0; + } + + public static void SetStringToClipboard(string copyText) + { + ClipboardHelper.Clipboard = copyText; + } + + public static int GetAccelerometerRotation() + { + return 1; + } + + public static void RequestAudioFocus() + { + } + + public static void AbandonAudioFocus() + { + } + + public static string GetMacAddressByName(string devicename) + { + return null; + } + + public static void DispStatusBar(bool isDisp) + { + if (isDisp) + { + Screen.fullScreen = false; + } + else + { + Screen.fullScreen = true; + } + } + + public static void RegistPhoneStateListener() + { + } + + public static void UnregistPhoneStateListener() + { + } + + public static int GetBatteryLevel() + { + return 0; + } + + public static BatteryState GetBatteryState() + { + return BatteryState.UNKNOWN; + } + + public static int GetWifiAntenaLevel() + { + return 0; + } + + public static NetworkMode GetNetworkMode() + { + return NetworkMode.UNCONNECTED; + } + + public static bool IsAirplaneMode() + { + return false; + } + + public static int GetCdmaDbm() + { + return 0; + } + + public static int GetCdmaEcio() + { + return 0; + } + + public static int GetEvdoDbm() + { + return 0; + } + + public static int GetEvdoEcio() + { + return 0; + } + + public static int GetDescriveContents() + { + return 0; + } + + public static bool IsGsm() + { + return false; + } + + public static int GetSignalHashCode() + { + return 0; + } + + public static int GetGsmSignalStrength() + { + return 0; + } + + public static int GetGsmBitErrorRate() + { + return 0; + } + + public static void ShowToast(string text) + { + } + + public static void DumpWWWCache() + { + } + + public static void SetCacheMemorySize(int nMemSize) + { + } + + public static int GetCacheDiskUsage() + { + return 0; + } + + public static int GetCacheDiskCapacity() + { + return 0; + } + + public static int GetCacheCurrentMemoryUsage() + { + return 0; + } + + public static int GetCacheCurrentMemoryCapacity() + { + return 0; + } + + public static void ClearWWWCache() + { + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/NetworkManager.cs b/SVSim.BattleEngine/Engine/Cute/NetworkManager.cs new file mode 100644 index 0000000..a4283a0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/NetworkManager.cs @@ -0,0 +1,406 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using LitJson; +using MessagePack; +using UnityEngine; +using UnityEngine.Networking; +using Wizard; +using Wizard.Battle.Phase; +using Wizard.Bingo; +using Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase; +using Wizard.Scripts.Network.Data.TaskData.ItemPurchase; +using Wizard.Scripts.Network.Data.TaskData.SkinPurchase; +using Wizard.Scripts.Network.Data.TaskData.SpotCardExchange; + +namespace Cute; + +public class NetworkManager : MonoBehaviour, IManager +{ + public const float TimeOut = 30f; + + public const float TimeOutShort = 2f; + + protected NetworkTask lastRequestTask; + + public bool isConnect; + + public bool isTimeOut; + + public bool isError; + + private bool isEncrypt = true; + + private bool isUseJson; + + private bool _showLoadingIcon = true; + + private IEnumerator connectCoroutine; + + [SerializeField] + public Certification _certification; + + public INetworkUI NetworkUI { get; set; } + + private void Start() + { + Toolbox.NetworkManager = this; + } + + public bool IsReachability() + { + if (Application.internetReachability != NetworkReachability.NotReachable) + { + return true; + } + return false; + } + + public IEnumerator Connect(NetworkTask task, Action callbackOnSuccess = null, Action callbackOnFailure = null, Action callbackOnResultCodeError = null, bool encrypt = true, bool useJson = false, bool showLoadingIcon = true, bool showErrorDialog = true) + { + while (isConnect) + { + yield return 0; + } + isEncrypt = encrypt; + isUseJson = useJson; + _showLoadingIcon = showLoadingIcon; + if (true) + { + if (IsBattle()) + { + LocalLog.AccumulateLastTraceLog("taskStart " + task); + } + lastRequestTask = task; + lastRequestTask.Initialize(); + lastRequestTask.CallbackOnSuccess = callbackOnSuccess; + lastRequestTask.CallbackOnFailure = callbackOnFailure; + lastRequestTask.CallbackOnResultCodeError = callbackOnResultCodeError; + lastRequestTask.PrepareHeaders(); + lastRequestTask.PreparePostData(isEncrypt, isUseJson); + connectCoroutine = Connect(showErrorDialog); + yield return StartCoroutine(connectCoroutine); + } + } + + private IEnumerator Connect(bool showErrorDialog) + { + while (isConnect) + { + yield return 0; + } + isConnect = true; + isTimeOut = false; + isError = false; + if (NetworkUI != null && _showLoadingIcon) + { + NetworkUI.StartLoading(); + } + bool isLogTraceCheckUri = false; + if (lastRequestTask is DoMatchingBase || lastRequestTask is FinishTaskBase) + { + isLogTraceCheckUri = true; + } + string url = lastRequestTask.Url; + _ = lastRequestTask; + if (isLogTraceCheckUri) + { + LogTraceCheck("1"); + } + using UnityWebRequest unityWebRequest = GetUnityWebRequestInstance(url); + yield return unityWebRequest.SendWebRequest(); + if (isLogTraceCheckUri) + { + LogTraceCheck("2"); + } + float endTime = Time.realtimeSinceStartup + 30f; + if (lastRequestTask.GetType().Equals(typeof(CheckSpecialTitleTask))) + { + endTime = Time.realtimeSinceStartup + 2f; + } + while (!unityWebRequest.isDone && Time.realtimeSinceStartup < endTime) + { + yield return 0; + } + if (isLogTraceCheckUri) + { + LogTraceCheck("3"); + } + if (NetworkUI != null) + { + NetworkUI.StopLoading(); + } + if (!unityWebRequest.isDone) + { + isTimeOut = true; + LocalLog.AccumulateTraceLog("Connect is TimeOut"); + disposeUnityWebRequest(unityWebRequest); + if (!lastRequestTask.isSkipCommonTimeOutPopUp()) + { + if (lastRequestTask.GetType().Equals(typeof(PackOpenTask)) || lastRequestTask.GetType().Equals(typeof(BuildDeckBuyTask)) || lastRequestTask.GetType().Equals(typeof(SleeveBuyTask)) || lastRequestTask.GetType().Equals(typeof(SkinBuyMultiRewardTask)) || lastRequestTask.GetType().Equals(typeof(SkinBuyMultiTask)) || lastRequestTask.GetType().Equals(typeof(SkinBuySingleTask)) || lastRequestTask.GetType().Equals(typeof(ItemPurchaseBuyTask)) || lastRequestTask.GetType().Equals(typeof(SpotCardExchangeTask)) || lastRequestTask.GetType().Equals(typeof(CardCreateTask)) || lastRequestTask.GetType().Equals(typeof(CardDestructTask)) || lastRequestTask.GetType().Equals(typeof(StoryFinishTask)) || lastRequestTask.GetType().Equals(typeof(PracticeFinishTask)) || lastRequestTask.GetType().Equals(typeof(BingoDrawTask)) || lastRequestTask.GetType().Equals(typeof(MypageTreasureBoxCpOpenTask)) || lastRequestTask.GetType().Equals(typeof(MypageReceiveSpecialTreasureTask)) || lastRequestTask.GetType().Equals(typeof(FreeCardPackCampaignFinishTask))) + { + NetworkUI.OpenGoToTitleErrorPopUp(Data.SystemText.Get("ErrorHeader_0012"), Data.SystemText.Get("Error_0012"), ""); + } + else + { + NetworkUI.OpenTimeOutErrorPopUp(); + } + } + if (lastRequestTask.CallbackOnFailure != null) + { + if (lastRequestTask.GetType().Equals(typeof(PaymentPCFinishTask))) + { + NetworkUI.OpenGoToTitleErrorPopUp(Data.SystemText.Get("ErrorHeader_0012"), Data.SystemText.Get("Error_0012"), ""); + } + else + { + lastRequestTask.CallbackOnFailure(NetworkTask.ResultCode.TimeOut); + } + } + Toolbox.DeviceManager.ClearIpAddress(); + } + else if (!string.IsNullOrEmpty(unityWebRequest.error)) + { + LocalLog.AccumulateTraceLog("Connect is Error!" + unityWebRequest.error + " responseCode:" + unityWebRequest.responseCode); + isError = true; + if (showErrorDialog && !lastRequestTask.isSkipCommonHttpStatusErrorPopUp()) + { + if (lastRequestTask.GetType().Equals(typeof(PackOpenTask)) || lastRequestTask.GetType().Equals(typeof(PaymentPCFinishTask))) + { + NetworkUI.OpenGoToTitleErrorPopUp(Data.SystemText.Get("ErrorHeader_0012"), Data.SystemText.Get("Error_0012"), ""); + } + else + { + NetworkUI.OpenHttpStatusErrorPopUp(); + } + } + disposeUnityWebRequest(unityWebRequest); + if (lastRequestTask.CallbackOnFailure != null) + { + lastRequestTask.CallbackOnFailure(NetworkTask.ResultCode.Error); + } + Toolbox.DeviceManager.ClearIpAddress(); + } + else if (unityWebRequest.isDone) + { + if (lastRequestTask.CallbackOnUnityWebRequestDone != null) + { + lastRequestTask.CallbackOnUnityWebRequestDone(unityWebRequest); + } + else if (unityWebRequest.downloadHandler.text != null && unityWebRequest.downloadHandler.text != "") + { + try + { + byte[] bytes = ((!isEncrypt) ? Convert.FromBase64String(unityWebRequest.downloadHandler.text) : CryptAES.decrypt(unityWebRequest.downloadHandler.text)); + string json = (isUseJson ? MessagePackSerializer.ToJson(bytes) : MessagePackSerializer.ToJson(bytes)); + lastRequestTask.SetResponseData(JsonMapper.ToObject(json)); + } + catch (Exception ex) + { + string text = unityWebRequest.downloadHandler.text; + disposeUnityWebRequest(unityWebRequest); + if (!lastRequestTask.GetType().Equals(typeof(CheckSpecialTitleTask))) + { + if (!isEncrypt) + { + LocalLog.AccumulateTraceLog(ex.ToString()); + throw ex; + } + Debug.LogError(text); + Debug.LogError(ex.Message); + Debug.LogError(ex.StackTrace); + if (text.Contains("php")) + { + if (text.Length > 1800) + { + throw new Exception(text.Substring(1, 1800)); + } + throw new Exception(text); + } + HandleDeserializeException(ex); + } + } + try + { + if (lastRequestTask != null) + { + if (lastRequestTask.GetType().Equals(typeof(CheckSpecialTitleTask))) + { + ((CheckSpecialTitleTask)lastRequestTask).ParseTitleCheckData(); + } + else + { + NetworkTask.ERROR_CODE_STATUS num = lastRequestTask.CheckResultCodeToPopupCreate_ReturnStatus(); + if (num == NetworkTask.ERROR_CODE_STATUS.ERROR) + { + isError = true; + } + if (num == NetworkTask.ERROR_CODE_STATUS.ERROR_TO_MAINTENANCE_POPUP && lastRequestTask.CallbackOnFailure != null) + { + lastRequestTask.CallbackOnFailure(NetworkTask.ResultCode.Maintenance); + } + if (num == NetworkTask.ERROR_CODE_STATUS.ERROR && lastRequestTask.CallbackOnFailure != null) + { + lastRequestTask.CallbackOnFailure(NetworkTask.ResultCode.Title); + } + } + } + } + catch (Exception ex2) + { + disposeUnityWebRequest(unityWebRequest); + if (!lastRequestTask.GetType().Equals(typeof(CheckSpecialTitleTask))) + { + LocalLog.AccumulateTraceLog("NetworkManager Connect Error 2:" + ex2); + throw ex2; + } + } + } + else + { + LocalLog.AccumulateTraceLog("NetworkManager Connect Error 3"); + } + } + ClearLastRequestTask(); + disposeUnityWebRequest(unityWebRequest); + isConnect = false; + } + + private void LogTraceCheck(string logMsg) + { + LocalLog.AccumulateLastTraceLog("NetworkTrace msg " + logMsg); + LocalLog.SubmitAccumulateLastTraceLog(); + } + + private bool IsBattle() + { + if (ToolboxGame.RealTimeNetworkAgent != null && BattleManagerBase.GetIns() != null && BattleManagerBase.GetIns().GetCurrentPhase() is MainPhase) + { + return true; + } + return false; + } + + private UnityWebRequest GetUnityWebRequestInstance(string serverUrl) + { + try + { + UnityWebRequest unityWebRequest = new UnityWebRequest(serverUrl, "POST"); + unityWebRequest.uploadHandler = new UploadHandlerRaw(lastRequestTask.Body); + unityWebRequest.downloadHandler = new DownloadHandlerBuffer(); + foreach (KeyValuePair item in lastRequestTask.Header) + { + unityWebRequest.SetRequestHeader(item.Key, item.Value); + } + return unityWebRequest; + } + catch (Exception ex) + { + string text = ""; + foreach (KeyValuePair item2 in lastRequestTask.Header) + { + text += string.Format("header==={0} : {1}" + Environment.NewLine, item2.Key, item2.Value); + } + Debug.LogError(ex?.ToString() + ":" + text); + return null; + } + } + + private void HandleDeserializeException(Exception e) + { + SoftwareReset.exec(); + throw new Exception("復号化に失敗しました。" + e); + } + + public void ClearLastRequestTask() + { + if ((NetworkUI != null && !NetworkUI.IsKeepLastRequest()) || lastRequestTask.isServerResultCodeOK()) + { + if (IsBattle()) + { + LocalLog.AccumulateLastTraceLog("ClearLastRequestTask " + lastRequestTask); + } + lastRequestTask = null; + } + } + + public IEnumerator Retry() + { + if (lastRequestTask == null) + { + NetworkUI.OpenRetryFailErrorPopup(); + yield break; + } + if (connectCoroutine != null) + { + StopConnectCoroutine(); + } + connectCoroutine = Connect(showErrorDialog: true); + yield return StartCoroutine(connectCoroutine); + } + + public void Certification() + { + _certification.GenerateUdid(); + } + + public void ReturnToTitle() + { + NetworkUI.SetKeepLastRequest(flag: false); + ClearLastRequestTask(); + NetworkUI.SoftwareRest(); + } + + public void GoToMypage() + { + NetworkUI.SetKeepLastRequest(flag: false); + ClearLastRequestTask(); + NetworkUI.GoToMypage(); + } + + public void GoToStore() + { + lastRequestTask.GotoStore(); + NetworkUI.SetKeepLastRequest(flag: false); + ClearLastRequestTask(); + NetworkUI.SoftwareRest(); + } + + public void QuitApplication() + { + NetworkUI.SetKeepLastRequest(flag: false); + ClearLastRequestTask(); + if (Toolbox.mute != null) + { + Toolbox.mute.Close(); + Toolbox.mute = null; + } + Application.Quit(); + } + + private void disposeUnityWebRequest(UnityWebRequest unityWebRequest) + { + unityWebRequest.Dispose(); + } + + public void StopConnectCoroutine() + { + if (connectCoroutine != null) + { + if (RealTimeNetworkAgent.IsNormalNetworkBattle()) + { + LocalLog.AccumulateLastTraceLog("NetworkManager_StopConnectCoroutine " + StackTraceUtility.ExtractStackTrace()); + } + StopCoroutine(connectCoroutine); + isConnect = false; + } + } + + private void OnDestroy() + { + if (RealTimeNetworkAgent.IsNormalNetworkBattle()) + { + LocalLog.AccumulateLastTraceLog("NetworkManager_Destroy"); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/NetworkTask.cs b/SVSim.BattleEngine/Engine/Cute/NetworkTask.cs new file mode 100644 index 0000000..52c6d72 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/NetworkTask.cs @@ -0,0 +1,570 @@ +using System; +using System.Collections.Generic; +using System.Text; +using LitJson; +using MessagePack; +using UnityEngine.Networking; +using Wizard; +using Wizard.Battle.Recovery; + +namespace Cute; + +public class NetworkTask +{ + public enum ResultCode + { + Success, + Error, + TimeOut, + Title, + Maintenance + } + + public enum ERROR_CODE_STATUS + { + NONE, + ERROR, + ERROR_TO_MAINTENANCE_POPUP + } + + protected Dictionary header = new Dictionary(); + + protected byte[] body; + + protected int resultCode; + + private SkipCuteCheckResultCodes skipCuteCheckResultCodes; + + private bool skipCommonTimeOutPopUp; + + private bool skipCommonHttpStatusErrorPopUp; + + public virtual string Url { get; set; } + + public Action CallbackOnSuccess { get; set; } + + public Action CallbackOnFailure { get; set; } + + public Action CallbackOnResultCodeError { get; set; } + + public Action CallbackOnUnityWebRequestDone { get; set; } + + public Dictionary Header => header; + + public byte[] Body => body; + + public PostParams Params { get; set; } + + public JsonData ResponseData { get; private set; } + + public bool IsResourceVersionUpError { get; private set; } + + public bool IsResultSuccess => resultCode == 1; + + public NetworkTask() + { + skipCuteCheckResultCodes = new SkipCuteCheckResultCodes(); + Params = new PostParams(); + } + + public void Initialize() + { + ResponseData = null; + resultCode = 0; + } + + public Dictionary PrepareHeaders() + { + AddHeaderUdid(); + AddHeaderShortUdid(); + AddHeaderSessionId(); + AddHeaderParam(); + AddHeaderDevice(); + AddHeaderAppVersion(); + AddHeaderResVersion(); + AddHeaderDeviceId(); + AddHeaderDeviceName(); + AddHeaderGraphicsDeviceName(); + AddHeaderIpAddress(); + AddHeaderPlatformOsVersion(); + AddHeaderKeyChain(); + AddHeaderIDFA(); + AddHeaderLocale(); + AddHeaderLanguage(); + AddHeaderCountryCode(); + AddHeaderPlatform(); + AddHeaderIsWSS(); + AddHeaderIsIpv6(); + AddHeaderDevAccessSecretKey(); + AddCardMasterHash(); + return header; + } + + public byte[] PreparePostData(bool encrypt = true, bool isUseJson = false) + { + return CreateBody(encrypt, isUseJson); + } + + public void SetResponseData(JsonData data) + { + ResponseData = data; + resultCode = getDataHeader()["result_code"].ToInt(); + } + + public int GetResultCode() + { + return resultCode; + } + + public ERROR_CODE_STATUS CheckResultCodeToPopupCreate_ReturnStatus(int rc = 0) + { + INetworkUI networkUI = Toolbox.NetworkManager.NetworkUI; + if (isAppVersionUP()) + { + RecoveryRecordManagerBase.DeleteRecoveryFile(); + networkUI.OpenGotoStoreErrorPopup(); + return ERROR_CODE_STATUS.ERROR; + } + if (isResourceVersionUp()) + { + IsResourceVersionUpError = true; + setResourceVersion(); + if (!Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.GameStartCheck])) + { + RecoveryRecordManagerBase.DeleteRecoveryFile(); + networkUI.OpenResourceVersionUpPopUp(); + Parse(); + return ERROR_CODE_STATUS.ERROR; + } + } + if (isSessionError()) + { + networkUI.OpenSessionErrorPopUp(); + return ERROR_CODE_STATUS.ERROR; + } + setSession(); + if (isUnknownServerError() || isServerProcessedError() || isServerDataBaseError()) + { + networkUI.OpenStrictServerErrorPopUp(resultCode); + return ERROR_CODE_STATUS.ERROR; + } + if (isAccountBlockError()) + { + networkUI.OpenAccountBlockErrorPopUp(resultCode); + return ERROR_CODE_STATUS.ERROR; + } + if (isNeteaseAccountBlockError()) + { + NtDataTranslateManager.GetInstance().ShowRejectLogin(); + return ERROR_CODE_STATUS.ERROR; + } + if (isAccountLimitedBlockError()) + { + string accountLimitedBlockEndTime = getAccountLimitedBlockEndTime(); + networkUI.OpenAccountLimitedBlockErrorPopUp(resultCode, accountLimitedBlockEndTime); + return ERROR_CODE_STATUS.ERROR; + } + if (IsAllMaintenanceError()) + { + string maintenanceEndTime = getMaintenanceEndTime(); + networkUI.OpenAllMaintenancePopUp(resultCode, maintenanceEndTime); + return ERROR_CODE_STATUS.ERROR_TO_MAINTENANCE_POPUP; + } + if (IsEachFunctionMaintenanceError()) + { + networkUI.OpenEachFunctionMaintenancePopUp(resultCode); + return ERROR_CODE_STATUS.ERROR_TO_MAINTENANCE_POPUP; + } + if (IsCardMaintenanceError()) + { + if (CallbackOnResultCodeError != null) + { + CallbackOnResultCodeError(resultCode); + } + return ERROR_CODE_STATUS.ERROR_TO_MAINTENANCE_POPUP; + } + if (!skipCuteCheckResultCodes.isSkipAll() && !skipCuteCheckResultCodes.Contains(resultCode)) + { + cuteCheckResultCode(); + } + Parse(); + if (isServerResultCodeOK()) + { + if (CallbackOnSuccess != null) + { + CallbackOnSuccess(ResultCode.Success); + } + return ERROR_CODE_STATUS.NONE; + } + if (CallbackOnResultCodeError != null) + { + CallbackOnResultCodeError(resultCode); + return ERROR_CODE_STATUS.ERROR; + } + return ERROR_CODE_STATUS.NONE; + } + + private void cuteCheckResultCode() + { + INetworkUI networkUI = Toolbox.NetworkManager.NetworkUI; + if (networkUI.isCloseDialogGroupError(resultCode)) + { + networkUI.OpenCloseOnlyErrorPopUp(resultCode); + } + else if (!isServerResultCodeOK()) + { + networkUI.OpenOtherServerErrorPopUp(resultCode); + } + } + + protected virtual string getAccountLimitedBlockEndTime() + { + return ResponseData["data"]["account_block_end_time"].ToString(); + } + + protected virtual string getMaintenanceEndTime() + { + if (ResponseData["data"].Count > 0 && ResponseData["data"].Keys.Contains("maintenance_end_time") && ResponseData["data"]["maintenance_end_time"].ToString().Length > 0) + { + return ResponseData["data"]["maintenance_end_time"].ToString(); + } + return ""; + } + + protected virtual string getUdid() + { + return Certification.Udid; + } + + protected virtual byte[] CreateBody(bool encrypt = true, bool isUseJson = false) + { + if (isUseJson) + { + body = _createBodyJson(Params, encrypt); + } + else + { + body = _createBodyMsgpack(Params, encrypt); + } + return body; + } + + protected byte[] _createBodyJson(PostParams Params, bool encrypt = true) + { + byte[] bytes = Encoding.ASCII.GetBytes(JsonMapper.ToJson(Params)); + if (!encrypt) + { + return bytes; + } + return CryptAES.encrypt(bytes); + } + + protected byte[] _createBodyMsgpack(PostParams Params, bool encrypt = true) + { + byte[] array = MessagePackSerializer.FromJson(JsonMapper.ToJson(Params)); + if (!encrypt) + { + return array; + } + return CryptAES.encrypt(array); + } + + protected virtual int Parse() + { + return resultCode; + } + + private void AddHeaderUdid() + { + if (Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.SignUp]) || Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.CheckSpecialTitle]) || Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.CheckiCloudUser]) || Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.MigrateiCloudUser])) + { + string value = Cryptographer.encode(getUdid()); + header["UDID"] = value; + } + } + + private void AddHeaderShortUdid() + { + string value = Cryptographer.encode(Certification.ShortUdid.ToString()); + header["SHORT_UDID"] = value; + } + + private void AddHeaderSessionId() + { + header["SID"] = Certification.SessionId; + } + + private void AddHeaderParam() + { + string udid = getUdid(); + string viewer_id = CryptAES.encrypt(Certification.ViewerId.ToString()); + Params.viewer_id = viewer_id; + Params.steam_id = Certification.SteamID; + Params.steam_session_ticket = Certification.SteamSessionTicket; + string text = Convert.ToBase64String(MessagePackSerializer.FromJson(JsonMapper.ToJson(Params))); + Uri uri = new Uri(Url.Trim()); + string text2 = udid + uri.AbsolutePath + text; + if (Certification.ViewerId != 0) + { + text2 += Certification.ViewerId; + } + string value = Cryptographer.ComputeHash(text2); + header["PARAM"] = value; + } + + private void AddHeaderDevice() + { + header["DEVICE"] = Toolbox.DeviceManager.GetDeviceType().ToString(); + } + + private void AddHeaderAppVersion() + { + header["APP_VER"] = Toolbox.DeviceManager.GetAppVersionName(); + } + + private void AddHeaderResVersion() + { + header["RES_VER"] = Toolbox.SavedataManager.GetResourceVersion(); + } + + private void AddHeaderDeviceId() + { + header["DEVICE_ID"] = Toolbox.DeviceManager.GetDeviceUniqueIdentifier(); + } + + private void AddHeaderDeviceName() + { + header["DEVICE_NAME"] = Uri.EscapeDataString(Toolbox.DeviceManager.GetDeviceName()); + } + + private void AddHeaderGraphicsDeviceName() + { + header["GRAPHICS_DEVICE_NAME"] = Uri.EscapeDataString(Toolbox.DeviceManager.GetGraphicsDeviceName(textureCheck: true)); + } + + private void AddHeaderIpAddress() + { + header["IP_ADDRESS"] = Toolbox.DeviceManager.GetIpAddress(); + } + + private void AddHeaderPlatformOsVersion() + { + header["PLATFORM_OS_VERSION"] = Uri.EscapeDataString(Toolbox.DeviceManager.GetOsVersion()); + } + + private void AddHeaderPlatform() + { + header["PLATFORM"] = CustomPreference.GetPlatform().ToString(); + } + + private void AddHeaderIsWSS() + { + header["WSS"] = (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_SELECT_WSS) ? "1" : "0"); + } + + private void AddHeaderIsIpv6() + { + header["IPV6_CONNECTION"] = (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_SELECT_IPV6) ? "1" : "0"); + } + + private void AddCardMasterHash() + { + string cardMasterHash = CardMasterLocalFileUtility.GetCardMasterHash(); + if (!string.IsNullOrEmpty(cardMasterHash)) + { + header["CARD_MASTER_HASH"] = cardMasterHash; + } + } + + private void AddHeaderDevAccessSecretKey() + { + } + + private void AddHeaderCarrier() + { + header["CARRIER"] = Toolbox.DeviceManager.GetCarrier(); + } + + private void AddHeaderKeyChain() + { + header["KEYCHAIN"] = Certification.GetKeyChainViewerId(); + } + + private void AddHeaderIDFA() + { + header["IDFA"] = Certification.GetIDFA(); + } + + private void AddHeaderLocale() + { + header["LOCALE"] = Toolbox.DeviceManager.GetLocale(); + } + + private void AddHeaderLanguage() + { + string textLanguage = CustomPreference.GetTextLanguage(); + header["LANGUAGE"] = textLanguage; + } + + private void AddHeaderCountryCode() + { + header["REGION_CODE"] = PlayerStaticData.UserRegionCode; + } + + private bool isSessionError() + { + return resultCode == 201; + } + + private bool isUnknownServerError() + { + return resultCode == 102; + } + + private bool isAccountBlockError() + { + return resultCode == 203; + } + + private bool isNeteaseAccountBlockError() + { + return resultCode == 330; + } + + private bool isAccountLimitedBlockError() + { + return resultCode == 217; + } + + private bool isServerProcessedError() + { + return resultCode == 213; + } + + private bool isServerDataBaseError() + { + return resultCode == 100; + } + + public bool isServerResultCodeOK() + { + if (resultCode != 1 && resultCode != 3502) + { + return resultCode == 1768; + } + return true; + } + + private bool IsAllMaintenanceError() + { + return resultCode == 101; + } + + private bool IsEachFunctionMaintenanceError() + { + if (resultCode >= 2000) + { + return resultCode <= 2999; + } + return false; + } + + private bool IsCardMaintenanceError() + { + if (resultCode != 1710) + { + return resultCode == 5013; + } + return true; + } + + private void setSession() + { + JsonData dataHeader = getDataHeader(); + if (dataHeader.Keys.Contains("sid") && dataHeader["sid"] != null && !string.IsNullOrEmpty(dataHeader["sid"].ToString())) + { + Certification.SessionId = dataHeader["sid"].ToString(); + } + } + + private bool isAppVersionUP() + { + if (resultCode == 204) + { + return true; + } + return false; + } + + public void GotoStore() + { + BrowserURL.Open(getDataHeader()["store_url"].ToString()); + } + + private bool isResourceVersionUp() + { + if (getDataHeader().Keys.Contains("required_res_ver")) + { + return true; + } + return false; + } + + private JsonData getDataHeader() + { + return ResponseData["data_headers"]; + } + + private void setResourceVersion() + { + string resourceVersion = getDataHeader()["required_res_ver"].ToString(); + Toolbox.SavedataManager.SetResourceVersion(resourceVersion); + } + + public void AddSkipCuteCheckResultCode(int resultCode) + { + skipCuteCheckResultCodes.Add(resultCode); + } + + public void AddSkipCuteCheckResultCode(List resultCodes) + { + skipCuteCheckResultCodes.Add(resultCodes); + } + + public void SkipAllCuteResultCodeCheckErrorPopup() + { + skipCuteCheckResultCodes.setSkipAll(pSkipAll: true); + } + + public void SkipCuteTimeOutPopup() + { + skipCommonTimeOutPopUp = true; + } + + public bool isSkipCommonTimeOutPopUp() + { + return skipCommonTimeOutPopUp; + } + + public void SkipCuteHttpStatusErrorPopup() + { + skipCommonHttpStatusErrorPopUp = true; + } + + public bool isSkipCommonHttpStatusErrorPopUp() + { + return skipCommonHttpStatusErrorPopUp; + } + + public void ClearSkipCuteCheckResultCode() + { + skipCuteCheckResultCodes.Clear(); + } + + public void SkipAllNetworkChecks() + { + SkipAllCuteResultCodeCheckErrorPopup(); + SkipCuteTimeOutPopup(); + SkipCuteHttpStatusErrorPopup(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PCPlatform.cs b/SVSim.BattleEngine/Engine/Cute/PCPlatform.cs new file mode 100644 index 0000000..9809268 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PCPlatform.cs @@ -0,0 +1,10 @@ +using LitJson; + +namespace Cute; + +public abstract class PCPlatform +{ + public abstract void Parse(JsonData response); + + public abstract PaymentPCStartParams SetParameter(string productId, bool isAlertAgree, bool isAlertActive); +} diff --git a/SVSim.BattleEngine/Engine/Cute/PCPlatformSTEAM.cs b/SVSim.BattleEngine/Engine/Cute/PCPlatformSTEAM.cs new file mode 100644 index 0000000..23363da --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PCPlatformSTEAM.cs @@ -0,0 +1,34 @@ +using LitJson; + +namespace Cute; + +public class PCPlatformSTEAM : PCPlatform +{ + protected PaymentPCStartParamsSTEAM _postParams = new PaymentPCStartParamsSTEAM(); + + public static string State { get; private set; } + + public static string Country { get; private set; } + + public static string Currency { get; private set; } + + public static string Status { get; private set; } + + public override PaymentPCStartParams SetParameter(string productId, bool isAlertAgree, bool isAlertActive) + { + _postParams.product_id = productId; + _postParams.price = PaymentPC.GetInstance().ProductPriceList[productId]; + _postParams.ip_address = Toolbox.DeviceManager.GetIpAddress(); + _postParams.isalertagree = (isAlertAgree ? 1 : 0); + _postParams.isalertactive = (isAlertActive ? 1 : 0); + return _postParams; + } + + public override void Parse(JsonData response) + { + State = response["steam_user_info"]["state"].ToString(); + Country = response["steam_user_info"]["country"].ToString(); + Currency = response["steam_user_info"]["currency"].ToString(); + Status = response["steam_user_info"]["status"].ToString(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/ParallelJob.cs b/SVSim.BattleEngine/Engine/Cute/ParallelJob.cs new file mode 100644 index 0000000..8218399 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/ParallelJob.cs @@ -0,0 +1,36 @@ +using System; + +namespace Cute; + +public class ParallelJob +{ + private Action _action; + + public bool isDone { get; private set; } + + public static ParallelJob Dispatch(Action action) + { + ParallelJob parallelJob = new ParallelJob(action); + LeanThreadPool.Instance.AddJob(parallelJob); + return parallelJob; + } + + private ParallelJob(Action action) + { + isDone = false; + _action = action; + } + + internal void Run() + { + if (!isDone) + { + if (_action != null) + { + _action(); + _action = null; + } + isDone = true; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentCancelTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentCancelTask.cs new file mode 100644 index 0000000..c6a8b71 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentCancelTask.cs @@ -0,0 +1,23 @@ +namespace Cute; + +public class PaymentCancelTask : NetworkTask +{ + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentCancel; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(PaymentSkuInfo skuInfo, string errorMessage) + { + PaymentStartCancelParams paymentStartCancelParams = new PaymentStartCancelParams(); + paymentStartCancelParams.payment.product_id = skuInfo.productId; + paymentStartCancelParams.payment.currency_code = skuInfo.currencyCode; + paymentStartCancelParams.payment.price = skuInfo.price; + paymentStartCancelParams.error.message = errorMessage; + base.Params = paymentStartCancelParams; + } + + protected override int Parse() + { + return base.Parse(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentItemListTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentItemListTask.cs new file mode 100644 index 0000000..6afbf72 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentItemListTask.cs @@ -0,0 +1,64 @@ +using LitJson; + +namespace Cute; + +public class PaymentItemListTask : NetworkTask +{ + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentItemList; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + protected override int Parse() + { + PaymentImpl instance = PaymentImpl.GetInstance(); + resultCode = (int)base.ResponseData["data_headers"]["result_code"]; + if (resultCode != 1) + { + return resultCode; + } + JsonData jsonData = base.ResponseData["data"]; + instance.ProductIdList.Clear(); + instance.IdList.Clear(); + instance.ProductNameList.Clear(); + instance.ProductPriceList.Clear(); + instance.ProductTextList.Clear(); + instance.ProductPurchaseLimitList.Clear(); + instance.ProductPurchaseNumberList.Clear(); + instance.FormatProductPriceList.Clear(); + instance.ProductCsvIdList.Clear(); + instance.ProductImageNameList.Clear(); + instance.ProductIsSpecialShop.Clear(); + instance.ProductCurrentPurchaseCount.Clear(); + instance.ProductPurchaseLimitCount.Clear(); + instance.ProductEndTime.Clear(); + for (int i = 0; i < jsonData.Count; i++) + { + JsonData jsonData2 = jsonData[i]; + string text = jsonData2["store_product_id"].ToString(); + string value = jsonData2["name"].ToString().Replace("\\n", "\n"); + string value2 = jsonData2["text"].ToString(); + string text2 = jsonData2["purchase_limit"].ToString(); + string text3 = jsonData2["id"].ToString(); + string value3 = jsonData2["image_name"].ToString(); + string value4 = jsonData2["end_time"].ToString(); + bool value5 = ((jsonData2["special_shop_flag"].ToInt() != 0) ? true : false); + instance.ProductIdList.Add(text); + instance.IdList.Add(text3); + instance.ProductNameList.Add(text, value); + instance.ProductTextList.Add(text, value2); + instance.ProductPurchaseLimitList.Add(text3, text2); + instance.ProductPurchaseLimitCount.Add(text, int.Parse(text2)); + instance.ProductImageNameList.Add(text, value3); + if (jsonData2.Keys.Contains("number_of_product_purchased") && jsonData2["number_of_product_purchased"] != null) + { + string text4 = jsonData2["number_of_product_purchased"].ToString(); + instance.ProductPurchaseNumberList.Add(text3, text4); + instance.ProductCurrentPurchaseCount.Add(text, int.Parse(text4)); + } + instance.ProductCsvIdList.Add(text, text3); + instance.ProductIsSpecialShop.Add(text, value5); + instance.ProductEndTime.Add(text, value4); + } + return resultCode; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentPCFinishTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentPCFinishTask.cs new file mode 100644 index 0000000..170a064 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentPCFinishTask.cs @@ -0,0 +1,69 @@ +using Wizard; + +namespace Cute; + +public class PaymentPCFinishTask : NetworkTask +{ + public class PaymentPCFinishParams : PostParams + { + public string product_id = ""; + + public string steam_app_id = ""; + + public string steam_order_id = ""; + + public string steam_user_country = ""; + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentPCFinish; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(string ProductId, string StreamAppID = "", string SteamOrderId = "") + { + PaymentPCFinishParams paymentPCFinishParams = new PaymentPCFinishParams(); + paymentPCFinishParams.product_id = ProductId; + paymentPCFinishParams.steam_app_id = StreamAppID; + paymentPCFinishParams.steam_order_id = SteamOrderId; + paymentPCFinishParams.steam_user_country = PCPlatformSTEAM.Country; + base.Params = paymentPCFinishParams; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + if (base.ResponseData["data"].Count > 0) + { + if (base.ResponseData["data"]["purchased_times_data"] != null) + { + Data.Load.data._userCrystalCount._lastPaymentItemBuyNumber = base.ResponseData["data"]["purchased_times_data"]["number_of_product_purchased"].ToInt(); + if (base.ResponseData["data"]["purchased_times_data"].Keys.Contains("csv_data_id")) + { + Data.Load.data._userCrystalCount._lastPaymentId = base.ResponseData["data"]["purchased_times_data"]["csv_data_id"].ToString(); + } + } + else + { + Data.Load.data._userCrystalCount._lastPaymentItemBuyNumber = 0; + Data.Load.data._userCrystalCount._lastPaymentId = null; + } + Data.Load.data._userCrystalCount.total_crystal = base.ResponseData["data"]["after_free_crystal"].ToInt() + base.ResponseData["data"]["after_crystal"].ToInt(); + Data.Load.data._userCrystalCount.free_crystal = base.ResponseData["data"]["after_free_crystal"].ToInt(); + Data.Load.data._userCrystalCount.charge_crystal = base.ResponseData["data"]["after_crystal"].ToInt(); + MyPageMenu.Instance.UpdateCrystalCount(); + if (CreateItemList.GetInstance() != null) + { + CreateItemList.GetInstance().UpdateCrystalCount(); + } + if (GachaUI.GetInstance() != null) + { + GachaUI.GetInstance().UpdateUserItemCount(); + } + } + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentPCItemListTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentPCItemListTask.cs new file mode 100644 index 0000000..08b1054 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentPCItemListTask.cs @@ -0,0 +1,61 @@ +using LitJson; + +namespace Cute; + +public class PaymentPCItemListTask : NetworkTask +{ + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentPCItemList; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + protected override int Parse() + { + PaymentPC instance = PaymentPC.GetInstance(); + resultCode = (int)base.ResponseData["data_headers"]["result_code"]; + if (resultCode != 1) + { + return resultCode; + } + JsonData jsonData = base.ResponseData["data"]; + instance.ProductIdList.Clear(); + instance.IdList.Clear(); + instance.ProductNameList.Clear(); + instance.ProductPriceList.Clear(); + instance.ProductTextList.Clear(); + instance.ProductPurchaseLimitList.Clear(); + instance.FormatProductPriceList.Clear(); + instance.ProductCsvIdList.Clear(); + instance.ProductImageNameList.Clear(); + instance.ProductIsSpecialShop.Clear(); + instance.ProductCurrentPurchaseCount.Clear(); + instance.ProductEndTime.Clear(); + for (int i = 0; i < jsonData.Count; i++) + { + JsonData jsonData2 = jsonData[i]; + string text = jsonData2["store_product_id"].ToString(); + string value = jsonData2["name"].ToString().Replace("\\n", "\n"); + string value2 = jsonData2["text"].ToString(); + string value3 = jsonData2["price"].ToString(); + string text2 = jsonData2["purchase_limit"].ToString(); + string text3 = jsonData2["id"].ToString(); + string value4 = jsonData2["image_name"].ToString(); + string value5 = jsonData2["end_time"].ToString(); + bool value6 = ((jsonData2["special_shop_flag"].ToInt() != 0) ? true : false); + int value7 = jsonData2["purchase_num_current"].ToInt(); + instance.ProductIdList.Add(text); + instance.IdList.Add(text3); + instance.ProductNameList.Add(text, value); + instance.ProductPriceList.Add(text, value3); + instance.FormatProductPriceList.Add(text, value3); + instance.ProductTextList.Add(text, value2); + instance.ProductPurchaseLimitList.Add(text3, text2); + instance.ProductCsvIdList.Add(text, text3); + instance.ProductImageNameList.Add(text, value4); + instance.ProductIsSpecialShop.Add(text, value6); + instance.ProductCurrentPurchaseCount.Add(text, value7); + instance.ProductPurchaseLimitCount.Add(text, int.Parse(text2)); + instance.ProductEndTime.Add(text, value5); + } + return resultCode; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentPCStartParams.cs b/SVSim.BattleEngine/Engine/Cute/PaymentPCStartParams.cs new file mode 100644 index 0000000..7eee27f --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentPCStartParams.cs @@ -0,0 +1,12 @@ +namespace Cute; + +public class PaymentPCStartParams : PostParams +{ + public string product_id = ""; + + public string price = ""; + + public int isalertagree; + + public int isalertactive; +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentPCStartParamsSTEAM.cs b/SVSim.BattleEngine/Engine/Cute/PaymentPCStartParamsSTEAM.cs new file mode 100644 index 0000000..d8792de --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentPCStartParamsSTEAM.cs @@ -0,0 +1,6 @@ +namespace Cute; + +public class PaymentPCStartParamsSTEAM : PaymentPCStartParams +{ + public string ip_address = ""; +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentPCStartTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentPCStartTask.cs new file mode 100644 index 0000000..921443e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentPCStartTask.cs @@ -0,0 +1,42 @@ +namespace Cute; + +public class PaymentPCStartTask : NetworkTask +{ + protected PCPlatform _platform; + + protected CuteNetworkDefine.ApiType _apiType = CuteNetworkDefine.ApiType.PaymentPCStart; + + public PaymentBase.RefundWarningType NeedRefundWarningType { get; private set; } + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[_apiType]}"; + + public PaymentPCStartTask() + { + _platform = new PCPlatformSTEAM(); + } + + public void SetParameter(string ProductId, bool isAlertAgree, bool isAlertActive) + { + base.Params = _platform.SetParameter(ProductId, isAlertAgree, isAlertActive); + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + if (base.ResponseData["data"].Count > 0) + { + _platform.Parse(base.ResponseData["data"]); + NeedRefundWarningType = (PaymentBase.RefundWarningType)base.ResponseData["data"]["refund_penalty_type"].ToInt(); + } + return num; + } + + public PCPlatform getPCPlatform() + { + return _platform; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentStartCancelParams.cs b/SVSim.BattleEngine/Engine/Cute/PaymentStartCancelParams.cs new file mode 100644 index 0000000..4ee8a99 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentStartCancelParams.cs @@ -0,0 +1,26 @@ +namespace Cute; + +public class PaymentStartCancelParams : PostParams +{ + public class PaymentError + { + public string message = ""; + } + + public class Payment + { + public string product_id = ""; + + public string price = ""; + + public string currency_code = ""; + + public int isalertagree; + + public int isalertactive; + } + + public Payment payment = new Payment(); + + public PaymentError error = new PaymentError(); +} diff --git a/SVSim.BattleEngine/Engine/Cute/PaymentStartTask.cs b/SVSim.BattleEngine/Engine/Cute/PaymentStartTask.cs new file mode 100644 index 0000000..78e3b27 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PaymentStartTask.cs @@ -0,0 +1,32 @@ +namespace Cute; + +public class PaymentStartTask : NetworkTask +{ + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.PaymentStart; + + public PaymentBase.RefundWarningType NeedRefundWarningType { get; private set; } + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(PaymentSkuInfo skuInfo, bool isAlertAgree, bool isAlertActive) + { + PaymentStartCancelParams paymentStartCancelParams = new PaymentStartCancelParams(); + paymentStartCancelParams.payment.product_id = skuInfo.productId; + paymentStartCancelParams.payment.currency_code = skuInfo.currencyCode; + paymentStartCancelParams.payment.price = skuInfo.price; + paymentStartCancelParams.payment.isalertagree = (isAlertAgree ? 1 : 0); + paymentStartCancelParams.payment.isalertactive = (isAlertActive ? 1 : 0); + base.Params = paymentStartCancelParams; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + NeedRefundWarningType = (PaymentBase.RefundWarningType)base.ResponseData["data"]["refund_penalty_type"].ToInt(); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PostParams.cs b/SVSim.BattleEngine/Engine/Cute/PostParams.cs new file mode 100644 index 0000000..a0a0da5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PostParams.cs @@ -0,0 +1,10 @@ +namespace Cute; + +public class PostParams +{ + public string viewer_id = ""; + + public ulong steam_id; + + public string steam_session_ticket; +} diff --git a/SVSim.BattleEngine/Engine/Cute/PublistTransitionCode.cs b/SVSim.BattleEngine/Engine/Cute/PublistTransitionCode.cs new file mode 100644 index 0000000..24a461e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PublistTransitionCode.cs @@ -0,0 +1,25 @@ +namespace Cute; + +public class PublistTransitionCode : NetworkTask +{ + public class Email : PostParams + { + public string password { get; set; } + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.GetTransitionCode; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(string password) + { + Email email = new Email(); + email.password = password; + base.Params = email; + } + + protected override int Parse() + { + return base.Parse(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/QualityManager.cs b/SVSim.BattleEngine/Engine/Cute/QualityManager.cs new file mode 100644 index 0000000..dd31f73 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/QualityManager.cs @@ -0,0 +1,340 @@ +using System.Collections; +using UnityEngine; + +namespace Cute; + +public class QualityManager : MonoBehaviour, IManager +{ + public enum GPUQualityLevel + { + Level_1, + Level_2, + Level_3, + Level_4 + } + + public enum AssetQualityLevel + { + None, + Level_1, + Level_2, + Max + } + + public enum SoundQualityLevel + { + None, + Level_1, + Level_2, + Max + } + + public enum MovieQualityLevel + { + None, + Level_1, + Level_2, + Max + } + + public enum MemoryQualityLevel + { + Level_1, + Level_2 + } + + public enum GameQualityLevel + { + Level_1, + Level_2, + Level_3, + Level_4 + } + + public enum OutLineLevel + { + OutLine_On, + OutLine_Off + } + + private GPUQualityLevel _gpuQualityLevel; + + private AssetQualityLevel _assetQualityLevel; + + private SoundQualityLevel _soundQualityLevel; + + private MovieQualityLevel _movieQualityLevel; + + private MemoryQualityLevel _memoryQualityLevel; + + private Vector2 _deviceResolution = Vector2.zero; + + private Vector2 _gameResolution = Vector2.zero; + + private int _defaultFrameRate = 60; + + private bool _isDeviceResolutionSetting; + + public bool isFullScreen; + + private GameQualityLevel _gameQualityLevel; + + private OutLineLevel _outlineLevel; + + public Vector2 deviceResolution => _deviceResolution; + + public Vector2 gameResolution => _gameResolution; + + private void Awake() + { + UpdateFromUnity(); + } + + private IEnumerator Start() + { + while (Toolbox.SavedataManager == null) + { + yield return 0; + } + Initialize(); + Toolbox.QualityManager = this; + } + + private void OnDestroy() + { + } + + public void Initialize() + { + CheckGPUQuality(); + CheckMemoryQuality(); + CheckAssetQuality(); + CheckSoundQuality(); + CheckMovieQuality(); + InitializeGameQuality(); + } + + private void CheckGPUQuality() + { + _gpuQualityLevel = GPUQualityLevel.Level_4; + } + + private void CheckMemoryQuality() + { + _memoryQualityLevel = MemoryQualityLevel.Level_2; + } + + private void CheckAssetQuality() + { + _assetQualityLevel = ((_memoryQualityLevel == MemoryQualityLevel.Level_1) ? AssetQualityLevel.Level_1 : AssetQualityLevel.Level_2); + SetAssetQualityLevel(_assetQualityLevel); + } + + private void CheckSoundQuality() + { + int num = Toolbox.SavedataManager.GetInt("SOUNDQUALIY"); + if (num != 0) + { + _soundQualityLevel = (SoundQualityLevel)num; + } + else + { + _soundQualityLevel = ((_memoryQualityLevel == MemoryQualityLevel.Level_1) ? SoundQualityLevel.Level_1 : SoundQualityLevel.Level_2); + } + SetSoundQualityLevel(_soundQualityLevel); + } + + private void CheckMovieQuality() + { + _movieQualityLevel = ((_memoryQualityLevel == MemoryQualityLevel.Level_1) ? MovieQualityLevel.Level_1 : MovieQualityLevel.Level_2); + } + + public static GPUQualityLevel GetGPUQualityLevel() + { + if (Toolbox.QualityManager == null) + { + return GPUQualityLevel.Level_1; + } + return Toolbox.QualityManager._gpuQualityLevel; + } + + public static MemoryQualityLevel GetMemoryQualityLevel() + { + if (Toolbox.QualityManager == null) + { + return MemoryQualityLevel.Level_1; + } + return Toolbox.QualityManager._memoryQualityLevel; + } + + public static void SetAssetQualityLevel(AssetQualityLevel _AssetQualityLevel) + { + if (Toolbox.QualityManager != null) + { + Toolbox.QualityManager._assetQualityLevel = _AssetQualityLevel; + } + } + + public static AssetQualityLevel GetAssetQualityLevel() + { + if (Toolbox.QualityManager == null) + { + return AssetQualityLevel.Level_1; + } + return Toolbox.QualityManager._assetQualityLevel; + } + + public static void SetSoundQualityLevel(SoundQualityLevel _SoundQualityLevel) + { + if (Toolbox.QualityManager != null) + { + Toolbox.QualityManager._soundQualityLevel = _SoundQualityLevel; + Toolbox.SavedataManager.SetInt("SOUNDQUALIY", (int)Toolbox.QualityManager._soundQualityLevel); + } + } + + public static SoundQualityLevel GetSoundQualityLevel() + { + if (Toolbox.QualityManager == null) + { + return SoundQualityLevel.Level_1; + } + return Toolbox.QualityManager._soundQualityLevel; + } + + public static void SetMovieQualityLevel(MovieQualityLevel _MovieQualityLevel) + { + if (Toolbox.QualityManager != null) + { + Toolbox.QualityManager._movieQualityLevel = _MovieQualityLevel; + } + } + + public static MovieQualityLevel GetMovieQualityLevel() + { + if (Toolbox.QualityManager == null) + { + return MovieQualityLevel.Level_1; + } + return Toolbox.QualityManager._movieQualityLevel; + } + + public void LimitResolution() + { + _gameResolution = _deviceResolution; + if (_deviceResolution.x > 1280f || _deviceResolution.y > 1280f) + { + float num = 1280f / _deviceResolution.x; + _gameResolution = new Vector2(_deviceResolution.x * num, _deviceResolution.y * num); + Screen.SetResolution((int)_gameResolution.x, (int)_gameResolution.y, isFullScreen); + } + } + + public void ChangeResolution(float rate, bool saveratio = true) + { + LimitResolution(); + float num = _gameResolution.x * rate / _gameResolution.x; + _gameResolution = new Vector2(_gameResolution.x * num, _gameResolution.y * num); + Screen.SetResolution((int)_gameResolution.x, (int)_gameResolution.y, isFullScreen); + } + + public void ChangeResolutionToDeviceSetting() + { + _gameResolution = _deviceResolution; + Screen.SetResolution((int)_gameResolution.x, (int)_gameResolution.y, isFullScreen); + } + + public void ChangeResolution(float width, float height, bool fullscreen) + { + if (width == 0f || height == 0f) + { + width = Screen.width; + height = Screen.height; + } + isFullScreen = fullscreen; + _deviceResolution = new Vector2(width, height); + Screen.SetResolution((int)width, (int)height, fullscreen); + } + + private void InitializeGameQuality() + { + if (_gpuQualityLevel == GPUQualityLevel.Level_4) + { + _gameQualityLevel = GameQualityLevel.Level_4; + } + else if (_gpuQualityLevel == GPUQualityLevel.Level_3) + { + _gameQualityLevel = GameQualityLevel.Level_3; + } + else if (_gpuQualityLevel == GPUQualityLevel.Level_2) + { + _gameQualityLevel = GameQualityLevel.Level_2; + } + else + { + _gameQualityLevel = GameQualityLevel.Level_1; + } + if (_memoryQualityLevel == MemoryQualityLevel.Level_1) + { + _gameQualityLevel = GameQualityLevel.Level_1; + } + if (!_isDeviceResolutionSetting) + { + _deviceResolution = new Vector2(Screen.width, Screen.height); + _isDeviceResolutionSetting = true; + } + if (_gpuQualityLevel <= GPUQualityLevel.Level_2 && Toolbox.SavedataManager.GetInt("SOUNDQUALIY") == 0) + { + SetSoundQualityLevel(SoundQualityLevel.Level_1); + } + DecideDeviceSetting(); + } + + private void DecideDeviceSetting() + { + string graphicsDeviceName = SystemInfo.graphicsDeviceName; + if (graphicsDeviceName.Contains("PowerVR") && graphicsDeviceName.Contains("SGX 540")) + { + _outlineLevel = OutLineLevel.OutLine_Off; + } + } + + public void SetGameQualityLevel(GPUQualityLevel level) + { + _gpuQualityLevel = level; + } + + public GameQualityLevel GetGameQualityLevel() + { + return _gameQualityLevel; + } + + public void SetFrameRate(int frameRate) + { + _defaultFrameRate = frameRate; + } + + public int GetFrameRate() + { + return _defaultFrameRate; + } + + public void ChangeResolutionFixedHalf() + { + } + + public void ChangeResolutionFixedBack() + { + } + + public OutLineLevel GetOutLineLevel() + { + return _outlineLevel; + } + + public void UpdateFromUnity() + { + isFullScreen = Screen.fullScreen; + _deviceResolution = new Vector2(Screen.width, Screen.height); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/ResourcesManager.cs b/SVSim.BattleEngine/Engine/Cute/ResourcesManager.cs new file mode 100644 index 0000000..79c04a0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/ResourcesManager.cs @@ -0,0 +1,1707 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class ResourcesManager : MonoBehaviour, IManager +{ + public enum AssetLoadPathType + { + Master, + MasterEtc, + CharaMaster, + Tutorial, + StoryTutorial, + StoryParam, + StoryParamDiff, + StoryText, + StoryMovieSubtitles, + StoryCharacter, + StoryBackground, + StoryEndingStill, + StorySubChapterBtnTexture, + StoryChapterHeader, + StorySelectWorldPanel, + HandCard, + HandCardSpecular, + CardFrame, + CardFrameClassIcon, + CardDeco, + SleeveTexture, + SleeveTextureMask, + SleeveTextureBasePath, + SleeveTextureAORefSpec, + SleeveTextureNormalMap, + SleeveMaterial, + SleeveMesh, + SleeveSpecular, + CardFrameMesh, + CardFrameMaterial, + CardFrameMaterialPlus, + CardFrameTextureCommon, + FoilTextures, + UnitCardMaterial, + UnitCardTextures, + SpellCardMaterial, + SpellCardTextures, + Effect2D, + Effect2DMaterials, + Effect3D, + Effect3DAnim, + Effect3DMat, + Emblem_S, + Emblem_M, + Degree_S, + Degree_M, + DegreeMaterial_S, + DegreeMaterial_M, + DegreeMask, + RankIcon_S, + RankIcon_L, + Country_S, + Country_M, + Font, + DeckListTexture, + DeckEditBGTexture, + ClassCharaSpine, + ClassCharaBase, + ClassCharaBaseWin, + ClassCharaBaseLose, + ClassCharaEvolve, + ClassCharaEvolveWin, + ClassCharaEvolveLose, + ClassCharaHeader, + ClassCharaSkinThumbnail, + ClassCharaWideThumbnail, + ClassCharaButton, + ClassCharaIconLevel, + ClassCharaEncampment, + ClassCharaMesh, + ClassCharaMaterial, + ClassCharaMaterialMain, + ClassCharaTexture, + ClassCharaFrameTexture, + ClassCharaProfile, + ClassCharaStory, + ClassChara3D, + AreaSelectTexture, + GachaTexture, + ShopCardPack, + ShopBuildDeckThumbnail, + ShopBuildDeck, + ShopSleeve, + ShopClassSkin, + ShopItem, + BattleTexture, + BattleLangTexture, + Field3D, + Background, + CardMenu, + BossRushSpecialCard, + FirstTips, + Arena, + Item, + Lottery, + UiOtherTexture, + UilangOtherTexture, + UiStory, + UiStorySectionSummary, + PackBox, + UnitHeader, + OtherHeader, + UiDownLoad, + UiDownLoadInfo, + SpecialCrystal, + GrandPrixSpecialAtlas, + QuestAtlas, + Stamp, + Uilang3DField, + BattlePass, + BattleStage, + Bingo, + PracticePuzzleThumbnail, + NeutralVote, + NeutralVoteThumbnail_S, + NeutralVoteThumbnail_M, + LeaderVote, + LeaderVoteThumbnail_S, + UISpine, + FlowChart, + MyPageBackGround, + MyPageCharacter, + MyPageCharacterMask, + MyPageBackGroundIcon, + MyPageBackGroundRandomSelectIcon, + Competition, + FreeCardPack, + SpecialTitle + } + + private enum ProgressDebugType + { + Progress_NONE, + Progress_DOWNLOAD, + Progress_LOAD + } + + public enum BackgroundDownloadState + { + None, + Init, + Download, + StopRequest + } + + public enum StopResult + { + Paused, + Stopped, + Finished + } + + public List Card3DAssetPathList = new List(); + + public List Card2DAssetPathList = new List(); + + public List CardListAssetPathList = new List(); + + public List SleeveListAssetPathList = new List(); + + public List BattleListAssetPathList = new List(); + + private bool downloadSemaphore; + + private AssetRequestContext downloadRequestContext = new AssetRequestContext(null, new Utility.LeanSemaphore(0), new AssetErrorState()); + + private bool loadSemaphore; + + private AssetRequestContext loadRequestContext = new AssetRequestContext(null, new Utility.LeanSemaphore(0), new AssetErrorState()); + + private bool useAssetBundle = true; + + public static int fixedParallelTasks; + + private int _preferredParallelLoadTasks = -1; + + private int _preferredParallelDownloadTasks = -1; + + private List downloadList; + + public BackgroundDownloadState BgDownloadState; + + private bool _stopForMovie; + + public static float TextureScaleRatio + { + get + { + if (QualityManager.GetAssetQualityLevel() == QualityManager.AssetQualityLevel.Level_1) + { + return 2f; + } + return 1f; + } + } + + public static float AtlasValueRatio + { + get + { + if (QualityManager.GetAssetQualityLevel() == QualityManager.AssetQualityLevel.Level_1) + { + return 0.5f; + } + return 1f; + } + } + + public string GetAssetTypePath(string path, AssetLoadPathType type, bool isfetch = false) + { + if (string.IsNullOrEmpty(path)) + { + return ""; + } + string result = ""; + int result2 = 0; + if (isfetch) + { + switch (type) + { + case AssetLoadPathType.Master: + result = "Master/" + path; + break; + case AssetLoadPathType.MasterEtc: + result = "Master/etc/" + path; + break; + case AssetLoadPathType.CharaMaster: + result = "Master/chara/" + path; + break; + case AssetLoadPathType.Tutorial: + result = "Tutorial/TutorialTextureAtlas/" + path; + break; + case AssetLoadPathType.StoryTutorial: + result = "Storylang/StoryTutorialTextureAtlas/" + path; + break; + case AssetLoadPathType.StoryParam: + result = "Story/Param/" + path; + break; + case AssetLoadPathType.StoryParamDiff: + result = "Storylang/ParamDiff/" + path; + break; + case AssetLoadPathType.StoryText: + result = "Storylang/Text/" + path; + break; + case AssetLoadPathType.StoryMovieSubtitles: + result = "Storylang/MovieSubtitles/" + path; + break; + case AssetLoadPathType.StoryCharacter: + result = "Story/Character/" + path; + break; + case AssetLoadPathType.StoryBackground: + result = "Story/Background/" + path; + break; + case AssetLoadPathType.StoryEndingStill: + result = "Story/EndingStill/" + path; + break; + case AssetLoadPathType.HandCard: + result = "Card/CardFrame/HandCard/" + path; + break; + case AssetLoadPathType.HandCardSpecular: + result = "Card/CardFrame/HandCardSpecular/" + path; + break; + case AssetLoadPathType.CardFrame: + result = "Card/CardFrame/" + path; + break; + case AssetLoadPathType.CardFrameClassIcon: + result = "Card/CardFrame/ClassIcon/" + path; + break; + case AssetLoadPathType.CardFrameMesh: + result = "Card/Common/Frame/Meshes/" + path; + break; + case AssetLoadPathType.CardFrameMaterial: + result = "Card/Common/Frame/" + path + "/" + path; + break; + case AssetLoadPathType.CardFrameMaterialPlus: + result = "Card/Common/Frame/Materials/" + path; + break; + case AssetLoadPathType.CardFrameTextureCommon: + result = "Card/Common/Frame/Textures/" + path; + break; + case AssetLoadPathType.FoilTextures: + result = "Card/Common/Foil/Textures/" + path; + break; + case AssetLoadPathType.UnitCardMaterial: + result = "Card/Field/Materials/" + path; + break; + case AssetLoadPathType.UnitCardTextures: + result = "Card/Field/Textures/" + path; + break; + case AssetLoadPathType.SpellCardMaterial: + result = "Card/Spell/Materials/" + path; + break; + case AssetLoadPathType.SpellCardTextures: + result = "Card/Spell/Textures/" + path; + break; + case AssetLoadPathType.UnitHeader: + result = "Card/Field/Header/log_" + path; + break; + case AssetLoadPathType.OtherHeader: + result = "Card/Spell/Header/log_" + path; + break; + case AssetLoadPathType.Effect2D: + result = "Effect/Effects/" + path; + break; + case AssetLoadPathType.Effect2DMaterials: + result = "Effect/Images/Materials/" + path; + break; + case AssetLoadPathType.Effect3D: + result = "Effect/FBX/" + path; + break; + case AssetLoadPathType.Effect3DAnim: + result = "Effect/FBX/" + path + "/Motions/"; + break; + case AssetLoadPathType.Effect3DMat: + result = "Effect/FBX/" + path + "/Materials/"; + break; + case AssetLoadPathType.Emblem_S: + result = "Ui/Emblem/S/" + Data.Master.EmblemMgr.GetResourcePath(long.Parse(path)) + "_s"; + break; + case AssetLoadPathType.Emblem_M: + result = "Ui/Emblem/M/" + Data.Master.EmblemMgr.GetResourcePath(long.Parse(path)) + "_m"; + break; + case AssetLoadPathType.Degree_S: + result = "Uilang/Degree/S/" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_s"; + break; + case AssetLoadPathType.DegreeMaterial_S: + result = "Uilang/Degree/Materials/" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_s_M"; + break; + case AssetLoadPathType.Degree_M: + result = "Uilang/Degree/M/" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_m"; + break; + case AssetLoadPathType.DegreeMaterial_M: + result = "Uilang/Degree/Materials/" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_m_M"; + break; + case AssetLoadPathType.DegreeMask: + result = "Uilang/Degree/Masks/" + Data.Master.DegreeMgr.GetMaskTexturePath(int.Parse(path)); + break; + case AssetLoadPathType.RankIcon_S: + result = "Uilang/RankIcon/S/icon_rank_" + path + "_s"; + break; + case AssetLoadPathType.RankIcon_L: + result = "Uilang/RankIcon/L/icon_rank_" + path + "_l"; + break; + case AssetLoadPathType.Country_S: + result = "Ui/Country/S/country_" + path + "_s"; + break; + case AssetLoadPathType.Country_M: + result = "Ui/Country/M/country_" + path + "_m"; + break; + case AssetLoadPathType.DeckListTexture: + result = $"Ui/TextureAtlas/DeckListTextureAtlas/btn_deck_{int.Parse(path):D2}"; + break; + case AssetLoadPathType.DeckEditBGTexture: + result = "Ui/TextureAtlas/DeckListTextureAtlas/" + path; + break; + case AssetLoadPathType.ClassCharaSpine: + result = "Ui/ClassChar/Prefab/class_" + path; + break; + case AssetLoadPathType.ClassCharaBase: + result = ((!int.TryParse(path, out result2)) ? $"Ui/ClassChar/Textures/Base/class_{path}_base" : $"Ui/ClassChar/Textures/Base/class_{result2:D2}_base"); + break; + case AssetLoadPathType.ClassCharaBaseWin: + result = "Ui/ClassChar/Textures/Base/class_" + path + "_base_win"; + break; + case AssetLoadPathType.ClassCharaBaseLose: + result = "Ui/ClassChar/Textures/Base/class_" + path + "_base_lose"; + break; + case AssetLoadPathType.ClassCharaEvolve: + result = ((!int.TryParse(path, out result2)) ? $"Ui/ClassChar/Textures/Base/class_{path}_base_evolve" : $"Ui/ClassChar/Textures/Base/class_{result2:D2}_base_evolve"); + break; + case AssetLoadPathType.ClassCharaEvolveWin: + result = "Ui/ClassChar/Textures/Base/class_" + path + "_base_evolve_win"; + break; + case AssetLoadPathType.ClassCharaEvolveLose: + result = "Ui/ClassChar/Textures/Base/class_" + path + "_base_evolve_lose"; + break; + case AssetLoadPathType.ClassCharaHeader: + result = "Ui/ClassChar/Textures/Header/" + path; + break; + case AssetLoadPathType.ClassCharaSkinThumbnail: + result = $"Ui/ClassChar/Textures/SkinThumbnail/class_skin_{int.Parse(path):D2}"; + break; + case AssetLoadPathType.ClassCharaWideThumbnail: + { + int result5 = 0; + result = ((!int.TryParse(path, out result5)) ? $"Ui/ClassChar/Textures/WideThumbnail/chara_select_thumbnail_wide_class_{path}" : $"Ui/ClassChar/Textures/WideThumbnail/chara_select_thumbnail_wide_class_{result5:D2}"); + break; + } + case AssetLoadPathType.ClassCharaButton: + { + int result4 = 0; + result = ((!int.TryParse(path, out result4)) ? $"Ui/ClassChar/Textures/Button/class_select_thumbnail_{path}" : $"Ui/ClassChar/Textures/Button/class_select_thumbnail_{result4:D2}"); + break; + } + case AssetLoadPathType.PracticePuzzleThumbnail: + { + result = ((!int.TryParse(path, out var result3)) ? $"Ui/Puzzle/Thumbnail/puzzle_thumbnail_{path}" : $"Ui/Puzzle/Thumbnail/puzzle_thumbnail_{result3:D2}"); + break; + } + case AssetLoadPathType.ClassCharaIconLevel: + result = "Ui/ClassChar/Textures/Icon/class_" + path + "_level"; + break; + case AssetLoadPathType.ClassCharaEncampment: + result = "Ui/ClassChar/Textures/Encampment/class_" + path + "_encampment"; + break; + case AssetLoadPathType.ClassCharaMesh: + result = "Ui/ClassChar/Meshes/" + path; + break; + case AssetLoadPathType.ClassCharaMaterial: + result = "Ui/ClassChar/Materials/" + path; + break; + case AssetLoadPathType.ClassCharaMaterialMain: + result = "Ui/ClassChar/Materials/Main/" + path; + break; + case AssetLoadPathType.ClassCharaTexture: + result = "Ui/ClassChar/Textures/" + path; + break; + case AssetLoadPathType.ClassCharaFrameTexture: + result = "Ui/ClassChar/Textures/Frame/" + path; + break; + case AssetLoadPathType.ClassCharaProfile: + result = "Ui/ClassChar/Textures/Profile/" + path; + break; + case AssetLoadPathType.ClassCharaStory: + result = $"Ui/ClassChar/Textures/Story/class_{int.Parse(path):D2}_story"; + break; + case AssetLoadPathType.ClassChara3D: + result = "Ui/Class3dChar/Prehab/" + path + "/chr" + path; + break; + case AssetLoadPathType.AreaSelectTexture: + result = "Ui/TextureAtlas/AreaSelectTextureAtlas/" + path; + break; + case AssetLoadPathType.GachaTexture: + result = "Ui/TextureAtlas/GachaTextureAtlas/" + path; + break; + case AssetLoadPathType.ShopCardPack: + result = "Uilang/Shop/CardPack/" + path; + break; + case AssetLoadPathType.ShopBuildDeck: + result = "Uilang/Shop/BuildDeck/" + path; + break; + case AssetLoadPathType.ShopBuildDeckThumbnail: + result = "Uilang/Shop/BuildDeck/build_deck_thumbnail_" + path; + break; + case AssetLoadPathType.ShopSleeve: + result = "Uilang/Shop/Sleeve/" + path; + break; + case AssetLoadPathType.ShopClassSkin: + result = "Uilang/Shop/ClassSkin/" + path; + break; + case AssetLoadPathType.ShopItem: + result = "Uilang/Shop/Ticket/" + path; + break; + case AssetLoadPathType.CardDeco: + result = "Sleeve/CardDeco/" + path; + break; + case AssetLoadPathType.SleeveTexture: + result = "Sleeve/Textures/" + Data.Master.SleeveMgr.GetResourcePath(long.Parse(path)).ToString(); + break; + case AssetLoadPathType.SleeveTextureMask: + { + Sleeve sleeve = Data.Master.SleeveMgr.Get(long.Parse(path)); + result = ((!sleeve.IsPremiumSleeve) ? string.Empty : ("Sleeve/Masks/sleeve_mask_" + sleeve.sleeve_id)); + break; + } + case AssetLoadPathType.SleeveTextureBasePath: + result = "Sleeve/Textures/" + path; + break; + case AssetLoadPathType.SleeveTextureAORefSpec: + result = "Sleeve/Textures/sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_a"; + break; + case AssetLoadPathType.SleeveTextureNormalMap: + result = "Sleeve/Textures/sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_n"; + break; + case AssetLoadPathType.SleeveMaterial: + result = "Sleeve/Materials/sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_M"; + break; + case AssetLoadPathType.SleeveMesh: + result = "Sleeve/Meshes/" + path; + break; + case AssetLoadPathType.SleeveSpecular: + result = "Sleeve/Meshes/Materials/" + path; + break; + case AssetLoadPathType.BattleTexture: + result = "Ui/TextureAtlas/BattleTextureAtlas/" + path; + break; + case AssetLoadPathType.BattleLangTexture: + result = "Uilang/TextureAtlas/BattleLangTextureAtlas/" + path; + break; + case AssetLoadPathType.Field3D: + result = "Bg/" + path + "/_Battle" + path; + break; + case AssetLoadPathType.Font: + result = "Ui/Fonts/" + path; + break; + case AssetLoadPathType.Background: + result = "Ui/Background/" + path; + break; + case AssetLoadPathType.CardMenu: + result = "Ui/CardMenu/" + path; + break; + case AssetLoadPathType.BossRushSpecialCard: + result = "Ui/BossRush/boss_rush_" + path; + break; + case AssetLoadPathType.FirstTips: + result = "Uilang/FirstTips/" + path; + break; + case AssetLoadPathType.Arena: + result = "Ui/TextureAtlas/ArenaTextureAtlas/" + path; + break; + case AssetLoadPathType.Item: + result = "Ui/Item/" + path; + break; + case AssetLoadPathType.Lottery: + result = "Ui/Lottery/" + path; + break; + case AssetLoadPathType.UiOtherTexture: + result = "Ui/Other/" + path; + break; + case AssetLoadPathType.UilangOtherTexture: + result = "Uilang/Other/" + path; + break; + case AssetLoadPathType.UiStory: + result = "Ui/Story/" + path; + break; + case AssetLoadPathType.UiStorySectionSummary: + result = "Ui/Story/SectionSummary/" + path; + break; + case AssetLoadPathType.StorySubChapterBtnTexture: + result = "Ui/Story/StorySelect/" + path; + break; + case AssetLoadPathType.StoryChapterHeader: + result = "Ui/Story/ChapterHeader/" + path; + break; + case AssetLoadPathType.StorySelectWorldPanel: + result = "Ui/Story/StorySelectWorldPanel/" + path; + break; + case AssetLoadPathType.BattlePass: + result = "Ui/BattlePass/" + path; + break; + case AssetLoadPathType.BattleStage: + result = "Ui/BattleStage/" + path; + break; + case AssetLoadPathType.PackBox: + result = "PackBox/prefab/" + path; + break; + case AssetLoadPathType.UiDownLoad: + result = "UiDownload/" + path; + break; + case AssetLoadPathType.UiDownLoadInfo: + result = "UiDownload/Info/" + path; + break; + case AssetLoadPathType.SpecialCrystal: + result = "Uilang/LegendCrystal/" + path; + break; + case AssetLoadPathType.GrandPrixSpecialAtlas: + result = "Ui/TextureAtlas/GrandPrixSpecial/" + path; + break; + case AssetLoadPathType.QuestAtlas: + result = "Ui/TextureAtlas/Quest/Quest"; + break; + case AssetLoadPathType.Stamp: + result = "Uilang/Stamp/stamp_" + path; + break; + case AssetLoadPathType.Uilang3DField: + result = "Uilang/3DField/" + path; + break; + case AssetLoadPathType.Bingo: + result = "Ui/Bingo/" + path; + break; + case AssetLoadPathType.NeutralVote: + result = "Ui/PopularityVote/Neutral/neutral_vote_" + path; + break; + case AssetLoadPathType.NeutralVoteThumbnail_S: + result = "Ui/PopularityVote/Neutral/Thumbnail_S/neutral_vote_thumb_" + path + "_s"; + break; + case AssetLoadPathType.NeutralVoteThumbnail_M: + result = "Ui/PopularityVote/Neutral/Thumbnail_M/neutral_vote_thumb_" + path + "_m"; + break; + case AssetLoadPathType.LeaderVote: + result = "Ui/PopularityVote/Leader/leader_vote_" + path; + break; + case AssetLoadPathType.LeaderVoteThumbnail_S: + result = "Ui/PopularityVote/Leader/Thumbnail_S/leader_vote_thumb_" + path + "_s"; + break; + case AssetLoadPathType.UISpine: + result = "Ui/UISpine/Prefab/" + path.Replace("_body", "") + "/" + path; + break; + case AssetLoadPathType.FlowChart: + result = "Ui/FlowChart/" + path; + break; + case AssetLoadPathType.MyPageBackGround: + result = "Ui/MyPageBackGround/bg_mypage_" + path; + break; + case AssetLoadPathType.MyPageCharacter: + result = "Ui/MyPageCharacter/" + path + "/" + path + "_mypage"; + break; + case AssetLoadPathType.MyPageCharacterMask: + result = "Ui/MyPageCharacter/" + path + "/" + path + "_mypage_mask"; + break; + case AssetLoadPathType.MyPageBackGroundIcon: + result = "Ui/MyPageBackGroundIcon/mypage_bg_icon_" + path; + break; + case AssetLoadPathType.MyPageBackGroundRandomSelectIcon: + result = "Ui/MyPageBackGroundIcon/mypage_bg_random_icon_" + path; + break; + case AssetLoadPathType.Competition: + result = "Ui/Competition/" + path; + break; + case AssetLoadPathType.FreeCardPack: + result = "Ui/FreeCardPack/" + path; + break; + case AssetLoadPathType.SpecialTitle: + result = "Ui/SpecialTitle/" + path + "/special_title_" + path; + break; + } + } + else + { + switch (type) + { + case AssetLoadPathType.Master: + case AssetLoadPathType.MasterEtc: + case AssetLoadPathType.CharaMaster: + result = "master_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.StoryParam: + case AssetLoadPathType.StoryCharacter: + case AssetLoadPathType.StoryBackground: + case AssetLoadPathType.StoryEndingStill: + result = "story_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.StoryTutorial: + case AssetLoadPathType.StoryParamDiff: + case AssetLoadPathType.StoryText: + case AssetLoadPathType.StoryMovieSubtitles: + result = "storylang_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.HandCard: + case AssetLoadPathType.HandCardSpecular: + case AssetLoadPathType.CardFrame: + case AssetLoadPathType.CardFrameClassIcon: + case AssetLoadPathType.CardDeco: + case AssetLoadPathType.SleeveTextureBasePath: + case AssetLoadPathType.SleeveMesh: + case AssetLoadPathType.SleeveSpecular: + case AssetLoadPathType.CardFrameMesh: + case AssetLoadPathType.CardFrameMaterial: + case AssetLoadPathType.CardFrameMaterialPlus: + case AssetLoadPathType.CardFrameTextureCommon: + case AssetLoadPathType.FoilTextures: + case AssetLoadPathType.UnitHeader: + case AssetLoadPathType.OtherHeader: + result = "card_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.SleeveMaterial: + result = "card_sleeve_" + Data.Master.SleeveMgr.Get(long.Parse(path)).sleeve_id + "_m.unity3d"; + break; + case AssetLoadPathType.SleeveTexture: + result = "card_sleeve_" + Data.Master.SleeveMgr.Get(long.Parse(path)).sleeve_id + ".unity3d"; + break; + case AssetLoadPathType.SleeveTextureMask: + { + Sleeve sleeve2 = Data.Master.SleeveMgr.Get(long.Parse(path)); + result = ((!sleeve2.IsPremiumSleeve) ? string.Empty : ("card_sleeve_mask_" + sleeve2.sleeve_id + ".unity3d")); + break; + } + case AssetLoadPathType.SleeveTextureAORefSpec: + result = "card_sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_a.unity3d"; + break; + case AssetLoadPathType.SleeveTextureNormalMap: + result = "card_sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_n.unity3d"; + break; + case AssetLoadPathType.UnitCardMaterial: + case AssetLoadPathType.UnitCardTextures: + case AssetLoadPathType.SpellCardMaterial: + case AssetLoadPathType.SpellCardTextures: + result = "card_" + path.ToLower() + "0.unity3d"; + break; + case AssetLoadPathType.Effect2D: + case AssetLoadPathType.Effect2DMaterials: + case AssetLoadPathType.Effect3D: + case AssetLoadPathType.Effect3DAnim: + case AssetLoadPathType.Effect3DMat: + result = "effect_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.Emblem_S: + result = "ui_" + Data.Master.EmblemMgr.GetResourcePath(long.Parse(path)) + "_s.unity3d"; + break; + case AssetLoadPathType.Emblem_M: + result = "ui_" + Data.Master.EmblemMgr.GetResourcePath(long.Parse(path)) + "_m.unity3d"; + break; + case AssetLoadPathType.Degree_S: + result = "uilang_" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_s.unity3d"; + break; + case AssetLoadPathType.DegreeMaterial_S: + result = "uilang_" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_s_m.unity3d"; + break; + case AssetLoadPathType.Degree_M: + result = "uilang_" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_m.unity3d"; + break; + case AssetLoadPathType.DegreeMaterial_M: + result = "uilang_" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_m_m.unity3d"; + break; + case AssetLoadPathType.DegreeMask: + result = "uilang_" + Data.Master.DegreeMgr.GetMaskTexturePath(int.Parse(path)) + ".unity3d"; + break; + case AssetLoadPathType.RankIcon_S: + result = "uilang_icon_rank_" + path + "_s.unity3d"; + break; + case AssetLoadPathType.RankIcon_L: + result = "uilang_icon_rank_" + path + "_l.unity3d"; + break; + case AssetLoadPathType.Country_S: + result = "ui_country_" + path.ToLower() + "_s.unity3d"; + break; + case AssetLoadPathType.Country_M: + result = "ui_country_" + path.ToLower() + "_m.unity3d"; + break; + case AssetLoadPathType.DeckListTexture: + result = $"ui_btn_deck_{int.Parse(path):D2}.unity3d"; + break; + case AssetLoadPathType.DeckEditBGTexture: + result = "ui_" + path + ".unity3d"; + break; + case AssetLoadPathType.ClassCharaSpine: + result = "ui_class_" + path + ".unity3d"; + break; + case AssetLoadPathType.ClassCharaBase: + result = ((!int.TryParse(path, out result2)) ? $"ui_class_{path}_base.unity3d" : $"ui_class_{result2:D2}_base.unity3d"); + break; + case AssetLoadPathType.ClassCharaBaseWin: + result = "ui_class_" + path + "_base_win.unity3d"; + break; + case AssetLoadPathType.ClassCharaBaseLose: + result = "ui_class_" + path + "_base_lose.unity3d"; + break; + case AssetLoadPathType.ClassCharaEvolve: + result = ((!int.TryParse(path, out result2)) ? $"ui_class_{path}_base_evolve.unity3d" : $"ui_class_{result2:D2}_base_evolve.unity3d"); + break; + case AssetLoadPathType.ClassCharaEvolveWin: + result = "ui_class_" + path + "_base_evolve_win.unity3d"; + break; + case AssetLoadPathType.ClassCharaEvolveLose: + result = "ui_class_" + path + "_base_evolve_lose.unity3d"; + break; + case AssetLoadPathType.ClassCharaHeader: + result = "ui_" + path + ".unity3d"; + break; + case AssetLoadPathType.ClassCharaSkinThumbnail: + result = $"ui_class_skin_{int.Parse(path):D2}.unity3d"; + break; + case AssetLoadPathType.PracticePuzzleThumbnail: + result = $"ui_puzzle_thumbnail_{int.Parse(path):D2}.unity3d"; + break; + case AssetLoadPathType.ClassCharaWideThumbnail: + { + int result7 = 0; + result = ((!int.TryParse(path, out result7)) ? $"ui_chara_select_thumbnail_wide_class_{path}.unity3d" : $"ui_chara_select_thumbnail_wide_class_{result7:D2}.unity3d"); + break; + } + case AssetLoadPathType.ClassCharaButton: + { + int result6 = 0; + result = ((!int.TryParse(path, out result6)) ? $"ui_class_select_thumbnail_{path}.unity3d" : $"ui_class_select_thumbnail_{result6:D2}.unity3d"); + break; + } + case AssetLoadPathType.ClassCharaStory: + result = $"ui_class_{int.Parse(path):D2}_story.unity3d"; + break; + case AssetLoadPathType.ClassChara3D: + result = $"ui_chr{path}.unity3d"; + break; + case AssetLoadPathType.ClassCharaIconLevel: + result = "ui_class_" + path + "_level.unity3d"; + break; + case AssetLoadPathType.ClassCharaEncampment: + result = "ui_class_" + path + "_encampment.unity3d"; + break; + case AssetLoadPathType.Field3D: + result = "bg_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.Tutorial: + result = "tutorial_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.BossRushSpecialCard: + result = "ui_boss_rush_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.StorySubChapterBtnTexture: + case AssetLoadPathType.StoryChapterHeader: + case AssetLoadPathType.StorySelectWorldPanel: + case AssetLoadPathType.Font: + case AssetLoadPathType.ClassCharaMesh: + case AssetLoadPathType.ClassCharaMaterial: + case AssetLoadPathType.ClassCharaMaterialMain: + case AssetLoadPathType.ClassCharaTexture: + case AssetLoadPathType.ClassCharaFrameTexture: + case AssetLoadPathType.ClassCharaProfile: + case AssetLoadPathType.AreaSelectTexture: + case AssetLoadPathType.GachaTexture: + case AssetLoadPathType.BattleTexture: + case AssetLoadPathType.Background: + case AssetLoadPathType.CardMenu: + case AssetLoadPathType.Arena: + case AssetLoadPathType.UiOtherTexture: + case AssetLoadPathType.UiStory: + case AssetLoadPathType.UiStorySectionSummary: + case AssetLoadPathType.GrandPrixSpecialAtlas: + case AssetLoadPathType.BattlePass: + case AssetLoadPathType.BattleStage: + case AssetLoadPathType.Bingo: + case AssetLoadPathType.FlowChart: + case AssetLoadPathType.Competition: + case AssetLoadPathType.FreeCardPack: + result = "ui_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.MyPageBackGround: + result = "ui_bg_mypage_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.MyPageCharacter: + result = "ui_" + path.ToLower() + "_mypage.unity3d"; + break; + case AssetLoadPathType.MyPageCharacterMask: + result = "ui_" + path.ToLower() + "_mypage_mask.unity3d"; + break; + case AssetLoadPathType.MyPageBackGroundIcon: + result = "ui_mypage_bg_icon_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.MyPageBackGroundRandomSelectIcon: + result = "ui_mypage_bg_random_icon_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.QuestAtlas: + result = "ui_quest.unity3d"; + break; + case AssetLoadPathType.UilangOtherTexture: + result = "uilang_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.ShopBuildDeckThumbnail: + result = "uilang_build_deck_thumbnail_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.SpecialTitle: + result = "ui_special_title_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.ShopCardPack: + case AssetLoadPathType.ShopBuildDeck: + case AssetLoadPathType.ShopSleeve: + case AssetLoadPathType.ShopClassSkin: + case AssetLoadPathType.ShopItem: + case AssetLoadPathType.BattleLangTexture: + result = "uilang_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.FirstTips: + result = "uilang_" + path + ".unity3d"; + break; + case AssetLoadPathType.SpecialCrystal: + result = "uilang_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.Item: + case AssetLoadPathType.Lottery: + result = "ui_" + path + ".unity3d"; + break; + case AssetLoadPathType.PackBox: + result = "packbox_" + path + ".unity3d"; + break; + case AssetLoadPathType.UiDownLoad: + case AssetLoadPathType.UiDownLoadInfo: + result = "uidownload_" + path + ".unity3d"; + break; + case AssetLoadPathType.Stamp: + result = "uilang_stamp_" + path + ".unity3d"; + break; + case AssetLoadPathType.Uilang3DField: + result = "uilang_" + path + ".unity3d"; + break; + case AssetLoadPathType.NeutralVote: + result = "ui_neutral_vote_" + path + ".unity3d"; + break; + case AssetLoadPathType.NeutralVoteThumbnail_S: + result = "ui_neutral_vote_thumb_" + path + "_s.unity3d"; + break; + case AssetLoadPathType.NeutralVoteThumbnail_M: + result = "ui_neutral_vote_thumb_" + path + "_m.unity3d"; + break; + case AssetLoadPathType.LeaderVote: + result = "ui_leader_vote_" + path + ".unity3d"; + break; + case AssetLoadPathType.LeaderVoteThumbnail_S: + result = "ui_leader_vote_thumb_" + path + "_s.unity3d"; + break; + case AssetLoadPathType.UISpine: + result = "ui_" + path + ".unity3d"; + break; + } + } + return result; + } + + public long GetExistingSleeveId(long sleeveId) + { + string path = sleeveId.ToString(); + string assetTypePath = GetAssetTypePath(path, AssetLoadPathType.SleeveMaterial); + if (!ExistsAssetBundleManifest(assetTypePath)) + { + AddAssetNotFoundLog(assetTypePath); + return 3000011L; + } + string assetTypePath2 = GetAssetTypePath(path, AssetLoadPathType.SleeveTexture); + if (!ExistsAssetBundleManifest(assetTypePath2)) + { + AddAssetNotFoundLog(assetTypePath2); + return 3000011L; + } + if (Data.Master.SleeveMgr.Get(sleeveId).IsPremiumSleeve) + { + string assetTypePath3 = GetAssetTypePath(path, AssetLoadPathType.SleeveTextureMask); + if (!ExistsAssetBundleManifest(assetTypePath3)) + { + AddAssetNotFoundLog(assetTypePath3); + return 3000011L; + } + } + return sleeveId; + } + + public bool IsExistSleeveNormalMap(long sleeveId) + { + string assetTypePath = GetAssetTypePath(sleeveId.ToString(), AssetLoadPathType.SleeveTextureNormalMap); + return ExistsAssetBundleManifest(assetTypePath); + } + + private void AddAssetNotFoundLog(string path) + { + string text = "asset not found : " + path; + Debug.LogError(text); + LocalLog.AccumulateTraceLog(text); + } + + public string GetLoadFontFilePath(string fileName) + { + return "f/" + fileName; + } + + public Material FindCardMaterial(int cardId, AssetLoadPathType type, bool isEvol = false, bool isMutation = false, CardBasePrm.CharaType originalType = CardBasePrm.CharaType.NORMAL, bool isChoiceBrave = false) + { + string text = ((cardId / 1000000000 == 1) ? GetAssetTypePath($"{cardId}_M", AssetLoadPathType.UnitCardMaterial, isfetch: true) : ((isEvol && type == AssetLoadPathType.UnitCardMaterial) ? GetAssetTypePath($"{cardId}1_M", type, isfetch: true) : ((!(isMutation || isChoiceBrave)) ? GetAssetTypePath($"{cardId}0_M", type, isfetch: true) : ((originalType != CardBasePrm.CharaType.NORMAL) ? GetAssetTypePath($"{cardId}0_M", AssetLoadPathType.SpellCardMaterial, isfetch: true) : GetAssetTypePath($"{cardId}0_M", AssetLoadPathType.UnitCardMaterial, isfetch: true))))); + Material obj = LoadObject(text) as Material; + if (obj == null) + { + AddAssetNotFoundLog(text); + } + return obj; + } + + public int GetPreferredParallelDownloadNum() + { + if (fixedParallelTasks > 0) + { + return fixedParallelTasks; + } + if (_preferredParallelDownloadTasks < 0) + { + _preferredParallelDownloadTasks = 4; + } + return _preferredParallelDownloadTasks; + } + + public int GetPreferredParallelLoadNum() + { + if (fixedParallelTasks > 0) + { + return fixedParallelTasks; + } + if (_preferredParallelLoadTasks < 0) + { + _preferredParallelLoadTasks = 8; + } + return _preferredParallelLoadTasks; + } + + private void Awake() + { + } + + private void Start() + { + downloadList = new List(); + Toolbox.ResourcesManager = this; + } + + public void RequestDownloadStopForMovie() + { + if (BgDownloadState == BackgroundDownloadState.Download) + { + BgDownloadState = BackgroundDownloadState.StopRequest; + _stopForMovie = true; + } + } + + public void RequestDownloadStopForMainDownload() + { + if (BgDownloadState == BackgroundDownloadState.Download) + { + BgDownloadState = BackgroundDownloadState.StopRequest; + } + } + + private IEnumerator WaitBgDownloadStopRequestFulfilled() + { + while (!Toolbox.AssetManager.IsDownloadJobIdle()) + { + yield return null; + } + BgDownloadState = BackgroundDownloadState.None; + } + + public StopResult Stop() + { + if (BgDownloadState == BackgroundDownloadState.StopRequest) + { + BgDownloadState = BackgroundDownloadState.None; + if (_stopForMovie) + { + _stopForMovie = false; + return StopResult.Paused; + } + return StopResult.Stopped; + } + if (BgDownloadState == BackgroundDownloadState.Download) + { + BgDownloadState = BackgroundDownloadState.None; + return StopResult.Finished; + } + return StopResult.Stopped; + } + + public bool CanStartBgDownload() + { + if (CanStartDownload()) + { + return !Toolbox.MovieManager.IsPlaying(); + } + return false; + } + + public bool CanStartDownload() + { + if (BgDownloadState == BackgroundDownloadState.None && !downloadSemaphore) + { + return Toolbox.AssetManager.IsDownloadJobIdle(); + } + return false; + } + + public IEnumerator DownloadAssetGroupBackground(List assetList, Action callback, bool isProgress = true, bool isSavePlayerPrefs = true) + { + if (BgDownloadState == BackgroundDownloadState.Init) + { + BgDownloadState = BackgroundDownloadState.Download; + yield return _DownloadAssetGroup(assetList, callback, isProgress, isSavePlayerPrefs); + } + } + + public IEnumerator DownloadAssetGroup(List assetList, Action callback, bool isProgress = true, bool isSavePlayerPrefs = true) + { + while (BgDownloadState == BackgroundDownloadState.Init) + { + yield return null; + } + if (BgDownloadState == BackgroundDownloadState.Download) + { + BgDownloadState = BackgroundDownloadState.StopRequest; + } + while (BgDownloadState == BackgroundDownloadState.StopRequest) + { + yield return WaitBgDownloadStopRequestFulfilled(); + } + Action callback2 = delegate + { + if (callback != null) + { + callback(); + } + }; + yield return _DownloadAssetGroup(assetList, callback2, isProgress, isSavePlayerPrefs); + } + + private IEnumerator _DownloadAssetGroup(List assetList, Action callback, bool isProgress = true, bool isSavePlayerPrefs = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + yield break; + } + while (downloadSemaphore) + { + yield return null; + } + SetDownloadProcessLock(enable_lock: true); + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = 60; + if (downloadList.Count > 0) + { + downloadList.Clear(); + } + bool isDownloadVoiceUse = Toolbox.AudioManager.isDownloadVoiceUse; + for (int i = 0; i < assetList.Count; i++) + { + AssetHandle assetHandle = Toolbox.AssetManager.GetAssetHandle(assetList[i]); + if (assetHandle != null && (!assetHandle.IsSoundVoice() || isDownloadVoiceUse) && assetHandle.isReDownloadAsset(CustomPreference.IsNormalResource)) + { + downloadList.Add(assetList[i]); + } + } + if (downloadList.Count > 0) + { + Toolbox.AssetManager.AddDownloadMaxCount(downloadList.Count); + yield return StartCoroutine(DownloadAssetGroupSub(downloadList, isProgress)); + yield return new WaitForFixedUpdate(); + if (isSavePlayerPrefs) + { + Toolbox.SavedataManager.Save(); + } + } + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = Toolbox.QualityManager.GetFrameRate(); + SetDownloadProcessLock(enable_lock: false); + callback?.Invoke(); + } + + private IEnumerator DownloadAssetGroupSub(List assetList, bool isProgress = true) + { + if (isProgress) + { + UIManager.GetInstance().LoadingViewManager.UpdateLoadingNum(0); + } + if (BgDownloadState != BackgroundDownloadState.StopRequest) + { + downloadRequestContext.callback = null; + yield return StartCoroutine(ParallelAssetListExec(assetList, GetPreferredParallelDownloadNum(), downloadRequestContext, DownloadAssetSub, isProgress ? ProgressDebugType.Progress_DOWNLOAD : ProgressDebugType.Progress_NONE)); + UIManager.GetInstance().LoadingViewManager.UpdateLoadingNum(100); + } + } + + public IEnumerator DownloadAsset(string assetName, Action callback, bool isSavePlayerPrefs = true) + { + List assetList = new List { assetName }; + yield return StartCoroutine(DownloadAssetGroup(assetList, callback, isProgress: true, isSavePlayerPrefs)); + } + + private void DownloadAssetSub(string assetName, AssetRequestContext requestContext) + { + Toolbox.AssetManager.DownloadAsset(assetName, requestContext); + } + + private List FilterAssetList(List assetList, ref List duplicateList) + { + if (assetList.Count < 2) + { + return assetList; + } + List list = new List(new HashSet(assetList)); + if (list.Count != assetList.Count) + { + duplicateList = assetList; + for (int i = 0; i < list.Count; i++) + { + duplicateList.Remove(list[i]); + } + } + return list; + } + + private IEnumerator ParallelAssetListExec(List assetList, int numParallelTasks, AssetRequestContext requestContext, Action exec, ProgressDebugType Progress = ProgressDebugType.Progress_NONE, bool preferSynchornousLoad = false) + { + if (BgDownloadState == BackgroundDownloadState.StopRequest) + { + yield break; + } + List duplist = null; + assetList = FilterAssetList(assetList, ref duplist); + int totalJobs = assetList.Count; + int finishedJobs = 0; + if (requestContext == null) + { + requestContext = new AssetRequestContext(null, new Utility.LeanSemaphore(0), new AssetErrorState()); + } + requestContext.callback = delegate(AssetHandle handle) + { + if (handle == null || string.IsNullOrEmpty(handle.AssetName) || assetList == null) + { + finishedJobs++; + } + else if (assetList.Contains(handle.AssetName)) + { + finishedJobs++; + } + }; + requestContext.semaphore.Reset(numParallelTasks); + requestContext.preferSynchronousLoad = preferSynchornousLoad; + requestContext.errorState.Reset(); + AssetErrorState errorState = requestContext.errorState; + LocalLog.UpdateLoadResourceLog("JustBeforeExec"); + do + { + if (BgDownloadState == BackgroundDownloadState.StopRequest) + { + yield break; + } + int count = assetList.Count; + for (int num = 0; num < count; num++) + { + exec(assetList[num], requestContext); + } + while (finishedJobs < totalJobs && BgDownloadState != BackgroundDownloadState.StopRequest) + { + if (errorState.HasError()) + { + errorState.SetCanceled(); + } + yield return 0; + } + if (errorState.HasError()) + { + if (errorState.lastDialogDecision != AssetErrorState.DialogDecision.RETRY) + { + LocalLog.RecordResouseLoadError(errorState.errorFlag); + while (true) + { + yield return 0; + } + } + assetList = errorState.GatherErrorFilenames(); + finishedJobs = totalJobs - assetList.Count; + } + if (BgDownloadState == BackgroundDownloadState.StopRequest) + { + Toolbox.AssetManager.CancelDownloadAsyncJob(); + break; + } + } + while (errorState.HasError()); + requestContext.callback = null; + if (duplist == null) + { + yield break; + } + for (int num2 = 0; num2 < duplist.Count; num2++) + { + AssetHandle assetHandle = Toolbox.AssetManager.GetAssetHandle(duplist[num2]); + if (assetHandle != null && assetHandle.reference >= 1) + { + assetHandle.reference++; + } + } + } + + public IEnumerator LoadAssetGroupAsync(List rogueAssetList, Action callback, bool isProgress = true) + { + return LoadAssetGroup(rogueAssetList, callback, isProgress); + } + + public IEnumerator LoadAssetGroupSync(List rogueAssetList, Action callback, bool isProgress = true) + { + return LoadAssetGroup(rogueAssetList, callback, isProgress, preferSynchronousLoad: true); + } + + public IEnumerator LoadAssetGroup(List rogueAssetList, Action callback, bool isProgress = true, bool preferSynchronousLoad = false) + { + List filteredAssetList = QuickLoadAssetGroup(rogueAssetList); + if (filteredAssetList == null || filteredAssetList.Count == 0) + { + callback?.Invoke(); + yield break; + } + LocalLog.UpdateLoadResourceLog("BeforeSemaphore"); + while (loadSemaphore) + { + yield return null; + } + SetLoadProcessLock(enable_lock: true); + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = 60; + _ = isProgress; + LocalLog.UpdateLoadResourceLog("BeforeParallelAssetListExec"); + Toolbox.AssetManager.AddLoadingMaxCount(rogueAssetList.Count); + yield return StartCoroutine(ParallelAssetListExec(filteredAssetList, GetPreferredParallelLoadNum(), loadRequestContext, LoadAssetSub, isProgress ? ProgressDebugType.Progress_LOAD : ProgressDebugType.Progress_NONE, preferSynchronousLoad)); + LocalLog.UpdateLoadResourceLog("AfterParallelAssetListExec"); + yield return new WaitForFixedUpdate(); + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = Toolbox.QualityManager.GetFrameRate(); + SetLoadProcessLock(enable_lock: false); + callback?.Invoke(); + LocalLog.UpdateLoadResourceLog("FinishLoad"); + } + + public IEnumerator DownloadAssetGroupWithLoadAsset(List assetList, Action callback, bool isProgress = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + yield break; + } + yield return StartCoroutine(DownloadAssetGroup(assetList, null, isProgress)); + yield return StartCoroutine(LoadAssetGroupAsync(assetList, null, isProgress)); + } + + private bool QuickLoadAsset(string assetName) + { + AssetHandle assetHandle = Toolbox.AssetManager.GetAssetHandle(assetName); + bool result = false; + if (assetHandle != null) + { + result = assetHandle.QuickLoadIfPossible(); + } + return result; + } + + private List QuickLoadAssetGroup(List assetList) + { + if (assetList == null || assetList.Count == 0) + { + return null; + } + List list = null; + int count = assetList.Count; + if (count == 1) + { + string text = assetList[0]; + if (!QuickLoadAsset(text)) + { + list = new List(1); + list.Add(text); + } + } + else + { + HashSet hashSet = null; + for (int i = 0; i < count; i++) + { + string text2 = assetList[i]; + if (string.IsNullOrEmpty(text2)) + { + continue; + } + if (hashSet != null && hashSet.Contains(text2)) + { + AssetHandle assetHandle = Toolbox.AssetManager.GetAssetHandle(text2); + if (assetHandle != null && assetHandle.reference >= 1) + { + assetHandle.reference++; + } + } + else if (QuickLoadAsset(text2)) + { + if (hashSet == null) + { + hashSet = new HashSet(); + } + hashSet.Add(text2); + } + else + { + if (list == null) + { + list = new List(); + } + list.Add(text2); + } + } + } + return list; + } + + public IEnumerator LoadAssetAsync(string assetName, Action callback) + { + List rogueAssetList = new List { assetName }; + yield return StartCoroutine(LoadAssetGroupAsync(rogueAssetList, null)); + callback?.Invoke(); + } + + private void LoadAssetSub(string assetName, AssetRequestContext requestContext) + { + Toolbox.AssetManager.CacheAsset(assetName, requestContext); + } + + public void StartCoroutine_DownloadAssetGroupWithLoadAsset(List assetList, Action callback, bool isProgress = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + } + else + { + StartCoroutine(DownloadAssetGroupWithLoadAsset(assetList, callback, isProgress)); + } + } + + public void StartCoroutine_DownloadAssetGroupWithLoadAsset(string asset, Action callback, bool isProgress = true) + { + StartCoroutine_DownloadAssetGroupWithLoadAsset(new List { asset }, callback, isProgress); + } + + public void StartCoroutine_LoadAssetGroupAsync(List assetList, Action callback, bool isProgress = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + } + else + { + StartCoroutine(LoadAssetGroupAsync(assetList, callback, isProgress)); + } + } + + public void StartCoroutine_LoadAssetGroupAsync(string asset, Action callback, bool isProgress = true) + { + StartCoroutine(LoadAssetGroupAsync(new List { asset }, callback, isProgress)); + } + + public void StartCoroutine_LoadAssetGroupSync(List assetList, Action callback, bool isProgress = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + } + else + { + StartCoroutine(LoadAssetGroupSync(assetList, callback, isProgress)); + } + } + + public void StartCoroutine_LoadAssetGroupSync(string asset, Action callback, bool isProgress = true) + { + StartCoroutine(LoadAssetGroupSync(new List { asset }, callback, isProgress)); + } + + public void RemoveAssetGroup(List assetList) + { + for (int i = 0; i < assetList.Count; i++) + { + RemoveAsset(assetList[i]); + } + } + + public void RemoveAsset(string assetName) + { + Toolbox.AssetManager.UnloadAsset(assetName); + } + + public void RemoveAssetForceCommon() + { + Toolbox.AssetManager.UnloadCommonAssetAll(); + } + + public void RemoveAssetCommon(string assetName) + { + Toolbox.AssetManager.UnloadCommonAsset(assetName); + } + + public void RegistCommonAsset(List assetList) + { + for (int i = 0; i < assetList.Count; i++) + { + Toolbox.AssetManager.RegistCommonAsset(assetList[i]); + } + } + + public void RemoveAssetForceTemporary() + { + Toolbox.AssetManager.UnloadTemporaryAssetAll(); + } + + public void RemoveAssetTemporary(string assetName) + { + Toolbox.AssetManager.UnloadTemporaryAsset(assetName); + } + + public void RegistTemporaryAsset(string assetName) + { + Toolbox.AssetManager.RegistTemporaryAsset(assetName); + } + + public bool ExistsAssetBundleManifest(string assetName) + { + if (Toolbox.AssetManager.GetAssetHandle(assetName) != null) + { + return true; + } + return false; + } + + public bool CheckBeforeFileRequeset(string assetName) + { + return Toolbox.AssetManager.IsEnableAssetName(assetName); + } + + public bool IsLoadedAssetBundle(string assetName) + { + if (Toolbox.AssetManager == null) + { + return false; + } + if (Toolbox.AssetManager.GetAssetBundleObject(assetName) != null) + { + return true; + } + return false; + } + + public bool IsLoadedAssetBundleAndObjectArrayExist(string assetName) + { + if (IsLoadedAssetBundle(assetName)) + { + return Toolbox.AssetManager.GetAssetBundleObject(assetName).objectArray.Count > 0; + } + return false; + } + + public void UseAssetBundle(bool bEnabled) + { + useAssetBundle = bEnabled; + } + + public bool IsUseAssetBundle() + { + return useAssetBundle; + } + + public UnityEngine.Object LoadObject(string objectName, bool isServerResources = true, bool isIfFindLoad = false) + { + return LoadObject(objectName, isServerResources); + } + + public T LoadObject(string objectName, bool isServerResources = true, bool isIfFindLoad = false) where T : UnityEngine.Object + { + if (!isServerResources) + { + return Resources.Load(objectName); + } + AssetManager assetManager = Toolbox.AssetManager; + if (assetManager != null) + { + UnityEngine.Object obj = assetManager.LoadObject(objectName, typeof(T), isIfFindLoad); + if (obj != null) + { + return (T)obj; + } + } + return Resources.Load(objectName); + } + + public UnityEngine.Object LoadObject(string assetName, string objectName, bool isServerResources = true) + { + return LoadObject(assetName, objectName, isServerResources); + } + + public T LoadObject(string assetName, string objectName, bool isServerResources = true) where T : UnityEngine.Object + { + if (!isServerResources) + { + return Resources.Load(objectName); + } + AssetManager assetManager = Toolbox.AssetManager; + if (assetManager != null) + { + UnityEngine.Object obj = assetManager.LoadObject(assetName, objectName, typeof(T)); + if (obj != null) + { + return (T)obj; + } + } + return Resources.Load(objectName); + } + + private void SetDownloadProcessLock(bool enable_lock) + { + downloadSemaphore = enable_lock; + } + + private void SetLoadProcessLock(bool enable_lock) + { + loadSemaphore = enable_lock; + } + + public IEnumerator GameInitialize() + { + Toolbox.BootNetwork.SetupNetwork(); + while (!Toolbox.BootNetwork.IsDoneGameStartCheck) + { + yield return 0; + } + yield return StartCoroutine(Toolbox.AssetManager.InitializeManifest(null, !Data.Load.data._userTutorial.NeedAllResource)); + } + + public static int calcTextureSize(int x) + { + return (int)(TextureScaleRatio * (float)x); + } + + public static Vector2 calcTextureSize(Vector2 vec) + { + return vec * TextureScaleRatio; + } + + public static int calcAtlasValue(int x, float rate) + { + return (int)(rate * (float)x + 0.5f); + } + + public static void ResizeUISprite(UISprite _sprite) + { + _sprite.MakePixelPerfect(); + int w = calcTextureSize(_sprite.width); + int h = calcTextureSize(_sprite.height); + _sprite.SetDimensions(w, h); + } + + public static void ResizeUISpriteSliced(UISprite _sprite) + { + } + + public static void resizeUIAtlas(UIAtlas atlas, GameObject parentObject, Material material = null) + { + if (atlas == null || atlas.replacement != null || QualityManager.GetAssetQualityLevel() != QualityManager.AssetQualityLevel.Level_1) + { + return; + } + string text = atlas.name; + UIAtlas uIAtlas = UnityEngine.Object.Instantiate(atlas); + uIAtlas.transform.parent = parentObject.transform; + uIAtlas.name = text + "_half"; + atlas.replacement = uIAtlas; + if (material != null) + { + uIAtlas.spriteMaterial = material; + } + List spriteList = uIAtlas.spriteList; + if (spriteList != null) + { + for (int i = 0; i < spriteList.Count; i++) + { + UISpriteData uISpriteData = spriteList[i]; + int width = uISpriteData.width; + int height = uISpriteData.height; + uISpriteData.x = calcAtlasValue(uISpriteData.x, AtlasValueRatio); + uISpriteData.y = calcAtlasValue(uISpriteData.y, AtlasValueRatio); + uISpriteData.width = calcAtlasValue(uISpriteData.width, AtlasValueRatio); + uISpriteData.height = calcAtlasValue(uISpriteData.height, AtlasValueRatio); + uISpriteData.borderLeft = uISpriteData.width - calcAtlasValue(width - uISpriteData.borderLeft, AtlasValueRatio); + uISpriteData.borderRight = calcAtlasValue(uISpriteData.borderRight, AtlasValueRatio); + uISpriteData.borderTop = calcAtlasValue(uISpriteData.borderTop, AtlasValueRatio); + uISpriteData.borderBottom = uISpriteData.height - calcAtlasValue(height - uISpriteData.borderBottom, AtlasValueRatio); + uISpriteData.paddingLeft = calcAtlasValue(uISpriteData.paddingLeft, AtlasValueRatio); + uISpriteData.paddingRight = calcAtlasValue(uISpriteData.paddingRight, AtlasValueRatio); + uISpriteData.paddingTop = calcAtlasValue(uISpriteData.paddingTop, AtlasValueRatio); + uISpriteData.paddingBottom = calcAtlasValue(uISpriteData.paddingBottom, AtlasValueRatio); + } + } + } + + public void ClearLoadCount() + { + Toolbox.AssetManager.ResetDownloadCount(); + } + + public int GetDownLoadMax() + { + return Toolbox.AssetManager.GetDownloadMaxCount(); + } + + public int GetDownLoadCompleted() + { + return Toolbox.AssetManager.GetDownloadCurrentCount(); + } + + public float GetDownloadCompletedSize() + { + return Toolbox.AssetManager.GetDownloadCompletedSize(); + } + + public float GetDownloadMaxSize() + { + return Toolbox.AssetManager.GetDownloadSize(CustomPreference.IsNormalResource); + } + + public int GetLoadingMax() + { + return Toolbox.AssetManager.GetLoadingMaxCount(); + } + + public int GetLoadingCompleted() + { + return Toolbox.AssetManager.GetLoadingCurrentCount(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SavedataManager.cs b/SVSim.BattleEngine/Engine/Cute/SavedataManager.cs new file mode 100644 index 0000000..84797f8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SavedataManager.cs @@ -0,0 +1,90 @@ +using CodeStage.AntiCheat.ObscuredTypes; +using UnityEngine; + +namespace Cute; + +public class SavedataManager : MonoBehaviour, IManager +{ + public const string RESOURCE_VERSION_KEY = "RES_VER"; + + public const string LANGUAGE_FIRST_SET = "LANG_FIRST_SET"; + + public const string LANGUAGE_KEY = "LANG_SETTING"; + + public const string LANGUAGE_SOUND_KEY = "LANG_SOUND_SETTING"; + + public const string LANGUAGE_FONT_KEY = "LANG_FONT"; + + public static string OMOTENASHI_COUNTRY_KEY = "OMOTE_COUNTRY"; + + public static string LANGUAGE_CHANGE = "LANG_CHANGE"; + + private void Start() + { + Toolbox.SavedataManager = this; + } + + private void OnDestroy() + { + } + + public void DeleteAll() + { + ObscuredPrefs.DeleteAll(); + } + + public void DeleteKey(string key) + { + ObscuredPrefs.DeleteKey(key); + } + + public float GetFloat(string key, float defaultValue = 0f) + { + return ObscuredPrefs.GetFloat(key, defaultValue); + } + + public void SetFloat(string key, float value) + { + ObscuredPrefs.SetFloat(key, value); + } + + public int GetInt(string key, int defaultValue = 0) + { + return ObscuredPrefs.GetInt(key, defaultValue); + } + + public void SetInt(string key, int value) + { + ObscuredPrefs.SetInt(key, value); + } + + public string GetString(string key, string defaultValue = "") + { + return ObscuredPrefs.GetString(key, defaultValue); + } + + public void SetString(string key, string value) + { + ObscuredPrefs.SetString(key, value); + } + + public bool HasKey(string key) + { + return ObscuredPrefs.HasKey(key); + } + + public void Save() + { + ObscuredPrefs.Save(); + } + + public void SetResourceVersion(string version) + { + SetString("RES_VER", version); + } + + public string GetResourceVersion() + { + return GetString("RES_VER", "00000000"); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SceneType.cs b/SVSim.BattleEngine/Engine/Cute/SceneType.cs new file mode 100644 index 0000000..46ec2eb --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SceneType.cs @@ -0,0 +1,14 @@ +namespace Cute; + +public enum SceneType +{ + None, + _Splash, + GameTitle, + Title, + Battle, + CardList, + GAMESCENE_TYPE_MAX, + _SoftwareReset, + TYPE_MAX +} diff --git a/SVSim.BattleEngine/Engine/Cute/SignUpTask.cs b/SVSim.BattleEngine/Engine/Cute/SignUpTask.cs new file mode 100644 index 0000000..39af4f7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SignUpTask.cs @@ -0,0 +1,72 @@ +using LitJson; +using UnityEngine; + +namespace Cute; + +public class SignUpTask : NetworkTask +{ + private class LoginPostParams : PostParams + { + public string device_name = ""; + + public string client_type = ""; + + public string os_version = ""; + + public string app_version = ""; + + public string resource_version = ""; + + public string carrier = ""; + } + + private CuteNetworkDefine.ApiType apiType; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter() + { + LoginPostParams loginPostParams = new LoginPostParams(); + loginPostParams.device_name = Toolbox.DeviceManager.GetModelName(); + loginPostParams.client_type = Toolbox.DeviceManager.GetDeviceType().ToString(); + loginPostParams.os_version = Toolbox.DeviceManager.GetOsVersion(); + loginPostParams.app_version = Toolbox.DeviceManager.GetAppVersionName(); + loginPostParams.resource_version = "00000000"; + loginPostParams.carrier = Toolbox.DeviceManager.GetCarrier(); + base.Params = loginPostParams; + } + + protected override int Parse() + { + JsonData jsonData = base.ResponseData["data_headers"]; + resultCode = jsonData["result_code"].ToInt(); + if (resultCode != 1) + { + return resultCode; + } + int viewerId = jsonData["viewer_id"].ToInt(); + int shortUdid = jsonData["short_udid"].ToInt(); + string text = jsonData["udid"].ToString(); + if (Certification.Udid != text) + { + Debug.LogError("udid一致しません。不正のアクセスです。"); + } + else + { + Certification.ViewerId = viewerId; + Certification.ShortUdid = shortUdid; + Certification.SessionId = ""; + AdjustManager.ViewerIDEvent(); + GameObject gameObject = GameObject.Find("OmotePlugin"); + if (gameObject != null) + { + OmotePlugin component = gameObject.GetComponent(); + if (component != null) + { + component.SendConversion(text); + } + } + } + return resultCode; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SkipCuteCheckResultCodes.cs b/SVSim.BattleEngine/Engine/Cute/SkipCuteCheckResultCodes.cs new file mode 100644 index 0000000..3f70b2c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SkipCuteCheckResultCodes.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; + +namespace Cute; + +internal class SkipCuteCheckResultCodes +{ + private List resultCodes = new List(); + + private bool skipAll; + + public void setSkipAll(bool pSkipAll) + { + skipAll = pSkipAll; + } + + public bool isSkipAll() + { + return skipAll; + } + + public void Add(int resultCode) + { + resultCodes.Add(resultCode); + } + + public void Add(List pResultCodes) + { + resultCodes.AddRange(pResultCodes); + } + + public bool Contains(int resultCode) + { + return resultCodes.Contains(resultCode); + } + + public void Clear() + { + resultCodes.Clear(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SocialServiceUtility.cs b/SVSim.BattleEngine/Engine/Cute/SocialServiceUtility.cs new file mode 100644 index 0000000..db27649 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SocialServiceUtility.cs @@ -0,0 +1,210 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Facebook.Unity; +using UnityEngine; + +namespace Cute; + +public class SocialServiceUtility : MonoBehaviour +{ + private bool isLogin_; + + private bool isCountTime; + + private float timer; + + public bool IsRunning { get; protected set; } + + public bool IsLoggedIn + { + get + { + return isLogin_; + } + protected set + { + isLogin_ = value; + } + } + + public string SocialServiceUserId { get; private set; } + + public string FirebaseIdToken { get; private set; } + + public string FaceBookAccountId { get; private set; } + + public string FaceBookAuthenticationToken { get; private set; } + + public bool FaceBookIsLoggedIn => FB.IsLoggedIn; + + public static SocialServiceUtility Instance { get; private set; } + + public static SocialServiceUtility CreateInstance() + { + if (null == Instance) + { + Instance = new GameObject(typeof(SocialServiceUtility).Name).AddComponent(); + UnityEngine.Object.DontDestroyOnLoad(Instance); + } + return Instance; + } + + private void Update() + { + if (isCountTime) + { + checkTimeOut(); + } + } + + private void Awake() + { + } + + private void AndroidInit() + { + } + + private void FbInit() + { + } + + public void FbSignIn(string nonce, Action onetimeCallback) + { + if (IsRunning) + { + return; + } + if (FaceBookIsLoggedIn && FaceBookAccountId != null) + { + if (onetimeCallback != null) + { + onetimeCallback(FaceBookIsLoggedIn); + } + return; + } + IsRunning = true; + INetworkUI networkUI = Toolbox.NetworkManager.NetworkUI; + networkUI.StartLoading(); + FB.LogInWithReadPermissions(new List { "public_profile" }, delegate(ILoginResult result) + { + IsRunning = false; + networkUI.StopLoading(); + if (result == null) + { + onetimeCallback(obj: false); + } + else if (!string.IsNullOrEmpty(result.Error)) + { + onetimeCallback(obj: false); + } + else if (result.Cancelled) + { + onetimeCallback(obj: false); + } + else if (!string.IsNullOrEmpty(result.RawResult)) + { + FaceBookAccountId = AccessToken.CurrentAccessToken.TokenString; + FaceBookAuthenticationToken = ""; + onetimeCallback(obj: true); + } + }); + } + + public IEnumerator SignIn(Action onetimeCallback) + { + if (IsRunning) + { + yield break; + } + if (IsLoggedIn && SocialServiceUserId != null) + { + onetimeCallback?.Invoke(IsLoggedIn); + yield break; + } + IsRunning = true; + INetworkUI networkUI = Toolbox.NetworkManager.NetworkUI; + networkUI.StartLoading(); + StartTimeCount(); + UnitySocialPlatformSingIn(networkUI); + while (IsRunning) + { + yield return null; + } + onetimeCallback(IsLoggedIn); + } + + public void UnitySocialPlatformSingIn(INetworkUI networkUI) + { + Social.localUser.Authenticate(delegate(bool result) + { + if (IsRunning && !result) + { + IsLoggedIn = false; + IsRunning = false; + StopTimeCount(); + networkUI.StopLoading(); + } + }); + } + + private void getFirebaseIdToken(INetworkUI networkUI) + { + } + + public void FbSignOut() + { + if (FaceBookIsLoggedIn) + { + FB.LogOut(); + FaceBookAccountId = null; + } + } + + public void SignOut(Action onetimeCallback = null) + { + if (IsLoggedIn && !IsRunning) + { + IsRunning = true; + IsRunning = false; + IsLoggedIn = false; + onetimeCallback?.Invoke(); + } + } + + public static string GetSocialServiceName() + { + return ""; + } + + public static int GetSocialServiceType() + { + return 0; + } + + public void StartTimeCount() + { + isCountTime = true; + } + + public void StopTimeCount() + { + isCountTime = false; + timer = 0f; + } + + private void checkTimeOut() + { + timer += Time.deltaTime; + if (timer >= 30f) + { + timer = 0f; + INetworkUI networkUI = Toolbox.NetworkManager.NetworkUI; + networkUI.StopLoading(); + StopTimeCount(); + networkUI.OpenSocialServiceNoResponseErrorPopup(); + IsRunning = false; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SoftwareResetBase.cs b/SVSim.BattleEngine/Engine/Cute/SoftwareResetBase.cs new file mode 100644 index 0000000..3892266 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SoftwareResetBase.cs @@ -0,0 +1,48 @@ +using System; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace Cute; + +public static class SoftwareResetBase +{ + public static bool isSoftwareReset; + + private static Action resetAction; + + public static bool IsSoftwareReset() + { + return isSoftwareReset; + } + + public static void setSoftwareResetAction(Action _action) + { + resetAction = _action; + } + + public static void SoftwareReset(string sceneName, Action _resetAction) + { + isSoftwareReset = true; + if (_resetAction != null) + { + resetAction = _resetAction; + } + resetAction.Call(); + GameObject gameObject = GameObject.Find("OmotePlugin"); + if (gameObject != null) + { + UnityEngine.Object.Destroy(gameObject); + } + Toolbox.BootSystem.VisibleBootCamera(enable: true); + GameObject gameObject2 = GameObject.Find("BootCamera"); + if (gameObject2 != null) + { + gameObject2.transform.parent = null; + UnityEngine.Object.DontDestroyOnLoad(gameObject2); + BootSystem.isRootBootCamera = true; + } + Screen.sleepTimeout = -2; + BootApp.BootScene = sceneName; + UnityEngine.SceneManagement.SceneManager.LoadScene("_SoftwareReset"); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SoundData.cs b/SVSim.BattleEngine/Engine/Cute/SoundData.cs new file mode 100644 index 0000000..b22c902 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SoundData.cs @@ -0,0 +1,17 @@ +namespace Cute; + +public struct SoundData +{ + public string _acbName; + + public string _cueName; + + public int _cueId; + + public SoundData(string acbName, string cueName, int cueId) + { + _acbName = acbName; + _cueName = cueName; + _cueId = cueId; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SteamMicroTxnInitTask.cs b/SVSim.BattleEngine/Engine/Cute/SteamMicroTxnInitTask.cs new file mode 100644 index 0000000..ea7216e --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SteamMicroTxnInitTask.cs @@ -0,0 +1,51 @@ +using System; +using Steamworks; + +namespace Cute; + +public class SteamMicroTxnInitTask : NetworkTask +{ + private class MicroTxtInitPost : PostParams + { + public new string steam_id = ""; + + public string app_id = ""; + + public string currency = ""; + + public string ip_address = ""; + + public string item_id = ""; + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.SteamMicroTxnInit; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(string item_id) + { + MicroTxtInitPost microTxtInitPost = new MicroTxtInitPost(); + try + { + microTxtInitPost.steam_id = SteamUser.GetSteamID().ToString(); + microTxtInitPost.app_id = SteamUtils.GetAppID().ToString(); + } + catch (Exception ex) + { + Debug.LogError(ex.Message); + Debug.LogError(ex.StackTrace); + Debug.LogError("steam client を起動してください。"); + } + microTxtInitPost.currency = PCPlatformSTEAM.Currency; + microTxtInitPost.ip_address = Toolbox.DeviceManager.GetIpAddress(); + microTxtInitPost.item_id = item_id; + base.Params = microTxtInitPost; + } + + protected override int Parse() + { + int result = base.Parse(); + _ = 1; + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/TimeData.cs b/SVSim.BattleEngine/Engine/Cute/TimeData.cs new file mode 100644 index 0000000..aaaa248 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/TimeData.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections; +using UnityEngine; + +namespace Cute; + +public class TimeData +{ + private long serverTime; + + private long connectClientTime; + + public void Set(long setServerTime) + { + serverTime = setServerTime; + connectClientTime = (long)TimeNativePlugin.GetDeviceOperatingTime(); + } + + public DateTime GetNowTime() + { + return TimeUtil.GetNowTime(serverTime, connectClientTime); + } + + public DateTime GetNowTime_UTC() + { + return TimeUtil.GetNowTime_UTC(serverTime, connectClientTime); + } + + public float GetTimeLeftLong(long endTime) + { + return (float)TimeUtil.GetTimeLeft(serverTime, endTime, 0L).millisecond / 1000f; + } + + [Obsolete("動作未検証", false)] + public IEnumerator StartTimeLeft(MonoBehaviour obj, long endTime, Action callback) + { + IEnumerator enumerator = timeLeftCoroutine(callback, endTime, 0L); + obj.StartCoroutine(enumerator); + return enumerator; + } + + [Obsolete("動作未検証", false)] + public IEnumerator StartTimeLeft(MonoBehaviour obj, long endTime, long consumingTime, Action callback) + { + IEnumerator enumerator = timeLeftCoroutine(callback, endTime, consumingTime); + obj.StartCoroutine(enumerator); + return enumerator; + } + + [Obsolete("動作未検証", false)] + public string GetNowTimeString() + { + DateTime nowTime = GetNowTime(); + return $"{nowTime.Year:D4}-{nowTime.Month:D2}-{nowTime.Day:D2} {nowTime.Hour:D2}:{nowTime.Minute:D2}:{nowTime.Second:D2}"; + } + + [Obsolete("動作未検証", false)] + private TimeUtil.TimeLeftParam GetTimeLeft(long endTime, long consumingTime = 0L) + { + return TimeUtil.GetTimeLeft(TimeUtil.ToUnixTime(GetNowTime()), endTime, consumingTime); + } + + [Obsolete("動作未検証", false)] + private IEnumerator timeLeftCoroutine(Action callback, long endTime, long consumingTime = 0L) + { + while (true) + { + TimeUtil.TimeLeftParam timeLeft = GetTimeLeft(endTime, consumingTime); + callback(timeLeft); + if (timeLeft.isEnd) + { + break; + } + yield return null; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/TimeUtil.cs b/SVSim.BattleEngine/Engine/Cute/TimeUtil.cs new file mode 100644 index 0000000..2b0b5d3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/TimeUtil.cs @@ -0,0 +1,147 @@ +using System; + +namespace Cute; + +public class TimeUtil +{ + public struct TimeLeftParam + { + public int day; + + public int hour; + + public int minute; + + public int second; + + public int millisecond; + + public int count; + + public bool isEnd; + + public bool isCharge; + + public TimeLeftParam(long unixTime, long consumingTime) + { + if (unixTime <= 0) + { + isEnd = true; + count = 0; + day = 0; + hour = 0; + minute = 0; + second = 0; + millisecond = 0; + isCharge = true; + return; + } + isEnd = false; + if (consumingTime == 0L) + { + count = 0; + isCharge = false; + } + else + { + count = (int)(unixTime / consumingTime) + 1; + unixTime = unixTime - (count - 1) * consumingTime + 1; + if (unixTime == consumingTime) + { + isCharge = true; + } + else + { + isCharge = false; + } + } + day = (int)unixTime / 86400; + hour = (int)unixTime / 3600 % 24; + minute = (int)unixTime / 60 % 60; + second = (int)unixTime % 60; + millisecond = (int)unixTime % 1000; + } + + public override string ToString() + { + return $"回数{count:D2}残り{day:D2}日 {hour:D2}:{minute:D2}:{second:D2}"; + } + } + + private static readonly DateTime UNIX_EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, 0); + + public const int DAY_HOUR = 24; + + public const int DAY_SECOND = 86400; + + public const int HOUR_SECOND = 3600; + + public const int MINUTE_SECOND = 60; + + public const int MILLI_SECOND = 1000; + + public static DateTime GetNowTime(long serverTime, long connectClientTime) + { + return UNIX_EPOCH.AddSeconds((float)serverTime + TimeNativePlugin.GetDeviceOperatingTime() - (float)connectClientTime).ToLocalTime(); + } + + public static DateTime GetNowTime_UTC(long serverTime, long connectClientTime) + { + return UNIX_EPOCH.AddSeconds((float)serverTime + TimeNativePlugin.GetDeviceOperatingTime() - (float)connectClientTime); + } + + public static DateTime GetAbsoluteTime() + { + return UNIX_EPOCH.AddSeconds(TimeNativePlugin.GetDeviceOperatingTime()); + } + + public static long ToUnixTime(string str) + { + if (str == null) + { + return 0L; + } + return ToUnixTime(DateTime.Parse(str)); + } + + public static long ToUnixTime(DateTime dateTime) + { + return (long)ToUnixTimeDouble(dateTime); + } + + public static double ToUnixTimeDouble(DateTime dateTime) + { + dateTime = dateTime.ToUniversalTime(); + return (dateTime - UNIX_EPOCH).TotalSeconds; + } + + public static DateTime FromUnixTime(long unixTime) + { + return UNIX_EPOCH.AddSeconds(Convert.ToDouble(unixTime)).ToLocalTime(); + } + + public static DateTime MicroTimeToFromUnixTime(long unixTime) + { + return FromUnixTime(unixTime / 1000); + } + + public static TimeLeftParam GetTimeLeft(long nowTime, long endTime, long consumingTime = 0L) + { + return new TimeLeftParam(endTime - nowTime, consumingTime); + } + + public static long GetElapsedTime(DateTime baseDateTime, DateTime dateTime) + { + return ToUnixTime(dateTime) - ToUnixTime(baseDateTime); + } + + public static TimeSpan GetElapsedTimeByTimeSpan(DateTime baseDateTime, DateTime dateTime) + { + return baseDateTime - dateTime; + } + + public static bool IsTermTime(string startDate, string endDate, long checkTime = 0L) + { + return true; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/Toolbox.cs b/SVSim.BattleEngine/Engine/Cute/Toolbox.cs new file mode 100644 index 0000000..11f74e2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/Toolbox.cs @@ -0,0 +1,65 @@ +using System.Threading; + +namespace Cute; + +public class Toolbox +{ + private enum SYSTEM_INIT + { + SYSTEM_NOT_READY, + SYSTEM_READY + } + + public static bool isLoadFromLocal; + + public static bool isLoadLocalSound; + + public static BootSystem BootSystem; + + public static BootNetwork BootNetwork; + + public static SceneManager SceneManager; + + public static NetworkManager NetworkManager; + + public static AssetManager AssetManager; + + public static SavedataManager SavedataManager; + + public static DeviceManager DeviceManager; + + public static QualityManager QualityManager; + + public static ResourcesManager ResourcesManager; + + public static AudioManager AudioManager; + + public static MovieManager MovieManager; + + public static DebugManager DebugManager; + + public static Mutex mute; + + public static void Clear() + { + BootSystem = null; + BootNetwork = null; + SceneManager = null; + NetworkManager = null; + AssetManager = null; + SavedataManager = null; + DeviceManager = null; + QualityManager = null; + ResourcesManager = null; + AudioManager = null; + } + + public static bool isFrameWorkLoaded() + { + if (BootSystem != null && BootNetwork != null && SceneManager != null && NetworkManager != null && AssetManager != null && SavedataManager != null && DeviceManager != null && QualityManager != null && ResourcesManager != null && AudioManager != null) + { + return true; + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/TransitionCodeParams.cs b/SVSim.BattleEngine/Engine/Cute/TransitionCodeParams.cs new file mode 100644 index 0000000..92e04a2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/TransitionCodeParams.cs @@ -0,0 +1,8 @@ +namespace Cute; + +internal class TransitionCodeParams : PostParams +{ + public string input_viewer_id = ""; + + public string password = ""; +} diff --git a/SVSim.BattleEngine/Engine/Cute/URLScheme.cs b/SVSim.BattleEngine/Engine/Cute/URLScheme.cs new file mode 100644 index 0000000..45dac98 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/URLScheme.cs @@ -0,0 +1,180 @@ +using UnityEngine; + +namespace Cute; + +public class URLScheme +{ + private enum CPTYPE + { + IORI = 1, + ALIVE + } + + private static string process = ""; + + private static string result = ""; + + private static string scheme = ""; + + private static int short_udid = 0; + + private static string udid = ""; + + private static string error_code = ""; + + private static string campaign_data = ""; + + private static int app_type = 0; + + private const string COMBINE = "combine"; + + private const string MIGRATION = "migration"; + + private const string OK = "ok"; + + private const string NG = "ng"; + + private const string IORI = "cg"; + + private const string ALIVE = "pc"; + + public const string EC_MIGRATION_CANCEL = "3070"; + + public const string EC_COMBINE_CANCEL = "3060"; + + public const string EC_MIGRATION_ALREADY_RECORDED = "3061"; + + public const string EC_COMBINE_NO_URL = "3054"; + + public const string EC_MIGRATION_NO_URL = "3063"; + + public const string EC_COMBINE_EXEC_HAVE_RECORD = "3057"; + + public static string CampaignData => campaign_data; + + public static int AppType => app_type; + + public static void URLSchemeStartAndroid() + { + GetURLSchemeParamsAndroid(); + ProcessSetting(); + } + + public static void URLSchemeStartiOS(string message) + { + GetURLSchemeParamsiOS(message); + ProcessSetting(); + } + + public static bool IsCombineOK() + { + if (process == "combine" && result == "ok") + { + return short_udid == Certification.ShortUdid; + } + return false; + } + + public static bool IsCombineNG() + { + if (process == "combine" && result == "ng") + { + return error_code != ""; + } + return false; + } + + public static bool IsMigrationOK() + { + if (process == "migration" && result == "ok") + { + return udid == Certification.Udid; + } + return false; + } + + public static bool IsMigrationNG() + { + if (process == "migration" && result == "ng") + { + return error_code != ""; + } + return false; + } + + public static bool IsMigrationFinished() + { + if (process == "migration" && result == "ng") + { + return error_code == "3061"; + } + return false; + } + + public static void Clear() + { + scheme = ""; + process = ""; + result = ""; + short_udid = 0; + udid = ""; + error_code = ""; + } + + public static void ClearCampaignData() + { + campaign_data = ""; + app_type = 0; + } + + private static void GetURLSchemeParamsAndroid() + { + Clear(); + } + + private static void GetURLSchemeParamsiOS(string url) + { + Clear(); + if (url == "") + { + url = PlayerPrefs.GetString("iOSUrlScheme", ""); + PlayerPrefs.DeleteKey("iOSUrlScheme"); + } + if (url.IndexOf("://") >= 0) + { + scheme = url.Substring(0, url.IndexOf("://")); + AnalysisResult(url.Substring(url.IndexOf("://") + 3)); + } + } + + private static void ProcessSetting() + { + if (!(scheme == "")) + { + if (IsCombineOK()) + { + DataMigration.CombineSucceed(); + } + else if (IsCombineNG()) + { + DataMigration.CombineFailed(); + } + else if (IsMigrationOK()) + { + DataMigration.MigrationSucceed(); + } + else if (IsMigrationNG()) + { + DataMigration.MigrationFailed(); + } + } + } + + private static void AnalysisResult(string host) + { + if (scheme == "shadowverse") + { + UIManager.GetInstance().AccountTransferHelper.GetAppleData(host); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/UpdateBirthTask.cs b/SVSim.BattleEngine/Engine/Cute/UpdateBirthTask.cs new file mode 100644 index 0000000..fb8049a --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/UpdateBirthTask.cs @@ -0,0 +1,34 @@ +using UnityEngine; + +namespace Cute; + +public class UpdateBirthTask : NetworkTask +{ + private class UpdateBirthPostParams : PostParams + { + public string birth = ""; + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.BirthUpdate; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(string birth) + { + UpdateBirthPostParams updateBirthPostParams = new UpdateBirthPostParams(); + updateBirthPostParams.birth = birth; + base.Params = updateBirthPostParams; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + CreateItemList.BirthDayUpdateServerTime = base.ResponseData["data_headers"]["servertime"].ToInt(); + CreateItemList.BirthDayUpdateRealTime = Time.realtimeSinceStartup; + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/UpdateiCloudUserDataTask.cs b/SVSim.BattleEngine/Engine/Cute/UpdateiCloudUserDataTask.cs new file mode 100644 index 0000000..cdb709c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/UpdateiCloudUserDataTask.cs @@ -0,0 +1,47 @@ +using LitJson; + +namespace Cute; + +public class UpdateiCloudUserDataTask : NetworkTask +{ + private class iCloudUserParams : PostParams + { + public string carrier = ""; + + public string icloud_data = ""; + } + + private CuteNetworkDefine.ApiType apiType = CuteNetworkDefine.ApiType.MigrateiCloudUser; + + public override string Url => $"{CustomPreference.GetApplicationServerURL()}{CuteNetworkDefine.ApiUrlList[apiType]}"; + + public void SetParameter(string iCloudData) + { + iCloudUserParams iCloudUserParams = new iCloudUserParams(); + iCloudUserParams.icloud_data = iCloudData; + iCloudUserParams.carrier = Toolbox.DeviceManager.GetCarrier(); + base.Params = iCloudUserParams; + } + + protected override int Parse() + { + if (resultCode != 1) + { + return base.Parse(); + } + JsonData jsonData = base.ResponseData["data_headers"]; + int viewerId = jsonData["viewer_id"].ToInt(); + int shortUdid = jsonData["short_udid"].ToInt(); + string text = jsonData["udid"].ToString(); + if (Certification.Udid != text) + { + Debug.LogError("udid一致しません。不正のアクセスです。"); + } + else + { + Certification.ViewerId = viewerId; + Certification.ShortUdid = shortUdid; + } + return resultCode; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/Utility.cs b/SVSim.BattleEngine/Engine/Cute/Utility.cs new file mode 100644 index 0000000..d33ae52 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/Utility.cs @@ -0,0 +1,731 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Security.Cryptography; +using System.Text; +using System.Text.RegularExpressions; +using UnityEngine; + +namespace Cute; + +public class Utility +{ + private enum CSVParserState + { + BEGIN_FIELD, + PLAIN, + QUOTE, + END_FIELD + } + + public class EzCrypt + { + private const string characters = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"; + + private int numScale; + + private int[] table; + + private int key; + + public EzCrypt(int key) + { + numScale = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-".Length; + this.key = key; + table = new int[128]; + for (int i = 0; i < 128; i++) + { + table[i] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-".IndexOf((char)i); + } + } + + public char[] Encode(char[] src) + { + int num = key; + for (int i = 0; i < src.Length; i++) + { + num = new System.Random(num + src[i]).Next(); + } + int num2 = num % (numScale - 1) + 1; + int num3 = num / (numScale - 1) % (numScale - 1) + 1; + int num4 = num2 * numScale + num3; + int num5 = src.Length + 2; + char[] array = new char[num5]; + array[0] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"[num2]; + array[num5 - 1] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"[num3]; + int num6 = num4; + for (int j = 0; j < src.Length; j++) + { + int num7 = table[(uint)src[j]]; + if (num7 < 0) + { + return null; + } + array[j + 1] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"[(num7 + num6) % numScale]; + num6 += num4 + array[j + 1]; + } + return array; + } + + public char[] Decode(char[] src) + { + int num = table[(uint)src[0]] * numScale + table[(uint)src[src.Length - 1]]; + int num2 = num; + char[] array = new char[src.Length - 2]; + for (int i = 0; i < src.Length - 2; i++) + { + int num3 = table[(uint)src[i + 1]]; + for (num3 = num3 + numScale - num2; num3 < 0; num3 += numScale) + { + } + array[i] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"[num3 % numScale]; + num2 += num + src[i + 1]; + } + return array; + } + } + + public class LeanSemaphore + { + private int max; + + public int value { get; private set; } + + public LeanSemaphore(int maxAcquire) + { + max = maxAcquire; + Reset(); + } + + public bool TryWait() + { + if (value > 0) + { + value--; + return true; + } + return false; + } + + public void Post() + { + value++; + } + + public void Reset() + { + value = max; + } + + public void Reset(int maxAcquire) + { + max = maxAcquire; + Reset(); + } + } + + private static DateTime UNIX_EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, 0); + + private static readonly string LangTypeKorString = Global.LANG_TYPE.Kor.ToString(); + + private static string[,] ArraySymbolCode = new string[33, 2] + { + { " ", "\u3000" }, + { "", "!" }, + { "\"", "”" }, + { "#", "#" }, + { "$", "$" }, + { "%", "%" }, + { "&", "&" }, + { "'", "’" }, + { "(", "(" }, + { ")", ")" }, + { "*", "*" }, + { "+", "+" }, + { ",", "," }, + { "-", "-" }, + { ".", "." }, + { "/", "/" }, + { ":", ":" }, + { ";", ";" }, + { "<", "<" }, + { "=", "=" }, + { ">", ">" }, + { "?", "?" }, + { "@", "@" }, + { "[", "[" }, + { "\\", "■" }, + { "]", "]" }, + { "^", "\uff3e" }, + { "_", "\uff3f" }, + { "`", "’" }, + { "{", "{" }, + { "|", "|" }, + { "}", "}" }, + { "~", "~" } + }; + + public static long GetUnixTime(DateTime targetTime) + { + return GetUnixTimeMilliSeconds(targetTime) / 1000; + } + + public static long GetUnixTimeMilliSeconds(DateTime targetTime) + { + targetTime = targetTime.ToUniversalTime(); + return (long)(targetTime - UNIX_EPOCH).TotalMilliseconds; + } + + public static string LongToTimeSpanString(long unixTime) + { + TimeSpan timeSpan = TimeSpan.FromSeconds(unixTime); + if (timeSpan.Hours > 0) + { + return timeSpan.Hours + "時間" + timeSpan.Minutes.ToString("{0:D2}") + "分"; + } + if (timeSpan.Minutes > 0) + { + return timeSpan.Hours + "分" + timeSpan.Seconds.ToString("{0:D2}") + "秒"; + } + return timeSpan.Seconds + "秒"; + } + + public static ArrayList ConvertCSV(string csvText, bool removeTitle = true) + { + if (CustomPreference.GetTextLanguage() == LangTypeKorString) + { + HangulManager.ConvertRule(csvText); + } + int length = csvText.Length; + int i; + for (i = 0; Convert.ToInt32(csvText[i]) == 65279 && i < length; i++) + { + } + ArrayList arrayList = new ArrayList(); + ArrayList arrayList2 = new ArrayList(); + int num = i; + int num2 = i; + bool flag = removeTitle; + bool flag2 = false; + CSVParserState cSVParserState = CSVParserState.BEGIN_FIELD; + for (int j = i; j < length; j++) + { + switch (csvText[j]) + { + case ',': + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + arrayList2.Add(""); + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + { + string text = csvText.Substring(num, num2 + 1 - num); + arrayList2.Add(flag2 ? text.Replace("\"\"", "\"") : text); + flag2 = false; + cSVParserState = CSVParserState.BEGIN_FIELD; + break; + } + case CSVParserState.QUOTE: + num2 = j; + break; + } + break; + case '\t': + case ' ': + switch (cSVParserState) + { + case CSVParserState.QUOTE: + num2 = j; + break; + } + break; + case '\r': + if (j < length - 1 && csvText[j + 1] == '\n') + { + j++; + } + goto case '\n'; + case '\n': + switch (cSVParserState) + { + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + { + string text2 = csvText.Substring(num, num2 + 1 - num); + arrayList2.Add(flag2 ? text2.Replace("\"\"", "\"") : text2); + flag2 = false; + if (!flag) + { + arrayList2.TrimToSize(); + arrayList.Add(arrayList2); + } + else + { + flag = false; + } + arrayList2 = new ArrayList(arrayList2.Count); + cSVParserState = CSVParserState.BEGIN_FIELD; + break; + } + case CSVParserState.BEGIN_FIELD: + if (arrayList2.Count > 0) + { + arrayList2.Add(""); + if (!flag) + { + arrayList2.TrimToSize(); + arrayList.Add(arrayList2); + } + else + { + flag = false; + } + arrayList2 = new ArrayList(arrayList2.Count); + } + break; + case CSVParserState.QUOTE: + num2 = j; + break; + } + break; + case '"': + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + num = j + 1; + num2 = j; + cSVParserState = CSVParserState.QUOTE; + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + throw new ApplicationException("不正なCSV"); + case CSVParserState.QUOTE: + if (j < length - 1) + { + if (csvText[j + 1] == '"') + { + j++; + flag2 = true; + num2 = j; + } + else + { + cSVParserState = CSVParserState.END_FIELD; + } + } + else + { + cSVParserState = CSVParserState.END_FIELD; + } + break; + } + break; + default: + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + num = j; + num2 = j; + cSVParserState = CSVParserState.PLAIN; + break; + case CSVParserState.END_FIELD: + throw new ApplicationException("Could not parse CSV: extra character found outside quotation."); + case CSVParserState.PLAIN: + case CSVParserState.QUOTE: + num2 = j; + break; + } + break; + } + } + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + if (arrayList2.Count > 0 && !flag) + { + arrayList2.Add(""); + arrayList2.TrimToSize(); + arrayList.Add(arrayList2); + } + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + if (!flag) + { + arrayList2.Add(csvText.Substring(num, num2 + 1 - num)); + arrayList2.TrimToSize(); + arrayList.Add(arrayList2); + } + break; + case CSVParserState.QUOTE: + throw new ApplicationException("不正なCSV"); + } + return arrayList; + } + + public static List ConvertCSV_Array(string csvText, bool removeTitle = true) + { + if (CustomPreference.GetTextLanguage() == LangTypeKorString) + { + HangulManager.ConvertRule(csvText); + } + int length = csvText.Length; + int i; + for (i = 0; Convert.ToInt32(csvText[i]) == 65279 && i < length; i++) + { + } + int num = 1; + for (int j = i; j < length; j++) + { + switch (csvText[j]) + { + case ',': + num++; + continue; + default: + continue; + case '\n': + break; + } + break; + } + List list = new List(); + string[] array = new string[num]; + int num2 = 0; + int num3 = i; + int num4 = i; + bool flag = removeTitle; + bool flag2 = false; + CSVParserState cSVParserState = CSVParserState.BEGIN_FIELD; + for (int k = i; k < length; k++) + { + switch (csvText[k]) + { + case ',': + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + array[num2++] = ""; + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + { + string text = csvText.Substring(num3, num4 + 1 - num3); + array[num2++] = (flag2 ? text.Replace("\"\"", "\"") : text); + flag2 = false; + cSVParserState = CSVParserState.BEGIN_FIELD; + break; + } + case CSVParserState.QUOTE: + num4 = k; + break; + } + break; + case '\t': + case ' ': + switch (cSVParserState) + { + case CSVParserState.QUOTE: + num4 = k; + break; + } + break; + case '\r': + if (k < length - 1 && csvText[k + 1] == '\n') + { + k++; + } + goto case '\n'; + case '\n': + switch (cSVParserState) + { + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + { + string text2 = csvText.Substring(num3, num4 + 1 - num3); + array[num2++] = (flag2 ? text2.Replace("\"\"", "\"") : text2); + flag2 = false; + if (!flag) + { + list.Add(array); + } + else + { + flag = false; + } + array = new string[num]; + num2 = 0; + cSVParserState = CSVParserState.BEGIN_FIELD; + break; + } + case CSVParserState.BEGIN_FIELD: + if (num2 > 0) + { + array[num2++] = ""; + if (!flag) + { + list.Add(array); + } + else + { + flag = false; + } + array = new string[num]; + num2 = 0; + } + break; + case CSVParserState.QUOTE: + num4 = k; + break; + } + break; + case '"': + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + num3 = k + 1; + num4 = k; + cSVParserState = CSVParserState.QUOTE; + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + throw new ApplicationException("不正なCSV"); + case CSVParserState.QUOTE: + if (k < length - 1) + { + if (csvText[k + 1] == '"') + { + k++; + flag2 = true; + num4 = k; + } + else + { + cSVParserState = CSVParserState.END_FIELD; + } + } + else + { + cSVParserState = CSVParserState.END_FIELD; + } + break; + } + break; + default: + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + num3 = k; + num4 = k; + cSVParserState = CSVParserState.PLAIN; + break; + case CSVParserState.END_FIELD: + throw new ApplicationException("Could not parse CSV: extra character found outside quotation."); + case CSVParserState.PLAIN: + case CSVParserState.QUOTE: + num4 = k; + break; + } + break; + } + } + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + if (num2 > 0 && !flag) + { + array[num2] = ""; + list.Add(array); + } + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + if (!flag) + { + array[num2] = csvText.Substring(num3, num4 + 1 - num3); + list.Add(array); + } + break; + case CSVParserState.QUOTE: + throw new ApplicationException("不正なCSV"); + } + return list; + } + + public static int CountString(string strInput, string strFind) + { + int num = 0; + for (int num2 = strInput.IndexOf(strFind); num2 > -1; num2 = strInput.IndexOf(strFind, num2 + 1)) + { + num++; + } + return num; + } + + public static StringBuilder CreateHash(byte[] data) + { + MD5CryptoServiceProvider mD5CryptoServiceProvider = new MD5CryptoServiceProvider(); + byte[] array = mD5CryptoServiceProvider.ComputeHash(data); + mD5CryptoServiceProvider.Clear(); + StringBuilder stringBuilder = new StringBuilder(); + byte[] array2 = array; + foreach (byte b in array2) + { + stringBuilder.Append(b.ToString("x2")); + } + return stringBuilder; + } + + public static StringBuilder CreateHash(string data) + { + return CreateHash(Encoding.UTF8.GetBytes(data)); + } + + public static string GetRegionString() + { + return "JP"; + } + + public static void LogString(string message) + { + string text = ""; + foreach (char c in message) + { + text += $"{(int)c:X2} "; + } + } + + public static string GetRuntimePlatform() + { + string result = "Windows"; + if (Application.platform == RuntimePlatform.Android) + { + result = "Android"; + } + else if (Application.platform == RuntimePlatform.IPhonePlayer) + { + result = "iOS"; + } + else if (Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.OSXEditor) + { + result = "Mac"; + } + return result; + } + + public static string ConvertInputText(string srcText) + { + srcText = StripColorTag(srcText); + StringInfo stringInfo = new StringInfo(srcText); + string text = ""; + int lengthInTextElements = stringInfo.LengthInTextElements; + for (int i = 0; i < lengthInTextElements; i++) + { + string text2 = stringInfo.SubstringByTextElements(i, 1); + if (IsEnableCharSet2(text2)) + { + text2 = ConvertSymbolCode(text2); + text += text2; + } + else + { + text += "■"; + } + } + return text; + } + + private static string ConvertSymbolCode(string srcText) + { + for (int i = 0; i < ArraySymbolCode.GetLength(0); i++) + { + if (srcText.Equals(ArraySymbolCode[i, 0])) + { + srcText = ArraySymbolCode[i, 1]; + break; + } + } + return srcText; + } + + private static string StripColorTag(string srcText) + { + return new Regex("[[][a-zA-Z0-9]{6}[]]").Replace(srcText, ""); + } + + private static bool IsEnableCharSet2(string checkChar) + { + byte[] bytes = Encoding.GetEncoding("UTF-8").GetBytes(checkChar); + if (bytes.Length == 1) + { + int num = bytes[0]; + if (num >= 32 && num <= 126) + { + return true; + } + } + if ("\u3000、。,.・:;?!\u309b\u309c\u00b4\uff40\u00a8\uff3e\uffe3\uff3fヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈〉《》「」『』【】+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓∈∋⊆⊇⊂⊃∪∩∧∨¬⇒⇔∀∃∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬ʼn♯♭♪†‡¶◯\t0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω\tАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя".IndexOf(checkChar) >= 0) + { + return true; + } + if ("亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕".IndexOf(checkChar) >= 0) + { + return true; + } + if ("弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙".IndexOf(checkChar) >= 0) + { + return true; + } + if (new Regex("[\\uFF61-\\uFF9F]").IsMatch(checkChar)) + { + return true; + } + return false; + } + + private static bool IsEnableCharSet(string checkChar) + { + if (GetRegionString().Contains("JP")) + { + byte[] array = ToShiftJisByte(checkChar); + switch (array.Length) + { + case 1: + if (Encoding.GetEncoding("UTF-8").GetBytes(checkChar).Length != 1) + { + return false; + } + return true; + case 2: + { + int num = 256 * array[0] + array[1]; + if ((num >= 33088 && num <= 34716) || (num >= 34975 && num <= 39055) || (num >= 39056 && num <= 40959) || (num >= 57408 && num <= 60159)) + { + return true; + } + break; + } + } + } + return false; + } + + private static byte[] ToShiftJisByte(string str) + { + Encoding encoding = Encoding.GetEncoding("UTF-8"); + Encoding encoding2 = Encoding.GetEncoding("shift_jis"); + byte[] bytes = encoding.GetBytes(str); + try + { + return Encoding.Convert(encoding, encoding2, bytes); + } + catch (Exception ex) + { + Debug.LogError(ex.Message + " text = " + str); + return bytes; + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/WebViewManager.cs b/SVSim.BattleEngine/Engine/Cute/WebViewManager.cs new file mode 100644 index 0000000..e39779f --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/WebViewManager.cs @@ -0,0 +1,276 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class WebViewManager : MonoBehaviour +{ + private static WebViewManager instance; + + [SerializeField] + public WebViewScreen m_WebViewScreen; + + private Action onError; + + private Action onLoaded; + + private Vector4 marginNow; + + private float screenDpi; + + private bool screenDpiChangedWhileInvisible; + + private static readonly Dictionary FontFamilyDict = new Dictionary + { + { + Global.LANG_TYPE.Jpn.ToString(), + "font_jpn" + }, + { + Global.LANG_TYPE.Kor.ToString(), + "font_kor" + }, + { + Global.LANG_TYPE.Cht.ToString(), + "font_cht" + }, + { + Global.LANG_TYPE.Chs.ToString(), + "font_chs" + } + }; + + public Action Callback { get; set; } + + public static bool HasInstance => instance != null; + + public Action OnError + { + set + { + onError = value; + } + } + + public Action OnLoaded + { + set + { + onLoaded = value; + } + } + + public bool Visible { get; private set; } + + public Action OnDpiChangedAction { private get; set; } + + public static WebViewManager getInstance() + { + return instance; + } + + private void UpdateScreenDpi() + { + screenDpi = Screen.dpi; + } + + private bool IsScreenDpiChanged() + { + return Math.Abs(screenDpi - Screen.dpi) > 0.1f; + } + + private void Awake() + { + instance = this; + SetMargins(Screen.width / 30, Screen.height / 5, Screen.width / 30, Screen.height / 14); + UpdateScreenDpi(); + } + + private void OnLoadedCallback(string msg) + { + if (onLoaded != null) + { + onLoaded(msg); + } + } + + private string GetFontFamilyName() + { + if (!FontFamilyDict.TryGetValue(CustomPreference.GetTextLanguage(), out var value)) + { + return "font_alphabet"; + } + return value; + } + + private void OnErrorCallback(string error) + { + if (onError != null) + { + onError(error); + } + } + + private void OnApplicationFocus(bool focus) + { + if (focus && IsScreenDpiChanged()) + { + UpdateScreenDpi(); + if (Visible) + { + OnDpiChange(); + } + else + { + screenDpiChangedWhileInvisible = true; + } + } + } + + private void OnDpiChange() + { + if (OnDpiChangedAction != null) + { + OnDpiChangedAction(); + } + Vector4 marginBackCoroutine = marginNow; + SetMargins((int)marginBackCoroutine.x, (int)marginBackCoroutine.y, (int)marginBackCoroutine.z - 1, (int)marginBackCoroutine.w - 1); + StartCoroutine(SetMarginBackCoroutine(marginBackCoroutine)); + } + + private IEnumerator SetMarginBackCoroutine(Vector4 oldMargin) + { + yield return new WaitForSecondsRealtime(0.5f); + SetMargins((int)oldMargin.x, (int)oldMargin.y, (int)oldMargin.z, (int)oldMargin.w); + } + + public void ClearFontFilePaths() + { + } + + private void OnDestroy() + { + instance = null; + ClearFontFilePaths(); + } + + public void InitCustomFontFileInfo(Dictionary fileNamePathDict, int currentCustomFontFileIndex) + { + } + + private void InitIOSCustomFont() + { + } + + private void DisableIOSCustomFont() + { + } + + public void OpenWeb(string url) + { + m_WebViewScreen.CurBoxCollider.enabled = true; + SetMargins(UIManager.GetInstance().UIManagerRoot, m_WebViewScreen); + LoadWeb(url); + SetVisible(visible: true); + } + + public void LoadWeb(string url) + { + } + + public void ClearHistory() + { + } + + public void SetMargins(int leftMargin, int topMargin, int rightMargin, int bottomMargin) + { + marginNow = new Vector4(leftMargin, topMargin, rightMargin, bottomMargin); + } + + public void SetMargins(UIRoot trgUIRoot, WebViewScreen trgScreen) + { + float arg = trgUIRoot.activeHeight; + Func func = delegate(float deviceSize, float activeScreenSize, float screenSize, float pos) + { + screenSize += pos * 2f; + screenSize /= activeScreenSize; + screenSize = 1f - screenSize; + return (int)(screenSize * deviceSize * 0.5f); + }; + Vector2 deviceResolution = Toolbox.QualityManager.deviceResolution; + float num = Mathf.Max(deviceResolution.x, deviceResolution.y); + BoxCollider curBoxCollider = trgScreen.CurBoxCollider; + int num2 = (int)(num - num * AspectCamera.SafeAreaRate); + int num3 = (int)(num * AspectCamera.SafeAreaRate) / 30 + num2 / 2; + int rightMargin = num3; + int topMargin = func(deviceResolution.y, arg, curBoxCollider.size.y, curBoxCollider.center.y); + int bottomMargin = func(deviceResolution.y, arg, curBoxCollider.size.y, 0f - curBoxCollider.center.y); + getInstance().SetMargins(num3, topMargin, rightMargin, bottomMargin); + } + + public void UnloadWebView() + { + m_WebViewScreen.CurBoxCollider.enabled = false; + SetVisible(visible: false); + LoadWeb(CustomPreference.GetApplicationServerURL() + "information/blank"); + Callback = null; + OnLoaded = null; + OnError = null; + } + + public void DestroyWebViewObject() + { + } + + public void EvaluateJS(string js) + { + } + + public void SetVisible(bool visible) + { + Visible = visible; + if (visible && screenDpiChangedWhileInvisible) + { + screenDpiChangedWhileInvisible = false; + OnDpiChange(); + } + } + + public void ClearCaches() + { + } + + public void Reload() + { + } + + public bool CanGoBack() + { + return false; + } + + public void GoBack() + { + } + + public void Screenshot() + { + } + + public void SetScreenshotData(int width, int height) + { + } + + public void SetCallback(Action cb) + { + Callback = cb; + } + + public void CacheClear() + { + LoadWeb(CustomPreference.GetApplicationServerURL() + "information/blank"); + } +} diff --git a/SVSim.BattleEngine/Engine/DamageCardParameterModifier.cs b/SVSim.BattleEngine/Engine/DamageCardParameterModifier.cs new file mode 100644 index 0000000..8cb5027 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageCardParameterModifier.cs @@ -0,0 +1,23 @@ +public class DamageCardParameterModifier : TurnAndIntValue, ICardLifeModifier +{ + public int Damage => base.Value; + + public bool IsClearBeforeModifier => false; + + public bool IsChangeMaxLife => false; + + public DamageCardParameterModifier(int damage, int turn, bool isSelfTurn) + : base(damage, turn, isSelfTurn) + { + } + + public int CalcLife(int baseLife) + { + return baseLife - Damage; + } + + public int CalcMaxLife(int baseMaxLife) + { + return baseMaxLife; + } +} diff --git a/SVSim.BattleEngine/Engine/DamageClippingInfo.cs b/SVSim.BattleEngine/Engine/DamageClippingInfo.cs new file mode 100644 index 0000000..52b956e --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageClippingInfo.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +public class DamageClippingInfo +{ + private ISkillParameterSelectFilter _maxFilter; + + private ISkillParameterSelectFilter _minFilter; + + private int _clippingMaxRange = -1; + + private int _clippingMinRange = -1; + + public int ClippingMax { get; private set; } + + public int LifeLowerLimit { get; private set; } = -1; + + public int ClippingRangeMax(List cards) + { + if (_maxFilter != null) + { + return _maxFilter.Filtering(cards).FirstOrDefault(); + } + return _clippingMaxRange; + } + + public int ClippingRangeMin(List cards) + { + if (_minFilter != null) + { + return _minFilter.Filtering(cards).FirstOrDefault(); + } + return _clippingMaxRange; + } + + public bool IsClipping(BattleCardBase card, int value) + { + bool flag = _maxFilter != null || _clippingMaxRange != -1; + bool flag2 = _minFilter != null || _clippingMinRange != -1; + if (!flag && !flag2) + { + return true; + } + List cards = new List { card }; + if (!flag || value <= ClippingRangeMax(cards)) + { + if (flag2) + { + return ClippingRangeMin(cards) <= value; + } + return true; + } + return false; + } + + public DamageClippingInfo(int clippingMax, string maxRange, string minRange, int lifeLowerLimit) + { + ClippingMax = clippingMax; + LifeLowerLimit = lifeLowerLimit; + if (maxRange == null) + { + goto IL_0054; + } + if (!(maxRange == "self_life")) + { + if (maxRange == null || maxRange.Length != 0) + { + goto IL_0054; + } + } + else + { + _maxFilter = new SkillParameterSelectLifeFilter(); + } + goto IL_0060; + IL_0060: + if (minRange != null) + { + if (minRange == "self_life") + { + _minFilter = new SkillParameterSelectLifeFilter(); + return; + } + if (minRange != null && minRange.Length == 0) + { + return; + } + } + _clippingMinRange = int.Parse(minRange); + return; + IL_0054: + _clippingMaxRange = int.Parse(maxRange); + goto IL_0060; + } + + public bool CheckMaxFilter(Type filterType) + { + if (_maxFilter != null) + { + return filterType == _maxFilter.GetType(); + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/DamageCutInfo.cs b/SVSim.BattleEngine/Engine/DamageCutInfo.cs new file mode 100644 index 0000000..4bfe328 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageCutInfo.cs @@ -0,0 +1,24 @@ +public class DamageCutInfo +{ + public enum DamageType + { + ALL, + SKILL + } + + public int CutAmount { get; private set; } + + public DamageType Type { get; private set; } + + public BattleCardBase OwnerCard { get; private set; } + + public string DuplicateBanSkillNum { get; private set; } + + public DamageCutInfo(int amount, DamageType type, BattleCardBase ownerCard, string _duplicateBanSkillNum) + { + CutAmount = amount; + Type = type; + OwnerCard = ownerCard; + DuplicateBanSkillNum = _duplicateBanSkillNum; + } +} diff --git a/SVSim.BattleEngine/Engine/DamageInfo.cs b/SVSim.BattleEngine/Engine/DamageInfo.cs new file mode 100644 index 0000000..8829b5c --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageInfo.cs @@ -0,0 +1,44 @@ +public class DamageInfo +{ + public const string DAMAGE_BATTLE = "battle"; + + public const string DAMAGE_UNIT = "unit"; + + public const string DAMAGE_SPELL = "spell"; + + public const string DAMAGE_FIELD = "field"; + + public SkillBase Skill { get; private set; } + + public int Damage { get; private set; } + + public string DamageKind + { + get + { + if (Skill == null) + { + return "battle"; + } + if (Skill.SkillPrm.ownerCard.IsUnit) + { + return "unit"; + } + if (Skill.SkillPrm.ownerCard.IsSpell) + { + return "spell"; + } + if (Skill.SkillPrm.ownerCard.IsField) + { + return "field"; + } + return ""; + } + } + + public DamageInfo(SkillBase skill, int damage) + { + Skill = skill; + Damage = damage; + } +} diff --git a/SVSim.BattleEngine/Engine/DamageModifier.cs b/SVSim.BattleEngine/Engine/DamageModifier.cs new file mode 100644 index 0000000..6cdc8d4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageModifier.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; + +public class DamageModifier +{ + public List DamageType { get; protected set; } + + public List DamageClan { get; protected set; } + + public bool IsUseClass { get; protected set; } + + public int OrderCount { get; protected set; } + + public virtual int Calc(int damage) + { + return 0; + } + + public bool IsEffective(string damageType, CardBasePrm.ClanType damageClan, bool isUseClass) + { + if (isUseClass != IsUseClass) + { + return false; + } + if (IsUseClass) + { + if (DamageType.Contains(damageType) || DamageType.Contains("_OPT_NULL_")) + { + if (!DamageClan.Contains(damageClan)) + { + return DamageClan.Contains(CardBasePrm.ClanType.NONE); + } + return true; + } + return false; + } + return true; + } +} diff --git a/SVSim.BattleEngine/Engine/DataMgr.cs b/SVSim.BattleEngine/Engine/DataMgr.cs new file mode 100644 index 0000000..4562aab --- /dev/null +++ b/SVSim.BattleEngine/Engine/DataMgr.cs @@ -0,0 +1,1381 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using LitJson; +using Wizard; +using Wizard.AutoTest; +using Wizard.Battle.Recovery; + +public class DataMgr +{ + public enum SpecialBattleResultType + { + None, + Belphomet, + Nerva + } + + public class SpecialBattleSetting + { + public string Id { get; private set; } + + public bool? IsPlayerFirstTurn { get; private set; } + + public string PlayerAttachSkillText { get; private set; } + + public string[] PlayerAttachSkills { get; private set; } + + public string EnemyAttachSkillText { get; private set; } + + public string[] EnemyAttachSkills { get; private set; } + + public int PlayerStartPp { get; private set; } + + public int EnemyStartPp { get; private set; } + + public int PlayerStartLife { get; set; } + + public int PlayerStartMaxLife { get; private set; } + + public int EnemyStartMaxLife { get; private set; } + + public string IdOverrideInBattleLogText { get; private set; } + + public Dictionary IdOverridePairDict { get; private set; } + + public string BanishEffectOverRideText { get; private set; } + + public string[] BanishEffectOverRideIds { get; private set; } + + public string TokenDrawEffectOverrideText { get; private set; } + + public Dictionary TokenDrawOverrideEffectPair { get; private set; } + + public string SpecialTokenDrawEffectOverrideText { get; private set; } + + public Dictionary SpecialTokenDrawOverrideEffectPair { get; private set; } + + public bool IsVsEffectOverride { get; private set; } + + public int ClassDestroyEffectOverride { get; private set; } + + public SpecialBattleSetting(string id, bool? isPlayerFirst, string playerSkill, string enemySkill, int playerPp, int enemyPp, int playerLife, int playerMaxLife, int enemyMaxLife, string idOverrideBattleLogText, string banishEffectOverride, string tokenDrawEffectOverride, string specialTokenDrawEffectOverride, bool isVsEffectOverride, int classDestroyEffectOverride) + { + Id = id; + IsPlayerFirstTurn = isPlayerFirst; + PlayerAttachSkillText = playerSkill; + PlayerAttachSkills = SplitSpecialBattleDataText(PlayerAttachSkillText); + EnemyAttachSkillText = enemySkill; + EnemyAttachSkills = SplitSpecialBattleDataText(EnemyAttachSkillText); + PlayerStartPp = playerPp; + EnemyStartPp = enemyPp; + PlayerStartLife = playerLife; + PlayerStartMaxLife = playerMaxLife; + EnemyStartMaxLife = enemyMaxLife; + IdOverrideInBattleLogText = idOverrideBattleLogText; + IdOverridePairDict = ParseIdOverrideText(IdOverrideInBattleLogText); + BanishEffectOverRideText = banishEffectOverride; + BanishEffectOverRideIds = SplitSpecialBattleDataText(BanishEffectOverRideText); + TokenDrawEffectOverrideText = tokenDrawEffectOverride; + TokenDrawOverrideEffectPair = SplitSpecialBattleDataPair(TokenDrawEffectOverrideText); + SpecialTokenDrawEffectOverrideText = specialTokenDrawEffectOverride; + SpecialTokenDrawOverrideEffectPair = SplitSpecialBattleDataPair(SpecialTokenDrawEffectOverrideText); + IsVsEffectOverride = isVsEffectOverride; + ClassDestroyEffectOverride = classDestroyEffectOverride; + } + } + + public enum BattleType + { + FreeBattle = 0, + RankBattle = 1, + TwoPick = 2, + RoomBattle = 3, + Story = 4, + Practice = 5, + RoomTwoPick = 6, + TwoPickBackdraft = 7, + ColosseumNormal = 8, + ColosseumTwoPick = 9, + ColosseumHof = 31, + Sealed = 32, + ColosseumWindFall = 33, + Gathering = 34, + Quest = 37, + OfflineEvent = 40, + CompetitionNormal = 42, + BossRushQuest = 45, + SecretBossQuest = 46, + CompetitionTwoPick = 47, + Avatar = 48, + ColosseumAvatar = 49, + None = 100 + } + + private int _selectDeckId; + + private Format _selectDeckFormat; + + private IList _currentDeckCardIdList; + + private int _deckMaxCardCount; + + private int _enemyDeckMaxCardCount; + + private IList _currentEnemyDeckData; + + private int _playerCharaId; + + private int _playerSubClassId; + + private long _playerSleeveId; + + private string _playerEmotionId = ""; + + private int _enemyCharaId; + + private int _enemySubClassId; + + private long _enemySleeveId; + + private string _enemyEmotionId = ""; + + public AIDataLibrary m_AIDataLibrary; + + private int _soroPlay3DFieldId = 1; + + private string _storyBgmId = "NONE"; + + public int m_EnemyAIDifficulty; + + public int m_EnemyAILogicLevel; + + public int m_EnemyAIDeckId; + + public int m_EnemyAIStyleId; + + public int m_EnemyAIEmoteId; + + public int m_EnemyAIMaxLife; + + public bool m_EnemyAIUseInnerEmote = true; + + private IDictionary _possessionCardDict; + + private IDictionary _possessionCardDictIncludingSpotCard; + + private IDictionary _isNewCardDict = new Dictionary(); + + private int[] _maintenanceCardIds; + + private IDictionary _classPrmDict; + + private bool _isDirtyPossessionCardDict; + + public const int PRACTICE_DIFFICULTY_DEGREE_EASY = 400001; + + public BattleType m_BattleType = BattleType.None; + + public TwoPickFormat TwoPickFormat; + + public string BattleId = ""; + + private static string[] ClanNameTextIdList = new string[9] { "Common_0104", "Common_0105", "Common_0106", "Common_0107", "Common_0108", "Common_0109", "Common_0110", "Common_0111", "Common_0112" }; + + public static readonly string[] TribeNameTextIdList = new string[18] + { + "TN_ALL", "TN_指揮官", "TN_兵士", "TN_土の印", "TN_マナリア", "TN_アーティファクト", "TN_財宝", "TN_機械", "TN_料理", "TN_レヴィオン", + "TN_自然", "TN_宴楽", "TN_ヒーロー", "TN_武装", "TN_チェス", "TN_八獄", "TN_学園", "" + }; + + public DeckAttributeType LastSelectDeckAttributeType { private get; set; } + + public int PracticeDifficultyDegreeId { get; set; } + + public int Practice3DfieldId { get; set; } + + public DeckData _roomTwoPickDeckData { get; set; } + + public List FavoriteCardList { get; private set; } + + public DeckGroupListData CurrentDeckListParamData { get; set; } + + public SpecialBattleSetting SpecialBattleSettingInfo { get; set; } + + public BattleManagerBase.MissionNecessaryInformation MissionNecessaryInformation { get; set; } = new BattleManagerBase.MissionNecessaryInformation(new Dictionary()); + + private MyRotationInfo _playerMyRotationInfo { get; set; } + + private MyRotationInfo _enemyMyRotationInfo { get; set; } + + private AvatarBattleInfo _playerAvatarBattleInfo { get; set; } + + private AvatarBattleInfo _enemyAvatarBattleInfo { get; set; } + + public QuestBattleData QuestBattleData { get; private set; } + + public BossRushBattleData BossRushBattleData { get; private set; } + + public int PracticePuzzleGroupId { get; set; } + + public int PuzzleQuestId { get; set; } + + public int PuzzleDifficulty { get; set; } + + public int PuzzleEnemyClass { get; set; } + + public QuestSelectionPage.FirstSelectType QuestFirstSelectType { get; set; } + + public int StoryEnemyClassId { get; set; } + + public JsonData RecoveryData { get; private set; } + + public SpecialBattleResultType SkipStorySpecialBattleResult { get; private set; } + + public SpotCardData SpotCardData { get; set; } + + public string TitleId { get; set; } = "0"; + + public bool IsLastSelectDeckAttributeType(DeckAttributeType deckAttributeType) + { + return deckAttributeType == LastSelectDeckAttributeType; + } + + public void SetMissionNecessaryInformation(JsonData data) + { + Dictionary dictionary = new Dictionary(); + if (data.Count > 0) + { + foreach (string key in data.Keys) + { + dictionary.Add(key, data.ToStringOrDefault(key, string.Empty)); + } + } + MissionNecessaryInformation = new BattleManagerBase.MissionNecessaryInformation(dictionary); + } + + public void SetQuestBattleData(QuestBattleData battleData) + { + QuestBattleData = battleData; + } + + public void SetBossRushBattleData(BossRushBattleData battleData) + { + BossRushBattleData = battleData; + } + + public void SetRecoveryData(JsonData recoveryData) + { + RecoveryData = recoveryData; + } + + public void CacheSingleRecovryData() + { + if (RecoveryRecordManagerBase.IsExistsSingleRecoveryFile()) + { + RecoveryData = RecoveryOperationInfo.ReadRecoveryFile(OperationRecorderBase.RecordDirectoryPath + "recovery_single.json"); + } + } + + public static bool IsNetworkBattleType(BattleType battleType) + { + switch (battleType) + { + case BattleType.FreeBattle: + case BattleType.RankBattle: + case BattleType.TwoPick: + case BattleType.RoomBattle: + case BattleType.RoomTwoPick: + case BattleType.TwoPickBackdraft: + case BattleType.ColosseumNormal: + case BattleType.ColosseumTwoPick: + case BattleType.ColosseumHof: + case BattleType.Sealed: + case BattleType.ColosseumWindFall: + case BattleType.Gathering: + case BattleType.CompetitionNormal: + case BattleType.CompetitionTwoPick: + return true; + default: + return false; + } + } + + public bool IsColosseumBattleType() + { + BattleType battleType = m_BattleType; + if ((uint)(battleType - 8) <= 1u || battleType == BattleType.ColosseumHof || battleType == BattleType.ColosseumWindFall) + { + return true; + } + return false; + } + + public bool IsCompetitionBattleType() + { + BattleType battleType = m_BattleType; + if (battleType == BattleType.CompetitionNormal || battleType == BattleType.CompetitionTwoPick) + { + return true; + } + return false; + } + + public static bool IsTwoPickBattleType(BattleType battleType) + { + switch (battleType) + { + case BattleType.TwoPick: + case BattleType.RoomTwoPick: + case BattleType.TwoPickBackdraft: + case BattleType.ColosseumTwoPick: + case BattleType.CompetitionTwoPick: + return true; + default: + return false; + } + } + + public static bool IsEnableFormatIconBattleType(BattleType battleType) + { + switch (battleType) + { + case BattleType.FreeBattle: + case BattleType.RankBattle: + case BattleType.RoomBattle: + case BattleType.ColosseumNormal: + case BattleType.CompetitionNormal: + return true; + default: + return false; + } + } + + public bool IsDipslayHighRankFormat() + { + switch (m_BattleType) + { + case BattleType.TwoPick: + case BattleType.Story: + case BattleType.Practice: + case BattleType.RoomTwoPick: + case BattleType.TwoPickBackdraft: + case BattleType.ColosseumTwoPick: + case BattleType.ColosseumHof: + case BattleType.Sealed: + case BattleType.ColosseumWindFall: + case BattleType.Quest: + case BattleType.BossRushQuest: + case BattleType.SecretBossQuest: + case BattleType.CompetitionTwoPick: + case BattleType.Avatar: + return true; + default: + if (Data.CurrentFormat != Format.Max && Data.CurrentFormat != Format.Windfall && Data.CurrentFormat != Format.MyRotation) + { + return Data.CurrentFormat == Format.Avatar; + } + return true; + } + } + + public bool IsTwoPickBattleType() + { + return IsTwoPickBattleType(m_BattleType); + } + + public bool IsQuestBattleType() + { + return IsQuestBattleType(m_BattleType); + } + + public static bool IsQuestBattleType(BattleType battleType) + { + if (battleType == BattleType.Quest || (uint)(battleType - 45) <= 1u) + { + return true; + } + return false; + } + + public bool IsFormatEnableBattleType() + { + switch (m_BattleType) + { + case BattleType.TwoPick: + case BattleType.Story: + case BattleType.Practice: + case BattleType.ColosseumTwoPick: + case BattleType.ColosseumHof: + case BattleType.Sealed: + case BattleType.ColosseumWindFall: + case BattleType.Quest: + case BattleType.BossRushQuest: + case BattleType.SecretBossQuest: + return false; + default: + if (Data.CurrentFormat == Format.Avatar) + { + return false; + } + if (IsTwoPickBattleType() || Data.CurrentFormat == Format.Max || Data.CurrentFormat == Format.PreRotation || Data.CurrentFormat == Format.Windfall || Data.CurrentFormat == Format.MyRotation || Data.CurrentFormat == Format.TwoPick) + { + return false; + } + return true; + } + } + + public bool IsRoomBattleType() + { + BattleType battleType = m_BattleType; + if (battleType == BattleType.RoomBattle || (uint)(battleType - 6) <= 1u) + { + return true; + } + return false; + } + + public static bool IsSingleBattleType(BattleType battleType) + { + if ((uint)(battleType - 4) <= 1u || battleType == BattleType.Quest || (uint)(battleType - 45) <= 1u) + { + return true; + } + return false; + } + + public DataMgr() + { + _possessionCardDict = new Dictionary(); + _possessionCardDictIncludingSpotCard = new Dictionary(); + _maintenanceCardIds = null; + m_AIDataLibrary = new AIDataLibrary(); + FavoriteCardList = new List(); + PracticeDifficultyDegreeId = 400001; + } + + public void PrintAIDataLibraryOnlyDebug() + { + } + + public void Load() + { + LoadClassData(); + } + + public void LoadEnemy() + { + LoadEnemyClassData(); + } + + public void LoadClassData() + { + if (_playerCharaId == 0) + { + SetPlayerCharaId(1); + } + SetPlayerSleeveId(_playerSleeveId); + } + + public void ResetEnemyData() + { + _currentEnemyDeckData = null; + } + + public void LoadEnemyClassData() + { + if (_enemyCharaId == 0) + { + SetEnemyCharaId(1); + } + SetEnemySleeveId(_enemySleeveId); + } + + public void RegisterAICommonData() + { + for (int i = 0; i < Data.Master.AIBasicDataList.Set.Count; i++) + { + AICardDataAsset asset = Data.Master.AIBasicDataList.Set[i]; + m_AIDataLibrary.RegisterBasicData(asset); + } + for (int j = 0; j < Data.Master.AICommonDataList.Set.Count; j++) + { + AICardDataAsset asset2 = Data.Master.AICommonDataList.Set[j]; + m_AIDataLibrary.RegisterCommonData(asset2); + } + for (int k = 0; k < Data.Master.AIAllyCommonDataList.Set.Count; k++) + { + AICardDataAsset asset3 = Data.Master.AIAllyCommonDataList.Set[k]; + m_AIDataLibrary.RegisterAllyCommonData(asset3); + } + m_AIDataLibrary.RegisterCommonStyle(Data.Master.AIStyleCommonDataList); + } + + public void RegisterAIDeckData() + { + if (Data.Master.AIDeckDic == null) + { + return; + } + foreach (KeyValuePair item in Data.Master.AIDeckDic) + { + m_AIDataLibrary.RegisterDeckToDeckDic(item.Key, item.Value.Set); + } + } + + public void RegisterAIStyleData() + { + foreach (KeyValuePair> item in Data.Master.AIStyleDic) + { + m_AIDataLibrary.RegisterDeckStyle(item.Key, item.Value); + } + } + + public void RegisterAIEmoteData() + { + foreach (KeyValuePair> item in Data.Master.AIEmoteDic) + { + AIEmoteSet aIEmoteSet = new AIEmoteSet(); + aIEmoteSet.CreateFromAsset(item.Value); + m_AIDataLibrary.RegisterEmoteSet(item.Key, aIEmoteSet); + } + } + + public void RegisterAllAIData() + { + m_AIDataLibrary.Clear(); + RegisterAICommonData(); + RegisterAIDeckData(); + RegisterAIStyleData(); + RegisterAIEmoteData(); + } + + public void SetPlayerCharaId(int charaId) + { + _playerCharaId = charaId; + SetPlayerSubClassID(10); + SetPlayerMyRotationInfo(""); + } + + public void SetPlayerSubClassID(int subClassId) + { + _playerSubClassId = subClassId; + } + + public void SetPlayerMyRotationInfo(string myRotationId) + { + _playerMyRotationInfo = Data.MyRotationAllInfo.Get(myRotationId); + } + + public void SetPlayerAvatarBattleInfo(string id) + { + _playerAvatarBattleInfo = Data.AvatarBattleAllInfo.Get(id); + } + + public void SetPlayerCharaIdByClassId(int classId, bool isCurrentChara = true) + { + SetPlayerCharaId(GetCharaPrmByClassId(classId, isCurrentChara).chara_id); + } + + public void SetPlayerCharaIdBySkinId(int skinId) + { + SetPlayerCharaId(GetCharaPrmBySkinId(skinId).chara_id); + } + + public void SetPlayerSleeveId(long sleeveId) + { + _playerSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(GetAbleSleeveId(sleeveId)); + } + + public void SetEnemyCharaId(int charaId) + { + _enemyCharaId = charaId; + SetEnemySubClassID(10); + SetEnemyMyRotationInfo(""); + } + + public void SetEnemySubClassID(int classId) + { + _enemySubClassId = classId; + } + + public void SetEnemyMyRotationInfo(string myRotationId) + { + _enemyMyRotationInfo = Data.MyRotationAllInfo.Get(myRotationId); + } + + public void SetEnemyAvatarBattleInfo(string id) + { + _enemyAvatarBattleInfo = Data.AvatarBattleAllInfo.Get(id); + } + + public void ClearEnemyAvatarBattleInfo() + { + _enemyAvatarBattleInfo = null; + } + + public void SetEnemySleeveId(long sleeveId) + { + _enemySleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(GetAbleSleeveId(sleeveId)); + } + + public bool GetSelectDefDeck() + { + if (_selectDeckId == 0) + { + return PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.LAST_BATTLE_IS_DEFDECK); + } + return IsLastSelectDeckAttributeType(DeckAttributeType.DefaultDeck); + } + + public void SetSelectDeckId(int id) + { + _selectDeckId = id; + } + + public void SetSelectDeckFormat(Format format) + { + _selectDeckFormat = format; + } + + public Format GetSelectDeckFormat() + { + return _selectDeckFormat; + } + + public void SetCurrentDeckData(IList deckdata) + { + _currentDeckCardIdList = deckdata; + } + + public void SetCurrentEnemyDeckData(IList deckdata) + { + _currentEnemyDeckData = deckdata; + } + + public void SetDeckMaxCount(int count, bool isSelf) + { + if (count != -1 && count != 0) + { + if (isSelf) + { + _deckMaxCardCount = count; + } + else + { + _enemyDeckMaxCardCount = count; + } + } + } + + public void SetStoryAILogicAndDeckData(int classId, int enemyAiId) + { + StoryAISettingData settingData = Data.Master.StoryAISettingList.GetSettingData(enemyAiId); + SetCurrentEnemyDeckDataFromAIDeck(classId, -1, settingData.LogicLevel, 20, settingData.DeckId, settingData.StyleId, settingData.EmoteId, settingData.UseInnerEmote, enemyAiId); + } + + public void SetQuestAILogicAndDeckData(int classId, int enemyAiId) + { + StoryAISettingData settingData = Data.Master.QuestAISettingList.GetSettingData(enemyAiId); + SetCurrentEnemyDeckDataFromAIDeck(classId, -1, settingData.LogicLevel, 20, settingData.DeckId, settingData.StyleId, settingData.EmoteId, settingData.UseInnerEmote, enemyAiId); + } + + public void SetRankMatchAILogicAndDeckData(int enemyAiId) + { + RankMatchAISettingData settingData = Data.Master.RankMatchAISettingList.GetSettingData(enemyAiId); + SetCurrentEnemyDeckDataFromAIDeck(settingData.ClassId, -1, 2, 20, settingData.DeckId, settingData.StyleId, -1, useInnerEmote: false, enemyAiId); + } + + public void SetCurrentEnemyDeckDataFromAIDeck(int classID, int difficulty, int logicLevel, int maxLife, int deckId, int styleId, int emoteId, bool useInnerEmote, int enemyAiID = -1, List specialAbilityIdList = null) + { + if (classID == 0) + { + classID = 8; + } + m_EnemyAIDifficulty = difficulty; + m_EnemyAIDeckId = deckId; + m_EnemyAIStyleId = styleId; + m_EnemyAIEmoteId = emoteId; + m_EnemyAILogicLevel = logicLevel; + m_EnemyAIMaxLife = maxLife; + m_EnemyAIUseInnerEmote = useInnerEmote; + AITestGlobal.AI_MAX_LIFE = maxLife; + AI_LOGIC_LV logicLv = AI_LOGIC_LV.STRONG; + switch (logicLevel) + { + case 0: + logicLv = AI_LOGIC_LV.WEAK; + break; + case 1: + logicLv = AI_LOGIC_LV.MIDDLE; + break; + case 2: + logicLv = AI_LOGIC_LV.STRONG; + break; + } + string text = "ai/" + Data.Master.AIDeckFileNameList.GetFileName(deckId); + string styleName = "ai/" + Data.Master.AIStyleFileNameList.GetFileName(styleId); + string emoteName = "ai/" + Data.Master.AIEmoteFileNameList.GetFileName(emoteId); + m_AIDataLibrary.SaveBattleSetUpInfo(classID, logicLv, text, styleName, emoteName, useEmote: true, useInnerEmote, enemyAiID, specialAbilityIdList); + SetCurrentEnemyDeckDataFromAIDeck(text); + } + + public void SetEnemyAIDeckFromCustomDeck(int classId, IList deck, int difficulty = 2, int logicLevel = 2, int maxLife = 20, int styleId = 0, int emoteId = 0, bool useInnerEmote = true, int enemyAiID = -1) + { + m_EnemyAIDifficulty = difficulty; + m_EnemyAIDeckId = int.MinValue; + m_EnemyAIStyleId = styleId; + m_EnemyAIEmoteId = emoteId; + m_EnemyAILogicLevel = logicLevel; + m_EnemyAIMaxLife = maxLife; + m_EnemyAIUseInnerEmote = useInnerEmote; + AITestGlobal.AI_MAX_LIFE = m_EnemyAIMaxLife; + AI_LOGIC_LV logicLv = AI_LOGIC_LV.STRONG; + switch (logicLevel) + { + case 0: + logicLv = AI_LOGIC_LV.WEAK; + break; + case 1: + logicLv = AI_LOGIC_LV.MIDDLE; + break; + case 2: + logicLv = AI_LOGIC_LV.STRONG; + break; + } + string styleName = "ai/" + Data.Master.AIStyleFileNameList.GetFileName(styleId); + string emoteName = "ai/" + Data.Master.AIEmoteFileNameList.GetFileName(emoteId); + m_AIDataLibrary.SaveBattleSetUpInfo(classId, logicLv, "", styleName, emoteName, useEmote: true, m_EnemyAIUseInnerEmote, enemyAiID, null); + SetCurrentEnemyDeckData(deck); + } + + public void SetCurrentEnemyDeckDataFromAIDeck(string deckName) + { + AIDeckData aIDeckData = m_AIDataLibrary.SearchDeckData(deckName); + if (aIDeckData == null) + { + return; + } + _currentEnemyDeckData = new List(); + foreach (KeyValuePair item in aIDeckData.CardDic) + { + for (int i = 0; i < item.Value.CardNum; i++) + { + _currentEnemyDeckData.Add(item.Key); + } + } + } + + public void SetUserOwnCardData(IDictionary userowncarddata) + { + _possessionCardDict = userowncarddata; + SetDirtyPossessionCardDict(); + } + + public void SetClassPrm(JsonData userClassCharaList, JsonData userRankMatchList) + { + Dictionary dictionary = new Dictionary(); + for (int i = 0; i < userClassCharaList.Count; i++) + { + JsonData jsonData = userClassCharaList[i]; + int num = jsonData["class_id"].ToInt(); + if (num < 1 || 9 <= num) + { + continue; + } + ClassCharaPrm classCharaPrm = new ClassCharaPrm(); + classCharaPrm.SetParamWithUserClassJson(jsonData); + for (int j = 0; j < userRankMatchList.Count; j++) + { + JsonData jsonData2 = userRankMatchList[j]; + if (jsonData2["class_id"].ToInt() == num) + { + classCharaPrm.SetClassCharaWin(jsonData2["win"].ToInt()); + classCharaPrm.SetClassCharaBattleCount(jsonData2["match_count"].ToInt()); + } + } + dictionary.Add(num, classCharaPrm); + } + _classPrmDict = dictionary; + } + + public void SetSoroPlay3DFieldID(int fieldID) + { + _soroPlay3DFieldId = fieldID; + } + + public void SetStoryBgmID(string bgmID) + { + _storyBgmId = bgmID; + } + + public void SetSpecialBattleSetting(bool? isPlayerFirst, string playerSkill, string enemySkill, int playerPp, int enemyPp, int playerLife, int playerMaxLife, int enemyMaxLife, string idOverrideBattleLogText, string id = "", string banishEffectOverride = "", string tokenDrawEffectOverride = "", string specialTokenDrawEffectOverride = "", int skipResult = 0, bool isVsEffectOverride = false, int classDestroyEffectOverride = 0) + { + SpecialBattleSettingInfo = new SpecialBattleSetting(id, isPlayerFirst, playerSkill, enemySkill, playerPp, enemyPp, playerLife, playerMaxLife, enemyMaxLife, idOverrideBattleLogText, banishEffectOverride, tokenDrawEffectOverride, specialTokenDrawEffectOverride, isVsEffectOverride, classDestroyEffectOverride); + SkipStorySpecialBattleResult = (SpecialBattleResultType)skipResult; + } + + public void ClearSpecialBattleSettingInfo() + { + SpecialBattleSettingInfo = null; + } + + public void ResetStorySpecialBattleResultSkipFlag() + { + SkipStorySpecialBattleResult = SpecialBattleResultType.None; + } + + private static Dictionary ParseIdOverrideText(string idOverrideText) + { + if (string.IsNullOrEmpty(idOverrideText)) + { + return null; + } + Dictionary dictionary = new Dictionary(); + string[] array = SplitSpecialBattleDataText(idOverrideText); + for (int i = 0; i < array.Length; i++) + { + string[] array2 = array[i].Split('='); + dictionary.Add(int.Parse(array2[0]), int.Parse(array2[1])); + dictionary.Add(int.Parse(array2[0]) + 1, int.Parse(array2[1]) + 1); + } + return dictionary; + } + + private static string[] SplitSpecialBattleDataText(string text) + { + return text.Split(','); + } + + private static Dictionary SplitSpecialBattleDataPair(string text) + { + string[] array = text.Split(','); + Dictionary dictionary = new Dictionary(); + for (int i = 0; i < array.Count(); i++) + { + string[] array2 = array[i].Split('='); + if (array2.Length == 2) + { + int key = int.Parse(array2[0]); + dictionary[key] = array2[1]; + } + } + return dictionary; + } + + public string GetClanNameByKey(int intclantype) + { + if (intclantype < ClanNameTextIdList.Length) + { + return Data.SystemText.Get(ClanNameTextIdList[intclantype]); + } + return ""; + } + + public static string GetTribeNameByKey(int tribeType) + { + if (tribeType >= TribeNameTextIdList.Length) + { + return ""; + } + string text = TribeNameTextIdList[tribeType]; + if (string.IsNullOrEmpty(text)) + { + return ""; + } + return Data.Master.GetTribeNameText(text); + } + + public IDictionary GetClassPrmDictionary() + { + return _classPrmDict; + } + + public ClassCharaPrm GetClassPrm(int classId) + { + return _classPrmDict[classId]; + } + + public ClassCharacterMasterData GetCharaPrmByClassId(int classId, bool isCurrentChara = true) + { + ClassCharaPrm classPrm = GetClassPrm(classId); + if (!isCurrentChara) + { + return classPrm.DefaultCharaData; + } + return classPrm.CurrentCharaData; + } + + public ClassCharacterMasterData GetCharaPrmByCharaId(int charaId) + { + return Data.Master.ClassCharacterList.Find((ClassCharacterMasterData x) => x.chara_id == charaId); + } + + public ClassCharacterMasterData GetCharaPrmBySkinId(int skinId) + { + return Data.Master.ClassCharacterList.Find((ClassCharacterMasterData x) => x.skin_id == skinId && x.is_usable); + } + + public int GetPlayerCharaId() + { + if (_playerCharaId == 0) + { + return PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_BATTLE_LEADER_ID); + } + return _playerCharaId; + } + + public int GetPlayerSubClassId() + { + return _playerSubClassId; + } + + public bool TryGetPlayerSubClassId(out int subClassId) + { + subClassId = GetPlayerSubClassId(); + return IsValidSubClass(subClassId); + } + + private static bool IsValidSubClass(int subClassId) + { + if (subClassId > 0) + { + return subClassId != 10; + } + return false; + } + + public bool TryGetPlayerMyRotationInfo(out MyRotationInfo myRotationInfo) + { + myRotationInfo = _playerMyRotationInfo; + return myRotationInfo != null; + } + + public bool TryGetPlayerAvatarBattleInfo(out AvatarBattleInfo avatarBattleInfo) + { + avatarBattleInfo = _playerAvatarBattleInfo; + return avatarBattleInfo != null; + } + + public ClassCharacterMasterData GetPlayerCharaData() + { + return GetCharaPrmByCharaId(GetPlayerCharaId()); + } + + public ClassCharacterMasterData GetPlayerSubCharaData() + { + return GetCharaPrmByCharaId(GetPlayerSubClassId()); + } + + public int GetPlayerClassId() + { + return GetPlayerCharaData().class_id; + } + + public int GetPlayerSkinId() + { + return GetPlayerCharaData().skin_id; + } + + public long GetPlayerSleeveId() + { + return GetAbleSleeveId(_playerSleeveId); + } + + public int GetPlayerBattleSkillReverse() + { + return GetPlayerCharaData().battle_skin_reverse; + } + + public Dictionary GetPlayerEmotionData() + { + return Data.Master._emotionDic[GetPlayerEmotionId()]; + } + + public string GetPlayerEmotionId() + { + if (!(_playerEmotionId == "")) + { + return _playerEmotionId; + } + return GetPlayerSkinId().ToString(); + } + + public void SetPlayerEmotionId(string id) + { + _playerEmotionId = id; + } + + public Dictionary GetEnemyEmotionData() + { + return Data.Master._emotionDic[GetEnemyEmotionId()]; + } + + public string GetEnemyEmotionId() + { + if (!(_enemyEmotionId == "")) + { + return _enemyEmotionId; + } + return GetEnemySkinId().ToString(); + } + + public void SetEnemyEmotionId(string id) + { + _enemyEmotionId = id; + } + + public int GetEnemyCharaId() + { + if (_enemyCharaId == 0) + { + return 1; + } + return _enemyCharaId; + } + + public int GetEnemySubClassId() + { + return _enemySubClassId; + } + + public bool TryGetEnemySubClassId(out int subClassId) + { + subClassId = GetEnemySubClassId(); + return IsValidSubClass(subClassId); + } + + public ClassCharacterMasterData GetEnemyCharaData() + { + return GetCharaPrmByCharaId(GetEnemyCharaId()); + } + + public ClassCharacterMasterData GetEnemySubCharaData() + { + return GetCharaPrmByCharaId(GetEnemySubClassId()); + } + + public int GetEnemyClassId() + { + if (GameMgr.GetIns().IsPuzzleQuest) + { + return PuzzleEnemyClass; + } + if (m_BattleType == BattleType.Story) + { + return StoryEnemyClassId; + } + return GetEnemyCharaData().class_id; + } + + public int GetEnemySkinId() + { + return GetEnemyCharaData().skin_id; + } + + public bool TryGetEnemyMyRotationInfo(out MyRotationInfo myRotationInfo) + { + myRotationInfo = _enemyMyRotationInfo; + return myRotationInfo != null; + } + + public bool TryGetEnemyAvatarBattleInfo(out AvatarBattleInfo avatarBattleInfo) + { + avatarBattleInfo = _enemyAvatarBattleInfo; + return avatarBattleInfo != null; + } + + public long GetEnemySleeveId() + { + return GetAbleSleeveId(_enemySleeveId); + } + + public int GetEnemyBattleSkillReverse() + { + return GetEnemyCharaData().battle_skin_reverse; + } + + public bool IsHighRankSkinPlayer() + { + return GetPlayerCharaData().IsHighRank; + } + + public bool IsHighRankSkinEnemy() + { + return GetEnemyCharaData().IsHighRank; + } + + public bool Is3DSkin(bool isPlayer) + { + if (isPlayer) + { + return GetPlayerCharaData().Is3d; + } + return GetEnemyCharaData().Is3d; + } + + public bool IsEvolveSkin(bool isPlayer) + { + if (isPlayer) + { + return GetPlayerCharaData().IsEvolveSkin; + } + return GetEnemyCharaData().IsEvolveSkin; + } + + public int GetEvolutionDelayFrame(bool isPlayer) + { + if (isPlayer) + { + return GetPlayerCharaData().EvolutionDelayFrame; + } + return GetEnemyCharaData().EvolutionDelayFrame; + } + + public bool IsSelectEmptyDeck() + { + if (_selectDeckId != -1) + { + return false; + } + return true; + } + + public int GetSelectDeckId() + { + if (_selectDeckId == 0) + { + return PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_BATTLE_DECK_ID); + } + return _selectDeckId; + } + + public IList GetCurrentDeckData() + { + return _currentDeckCardIdList; + } + + public IList GetCurrentEnemyDeckData() + { + return _currentEnemyDeckData; + } + + public int GetDeckMaxCount(bool isSelf) + { + if (!isSelf) + { + return _enemyDeckMaxCardCount; + } + return _deckMaxCardCount; + } + + public IDictionary GetUserOwnCardData(bool isIncludingSpotCard) + { + if (isIncludingSpotCard) + { + if (_isDirtyPossessionCardDict) + { + UpdatePossessionCardDictIncludingSpotCard(); + _isDirtyPossessionCardDict = false; + } + return _possessionCardDictIncludingSpotCard; + } + return _possessionCardDict; + } + + public Dictionary ClonePossessionCardDictionary(bool isIncludingSpotCard) + { + return new Dictionary(GetUserOwnCardData(isIncludingSpotCard)); + } + + public bool HasPossesionCardInfo(int cardId, bool isIncludingSpotCard) + { + return GetUserOwnCardData(isIncludingSpotCard).ContainsKey(cardId); + } + + public int GetPossessionCardNum(int cardId, bool isIncludingSpotCard) + { + int value = 0; + GetUserOwnCardData(isIncludingSpotCard).TryGetValue(cardId, out value); + return value; + } + + public static int GetPossessionBaseCardNum(int baseCardId, IDictionary cardPool, CardMaster.CardMasterId cardMasterId) + { + CardMaster instance = CardMaster.GetInstance(cardMasterId); + int num = 0; + foreach (KeyValuePair item in cardPool) + { + if (instance.GetCardParameterFromId(item.Key).BaseCardId == baseCardId) + { + try + { + num = checked(num + item.Value); + } + catch (OverflowException) + { + return int.MaxValue; + } + } + } + return num; + } + + public int GetPossessionBaseCardNum(int baseCardId, bool isIncludingSpotCard, CardMaster.CardMasterId cardMasterId) + { + return GetPossessionBaseCardNum(baseCardId, GetUserOwnCardData(isIncludingSpotCard), cardMasterId); + } + + public void UpdatePossessionCardNum(int cardId, int num) + { + GetUserOwnCardData(isIncludingSpotCard: false)[cardId] = num; + SetDirtyPossessionCardDict(); + } + + public void RemovePossessionCard(int cardId) + { + IDictionary userOwnCardData = GetUserOwnCardData(isIncludingSpotCard: false); + if (userOwnCardData.ContainsKey(cardId)) + { + userOwnCardData[cardId] = 0; + SetDirtyPossessionCardDict(); + } + } + + public List GetPossessionCardIdList(bool isIncludingSpotCard) + { + return GetUserOwnCardData(isIncludingSpotCard).Keys.ToList(); + } + + public Dictionary GetPossessionBaseCardDictionary(bool isIncludingSpotCard, CardMaster.CardMasterId cardMasterId) + { + CardMaster instance = CardMaster.GetInstance(cardMasterId); + Dictionary dictionary = new Dictionary(); + foreach (KeyValuePair userOwnCardDatum in GetUserOwnCardData(isIncludingSpotCard)) + { + int baseCardId = instance.GetCardParameterFromId(userOwnCardDatum.Key).BaseCardId; + int value = 0; + if (dictionary.TryGetValue(baseCardId, out value)) + { + try + { + dictionary[baseCardId] = checked(value + userOwnCardDatum.Value); + } + catch (OverflowException) + { + dictionary[baseCardId] = int.MaxValue; + } + } + else + { + dictionary.Add(baseCardId, userOwnCardDatum.Value); + } + } + return dictionary; + } + + private void UpdatePossessionCardDictIncludingSpotCard() + { + _possessionCardDictIncludingSpotCard = SpotCardData.CreateDictionaryIncludingSpotCard(_possessionCardDict); + } + + public void SetDirtyPossessionCardDict() + { + _isDirtyPossessionCardDict = true; + } + + public void UpdateUserOwnCardData(int cardid, int num) + { + bool isNew = !HasPossesionCardInfo(cardid, isIncludingSpotCard: false); + SetIsNewCard(cardid, isNew); + if (_possessionCardDict.ContainsKey(cardid)) + { + _possessionCardDict[cardid] = num; + } + else + { + _possessionCardDict.Add(cardid, num); + } + SetDirtyPossessionCardDict(); + } + + public bool IsNewCard(int cardId) + { + if (!_isNewCardDict.TryGetValue(cardId, out var value)) + { + return false; + } + return value; + } + + public void SetIsNewCard(int cardId, bool isNew) + { + _isNewCardDict[cardId] = isNew; + } + + public void RegisterUserOwnCardData(int cardId, int num) + { + _possessionCardDict.Add(cardId, num); + SetDirtyPossessionCardDict(); + } + + public void UnregisterUserOwnCardData(int cardId) + { + _possessionCardDict.Remove(cardId); + SetDirtyPossessionCardDict(); + } + + public int GetSoroPlay3DFieldID() + { + return _soroPlay3DFieldId; + } + + public string GetStoryBgmID() + { + return _storyBgmId; + } + + public void SetMaintenanceCardIds(JsonData responseData) + { + if (responseData == null) + { + _maintenanceCardIds = null; + return; + } + _maintenanceCardIds = new int[responseData.Count]; + for (int i = 0; i < responseData.Count; i++) + { + _maintenanceCardIds[i] = responseData[i]["card_id"].ToInt(); + } + } + + public void SetMaintenanceCardIds(int[] ids) + { + _maintenanceCardIds = ids; + } + + public bool IsMaintenanceCard(int id) + { + if (_maintenanceCardIds != null) + { + return _maintenanceCardIds.Contains(id); + } + return false; + } + + public Dictionary GetEmotionDataBySkinId(string skinId) + { + if (!Data.Master._emotionDic.ContainsKey(skinId)) + { + LocalLog.AccumulateTraceLog("Not contain key given. skinId : " + skinId + " emotionMasterKeyCount : " + Data.Master._emotionDic.Keys.Count); + } + return Data.Master._emotionDic[skinId]; + } + + public static long GetAbleSleeveId(long sleeveId) + { + return Data.Master.SleeveMgr.Get(sleeveId).sleeve_id; + } +} diff --git a/SVSim.BattleEngine/Engine/Debug.cs b/SVSim.BattleEngine/Engine/Debug.cs new file mode 100644 index 0000000..5463c2a --- /dev/null +++ b/SVSim.BattleEngine/Engine/Debug.cs @@ -0,0 +1,129 @@ +using System; +using System.Diagnostics; +using UnityEngine; +using Wizard; + +public static class Debug +{ + public static bool isDebugBuild => UnityEngine.Debug.isDebugBuild; + + [Conditional("CYG_DEBUG")] + public static void Assert(bool condition) + { + } + + [Conditional("CYG_DEBUG")] + public static void Assert(bool condition, string message) + { + } + + [Conditional("CYG_DEBUG")] + public static void Assert(bool condition, string format, params object[] args) + { + } + + [Conditional("CYG_DEBUG")] + public static void Break() + { + } + + [Conditional("CYG_DEBUG")] + public static void ClearDeveloperConsole() + { + } + + [Conditional("CYG_DEBUG")] + public static void DrawLine(Vector3 start, Vector3 end) + { + } + + [Conditional("CYG_DEBUG")] + public static void DrawLine(Vector3 start, Vector3 end, Color color) + { + } + + [Conditional("CYG_DEBUG")] + public static void DrawLine(Vector3 start, Vector3 end, Color color, float duration) + { + } + + [Conditional("CYG_DEBUG")] + public static void DrawLine(Vector3 start, Vector3 end, Color color, float duration, bool depthTest) + { + } + + [Conditional("CYG_DEBUG")] + public static void DrawRay(Vector3 start, Vector3 dir) + { + } + + [Conditional("CYG_DEBUG")] + public static void DrawRay(Vector3 start, Vector3 dir, Color color) + { + } + + [Conditional("CYG_DEBUG")] + public static void DrawRay(Vector3 start, Vector3 dir, Color color, float duration) + { + } + + [Conditional("CYG_DEBUG")] + public static void DrawRay(Vector3 start, Vector3 dir, Color color, float duration, bool depthTest) + { + } + + [Conditional("CYG_DEBUG")] + public static void Log(object message, UnityEngine.Object context = null) + { + } + + [Conditional("CYG_DEBUG")] + public static void LogFormat(string format, params object[] args) + { + } + + [Conditional("CYG_DEBUG")] + public static void LogFormat(UnityEngine.Object context, string format, params object[] args) + { + } + + public static void LogError(object message, UnityEngine.Object context = null) + { + LocalLog.AccumulateTraceLog(message.ToString()); + } + + public static void LogErrorFormat(string format, params object[] args) + { + LocalLog.AccumulateTraceLog(format.ToString()); + } + + public static void LogErrorFormat(UnityEngine.Object context, string format, params object[] args) + { + LocalLog.AccumulateTraceLog(context.ToString() + "Context:" + context.ToString() + "Params:" + args.ToString()); + } + + public static void LogException(Exception exception) + { + LocalLog.AccumulateTraceLog(exception.ToString()); + } + + public static void LogException(Exception exception, UnityEngine.Object context) + { + LocalLog.AccumulateTraceLog(exception.ToString() + "Context:" + context.ToString()); + } + + [Conditional("CYG_DEBUG")] + public static void LogWarning(object message, UnityEngine.Object context = null) + { + } + + [Conditional("CYG_DEBUG")] + public static void LogWarningFormat(string format, params object[] args) + { + } + + [Conditional("CYG_DEBUG")] + public static void LogWarningFormat(UnityEngine.Object context, string format, params object[] args) + { + } +} diff --git a/SVSim.BattleEngine/Engine/DeckCreateMenuUI.cs b/SVSim.BattleEngine/Engine/DeckCreateMenuUI.cs new file mode 100644 index 0000000..303cbba --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckCreateMenuUI.cs @@ -0,0 +1,638 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.DeckCardEdit; +using Wizard.Dialog.Setting; + +public class DeckCreateMenuUI : MonoBehaviour +{ + private enum DeckCopyCodeType + { + QRCode, + DeckCode + } + + public const int DECK_CODE_LENGTH_MIN = 4; + + [SerializeField] + private UIButton m_btnCreateNew; + + [SerializeField] + private UIButton m_btnCopy; + + [SerializeField] + private UIButton m_btnDeckCode; + + [SerializeField] + private UIButton m_btnAutoDeck; + + [SerializeField] + private UIButton _btnCamera; + + [SerializeField] + private UIButton _btnLibrary; + + [SerializeField] + private DeckCopyDialog _deckCopyDialogPrefab; + + [SerializeField] + private DeckCopyDialog _useSubClassDeckCopyDialogPrefab; + + [SerializeField] + private SubClassSelectDialog _subClassSelectDialogPrefab; + + [SerializeField] + private ItemToggle _foilPreferred; + + [SerializeField] + private ItemToggle _isPrizePreferred; + + [SerializeField] + private UISprite _centerSeparatorLine; + + private DialogBase _parentDialog; + + private Format _format; + + private ConventionDeckList _conventionDeckList; + + private IFormatBehavior _formatBehavior; + + private Action _onStartChangeViewScene; + + private const float CENTER_SEPARATOR_LINE_OFFSET = -70f; + + private static readonly Version ENABLE_USE_CAMERA_LIBRARY_IOS_VERSION = new Version("11.0"); + + public static void ShowDeckCreateMenu(DeckData deck, ConventionDeckList conventionDeckList, Action onStartChangeViewScene = null) + { + Format format = deck.Format; + DeckCardEditUI.SetDeckEditParameter(deck, conventionDeckList); + DeckCreateMenuUI menu = UnityEngine.Object.Instantiate(UIManager.GetInstance()._deckCreateMenuOriginal); + UnityEngine.Object.Destroy(menu._btnCamera.gameObject); + menu._btnLibrary.gameObject.transform.SetSiblingIndex(0); + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(Data.SystemText.Get("Card_0108")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetPanelDepth(10); + if (conventionDeckList == null) + { + menu._foilPreferred.gameObject.SetActive(value: true); + menu._foilPreferred.SetTitleLabel("プレミアムカード優先"); + menu._foilPreferred.SetValue(Data.Load.data._userConfig.IsFoilPreferred); + menu._foilPreferred.SetActive_SeparatorLine(isActive: true); + menu._foilPreferred.AddChangeCallback(delegate + { + DeckCardEditUI.SendConfigUpdateFoilPreferred(menu._foilPreferred.GetValue()); + }); + menu._isPrizePreferred.gameObject.SetActive(value: true); + menu._isPrizePreferred.SetTitleLabel("絵違いカード優先"); + menu._isPrizePreferred.SetValue(Data.Load.data._userConfig.IsPrizePreferred); + menu._isPrizePreferred.SetActive_SeparatorLine(isActive: true); + menu._isPrizePreferred.AddChangeCallback(delegate + { + DeckCardEditUI.SendConfigUpdatePrizePreferred(menu._isPrizePreferred.GetValue()); + }); + } + dialogBase.SetObj(menu.gameObject); + if (conventionDeckList != null) + { + Vector3 localPosition = menu.transform.localPosition; + localPosition.y = -70f; + menu.transform.localPosition = localPosition; + menu._centerSeparatorLine.gameObject.SetActive(value: false); + } + DeckCreateMenuUI component = menu.GetComponent(); + component.SetParentDialog(dialogBase); + component._format = format; + component._conventionDeckList = conventionDeckList; + component._formatBehavior = FormatBehaviorManager.Create(format, conventionDeckList); + component._onStartChangeViewScene = onStartChangeViewScene; + } + + private void OnSelectFinally() + { + DeckCardEditUI.CurrentDeckName = null; + if (_parentDialog != null) + { + _parentDialog.CloseWithoutSelect(); + _parentDialog = null; + } + } + + private void Start() + { + UIEventListener.Get(m_btnCreateNew.gameObject).onClick = OnClickCreateNew; + UIEventListener.Get(m_btnCopy.gameObject).onClick = OnClickCopy; + UIEventListener.Get(m_btnDeckCode.gameObject).onClick = OnClickDeckCode; + UIEventListener.Get(m_btnAutoDeck.gameObject).onClick = OnClickAutoDeck; + UIEventListener.Get(_btnCamera.gameObject).onClick = OnClickFromCamera; + UIEventListener.Get(_btnLibrary.gameObject).onClick = OnClickFromLibrary; + } + + private void SetParentDialog(DialogBase dialog) + { + _parentDialog = dialog; + } + + private void OnClickCreateNew(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + ClassSelectionPageParam sceneParam = ClassSelectionPageParam.CreateDeckEdit(_format, (_conventionDeckList != null) ? _conventionDeckList.Conventioninfo : null, GetConventionUsedClassIdList()); + ChangeViewScene(UIManager.ViewScene.ClassSelectionPage, sceneParam); + OnSelectFinally(); + } + + private void OnClickCopy(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + Format format = _format; + if (format == Format.Crossover) + { + format = Format.All; + } + DeckInfoTask task = new DeckInfoTask(); + task.SetParameterForCopySrcGet(Format.All, format); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + DeckGroupListData deckGroupListData = task.DeckGroupListData; + if (!_formatBehavior.UseSubClass) + { + deckGroupListData.RemoveUseSubClassDeckList(); + } + if (_format != Format.MyRotation) + { + deckGroupListData.RemoveFormat(Format.MyRotation); + } + deckGroupListData.ForceVisiblePreRotation(Prerelease.Status != Prerelease.eStatus.NONE); + Format value = (Format)PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_FORMAT); + DeckSelectUIDialog.Create(Data.SystemText.Get("Card_0109"), deckGroupListData, value, DeckSelectUIDialog.eFormatChangeUIType.UseOtherCategory, isVisibleCreateNew: false, returnDeckSelect, new DeckSelectUI.InitOptions + { + OnUpdateDeckUICustomize = OnUpdateDeckUIForConvention + }).SetPanelDepth(12); + _parentDialog.Close(); + })); + } + + private void OnUpdateDeckUIForConvention(DeckUI deckUI) + { + if (_conventionDeckList == null) + { + return; + } + if (!deckUI.Deck.IsUsable(canUseNonPossessionCard: true)) + { + deckUI.SetSelectable(isSelectable: false); + return; + } + bool flag = _conventionDeckList.GetConventionDeckClassList().Contains(deckUI.Deck.GetDeckClassID()); + if (_formatBehavior.UseSubClass && _conventionDeckList.GetConventionDeckClassList().Contains(deckUI.Deck.GetDeckSubClassID())) + { + flag = true; + } + if (flag) + { + deckUI.SetTextCenterLabe(Data.SystemText.Get("RoomBattle_0085")); + deckUI.SetSelectable(isSelectable: false); + } + } + + private void OnClickDeckCode(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + DialogBase nameEditDialog = InputDialog.Create(16, 16, UIInput.KeyboardType.EmailAddress); + nameEditDialog.InputAreaObjs.labels[2].text = Data.SystemText.Get("Card_0110"); + nameEditDialog.InputAreaObjs.labels[3].text = ""; + nameEditDialog.SetTitleLabel(Data.SystemText.Get("Card_0111")); + if (UIManager.GetInstance().IsCurrentScene(UIManager.ViewScene.QuestSelectionPage)) + { + AllLabelColorChanger.ChangeAllLabel(nameEditDialog.InputAreaObjs.gameObject); + } + Action method_btn = delegate + { + string text = nameEditDialog.InputAreaObjs.labels[0].text; + GetDeckDataFromCodeTask getDeckDataFromCodeTask = new GetDeckDataFromCodeTask(); + getDeckDataFromCodeTask.SetParameter(text); + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(getDeckDataFromCodeTask, OnSuccessDeckCodeInfo, OnFailedDeckCodeInfo, OnFailedDeckCodeInfo, encrypt: false)); + }; + nameEditDialog.SetButtonDelegate(method_btn); + nameEditDialog.SetPanelDepth(2000); + nameEditDialog.SetButtonDisable(isEnableOK: true); + UIInput deckCodeInput = nameEditDialog.GetComponentInChildren(); + if (deckCodeInput != null) + { + deckCodeInput.onChange.Add(new EventDelegate(delegate + { + nameEditDialog.SetButtonDisable(deckCodeInput.value.Length < 4); + })); + } + _parentDialog.Close(); + } + + private void OnClickAutoDeck(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + if (Data.MaintenanceCodeList.Contains(NetworkDefine.MAINTENANCE_TYPE.AUTO_DECK_CREATE)) + { + ButtonMaintenance(); + return; + } + bool canUseNonPossessionCard = _conventionDeckList == null; + DeckCardEditUI.SetCreateAutoParameter(_format, canUseNonPossessionCard); + ClassSelectionPageParam sceneParam = ClassSelectionPageParam.CreateDeckEdit(_format, (_conventionDeckList != null) ? _conventionDeckList.Conventioninfo : null, GetConventionUsedClassIdList()); + ChangeViewScene(UIManager.ViewScene.ClassSelectionPage, sceneParam); + OnSelectFinally(); + } + + private void OnClickFromCamera(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + if (Data.MaintenanceCodeList.Contains(NetworkDefine.MAINTENANCE_TYPE.DECK_QR_CODE)) + { + ButtonMaintenance(); + return; + } + GameObject qrCameraObject = UnityEngine.Object.Instantiate(Resources.Load("Prefab/UI/QrCamera")); + QrCamera qrCamera = qrCameraObject.GetComponent(); + UIButton backButton = qrCamera.backButton; + qrCamera.SetCallBacks(OnSuccessQRCodeDeckInfo, OnFailedQRCodeDeckInfo); + UIManager.GetInstance().createInSceneCenterLoading(); + UIManager.GetInstance().StartCoroutine(qrCamera.StartQRCamera(qrCameraObject, _formatBehavior.CardMasterId, delegate + { + _parentDialog.Close(); + UIManager.GetInstance().closeInSceneCenterLoading(); + backButton.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL); + qrCamera.StopQRCamera(); + UnityEngine.Object.Destroy(qrCameraObject); + })); + }, delegate + { + qrCamera.StopQRCamera(); + UnityEngine.Object.Destroy(qrCameraObject); + FailedToStartQRCamera(); + UIManager.GetInstance().closeInSceneCenterLoading(); + _parentDialog.Close(); + })); + } + + private void OnClickFromLibrary(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + if (Data.MaintenanceCodeList.Contains(NetworkDefine.MAINTENANCE_TYPE.DECK_QR_CODE)) + { + ButtonMaintenance(); + return; + } + GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("Prefab/UI/QrCamera")); + QrCamera component = gameObject.GetComponent(); + component.SetCallBacks(OnSuccessQRCodeDeckInfo, OnFailedQRCodeDeckInfo); + component.StartGetQRCodeFromImageFile(gameObject, _formatBehavior.CardMasterId); + UnityEngine.Object.Destroy(gameObject); + _parentDialog.Close(); + } + + private void FailedToStartQRCamera() + { + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Card_0270")); + dialogBase.SetPanelDepth(2000); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.OnClose = delegate + { + OnSelectFinally(); + }; + } + + private void ButtonMaintenance() + { + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Card_0266")); + dialogBase.SetPanelDepth(2000); + dialogBase.SetSize(DialogBase.Size.M); + } + + private DialogBase CreateDeckCopyDialog(DialogBase dialogDeckList, DeckData deck) + { + bool flag = _formatBehavior.UseSubClass && FormatBehaviorManager.GetDefaultBehaviour(deck.Format).UseSubClass; + if (_format == Format.MyRotation) + { + if (deck.Format == Format.MyRotation) + { + return DeckCopyDialog.CreateDeckCopyDialog(_deckCopyDialogPrefab, deck); + } + return DeckCopyDialog.CreateDeckCopyDialogForMyRotation(_deckCopyDialogPrefab, deck); + } + if (flag) + { + return DeckCopyDialog.CreateDeckCopyDialogUseSubClass(_useSubClassDeckCopyDialogPrefab, deck); + } + return DeckCopyDialog.CreateDeckCopyDialog(_deckCopyDialogPrefab, deck); + } + + private void returnDeckSelect(DialogBase dialogDeckList, DeckData deck) + { + DialogBase dialog = CreateDeckCopyDialog(dialogDeckList, deck); + dialog.onPushButton1 = delegate + { + if (!_formatBehavior.UseSubClass) + { + OnChangeViewSceneFromDeckCopy(dialogDeckList, deck); + } + else if (FormatBehaviorManager.GetDefaultBehaviour(deck.Format).UseSubClass && PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_COPY_SUBCLASS_CARDS)) + { + OnChangeViewSceneFromDeckCopy(dialogDeckList, deck); + } + else + { + OnSelectSubClassFromDeckCopy(dialog, dialogDeckList, deck); + } + }; + dialog.SetPanelDepth(100); + } + + private void OnSelectSubClassFromDeckCopy(DialogBase dialog, DialogBase dialogDeckList, DeckData deck) + { + dialog.Close(); + SubClassSelectDialog.Create(deck, _subClassSelectDialogPrefab, GetConventionUsedClassIdList(), delegate(int classId) + { + deck.SetDeckSubClassID(classId); + OnChangeViewSceneFromDeckCopy(dialogDeckList, deck); + }); + } + + private void OnChangeViewSceneFromDeckCopy(DialogBase dialogDeckList, DeckData deck) + { + bool isCopySubClass = FormatBehaviorManager.Create(deck.Format, _conventionDeckList).UseSubClass && PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_COPY_SUBCLASS_CARDS); + MyRotationInfo myRotationInfo = null; + if (_format == Format.MyRotation) + { + myRotationInfo = ((deck.Format != Format.MyRotation) ? deck.GetMyRotationInfoFromCardList() : Data.MyRotationAllInfo.Get(deck.MyRotationId)); + } + DeckCardEditUI.SetDeckCopyParameter(deck, isCreatedByBuilder: false, isCopySubClass, _conventionDeckList, myRotationInfo); + dialogDeckList.CloseWithoutSelect(); + ChangeViewScene(UIManager.ViewScene.DeckCardEdit, null); + OnSelectFinally(); + } + + private void OnSuccessDeckCodeInfo(NetworkTask.ResultCode errorcode) + { + OnSuccessCodeDeckInfo(DeckCopyCodeType.DeckCode); + } + + private void OnSuccessQRCodeDeckInfo() + { + OnSuccessCodeDeckInfo(DeckCopyCodeType.QRCode); + } + + private void OnSuccessCodeDeckInfo(DeckCopyCodeType copyCodeType) + { + bool flag = false; + SetCodeCopyDeckParam(copyCodeType, out var clanId, out var subClanId, out var isSubClassSet, out var cardIds, out var myRotationInfo); + if (_conventionDeckList != null) + { + List conventionDeckClassList = _conventionDeckList.GetConventionDeckClassList(); + for (int i = 0; i < conventionDeckClassList.Count; i++) + { + if (conventionDeckClassList[i] == clanId) + { + flag = true; + break; + } + } + if (_formatBehavior.UseSubClass) + { + for (int j = 0; j < conventionDeckClassList.Count; j++) + { + if (conventionDeckClassList[j] == subClanId) + { + flag = true; + break; + } + } + } + } + if (isDeckcodeIncludingNonExistentCard(cardIds)) + { + string title = Data.SystemText.Get("Card_0196"); + string text = Data.SystemText.Get("Card_0197"); + CreateErrorDialog(title, text).OnClose = delegate + { + OnSelectFinally(); + }; + } + else if (flag) + { + string title2 = Data.SystemText.Get("ErrorHeader_10002"); + string text2 = Data.SystemText.Get("Arena_0067"); + if (_formatBehavior.UseSubClass) + { + text2 = Data.SystemText.Get("Arena_0141"); + } + CreateErrorDialog(title2, text2).OnClose = delegate + { + OnSelectFinally(); + }; + } + else if (!_formatBehavior.UseSubClass && isSubClassSet) + { + string title3 = Data.SystemText.Get("Card_0196"); + string text3 = ""; + switch (copyCodeType) + { + case DeckCopyCodeType.QRCode: + text3 = Data.SystemText.Get("Card_0285"); + break; + case DeckCopyCodeType.DeckCode: + text3 = Data.SystemText.Get("Card_0295"); + break; + } + CreateErrorDialog(title3, text3).OnClose = delegate + { + OnSelectFinally(); + }; + } + else if (myRotationInfo != null && _format != Format.MyRotation) + { + string title4 = Data.SystemText.Get("Card_0196"); + string text4 = ""; + switch (copyCodeType) + { + case DeckCopyCodeType.QRCode: + text4 = Data.SystemText.Get("MyRotation_ID_17"); + break; + case DeckCopyCodeType.DeckCode: + text4 = Data.SystemText.Get("MyRotation_ID_18"); + break; + } + CreateErrorDialog(title4, text4).OnClose = delegate + { + OnSelectFinally(); + }; + } + else + { + DeckData deck = CreateDeckFromCopyCode(clanId, subClanId, isSubClassSet, cardIds, myRotationInfo); + if (_formatBehavior.UseSubClass && !isSubClassSet) + { + OnCreateDeckFromCodeSelectSubClass(deck); + } + else + { + OnCreateDeckFromCode(deck); + } + } + } + + private void SetCodeCopyDeckParam(DeckCopyCodeType deckCopyCodeTypeout, out int clanId, out int subClanId, out bool isSubClassSet, out int[] cardIds, out MyRotationInfo myRotationInfo) + { + clanId = 10; + subClanId = 10; + isSubClassSet = false; + cardIds = null; + myRotationInfo = null; + switch (deckCopyCodeTypeout) + { + case DeckCopyCodeType.QRCode: + clanId = (int)QRCodeUtility.deckDataFromQRCode.ClanId; + subClanId = (int)QRCodeUtility.deckDataFromQRCode.SubClanId; + isSubClassSet = QRCodeUtility.deckDataFromQRCode.IsSubClassSet; + cardIds = QRCodeUtility.deckDataFromQRCode.CardIds; + myRotationInfo = QRCodeUtility.deckDataFromQRCode.MyRotationInfo; + break; + case DeckCopyCodeType.DeckCode: + clanId = Data.DeckDataFromDeckCode.ClanId; + subClanId = Data.DeckDataFromDeckCode.SubClanId; + isSubClassSet = Data.DeckDataFromDeckCode.IsSubClanSet; + cardIds = Data.DeckDataFromDeckCode.CardIds; + if (Data.DeckDataFromDeckCode.MyRotationId != null) + { + myRotationInfo = Data.MyRotationAllInfo.Get(Data.DeckDataFromDeckCode.MyRotationId); + } + break; + } + } + + private DeckData CreateDeckFromCopyCode(int clanId, int subClanId, bool isSubClassSet, int[] cardIds, MyRotationInfo myRotationInfo) + { + DeckData deckData = new DeckData(_format); + deckData.SetDeckClassID(clanId); + if (isSubClassSet) + { + deckData.SetDeckSubClassID(subClanId); + } + deckData.SetDeckName(""); + deckData.SetDeckSleeveID(3000011L); + deckData.SetDeckIsComplete(isComplete: true); + deckData.SetCardIdList(cardIds.ToList()); + if (myRotationInfo != null) + { + deckData.MyRotationId = myRotationInfo.Id; + } + return deckData; + } + + private DialogBase CreateErrorDialog(string title, string text) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(2000); + dialogBase.SetTitleLabel(title); + dialogBase.SetText(text); + dialogBase.SetSize(DialogBase.Size.M); + return dialogBase; + } + + private void OnFailedQRCodeDeckInfo(string message) + { + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(message); + dialogBase.SetPanelDepth(2000); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.OnClose = delegate + { + OnSelectFinally(); + }; + } + + private void OnCreateDeckFromCode(DeckData deck) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + dialogBase.SetPanelDepth(2000); + dialogBase.SetTitleLabel(Data.SystemText.Get("Card_0142")); + dialogBase.SetText(Data.SystemText.Get("Card_0115")); + if (_format == Format.MyRotation && Data.MyRotationAllInfo.Get(deck.MyRotationId) == null) + { + MyRotationInfo myRotationInfoFromCardList = deck.GetMyRotationInfoFromCardList(); + deck.MyRotationId = myRotationInfoFromCardList.Id; + } + dialogBase.OnCloseStart = delegate + { + DeckCardEditUI.SetDeckCopyParameter(deck, isCreatedByBuilder: true, isCopySubClass: true, _conventionDeckList); + ChangeViewScene(UIManager.ViewScene.DeckCardEdit, null); + OnSelectFinally(); + }; + } + + private void OnCreateDeckFromCodeSelectSubClass(DeckData deck) + { + SubClassSelectDialog.Create(deck, _subClassSelectDialogPrefab, GetConventionUsedClassIdList(), delegate(int classId) + { + deck.SetDeckSubClassID(classId); + DeckCardEditUI.SetDeckCopyParameter(deck, isCreatedByBuilder: true, isCopySubClass: false, _conventionDeckList); + ChangeViewScene(UIManager.ViewScene.DeckCardEdit, null); + OnSelectFinally(); + }); + } + + private bool isDeckcodeIncludingNonExistentCard(int[] targetDeckCardIds) + { + List allCardIds = CardMaster.GetInstance(_formatBehavior.CardMasterId).GetAllCardIds(); + int num = targetDeckCardIds.Length; + for (int i = 0; i < num; i++) + { + int item = targetDeckCardIds[i]; + if (!allCardIds.Contains(item)) + { + return true; + } + } + return false; + } + + private void OnFailedDeckCodeInfo(NetworkTask.ResultCode errorcode) + { + OnSelectFinally(); + } + + private void OnFailedDeckCodeInfo(int errorcode) + { + OnSelectFinally(); + } + + private List GetConventionUsedClassIdList() + { + List result = new List(); + if (_conventionDeckList == null) + { + return result; + } + return _conventionDeckList.GetConventionDeckClassList(); + } + + private void ChangeViewScene(UIManager.ViewScene viewScene, object sceneParam) + { + _onStartChangeViewScene.Call(); + if (UIManager.GetInstance().IsCurrentScene(UIManager.ViewScene.Battle)) + { + GameMgr.GetIns().GetBattleCtrl().BattleEnd(viewScene, null, null, sceneParam); + } + else + { + UIManager.GetInstance().ChangeViewScene(viewScene, null, sceneParam); + } + } +} diff --git a/SVSim.BattleEngine/Engine/DeckData.cs b/SVSim.BattleEngine/Engine/DeckData.cs new file mode 100644 index 0000000..f3015bb --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckData.cs @@ -0,0 +1,577 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using LitJson; +using Wizard; + +public class DeckData +{ + public enum UnusableReason + { + None, + MaintenanceCard, + FormatRestrictCard, + TooLittleCards, + TooMuchCards, + NonPossessionCard, + ShortageMainClassCards, + ShortageSubClassCards, + ShortageBothClassCards, + Unknown + } + + public const int DEFAULT_DECK_ID_OFFSET = 90; + + private const string LEADER_SKIN_ID_KEY = "leader_skin_id"; + + public const string CARD_ID_ARRAY_KEY = "card_id_array"; + + public const int DEFAULT_SLEEVE_ID = 3000011; + + public const int UNSET_SKIN_ID = 0; + + private int _deckId; + + private string _deckName; + + private bool _isComplete; + + private int _deckClassId; + + private int _deckSubClassId = 10; + + private long _sleeveId; + + private int _skinId; + + private List _cardIdList; + + public Format Format { get; private set; } + + public bool IsFormatRestrictError { get; set; } + + public bool IsMaintenanceDeck { get; set; } + + public Format DeckCopyFormat { get; private set; } + + public bool IsRecommend { get; private set; } + + public bool IsContainsNonPossessionCard { get; private set; } + + public bool IsSkinRandom { get; set; } + + public List SelectRandomSkinIdList { get; set; } + + public bool IsReplaceDeckSkin { get; set; } + + public DeckAttributeType DeckAttributeType { get; private set; } + + public DateTime? CreatedTime { get; private set; } + + public string MyRotationId { get; set; } + + public string RotationId { get; set; } + + public bool IsRentalDeck + { + get + { + DeckAttributeType deckAttributeType = DeckAttributeType; + if ((uint)(deckAttributeType - 2) <= 3u) + { + return true; + } + return false; + } + } + + public bool IsOutOfRotationFormat + { + get + { + if (Format == Format.Rotation || Format == Format.PreRotation) + { + return DeckCopyFormat == Format.Unlimited; + } + return false; + } + } + + public DeckData(Format format = Format.Max, DeckAttributeType deckAttributeType = DeckAttributeType.Invalid) + { + _skinId = 0; + Format = format; + DeckCopyFormat = format; + DeckAttributeType = deckAttributeType; + } + + public DeckData Clone() + { + return (DeckData)MemberwiseClone(); + } + + public void SetDeckID(int deckId) + { + _deckId = deckId; + } + + public void SetDeckName(string deckName) + { + _deckName = deckName; + } + + public void SetDeckIsComplete(bool isComplete) + { + _isComplete = isComplete; + } + + public void SetDeckClassID(int deckClassId) + { + _deckClassId = deckClassId; + } + + public void SetDeckSubClassID(int deckSubClassId) + { + _deckSubClassId = deckSubClassId; + } + + public void SetDeckSleeveID(long sleeveId) + { + _sleeveId = DataMgr.GetAbleSleeveId(sleeveId); + } + + public void SetCardIdList(List cardIdList) + { + _cardIdList = cardIdList; + } + + public void SetEmptyCardIdList() + { + _cardIdList = new List(); + } + + public void SetSkinId(int skinId) + { + _skinId = skinId; + } + + public int GetDeckID() + { + return _deckId; + } + + public string GetDeckName() + { + return _deckName; + } + + public bool GetDeckIsComplete() + { + return _isComplete; + } + + private UnusableReason GetUnusableReason() + { + if (IsMaintenanceDeck) + { + return UnusableReason.MaintenanceCard; + } + if (IsFormatRestrictError) + { + return UnusableReason.FormatRestrictCard; + } + if (!_isComplete) + { + int num = ((_cardIdList != null) ? _cardIdList.Count : 0); + if (num < 40) + { + return UnusableReason.TooLittleCards; + } + if (num > 40) + { + return UnusableReason.TooMuchCards; + } + if (Format == Format.Crossover && _cardIdList != null) + { + CardMaster cardMaster = CardMaster.GetInstance(FormatBehaviorManager.GetDefaultBehaviour(Format).CardMasterId); + CardBasePrm.ClanType mainClass = (CardBasePrm.ClanType)_deckClassId; + CardBasePrm.ClanType subClass = (CardBasePrm.ClanType)_deckSubClassId; + bool num2 = _cardIdList.Count((int cardId) => cardMaster.GetCardParameterFromId(cardId).Clan == mainClass) < 24; + bool flag = _cardIdList.Count((int cardId) => cardMaster.GetCardParameterFromId(cardId).Clan == subClass) < 9; + if (num2) + { + if (!flag) + { + return UnusableReason.ShortageMainClassCards; + } + return UnusableReason.ShortageBothClassCards; + } + if (flag) + { + return UnusableReason.ShortageSubClassCards; + } + } + return UnusableReason.Unknown; + } + if (IsContainsNonPossessionCard) + { + return UnusableReason.NonPossessionCard; + } + return UnusableReason.None; + } + + public static bool ContainsNonPossessionCard(IEnumerable cardIdList, IFormatBehavior formatBehavior) + { + return cardIdList.Distinct().Any((int id) => cardIdList.Count((int i) => i == id) > formatBehavior.GetPossessionCardNum(id, isIncludingSpotCard: true)); + } + + public bool IsUsable(out UnusableReason reason, bool canUseNonPossessionCard = false) + { + reason = GetUnusableReason(); + if (canUseNonPossessionCard && reason == UnusableReason.NonPossessionCard) + { + reason = UnusableReason.None; + } + return reason == UnusableReason.None; + } + + public bool IsUsable(bool canUseNonPossessionCard = false) + { + UnusableReason reason; + return IsUsable(out reason, canUseNonPossessionCard); + } + + public bool IsDisplayable() + { + if (!IsUsable()) + { + return false; + } + Dictionary cardNumDict = GetCardNumDict(); + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + foreach (KeyValuePair item in cardNumDict) + { + int possessionCardNum = dataMgr.GetPossessionCardNum(item.Key, isIncludingSpotCard: true); + if (possessionCardNum == 0) + { + return false; + } + if (item.Value > possessionCardNum) + { + return false; + } + } + return true; + } + + public bool HasResurgentCard() + { + foreach (int cardId in _cardIdList) + { + if (CardMaster.GetInstance(FormatBehaviorManager.GetDefaultBehaviour(Format).CardMasterId).GetCardParameterFromId(cardId).IsResurgentCard) + { + return true; + } + } + return false; + } + + public int GetDeckClassID() + { + return _deckClassId; + } + + public int GetDeckSubClassID() + { + return _deckSubClassId; + } + + public long GetDeckSleeveID() + { + return DataMgr.GetAbleSleeveId(_sleeveId); + } + + public List GetCardIdList() + { + return _cardIdList; + } + + public void ExtractMainClassAndNeutralCards() + { + CardMaster instance = CardMaster.GetInstance(FormatBehaviorManager.GetDefaultBehaviour(Format).CardMasterId); + CardBasePrm.ClanType deckClassId = (CardBasePrm.ClanType)_deckClassId; + List list = new List(); + foreach (int cardId in _cardIdList) + { + CardBasePrm.ClanType clan = instance.GetCardParameterFromId(cardId).Clan; + if (clan == deckClassId || clan == CardBasePrm.ClanType.ALL) + { + list.Add(cardId); + } + } + _cardIdList = list; + } + + public Dictionary GetCardNumDict() + { + Dictionary dictionary = new Dictionary(); + if (IsNoCard()) + { + return dictionary; + } + for (int i = 0; i < _cardIdList.Count; i++) + { + int key = _cardIdList[i]; + if (dictionary.ContainsKey(key)) + { + dictionary[key]++; + } + else + { + dictionary.Add(key, 1); + } + } + return dictionary; + } + + public bool IsNoCard() + { + return _cardIdList == null; + } + + public bool IsDefaultDeck() + { + return IsDeckAttributeMatch(DeckAttributeType.DefaultDeck); + } + + public bool IsDeckAttributeMatch(DeckAttributeType deckAttributeType) + { + return deckAttributeType == DeckAttributeType; + } + + public int GetRawSkinId() + { + return _skinId; + } + + public int GetSkinId(bool isDefaultSkin = false) + { + if (isDefaultSkin) + { + return GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(GetDeckClassID(), isCurrentChara: false) + .skin_id; + } + if (_skinId == 0) + { + return GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(GetDeckClassID()) + .skin_id; + } + return _skinId; + } + + private int GetJsonInt(JsonData deckData, string key, int defaultValue) + { + if (deckData.Keys.Contains(key)) + { + return deckData[key].ToInt(); + } + return defaultValue; + } + + private string GetJsonString(JsonData deckData, string key, string defaultValue) + { + if (deckData.Keys.Contains(key)) + { + return deckData[key].ToString(); + } + return defaultValue; + } + + private bool GetJsonBool(JsonData deckData, string key, bool defaultValue) + { + if (deckData.Keys.Contains(key)) + { + return deckData[key].ToBoolean(); + } + return defaultValue; + } + + public void Initialize(JsonData deckData) + { + SetDeckID(GetJsonInt(deckData, "deck_no", 0)); + if (deckData.Keys.Contains("format")) + { + Format = Data.ParseApiFormat(deckData["format"].ToInt()); + } + SetDeckName(deckData["deck_name"].ToString()); + SetDeckIsComplete(GetJsonBool(deckData, "is_complete_deck", defaultValue: true)); + IsContainsNonPossessionCard = GetJsonBool(deckData, "is_include_un_possession_card", defaultValue: false); + SetDeckClassID(deckData["class_id"].ToInt()); + if (FormatBehaviorManager.GetDefaultBehaviour(Format).UseSubClass) + { + int valueOrDefault = deckData.GetValueOrDefault("sub_class_id", 10); + _deckSubClassId = ((valueOrDefault == 0) ? 10 : valueOrDefault); + } + if (deckData.TryGetValue("sleeve_id", out var value)) + { + SetDeckSleeveID(value.ToLong()); + } + else + { + _sleeveId = 3000011L; + } + if (deckData.Keys.Contains("leader_skin_id")) + { + SetSkinId(deckData["leader_skin_id"].ToInt()); + } + if (deckData.Keys.Contains("restricted_card_exists")) + { + IsFormatRestrictError = deckData["restricted_card_exists"].ToBoolean(); + } + if (deckData.Keys.Contains("current_format")) + { + DeckCopyFormat = Data.ParseApiFormat(deckData["current_format"].ToInt()); + } + else + { + DeckCopyFormat = Format; + } + if (deckData.Keys.Contains("is_recommend")) + { + IsRecommend = deckData["is_recommend"].ToInt() == 1; + } + else + { + IsRecommend = false; + } + if (deckData.TryGetValue("create_deck_time", out var value2) && value2 != null) + { + CreatedTime = DateTime.Parse($"{value2}"); + } + ParseCardIdList(deckData); + MyRotationId = deckData.GetValueOrDefault("rotation_id", null); + RotationId = MyRotationId; + if (Data.MyRotationAllInfo.Get(MyRotationId) == null) + { + MyRotationId = null; + } + IsSkinRandom = deckData.GetValueOrDefault("is_random_leader_skin", 0) == 1; + SelectRandomSkinIdList = new List(); + if (deckData.Keys.Contains("leader_skin_id_list")) + { + JsonData jsonData = deckData["leader_skin_id_list"]; + for (int i = 0; i < jsonData.Count; i++) + { + SelectRandomSkinIdList.Add(jsonData[i].ToInt()); + } + SelectRandomSkinIdList.Sort(); + } + MaintenanceCardCheack(); + } + + public void ParseCardIdList(JsonData deckData) + { + JsonData jsonData = deckData["card_id_array"]; + List cardIdList = null; + int count = jsonData.Count; + if (count > 0) + { + cardIdList = new List(); + for (int i = 0; i < count; i++) + { + cardIdList.Add(jsonData[i].ToInt()); + } + cardIdList = UIManager.GetInstance().getUIBase_CardManager().SortIDList(cardIdList, FormatBehaviorManager.GetDefaultBehaviour(Format).CardMasterId); + } + SetCardIdList(cardIdList); + } + + public void MaintenanceCardCheack() + { + IsMaintenanceDeck = false; + if (_cardIdList != null) + { + IsMaintenanceDeck = _cardIdList.Any((int c) => GameMgr.GetIns().GetDataMgr().IsMaintenanceCard(c)); + } + } + + public string GetMyRotationClassName() + { + MyRotationInfo info = Data.MyRotationAllInfo.Get(MyRotationId); + return CreateMyRotationClassName(_deckClassId, info); + } + + public static string GetClassName(int classType, string rotationId) + { + MyRotationInfo myRotationInfo = Data.MyRotationAllInfo.Get(rotationId); + if (myRotationInfo != null) + { + return CreateMyRotationClassName(classType, myRotationInfo); + } + return GameMgr.GetIns().GetDataMgr().GetClanNameByKey(classType); + } + + public static string CreateMyRotationClassName(int classType, MyRotationInfo info) + { + return Data.SystemText.Get("MyRotation_ID_02", GameMgr.GetIns().GetDataMgr().GetClanNameByKey(classType), info.LastPackText); + } + + public bool IsVisibleRandomIcon() + { + if (IsReplaceDeckSkin) + { + return false; + } + if (IsSkinRandom) + { + return true; + } + if (GameMgr.GetIns().GetDataMgr().GetClassPrm(GetDeckClassID()) + .IsRandomLeaderSkin) + { + return _skinId == 0; + } + return false; + } + + public MyRotationInfo GetMyRotationInfoFromCardList() + { + int num = int.MinValue; + MyRotationInfo result = null; + CardMaster instance = CardMaster.GetInstance(FormatBehaviorManager.GetDefaultBehaviour(Format.MyRotation).CardMasterId); + foreach (int cardId in GetCardIdList()) + { + CardParameter cardParameterFromId = instance.GetCardParameterFromId(cardId); + MyRotationInfo myRotationInfoFromPack = GetMyRotationInfoFromPack(cardParameterFromId.CardSetId); + if (myRotationInfoFromPack != null && int.Parse(myRotationInfoFromPack.Id) >= num) + { + result = myRotationInfoFromPack; + num = int.Parse(myRotationInfoFromPack.Id); + } + } + return result; + } + + public MyRotationInfo GetMyRotationInfoFromPack(string packId) + { + int num = int.MinValue; + MyRotationInfo myRotationInfo = null; + foreach (MyRotationInfo myRotationInfo2 in Data.MyRotationAllInfo.MyRotationInfoList) + { + if (!(packId != myRotationInfo2.LastPackId) && int.Parse(myRotationInfo2.Id) >= num) + { + num = int.Parse(myRotationInfo2.Id); + myRotationInfo = myRotationInfo2; + } + } + if (myRotationInfo == null) + { + if (GetDeckClassID() != 8) + { + return Data.MyRotationAllInfo.FirstPackInfo; + } + return Data.MyRotationAllInfo.FirstPackInfoNemesis; + } + return myRotationInfo; + } +} diff --git a/SVSim.BattleEngine/Engine/DeckDecisionColosseum.cs b/SVSim.BattleEngine/Engine/DeckDecisionColosseum.cs new file mode 100644 index 0000000..75136d5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckDecisionColosseum.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using Wizard; + +public class DeckDecisionColosseum : MonoBehaviour +{ + [SerializeField] + private UILabel _descTextLabel; + + [SerializeField] + private UILabel _deckNameTextLabel; + + [SerializeField] + private UILabel _descText2Label; + + public void Init(DeckData inDeck) + { + _descTextLabel.text = Data.SystemText.Get("Card_0006"); + _deckNameTextLabel.text = Data.SystemText.Get("Card_0299", inDeck.GetDeckName()); + _descText2Label.text = Data.SystemText.Get("Colosseum_0081"); + } +} diff --git a/SVSim.BattleEngine/Engine/DeckDecisionCompetition.cs b/SVSim.BattleEngine/Engine/DeckDecisionCompetition.cs new file mode 100644 index 0000000..99a63d3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckDecisionCompetition.cs @@ -0,0 +1,41 @@ +using UnityEngine; +using Wizard; +using Wizard.Dialog.Setting; + +public class DeckDecisionCompetition : MonoBehaviour +{ + [SerializeField] + private UILabel _descTextLabel; + + [SerializeField] + private UILabel _deckNameTextLabel; + + [SerializeField] + private UILabel _descText2Label; + + [SerializeField] + private ItemToggle _toggle; + + public void Init(DeckData inDeck) + { + _descTextLabel.text = Data.SystemText.Get("Card_0006"); + _deckNameTextLabel.text = Data.SystemText.Get("Card_0299", inDeck.GetDeckName()); + _descText2Label.text = Data.SystemText.Get("Colosseum_0081"); + SettingToggle(); + } + + protected ItemToggle SettingToggle() + { + SystemText systemText = Data.SystemText; + ItemToggle item = _toggle; + item.SetTitleLabel(systemText.Get("Colosseum_0085")); + item.SetValue(PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.COMPETITION_PUBLISHED_SETTING)); + item.AddChangeCallback(delegate + { + bool value = item.GetValue(); + PlayerPrefsWrapper.SetBool(PlayerPrefsWrapper.COMPETITION_PUBLISHED_SETTING, value); + }); + item.SetActive_SeparatorLine(isActive: true); + return item; + } +} diff --git a/SVSim.BattleEngine/Engine/DeckDecisionUI.cs b/SVSim.BattleEngine/Engine/DeckDecisionUI.cs new file mode 100644 index 0000000..9782d42 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckDecisionUI.cs @@ -0,0 +1,245 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Dialog.Setting; +using Wizard.RoomMatch; + +public class DeckDecisionUI : MonoBehaviour +{ + [SerializeField] + private UILabel _textForOneLine; + + [SerializeField] + private UILabel _descTextLabel; + + [SerializeField] + private UILabel _deckNameTextLabel; + + [SerializeField] + private ItemToggle m_simpleStageToggle; + + [SerializeField] + private GameObject _uiCardListPrefab; + + [SerializeField] + private GameObject _cardDetailPrefab; + + [SerializeField] + private UILabel _optionLabel; + + protected List _loadCardAssetList; + + private bool _textSetEnd; + + protected static int DetailLayer; + + protected const float CARD_DETAIL_Z = -300f; + + private ConventionDeckList conventionDeckList; + + public bool IsCanShowQRCode = true; + + private IFormatBehavior _formatBehavior; + + public DeckData DeckData { get; private set; } + + public string DeckName { get; set; } + + public UILabel OptionLabel => _optionLabel; + + public Action CardListCustomize { get; set; } + + protected CardDetailUI CardDetail { get; set; } + + protected UICardList UiCardList { get; set; } + + public Action CardDetailCustomize { get; set; } + + public bool IsShowSimpleStageOption { get; set; } + + public void SetDeckData(DeckData deck, ConventionDeckList deckList) + { + DeckData = deck; + conventionDeckList = deckList; + _formatBehavior = FormatBehaviorManager.Create(deck.Format, deckList); + } + + public virtual void Start() + { + DetailLayer = LayerMask.NameToLayer("MyPage"); + UIWidget component = GetComponent(); + if (!_textSetEnd) + { + _descTextLabel.text = Data.SystemText.Get("Card_0006"); + _deckNameTextLabel.text = Data.SystemText.Get("Card_0299", DeckName); + SetTextLabelesState(string.IsNullOrEmpty(_descTextLabel.text), string.IsNullOrEmpty(_deckNameTextLabel.text)); + } + if (IsShowSimpleStageOption) + { + SettingToggle_SimpleStage(); + component.pivot = UIWidget.Pivot.Center; + } + else + { + m_simpleStageToggle.gameObject.SetActive(value: false); + component.pivot = UIWidget.Pivot.Bottom; + } + } + + public void SetText(string descText, string cardDeckText) + { + _textForOneLine.text = descText; + _descTextLabel.text = descText; + _deckNameTextLabel.text = cardDeckText; + SetTextLabelesState(string.IsNullOrEmpty(descText), string.IsNullOrEmpty(cardDeckText)); + _textSetEnd = true; + } + + protected void OnDestroy() + { + if (_loadCardAssetList != null) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadCardAssetList); + _loadCardAssetList = null; + } + if (UiCardList != null) + { + UnityEngine.Object.Destroy(UiCardList.gameObject); + UiCardList = null; + } + if (CardDetail != null) + { + UnityEngine.Object.Destroy(CardDetail.gameObject); + CardDetail = null; + } + } + + protected ItemToggle SettingToggle_SimpleStage(bool isSperatorUse = true) + { + SystemText systemText = Data.SystemText; + ItemToggle item = m_simpleStageToggle; + item.SetTitleLabel(systemText.Get("OtherConfig_0022")); + item.SetValue(PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SIMPLE_STAGE)); + item.AddChangeCallback(delegate + { + bool value = item.GetValue(); + PlayerPrefsWrapper.SetBool(PlayerPrefsWrapper.SIMPLE_STAGE, value); + }); + if (isSperatorUse) + { + item.SetActive_SeparatorLine(isActive: true); + } + return item; + } + + public void OnClickCreateCardList() + { + CheckTimeSlipRotationPeriodTask task = new CheckTimeSlipRotationPeriodTask(); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + UIManager.GetInstance().createInSceneCenterLoading(); + if (CardDetail == null) + { + CardDetail = UnityEngine.Object.Instantiate(_cardDetailPrefab).GetComponent(); + CardDetail.transform.parent = base.transform.parent.parent; + CardDetail.transform.localPosition = new Vector3(0f, 0f, -300f); + CardDetail.transform.localScale = Vector3.one; + CardDetail.Initialize(DetailLayer, _formatBehavior.CardMasterId, _formatBehavior); + CardDetail.IsShowFlavorTextButton = true; + CardDetail.IsShowVoiceButton = true; + CardDetail.IsShowEvolutionButton = true; + CardDetail.IsCardTextDialogLayerSet = false; + CardDetailCustomize.Call(CardDetail); + UIManager.GetInstance().SetLayerRecursive(CardDetail.gameObject.transform, DetailLayer); + } + if (UiCardList == null) + { + bool in_DetailCameraUse = false; + UiCardList = UnityEngine.Object.Instantiate(_uiCardListPrefab).GetComponent(); + UIManager.ViewScene currentScene = UIManager.GetInstance().GetCurrentScene(); + if (currentScene != UIManager.ViewScene.MyPage && currentScene != UIManager.ViewScene.QuestSelectionPage) + { + in_DetailCameraUse = true; + } + else + { + UiCardList.SetCamera(UIManager.GetInstance().MyPageUICameraObj.GetComponent()); + } + int in_MaxCardNum = 40; + if (DeckData.Format == Format.Windfall) + { + in_MaxCardNum = 35; + } + UiCardList.Init(base.transform.parent.parent.gameObject, CardDetail, null, DeckViewClose, LayerMask.LayerToName(DetailLayer), in_DetailCameraUse, null, in_MaxCardNum); + UiCardList.SetActive(in_Active: false); + } + CardListCustomize.Call(UiCardList); + CardDetail.gameObject.SetActive(value: false); + StartCoroutine(CardLoadCoroutine(DeckData)); + })); + } + + private IEnumerator CardLoadCoroutine(DeckData inDeckData) + { + RoomBase.StartDialogLoading(); + IList cardIdList = inDeckData.GetCardIdList(); + inDeckData.GetDeckName(); + UiCardList.RemoveData(); + UiCardList._loadingEnd = false; + _loadCardAssetList = UiCardList.GetLoadFileList(cardIdList as List); + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadCardAssetList, null)); + UiCardList.SetDeck(inDeckData, conventionDeckList); + yield return null; + DialogSetDisp(inDisp: false); + if (IsCanShowQRCode) + { + UiCardList.SetQRSmallTexture(); + } + UiCardList.SetActive(in_Active: true); + UIManager.GetInstance().closeInSceneCenterLoading(); + UiCardList._loadingEnd = true; + RoomBase.FinishDiloagLoading(); + } + + protected void DeckViewClose() + { + UiCardList.SetActive(in_Active: false); + if (_loadCardAssetList != null) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadCardAssetList); + _loadCardAssetList = null; + } + DialogSetDisp(inDisp: true); + UnityEngine.Object.Destroy(UiCardList.gameObject); + UnityEngine.Object.Destroy(CardDetail.gameObject); + UiCardList = null; + CardDetail = null; + } + + protected void DialogSetDisp(bool inDisp) + { + UIManager.GetInstance().ActiveChangeDialogAll(inDisp); + } + + private void SetTextLabelesState(bool noDescText, bool noDeckNameText) + { + if (noDescText && noDeckNameText) + { + _textForOneLine.gameObject.SetActive(value: false); + _descTextLabel.gameObject.SetActive(value: false); + _deckNameTextLabel.gameObject.SetActive(value: false); + } + else if (noDeckNameText) + { + _descTextLabel.gameObject.SetActive(value: false); + _deckNameTextLabel.gameObject.SetActive(value: false); + } + else + { + _textForOneLine.gameObject.SetActive(value: false); + } + } +} diff --git a/SVSim.BattleEngine/Engine/DeckDeleteTask.cs b/SVSim.BattleEngine/Engine/DeckDeleteTask.cs new file mode 100644 index 0000000..16fb29c --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckDeleteTask.cs @@ -0,0 +1,38 @@ +using Wizard; + +public class DeckDeleteTask : BaseTask +{ + public class DeckDeleteTaskParam : BaseParam + { + public int[] deck_no_list; + + public int deck_format; + } + + private Format _updateDeckFormat; + + public DeckDeleteTask() + { + base.type = ApiType.Type.DeckDelete; + } + + public void SetParameter(int[] deck_no, Format format) + { + DeckDeleteTaskParam deckDeleteTaskParam = new DeckDeleteTaskParam(); + deckDeleteTaskParam.deck_no_list = deck_no; + deckDeleteTaskParam.deck_format = Data.FormatConvertApi(format); + base.Params = deckDeleteTaskParam; + _updateDeckFormat = format; + } + + protected override int Parse() + { + int num = base.Parse(); + if (num != 1) + { + return num; + } + DeckListUtility.ParseDeckInfoResponceData(base.ResponseData["data"], _updateDeckFormat); + return num; + } +} diff --git a/SVSim.BattleEngine/Engine/DeckFrame.cs b/SVSim.BattleEngine/Engine/DeckFrame.cs new file mode 100644 index 0000000..2fdcaff --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckFrame.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +public class DeckFrame +{ + public int DeckId { get; set; } + + public Transform Transform { get; set; } + + public Vector3 TweenTargetPosition { get; set; } +} diff --git a/SVSim.BattleEngine/Engine/DeckIntroduction.cs b/SVSim.BattleEngine/Engine/DeckIntroduction.cs new file mode 100644 index 0000000..865831a --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckIntroduction.cs @@ -0,0 +1,552 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.UI.Common; +using Wizard.UI.Profile; + +public class DeckIntroduction : MonoBehaviour +{ + private const int MAX_WIDTH_ANNOTATION_LABEL = 210; + + private const Format DEFAULT_FORMAT = Format.Rotation; + + private static readonly Vector2 FORMAT_CHANGE_UI_POSITION = new Vector2(-466f, 246f); + + private static readonly Dictionary FORMAT_TO_FORMAT_CATEGORY = new Dictionary + { + { + Format.Rotation, + FormatChangeUI.FormatCategory.Rotation + }, + { + Format.Unlimited, + FormatChangeUI.FormatCategory.Unlimited + }, + { + Format.Crossover, + FormatChangeUI.FormatCategory.Crossover + } + }; + + [SerializeField] + private TabList _tabList; + + [SerializeField] + private UISprite _classIcon; + + [SerializeField] + private UITexture _classCharaTexture; + + [SerializeField] + private UILabel _className; + + [SerializeField] + private UITexture _classBG; + + private Format _formatState; + + [SerializeField] + private UILabel _labelAnnotation; + + private UIAtlas _classIconAtlas; + + private List _resourceList = new List(); + + private List _loadTopCardAssetList = new List(); + + private List _loadCardAssetList; + + private List _deckIntroductionItem = new List(); + + [SerializeField] + private GameObject _dialogAttachRoot; + + [SerializeField] + private GameObject _deckViewPrefab; + + [SerializeField] + private GameObject _cardDetailPrefab; + + [SerializeField] + private GameObject _introductionItemPrefab; + + [SerializeField] + private UIGrid _deckListGrid; + + [SerializeField] + private UIScrollView _scrollView; + + [SerializeField] + private GameObject _confirmLabelForRotation; + + private DialogBase _dialog; + + private DeckIntroductionTask _introductionTask; + + private GameObject _deckViewObj; + + private UICardList _cardList; + + private GameObject _cardDetailObj; + + private CardDetailUI _cardDetail; + + private CardBasePrm.ClanType _classType = CardBasePrm.ClanType.NONE; + + private bool _isUpdateDeckList = true; + + private FormatChangeUI _formatChangeUI; + + private Vector3 _anotationLabelDefaultPosition; + + private int _seriesId; + + public const int LATEST_SERIES_ID = -1; + + public static void Create(GameObject prefab, GameObject parent, int seriesId = -1, Format format = Format.Max) + { + GameObject obj = NGUITools.AddChild(parent, prefab); + DeckIntroduction component = obj.GetComponent(); + component.SetSeriesId(seriesId); + component._formatState = format; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.AddButton(DialogBase.ButtonType.Gray, isReflect: false, Data.SystemText.Get("OtherTop_0065")); + dialogBase.ClickSe_Btn1 = Se.TYPE.SYS_BTN_DECIDE; + dialogBase.isNotCloseWindowButton1 = true; + dialogBase.onPushButton1 = component.CreateSelectSeriesIdDialog; + dialogBase.AddButton(DialogBase.ButtonType.Close); + dialogBase.TitleOnOff(flag: false); + dialogBase.CloseOnOff(flag: false); + dialogBase.SetSize(DialogBase.Size.XL); + dialogBase.OnClose = (Action)Delegate.Combine(dialogBase.OnClose, (Action)delegate + { + UnityEngine.Object.Destroy(obj); + }); + dialogBase.SetObj(component._dialogAttachRoot); + component._dialog = dialogBase; + dialogBase.gameObject.SetActive(value: false); + } + + private void SetSeriesId(int seriesId) + { + _seriesId = seriesId; + } + + private IEnumerator Start() + { + _anotationLabelDefaultPosition = _labelAnnotation.transform.localPosition; + yield return LoadAtlas(); + yield return StartCoroutine(StartDeckIntroductionTask()); + SetSeriesId(_introductionTask.DisplaySeriesId); + yield return LoadResource(); + _dialog.gameObject.SetActive(value: true); + if (_formatState == Format.Max) + { + _formatState = _introductionTask.DisplayFormat; + } + InitFormatBtn(_formatState); + InitClassTab(_introductionTask); + } + + private void OnDestroy() + { + ReleaseResource(); + } + + private IEnumerator StartDeckIntroductionTask() + { + _introductionTask = new DeckIntroductionTask(); + if (_seriesId != -1) + { + _introductionTask.SetParameter(_seriesId); + } + bool isSuccess = false; + yield return StartCoroutine(Toolbox.NetworkManager.Connect(_introductionTask, delegate + { + isSuccess = true; + })); + while (!isSuccess) + { + yield return null; + } + } + + private void ReleaseResource() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_resourceList); + _resourceList.Clear(); + RemoveTopCardResource(); + } + + private IEnumerator LoadAtlas() + { + string sceneAssetPath = UIManager.GetInstance().GetSceneAssetPath(UIAtlasManager.AssetBundleNames.Profile, null); + _resourceList.Add(sceneAssetPath); + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(sceneAssetPath, null)); + sceneAssetPath = UIManager.GetInstance().GetSceneAssetPath(UIAtlasManager.AssetBundleNames.Profile, null, isload: true); + _classIconAtlas = Toolbox.ResourcesManager.LoadObject(sceneAssetPath).GetComponent(); + } + + private static string GetClassBGPath(CardBasePrm.ClanType classType, bool isFetch) + { + int num = (int)classType; + return Toolbox.ResourcesManager.GetAssetTypePath("bg_deck_info_" + num.ToString("00"), ResourcesManager.AssetLoadPathType.Background, isFetch); + } + + private string GetClassCharaPath(CardBasePrm.ClanType classType, bool isFetch) + { + string charaTexName = ClassPage.GetCharaTexName(GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId((int)classType, isCurrentChara: false) + .skin_id); + return Toolbox.ResourcesManager.GetAssetTypePath(charaTexName, ResourcesManager.AssetLoadPathType.ClassCharaProfile, isFetch); + } + + private IEnumerator LoadResource() + { + List loadList = new List(); + int num = 9; + for (int i = 1; i < num; i++) + { + loadList.Add(GetClassCharaPath((CardBasePrm.ClanType)i, isFetch: false)); + loadList.Add(GetClassBGPath((CardBasePrm.ClanType)i, isFetch: false)); + } + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadList, null)); + _resourceList.AddRange(loadList); + } + + private IEnumerator LoadTopCardResource(CardBasePrm.ClanType classType, Action onFinish) + { + UIManager.GetInstance().createInSceneCenterLoading(); + List tempLoadList = new List(_loadTopCardAssetList); + _loadTopCardAssetList.Clear(); + for (int i = 0; i < _introductionTask._result.Count; i++) + { + DeckIntroductionTask.IntroductionData introductionData = _introductionTask._result[i]; + string cardMaterialPath = DeckIntroductionItem.GetCardMaterialPath(introductionData.TopCardId); + if (introductionData.Deck.Format == _formatState && introductionData.Deck.GetDeckClassID() == (int)classType && !_loadTopCardAssetList.Contains(cardMaterialPath)) + { + _loadTopCardAssetList.Add(cardMaterialPath); + } + } + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadTopCardAssetList, null)); + Toolbox.ResourcesManager.RemoveAssetGroup(tempLoadList); + onFinish.Call(classType); + UIManager.GetInstance().closeInSceneCenterLoading(); + } + + private void RemoveTopCardResource() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadTopCardAssetList); + _loadTopCardAssetList.Clear(); + } + + private void InitClassTab(DeckIntroductionTask task) + { + _classIcon.atlas = _classIconAtlas; + int num = 9; + CardBasePrm.ClanType clanType = CardBasePrm.ClanType.NONE; + for (int i = 1; i < num; i++) + { + CardBasePrm.ClanType classType = (CardBasePrm.ClanType)i; + Tab tab = _tabList.AddTab(delegate + { + ChangePage(classType); + }, "class_tab_" + i.ToString("00")); + if (task.IsExistClass(classType, _formatState)) + { + if (clanType == CardBasePrm.ClanType.NONE) + { + clanType = classType; + } + } + else + { + _tabList.SetTabToGrayByIndex(i - 1, disable: true); + } + tab.name = "Class_" + i + "(Clone)"; + } + _tabList.Reset(); + _tabList.SelectTabByIndex((int)(clanType - 1), isForceSet: true); + } + + private bool NeedResurgentConfirmLabel() + { + if ((_seriesId == 34 || _seriesId == 33 || _seriesId == 9) && _formatState == Format.Rotation) + { + return true; + } + return false; + } + + private void ChangePage(CardBasePrm.ClanType classType) + { + if (_classType == classType && !_isUpdateDeckList) + { + return; + } + _classType = classType; + _isUpdateDeckList = false; + ClassCharacterMasterData charaPrmByClassId = GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId((int)classType, isCurrentChara: false); + _className.text = charaPrmByClassId._className; + ClassCharaPrm.SetClassLabelSetting(_className, classType); + _classCharaTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(GetClassCharaPath(classType, isFetch: true)) as Texture; + _classBG.mainTexture = Toolbox.ResourcesManager.LoadObject(GetClassBGPath(classType, isFetch: true)) as Texture; + _confirmLabelForRotation.SetActive(NeedResurgentConfirmLabel()); + _labelAnnotation.transform.localPosition = _anotationLabelDefaultPosition; + string value; + if (IsNotCopyToUnlimited(classType) && _formatState == Format.Rotation) + { + _labelAnnotation.gameObject.SetActive(value: false); + } + else if (_introductionTask.AlternativeFormatAndSeries != null && _introductionTask.AlternativeFormatAndSeries.TryGetValue(_formatState, out value)) + { + _labelAnnotation.gameObject.SetActive(value: true); + SetAnnotationText(value); + if (NeedResurgentConfirmLabel()) + { + _labelAnnotation.transform.localPosition = new Vector3(_anotationLabelDefaultPosition.x, 209f, _anotationLabelDefaultPosition.z); + } + } + else + { + _labelAnnotation.gameObject.SetActive(value: false); + } + StartCoroutine(LoadTopCardResource(classType, InitDeckList)); + } + + private bool IsNotCopyToUnlimited(CardBasePrm.ClanType classType) + { + for (int i = 0; i < _introductionTask._result.Count; i++) + { + DeckData deck = _introductionTask._result[i].Deck; + if (deck.HasResurgentCard() && deck.IsOutOfRotationFormat && deck.GetDeckClassID() == (int)classType) + { + return true; + } + } + return false; + } + + private void InitDeckList(CardBasePrm.ClanType classType) + { + for (int i = 0; i < _deckIntroductionItem.Count; i++) + { + _deckIntroductionItem[i].gameObject.SetActive(value: false); + } + List list = new List(); + for (int j = 0; j < _introductionTask._result.Count; j++) + { + DeckIntroductionTask.IntroductionData introductionData = _introductionTask._result[j]; + if (introductionData.Deck.GetDeckClassID() == (int)classType && introductionData.Deck.Format == _formatState) + { + list.Add(introductionData); + } + } + for (int k = 0; k < list.Count; k++) + { + DeckIntroductionItem deckIntroductionItem = null; + if (k < _deckIntroductionItem.Count) + { + deckIntroductionItem = _deckIntroductionItem[k]; + deckIntroductionItem.gameObject.SetActive(value: true); + } + else + { + deckIntroductionItem = NGUITools.AddChild(_deckListGrid.gameObject, _introductionItemPrefab).GetComponent(); + _deckIntroductionItem.Add(deckIntroductionItem); + } + deckIntroductionItem.Initialize(list[k]); + deckIntroductionItem.OnClick = delegate(DeckIntroductionTask.IntroductionData data) + { + OnClickDeck(data); + }; + } + _deckListGrid.Reposition(); + _scrollView.ResetPosition(); + } + + private void InitFormatBtn(Format format) + { + _formatState = format; + FormatChangeUI.FormatCategory defaultFormatCategory = FORMAT_TO_FORMAT_CATEGORY[_formatState]; + FormatChangeUI.FormatCategory anotherFormatCategory = (_introductionTask.IsExistFormat(Format.Crossover) ? FORMAT_TO_FORMAT_CATEGORY[Format.Crossover] : FormatChangeUI.FormatCategory.Invalid); + _formatChangeUI = FormatChangeUI.Create(defaultFormatCategory, anotherFormatCategory, OnClickFormatBtn); + _formatChangeUI.ShowOldRotationIcon(); + _dialog.SetObj(_formatChangeUI.gameObject, FORMAT_CHANGE_UI_POSITION); + } + + private void SetAnnotationText(string serieasName) + { + _labelAnnotation.overflowMethod = UILabel.Overflow.ResizeFreely; + _labelAnnotation.text = Data.SystemText.Get("OtherTop_0068", serieasName); + _labelAnnotation.ProcessText(); + if (_labelAnnotation.width > 210) + { + _labelAnnotation.overflowMethod = UILabel.Overflow.ShrinkContent; + _labelAnnotation.width = 210; + } + } + + private void OnClickDeck(DeckIntroductionTask.IntroductionData data) + { + ShowDeckView(data.Deck); + } + + private void ShowDeckView(DeckData deck) + { + string text = "Detail"; + if (_cardDetailObj == null) + { + _cardDetailObj = NGUITools.AddChild(base.gameObject, _cardDetailPrefab); + _cardDetail = _cardDetailObj.GetComponent(); + _cardDetail.Initialize(LayerMask.NameToLayer(text), CardMaster.CardMasterId.Default); + _cardDetailObj.SetActive(value: false); + } + if (_deckViewObj == null) + { + _deckViewObj = UnityEngine.Object.Instantiate(_deckViewPrefab); + _cardList = _deckViewObj.GetComponent(); + _cardList.Init(base.gameObject, _cardDetail, null, OnCloseDeckView, text, in_DetailCameraUse: true, null, 40); + _deckViewObj.SetActive(value: false); + } + _scrollView.DisableSpring(); + UIManager.GetInstance().createInSceneCenterLoading(); + StartCoroutine(CardLoadCoroutine(deck)); + } + + private IEnumerator CardLoadCoroutine(DeckData deck) + { + IList cardIdList = deck.GetCardIdList(); + _cardList.RemoveData(); + _loadCardAssetList = _cardList.GetLoadFileList(cardIdList as List); + yield return StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_loadCardAssetList, null)); + _cardList.IsEnableMyRotationDisplay = false; + _cardList.IsConventionDeckIntroduction = true; + _cardList.SetDeck(deck, null); + if (deck.Format == Format.Rotation) + { + _cardList.SetFormatIcon("icon_rotation_s"); + } + _cardList.UpdateShortageRedEther(); + _cardList.SetShortageCardVisible(_cardList.IsEnableShortageCardVisible); + _cardList.SetActiveDeckIntroductionObj(isActive: true); + yield return null; + _dialog.SetDisp(inDisp: false); + _deckViewObj.SetActive(value: true); + UIManager.GetInstance().closeInSceneCenterLoading(); + } + + private void OnCloseDeckView() + { + _dialog.SetDisp(inDisp: true); + _deckViewObj.SetActive(value: false); + _scrollView.UpdatePosition(); + if (_loadCardAssetList != null) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_loadCardAssetList); + _loadCardAssetList.Clear(); + } + } + + private void CreateSelectSeriesIdDialog() + { + int prevSeriesId = _seriesId; + List seriesIdList = _introductionTask.ResultDeckSeriesIdList; + _ = _introductionTask.ResultDeckSeriesNameList; + seriesIdList.IndexOf(_seriesId); + DialogBase dialogBase = DeckIntroductionPeriodSelectDialog.Create(_seriesId, _introductionTask, delegate(int newId) + { + _seriesId = newId; + }); + int num = _dialogAttachRoot.GetComponentInChildren().depth + 5; + dialogBase.SetPanelDepth(num); + dialogBase.InsideObject.GetComponent().depth = num + 1; + UIPanel[] componentsInChildren = dialogBase.InsideObject.GetComponentsInChildren(); + for (int num2 = 0; num2 < componentsInChildren.Length; num2++) + { + componentsInChildren[num2].depth += num + 2; + } + dialogBase.SetTitleLabel(Data.SystemText.Get("OtherTop_0066")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.DecisionBtn); + dialogBase.ClickSe_Btn1 = Se.TYPE.SYS_BTN_DECIDE; + dialogBase.onPushButton1 = delegate + { + if (_seriesId != prevSeriesId) + { + StartCoroutine(ChangeDeckIntroductionSeries()); + } + }; + dialogBase.onCloseWithoutSelect = delegate + { + _seriesId = prevSeriesId; + }; + } + + private IEnumerator ChangeDeckIntroductionSeries() + { + yield return StartCoroutine(StartDeckIntroductionTask()); + UpdateFormatChangeUI(); + UpdateClassTab(); + } + + private void UpdateClassTab() + { + _isUpdateDeckList = true; + CardBasePrm.ClanType clanType = CardBasePrm.ClanType.NONE; + for (int i = 1; i < 9; i++) + { + CardBasePrm.ClanType clanType2 = (CardBasePrm.ClanType)i; + if (_introductionTask.IsExistClass(clanType2, _formatState)) + { + if (clanType == CardBasePrm.ClanType.NONE) + { + clanType = clanType2; + } + _tabList.SetTabToGrayByIndex(i - 1, disable: false); + } + else + { + _tabList.SetTabToGrayByIndex(i - 1, disable: true); + } + } + _tabList.Reset(); + _tabList.SelectTabByIndex((int)(clanType - 1), isForceSet: true); + } + + private void OnClickFormatBtn(FormatChangeUI.FormatCategory formatCategory) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + Format key = FORMAT_TO_FORMAT_CATEGORY.First((KeyValuePair data) => data.Value == formatCategory).Key; + if (_formatState != key) + { + _formatState = key; + UpdateClassTab(); + } + } + + private void UpdateFormatChangeUI() + { + bool flag = _introductionTask.IsExistFormat(Format.Rotation); + bool flag2 = _introductionTask.IsExistFormat(Format.Unlimited); + bool flag3 = _introductionTask.IsExistFormat(Format.Crossover); + _formatChangeUI.SetEnableFormatButton(FORMAT_TO_FORMAT_CATEGORY[Format.Rotation], flag); + _formatChangeUI.SetEnableFormatButton(FORMAT_TO_FORMAT_CATEGORY[Format.Unlimited], flag2); + _formatChangeUI.UpdateAnotherFormatButton(flag3 ? FORMAT_TO_FORMAT_CATEGORY[Format.Crossover] : FormatChangeUI.FormatCategory.Invalid); + if (_formatState == Format.Crossover && !flag3) + { + _formatState = Format.Rotation; + } + if (!flag) + { + _formatState = Format.Unlimited; + } + else if (!flag2) + { + _formatState = Format.Rotation; + } + _formatChangeUI.ChangeFormat(FORMAT_TO_FORMAT_CATEGORY[_formatState]); + } + } diff --git a/SVSim.BattleEngine/Engine/DeckIntroductionCopyDialog.cs b/SVSim.BattleEngine/Engine/DeckIntroductionCopyDialog.cs new file mode 100644 index 0000000..ce78b9b --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckIntroductionCopyDialog.cs @@ -0,0 +1,147 @@ +using System.Collections.Generic; +using UnityEngine; +using Wizard; +using Wizard.DeckCardEdit; +using Wizard.Dialog.Setting; + +public class DeckIntroductionCopyDialog : MonoBehaviour +{ + private const float GRID_Y_WITH_MY_ROTATION = -15f; + + private const float HINT_Y_WITH_MY_ROTATION = 53f; + + [SerializeField] + private UILabel _labelCopyConfirm; + + [SerializeField] + private UILabel _labelHint; + + [SerializeField] + private ItemToggle _copyToMyRotation; + + [SerializeField] + private ItemToggle _premium; + + [SerializeField] + private ItemToggle _prize; + + [SerializeField] + private UIGrid _grid; + + public bool IsMyRotationDeck; + + public bool IsResurgentToMyRotationDeck; + + private bool _isRotationPeriod; + + public bool IsCopyToMyRotation + { + get + { + if (!IsMyRotationDeck) + { + if (DisplayCopyToMyRotation) + { + return _copyToMyRotation.GetValue(); + } + return false; + } + return true; + } + } + + public string LabelCopyConfirm + { + set + { + _labelCopyConfirm.text = value; + } + } + + public string LabelHint + { + set + { + _labelHint.text = value; + } + } + + private bool DisplayCopyToMyRotation + { + get + { + if (Data.MyRotationAllInfo.IsWithinCopyDeckIntroductionPeriod && !IsMyRotationDeck) + { + return !IsDisableMyRotation; + } + return false; + } + } + + public bool IsDisableMyRotation { get; set; } + + private KeyValuePair MyRotationSaveDataKey + { + get + { + if (!_isRotationPeriod) + { + return PlayerPrefsWrapper.DECK_INTRO_IS_MYROTATION_COPY_NOT_EQUAL_PERIOD; + } + return PlayerPrefsWrapper.DECK_INTRO_IS_MYROTATION_COPY_EQUAL_PERIOD; + } + } + + public void Initialize(bool isRotationPeriod) + { + _isRotationPeriod = isRotationPeriod; + } + + private void Start() + { + if (IsResurgentToMyRotationDeck) + { + _copyToMyRotation.gameObject.SetActive(value: false); + _copyToMyRotation.SetValue(value: false); + _copyToMyRotation.SetActive_SeparatorLine(isActive: false); + } + else + { + _copyToMyRotation.gameObject.SetActive(DisplayCopyToMyRotation); + _copyToMyRotation.SetValue(DisplayCopyToMyRotation); + _copyToMyRotation.SetActive_SeparatorLine(isActive: true); + _copyToMyRotation.SetValue(PlayerPrefsWrapper.GetBool(MyRotationSaveDataKey)); + _copyToMyRotation.AddChangeCallback(delegate + { + PlayerPrefsWrapper.SetValue(MyRotationSaveDataKey, _copyToMyRotation.GetValue() ? 1 : 0); + }); + if (DisplayCopyToMyRotation) + { + ChangeY(_grid.transform, -15f); + ChangeY(_labelHint.transform, 53f); + } + } + ItemToggle itemPremium = _premium; + itemPremium.SetValue(Data.Load.data._userConfig.IsFoilPreferred); + itemPremium.AddChangeCallback(delegate + { + DeckCardEditUI.SendConfigUpdateFoilPreferred(itemPremium.GetValue()); + }); + itemPremium.SetActive_SeparatorLine(isActive: true); + ItemToggle itemPrize = _prize; + itemPrize.SetValue(Data.Load.data._userConfig.IsPrizePreferred); + itemPrize.AddChangeCallback(delegate + { + DeckCardEditUI.SendConfigUpdatePrizePreferred(itemPrize.GetValue()); + }); + itemPrize.SetActive_SeparatorLine(isActive: true); + _grid.Reposition(); + } + + private static void ChangeY(Transform trans, float y) + { + Vector3 localPosition = trans.localPosition; + localPosition.y = y; + trans.localPosition = localPosition; + } +} diff --git a/SVSim.BattleEngine/Engine/DeckIntroductionItem.cs b/SVSim.BattleEngine/Engine/DeckIntroductionItem.cs new file mode 100644 index 0000000..882c3bc --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckIntroductionItem.cs @@ -0,0 +1,172 @@ +using System; +using System.Collections; +using Cute; +using UnityEngine; +using Wizard; + +public class DeckIntroductionItem : MonoBehaviour +{ + private const int WIDTH_DECK_NAME_LABEL_NORMAL = 284; + + private const int WIDTH_DECK_NAME_LABEL_USE_SUBCLASS = 242; + + [SerializeField] + private CostCurveUI _costCurve; + + [SerializeField] + private UILabel _deckName; + + [SerializeField] + private UISprite _formatIcon; + + [SerializeField] + private ClassInfoParts _classInfoParts; + + [SerializeField] + private UILabel _playerName; + + [SerializeField] + private UILabel _deckDetail; + + [SerializeField] + private UILabel _followerCount; + + [SerializeField] + private UILabel _amuletCount; + + [SerializeField] + private UILabel _spellCount; + + [SerializeField] + private UITexture _cardTexture; + + [SerializeField] + private UIButton _button; + + [SerializeField] + private TweenScale _buttonAnimationTween; + + private DeckIntroductionTask.IntroductionData _data; + + public Action OnClick { get; set; } + + public void Initialize(DeckIntroductionTask.IntroductionData data) + { + IFormatBehavior defaultBehaviour = FormatBehaviorManager.GetDefaultBehaviour(data.Deck.Format); + _data = data; + _playerName.text = data.PlayerName; + _deckDetail.text = data.Detail; + _formatIcon.spriteName = defaultBehaviour.SmallIconSpriteName; + if (data.Deck.Format == Format.Rotation) + { + _formatIcon.spriteName = "icon_rotation_s"; + } + _deckName.text = data.Deck.GetDeckName(); + _deckName.width = (defaultBehaviour.UseSubClass ? 242 : 284); + _classInfoParts.gameObject.SetActive(defaultBehaviour.UseSubClass); + if (defaultBehaviour.UseSubClass) + { + _classInfoParts.InitByCharaPrm(GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(data.Deck.GetDeckClassID())); + _classInfoParts.SetSubClass((CardBasePrm.ClanType)data.Deck.GetDeckSubClassID()); + } + int followerCount = 0; + int spellCount = 0; + int amuletCount = 0; + GetCardCountEachType(data.Deck, out followerCount, out spellCount, out amuletCount); + _followerCount.text = followerCount.ToString(); + _spellCount.text = spellCount.ToString(); + _amuletCount.text = amuletCount.ToString(); + _costCurve.Initialize(defaultBehaviour.CardMasterId); + _costCurve.Refresh(data.Deck.GetCardIdList().ToArray()); + _button.onClick.Clear(); + _button.onClick.Add(new EventDelegate(delegate + { + OnClickButton(); + })); + string battleLogTexturePath = GetBattleLogTexturePath(data.TopCardId); + _cardTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(battleLogTexturePath); + } + + private void Start() + { + UIEventListener uIEventListener = UIEventListener.Get(_button.gameObject); + uIEventListener.onPress = (UIEventListener.BoolDelegate)Delegate.Combine(uIEventListener.onPress, (UIEventListener.BoolDelegate)delegate + { + StartCoroutine(ButtonAnimation()); + }); + } + + private IEnumerator ButtonAnimation() + { + BoxCollider btn = _button.GetComponent(); + Vector3 to = _buttonAnimationTween.to; + Vector3 defaultSize = btn.size; + Vector3 size = new Vector3(btn.size.x / to.x, btn.size.y / to.y, btn.size.z / to.z); + if ((bool)_buttonAnimationTween) + { + _buttonAnimationTween.PlayForward(); + btn.size = size; + while (Input.GetMouseButton(0)) + { + yield return null; + } + _buttonAnimationTween.PlayReverse(); + btn.size = defaultSize; + } + } + + public static string GetCardMaterialPath(int cardId) + { + CardMaster instance = CardMaster.GetInstance(CardMaster.CardMasterId.Default); + CardParameter cardParameterFromId = instance.GetCardParameterFromId(cardId); + CardParameter cardParameterFromId2 = instance.GetCardParameterFromId(cardParameterFromId.NormalCardId); + ResourcesManager.AssetLoadPathType type = ResourcesManager.AssetLoadPathType.UnitCardMaterial; + if (instance.GetCardParameterFromId(cardId).CharType != CardBasePrm.CharaType.NORMAL && !CardMaster.IsMutationCardCheck(instance.GetCardParameterFromId(cardId).BaseCardId)) + { + type = ResourcesManager.AssetLoadPathType.SpellCardMaterial; + } + return Toolbox.ResourcesManager.GetAssetTypePath(cardParameterFromId2.ResourceCardId.ToString(), type); + } + + private static string GetBattleLogTexturePath(int cardId) + { + CardMaster instance = CardMaster.GetInstance(CardMaster.CardMasterId.Default); + ResourcesManager.AssetLoadPathType assetLoadPathType = ResourcesManager.AssetLoadPathType.UnitHeader; + string path = instance.GetCardParameterFromId(cardId).ResourceCardId + "0"; + assetLoadPathType = ((instance.GetCardParameterFromId(cardId).CharType != CardBasePrm.CharaType.NORMAL && !CardMaster.IsMutationCardCheck(instance.GetCardParameterFromId(cardId).BaseCardId)) ? ResourcesManager.AssetLoadPathType.OtherHeader : ResourcesManager.AssetLoadPathType.UnitHeader); + return Toolbox.ResourcesManager.GetAssetTypePath(path, assetLoadPathType, isfetch: true); + } + + private void GetCardCountEachType(DeckData deck, out int followerCount, out int spellCount, out int amuletCount) + { + CardMaster instance = CardMaster.GetInstance(CardMaster.CardMasterId.Default); + int num = 0; + int num2 = 0; + int num3 = 0; + foreach (int cardId in deck.GetCardIdList()) + { + switch (instance.GetCardParameterFromId(cardId).CharType) + { + case CardBasePrm.CharaType.NORMAL: + num++; + break; + case CardBasePrm.CharaType.SPELL: + num2++; + break; + case CardBasePrm.CharaType.FIELD: + case CardBasePrm.CharaType.CHANT_FIELD: + num3++; + break; + } + } + followerCount = num; + spellCount = num2; + amuletCount = num3; + } + + private void OnClickButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + OnClick.Call(_data); + } +} diff --git a/SVSim.BattleEngine/Engine/DeckListMenuUI.cs b/SVSim.BattleEngine/Engine/DeckListMenuUI.cs new file mode 100644 index 0000000..7eb7042 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckListMenuUI.cs @@ -0,0 +1,1079 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; + +public class DeckListMenuUI : MonoBehaviour +{ + private enum EditMode + { + Default, + DeckSort, + MultiDelete + } + + public class PageData + { + public readonly DeckData[] DeckList; + + public readonly GameObject Obj; + + public PageData(DeckData[] deckArray, GameObject obj) + { + DeckList = deckArray; + Obj = obj; + } + } + + public enum eEditState + { + CanEdit, + DeleteOnly, + Lock + } + + private const int MAXNUM_DECK_PER_TABLE = 9; + + private const int PAGE_SHOW_LABEL_BORDER = 11; + + [SerializeField] + private DeckUI _deckFrameOriginal; + + [SerializeField] + private UIGrid _deckTableOriginal; + + [SerializeField] + private UISprite _radioIconOriginal; + + [SerializeField] + private GameObject _deckTableRoot; + + [SerializeField] + private UIGrid _radioIconsGrid; + + [SerializeField] + private UILabel _pageLabel; + + [SerializeField] + private UIButton _leftButton; + + [SerializeField] + private UIButton _rightButton; + + [SerializeField] + private BoxCollider _flickCollider; + + private List _radioIconClones; + + private List _pageList = new List(); + + private int _currentPage; + + private List _resourcePathList; + + private Coroutine _loadCoroutine; + + private bool _isChangePage; + + private float _timeChangePage; + + private List _deckUIList = new List(); + + private Action _onMultiDeckDelete; + + private Action _onLongTapMultiDeckDelete; + + private Func, BaseTask> _funcCreateDeckDeleteTask; + + private Func, BaseTask> _funcCreateSaveDeckOrderTask; + + private bool _isOnDestroy; + + [SerializeField] + private UIButton _deckSortStartButton; + + [SerializeField] + private UIButton _deckSortSaveButton; + + [SerializeField] + private UIButton _deckSortCancelButton; + + [SerializeField] + private GameObject _deckSortButtonBase; + + [SerializeField] + private GameObject _multiDeckDeleteMenuRoot; + + [SerializeField] + private UIButton _multiDeckDeleteStartButton; + + [SerializeField] + private UIButton _multiDeckDeleteCancelButton; + + [SerializeField] + private UIButton _multiDeckDeleteDecideButton; + + [SerializeField] + private GameObject _deckSortBlackBg; + + private EditMode _editMode; + + private DeckUI _newCreateObject; + + private bool _enableDeckSortDeckCount; + + private bool _initializeEnd; + + private List> _deckFrameDefaultList = new List>(); + + private List> _deckFrameListTempSort = new List>(); + + private DeckGroup _deckGroup; + + private bool _isVisibleCreateNewButton; + + private bool _enableFirstViewLastUseDeck = true; + + public eEditState EditState { get; private set; } + + public bool EnableDrag { get; set; } = true; + + public bool IsSortMode => _editMode == EditMode.DeckSort; + + private bool _isSortUse => EditState != eEditState.Lock; + + public bool IsSortDragging { get; set; } + + public bool IsPlayingSortAnimation { get; private set; } + + public GameObject SortDragObject { get; set; } + + public List DeckPageList { get; private set; } = new List(); + + public event Action OnSelectDeck; + + private void Awake() + { + _radioIconClones = new List(); + DeckSortInit(); + } + + public void Initialize(DeckGroup deckGroup, eEditState editState, Action onSelectDeck, Action onMultiDeckDelete, Action onLongPressMultiDeckDelete, Func, BaseTask> funcCreateDeckDeleteTask, Func, BaseTask> funcCreateSaveDeckOrderTask, bool isVisibleCreateNewButton, bool enableFirstViewLastUseDeck, Action onFinish) + { + EditState = editState; + OnSelectDeck += onSelectDeck; + _onMultiDeckDelete = onMultiDeckDelete; + _onLongTapMultiDeckDelete = onLongPressMultiDeckDelete; + _funcCreateDeckDeleteTask = funcCreateDeckDeleteTask; + _funcCreateSaveDeckOrderTask = funcCreateSaveDeckOrderTask; + _isVisibleCreateNewButton = isVisibleCreateNewButton; + _enableFirstViewLastUseDeck = enableFirstViewLastUseDeck; + _rightButton.gameObject.SetActive(value: false); + _leftButton.gameObject.SetActive(value: false); + UIEventListener uIEventListener = UIEventListener.Get(_flickCollider.gameObject); + uIEventListener.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener.onDrag, new UIEventListener.VectorDelegate(OnDragPanel)); + UIEventListener uIEventListener2 = UIEventListener.Get(_rightButton.gameObject); + uIEventListener2.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener2.onClick, (UIEventListener.VoidDelegate)delegate + { + NextPage(); + }); + UIEventListener uIEventListener3 = UIEventListener.Get(_leftButton.gameObject); + uIEventListener3.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener3.onClick, (UIEventListener.VoidDelegate)delegate + { + PrevPage(); + }); + _deckSortStartButton.onClick.Add(new EventDelegate(delegate + { + OnClickDeckSortStart(); + })); + _deckSortSaveButton.onClick.Add(new EventDelegate(delegate + { + OnClickDeckSortSave(); + })); + _deckSortCancelButton.onClick.Add(new EventDelegate(delegate + { + OnClickDeckSortCancel(); + })); + UIEventListener uIEventListener4 = UIEventListener.Get(_multiDeckDeleteStartButton.gameObject); + uIEventListener4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener4.onClick, (UIEventListener.VoidDelegate)delegate + { + OnClickMultiDeckDeleteStartButton(); + }); + UIEventListener uIEventListener5 = UIEventListener.Get(_multiDeckDeleteCancelButton.gameObject); + uIEventListener5.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener5.onClick, (UIEventListener.VoidDelegate)delegate + { + OnClickMultiDeckDeleteCancelButton(); + }); + UIEventListener uIEventListener6 = UIEventListener.Get(_multiDeckDeleteDecideButton.gameObject); + uIEventListener6.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener6.onClick, (UIEventListener.VoidDelegate)delegate + { + OnClickMultiDeckDeleteDecideButton(); + }); + UpdateDeckList(deckGroup, delegate + { + _initializeEnd = true; + onFinish.Call(); + }); + } + + private void Update() + { + if (_isChangePage) + { + _timeChangePage += Time.deltaTime; + if (_timeChangePage >= 0.2f) + { + _isChangePage = false; + _timeChangePage = 0f; + } + } + } + + public void UpdateDeckList(DeckGroup deckGroup, Action onFinish) + { + if (deckGroup != null) + { + if (_initializeEnd) + { + Delete(); + } + _deckGroup = deckGroup; + _loadCoroutine = UIManager.GetInstance().StartCoroutine(LoadResourceCoroutine(delegate + { + SetupEditableDeckList(); + onFinish.Call(); + })); + } + } + + private IEnumerator LoadResourceCoroutine(Action onFinish) + { + _resourcePathList = new List(); + List list = new List(); + List list2 = new List(); + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + for (int i = 1; i < 9; i++) + { + int skin_id = dataMgr.GetCharaPrmByClassId(i).skin_id; + if (!list.Contains(skin_id)) + { + list.Add(skin_id); + _resourcePathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(skin_id.ToString(), ResourcesManager.AssetLoadPathType.DeckListTexture)); + } + } + int num = 3000011; + if (!list2.Contains(num)) + { + list2.Add(num); + _resourcePathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(num.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture)); + } + foreach (DeckData deckData in _deckGroup.DeckDataList) + { + LoadSkinSleeve(deckData, list, list2); + } + yield return UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_resourcePathList, null)); + _loadCoroutine = null; + if (!_isOnDestroy) + { + onFinish.Call(); + } + } + + private void LoadSkinSleeve(DeckData deck, List skinIdList, List sleeveIdList) + { + if (deck.IsNoCard()) + { + return; + } + int skinId = deck.GetSkinId(); + if (!skinIdList.Contains(skinId)) + { + skinIdList.Add(skinId); + _resourcePathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(skinId.ToString(), ResourcesManager.AssetLoadPathType.DeckListTexture)); + } + long existingSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(deck.GetDeckSleeveID()); + Sleeve sleeve = Data.Master.SleeveMgr.Get(existingSleeveId); + if (!sleeveIdList.Contains(existingSleeveId)) + { + sleeveIdList.Add(existingSleeveId); + _resourcePathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(existingSleeveId.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture)); + if (sleeve.IsPremiumSleeve) + { + UIManager.GetInstance().getUIBase_CardManager().AddPremireSleevePath(ref _resourcePathList, sleeve); + } + } + } + + private void SetupEditableDeckList() + { + SetupDeckList(); + foreach (List deckFrameDefault in _deckFrameDefaultList) + { + foreach (DeckFrame item in deckFrameDefault) + { + item.Transform.gameObject.AddMissingComponent().DeckListMenuClass = this; + } + } + } + + private void SetupDeckList() + { + int newPage = 0; + _deckUIList.Clear(); + AddCustomDeckTable(_deckGroup.DeckDataList); + if (_enableFirstViewLastUseDeck && _deckGroup.DeckDataList.Any((DeckData deck) => deck.IsUsable())) + { + DeckData firstDisplayDeck = GetFirstDisplayDeck(); + if (firstDisplayDeck != null) + { + for (int num = 0; num < _pageList.Count; num++) + { + DeckData[] deckList = _pageList[num].DeckList; + for (int num2 = 0; num2 < deckList.Length; num2++) + { + if (deckList[num2] == firstDisplayDeck) + { + newPage = num; + break; + } + } + } + } + } + ChangePage(newPage, isImmediate: true); + SetDefaultMode(); + } + + private DeckData GetFirstDisplayDeck() + { + int deckId = 0; + switch (_deckGroup.DeckFormat) + { + case Format.Rotation: + deckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_ROTATION); + break; + case Format.Unlimited: + deckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_UNLIMITED); + break; + case Format.PreRotation: + deckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_PRE_ROTATION); + break; + case Format.Crossover: + deckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_CROSSOVER); + break; + case Format.MyRotation: + deckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_MY_ROTATION); + break; + case Format.Avatar: + deckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_AVATAR); + break; + } + DeckData deckData = _deckGroup.DeckDataList.FirstOrDefault((DeckData deck) => deck.GetDeckID() == deckId && !deck.IsNoCard()); + if (deckData != null) + { + return deckData; + } + deckData = _deckGroup.DeckDataList.FirstOrDefault((DeckData deck) => deck.IsUsable()); + if (deckData != null) + { + return deckData; + } + return _deckGroup.DeckDataList.FirstOrDefault(); + } + + private void AddCustomDeckTable(List deckList) + { + int num = 0; + List list = new List(); + deckList.FindLastIndex((DeckData d) => !d.IsNoCard()); + int num2 = 0; + List list2 = DeckUI.DeckViewData.CreateDeckViewList(deckList, _isVisibleCreateNewButton); + for (int num3 = 0; num3 < deckList.Count; num3++) + { + list.Add(list2[num3]); + if (!deckList[num3].IsNoCard()) + { + num2++; + } + if (list.Count == 9 || num3 + 1 == deckList.Count) + { + num++; + AddDeckTable(list); + list.Clear(); + } + } + if (_isSortUse) + { + _enableDeckSortDeckCount = num2 >= 2; + } + } + + private void AddDeckTable(List deckViewList) + { + UIGrid uIGrid = UnityEngine.Object.Instantiate(_deckTableOriginal); + uIGrid.transform.parent = _deckTableRoot.transform; + uIGrid.transform.localScale = Vector3.one; + int num = 0; + uIGrid.sorting = UIGrid.Sorting.Custom; + uIGrid.onCustomSort = SortUiGridCustom; + DeckPageList.Add(uIGrid); + _deckFrameListTempSort.Add(new List()); + _deckFrameDefaultList.Add(new List()); + for (int i = 0; i < _deckFrameListTempSort.Count; i++) + { + num += _deckFrameListTempSort[i].Count; + } + for (int j = 0; j < deckViewList.Count; j++) + { + DeckData deck = deckViewList[j].Deck; + Transform transform = CreateDeckFrame(deckViewList[j]); + uIGrid.AddChild(transform); + transform.localScale = Vector3.one; + transform.gameObject.name = (num + j).ToString(); + if (!deck.IsNoCard()) + { + DeckFrame deckFrame = new DeckFrame(); + deckFrame.Transform = transform; + deckFrame.DeckId = deck.GetDeckID(); + _deckFrameListTempSort[_deckFrameListTempSort.Count - 1].Add(deckFrame); + _deckFrameDefaultList[_deckFrameListTempSort.Count - 1].Add(deckFrame); + } + } + UISprite uISprite = UnityEngine.Object.Instantiate(_radioIconOriginal); + _radioIconClones.Add(uISprite); + _radioIconsGrid.AddChild(uISprite.transform); + uISprite.transform.localScale = Vector3.one; + PageData item = new PageData(deckViewList.Select((DeckUI.DeckViewData deckView) => deckView.Deck).ToArray(), uIGrid.gameObject); + _pageList.Add(item); + } + + public static int SortUiGridCustom(Transform a, Transform b) + { + if (int.TryParse(a.name, out var result) && int.TryParse(b.name, out var result2)) + { + if (result > result2) + { + return 1; + } + if (result < result2) + { + return -1; + } + } + return 0; + } + + public bool DeckSort(string inTargetObjectName, string inSortObjectName, ref Vector3 sortObjectPosition) + { + if (inTargetObjectName == inSortObjectName + 1) + { + return false; + } + if (_deckFrameListTempSort[0].Count < 2) + { + return false; + } + if (inTargetObjectName == inSortObjectName) + { + return false; + } + int num = int.Parse(inTargetObjectName); + int num2 = int.Parse(inSortObjectName) / 9; + int num3 = num / 9; + if (num2 < num3 && num % 9 == 0 && _currentPage != num2) + { + return false; + } + DeckFrame deckFrame = null; + for (int i = 0; i < _deckFrameListTempSort.Count; i++) + { + deckFrame = _deckFrameListTempSort[i].FindLast((DeckFrame a) => inSortObjectName == a.Transform.name); + if (deckFrame != null) + { + break; + } + } + for (int num4 = 0; num4 < _deckFrameListTempSort.Count && _deckFrameListTempSort[num4].FindLast((DeckFrame a) => inTargetObjectName == a.Transform.name) == null; num4++) + { + } + List list = new List(); + for (int num5 = 0; num5 < _deckFrameListTempSort.Count; num5++) + { + list.AddRange(_deckFrameListTempSort[num5]); + } + list.Remove(deckFrame); + int index = list.FindIndex((DeckFrame a) => inTargetObjectName == a.Transform.name); + list.Insert(index, deckFrame); + sortObjectPosition = CreateSortedDeckPage(list, deckFrame, inIsMoveAnimation: true); + return true; + } + + public void DeckSortAddLast(DeckFrame inAddObject) + { + List list = new List(); + for (int i = 0; i < _deckFrameListTempSort.Count; i++) + { + list.AddRange(_deckFrameListTempSort[i]); + } + for (int j = 0; j < list.Count; j++) + { + if (list[j].DeckId == inAddObject.DeckId) + { + list.RemoveAt(j); + break; + } + } + list.Add(inAddObject); + CreateSortedDeckPage(list, inAddObject, inIsMoveAnimation: true); + } + + private Vector3 CreateSortedDeckPage(List inSortedAllList, DeckFrame inSortObject, bool inIsMoveAnimation) + { + List> list = new List>(); + List list2 = new List(); + for (int i = 0; i <= inSortedAllList.Count / 9; i++) + { + if (i < DeckPageList.Count) + { + list.Add(new List()); + list[i].AddRange(inSortedAllList.GetRange(i * 9, _deckFrameListTempSort[i].Count)); + } + } + int num = 0; + for (int j = 0; j < list.Count; j++) + { + for (int k = 0; k < list[j].Count; k++) + { + list[j][k].Transform.name = num.ToString(); + list[j][k].Transform.SetParent(DeckPageList[j].transform); + num++; + list2.Add(list[j][k].Transform.localPosition); + } + } + for (int l = 0; l < DeckPageList.Count; l++) + { + DeckPageList[l].Reposition(); + } + Vector3 result = Vector3.zero; + if (inSortObject != null) + { + result = inSortObject.Transform.localPosition; + } + if (inIsMoveAnimation) + { + int num2 = 0; + for (int m = 0; m < list.Count; m++) + { + for (int n = 0; n < list[m].Count; n++) + { + if (inSortObject != list[m][n] && list[m][n].Transform.localPosition != list2[num2]) + { + if (!list[m][n].Transform.gameObject.activeInHierarchy) + { + list[m][n].TweenTargetPosition = list[m][n].Transform.localPosition; + list[m][n].Transform.localPosition = list[m][n].TweenTargetPosition; + } + else + { + list[m][n].TweenTargetPosition = list[m][n].Transform.localPosition; + UITweenPosition uITweenPosition = list[m][n].Transform.gameObject.AddMissingComponent(); + IsPlayingSortAnimation = true; + uITweenPosition.OnFinishCallBack = delegate(UITweenPosition fadeObject) + { + fadeObject.GetComponent().SortAnimeComplete(); + IsPlayingSortAnimation = false; + }; + uITweenPosition.From = list2[num2]; + uITweenPosition.To = list[m][n].TweenTargetPosition; + uITweenPosition.EndTime = 0.2f; + uITweenPosition.PlayForward(resetFlag: true); + list[m][n].Transform.gameObject.GetComponent().enabled = false; + } + } + num2++; + } + } + } + _deckFrameListTempSort = list; + return result; + } + + public int GetDeckNoFromGameObject(GameObject inObject) + { + for (int i = 0; i < _deckFrameListTempSort.Count; i++) + { + for (int j = 0; j < _deckFrameListTempSort[i].Count; j++) + { + if (_deckFrameListTempSort[i][j].Transform.gameObject == inObject) + { + return _deckFrameListTempSort[i][j].DeckId; + } + } + } + return 0; + } + + public bool ChangePage(int newPage, bool isImmediate = false) + { + int currentPage = _currentPage; + if (_isChangePage) + { + return false; + } + int count = _radioIconClones.Count; + bool flag = false; + if (currentPage == newPage) + { + isImmediate = true; + } + if (!IsValidPage(newPage)) + { + return false; + } + _currentPage = newPage; + foreach (PageData page in _pageList) + { + page.Obj.SetActive(value: false); + } + _pageList[_currentPage].Obj.SetActive(value: true); + _pageList[currentPage].Obj.SetActive(value: true); + float num = ((_currentPage < currentPage) ? 1400f : (-1400f)); + if (flag) + { + num = 0f - num; + } + Vector3 pos = new Vector3(num, 0f, 0f); + Vector3 localPosition = new Vector3(0f - num, 0f, 0f); + Vector3 zero = Vector3.zero; + _pageList[_currentPage].Obj.transform.localPosition = localPosition; + TweenPosition.Begin(_pageList[currentPage].Obj, isImmediate ? 0f : 0.2f, pos); + TweenPosition.Begin(_pageList[_currentPage].Obj, isImmediate ? 0f : 0.2f, zero); + ClearLongPress(); + if (!isImmediate) + { + _isChangePage = true; + } + for (int i = 0; i < count; i++) + { + if (i == newPage) + { + _radioIconClones[i].spriteName = _radioIconClones[i].spriteName.Replace("_off", "_on"); + } + else + { + _radioIconClones[i].spriteName = _radioIconClones[i].spriteName.Replace("_on", "_off"); + } + } + bool flag2 = _pageList.Count >= 11; + bool flag3 = IsValidPage(newPage + 1); + bool flag4 = IsValidPage(newPage - 1); + bool active = (flag3 || flag4) && !flag2; + _rightButton.gameObject.SetActive(flag3); + _leftButton.gameObject.SetActive(flag4); + _radioIconsGrid.gameObject.SetActive(active); + _pageLabel.gameObject.SetActive(flag2); + _pageLabel.text = Data.SystemText.Get("Card_0053", (newPage + 1).ToString(), _pageList.Count.ToString()); + return true; + } + + private IEnumerator DeleteWaitCoroutine() + { + while (_loadCoroutine != null) + { + yield return null; + } + DeleteResource(); + } + + private void Delete() + { + if (_loadCoroutine != null) + { + StopCoroutine(_loadCoroutine); + _loadCoroutine = null; + } + _radioIconClones.Clear(); + _pageList.Clear(); + Transform[] componentsInChildren = _deckTableRoot.GetComponentsInChildren(); + for (int i = 0; i < componentsInChildren.Length; i++) + { + if (_deckTableRoot.transform != componentsInChildren[i]) + { + UnityEngine.Object.Destroy(componentsInChildren[i].gameObject); + } + } + componentsInChildren = _radioIconsGrid.GetComponentsInChildren(); + for (int j = 0; j < componentsInChildren.Length; j++) + { + if (_radioIconsGrid.transform != componentsInChildren[j]) + { + UnityEngine.Object.Destroy(componentsInChildren[j].gameObject); + } + } + DeckPageList.Clear(); + _deckFrameDefaultList.Clear(); + _deckFrameListTempSort.Clear(); + DeleteResource(); + } + + private void DeleteResource() + { + if (_resourcePathList != null) + { + Toolbox.ResourcesManager.RemoveAssetGroup(_resourcePathList); + _resourcePathList.Clear(); + } + } + + private bool IsValidPage(int page) + { + int count = _radioIconClones.Count; + if (count > 0 && page >= 0) + { + return page < count; + } + return false; + } + + private Transform CreateDeckFrame(DeckUI.DeckViewData deckViewData) + { + DeckUI deckUI = UnityEngine.Object.Instantiate(_deckFrameOriginal); + deckUI.Initialize(OnClickDeck, OnLongPress); + deckUI.UpdateView(deckViewData); + if (deckViewData.ViewType == DeckUI.eViewType.CreateNew) + { + _newCreateObject = deckUI; + } + UIEventListener uIEventListener = UIEventListener.Get(deckUI.gameObject); + uIEventListener.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener.onDrag, new UIEventListener.VectorDelegate(OnDragPanel)); + _deckUIList.Add(deckUI); + return deckUI.transform; + } + + public void NextPage() + { + if (ChangePage(_currentPage + 1)) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + + public void PrevPage() + { + if (ChangePage(_currentPage - 1)) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + + private void OnDragPanel(GameObject obj, Vector2 dir) + { + if (EnableDrag && !IsSortDragging) + { + if (dir.x >= 70f) + { + PrevPage(); + } + else if (dir.x <= -70f) + { + NextPage(); + } + } + } + + private void OnClickDeck(DeckUI deckDisplay) + { + if (UIManager.GetInstance().IsTouchable) + { + switch (_editMode) + { + case EditMode.Default: + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + this.OnSelectDeck.Call(deckDisplay.Deck); + break; + case EditMode.MultiDelete: + OnClickDeckForMultiDeckDelete(deckDisplay); + break; + case EditMode.DeckSort: + break; + } + } + } + + private void DeckSortInit() + { + SetDefaultMode(); + _deckSortStartButton.gameObject.SetActive(value: false); + } + + private void OnClickDeckSortStart() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SetSortMode(); + } + + private void OnClickDeckSortCancel() + { + if (!IsSortDragging && !IsPlayingSortAnimation) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL); + SetDefaultMode(); + List list = new List(); + for (int i = 0; i < _deckFrameDefaultList.Count; i++) + { + list.AddRange(_deckFrameDefaultList[i]); + } + CreateSortedDeckPage(list, null, inIsMoveAnimation: false); + ClearBackButtonAction(); + } + } + + private void OnClickDeckSortSave() + { + if (!IsSortDragging && !IsPlayingSortAnimation) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SaveDeckOrder(delegate + { + SetDefaultMode(); + ClearBackButtonAction(); + }); + } + } + + private void SaveDeckOrder(Action onSuccess) + { + List list = new List(); + for (int i = 0; i < _deckFrameListTempSort.Count; i++) + { + for (int j = 0; j < _deckFrameListTempSort[i].Count; j++) + { + list.Add(_deckFrameListTempSort[i][j].DeckId); + } + } + BaseTask task = _funcCreateSaveDeckOrderTask.Call(list); + StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate + { + _deckFrameDefaultList.Clear(); + _deckFrameDefaultList.AddRange(_deckFrameListTempSort); + onSuccess.Call(); + })); + } + + private void DeckCreateEmptyChange(bool isEmpty) + { + if (!(_newCreateObject == null) && (_newCreateObject.ViewType == DeckUI.eViewType.CreateNew || _newCreateObject.ViewType == DeckUI.eViewType.Empty)) + { + _newCreateObject.UpdateView(_newCreateObject.Deck, isEmpty ? DeckUI.eViewType.Empty : DeckUI.eViewType.CreateNew); + } + } + + private void OnDestroy() + { + _isOnDestroy = true; + UIManager.GetInstance().StartCoroutine(DeleteWaitCoroutine()); + } + + public DeckData GetDeckDataSamePage(DeckData targetDeck) + { + foreach (PageData page in _pageList) + { + bool flag = false; + DeckData[] deckList = page.DeckList; + foreach (DeckData deckData in deckList) + { + if (deckData.Format == targetDeck.Format && !deckData.IsNoCard() && deckData.GetDeckID() == targetDeck.GetDeckID()) + { + flag = true; + } + } + if (!flag) + { + continue; + } + deckList = page.DeckList; + foreach (DeckData deckData2 in deckList) + { + if (!deckData2.IsNoCard() && deckData2.GetDeckID() != targetDeck.GetDeckID()) + { + return deckData2; + } + } + } + return null; + } + + private void OnClickMultiDeckDeleteStartButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + SaveDeckOrder(delegate + { + SetMultiDeleteMode(); + }); + } + + private void OnClickDeckForMultiDeckDelete(DeckUI deckDisplay) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + deckDisplay.SetVisibleCheckMark(!deckDisplay.IsCheckeMark); + deckDisplay.SetColorToGrey(deckDisplay.IsCheckeMark); + RefreshMultiDeleteDecideButtonEnable(); + } + + private void RefreshMultiDeleteDecideButtonEnable() + { + bool flag = GetMultiDeleteCount() > 0; + UIManager.SetObjectToGrey(_multiDeckDeleteDecideButton.gameObject, !flag); + } + + private void SetDefaultMode() + { + _editMode = EditMode.Default; + IsSortDragging = false; + DeckCreateEmptyChange(isEmpty: false); + _deckSortButtonBase.SetActive(value: false); + _deckSortBlackBg.SetActive(value: false); + _multiDeckDeleteMenuRoot.SetActive(value: false); + _multiDeckDeleteStartButton.gameObject.SetActive(value: false); + _deckSortStartButton.gameObject.SetActive(_isSortUse && _enableDeckSortDeckCount); + SetSelectableDeckAll(isSelectable: true); + ClearAllCheckMark(); + ClearLongPress(); + } + + private void SetSortMode() + { + _editMode = EditMode.DeckSort; + IsSortDragging = false; + _deckSortButtonBase.SetActive(value: true); + _deckSortBlackBg.SetActive(value: true); + _multiDeckDeleteMenuRoot.SetActive(value: false); + _multiDeckDeleteStartButton.gameObject.SetActive(value: true); + DeckCreateEmptyChange(isEmpty: true); + _deckSortStartButton.gameObject.SetActive(value: false); + SetSelectableDeckAll(isSelectable: false); + ClearAllCheckMark(); + ClearLongPress(); + } + + private void SetMultiDeleteMode() + { + _editMode = EditMode.MultiDelete; + _deckSortButtonBase.SetActive(value: false); + _multiDeckDeleteMenuRoot.SetActive(value: true); + _multiDeckDeleteStartButton.gameObject.SetActive(value: false); + SetBackButtonForMultiDeleteMode(); + SetSelectableDeckAll(isSelectable: true); + ClearAllCheckMark(); + ClearLongPress(); + RefreshMultiDeleteDecideButtonEnable(); + } + + private void SetBackButtonForMultiDeleteMode() + { + } + + private void ClearBackButtonAction() + { + } + + private void ClearAllCheckMark() + { + foreach (DeckUI deckUI in _deckUIList) + { + deckUI.SetVisibleCheckMark(isVisible: false); + deckUI.SetColorToGrey(isGrey: false); + } + } + + private void SetSelectableDeckAll(bool isSelectable) + { + foreach (DeckUI deckUI in _deckUIList) + { + deckUI.SetSelectable(isSelectable); + } + } + + private int GetMultiDeleteCount() + { + int num = 0; + foreach (DeckUI deckUI in _deckUIList) + { + if (deckUI.IsCheckeMark) + { + num++; + } + } + return num; + } + + private void ClearLongPress() + { + foreach (DeckUI deckUI in _deckUIList) + { + deckUI.ClearLongPress(); + } + } + + private void OnClickMultiDeckDeleteCancelButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL); + SetSortMode(); + } + + private void OnClickMultiDeckDeleteDecideButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + ClearBackButtonAction(); + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Dia_DeckEdit_001_Title")); + dialogBase.SetText(systemText.Get("Card_0218")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.RedBtn_CancelBtn); + dialogBase.SetButtonText(systemText.Get("Card_0104")); + dialogBase.onPushButton1 = delegate + { + MultiDeckDelete(); + }; + dialogBase.OnCloseStart = delegate + { + SetBackButtonForMultiDeleteMode(); + }; + } + + private void MultiDeckDelete() + { + List list = new List(); + foreach (DeckUI deckUI in _deckUIList) + { + if (deckUI.IsCheckeMark) + { + list.Add(deckUI.Deck.GetDeckID()); + } + } + BaseTask task = _funcCreateDeckDeleteTask.Call(list); + StartCoroutine(Toolbox.NetworkManager.Connect(task, OnSuccessDeckDelete)); + } + + private void OnLongPress(DeckUI deckDisplay) + { + if (_editMode == EditMode.MultiDelete) + { + _onLongTapMultiDeckDelete.Call(deckDisplay.Deck); + } + } + + private void OnSuccessDeckDelete(NetworkTask.ResultCode code) + { + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Dia_DeckEdit_002_Title")); + dialogBase.SetText(systemText.Get("Card_0010")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + _onMultiDeckDelete.Call(); + ClearBackButtonAction(); + } +} diff --git a/SVSim.BattleEngine/Engine/DeckSortDragDrop.cs b/SVSim.BattleEngine/Engine/DeckSortDragDrop.cs new file mode 100644 index 0000000..411252b --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckSortDragDrop.cs @@ -0,0 +1,380 @@ +using UnityEngine; +using Wizard; + +public class DeckSortDragDrop : UIDragDropItem +{ + protected enum DropType + { + None, + Sort, + Add + } + + private const int UIPANEL_DEPTH = 50; + + private const float DRAG_OBJECT_ALPHA = 0.5f; + + private const float SORT_DELTA_UNDER = 5f; + + private const float PAGE_CHANGE_INTERVAL_TIME = 0.75f; + + public DeckListMenuUI DeckListMenuClass; + + protected Vector3 _defaultPosition; + + protected Transform _defaultParentTransform; + + protected UIPanel _uiPanel; + + protected Camera _deckListCamera; + + protected string _sortExecTargetName; + + protected bool _isHighSpeedCheck; + + protected Vector3 _oldMousePosition; + + protected bool _isDragStart; + + protected bool _isPress; + + protected bool _isSortExecEvenOnce; + + protected float _pageChangeIntervalTime; + + protected override void Awake() + { + IsGridRepositionUse = false; + _deckListCamera = UIManager.GetInstance().transform.Find("UIRoot/CameraUI").GetComponent(); + _pageChangeIntervalTime = 0f; + } + + protected override void Update() + { + if (_isHighSpeedCheck) + { + if (IsSortDrag() && !DeckListMenuClass.IsPlayingSortAnimation) + { + if ((_oldMousePosition - Input.mousePosition).magnitude == 0f) + { + bool isDrop = true; + if (_isPress) + { + isDrop = false; + } + CurrentTouchPositionSort(isDrop); + _isHighSpeedCheck = false; + } + _oldMousePosition = Input.mousePosition; + } + else + { + _isHighSpeedCheck = false; + } + } + if (_isDragStart && !DeckListMenuClass.IsPlayingSortAnimation) + { + _pageChangeIntervalTime += Time.deltaTime; + PageChangeUpdate(); + } + } + + protected override void OnPress(bool isPressed) + { + if (_isPress != isPressed && DeckListMenuClass.IsSortMode) + { + if (isPressed && !DeckListMenuClass.IsSortDragging) + { + if (!DeckListMenuClass.IsPlayingSortAnimation) + { + base.OnPress(isPressed); + DragDropStart(); + } + } + else if (IsSortDrag()) + { + base.OnPress(isPressed); + SetDragStatus(isDrag: false); + Object.Destroy(_uiPanel); + CurrentTouchPositionSort(isDrop: true); + if (_isSortExecEvenOnce) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + } + _isSortExecEvenOnce = false; + _isDragStart = false; + } + } + _isPress = isPressed; + } + + protected override void OnDragStart() + { + if (!DeckListMenuClass.IsPlayingSortAnimation) + { + base.OnDragStart(); + } + } + + protected void DragDropStart() + { + if (DeckListMenuClass.IsSortMode && !IsSortDrag()) + { + SetDragStatus(isDrag: true); + mTrans = base.transform; + base.transform.parent.GetComponent().Reposition(); + _defaultParentTransform = base.transform.parent; + _defaultPosition = base.transform.localPosition; + base.transform.parent = _deckListCamera.transform; + base.transform.gameObject.GetComponent().enabled = false; + _uiPanel = base.gameObject.AddComponent(); + _uiPanel.depth = 50; + base.gameObject.GetComponent().UpdateUIAlpha(0.5f); + base.transform.position = _deckListCamera.ScreenToWorldPoint(Input.mousePosition); + _isDragStart = true; + _isSortExecEvenOnce = false; + _pageChangeIntervalTime = 0.75f; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + } + } + + protected override void OnDragDropMove(Vector2 delta) + { + base.transform.position = _deckListCamera.ScreenToWorldPoint(Input.mousePosition); + if (!DeckListMenuClass.IsSortMode || DeckListMenuClass.IsPlayingSortAnimation) + { + return; + } + switch (UICamera.hoveredObject.name) + { + case "LeftDragArea": + return; + case "LeftArrow": + return; + case "RightArrow": + return; + case "RightDragArea": + return; + } + if (delta.magnitude < 5f) + { + DeckFrame inRetObject = null; + switch (GetSortTaget(UICamera.hoveredObject, out inRetObject)) + { + case DropType.Sort: + DeckSort(inRetObject.Transform.gameObject, inDrop: false); + break; + case DropType.Add: + AddExec(inRetObject, inDrop: false); + break; + } + _isHighSpeedCheck = false; + } + else + { + _isHighSpeedCheck = true; + } + } + + protected void DeckSort(GameObject inDropObject, bool inDrop) + { + bool flag = false; + if (inDropObject != null) + { + if (inDropObject.GetComponent() != null) + { + if (_sortExecTargetName != inDropObject.name) + { + flag = true; + if (DeckListMenuClass.DeckSort(inDropObject.name, base.name, ref _defaultPosition)) + { + _defaultParentTransform = base.gameObject.transform.parent; + base.transform.parent = _deckListCamera.transform; + } + if (inDrop) + { + MoveReset(); + } + else + { + base.transform.position = _deckListCamera.ScreenToWorldPoint(Input.mousePosition); + } + _sortExecTargetName = inDropObject.name; + } + } + else if (inDrop) + { + MoveReset(); + } + } + else if (inDrop) + { + MoveReset(); + } + _sortExecTargetName = string.Empty; + if (flag) + { + _isSortExecEvenOnce = true; + } + } + + protected void AddExec(DeckFrame inAddObject, bool inDrop) + { + DeckListMenuClass.DeckSortAddLast(inAddObject); + _defaultParentTransform = base.gameObject.transform.parent; + _defaultPosition = base.transform.localPosition; + if (!inDrop) + { + base.transform.parent = _deckListCamera.transform; + base.transform.position = _deckListCamera.ScreenToWorldPoint(Input.mousePosition); + } + else + { + MoveReset(); + } + _isSortExecEvenOnce = true; + } + + protected DropType GetSortTaget(GameObject inDropObject, out DeckFrame inRetObject) + { + inRetObject = new DeckFrame(); + if (inDropObject.GetComponent() != null) + { + string text = ((!(inDropObject.transform.position.x > _deckListCamera.ScreenToWorldPoint(Input.mousePosition).x)) ? (int.Parse(inDropObject.transform.name) + 1).ToString() : inDropObject.transform.name); + Transform transform = null; + for (int i = 0; i < DeckListMenuClass.DeckPageList.Count; i++) + { + transform = DeckListMenuClass.DeckPageList[i].transform.Find(text); + if (transform != null) + { + break; + } + } + if (text == base.gameObject.name) + { + return DropType.None; + } + if (transform == null || transform.GetComponent() == null) + { + inRetObject.Transform = base.gameObject.transform; + inRetObject.DeckId = DeckListMenuClass.GetDeckNoFromGameObject(inRetObject.Transform.gameObject); + return DropType.Add; + } + inRetObject.Transform = transform.gameObject.transform; + inRetObject.DeckId = DeckListMenuClass.GetDeckNoFromGameObject(inRetObject.Transform.gameObject); + return DropType.Sort; + } + return DropType.None; + } + + protected void CurrentTouchPositionSort(bool isDrop) + { + DeckFrame inRetObject = new DeckFrame(); + GameObject gameObject = null; + BetterList hitsList = UICamera.GetHitsList(); + for (int i = 0; i < hitsList.buffer.Length; i++) + { + if (hitsList.buffer[i].go != null && (bool)hitsList.buffer[i].go.GetComponent()) + { + gameObject = hitsList[i].go; + break; + } + } + if (gameObject != null) + { + switch (GetSortTaget(gameObject, out inRetObject)) + { + case DropType.Sort: + DeckSort(inRetObject.Transform.gameObject, isDrop); + break; + case DropType.Add: + AddExec(inRetObject, isDrop); + break; + default: + DeckSort(null, isDrop); + break; + } + } + else + { + DeckSort(null, isDrop); + } + } + + public void SortAnimeComplete() + { + base.gameObject.GetComponent().enabled = true; + } + + protected void MoveReset() + { + mParent = _defaultParentTransform; + base.transform.SetParent(_defaultParentTransform); + base.transform.localPosition = _defaultPosition; + base.gameObject.GetComponent().UpdateUIAlpha(1f); + base.transform.gameObject.GetComponent().enabled = true; + } + + private void OnApplicationPause(bool paused) + { + if (_isPress && paused) + { + OnPress(isPressed: false); + StopDragging(UICamera.hoveredObject); + mPressed = false; + } + } + + private void PageChangeUpdate() + { + BetterList hitsList = UICamera.GetHitsList(); + for (int i = 0; i < hitsList.buffer.Length; i++) + { + if (!(hitsList.buffer[i].go != null)) + { + continue; + } + if (hitsList.buffer[i].go.name == "LeftDragArea") + { + if (_pageChangeIntervalTime > 0.75f) + { + DeckListMenuClass.PrevPage(); + _pageChangeIntervalTime = 0f; + } + break; + } + if (hitsList.buffer[i].go.name == "RightDragArea") + { + if (_pageChangeIntervalTime > 0.75f) + { + DeckListMenuClass.NextPage(); + _pageChangeIntervalTime = 0f; + } + break; + } + } + } + + private bool IsSortDrag() + { + if (DeckListMenuClass.IsSortDragging && DeckListMenuClass.SortDragObject == base.gameObject) + { + return true; + } + return false; + } + + private void SetDragStatus(bool isDrag) + { + if (isDrag) + { + DeckListMenuClass.IsSortDragging = true; + DeckListMenuClass.SortDragObject = base.gameObject; + } + else + { + DeckListMenuClass.IsSortDragging = false; + DeckListMenuClass.SortDragObject = null; + } + } +} diff --git a/SVSim.BattleEngine/Engine/DegreeInfo.cs b/SVSim.BattleEngine/Engine/DegreeInfo.cs new file mode 100644 index 0000000..1374669 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DegreeInfo.cs @@ -0,0 +1,4 @@ +public class DegreeInfo : HeaderData +{ + public DegreeInfoDetail data; +} diff --git a/SVSim.BattleEngine/Engine/DegreeInfoDetail.cs b/SVSim.BattleEngine/Engine/DegreeInfoDetail.cs new file mode 100644 index 0000000..48df8aa --- /dev/null +++ b/SVSim.BattleEngine/Engine/DegreeInfoDetail.cs @@ -0,0 +1,6 @@ +using System.Collections.Generic; + +public class DegreeInfoDetail +{ + public List user_degree_list; +} diff --git a/SVSim.BattleEngine/Engine/DepthBlurAndBloom.cs b/SVSim.BattleEngine/Engine/DepthBlurAndBloom.cs new file mode 100644 index 0000000..82763c7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DepthBlurAndBloom.cs @@ -0,0 +1,46 @@ +public class DepthBlurAndBloom +{ + public enum DofFocalType + { + Transform, + Position, + Point + } + + public enum DofBlur + { + Horizon, + Mixed, + Disc, + BallBlur + } + + public enum DofQuality + { + OnlyBackground = 1, + BackgroundAndForeground = 5 + } + + public enum DofTransformTarget + { + Character0, + Character1, + Character2, + Character3, + Character4, + Character5, + Character6, + Character7, + Character8, + Character9, + Character10, + Character11, + Character12, + Character13, + Character14, + Character15, + Character16, + Character17, + Character18 + } +} diff --git a/SVSim.BattleEngine/Engine/DetailMgr.cs b/SVSim.BattleEngine/Engine/DetailMgr.cs new file mode 100644 index 0000000..b0b7384 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DetailMgr.cs @@ -0,0 +1,105 @@ +using UnityEngine; + +public class DetailMgr +{ + public GameObject DetailNormal; + + public LODGroup DetailNormalLodGroup; + + public MeshRenderer DetailNormalBaseMesh; + + public UILabel DetailNormalCostLabel; + + public UILabel DetailNormalAtkLabel; + + public UILabel DetailNormalLifeLabel; + + public UILabel DetailNormalNameLabel; + + public GameObject DetailSkill; + + public MeshRenderer DetailSkillBaseMesh; + + public LODGroup DetailSkillLodGroup; + + public UILabel DetailSkillCostLabel; + + public UILabel DetailSkillNameLabel; + + public GameObject DetailField; + + public MeshRenderer DetailFieldBaseMesh; + + public LODGroup DetailFieldLodGroup; + + public UILabel DetailFieldCostLabel; + + public UILabel DetailFieldNameLabel; + + public GameObject DetailPanel; + + public IDetailPanelControl DetailPanelControl; + + public GameObject SubDetailPanel; + + public DetailPanelControl SubDetailPanelControl; + + public DetailMgr() + { + DetailNormal = null; + DetailNormalLodGroup = null; + DetailNormalBaseMesh = null; + DetailNormalCostLabel = null; + DetailNormalAtkLabel = null; + DetailNormalLifeLabel = null; + DetailNormalNameLabel = null; + DetailSkill = null; + DetailSkillBaseMesh = null; + DetailSkillLodGroup = null; + DetailSkillCostLabel = null; + DetailSkillNameLabel = null; + DetailField = null; + DetailFieldBaseMesh = null; + DetailFieldLodGroup = null; + DetailFieldCostLabel = null; + DetailFieldNameLabel = null; + DetailPanel = null; + DetailPanelControl = null; + } + + public void Dispose() + { + DetailPanel = null; + DetailPanelControl = null; + } + + public static Camera GetCamera() + { + return UIManager.GetInstance().UIRootLoadingCamera; + } + + public void HideDetailPanel(BattleCardBase card) + { + if (card.IsSpell) + { + DetailSkill.SetActive(value: false); + } + else if (card.IsField) + { + DetailField.SetActive(value: false); + } + else + { + DetailNormal.SetActive(value: false); + } + DetailPanelControl.Hide(); + DetailPanelControl.SetScreenPosition(right: false); + card = null; + } + + public void HideSubDetailPanel(BattleCardBase card) + { + SubDetailPanelControl.Hide(); + SubDetailPanelControl.SetScreenPosition(right: false); + } +} diff --git a/SVSim.BattleEngine/Engine/DetailPanelControl.cs b/SVSim.BattleEngine/Engine/DetailPanelControl.cs new file mode 100644 index 0000000..5363221 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DetailPanelControl.cs @@ -0,0 +1,2261 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Touch; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class DetailPanelControl : CardDetailBase, IDetailPanelControl +{ + public enum ShowRequest + { + NORMAL, + MULLIGAN, + EVOLUTION_SELECT, + BATTLELOG, + DESTROYLOG, + CHOICE, + BUFF_DETAIL, + DECK_SUMMON_CARD_LIST, + FUSION_INFO_CARD_LIST, + CHOICE_BRAVE, + CHOICE_BRAVE_AND_BUFF + } + + private class CoroutineActions + { + public Coroutine _coroutine; + + public List _actions; + + public CoroutineActions(Action a) + { + _coroutine = null; + _actions = new List { a }; + } + } + + public struct ItemCursor + { + private const float ITEM_MARGIN = 3f; + + private float _offset; + + public float Height { get; private set; } + + public ItemCursor(float offset) + { + _offset = offset; + Height = 0f; + } + + public ItemCursor Clone() + { + ItemCursor result = new ItemCursor(0f); + result.Height = Height; + result._offset = _offset; + return result; + } + + public float AddAndGetCenterOffset(float height) + { + float result = _offset - 3f - height / 2f; + float num = 6f + height; + _offset -= num; + Height += num; + return result; + } + + public float AddAndGetTopOffset(float height) + { + float result = _offset - 3f; + float num = 6f + height; + _offset -= num; + Height += num; + return result; + } + } + + [SerializeField] + private BattleButtonControl battleButtonControl; + + [SerializeField] + private UIPanel MainPanel; + + [SerializeField] + private GameObject Window; + + [SerializeField] + private GameObject FollowerPanel; + + [SerializeField] + private UILabel FollowerAtkLabel; + + [SerializeField] + private UILabel FollowerLifeLabel; + + [SerializeField] + private GameObject EvoPanel; + + [SerializeField] + private UILabel EvoTitleLabel; + + [SerializeField] + private UILabel EvoAtkLabel; + + [SerializeField] + private UILabel EvoLifeLabel; + + [SerializeField] + private UISprite Underline; + + [SerializeField] + private UIButton EvolutionButton; + + [SerializeField] + private UILabel EvolutionComment; + + private UILabel _evolutionButtonUiLabel; + + [SerializeField] + private UIButton FusionButton; + + private UILabel _fusionButtonUiLabel; + + [SerializeField] + private UIButton NonFollowerFusionButton; + + private UILabel _nonFollowerFusionButtonUiLabel; + + [SerializeField] + private UISprite NonFollowerFusionUnderline; + + [SerializeField] + private UIWidget _buffRootWidget; + + [SerializeField] + private UISprite _buffPanelSprite; + + [SerializeField] + private UIPanel _buffPanel; + + [SerializeField] + private UIPanel _buffContentsPanel; + + [SerializeField] + private Transform _buffContentsParent; + + [SerializeField] + private UIScrollBar _buffScrollBar; + + [SerializeField] + private UIScrollView _buffScrollView; + + [SerializeField] + private UIDragScrollView _bgDragScrollView; + + [SerializeField] + private UILabel _buffTitleLabel; + + [SerializeField] + private UILabel _myRotationBonusTitleLabel; + + [SerializeField] + private UIPanel _myRotationBonusContentsPanel; + + [SerializeField] + private Transform _myRotationBonusContentsParent; + + [SerializeField] + private UISprite _myRotationBonusBorderLine; + + [SerializeField] + private UIPanel _avatarBattleBonusContentsPanel; + + [SerializeField] + private Transform _avatarBattleBonusContentsParent; + + [SerializeField] + private UIScrollBar _avatarBattleBonusScrollBar; + + [SerializeField] + private UIScrollView _avatarBattleBonusScrollView; + + [SerializeField] + private Transform _avatarBattleBonusBPIconParent; + + [SerializeField] + private UISprite _avatarBattleBonusBPSprite; + + [SerializeField] + private UILabel _avatarBattleBonusBPLabel; + + [SerializeField] + private UILabel _avatarBattleBonusBPDescriptionLabel; + + [SerializeField] + private UILabel _bossRushSpecialSkillTitleLabel; + + [SerializeField] + private UIPanel _bossRushSpecialSkillContentsPanel; + + [SerializeField] + private Transform _bossRushSpecialSkillContentsParent; + + [SerializeField] + public GameObject EvoTargetPanel; + + private GameObject _normalLightFrame; + + private GameObject _evoLightFrame; + + private Vector3 DefaultPanelPos; + + private Vector3 DefaultNorPanelPos; + + private Vector3 DefaultEvoPanelPos; + + [SerializeField] + private BoxCollider _buffPanelCollider; + + private BattleManagerBase _battleMgr; + + private OperateMgr _operateMgr; + + private SystemText _text; + + private BuffInfo _buff; + + private string _divergenceId = string.Empty; + + private int _logTextureId; + + private bool _isToGreyTextEnabled; + + private readonly string[] GREY_TEXT_PATTERNS = new string[2] { "\\[u\\]\\[524522\\]", "\\[555555\\]-?\\[b\\]" }; + + private const float LabelColliderSizeZ = 500f; + + private readonly float NONFOLOWER_SCROLLVIEW_POS_Y = -143.7f; + + private readonly float NONFOLOWER_DETAILLABEL_POS_Y = 37.7f; + + private const int CLASS_BUFF_CORRECTION_COEFFICIENT = 47; + + private const int CLASS_BUFF_ADVANCED_INFO_COEFFICIENT = 44; + + private const int MY_ROTATION_INFO_COEFFICIENT = 54; + + private const int CACHE_BUFF_LOG_MAX = 50; + + private const float BETWEEN_BUFF_AND_BUFF = 6f; + + private const float BETWEEN_BUFF_AND_BG_BOTTOM = 8f; + + private readonly Vector3 BATTLELOG_DETAIL = new Vector3(675f, -150f, 0f); + + private readonly Vector3 MULLIGAN_DETAIL = new Vector3(0f, 0f, -350f); + + private readonly Vector3 BUFF_LOG_DETAIL_LEFT = new Vector3(-434f, -106f, 0f); + + private readonly Vector3 BUFF_LOG_DETAIL_RIGHT = new Vector3(434f, -106f, 0f); + + private readonly Vector3 BATTLELOG_BUFF_SAME_BOTTOM_OFFSET = new Vector3(0f, 147f, 0f); + + private const float RIGHT_REL_OFFSET = -0.44f; + + private const float RIGHT_REL_OFFSET_MIN = -0.222f; + + private const float TOP_PIXEL_OFFSET = 34f; + + private const float TOP_PIXEL_OFFSET_MIN = -30f; + + private const float MIN_SCALE = 0.4f; + + private const float HIDE_DISTANCE = 10000f; + + private const float MAX_HEIGHT = 598f; + + private List _cacheLogList = new List(); + + private List _cacheMyRotationLogList = new List(); + + private List _cachePlayerBossRushSkillList = new List(); + + private List _cacheEnemyBossRushSkillList = new List(); + + private List _cacheAvatarBattleTitleList = new List(); + + private List _cacheAvatarBattlePassiveBonusList = new List(); + + private List _cacheAvatarBattleBonusList = new List(); + + private List _drawLogList = new List(); + + private GameObject _copiedLabel; + + private GameObject _saveBurialRiteLabel; + + private GameObject _getonCardLabel; + + private BuffDetailInfoUI _buffDetailInfoUI; + + private Vector3 _currentBuffWindowOffset = Vector3.zero; + + private const int CARD_ID_CLASS = 0; + + private static Dictionary loadHeaderCoroutine = new Dictionary(); + + private bool _hasKeyword; + + public const string PREFAB_PATH = "Prefab/UI/DetailPanel"; + + private DetailPanelControl _nextPanel; + + private DetailPanelControl _parentPanel; + + private const float LONG_PRESS_TIME = 0.2f; + + private float? _predictionWaitTime; + + private const string HBP_ICON_SPRITE_NAME = "icon_hbp"; + + private const string PP_ICON_SPRITE_NAME = "icon_pp"; + + public bool forceEvolutionConfirm { get; set; } + + public GameObject EvoTargetPanelColliderGameObject => EvoTargetPanel.GetComponent().gameObject; + + public bool IsShow { get; private set; } + + public UIButton EvolveButton => EvolutionButton; + + public EvolutionConfirmation _evolutionConfirmation { get; private set; } + + public bool IsUpdateCardDescription { get; private set; } + + public BattleCardBase _card { get; private set; } + + public ShowRequest CurrentShowRequest { get; private set; } + + private bool IsEvolveToOtherCardLog => _logTextureId / 1000000 == 910; + + public event Action OnHideOneTime; + + public static bool IsDestroyOrDeckCardList(ShowRequest showRequest) + { + if (ShowRequest.DESTROYLOG != showRequest) + { + return ShowRequest.DECK_SUMMON_CARD_LIST == showRequest; + } + return true; + } + + public static bool IsChoiceBraveRequest(ShowRequest showRequest) + { + if (showRequest != ShowRequest.CHOICE_BRAVE) + { + return showRequest == ShowRequest.CHOICE_BRAVE_AND_BUFF; + } + return true; + } + + public void ResetUpdateCardDescriptionFlag() + { + IsUpdateCardDescription = false; + } + + public void SetBuff(BuffInfo buff) + { + _buff = buff; + } + + private void Start() + { + _evolutionConfirmation = new EvolutionConfirmation(base.transform); + _evolutionButtonUiLabel = EvolutionButton.transform.Find("Label").GetComponent(); + _evolutionButtonUiLabel.text = Data.SystemText.Get("Battle_0117"); + EvolutionButton.defaultColor = new Color(1f, 1f, 1f); + EvolutionButton.onClick.Clear(); + EvolutionButton.onClick.Add(new EventDelegate(delegate + { + if (!GameMgr.GetIns().IsWatchBattle && _battleMgr != null && _operateMgr != null && _card != null) + { + BattleCardBase evoCard = _card; + if (_card.IsInplay) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.CONFIRM_EVOLVE) || forceEvolutionConfirm) + { + _battleMgr.BattlePlayer.PlayerBattleView.CallOnOpenEvolveDialoguePanel(); + _evolutionConfirmation.Show(_battleMgr.BattlePlayer).onPushButton1 = delegate + { + OnTouchEvolutionButton(evoCard); + }; + } + else + { + OnTouchEvolutionButton(evoCard); + } + } + } + })); + EventDelegate item = new EventDelegate(delegate + { + if (!GameMgr.GetIns().IsWatchBattle && _battleMgr != null && _operateMgr != null && _card != null && _card.IsInHand && _card.SelfBattlePlayer.IsSelfTurn) + { + OnTouchFusionButton(_card); + } + }); + FusionButton.defaultColor = new Color(1f, 1f, 1f); + FusionButton.onClick.Clear(); + FusionButton.onClick.Add(item); + _fusionButtonUiLabel = FusionButton.transform.Find("Label").GetComponent(); + _fusionButtonUiLabel.text = Data.SystemText.Get("Battle_0506"); + NonFollowerFusionButton.defaultColor = new Color(1f, 1f, 1f); + NonFollowerFusionButton.onClick.Clear(); + NonFollowerFusionButton.onClick.Add(item); + _nonFollowerFusionButtonUiLabel = NonFollowerFusionButton.transform.Find("Label").GetComponent(); + _nonFollowerFusionButtonUiLabel.text = Data.SystemText.Get("Battle_0506"); + _predictionWaitTime = null; + UIEventListener.Get(EvolutionButton.gameObject).onPress = delegate(GameObject obj, bool isPress) + { + if (isPress) + { + _predictionWaitTime = Time.realtimeSinceStartup; + } + else + { + _predictionWaitTime = null; + _battleMgr.Prediction.Clear(); + } + }; + UIEventListener.Get(EvolutionButton.gameObject).onDragOut = delegate + { + _predictionWaitTime = null; + _battleMgr.Prediction.Clear(); + }; + _normalLightFrame = FollowerPanel.transform.Find("LightFrame").gameObject; + _evoLightFrame = EvoPanel.transform.Find("LightFrame").gameObject; + DefaultPanelPos = MainPanel.transform.localPosition; + MainPanel.transform.localPosition = DefaultPanelPos + Vector3.left * 10000f; + MainPanel.alpha = 0f; + IsShow = false; + ResetUpdateCardDescriptionFlag(); + DefaultNorPanelPos = FollowerPanel.transform.localPosition; + DefaultEvoPanelPos = EvoPanel.transform.localPosition; + SystemText systemText = Data.SystemText; + EvoTargetPanel.transform.Find("Label").GetComponent().text = systemText.Get("Battle_0117"); + List list = new List(); + list.Add(base.gameObject); + list.Add(FollowerPanel); + list.Add(EvoPanel); + list.Add(_buffPanelSprite.gameObject); + list.Add(EvoTargetPanel); + UIManager.GetInstance().AttachAtlas(list); + SetSize(OptionSettingWindow.GetBattleDetailPanelSizePercent()); + _followerPanel.Initialize(); + _followerEvoPanel.Initialize(); + _nonFollowerPanel.Initialize(); + } + + private void Update() + { + if (EvolutionButton.state == UIButtonColor.State.Pressed) + { + if (_predictionWaitTime.HasValue && _predictionWaitTime.Value + 0.2f < Time.realtimeSinceStartup) + { + _battleMgr.Prediction.Evolve(_card); + _predictionWaitTime = null; + } + } + else + { + _predictionWaitTime = null; + } + } + + private void OnTouchEvolutionButton(BattleCardBase card) + { + Hide(); + if (!_battleMgr.BattlePlayer.IsSelfTurn) + { + LocalLog.AccumulateLastTraceLog("OnTouchEvolutionButton selfTurn"); + return; + } + BattleLogManager instance = BattleLogManager.GetInstance(); + if (instance._clickSubLogItem != null) + { + instance._clickSubLogItem.OnUnClickLog(); + } + _battleMgr.BattlePlayer.PlayerBattleView._isEvolutionSkillSelect = true; + TouchControl touchControl = _battleMgr.TouchControl; + touchControl.RegisterTouchProcessor(touchControl.CreateEvolutionSimpleProcessor(card)); + _battleMgr.BattleUIContainer.DisableMenu(); + } + + private void OnTouchFusionButton(BattleCardBase card) + { + Hide(); + BattleLogManager instance = BattleLogManager.GetInstance(); + if (instance._clickSubLogItem != null) + { + instance._clickSubLogItem.OnUnClickLog(); + } + if (!_battleMgr.BattlePlayer.IsSelfTurn) + { + LocalLog.AccumulateLastTraceLog("OnTouchFusionButton selfTurn"); + return; + } + _battleMgr.TouchControl.RegisterTouchProcessor(new FusionSimpleProcessor(fusionSkill: card.Skills.FirstOrDefault((SkillBase s) => s is Skill_fusion), fusionMetamorphoseSkill: card.Skills.FirstOrDefault((SkillBase s) => s is Skill_fusion_metamorphose) as Skill_fusion_metamorphose, battleMgr: _battleMgr, card: card)); + _battleMgr.BattleUIContainer.DisableMenu(); + } + + public void Show(BattleManagerBase battleMgrBase, OperateMgr operateMgr, BattleCardBase card, ShowRequest showRequest) + { + BattleCoroutine.GetInstance().StartCoroutine(StartShow(battleMgrBase, operateMgr, card, showRequest)); + } + + public void ShowList(BattleManagerBase battleMgrBase, OperateMgr operateMgr, List cards, ShowRequest showRequest, BuffInfo buff, BattleLogItem.CardTextureOption textureOption = BattleLogItem.CardTextureOption.Null, string divergenceId = "", int logTextureId = 0) + { + BattleCoroutine.GetInstance().StartCoroutine(StartShow(battleMgrBase, operateMgr, cards[0], showRequest, textureOption, buff, divergenceId, logTextureId)); + if ((bool)_nextPanel && cards.Count > 1) + { + _nextPanel.SetParent(this); + List cards2 = new List(cards.GetRange(1, cards.Count - 1)); + _nextPanel.ShowList(battleMgrBase, operateMgr, cards2, showRequest, buff); + } + } + + public void CreateNextPanel() + { + GameMgr ins = GameMgr.GetIns(); + BattleManagerBase ins2 = BattleManagerBase.GetIns(); + GameObject gameObject = ins.GetGameObjMgr().AddUIContainerChildPrefab("Prefab/UI/DetailPanel"); + gameObject.transform.parent = ins2.BtlUIContainer.transform; + _nextPanel = gameObject.GetComponent(); + _nextPanel.SetParent(this); + } + + public void UpdateCardDescription() + { + if (!IsShow || _card == null || (_card.IsInHand && !_card.IsPlayer && !GameMgr.GetIns().IsAdminWatch && (CurrentShowRequest != ShowRequest.FUSION_INFO_CARD_LIST || !_isToGreyTextEnabled))) + { + return; + } + bool isSkipOption = CurrentShowRequest == ShowRequest.BATTLELOG || CurrentShowRequest == ShowRequest.DESTROYLOG || (CurrentShowRequest == ShowRequest.FUSION_INFO_CARD_LIST && !_isToGreyTextEnabled); + if (!_card.IsClass) + { + if (_card.IsUnit) + { + bool flag = GameMgr.GetIns().IsNewReplayBattle && _buff != null && _buff.IsCopied; + string skillDisc = (flag ? _card.CopiedSkillDescriptionInReplay(_buff, _buff.CopiedSkillDescriptionValueList) : _card.SkillDescription(null, isSkipOption, _buff, _divergenceId)); + string evoSkillDisc = ((IsEvolveToOtherCardLog || (_card.IsChoiceEvolutionCard && _logTextureId != 0)) ? CardMaster.GetInstanceForBattle().GetCardParameterFromId(_logTextureId).EvoSkillDescription : (flag ? _card.CopiedEvoSkillDescriptionInReplay(_buff, _buff.CopiedEvoSkillDescriptionValueList) : _card.EvoSkillDescription(null, isSkipOption, _buff))); + SetFollowerDetailLabel(skillDisc, evoSkillDisc, Underline.gameObject.activeSelf, resetScrollPosition: false); + } + else + { + SetDescLabelText(_nonFollowerPanel, _card.SkillDescription(null, isSkipOption, _buff, _divergenceId), NonFollowerFusionUnderline.gameObject.activeSelf, resetScrollPosition: false); + } + Window.SetActive(value: false); + Window.SetActive(value: true); + IsUpdateCardDescription = true; + } + } + + private void UpdateAvatarBattleBonusPanel() + { + if (!IsChoiceBraveRequest(CurrentShowRequest) || _card == null) + { + return; + } + _avatarBattleBonusBPLabel.text = _card.SelfBattlePlayer.Bp.ToString(); + BattlePlayerBase.AvatarBattleDescInfo passiveSkillDescInfo = (_card.IsPlayer ? _battleMgr.BattlePlayer.AvatarBattlePassiveSkillDescInfo : _battleMgr.BattleEnemy.AvatarBattlePassiveSkillDescInfo); + AvatarBattlePassiveBonusItem avatarBattlePassiveBonusItem = _cacheAvatarBattlePassiveBonusList.FirstOrDefault((AvatarBattlePassiveBonusItem cache) => cache.SkillDescInfo == passiveSkillDescInfo); + if (avatarBattlePassiveBonusItem != null) + { + avatarBattlePassiveBonusItem.SetText(_card); + } + List choiceBraveDescInfoList = (_card.IsPlayer ? _battleMgr.BattlePlayer.ChoiceBraveSkillDescInfoList : _battleMgr.BattleEnemy.ChoiceBraveSkillDescInfoList); + int i; + for (i = 0; i < choiceBraveDescInfoList.Count; i++) + { + AvatarBattleBonusItem avatarBattleBonusItem = _cacheAvatarBattleBonusList.FirstOrDefault((AvatarBattleBonusItem cache) => cache.SkillDescInfo == choiceBraveDescInfoList[i]); + if (avatarBattleBonusItem != null) + { + bool isNeedSeparator = _battleMgr.BattlePlayer.BattleView.IsShowCantChoiceBraveText || passiveSkillDescInfo.DescText != string.Empty || i != 0; + avatarBattleBonusItem.SetText(_card, isNeedSeparator); + } + } + } + + public void UpdateCardDescriptionOnEvent() + { + UpdateCardDescription(); + BattleManagerBase.GetIns().DetailMgr.SubDetailPanelControl.UpdateCardDescription(); + UpdateAvatarBattleBonusPanel(); + } + + public void UpdateCardDescriptionOnEvolutionEvent() + { + if (_card != null && !_card.IsChoiceEvolutionCard) + { + UpdateCardDescriptionOnEvent(); + } + } + + private IEnumerator StartShow(BattleManagerBase battleMgrBase, OperateMgr operateMgr, BattleCardBase card, ShowRequest showRequest, BattleLogItem.CardTextureOption textureOption = BattleLogItem.CardTextureOption.Null, BuffInfo buff = null, string divergenceId = "", int logTextureId = 0) + { + base.gameObject.SetActive(value: true); + RemoveCardEvent(card); + _card = card; + _battleMgr = battleMgrBase; + _operateMgr = operateMgr; + _text = Data.SystemText; + CurrentShowRequest = showRequest; + _buff = buff; + _divergenceId = divergenceId; + _logTextureId = logTextureId; + _isToGreyTextEnabled = GREY_TEXT_PATTERNS.Any((string pattern) => Regex.IsMatch(_card.BaseParameter.SkillDescription, pattern)); + if (IsEvolveToOtherCardLog || (card.IsChoiceEvolutionCard && logTextureId == 0)) + { + textureOption = BattleLogItem.CardTextureOption.ForceEvolution; + } + else if ((card.IsChoiceEvolutionCard || card.IsChoiceEvolutionCardBeforeUpdateBuildInfo) && logTextureId != 0) + { + textureOption = BattleLogItem.CardTextureOption.ForceNormal; + } + CardParameter baseParameter = ((IsEvolveToOtherCardLog || ((card.IsChoiceEvolutionCard || card.IsChoiceEvolutionCardBeforeUpdateBuildInfo) && logTextureId != 0)) ? CardMaster.GetInstanceForBattle().GetCardParameterFromId(logTextureId) : card.BaseParameter); + DetailPanelInfo currentPanel = _followerPanel; + if (!card.IsUnit) + { + currentPanel = _nonFollowerPanel; + currentPanel._classLabel.gameObject.SetActive(value: true); + currentPanel._myRotationInfo.SetActive(value: false); + } + GameMgr gameMgr = GameMgr.GetIns(); + DataMgr dataMgr = gameMgr.GetDataMgr(); + bool isSkipOption = showRequest == ShowRequest.BATTLELOG || showRequest == ShowRequest.DESTROYLOG || (CurrentShowRequest == ShowRequest.FUSION_INFO_CARD_LIST && !_isToGreyTextEnabled); + string text = string.Format("battle_card_info_{0}", ((dataMgr.m_BattleType != DataMgr.BattleType.Story && !GameMgr.GetIns().IsPuzzleQuest) ? (card.IsClass ? dataMgr.GetCharaPrmByCharaId((card as ClassBattleCardBase).CharaId).class_id : ((int)card.BaseParameter.Clan)) : ((!card.IsPlayer) ? (card.IsClass ? dataMgr.GetEnemyClassId() : ((int)card.BaseParameter.Clan)) : (card.IsClass ? dataMgr.GetCharaPrmByCharaId((card as ClassBattleCardBase).CharaId).class_id : ((int)card.BaseParameter.Clan)))).ToString("00")); + if (currentPanel._classBG.spriteName != text) + { + currentPanel._classBG.spriteName = text; + } + bool loaded = false; + Action cbOnLoaded = delegate + { + loaded = true; + }; + if (card.IsClass) + { + bool isSkinEvolved = battleMgrBase.GetBattlePlayer(card.IsPlayer).IsSkinEvolved; + LoadClassHeaderTexture((card as ClassBattleCardBase).CharaId, currentPanel._logImage, cbOnLoaded, isSkinEvolved); + } + else if (IsDestroyOrDeckCardList(showRequest) || textureOption == BattleLogItem.CardTextureOption.ForceNormal) + { + LoadCardHeaderTexture(baseParameter.NormalCardId, card.IsUnit, currentPanel._logImage, isEvolution: false, isBattleLogHeader: false, cbOnLoaded); + } + else if (textureOption == BattleLogItem.CardTextureOption.ForceEvolution) + { + LoadCardHeaderTexture(baseParameter.NormalCardId, card.IsUnit, currentPanel._logImage, isEvolution: true, isBattleLogHeader: false, cbOnLoaded); + } + else + { + LoadCardHeaderTexture(baseParameter.NormalCardId, card.IsUnit || (card.IsSpecialSkill && card.BaseParameter.CharType == CardBasePrm.CharaType.NORMAL), currentPanel._logImage, card.IsEvolution, isBattleLogHeader: false, cbOnLoaded); + } + while (!loaded) + { + yield return null; + } + ResetDetailPosition(); + if (!card.IsUnit) + { + FollowerPanel.SetActive(value: true); + EvoPanel.SetActive(value: false); + if (card.IsClass) + { + _nonFollowerPanel._costSprite.gameObject.SetActive(value: false); + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel.DiscLabel.gameObject.SetActive(value: false); + } + else if (card.IsSpecialSkill) + { + _nonFollowerPanel._costSprite.gameObject.SetActive(value: false); + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel.DiscLabel.gameObject.SetActive(value: true); + } + else + { + _nonFollowerPanel._costSprite.gameObject.SetActive(value: true); + bool flag = CardMaster.IsChoiceBraveCardCheck(baseParameter.CardId); + _nonFollowerPanel._costSprite.spriteName = (flag ? "icon_hbp" : "icon_pp"); + if (baseParameter.IsVariableCost) + { + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._signLabel.text = "-"; + _nonFollowerPanel._signedCostLabel.text = "X"; + } + else if (flag) + { + if (baseParameter.Cost == 0) + { + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.text = baseParameter.Cost.ToString(); + } + else + { + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._signLabel.text = ((baseParameter.Cost > 0) ? "-" : "+"); + _nonFollowerPanel._signedCostLabel.text = Mathf.Abs(baseParameter.Cost).ToString(); + } + } + else + { + _nonFollowerPanel._costLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._costLabel.text = baseParameter.Cost.ToString(); + } + _nonFollowerPanel.DiscLabel.gameObject.SetActive(value: true); + } + _normalLightFrame.SetActive(value: true); + _nonFollowerPanel._root.SetActive(value: true); + _followerPanel._root.SetActive(value: false); + _followerEvoPanel._root.SetActive(value: false); + } + else + { + FollowerPanel.SetActive(value: true); + _followerPanel._costLabel.text = baseParameter.Cost.ToString(); + FollowerAtkLabel.text = baseParameter.Atk.ToString(); + FollowerLifeLabel.text = baseParameter.Life.ToString(); + EvoPanel.SetActive(value: true); + EvoTitleLabel.text = _text.Get("Card_0038"); + EvoAtkLabel.text = baseParameter.EvoAtk.ToString(); + EvoLifeLabel.text = baseParameter.EvoLife.ToString(); + if (IsDestroyOrDeckCardList(showRequest)) + { + _normalLightFrame.SetActive(value: false); + _evoLightFrame.SetActive(value: false); + } + else + { + bool flag2 = card.IsEvolution; + switch (textureOption) + { + case BattleLogItem.CardTextureOption.ForceNormal: + flag2 = false; + break; + case BattleLogItem.CardTextureOption.ForceEvolution: + flag2 = true; + break; + } + _normalLightFrame.SetActive(!flag2); + _evoLightFrame.SetActive(flag2); + } + if (card.SelfBattlePlayer.IsSelfTurn && card.IsPlayer && card.IsInplay && card.AttackableCount <= 0) + { + _battleMgr.VfxMgr.RegisterImmediateVfx(card.BattleCardView.ShowAttackFinished()); + } + } + _avatarBattleBonusBPIconParent.gameObject.SetActive(IsChoiceBraveRequest(showRequest)); + AddCardEvent(card); + EvolutionConfigSetup(card, _text, showRequest); + if (card.IsUnit) + { + bool flag3 = GameMgr.GetIns().IsNewReplayBattle && buff != null && buff.IsCopied; + string skillDisc = (flag3 ? card.CopiedSkillDescriptionInReplay(buff, buff.CopiedSkillDescriptionValueList) : card.SkillDescription(null, isSkipOption, buff)); + string evoSkillDisc = ((IsEvolveToOtherCardLog || (card.IsChoiceEvolutionCard && logTextureId != 0)) ? baseParameter.EvoSkillDescription : (flag3 ? card.CopiedEvoSkillDescriptionInReplay(buff, buff.CopiedEvoSkillDescriptionValueList) : card.EvoSkillDescription(null, isSkipOption, buff))); + SetFollowerDetailLabel(skillDisc, evoSkillDisc, Underline.gameObject.activeSelf); + _buffRootWidget.topAnchor.target = _followerEvoPanel._bg.transform; + } + else if (card.IsClass) + { + SetDescLabelText(_nonFollowerPanel, card.SkillDescription(null, isSkipOption, divergenceId: _divergenceId, buff: _buff), needEvolutionOrFusionButton: false, resetScrollPosition: true, isClass: true); + _buffRootWidget.topAnchor.target = _nonFollowerPanel._bg.transform; + } + else + { + SetDescLabelText(_nonFollowerPanel, card.SkillDescription(null, isSkipOption, buff, _divergenceId), NonFollowerFusionUnderline.gameObject.activeSelf); + _buffRootWidget.topAnchor.target = _nonFollowerPanel._bg.transform; + } + _buffRootWidget.ResetAnchors(); + _buffRootWidget.UpdateAnchors(); + if (!card.IsUnit) + { + _nonFollowerPanel._scrollView.transform.localPosition = new Vector3(_nonFollowerPanel._scrollView.transform.localPosition.x, NONFOLOWER_SCROLLVIEW_POS_Y, _nonFollowerPanel._scrollView.transform.localPosition.z); + _nonFollowerPanel.DiscLabel.transform.localPosition = new Vector3(_nonFollowerPanel.DiscLabel.transform.localPosition.x, NONFOLOWER_DETAILLABEL_POS_Y, _nonFollowerPanel.DiscLabel.transform.localPosition.z); + } + if (card.IsClass) + { + ClassCharacterMasterData charaPrmByCharaId = dataMgr.GetCharaPrmByCharaId((card as ClassBattleCardBase).CharaId); + currentPanel._nameLabel.text = charaPrmByCharaId.chara_name; + if (charaPrmByCharaId.hide_class_name) + { + currentPanel._classLabel.text = ""; + } + else + { + currentPanel._classLabel.text = dataMgr.GetClanNameByKey((int)charaPrmByCharaId.clan); + if (card.IsPlayer) + { + if (dataMgr.GetPlayerSubClassId() != 10) + { + UILabel classLabel = currentPanel._classLabel; + classLabel.text = classLabel.text + "/" + dataMgr.GetClanNameByKey(dataMgr.GetPlayerSubClassId()); + } + if (dataMgr.TryGetPlayerMyRotationInfo(out var myRotationInfo)) + { + SetMyRotationLabel(currentPanel, dataMgr.GetPlayerCharaData(), myRotationInfo); + } + } + else + { + if (dataMgr.GetEnemySubClassId() != 10) + { + UILabel classLabel2 = currentPanel._classLabel; + classLabel2.text = classLabel2.text + "/" + dataMgr.GetClanNameByKey(dataMgr.GetEnemySubClassId()); + } + if (dataMgr.TryGetEnemyMyRotationInfo(out var myRotationInfo2)) + { + SetMyRotationLabel(currentPanel, dataMgr.GetEnemyCharaData(), myRotationInfo2); + } + } + } + } + else + { + currentPanel._nameLabel.text = (card.IsSpecialSkill ? Data.SystemText.Get("BossRush_0011", baseParameter.CardName) : baseParameter.CardName); + int clan = (int)baseParameter.Clan; + if (card.IsSpecialSkill) + { + currentPanel._classLabel.text = dataMgr.GetClanNameByKey(clan); + } + else + { + string tribeName = baseParameter.TribeName; + if (tribeName != null && tribeName == "ALL") + { + currentPanel._classLabel.text = dataMgr.GetClanNameByKey(clan); + } + else + { + currentPanel._classLabel.text = dataMgr.GetClanNameByKey(clan) + " / " + baseParameter.TribeName; + } + } + } + gameMgr.GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_INFO_SMALL); + List myRotationBonusConditionList = new List(); + List bossRushSpecialSkillList = new List(); + AvatarBattleInfo avatarBattleInfo = null; + if (card.IsClass) + { + myRotationBonusConditionList.AddRange(card.SelfBattlePlayer.BonusConditionList); + bossRushSpecialSkillList = card.SelfBattlePlayer.BossRushSpecialSkillList.Distinct().ToList(); + avatarBattleInfo = ((!card.SelfBattlePlayer.IsPlayer) ? _battleMgr.BattleEnemy.AvatarBattleInfo : _battleMgr.BattlePlayer.AvatarBattleInfo); + } + bool isShowBuffList = ((((!GameMgr.GetIns().IsNewReplayBattle) ? (card.BuffInfoList.Count > 0) : (card.ReplayBuffInfoList.Count > 0 || card.ReplayNoConsumeEpBuffInfoNameList.Count > 0 || card.ReplayBuffInfoLabelList.Count > 0)) || IsNeedNoConsumeEp(card)) && showRequest != ShowRequest.EVOLUTION_SELECT && ((showRequest != ShowRequest.BATTLELOG && showRequest != ShowRequest.FUSION_INFO_CARD_LIST) || card.IsClass) && !IsDestroyOrDeckCardList(showRequest) && showRequest != ShowRequest.BUFF_DETAIL) || myRotationBonusConditionList.Count > 0 || bossRushSpecialSkillList.Count > 0 || avatarBattleInfo != null; + bool isShowAnimation = !IsShow; + if (!IsShow) + { + IsShow = true; + iTween.Stop(MainPanel.gameObject); + yield return null; + if (IsShow) + { + MainPanel.alpha = 0f; + TweenAlpha.Begin(MainPanel.gameObject, 0.1f, 1f); + if (!isShowBuffList) + { + _buffRootWidget.gameObject.SetActive(value: false); + } + else + { + _buffRootWidget.gameObject.SetActive(value: true); + AddBuffInfo(card, showRequest, myRotationBonusConditionList, bossRushSpecialSkillList, avatarBattleInfo); + } + } + } + else if (!isShowBuffList) + { + _buffRootWidget.gameObject.SetActive(value: false); + } + SetupPanelTouchEvent(showRequest, baseParameter); + Window.SetActive(value: false); + Window.SetActive(value: true); + _buffScrollView.RestrictWithinBounds(instant: true); + _buffScrollView.ResetPosition(); + MainPanel.transform.localPosition = GetShowPos(showRequest); + if (card.IsClass && (showRequest == ShowRequest.BATTLELOG || showRequest == ShowRequest.FUSION_INFO_CARD_LIST)) + { + MainPanel.transform.position = new Vector3(MainPanel.transform.position.x, BattleLogManager.GetInstance()._logWindow.transform.position.y, MainPanel.transform.position.z); + MainPanel.transform.localPosition += BATTLELOG_BUFF_SAME_BOTTOM_OFFSET; + } + if (isShowAnimation) + { + iTween.MoveFrom(MainPanel.gameObject, iTween.Hash("x", MainPanel.transform.localPosition.x, "y", MainPanel.transform.localPosition.y - 5f, "z", MainPanel.transform.localPosition.z, "islocal", true, "time", 0.1f, "easetype", iTween.EaseType.easeOutCubic)); + } + UpdateParentAnchor(); + BattleLogManager.GetInstance()._logWindow.HideCardListPanel(); + } + + private void SetMyRotationLabel(DetailPanelInfo currentPanel, ClassCharacterMasterData classCharaData, MyRotationInfo myRotationInfo) + { + currentPanel._myRotationClassLabel.text = DeckData.CreateMyRotationClassName(classCharaData.class_id, myRotationInfo); + currentPanel._classLabel.gameObject.SetActive(value: false); + currentPanel._myRotationInfo.SetActive(value: true); + currentPanel._myRotationBonusIconOriginal.SetActive(value: false); + currentPanel._myRotationBonusIconGrid.transform.DestroyChildren(); + foreach (MyRotationInfo.MyRotationBonus ability in myRotationInfo.Abilities) + { + GameObject obj = NGUITools.AddChild(currentPanel._myRotationBonusIconGrid.gameObject, currentPanel._myRotationBonusIconOriginal); + obj.GetComponent().spriteName = ability.IconName; + obj.SetActive(value: true); + } + currentPanel._myRotationBonusIconGrid.Reposition(); + currentPanel._myRotationInfoGrid.Reposition(); + StartCoroutine(currentPanel._myRotationInfoGrid.RepositionNextFrame()); + } + + private Vector3 GetShowPos(ShowRequest showRequest) + { + return DefaultPanelPos + GetBuffWindowOffset(showRequest); + } + + private Vector3 GetBuffWindowOffset(ShowRequest showRequest) + { + switch (showRequest) + { + case ShowRequest.MULLIGAN: + _currentBuffWindowOffset = MULLIGAN_DETAIL; + break; + case ShowRequest.BATTLELOG: + case ShowRequest.DESTROYLOG: + case ShowRequest.DECK_SUMMON_CARD_LIST: + case ShowRequest.FUSION_INFO_CARD_LIST: + _currentBuffWindowOffset = BATTLELOG_DETAIL; + break; + case ShowRequest.BUFF_DETAIL: + if (BattleManagerBase.GetIns().DetailMgr.DetailPanelControl.IsDisplayedRight()) + { + SetScreenPosition(right: true); + _currentBuffWindowOffset = BUFF_LOG_DETAIL_LEFT; + } + else + { + _currentBuffWindowOffset = BUFF_LOG_DETAIL_RIGHT; + } + break; + default: + _currentBuffWindowOffset = Vector3.zero; + break; + } + return _currentBuffWindowOffset; + } + + public bool IsDisplayedRight() + { + UIAnchor component = base.transform.Find("AnchorL").GetComponent(); + if (component != null) + { + return component.side == UIAnchor.Side.TopRight; + } + return false; + } + + private void SetupPanelTouchEvent(ShowRequest showRequest, CardParameter baseParameter) + { + SetDetailKeywordEvents(null, _card, baseParameter, this); + UIEventListener.Get(_buffPanelCollider.gameObject).onClick = null; + if (ShowRequest.EVOLUTION_SELECT != showRequest && _hasKeyword) + { + SetDetailKeywordEvents(battleButtonControl.OnPressKeyBtn, _card, baseParameter, this); + } + } + + public VfxBase ShowEvolutionButton(BattleCardBase card) + { + return InstantVfx.Create(delegate + { + EvoTargetPanel.transform.parent = card.BattleCardView.Transform; + EvoTargetPanel.transform.localPosition = new Vector3(0f, 18.5f, -1f); + EvoTargetPanel.SetActive(value: true); + GameMgr.GetIns().GetEffectMgr().StartBuff(EffectMgr.EffectType.CMN_FRAME_BTN_2, EvoTargetPanel); + EvoTargetPanel.transform.localScale = new Vector3(1.6f, 1.6f, 1.6f); + EvoTargetPanel.transform.localEulerAngles = new Vector3(0f, 0f, 0f); + }); + } + + private void EvolutionConfigSetup(BattleCardBase targetCard, SystemText text, ShowRequest showRequest) + { + UIButton uIButton = (targetCard.IsUnit ? FusionButton : NonFollowerFusionButton); + UILabel uILabel = (targetCard.IsUnit ? _fusionButtonUiLabel : _nonFollowerFusionButtonUiLabel); + UISprite uISprite = (targetCard.IsUnit ? Underline : NonFollowerFusionUnderline); + if (GameMgr.GetIns().IsWatchBattle) + { + uISprite.gameObject.SetActive(value: false); + uIButton.gameObject.SetActive(value: false); + uILabel.gameObject.SetActive(value: false); + EvolutionButton.gameObject.SetActive(value: false); + EvolutionComment.gameObject.SetActive(value: false); + return; + } + if (showRequest == ShowRequest.NORMAL && targetCard.IsInHand && targetCard.SelfBattlePlayer.IsSelfTurn && targetCard.HasFusionSkill) + { + uISprite.gameObject.SetActive(value: true); + uIButton.isEnabled = targetCard.IsFusionable; + uIButton.UpdateColor(instant: true); + uIButton.gameObject.SetActive(value: true); + EvolutionButton.gameObject.SetActive(value: false); + EvolutionComment.gameObject.SetActive(value: false); + return; + } + if (showRequest == ShowRequest.EVOLUTION_SELECT || showRequest == ShowRequest.BATTLELOG || IsDestroyOrDeckCardList(showRequest) || showRequest == ShowRequest.BUFF_DETAIL || showRequest == ShowRequest.FUSION_INFO_CARD_LIST || targetCard.IsEvolution || !targetCard.IsUnit || !targetCard.IsInplay || !targetCard.SelfBattlePlayer.IsSelfTurn || !targetCard.IsPlayer) + { + uISprite.gameObject.SetActive(value: false); + EvolutionButton.gameObject.SetActive(value: false); + EvolutionComment.gameObject.SetActive(value: false); + uIButton.gameObject.SetActive(value: false); + return; + } + EvolutionButton.UpdateColor(instant: true); + uIButton.gameObject.SetActive(value: false); + if (!targetCard.SelfBattlePlayer.NowTurnEvol) + { + uISprite.gameObject.SetActive(value: true); + EvolutionButton.isEnabled = false; + EvolutionButton.gameObject.SetActive(value: true); + EvolutionComment.gameObject.SetActive(value: false); + } + else if (targetCard.SelfBattlePlayer.EvolveWaitTurnCount > 0) + { + uISprite.gameObject.SetActive(value: true); + EvolutionComment.text = text.Get("Battle_0114", targetCard.SelfBattlePlayer.EvolveWaitTurnCount.ToString()); + EvolutionComment.gameObject.SetActive(value: true); + EvolutionButton.gameObject.SetActive(value: false); + } + else if (targetCard.CanEvolution(isSkill: false, isSelfBattlePlayer: true) && targetCard.IsInplay && !_battleMgr.IsStopOperate) + { + uISprite.gameObject.SetActive(value: true); + EvolutionButton.isEnabled = targetCard.AreCanEvolveConditionsFulfilled; + EvolutionButton.gameObject.SetActive(value: true); + EvolutionComment.gameObject.SetActive(value: false); + } + else + { + uISprite.gameObject.SetActive(value: true); + EvolutionButton.isEnabled = false; + EvolutionButton.gameObject.SetActive(value: true); + EvolutionComment.gameObject.SetActive(value: false); + } + } + + public void Hide() + { + StartHide(); + } + + private void StartHide() + { + SetSize(OptionSettingWindow.GetBattleDetailPanelSizePercent()); + if (_battleMgr != null) + { + _battleMgr.BattlePlayer.IsShowBuffDetail = false; + _battleMgr.BattleEnemy.IsShowBuffDetail = false; + if (_card != null) + { + _card.IsShowBuffDetail = false; + } + } + IsShow = false; + _isToGreyTextEnabled = false; + ResetUpdateCardDescriptionFlag(); + this.OnHideOneTime.Call(); + this.OnHideOneTime = null; + RemoveCardEvent(_card); + EvoTargetPanel.SetActive(value: false); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_FRAME_BTN_2); + MainPanel.alpha = 0f; + MainPanel.transform.localPosition = DefaultPanelPos + Vector3.left * 10000f; + iTween.Stop(MainPanel.gameObject); + _buffScrollView.currentMomentum = Vector3.zero; + _card = null; + base.gameObject.SetActive(value: false); + _nonFollowerPanel._scrollView.currentMomentum = new Vector3(0f, 0f, 0f); + _nonFollowerPanel._scrollView.DisableSpring(); + _followerEvoPanel._root.SetActive(value: false); + _nonFollowerPanel._root.SetActive(value: false); + _followerEvoPanel._root.SetActive(value: false); + if ((bool)_nextPanel) + { + _nextPanel.StartHide(); + } + BattleManagerBase.GetIns().DetailMgr.SubDetailPanel.gameObject.SetActive(value: false); + battleButtonControl.HideKeyWordDialog(isNotCloseEvent: false); + } + + private void ResetDetailPosition() + { + FollowerPanel.transform.localPosition = DefaultNorPanelPos; + EvoPanel.transform.localPosition = DefaultEvoPanelPos; + } + + private void AddBuffInfo(BattleCardBase targetCard, ShowRequest request, List myRotationBonusList, List bossRushSpecialSkillList, AvatarBattleInfo avatarBattleInfo) + { + if (_card != null) + { + SetupAllBuffPanel(targetCard, GetBuffWindowOffset(request).y, myRotationBonusList, bossRushSpecialSkillList, avatarBattleInfo, isUpdate: false, IsChoiceBraveRequest(request)); + } + } + + public void UpdateBuffInfo(BattleCardBase targetCard, List myRotationBonusList) + { + if (!IsShow) + { + return; + } + List bossRushSkillList = new List(); + AvatarBattleInfo avatarBattleInfo = null; + if (targetCard.IsClass) + { + bossRushSkillList = targetCard.SelfBattlePlayer.BossRushSpecialSkillList.Distinct().ToList(); + avatarBattleInfo = ((!targetCard.SelfBattlePlayer.IsPlayer) ? _battleMgr.BattleEnemy.AvatarBattleInfo : _battleMgr.BattlePlayer.AvatarBattleInfo); + } + if ((GameMgr.GetIns().IsNewReplayBattle ? (targetCard.ReplayBuffInfoList.Count == 0) : (targetCard.BuffInfoList.Count == 0)) && myRotationBonusList.Count == 0 && avatarBattleInfo == null) + { + _buffRootWidget.gameObject.SetActive(value: false); + return; + } + if (!_buffRootWidget.gameObject.activeSelf) + { + _buffRootWidget.gameObject.SetActive(value: true); + } + SetupAllBuffPanel(targetCard, _currentBuffWindowOffset.y, myRotationBonusList, bossRushSkillList, avatarBattleInfo, isUpdate: true, avatarBattleInfo != null); + } + + public void UpdateLogItemBuffInfo(BattleCardBase targetCard) + { + List list = targetCard.ReplayBuffInfoList.Where((BuffInfo b) => b.IsCopied).ToList(); + for (int num = 0; num < list.Count; num++) + { + BuffInfo buffInfo = list[num]; + BattleLogItem logFromCacheLogList = GetLogFromCacheLogList(buffInfo, (!buffInfo.IsCopiedEvolutionSkill) ? BattleLogItem.CardTextureOption.ForceNormal : BattleLogItem.CardTextureOption.ForceEvolution, buffInfo.DivergenceId, checkActive: false); + if (logFromCacheLogList != null) + { + logFromCacheLogList.SetBuff(buffInfo); + } + } + } + + private void MakeCardLogItem(BuffInfo buff, Transform contentsParent, ref ItemCursor itemCursor) + { + if (buff.IsHiddenClassLogSkill) + { + return; + } + BattleCardBase battleCardBase = buff.OwnerCard; + bool flag = (buff.IsCopied && buff.IsCopiedEvolutionSkill) || (!buff.IsCopied && buff.IsEvolutionSkill); + if (battleCardBase.IsClass) + { + flag = battleCardBase.SelfBattlePlayer.IsSkinEvolved; + } + BattleLogItem.CardTextureOption textureOption = ((!flag) ? BattleLogItem.CardTextureOption.ForceNormal : BattleLogItem.CardTextureOption.ForceEvolution); + string divergenceId = string.Empty; + if (buff.SkillFrom != null || GameMgr.GetIns().IsNewReplayBattle) + { + divergenceId = buff.DivergenceId; + } + BattleLogItem battleLogItem = GetLogFromCacheLogList(buff, textureOption, divergenceId); + if (battleLogItem == null) + { + if (_cacheLogList.Count > 50) + { + for (int num = _cacheLogList.Count - 1; num >= 0; num--) + { + BattleLogItem battleLogItem2 = _cacheLogList[num]; + if (!battleLogItem2.gameObject.activeSelf) + { + UnityEngine.Object.Destroy(battleLogItem2.gameObject); + _cacheLogList.RemoveAt(num); + } + } + } + bool? isPlayer = null; + if (buff.IsCopied && buff.SkillFrom != null) + { + isPlayer = buff.IsPlayer; + } + if (buff.PreviousOwner != null) + { + battleCardBase = buff.PreviousOwner; + } + if (buff.IsSaveBurialRiteSkill || buff.IsGetonSkill || buff.IsReserveTokenDrawSkill) + { + battleCardBase = ((!GameMgr.GetIns().IsNewReplayBattle) ? battleCardBase.SelfBattlePlayer.BattleMgr.CreateTransformCardRegisterVfx(battleCardBase, buff.BaseCardIDFrom, _card.IsPlayer) : buff.TargetCard); + } + battleLogItem = BattleLogManager.CreateBuffLogItem(battleCardBase, battleCardBase, buff, isPlayer, buff.IsReserveTokenDrawSkill, textureOption, buff.CardIDFrom); + if (buff.IsReserveTokenDrawSkill) + { + battleLogItem.UpdateLogType(Wizard.Battle.UI.LogType.ReserveToken); + } + battleLogItem.SetLogSkill(buff.SkillFrom); + _cacheLogList.Add(battleLogItem); + } + else if (GameMgr.GetIns().IsNewReplayBattle && buff.IsCopied) + { + battleLogItem.SetBuff(buff); + } + battleLogItem.transform.SetParent(contentsParent); + battleLogItem.transform.localScale = Vector3.one; + battleLogItem.SetDivergenceId(divergenceId); + float y = itemCursor.AddAndGetCenterOffset(47f); + battleLogItem.transform.localPosition = new Vector3(buff.IsReserveTokenDrawSkill ? battleLogItem.GetPosX() : 0f, y, 0f); + battleLogItem.gameObject.SetActive(value: true); + _drawLogList.Add(battleLogItem.gameObject); + battleLogItem.SetSelectSpriteActive(setActive: false); + } + + private BattleLogItem GetLogFromCacheLogList(BuffInfo buff, BattleLogItem.CardTextureOption textureOption, string divergenceId, bool checkActive = true) + { + return _cacheLogList.FirstOrDefault(delegate(BattleLogItem cache) + { + if (cache.gameObject.activeSelf && checkActive) + { + return false; + } + bool flag = cache.IsCopiedBuff(); + if (buff.IsCopied != flag) + { + return false; + } + BattleCardBase card = cache.GetCard(); + if (buff.IsCopied && buff.PreviousOwner != null && buff.PreviousOwner == card && _card.IsPlayer != cache.IsPlayer && cache.GetTextureOption() == textureOption && buff.OwnerCard == cache.Buff.OwnerCard) + { + return true; + } + bool flag2 = (buff.IsGetonSkill || buff.IsSaveBurialRiteSkill || buff.IsReserveTokenDrawSkill) && cache.GetLogSkill() == buff.SkillFrom && card.BaseParameter.CardId == buff.BaseCardIDFrom && cache.GetTextureOption() == textureOption; + if (GameMgr.GetIns().IsNewReplayBattle) + { + if (buff.IsReserveTokenDrawSkill) + { + flag2 &= buff.TargetCard != null && buff.TargetCard == card; + } + else if (buff.IsGetonSkill || buff.IsSaveBurialRiteSkill) + { + flag2 &= buff.IsPlayer == cache.IsPlayer; + } + } + if (flag2) + { + return true; + } + if (buff.IsReserveTokenDrawSkill) + { + return false; + } + return !buff.IsCopied && card == buff.OwnerCard && card.IsPlayer == cache.IsPlayer && cache.GetTextureOption() == textureOption && cache.DivergenceId == divergenceId && cache.GetBuffMomentCardId() == buff.CardIDFrom; + }); + } + + private void MakeCardLogItemNoConsumeEp(BattleCardBase card, Transform contentsParent, ref ItemCursor itemCursor) + { + BattleLogItem.CardTextureOption textureOption = ((!card.IsEvolution) ? BattleLogItem.CardTextureOption.ForceNormal : BattleLogItem.CardTextureOption.ForceEvolution); + BattleLogItem battleLogItem = BattleLogManager.CreateBuffLogItem(card, card, null, card.IsPlayer, useSmall: false, textureOption); + battleLogItem.UpdateLogType(Wizard.Battle.UI.LogType.NotConsumeEp); + battleLogItem.transform.SetParent(contentsParent); + battleLogItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(47f); + battleLogItem.transform.localPosition = new Vector3(0f, y, 0f); + battleLogItem.gameObject.SetActive(value: true); + _drawLogList.Add(battleLogItem.gameObject); + battleLogItem.SetSelectSpriteActive(setActive: false); + } + + private void MakeMyRotationBonusItem(BattleCardBase classCard, BattlePlayerBase.MyRotationBonusCondition myRotationBonusCondition, bool needSeparator, ref ItemCursor itemCursor) + { + MyRotationBonusItem myRotationBonusItem = _cacheMyRotationLogList.FirstOrDefault(delegate(MyRotationBonusItem cache) + { + if (cache.gameObject.activeSelf) + { + return false; + } + return myRotationBonusCondition.MyRotationBonus.AbilityId == cache.MyRotationBonusCondition.MyRotationBonus.AbilityId && classCard.IsPlayer == cache.IsPlayer; + }); + if (myRotationBonusItem == null) + { + if (_cacheLogList.Count > 50) + { + for (int num = _cacheLogList.Count - 1; num >= 0; num--) + { + BattleLogItem battleLogItem = _cacheLogList[num]; + if (!battleLogItem.gameObject.activeSelf) + { + UnityEngine.Object.Destroy(battleLogItem.gameObject); + _cacheLogList.RemoveAt(num); + } + } + } + myRotationBonusItem = BattleLogManager.CreateMyRotationBonusItem(myRotationBonusCondition, classCard.IsPlayer, needSeparator); + _cacheMyRotationLogList.Add(myRotationBonusItem); + } + else + { + myRotationBonusItem.setIconActive(); + } + myRotationBonusItem.transform.SetParent(_myRotationBonusContentsParent); + myRotationBonusItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(54f); + myRotationBonusItem.transform.localPosition = new Vector3(0f, y, 0f); + myRotationBonusItem.gameObject.SetActive(value: true); + _drawLogList.Add(myRotationBonusItem.gameObject); + } + + private bool IsSameBuffLog(BuffInfo buffA, BuffInfo buffB) + { + if (buffA.IsCopied != buffB.IsCopied) + { + return false; + } + if (buffA.IsCopied) + { + return buffA.PreviousOwner == buffB.PreviousOwner; + } + BattleCardBase ownerCard = buffA.SkillFrom.SkillPrm.ownerCard; + BattleCardBase ownerCard2 = buffB.SkillFrom.SkillPrm.ownerCard; + if (!ownerCard.EquelsID(ownerCard2)) + { + return false; + } + if (ownerCard.CardId != buffA.CardIDFrom && buffA.CardIDFrom != buffB.CardIDFrom) + { + return false; + } + if (ownerCard.IsChoiceBraveSkillCard || ownerCard2.IsChoiceBraveSkillCard) + { + return ownerCard == ownerCard2; + } + if (buffA.PreviousOwner != null && buffB.PreviousOwner != null) + { + return buffA.PreviousOwner.CardId == buffB.PreviousOwner.CardId; + } + return buffA.PreviousOwner == buffB.PreviousOwner; + } + + private float SetupBuffContent(BattleCardBase targetCard, Transform contentsParent, ref ItemCursor itemCursor) + { + List buffInfoList = targetCard.BuffInfoList; + List source = ((!GameMgr.GetIns().IsNewReplayBattle) ? GetDistinctBuffList(buffInfoList) : targetCard.ReplayBuffInfoList); + if (GameMgr.GetIns().IsNewReplayBattle) + { + for (int i = 0; i < targetCard.ReplayNoConsumeEpBuffInfoNameList.Count; i++) + { + MakeCardLogItemNoConsumeEp(targetCard.ReplayNoConsumeEpBuffInfoNameList[i], contentsParent, ref itemCursor); + } + } + else if (IsNeedNoConsumeEp(targetCard)) + { + IEnumerable source2 = targetCard.SelfBattlePlayer.InPlayCards.Where((BattleCardBase c) => c.SkillApplyInformation.NotConsumeEpModifierInfoList.Any((NotConsumeEpModifierInfo b) => b.TargetCard == null && b.CheckNotConsumedCard(targetCard))); + for (int num = 0; num < source2.Count(); num++) + { + MakeCardLogItemNoConsumeEp(source2.ElementAt(num), contentsParent, ref itemCursor); + } + } + List list = source.Where((BuffInfo b) => !b.IsCopied && !b.IsSaveBurialRiteSkill && !b.IsGetonSkill && b.SpecialSkillInfo == null).ToList(); + for (int num2 = 0; num2 < list.Count; num2++) + { + MakeCardLogItem(list[num2], contentsParent, ref itemCursor); + } + List list2 = source.Where((BuffInfo b) => b.IsCopied).ToList(); + if (list2.Count > 0) + { + MakeHeadlineLabel(ref _copiedLabel, Data.SystemText.Get("BattleLog_0266"), contentsParent, ref itemCursor); + MakeLogItems(list2, contentsParent, ref itemCursor); + } + List list3 = source.Where((BuffInfo b) => b.IsSaveBurialRiteSkill).ToList(); + if (list3.Count > 0) + { + MakeHeadlineLabel(ref _saveBurialRiteLabel, Data.SystemText.Get("BattleLog_0269"), contentsParent, ref itemCursor); + MakeLogItems(list3, contentsParent, ref itemCursor); + } + List list4 = source.Where((BuffInfo b) => b.IsGetonSkill).ToList(); + if (list4.Count > 0) + { + MakeHeadlineLabel(ref _getonCardLabel, Data.SystemText.Get("BattleLog_0272"), contentsParent, ref itemCursor); + MakeLogItems(list4, contentsParent, ref itemCursor); + } + if ((!GameMgr.GetIns().IsNewReplayBattle) ? BuffDetailInfoUI.NeedBuffDetailText(targetCard) : (targetCard.ReplayBuffInfoLabelList.Count > 0)) + { + if (_buffDetailInfoUI == null) + { + _buffDetailInfoUI = (UnityEngine.Object.Instantiate(Resources.Load("Prefab/UI/Log/SkillDetailLabel")) as GameObject).GetComponent(); + _buffDetailInfoUI.Initialize(); + } + _buffDetailInfoUI.gameObject.SetActive(value: true); + _buffDetailInfoUI.transform.SetParent(contentsParent); + _buffDetailInfoUI.transform.localScale = Vector3.one; + _drawLogList.Add(_buffDetailInfoUI.gameObject); + if (GameMgr.GetIns().IsNewReplayBattle) + { + _buffDetailInfoUI.SetBuffDetailLabelInReplay(targetCard.ReplayBuffInfoLabelList, targetCard); + } + else + { + _buffDetailInfoUI.SetBuffDetailLabel(targetCard); + } + float y = itemCursor.AddAndGetTopOffset(_buffDetailInfoUI.Height); + _buffDetailInfoUI.transform.localPosition = new Vector3(0f, y, 0f); + } + return itemCursor.Height; + } + + public List GetDistinctBuffList(List buffInfoList) + { + List list = new List(); + int i; + for (i = 0; i < buffInfoList.Count; i++) + { + if (buffInfoList[i].IsReserveTokenDrawSkill) + { + BuffInfo buffInfo = list.LastOrDefault(); + if (buffInfo == null || buffInfoList[i].SkillFrom.GetAttachSkill == null || buffInfo.SkillFrom.SkillPrm.ownerCard.Index == buffInfoList[i].SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index || (buffInfo.SkillFrom.GetAttachSkill != null && buffInfo.SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index == buffInfoList[i].SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index && buffInfo.SkillFrom.HasIndividualId)) + { + list.Add(buffInfoList[i]); + continue; + } + BuffInfo buffInfo2 = list.LastOrDefault((BuffInfo b) => b.SkillFrom.SkillPrm.ownerCard.Index == buffInfoList[i].SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index || (b.SkillFrom.GetAttachSkill != null && b.SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index == buffInfoList[i].SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index && b.SkillFrom.HasIndividualId)); + if (buffInfo2 == null) + { + buffInfo2 = list.LastOrDefault((BuffInfo b) => b.IsReserveTokenDrawSkill || b.SkillFrom.SkillPrm.ownerCard.BaseParameter.BaseCardId == buffInfoList[i].SkillFrom.SkillPrm.ownerCard.BaseParameter.BaseCardId); + } + list.Insert(list.IndexOf(buffInfo2) + 1, buffInfoList[i]); + } + else if ((!(buffInfoList[i].SkillFrom is Skill_token_draw_modifier) || !list.Any((BuffInfo b) => b.BaseCardIDFrom == buffInfoList[i].BaseCardIDFrom)) && !list.Any((BuffInfo b) => IsSameBuffLog(b, buffInfoList[i]))) + { + list.Add(buffInfoList[i]); + } + } + return list; + } + + public List GetBuffDetailLabel(BattleCardBase card) + { + List list = new List(); + if (!BuffDetailInfoUI.NeedBuffDetailText(card)) + { + return list; + } + List allBuffSkills = BuffDetailInfoUI.GetAllBuffSkills(card, card.BuffInfoList.Select((BuffInfo b) => b.SkillFrom).ToList()); + if (card.Cost != card.BaseCost) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Cost)); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_powerup || s is Skill_power_down) && (card.GetCurrentAtkBuff() != 0 || card.GetCurrentLifeBuff() != 0)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.StatusBuff)); + } + bool flag = false; + if (allBuffSkills.Any((SkillBase s) => s is Skill_quick && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Quick)); + flag = true; + } + bool flag2 = false; + if (allBuffSkills.Any((SkillBase s) => s is Skill_rush && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Rush)); + flag2 = true; + } + bool flag3 = false; + if (allBuffSkills.Any((SkillBase s) => s is Skill_killer && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Killer)); + flag3 = true; + } + bool flag4 = false; + if (allBuffSkills.Any((SkillBase s) => s is Skill_drain && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Drain)); + flag4 = true; + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_attack_count && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.AttackCount, card.MaxAttackableCount)); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_ignore_guard && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.IgnoreGuard)); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_consume_ep_modifier && (!card.IsInHand || s.OnWhenPlayStart == 0)) || BuffDetailInfoUI.NeedNoConsumeEpText(card)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.ConsumeEpModifier)); + } + if (BuffDetailInfoUI.ExistCopiedSkillNeedDetailText(card)) + { + IEnumerable source = card.BuffInfoList.Where((BuffInfo b) => b.IsCopied); + for (int num = 0; num < source.Count(); num++) + { + if (!(source.ElementAt(num).SkillFrom is SkillBaseCopy skillBaseCopy)) + { + continue; + } + switch (skillBaseCopy.SkillType) + { + case "rush": + if (!flag2) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Rush)); + } + break; + case "quick": + if (!flag) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Quick)); + } + break; + case "killer": + if (!flag3) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Killer)); + } + break; + case "drain": + if (!flag4) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Drain)); + } + break; + } + } + } + IEnumerable source2 = from s in allBuffSkills + where s is Skill_shield && (!card.IsInHand || s.OnWhenPlayStart == 0) + select (Skill_shield)s; + if (source2.Any()) + { + if (source2.Any((Skill_shield s) => s.IsAllDamageShield)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageShield)); + } + if (source2.Any((Skill_shield s) => s.IsNextDamageShield)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageShield)); + } + if (source2.Any((Skill_shield s) => s.IsSkillDamageShield)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageShield)); + } + if (source2.Any((Skill_shield s) => s.IsSpellDamageShield)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.SpellDamageShield)); + } + } + List source3 = (from s in allBuffSkills + where s is Skill_damage_cut && (!card.IsInHand || s.OnWhenPlayStart == 0) + select (Skill_damage_cut)s).ToList(); + if (source3.Any()) + { + if (source3.Any((Skill_damage_cut s) => s.IsAllDamageCut)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageCut, source3.Where((Skill_damage_cut s) => s.IsAllDamageCut).Sum((Skill_damage_cut s) => s.CutAmount))); + } + if (source3.Any((Skill_damage_cut s) => s.IsNextDamageCut)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageCut, source3.Where((Skill_damage_cut s) => s.IsNextDamageCut).Sum((Skill_damage_cut s) => s.CutAmount))); + } + if (source3.Any((Skill_damage_cut s) => s.IsSkillDamageCut)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageCut, source3.Where((Skill_damage_cut s) => s.IsSkillDamageCut).Sum((Skill_damage_cut s) => s.CutAmount))); + } + if (source3.Any((Skill_damage_cut s) => s.IsDamageClipping)) + { + List list2 = (from s in source3 + where s.ClippingMax != int.MaxValue + select s.ClippingMax).ToList(); + list2.AddRange(from s in source3 + where s.LifeLowerLimit != -1 + select s.SkillPrm.ownerCard.Life - 1); + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.DamageClipping, list2.Min())); + } + } + return list; + } + + private float SetupMyRotationBonusContent(BattleCardBase targetCard, List myRotationBonusList) + { + ItemCursor itemCursor = new ItemCursor(0f); + if (myRotationBonusList != null) + { + for (int i = 0; i < myRotationBonusList.Count; i++) + { + MakeMyRotationBonusItem(targetCard, myRotationBonusList[i], i > 0, ref itemCursor); + } + } + return itemCursor.Height; + } + + private float SetupAvatarBattleBonusContent(BattleCardBase targetCard, AvatarBattleInfo avatarBattleInfo) + { + ItemCursor itemCursor = new ItemCursor(0f); + if (avatarBattleInfo == null) + { + return itemCursor.Height; + } + MakeAvatarBattleBonusTitleLogItem(Data.SystemText.Get("Battle_0522"), isBuffTitle: false, ref itemCursor); + AvatarBattleInfo.AvatarBattleBonus bonus = avatarBattleInfo.Bonus; + string allAbilityDesc = bonus.PassiveAbilityDesc + string.Join("", bonus.AbilityDesc); + MakeAvatarBattlePassiveBonusLogItem(targetCard, allAbilityDesc, ref itemCursor); + for (int i = 0; i < targetCard.SelfBattlePlayer.ChoiceBraveSkillDescInfoList.Count(); i++) + { + bool isNeedSeparator = _battleMgr.BattlePlayer.BattleView.IsShowCantChoiceBraveText || bonus.PassiveAbilityDesc != string.Empty || i != 0; + MakeAvatarBattleBonusLogItem(targetCard.SelfBattlePlayer.ChoiceBraveSkillDescInfoList[i], allAbilityDesc, isNeedSeparator, targetCard, ref itemCursor); + } + if (CurrentShowRequest == ShowRequest.CHOICE_BRAVE_AND_BUFF) + { + string buffTitleText = Data.SystemText.Get("Battle_0495"); + ItemCursor itemCursor2 = itemCursor.Clone(); + MakeAvatarBattleBonusTitleLogItem(buffTitleText, isBuffTitle: true, ref itemCursor); + float height = itemCursor.Height; + SetupBuffContent(targetCard, _avatarBattleBonusContentsParent, ref itemCursor); + if (itemCursor.Height - height <= 0f) + { + _cacheAvatarBattleTitleList.FirstOrDefault((AvatarBattleTitleItem cache) => cache.TitleText == buffTitleText).gameObject.SetActive(value: false); + itemCursor = itemCursor2; + } + } + return itemCursor.Height; + } + + private float MakeAvatarBattleBonusTitleLogItem(string titleText, bool isBuffTitle, ref ItemCursor itemCursor) + { + AvatarBattleTitleItem avatarBattleTitleItem = _cacheAvatarBattleTitleList.FirstOrDefault((AvatarBattleTitleItem cache) => cache.TitleText == titleText); + if (avatarBattleTitleItem == null) + { + avatarBattleTitleItem = ((!isBuffTitle) ? BattleLogManager.CreateAvatarBattleBonusTitleItem(titleText, _avatarBattleBonusScrollView) : BattleLogManager.CreateAvatarBattleBuffTitleItem(titleText, _avatarBattleBonusScrollView)); + _cacheAvatarBattleTitleList.Add(avatarBattleTitleItem); + } + avatarBattleTitleItem.transform.SetParent(_avatarBattleBonusContentsParent); + avatarBattleTitleItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(avatarBattleTitleItem.Height); + avatarBattleTitleItem.transform.localPosition = new Vector3(0f, y, 0f); + avatarBattleTitleItem.gameObject.SetActive(value: true); + _drawLogList.Add(avatarBattleTitleItem.gameObject); + return itemCursor.Height; + } + + private float MakeAvatarBattleBonusLogItem(BattlePlayerBase.AvatarBattleDescInfo skillDescInfo, string allAbilityDesc, bool isNeedSeparator, BattleCardBase targetCard, ref ItemCursor itemCursor) + { + AvatarBattleBonusItem avatarBattleBonusItem = _cacheAvatarBattleBonusList.FirstOrDefault((AvatarBattleBonusItem cache) => cache.SkillDescInfo == skillDescInfo); + if (avatarBattleBonusItem == null) + { + avatarBattleBonusItem = BattleLogManager.CreateAvatarBattleBonusItem(skillDescInfo, _avatarBattleBonusScrollView, isNeedSeparator, targetCard); + if (BattleKeywordInfoListMgr.GetKeywords(allAbilityDesc).Any((string word) => Data.Master.BattleKeyWordDic.ContainsKey(word))) + { + UIEventListener.Get(avatarBattleBonusItem.DescLabel.gameObject).onClick = delegate(GameObject obj) + { + battleButtonControl.OnPressKeyBtn(allAbilityDesc, obj); + }; + BattlePlayerView.SetKeyWordColor(avatarBattleBonusItem.DescLabel.gameObject, avatarBattleBonusItem.DescLabel); + } + _cacheAvatarBattleBonusList.Add(avatarBattleBonusItem); + } + else + { + avatarBattleBonusItem.SetText(targetCard, isNeedSeparator); + } + avatarBattleBonusItem.transform.SetParent(_avatarBattleBonusContentsParent); + avatarBattleBonusItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(avatarBattleBonusItem.Height); + avatarBattleBonusItem.transform.localPosition = new Vector3(0f, y, 0f); + avatarBattleBonusItem.gameObject.SetActive(value: true); + _drawLogList.Add(avatarBattleBonusItem.gameObject); + return itemCursor.Height; + } + + private float MakeAvatarBattlePassiveBonusLogItem(BattleCardBase targetCard, string allAbilityDesc, ref ItemCursor itemCursor) + { + BattlePlayerBase.AvatarBattleDescInfo passiveSkillDescInfo = targetCard.SelfBattlePlayer.AvatarBattlePassiveSkillDescInfo; + if (!_battleMgr.BattlePlayer.BattleView.IsShowCantChoiceBraveText && (passiveSkillDescInfo == null || passiveSkillDescInfo.DescText == string.Empty)) + { + return itemCursor.Height; + } + AvatarBattlePassiveBonusItem avatarBattlePassiveBonusItem = _cacheAvatarBattlePassiveBonusList.FirstOrDefault((AvatarBattlePassiveBonusItem cache) => cache.SkillDescInfo == passiveSkillDescInfo); + if (avatarBattlePassiveBonusItem == null) + { + avatarBattlePassiveBonusItem = BattleLogManager.CreateAvatarBattlePassiveBonusItem(passiveSkillDescInfo, targetCard, _avatarBattleBonusScrollView); + if (BattleKeywordInfoListMgr.GetKeywords(allAbilityDesc).Any((string word) => Data.Master.BattleKeyWordDic.ContainsKey(word))) + { + UIEventListener.Get(avatarBattlePassiveBonusItem.DescLabel.gameObject).onClick = delegate(GameObject obj) + { + battleButtonControl.OnPressKeyBtn(allAbilityDesc, obj); + }; + BattlePlayerView.SetKeyWordColor(avatarBattlePassiveBonusItem.DescLabel.gameObject, avatarBattlePassiveBonusItem.DescLabel); + } + _cacheAvatarBattlePassiveBonusList.Add(avatarBattlePassiveBonusItem); + } + else + { + avatarBattlePassiveBonusItem.SetText(targetCard); + } + avatarBattlePassiveBonusItem.transform.SetParent(_avatarBattleBonusContentsParent); + avatarBattlePassiveBonusItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(avatarBattlePassiveBonusItem.DescLabel.height); + avatarBattlePassiveBonusItem.transform.localPosition = new Vector3(0f, y, 0f); + avatarBattlePassiveBonusItem.gameObject.SetActive(value: true); + _drawLogList.Add(avatarBattlePassiveBonusItem.gameObject); + return itemCursor.Height; + } + + private float SetupBossRushSpecialSkillContent(BattleCardBase targetCard, List bossRushSpecialSkillList) + { + ItemCursor itemCursor = new ItemCursor(0f); + for (int i = 0; i < bossRushSpecialSkillList.Count(); i++) + { + if (targetCard.SelfBattlePlayer.IsPlayer) + { + MakePlayerBossRushSpecialSkillLogItem(targetCard, bossRushSpecialSkillList.ElementAt(i), ref itemCursor); + } + else + { + MakeEnemyBossRushSpecialSkillLogItem(targetCard, bossRushSpecialSkillList.ElementAt(i), ref itemCursor); + } + } + return itemCursor.Height; + } + + private void MakePlayerBossRushSpecialSkillLogItem(BattleCardBase classCard, BossRushSpecialSkill bossRushSpecialSkill, ref ItemCursor itemCursor) + { + BattleLogItem battleLogItem = _cachePlayerBossRushSkillList.FirstOrDefault((BattleLogItem cache) => cache.BossRushSpecialSkill != null && cache.BossRushSpecialSkill.OriginalCardId == bossRushSpecialSkill.OriginalCardId); + if (battleLogItem == null) + { + if (_cacheLogList.Count + _cachePlayerBossRushSkillList.Count > 50) + { + for (int num = _cachePlayerBossRushSkillList.Count - 1; num >= 0; num--) + { + BattleLogItem battleLogItem2 = _cachePlayerBossRushSkillList[num]; + if (!battleLogItem2.gameObject.activeSelf) + { + UnityEngine.Object.Destroy(battleLogItem2.gameObject); + _cacheLogList.RemoveAt(num); + } + } + } + BuffInfo buffInfo = classCard.BuffInfoList.FirstOrDefault((BuffInfo b) => b.SpecialSkillInfo.OriginalCardId == bossRushSpecialSkill.OriginalCardId); + if (buffInfo != null) + { + battleLogItem = BattleLogManager.CreateBossRushPlayerSpecialSkillLogItem(buffInfo.SkillFrom.SkillPrm.ownerCard, bossRushSpecialSkill); + } + _cachePlayerBossRushSkillList.Add(battleLogItem); + } + battleLogItem.transform.SetParent(_bossRushSpecialSkillContentsParent); + battleLogItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(47f); + battleLogItem.transform.localPosition = new Vector3(0f, y, 0f); + battleLogItem.gameObject.SetActive(value: true); + _drawLogList.Add(battleLogItem.gameObject); + battleLogItem.SetSelectSpriteActive(setActive: false); + } + + private void MakeEnemyBossRushSpecialSkillLogItem(BattleCardBase classCard, BossRushSpecialSkill bossRushSpecialSkill, ref ItemCursor itemCursor) + { + BossRushEnemySpecialSkillItem bossRushEnemySpecialSkillItem = _cacheEnemyBossRushSkillList.FirstOrDefault((BossRushEnemySpecialSkillItem cache) => cache.BossRushSpecialSkill != null && cache.BossRushSpecialSkill.OriginalCardId == bossRushSpecialSkill.OriginalCardId); + if (bossRushEnemySpecialSkillItem == null) + { + BuffInfo buffInfo = classCard.BuffInfoList.FirstOrDefault((BuffInfo b) => b.SpecialSkillInfo.OriginalCardId == bossRushSpecialSkill.OriginalCardId); + if (buffInfo != null) + { + bossRushEnemySpecialSkillItem = BattleLogManager.CreateEnemyBossRushSpecialSkillLogItem(buffInfo.SkillFrom.SkillPrm.ownerCard, bossRushSpecialSkill); + if (BattleKeywordInfoListMgr.GetKeywords(bossRushSpecialSkill.SkillDescText).Any((string word) => Data.Master.BattleKeyWordDic.ContainsKey(word))) + { + UIEventListener.Get(bossRushEnemySpecialSkillItem.DescLabel.gameObject).onClick = delegate(GameObject obj) + { + battleButtonControl.OnPressKeyBtn(bossRushSpecialSkill.SkillDescText, obj); + }; + BattlePlayerView.SetKeyWordColor(bossRushEnemySpecialSkillItem.DescLabel.gameObject, bossRushEnemySpecialSkillItem.DescLabel); + } + } + _cacheEnemyBossRushSkillList.Add(bossRushEnemySpecialSkillItem); + } + bossRushEnemySpecialSkillItem.transform.SetParent(_bossRushSpecialSkillContentsParent); + bossRushEnemySpecialSkillItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(bossRushEnemySpecialSkillItem.DescLabel.height); + bossRushEnemySpecialSkillItem.transform.localPosition = new Vector3(0f, y, 0f); + bossRushEnemySpecialSkillItem.gameObject.SetActive(value: true); + _drawLogList.Add(bossRushEnemySpecialSkillItem.gameObject); + } + + public static bool IsNeedNoConsumeEp(BattleCardBase targetCard) + { + if (targetCard.SelfBattlePlayer.CheckNotConsumeEpCard(targetCard)) + { + return targetCard.SelfBattlePlayer.InPlayCards.Any((BattleCardBase c) => c.SkillApplyInformation.NotConsumeEpModifierInfoList.Any((NotConsumeEpModifierInfo b) => b.TargetCard == null && b.CheckNotConsumedCard(targetCard))); + } + return false; + } + + private void MakeHeadlineLabel(ref GameObject labelObject, string labelText, Transform contentsParent, ref ItemCursor itemCursor) + { + if (labelObject == null) + { + labelObject = UnityEngine.Object.Instantiate(Resources.Load("Prefab/UI/Log/AdvancedSkillLabel")) as GameObject; + labelObject.GetComponentInChildren().text = labelText; + } + labelObject.SetActive(value: true); + labelObject.transform.SetParent(contentsParent); + labelObject.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetTopOffset(44f); + labelObject.transform.localPosition = new Vector3(0f, y, 0f); + _drawLogList.Add(labelObject); + } + + private void MakeLogItems(List buffList, Transform contentsParent, ref ItemCursor itemCursor) + { + for (int i = 0; i < buffList.Count; i++) + { + MakeCardLogItem(buffList[i], contentsParent, ref itemCursor); + } + } + + private float SetupMyRotationBonusPanel(BattleCardBase targetCard, List myRotationBonusList, bool hasLowerContents) + { + float num = SetupMyRotationBonusContent(targetCard, myRotationBonusList); + bool flag = num > 0f; + _myRotationBonusContentsPanel.gameObject.SetActive(flag); + _myRotationBonusBorderLine.gameObject.SetActive(hasLowerContents); + if (!flag) + { + return num; + } + _myRotationBonusTitleLabel.text = Data.SystemText.Get("Battle_0518"); + num -= _myRotationBonusContentsParent.localPosition.y; + if (hasLowerContents) + { + _myRotationBonusBorderLine.transform.localPosition = new Vector3(0f, 0f - num - 6f); + num += (float)_myRotationBonusBorderLine.height + 6f; + } + return num; + } + + private float SetupAvatarBattleBonusPanel(BattleCardBase targetCard, AvatarBattleInfo avatarBattleInfo, bool isShowAvatarBattleBonus) + { + float num = SetupAvatarBattleBonusContent(targetCard, avatarBattleInfo); + bool num2 = num > 0f; + _avatarBattleBonusContentsPanel.gameObject.SetActive(isShowAvatarBattleBonus); + if (!num2 || !isShowAvatarBattleBonus) + { + return 0f; + } + _avatarBattleBonusBPDescriptionLabel.text = Data.SystemText.Get("Battle_0523"); + Vector3 localPosition = _avatarBattleBonusBPDescriptionLabel.transform.localPosition; + Vector3 localPosition2 = _avatarBattleBonusBPSprite.transform.localPosition; + _avatarBattleBonusBPDescriptionLabel.transform.localPosition = new Vector3((float)_avatarBattleBonusBPDescriptionLabel.width / 2f, localPosition.y, localPosition.z); + _avatarBattleBonusBPSprite.transform.localPosition = new Vector3((float)_avatarBattleBonusBPDescriptionLabel.width + (float)_avatarBattleBonusBPSprite.width / 2f, localPosition2.y, localPosition2.z); + _avatarBattleBonusBPLabel.text = targetCard.SelfBattlePlayer.Bp.ToString(); + return num; + } + + private float SetupBossRushSkillPanel(BattleCardBase targetCard, List bossRushSpecialSkillList, float upperContentsHeight, bool hasLowerContents) + { + float num = SetupBossRushSpecialSkillContent(targetCard, bossRushSpecialSkillList); + bool flag = num > 0f; + _bossRushSpecialSkillContentsPanel.gameObject.SetActive(flag); + if (!flag) + { + return num; + } + _bossRushSpecialSkillTitleLabel.text = Data.SystemText.Get(_card.SelfBattlePlayer.IsPlayer ? "BossRush_0029" : "BossRush_0028"); + num -= _bossRushSpecialSkillContentsParent.localPosition.y; + _bossRushSpecialSkillContentsPanel.transform.localPosition = new Vector3(0f, 0f - upperContentsHeight); + if (hasLowerContents) + { + num += 6f; + } + return num; + } + + private float SetupBuffSkillPanel(BattleCardBase targetCard, float upperContentsHeight, bool isShowAvatarBattleBonus) + { + if (isShowAvatarBattleBonus) + { + _buffPanel.gameObject.SetActive(value: false); + return 0f; + } + ItemCursor itemCursor = new ItemCursor(0f); + float num = SetupBuffContent(targetCard, _buffContentsParent, ref itemCursor); + bool active = num > 0f; + _buffPanel.gameObject.SetActive(active); + if (num <= 0f) + { + return num; + } + _buffTitleLabel.text = Data.SystemText.Get(_card.IsClass ? "Battle_0495" : "Battle_0443"); + num -= _buffContentsParent.transform.localPosition.y; + _buffPanel.transform.localPosition = new Vector3(0f, -(int)upperContentsHeight); + _buffPanel.topAnchor.absolute = -(int)upperContentsHeight; + return num; + } + + private void SetupAllBuffPanel(BattleCardBase targetCard, float heightOffset, List myRotationBonusList, List bossRushSkillList, AvatarBattleInfo avatarBattleInfo, bool isUpdate, bool isShowAvatarBattleBonus = false) + { + for (int i = 0; i < _drawLogList.Count; i++) + { + _drawLogList[i].SetActive(value: false); + } + _drawLogList.Clear(); + bool flag = bossRushSkillList.Count > 0; + bool flag2 = NeedBuffSkillPanel(targetCard); + float num = 0f; + num += SetupMyRotationBonusPanel(targetCard, myRotationBonusList, flag || flag2); + num += SetupBossRushSkillPanel(targetCard, bossRushSkillList, num, flag2); + num += SetupAvatarBattleBonusPanel(targetCard, avatarBattleInfo, isShowAvatarBattleBonus); + num += SetupBuffSkillPanel(targetCard, num, isShowAvatarBattleBonus); + num += 8f; + _buffPanelSprite.gameObject.SetActive(flag2 || myRotationBonusList.Count > 0 || bossRushSkillList.Count > 0 || isShowAvatarBattleBonus); + float num2 = 598f + heightOffset; + num2 = ((!_card.IsUnit) ? (num2 - _nonFollowerPanel._bg.localSize.y) : (num2 - (_followerEvoPanel._bg.localSize.y + _followerPanel._bg.localSize.y))); + bool active = num2 < num; + UIScrollView component = _buffContentsPanel.GetComponent(); + component.InvalidateBounds(); + component.ResetPosition(); + component.enabled = active; + _buffScrollBar.gameObject.SetActive(active); + float num3 = Mathf.Min(num, num2); + _buffPanelSprite.height = (int)num3; + _buffPanelCollider.center = new Vector3(_buffPanelCollider.center.x, (0f - num3) / 2f); + _buffPanelCollider.size = new Vector3(_buffPanelCollider.size.x, num3); + _buffScrollView.UpdateScrollbars(); + _buffScrollView.RestrictWithinBounds(instant: true); + _buffScrollView.ResetPosition(); + if (isShowAvatarBattleBonus) + { + _bgDragScrollView.scrollView = _avatarBattleBonusScrollView; + } + else + { + _bgDragScrollView.scrollView = _buffScrollView; + } + _avatarBattleBonusScrollView.InvalidateBounds(); + _avatarBattleBonusScrollView.enabled = active; + _avatarBattleBonusScrollBar.gameObject.SetActive(active); + _avatarBattleBonusScrollView.UpdateScrollbars(); + if (!isUpdate) + { + _avatarBattleBonusScrollView.RestrictWithinBounds(instant: true); + _avatarBattleBonusScrollView.ResetPosition(); + } + } + + private bool NeedBuffSkillPanel(BattleCardBase card) + { + if (GameMgr.GetIns().IsNewReplayBattle) + { + if (card.ReplayNoConsumeEpBuffInfoNameList.Count <= 0 && card.ReplayBuffInfoList.Count() <= 0) + { + return card.ReplayBuffInfoLabelList.Count > 0; + } + return true; + } + bool num = IsNeedNoConsumeEp(card) && card.SelfBattlePlayer.InPlayCards.Where((BattleCardBase c) => c.SkillApplyInformation.NotConsumeEpModifierInfoList.Any((NotConsumeEpModifierInfo b) => b.TargetCard == null && b.CheckNotConsumedCard(card))).Count() > 0; + bool flag = (from b in GetDistinctBuffList(card.BuffInfoList) + where b.SpecialSkillInfo == null && !BuffDetailInfoUI.IsNotShowDamageCutLifeLowerLimitBuffDetail(b.SkillFrom) + select b).Count() > 0; + bool flag2 = BuffDetailInfoUI.NeedBuffDetailText(card); + return num || flag || flag2; + } + + private IEnumerator RepositionBuffContent() + { + yield return null; + _buffScrollView.ResetPosition(); + _buffScrollView.UpdateScrollbars(); + } + + private string GetBuffFromName(int baseCardID) + { + if (baseCardID == 0) + { + return Data.SystemText.Get("BattleLog_0097"); + } + return CardMaster.GetInstanceForBattle().GetCardParameterFromId(baseCardID).CardName; + } + + private void AddCardEvent(BattleCardBase card) + { + if (card != null) + { + card.OnDestroy += OnDestroyCard; + card.OnBanish += OnDestroyCard; + card.OnReturnCard += OnDestroyCard; + card.OnMetamorphose += OnDestroyCard; + card.OnGetOn += OnDestroyCard; + if (card.IsClass) + { + ((ClassBattleCardBase)card).OnRetire += OnDestroyCard; + } + } + } + + private void RemoveCardEvent(BattleCardBase card) + { + if (card != null) + { + card.OnDestroy -= OnDestroyCard; + card.OnBanish -= OnDestroyCard; + card.OnReturnCard -= OnDestroyCard; + card.OnMetamorphose -= OnDestroyCard; + card.OnGetOn -= OnDestroyCard; + if (card.IsClass) + { + ((ClassBattleCardBase)card).OnRetire -= OnDestroyCard; + } + } + } + + private VfxBase OnDestroyCard(BattleCardBase card, SkillProcessor skill) + { + if (_card == card) + { + return InstantVfx.Create(Hide); + } + return NullVfx.GetInstance(); + } + + public void ShowKeySubPanel(int page) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + } + + public void HideKeySubPanel() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + } + + public void SetKeyBtnActive(List hasKeyword) + { + if (hasKeyword.Count != 0) + { + _hasKeyword = hasKeyword[0]; + if (hasKeyword.Count > 1 && (bool)_nextPanel) + { + List keyBtnActive = new List(hasKeyword.GetRange(1, hasKeyword.Count - 1)); + _nextPanel.SetKeyBtnActive(keyBtnActive); + } + } + } + + public static void LoadCardHeaderTexture(int cardId, bool isUnit, UITexture headerUITexture, bool isEvolution = false, bool isBattleLogHeader = false, Action cbOnLoaded = null, List battleLogTextureInfo = null) + { + CardMaster instanceForBattle = CardMaster.GetInstanceForBattle(); + CardParameter cardParameterFromId = instanceForBattle.GetCardParameterFromId(cardId); + ResourcesManager resMgr = Toolbox.ResourcesManager; + string text = cardParameterFromId.ResourceCardId.ToString(); + ResourcesManager.AssetLoadPathType assetLoadPathType = ResourcesManager.AssetLoadPathType.UnitHeader; + ResourcesManager.AssetLoadPathType assetLoadPathType2 = ResourcesManager.AssetLoadPathType.UnitCardMaterial; + if (text.Length > 9) + { + assetLoadPathType = ResourcesManager.AssetLoadPathType.UnitHeader; + assetLoadPathType2 = ResourcesManager.AssetLoadPathType.UnitCardMaterial; + } + else if (isUnit || ((CardMaster.IsMutationCardCheck(instanceForBattle.GetCardParameterFromId(cardId).BaseCardId) || CardMaster.IsChoiceBraveCardCheck(cardId)) && instanceForBattle.GetCardParameterFromId(cardParameterFromId.ResourceCardId).CharType == CardBasePrm.CharaType.NORMAL)) + { + assetLoadPathType = ResourcesManager.AssetLoadPathType.UnitHeader; + text = (isEvolution ? (text + "1") : (text + "0")); + assetLoadPathType2 = ResourcesManager.AssetLoadPathType.UnitCardMaterial; + } + else + { + assetLoadPathType = ResourcesManager.AssetLoadPathType.OtherHeader; + text += "0"; + assetLoadPathType2 = ResourcesManager.AssetLoadPathType.SpellCardMaterial; + } + string cardAssetPath = resMgr.GetAssetTypePath(cardParameterFromId.ResourceCardId.ToString(), assetLoadPathType2); + string logHeaderAssetPath = resMgr.GetAssetTypePath(text, assetLoadPathType, isfetch: true); + if (resMgr.IsLoadedAssetBundleAndObjectArrayExist(cardAssetPath)) + { + Texture texture = resMgr.LoadObject(logHeaderAssetPath); + headerUITexture.mainTexture = texture; + cbOnLoaded.Call(texture); + return; + } + if (!isBattleLogHeader && loadHeaderCoroutine.ContainsKey(cardAssetPath)) + { + Coroutine coroutine = loadHeaderCoroutine[cardAssetPath]._coroutine; + BattleCoroutine.GetInstance().StopCoroutine(coroutine); + loadHeaderCoroutine.Remove(cardAssetPath); + } + Action action = delegate + { + Texture texture2 = resMgr.LoadObject(logHeaderAssetPath); + headerUITexture.mainTexture = texture2; + cbOnLoaded.Call(texture2); + }; + if (loadHeaderCoroutine.ContainsKey(cardAssetPath)) + { + loadHeaderCoroutine[cardAssetPath]._actions.Add(action); + return; + } + if (battleLogTextureInfo != null) + { + battleLogTextureInfo.Add(new NewReplayBattleMgr.BattleLogTextureInfo(cardAssetPath, logHeaderAssetPath, headerUITexture, cbOnLoaded)); + return; + } + CoroutineActions coroutineActions = new CoroutineActions(action); + coroutineActions._coroutine = BattleCoroutine.GetInstance().StartCoroutine(resMgr.LoadAssetAsync(cardAssetPath, delegate + { + foreach (Action action2 in coroutineActions._actions) + { + action2(); + } + loadHeaderCoroutine.Remove(cardAssetPath); + })); + Toolbox.ResourcesManager.BattleListAssetPathList.Add(cardAssetPath); + loadHeaderCoroutine.Add(cardAssetPath, coroutineActions); + } + + public static void LoadClassHeaderTexture(int cardId, UITexture headerUITexture, Action cbOnLoaded = null, bool isEvolve = false) + { + ResourcesManager resMgr = Toolbox.ResourcesManager; + ResourcesManager.AssetLoadPathType resourceType = ResourcesManager.AssetLoadPathType.UnitHeader; + resourceType = ResourcesManager.AssetLoadPathType.ClassCharaHeader; + int skin_id = GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(cardId) + .skin_id; + string cardNameBgPath = ((skin_id < 10) ? ("log_class_0" + skin_id) : ("log_class_" + skin_id)); + if (isEvolve) + { + cardNameBgPath += "_evolve"; + } + string cardAssetName = resMgr.GetAssetTypePath(cardNameBgPath, resourceType); + BattleCoroutine.GetInstance().StartCoroutine(resMgr.LoadAssetAsync(cardAssetName, delegate + { + Texture texture = resMgr.LoadObject(resMgr.GetAssetTypePath(cardNameBgPath, resourceType, isfetch: true)); + headerUITexture.mainTexture = texture; + cbOnLoaded.Call(texture); + Toolbox.ResourcesManager.BattleListAssetPathList.Add(cardAssetName); + })); + } + + public void SetScreenPosition(bool right) + { + UIAnchor component = base.transform.Find("AnchorL").GetComponent(); + if ((bool)component) + { + if (right) + { + float num = -0.3633333f; + float num2 = -0.222f - num * 0.4f; + component.relativeOffset.x = num * base.transform.localScale.x + num2; + } + else + { + component.relativeOffset.x = 0f; + } + component.side = (right ? UIAnchor.Side.TopRight : UIAnchor.Side.TopLeft); + component.enabled = true; + } + } + + private void SetParent(DetailPanelControl parent) + { + _parentPanel = parent; + GameObject obj = base.transform.Find("AnchorL").gameObject; + UIAnchor component = obj.GetComponent(); + if ((bool)component) + { + UnityEngine.Object.Destroy(component); + } + UIWidget uIWidget = obj.AddMissingComponent(); + uIWidget.height = 1; + uIWidget.width = 1; + UIWidget lastBottomWidget = _parentPanel.GetLastBottomWidget(); + uIWidget.topAnchor.target = lastBottomWidget.transform; + uIWidget.topAnchor.absolute = 1; + } + + private UIWidget GetLastBottomWidget() + { + if (_buffPanelSprite.gameObject.activeInHierarchy) + { + return _buffPanelSprite; + } + if (_nonFollowerPanel._bg.gameObject.activeInHierarchy) + { + return _nonFollowerPanel._bg; + } + if (_followerEvoPanel._bg.gameObject.activeInHierarchy) + { + return _followerEvoPanel._bg; + } + return _followerPanel._bg; + } + + private void UpdateParentAnchor() + { + if ((bool)_parentPanel) + { + GameObject gameObject = base.transform.Find("AnchorL").gameObject; + UIWidget uIWidget = gameObject.AddMissingComponent(); + UIWidget lastBottomWidget = _parentPanel.GetLastBottomWidget(); + if (lastBottomWidget != uIWidget.topAnchor.target) + { + uIWidget.height = 1; + uIWidget.width = 1; + uIWidget.topAnchor.target = lastBottomWidget.transform; + uIWidget.ResetAndUpdateAnchors(); + uIWidget.topAnchor.absolute = 0; + uIWidget.topAnchor.relative = 0f; + Vector3 localPosition = gameObject.transform.localPosition; + localPosition.x = _parentPanel.transform.Find("AnchorL").localPosition.x; + gameObject.transform.localPosition = localPosition; + } + } + } + + public void SetSize(float percent) + { + float num = percent / 100f; + base.transform.localScale = new Vector3(num, num, num); + UIAnchor component = base.transform.Find("AnchorL").GetComponent(); + if ((bool)component) + { + float num2; + float num3; + if (component.side == UIAnchor.Side.TopRight) + { + num2 = -0.3633333f; + num3 = -0.222f - num2 * 0.4f; + component.relativeOffset.x = num2 * base.transform.localScale.x + num3; + } + component.relativeOffset.y = 0f; + num2 = 106.666664f; + num3 = -30f - num2 * 0.4f; + component.pixelOffset.y = num2 * num + num3; + component.enabled = true; + } + if ((bool)_nextPanel) + { + _nextPanel.SetSize(percent); + } + } +} diff --git a/SVSim.BattleEngine/Engine/DialogBase.cs b/SVSim.BattleEngine/Engine/DialogBase.cs new file mode 100644 index 0000000..abb1fb6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DialogBase.cs @@ -0,0 +1,1689 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.UI.Dialog.ImageSelection; + +public class DialogBase : MonoBehaviour +{ + public enum DialogScene + { + OPEN, + WAIT, + CLOSE, + END, + ERASE + } + + public enum Size + { + S, + M, + L, + XL, + BATTLE_LOG + } + + public enum ButtonLayout + { + NONE, + OkBtn, + DecisionBtn, + CloseBtn, + BackToTitleBtn, + GrayBtn, + RedBtn, + YellowBtn, + BlueBtn_CancelBtn, + RedBtn_CancelBtn, + BlueBtn_GrayBtn, + BlueBtn_RedBtn, + GrayBtn_GrayBtn, + BlueBtn_RedBtn_GrayBtn, + GrayBtn_CancelBtn_BlueBtn, + GrayBtn_GrayBtn_BlueBtn, + BattleEvolveConfirm, + BlueButton, + BlueButton_BlueButton, + BlueButton_BlueButton_BlueButton + } + + private enum ButtonSprite + { + BLUE, + GRAY, + RED, + YELLOW, + BLUE_S, + RED_S + } + + public enum ButtonType + { + Blue, + Red, + Gray, + Yellow, + OK, + Decision, + Close, + Cancel, + Retry, + BackToTitle, + BackToHome, + QuitApplication, + VersionUp, + RecommendedList + } + + private class UIPanelAlphaController + { + private UIPanel _panel; + + private float _originalAlpha; + + public UIPanelAlphaController(UIPanel panel) + { + _panel = panel; + _originalAlpha = _panel.alpha; + } + + public void SetAlpha(float alpha) + { + _panel.alpha = alpha; + } + + public void ResetAlpha() + { + _panel.alpha = _originalAlpha; + } + } + + public enum KeyboardDialogSelect + { + Button1, + Button2, + Button3, + CloseButton + } + + private class Button + { + private ButtonType Type { get; set; } + + public ButtonSprite Sprite { get; private set; } + + public string Text { get; private set; } + + public Se.TYPE SE { get; private set; } + + public Action OnClick { get; private set; } + + public Action OnDestroy { get; private set; } + + public Button(ButtonType type, string text) + { + Type = type; + SystemText systemText = Data.SystemText; + switch (type) + { + case ButtonType.Blue: + Sprite = ButtonSprite.BLUE; + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.Red: + Sprite = ButtonSprite.RED; + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.Gray: + Sprite = ButtonSprite.GRAY; + SE = Se.TYPE.SYS_BTN_CANCEL; + break; + case ButtonType.Yellow: + Sprite = ButtonSprite.YELLOW; + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.OK: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0004"); + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.Decision: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0003"); + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.Close: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0008"); + SE = Se.TYPE.SYS_BTN_CANCEL; + break; + case ButtonType.Cancel: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0005"); + SE = Se.TYPE.SYS_BTN_CANCEL; + break; + case ButtonType.Retry: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0133"); + SE = Se.TYPE.SYS_BTN_DECIDE; + OnClick = delegate + { + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Retry()); + }; + NetworkUI.GetInstance().SetKeepLastRequest(flag: true); + OnDestroy = delegate + { + NetworkUI.GetInstance().SetKeepLastRequest(flag: false); + }; + break; + case ButtonType.BackToTitle: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0131"); + SE = Se.TYPE.SYS_BTN_CANCEL_TRANS; + OnClick = delegate + { + SoftwareReset.exec(); + }; + break; + case ButtonType.BackToHome: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0132"); + SE = Se.TYPE.SYS_BTN_CANCEL_TRANS; + OnClick = delegate + { + UIManager.GetInstance().closeInSceneCenterLoading(); + if (UIManager.GetInstance().GetCurrentScene() == UIManager.ViewScene.Battle && GameMgr.GetIns().GetBattleCtrl() != null) + { + UIManager.GetInstance().StartCoroutine(BattleEndCoroutine()); + } + else + { + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.MyPage); + } + }; + break; + case ButtonType.QuitApplication: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0135"); + SE = Se.TYPE.SYS_BTN_CANCEL; + OnClick = delegate + { + if (Toolbox.mute != null) + { + Toolbox.mute.Close(); + Toolbox.mute = null; + } + UIManager.ApplicationQuit(); + }; + break; + case ButtonType.VersionUp: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0136"); + SE = Se.TYPE.SYS_BTN_DECIDE; + OnClick = delegate + { + Toolbox.NetworkManager.GoToStore(); + }; + NetworkUI.GetInstance().SetKeepLastRequest(flag: true); + break; + case ButtonType.RecommendedList: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0134"); + SE = Se.TYPE.SYS_BTN_DECIDE; + OnClick = delegate + { + UIManager.GetInstance().WebViewHelper.CreateOpenURLWindow(WebViewHelper.UrlType.RECOMMENDED_DEVICE); + }; + break; + } + if (text != null) + { + Text = text; + } + } + + private IEnumerator BattleEndCoroutine() + { + yield return null; + SBattleLoad battleLoad = BattleManagerBase.GetIns().SBattleLoad; + while (!battleLoad.isLoadEnd) + { + yield return null; + } + yield return GameMgr.GetIns().GetBattleCtrl().BattleEnd(); + UIManager.ChangeViewSceneParam changeViewSceneParam = new UIManager.ChangeViewSceneParam(); + changeViewSceneParam.OnChange = delegate + { + UIManager.GetInstance().CloseInSceneLoadingBattle(); + }; + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.MyPage, changeViewSceneParam); + } + } + + private const int ONE_BUTTON_1BUTTON_LEFT_ANCHOR = -128; + + private const int ONE_BUTTON_1BUTTON_RIGHT_ANCHOR = 128; + + private const int TWO_BUTTON_1BUTTON_LEFT_ANCHOR = 8; + + private const int TWO_BUTTON_1BUTTON_RIGHT_ANCHOR = 264; + + private const int TWO_BUTTON_2BUTTON_LEFT_ANCHOR = -264; + + private const int TWO_BUTTON_2BUTTON_RIGHT_ANCHOR = -8; + + private const int THREE_BUTTON_1BUTTON_LEFT_ANCHOR = -128; + + private const int THREE_BUTTON_1BUTTON_RIGHT_ANCHOR = 128; + + private const int THREE_BUTTON_2BUTTON_LEFT_ANCHOR = -398; + + private const int THREE_BUTTON_2BUTTON_RIGHT_ANCHOR = -142; + + private const int THREE_BUTTON_3BUTTON_LEFT_ANCHOR = 142; + + private const int THREE_BUTTON_3BUTTON_RIGHT_ANCHOR = 398; + + private const int WEBVIEW_ANCHOR_LEFT = 6; + + private const int WEBVIEW_ANCHOR_BOTTOM = 18; + + private const int WEBVIEW_ANCHOR_RIGHT = -6; + + private const int WEBVIEW_ANCHOR_TOP = -17; + + private const float START_ALPHA = 0.01f; + + public const float BACKVIEW_ALPHA = 0.8f; + + private const float OPEN_TIME = 0.3f; + + public const int DELTA_PANEL_DEPTH = 5; + + public static readonly Vector3 BATTLELOG_TITLELABEL_POS = new Vector3(0f, 16f, 0f); + + public static readonly Vector3 BATTLELOG_WINDOWSPRITE_POS = new Vector3(-250f, 0f, 0f); + + private const int BATTLELOG_WINDOW_W = 600; + + private const int BATTLELOG_WINDOW_H = 600; + + private const int FAQ_DEAPTH = 6100; + + public const int FRIEND_DIALOG_DEPTH = 1000; + + public const int ERROR_DIALOG_BATTLE = 5000; + + public const int ERROR_DIALOG_MATCHING_DEPTH = 5400; + + public const int ERROR_DIALOG_DEPTH = 5500; + + public const int ERROR_ASSETHANDLE_DIALOG_DEPTH = 6000; + + public const int HOME_LOGIN_BONUS_DEPTH = 10; + + public const int HOME_BATTLE_RESULT_DEPTH = 15; + + public const int QUIT_DIALOG_DEPTH = 7000; + + public const int GATHERING_STATE_CHANGE_DIALOG_DEPTH = 4000; + + public const int SCROLL_BOTTOM_ANCHOR_WINDOW = 8; + + public const int SCROLL_BOTTOM_ANCHOR_BUTTON_LINE = -2; + + private const int WEBVIEW_DISPLAY_MARGIN = 35; + + private const int WEBVIEW_Y_OFFSET = 2; + + private const string spriteButtonBlue = "btn_common_02_m_off"; + + private const string spriteButtonBluePush = "btn_common_02_m_on"; + + private const string spriteButtonGray = "btn_common_01_m_off"; + + private const string spriteButtonGrayPush = "btn_common_01_m_on"; + + private const string spriteButtonRed = "btn_common_04_m_off"; + + private const string spriteButtonRedPush = "btn_common_04_m_on"; + + private const string spriteButtonYellow = "btn_common_03_m_off"; + + private const string spriteButtonYellowPush = "btn_common_03_m_on"; + + private const string spriteButtonRed_S = "btn_common_04_s_off"; + + private const string spriteButtonRedPush_S = "btn_common_04_s_on"; + + private const string spriteButtonBlue_S = "btn_common_02_s_off"; + + private const string spriteButtonBluePush_S = "btn_common_02_s_on"; + + [HideInInspector] + public NguiObjs InputAreaObjs; + + [SerializeField] + public UISprite WindowSprite; + + [SerializeField] + private UIButton CloseButton; + + [SerializeField] + private GameObject TitleObjs; + + [SerializeField] + private UILabel titleLabel; + + [SerializeField] + private GameObject backViewOriginal; + + [HideInInspector] + public GameObject backView; + + [SerializeField] + private GameObject _collider; + + [SerializeField] + private UIPanel _colliderPanel; + + private float _colliderUpdateTimer; + + private bool _colliderUpdateEnable; + + [SerializeField] + private UILabel DetailMsg; + + [SerializeField] + private GameObject ButtonBase; + + [SerializeField] + public UIButton button1; + + [SerializeField] + private UILabel button1_Label; + + [SerializeField] + private UIButton button2; + + [SerializeField] + private UILabel button2_Label; + + [SerializeField] + private UIButton button3; + + [SerializeField] + private UILabel button3_Label; + + [SerializeField] + private UIButton contactButton; + + [SerializeField] + private UILabel contactButton_Label; + + [SerializeField] + private UIButton webviewBackButton; + + [SerializeField] + private UISprite buttonLine; + + [SerializeField] + public UISprite titleLine; + + [SerializeField] + private UIRect scrollRect; + + [SerializeField] + private UIRect scrollBarRect; + + [SerializeField] + private UISlider vScrollBar; + + [SerializeField] + private UIScrollView scrollView; + + [SerializeField] + public GameObject EscapeDialogPrefab; + + [SerializeField] + private GameObject _button1Select; + + [SerializeField] + private GameObject _button2Select; + + [SerializeField] + private GameObject _button3Select; + + [SerializeField] + private GameObject _closeButtonSelect; + + private DialogScene dialogNowScene; + + private ButtonLayout dialogLayout; + + private static Vector2[] Sizes = new Vector2[5] + { + new Vector2(624f, 360f), + new Vector2(850f, 564f), + new Vector2(1080f, 504f), + new Vector2(1125f, 605f), + new Vector2(600f, 600f) + }; + + private static int[] DETAIL_LABEL_SIZE = new int[5] { 540, 766, 996, 1041, 516 }; + + private GameObject returnObj; + + private string returnMsg_Btn1; + + private string returnMsg_Btn2; + + private string returnMsg_Btn3; + + public Action OnCloseStart; + + public Action OnClose; + + private Action OnClose_ForSystem; + + public Action onPushButton1; + + public Action onPushButton2; + + public Action onPushButton3; + + public Action onCloseWithoutSelect; + + private Action onFirstUpdate; + + private string closeMsg; + + private float timer; + + private bool isOpenAnim = true; + + public bool isNotCloseWindowButton1; + + public bool isNotCloseWindowButton2; + + public bool isNotCloseWindowButton3; + + private int _buttonNum; + + private List