engine cleanup passes 4-7 + multi-instancing ambient rip
Squashes 146 commits from battle-engine-extraction. Net: 2,045 files changed, +11,896 / -158,687 lines. Ships engine passes 4-7 (dead-code cull, view-layer stub, receive-path shrink) plus the Phase-5 AsyncLocal ambient deletion that turns concurrent battles into a type-system property rather than a scope contract. ## What landed **Passes 4-7 (chunks 1-34):** Extended the Phase-4 const-false collapse into a cascading cull across the skill graph, view layer, and receive-path periphery. Six mode flags (IsWatchBattle/IsReplayBattle/IsAdmin/IsAdminWatch/IsPuzzleQuest/ IsAINetwork) became `const false`, every guarded block deleted. Field*.cs subclass ctors + BackGroundBase + ObjectChecker culled to no-ops. Mulligan family reworked to take a mgr param through IMulliganMgr.InitMulligan. Emotion/Recovery/Resource clusters null-stubbed. Prediction/OperationSimulator/ skill filters converted from static ambient reads to per-mgr reads via SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr / ins.BattleMgr / this.BattleMgr. **Phase-5 ambient rip (chunks 35-47):** Deleted BattleAmbient / BattleAmbient- Context / TestBattleScope in full. Every per-battle mutable slot now lives on the mgr instance itself: mgr.InstanceIsForecast / InstanceIsRandomDraw / InstanceRecoveryInfo / InstanceViewerId / InstanceNetworkAgent / GameMgr BattleManagerBase.GetIns() returns null unconditionally; the residual static flags + 3 façades (Certification.ViewerId, Data.BattleRecoveryInfo, ToolboxGame.RealTimeNetworkAgent) are null-tolerant defaults kept for the handful of engine-internal readers that still reference their types. Zero BattleAmbient references anywhere in engine + node + tests. Added pre-seeded GameMgr ctor overload threaded through the mgr chain (BattleManagerBase → SingleBattleMgr / NetworkBattleManagerBase → NetworkStandard- BattleMgr → HeadlessBattleMgr / HeadlessNetworkBattleMgr). Fixtures build a GameMgr, seed it via HeadlessEngineEnv.SeedCharaIds/SeedNetUser, and pass it to the mgr's ctor — no ambient reach. Node side (SVSim.BattleNode/SessionBattleEngine): _ctx replaced with a plain GameMgr field; 34 `using var _ambient = BattleAmbient.Enter(_ctx)` scope wraps ripped from every accessor and mutator; EngineGlobalInit.WirePerSessionGameMgr takes GameMgr as a param and runs from SessionBattleEngine.SetupInternal BEFORE mgr construction. Test side: TestBattleScope deleted; 18 fixture [SetUp]s migrated to `HeadlessEngineEnv.EnsureProcessGlobals()`; MultiInstanceEngineTests rewritten around per-mgr construction (GetIns() → null is the pinned invariant). ## Regression fixes - **chunk-48** (MulliganCtrl): chunk-35's `= null` stubs on card lookups broke the live receive-driven Deal path (BattlePlayerBase.DrawCard NRE'd downstream of NetworkPlayerMulliganCtrl.StartMulliganVfx). Restored the three lookups via `_battlePlayer.BattleMgr.GetBattleCardIdx`. Engine tests were satisfied by the WireMulliganPhase seam; unit tests exposed the live-path gap. ## Ship state - SVSim.BattleEngine.Tests: 56/56 pass, 2 skip - SVSim.UnitTests: 1554/1554 pass (was 1523/31-fail before chunk 48) - Solution build: 0 source warnings (40 pre-existing NU1902 MessagePack CVEs in SVSim.EmulatedEntrypoint, unrelated) - Sequential PVP smoke: verified live (two back-to-back battles, no regression on cleanup/spinup) - Concurrent PVP smoke: verified live Adds tools/engine-port/ClosureAnalyzer/ — the Roslyn transitive-type-closure analyzer needed to make future cascade cleanup safe (per feedback memory "Engine cleanup needs closure tool" from the 2026-06-28 pass-3 failure). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
7
.run/DCGEngine + ContentServer.run.xml
Normal file
7
.run/DCGEngine + ContentServer.run.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="DCGEngine + ContentServer" type="CompoundRunConfigurationType">
|
||||
<toRun name="SVSim.EmulatedEntrypoint: http" type="LaunchSettings" />
|
||||
<toRun name="SVSim.ContentServer: http" type="LaunchSettings" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,7 +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.
|
||||
// Per-test isolation: after the Phase-5 ambient rip (chunks 38-47), every piece of per-battle
|
||||
// mutable state lives on the mgr instance itself; there is no shared ambient to leak across
|
||||
// fixtures. Residual process-globals (Unity Resources shim cache, Wizard.LocalLog accumulators)
|
||||
// are already thread-safe (ConcurrentDictionary / static lock), so fixtures run in parallel.
|
||||
using NUnit.Framework;
|
||||
|
||||
[assembly: Parallelizable(ParallelScope.Fixtures)]
|
||||
|
||||
@@ -1,246 +0,0 @@
|
||||
#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<System.InvalidOperationException>(() => 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<System.InvalidOperationException>(() => { var _ = BattleManagerBase.IsForecast; });
|
||||
Assert.Throws<System.InvalidOperationException>(() => 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<System.InvalidOperationException>(() => { var _ = BattleManagerBase.IsRandomDraw; });
|
||||
Assert.Throws<System.InvalidOperationException>(() => 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<System.InvalidOperationException>(() => { 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<System.InvalidOperationException>(() => 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));
|
||||
}
|
||||
}
|
||||
@@ -14,10 +14,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class BuffFollowerOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -32,8 +30,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -14,10 +14,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class ConstructionProbeTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
[Test]
|
||||
public void SingleBattleMgr_constructs_headless()
|
||||
@@ -30,7 +28,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
SingleBattleMgr mgr = null;
|
||||
try
|
||||
{
|
||||
mgr = new SingleBattleMgr(new HeadlessContentsCreator());
|
||||
mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -42,7 +40,6 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
43
SVSim.BattleEngine.Tests/Coverage/CleanupRegressionTests.cs
Normal file
43
SVSim.BattleEngine.Tests/Coverage/CleanupRegressionTests.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
extern alias engine;
|
||||
using NUnit.Framework;
|
||||
using System.Reflection;
|
||||
|
||||
namespace SVSim.BattleEngine.Tests.Coverage;
|
||||
|
||||
/// <summary>Regression backstop for the engine shim cleanup. Asserts every type we
|
||||
/// deleted in Tasks 9-15 of docs/superpowers/plans/2026-06-27-engine-shim-cleanup.md
|
||||
/// stays deleted. If a rebase or merge accidentally re-introduces one, this test
|
||||
/// fails loudly.</summary>
|
||||
[TestFixture]
|
||||
public class CleanupRegressionTests
|
||||
{
|
||||
private static readonly string[] DeletedFqns = new[]
|
||||
{
|
||||
// Task 9 — DEAD-ORPHAN sweep (commit 119bf77)
|
||||
"Wizard.AIBarrierGlobal",
|
||||
|
||||
// Task 10 — *Vfx.cs sweep (commit 3235f47)
|
||||
"Wizard.Battle.Player.ClassCharacter.SkinEffectVfx",
|
||||
"Wizard.Battle.Player.Emotion.Debug722006NullVfx",
|
||||
|
||||
// Task 12 — *Page.cs sweep (commit b3e2df2)
|
||||
"Wizard.Bingo.BingoPage",
|
||||
"Wizard.Lottery.LotteryPage",
|
||||
"Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase.BuildDeckPurchasePage",
|
||||
"Wizard.StorySelectPage",
|
||||
|
||||
// Task 13 — *Window.cs sweep (commit 92b6bf6)
|
||||
"Wizard.CardSleeveDetailWindow",
|
||||
"Wizard.ClassSkinDetailWindow",
|
||||
"Wizard.OptionSettingWindow",
|
||||
"Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase.BuildDeckDetailWindow",
|
||||
};
|
||||
|
||||
[TestCaseSource(nameof(DeletedFqns))]
|
||||
public void DeletedType_StaysDeleted(string fqn)
|
||||
{
|
||||
var asm = typeof(engine::BattleManagerBase).Assembly;
|
||||
Assert.That(asm.GetType(fqn), Is.Null,
|
||||
$"Type {fqn} was deleted in the engine shim cleanup (see plan Tasks 9-15) and must not be re-introduced.");
|
||||
}
|
||||
}
|
||||
72
SVSim.BattleEngine.Tests/Coverage/CoverageRecorder.cs
Normal file
72
SVSim.BattleEngine.Tests/Coverage/CoverageRecorder.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
extern alias engine;
|
||||
using System.Collections.Concurrent;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace SVSim.BattleEngine.Tests.Coverage;
|
||||
|
||||
/// <summary>Harmony-prefix-based method-invocation logger over SVSim.BattleEngine.dll.
|
||||
/// Idempotent: Install is safe to call from every fixture's [OneTimeSetUp]; only the first
|
||||
/// call patches.</summary>
|
||||
public static class CoverageRecorder
|
||||
{
|
||||
private static readonly ConcurrentDictionary<string, byte> _hit = new();
|
||||
private static readonly Harmony _h = new("svsim.engine.coverage");
|
||||
private static bool _installed;
|
||||
private static readonly object _gate = new();
|
||||
|
||||
public static int HitCount => _hit.Count;
|
||||
|
||||
public static void Reset() => _hit.Clear();
|
||||
|
||||
public static void Install()
|
||||
{
|
||||
lock (_gate)
|
||||
{
|
||||
if (_installed) return;
|
||||
_installed = true;
|
||||
}
|
||||
|
||||
var asm = typeof(engine::BattleManagerBase).Assembly;
|
||||
var prefix = AccessTools.Method(typeof(CoverageRecorder), nameof(Hit));
|
||||
var hm = new HarmonyMethod(prefix);
|
||||
|
||||
foreach (var t in asm.GetTypes())
|
||||
{
|
||||
var ns = t.FullName ?? string.Empty;
|
||||
// Only engine + shim types — skip framework/3rd-party that happens to be co-located.
|
||||
if (!ns.StartsWith("SVSim.BattleEngine.") &&
|
||||
!ns.StartsWith("Wizard.") &&
|
||||
!ns.StartsWith("Cute.") &&
|
||||
!ns.StartsWith("Toolbox.") &&
|
||||
!ns.StartsWith("UnityEngine.")) continue;
|
||||
if (t.IsGenericTypeDefinition) continue;
|
||||
|
||||
var members = t.GetMethods(BindingFlags.Instance | BindingFlags.Static |
|
||||
BindingFlags.Public | BindingFlags.NonPublic |
|
||||
BindingFlags.DeclaredOnly);
|
||||
foreach (var m in members)
|
||||
{
|
||||
if (m.IsAbstract) continue;
|
||||
if (m.ContainsGenericParameters) continue;
|
||||
if (m.GetMethodBody() is null) continue;
|
||||
try { _h.Patch(m, prefix: hm); } catch { /* generic/inlined; skipped */ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Dump(string path)
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
|
||||
File.WriteAllLines(path, _hit.Keys.OrderBy(k => k));
|
||||
}
|
||||
|
||||
private static void Hit(MethodBase __originalMethod)
|
||||
{
|
||||
var t = __originalMethod.DeclaringType;
|
||||
if (t is null) return;
|
||||
_hit.TryAdd($"{t.FullName}.{__originalMethod.Name}", 0);
|
||||
}
|
||||
}
|
||||
42
SVSim.BattleEngine.Tests/Coverage/CoverageRecorderTests.cs
Normal file
42
SVSim.BattleEngine.Tests/Coverage/CoverageRecorderTests.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
extern alias engine;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using SVSim.BattleEngine.Tests.Coverage;
|
||||
|
||||
namespace SVSim.BattleEngine.Tests.Coverage;
|
||||
|
||||
[TestFixture, NonParallelizable]
|
||||
public class CoverageRecorderTests
|
||||
{
|
||||
[SetUp] public void SetUp() => CoverageRecorder.Reset();
|
||||
|
||||
[Test]
|
||||
public void Install_RecordsAtLeastOneHit_AfterCallingAnEngineType()
|
||||
{
|
||||
CoverageRecorder.Install();
|
||||
// Phase-5 chunk 47: was `BattleAmbient.Current` (deleted). Call any engine-type method
|
||||
// with a body so the Harmony prefix records a hit; Certification.ViewerId's getter is a
|
||||
// small non-inlined engine method that still ships (façade retained; consumers all read
|
||||
// per-mgr now).
|
||||
var _ = engine::Cute.Certification.ViewerId;
|
||||
Assert.That(CoverageRecorder.HitCount, Is.GreaterThan(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Dump_WritesSortedFqns_OneLineEach()
|
||||
{
|
||||
CoverageRecorder.Install();
|
||||
// Phase-5 chunk 47: was `BattleAmbient.Current` (deleted). Call any engine-type method
|
||||
// with a body so the Harmony prefix records a hit; Certification.ViewerId's getter is a
|
||||
// small non-inlined engine method that still ships (façade retained; consumers all read
|
||||
// per-mgr now).
|
||||
var _ = engine::Cute.Certification.ViewerId;
|
||||
var path = Path.Combine(Path.GetTempPath(), "coverage-recorder-test.txt");
|
||||
CoverageRecorder.Dump(path);
|
||||
var lines = File.ReadAllLines(path).ToList();
|
||||
Assert.That(lines, Is.Not.Empty);
|
||||
Assert.That(lines, Is.Ordered);
|
||||
Assert.That(lines.All(l => l.Contains(".")), Is.True);
|
||||
}
|
||||
}
|
||||
37
SVSim.BattleEngine.Tests/Coverage/CoverageSetUpFixture.cs
Normal file
37
SVSim.BattleEngine.Tests/Coverage/CoverageSetUpFixture.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using NUnit.Framework;
|
||||
using SVSim.BattleEngine.Tests.Coverage;
|
||||
|
||||
namespace SVSim.BattleEngine.Tests;
|
||||
|
||||
/// <summary>Assembly-level NUnit fixture. When SVSIM_COVERAGE=1, installs
|
||||
/// CoverageRecorder before any test runs and dumps the recorded FQNs after
|
||||
/// the assembly finishes. Outside SVSIM_COVERAGE=1, this fixture is a no-op
|
||||
/// — production test runs are unaffected.</summary>
|
||||
[SetUpFixture]
|
||||
public class CoverageSetUpFixture
|
||||
{
|
||||
public static bool IsEnabled =>
|
||||
Environment.GetEnvironmentVariable("SVSIM_COVERAGE") == "1";
|
||||
|
||||
public static string DumpPath =>
|
||||
Path.Combine(TestContext.CurrentContext.TestDirectory,
|
||||
"..", "..", "..", "obj", "coverage",
|
||||
"SVSim.BattleEngine.Tests.live.txt");
|
||||
|
||||
[OneTimeSetUp]
|
||||
public void OneTimeSetUp()
|
||||
{
|
||||
if (!IsEnabled) return;
|
||||
CoverageRecorder.Install();
|
||||
}
|
||||
|
||||
[OneTimeTearDown]
|
||||
public void OneTimeTearDown()
|
||||
{
|
||||
if (!IsEnabled) return;
|
||||
CoverageRecorder.Dump(DumpPath);
|
||||
TestContext.Progress.WriteLine($"[coverage] dumped {CoverageRecorder.HitCount} FQNs to {DumpPath}");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using NUnit.Framework;
|
||||
using SVSim.BattleEngine.Tests;
|
||||
|
||||
namespace SVSim.BattleEngine.Tests.Coverage;
|
||||
|
||||
[TestFixture]
|
||||
public class CoverageSetUpFixtureTests
|
||||
{
|
||||
[Test]
|
||||
public void DumpPath_IsObjCoverageBattleEngineLiveTxt()
|
||||
{
|
||||
Assert.That(
|
||||
CoverageSetUpFixture.DumpPath,
|
||||
Does.EndWith("obj/coverage/SVSim.BattleEngine.Tests.live.txt")
|
||||
.Or.EndWith(@"obj\coverage\SVSim.BattleEngine.Tests.live.txt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsEnabled_ReflectsEnvVar()
|
||||
{
|
||||
var prior = System.Environment.GetEnvironmentVariable("SVSIM_COVERAGE");
|
||||
try
|
||||
{
|
||||
System.Environment.SetEnvironmentVariable("SVSIM_COVERAGE", "1");
|
||||
Assert.That(CoverageSetUpFixture.IsEnabled, Is.True);
|
||||
System.Environment.SetEnvironmentVariable("SVSIM_COVERAGE", null);
|
||||
Assert.That(CoverageSetUpFixture.IsEnabled, Is.False);
|
||||
}
|
||||
finally
|
||||
{
|
||||
System.Environment.SetEnvironmentVariable("SVSIM_COVERAGE", prior);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,10 +21,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class DrawSpellOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -39,8 +37,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -33,10 +33,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class DynamicValueSpellOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -51,8 +49,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -12,10 +12,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class EmitPathReadOracleTests : NetworkEmitFixtureBase
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
// The process-global reset (IsForecast=true + clear injected agent) now lives in the shared
|
||||
// NetworkEmitFixtureBase.ResetNetworkEmitGlobals [TearDown], inherited here — see that file
|
||||
@@ -25,7 +23,6 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
|
||||
@@ -58,7 +55,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
// 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 agent = mgr.InstanceNetworkAgent; // Phase-5 chunk 41: was 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");
|
||||
|
||||
@@ -14,10 +14,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class FixedDamageSpellOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
// The spell's sole skill is `damage=3` to the enemy leader (cards.json skill_option for 900124030).
|
||||
private const int ExpectedLeaderDamage = 3;
|
||||
@@ -35,8 +33,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -39,10 +39,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
// 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; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -63,8 +61,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -175,10 +175,11 @@ namespace SVSim.BattleEngine.Tests
|
||||
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).
|
||||
// seed Certification.udid. Per-battle/per-test state (chara ids on the DataMgr,
|
||||
// NetworkUserInfoData) is seeded on the mgr's own GameMgr via NewSeededSingleBattleMgr /
|
||||
// NewSeededHeadlessBattleMgr / NewSeededHeadlessNetworkBattleMgr in the fixture entry points
|
||||
// — no shared state to race here. Thread-safe (assembly-level Parallelizable(Fixtures) means
|
||||
// many fixtures' [SetUp] race this one function).
|
||||
public static void EnsureProcessGlobals()
|
||||
{
|
||||
if (_done) return;
|
||||
@@ -233,39 +234,57 @@ namespace SVSim.BattleEngine.Tests
|
||||
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()
|
||||
// Per-GameMgr chara-id seeder. Fixtures construct a GameMgr up-front and pass it to the
|
||||
// mgr ctor (chunk-45 overload); this stamps the player/enemy leader chara ids on its DataMgr.
|
||||
// Set the backing fields directly: the public SetPlayerCharaId() also pulls MyRotation /
|
||||
// AvatarBattle info (more null statics) the resolution path doesn't need.
|
||||
public static void SeedCharaIds(GameMgr gm)
|
||||
{
|
||||
// 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();
|
||||
var dm = gm.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()
|
||||
// Per-GameMgr net-user seeder. NetworkBattleManagerBase.CreateBackgroundId reads
|
||||
// gm.GetNetworkUserInfoData().GetFieldId() when the RecoveryManager yields no bg id; the bare
|
||||
// ctor path leaves _netUser null (no lazy init). Seed a no-op instance whose _selfInfo carries
|
||||
// fieldId=1 (== ForestField, valid). Only satisfies the bg lookup — no game-state effect.
|
||||
public static void SeedNetUser(GameMgr gm)
|
||||
{
|
||||
// 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<string, object> { ["fieldId"] = 1 },
|
||||
isWatchReplayRecovery: false);
|
||||
GameMgr.GetIns().SetNetworkUserInfoData(netUser);
|
||||
gm.SetNetworkUserInfoData(netUser);
|
||||
}
|
||||
|
||||
// Phase-5 chunk 46: canonical seeded SingleBattleMgr factory. Replaces the historical
|
||||
// `new SingleBattleMgr(new HeadlessContentsCreator())` pattern from every oracle test,
|
||||
// which relied on the ambient bridge to reach a chara-id/net-user-seeded GameMgr. Now the
|
||||
// GameMgr is built + seeded here and passed to the mgr's chunk-45 ctor overload directly.
|
||||
public static SingleBattleMgr NewSeededSingleBattleMgr()
|
||||
{
|
||||
var gm = new GameMgr();
|
||||
SeedCharaIds(gm);
|
||||
SeedNetUser(gm);
|
||||
return new SingleBattleMgr(new HeadlessContentsCreator(), gm);
|
||||
}
|
||||
|
||||
// Same idea for the RNG-injectable HeadlessBattleMgr / HeadlessNetworkBattleMgr twins.
|
||||
public static HeadlessBattleMgr NewSeededHeadlessBattleMgr(IRandomSource rng = null)
|
||||
{
|
||||
var gm = new GameMgr();
|
||||
SeedCharaIds(gm);
|
||||
SeedNetUser(gm);
|
||||
return new HeadlessBattleMgr(new HeadlessContentsCreator(), rng, gm);
|
||||
}
|
||||
|
||||
public static HeadlessNetworkBattleMgr NewSeededHeadlessNetworkBattleMgr(IRandomSource rng = null)
|
||||
{
|
||||
var gm = new GameMgr();
|
||||
SeedCharaIds(gm);
|
||||
SeedNetUser(gm);
|
||||
return new HeadlessNetworkBattleMgr(new HeadlessContentsCreator(), rng, gm);
|
||||
}
|
||||
|
||||
// Seed each leader's starting life on a freshly-constructed mgr. The engine does this in
|
||||
@@ -376,8 +395,16 @@ namespace SVSim.BattleEngine.Tests
|
||||
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);
|
||||
// Phase-5 chunk 45: build a pre-seeded GameMgr and hand it to the mgr ctor, bypassing
|
||||
// the ambient bridge. The base ctor's BattlePlayer construction reads chara-id/net-user
|
||||
// through GameMgr.GetIns() (which routes to mgr.GameMgr once base ctor runs), so the
|
||||
// GameMgr must be seeded BEFORE the mgr ctor completes.
|
||||
var gm = new GameMgr();
|
||||
SeedCharaIds(gm);
|
||||
SeedNetUser(gm);
|
||||
var mgr = new HeadlessBattleMgr(new HeadlessContentsCreator(), rng, gm);
|
||||
// Phase-5 chunk 42: write InstanceIsRandomDraw directly (mgr not yet ambient-attached).
|
||||
mgr.InstanceIsRandomDraw = true; // the second RNG gate (F-RNG-2)
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
@@ -401,7 +428,11 @@ namespace SVSim.BattleEngine.Tests
|
||||
NewNetworkEmitBattle(IRandomSource rng = null)
|
||||
{
|
||||
EnsureProcessGlobals(); // sets IsForecast = true among other globals
|
||||
var mgr = new HeadlessNetworkBattleMgr(new HeadlessContentsCreator(), rng);
|
||||
// Phase-5 chunk 45: build + seed a per-mgr GameMgr up-front (no ambient bridge).
|
||||
var gm = new GameMgr();
|
||||
SeedCharaIds(gm);
|
||||
SeedNetUser(gm);
|
||||
var mgr = new HeadlessNetworkBattleMgr(new HeadlessContentsCreator(), rng, gm);
|
||||
// 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
|
||||
@@ -419,7 +450,10 @@ namespace SVSim.BattleEngine.Tests
|
||||
// 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;
|
||||
// Phase-5 chunk 42: mgr isn't yet attached to the ambient at this point (_scope.Ctx.Mgr
|
||||
// is set by the caller after this fixture returns), so BattleManagerBase.IsForecast=false
|
||||
// would silently no-op (ambient bridge is gone). Write InstanceIsForecast directly.
|
||||
mgr.InstanceIsForecast = false;
|
||||
var player = mgr.BattlePlayer;
|
||||
var enemy = mgr.BattleEnemy;
|
||||
SetField(player, "_opponentBattlePlayer", enemy);
|
||||
@@ -447,28 +481,17 @@ namespace SVSim.BattleEngine.Tests
|
||||
// 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)));
|
||||
// The engine RTA is a pass-7 stub with no-op method bodies. AddActionSequence /
|
||||
// EmitMsgPack / OnEmit-plumbing were dropped; the historical Gungnir + _notEmit seeds
|
||||
// are no longer needed. NetworkLogger stays as a NetworkNullLogger since it's a
|
||||
// typed property (INetworkLogger<NetworkLog>) that some tests may still inspect.
|
||||
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<NetworkBattleDefine.NetworkBattleURI>();
|
||||
agent.OnEmit += uri => emitted.Add(uri);
|
||||
Wizard.ToolboxGame.SetRealTimeNetworkBattle(agent);
|
||||
// Phase-5 chunk 40: ambient fallback removed from ToolboxGame.SetRealTimeNetworkBattle;
|
||||
// fixture has mgr in scope, so seed it directly instead of via the ambient-routed static.
|
||||
mgr.InstanceNetworkAgent = agent;
|
||||
|
||||
return (mgr, emitted);
|
||||
}
|
||||
|
||||
@@ -26,10 +26,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class LethalDamageSpellOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -44,8 +42,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using NUnit.Framework;
|
||||
using SVSim.BattleEngine.Ambient;
|
||||
using SVSim.BattleNode.Sessions.Engine;
|
||||
|
||||
namespace SVSim.BattleEngine.Tests;
|
||||
|
||||
/// <summary>The forcing-function tests for the multi-instancing migration (Task 8). Each engine
|
||||
/// instance carries its OWN <see cref="BattleAmbientContext"/> 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).</summary>
|
||||
/// <summary>Forcing-function tests for the multi-instancing migration. After the chunk-46/47
|
||||
/// ambient rip, per-battle mutable state (IsForecast/IsRandomDraw/RecoveryInfo/ViewerId/
|
||||
/// NetworkAgent + GameMgr) lives on the mgr instance itself; there is no ambient at all,
|
||||
/// no "current mgr / current GameMgr" static gate. Two engines on two tasks resolve
|
||||
/// independently because their mgrs are different objects, full stop — this fixture pins
|
||||
/// parallel-equals-sequential to catch any residual contamination through the not-yet-culled
|
||||
/// static accumulators (Wizard.LocalLog trace SB, Unity Resources cache — both already
|
||||
/// thread-safe).</summary>
|
||||
[TestFixture, Parallelizable(ParallelScope.All)]
|
||||
public class MultiInstanceEngineTests
|
||||
{
|
||||
@@ -34,13 +34,9 @@ public class MultiInstanceEngineTests
|
||||
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.
|
||||
// Pin the engines' post-Setup state to concrete starting values. Both engines must
|
||||
// report the SAME starting state regardless of distinct masterSeeds, which is the
|
||||
// cross-contamination property under test.
|
||||
Assert.That(engineA.LeaderLife(true), Is.EqualTo(20));
|
||||
Assert.That(engineB.LeaderLife(true), Is.EqualTo(20));
|
||||
Assert.That(engineA.Pp(true), Is.EqualTo(0));
|
||||
@@ -56,13 +52,6 @@ public class MultiInstanceEngineTests
|
||||
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();
|
||||
@@ -84,10 +73,12 @@ public class MultiInstanceEngineTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GameMgr_GetIns_WithoutScope_Throws()
|
||||
public void BattleManagerBase_GetIns_Always_Null()
|
||||
{
|
||||
Assert.That(BattleAmbient.Current, Is.Null);
|
||||
Assert.Throws<System.InvalidOperationException>(() => GameMgr.GetIns());
|
||||
// Post-chunk-46 ambient rip: GetIns() has no scope-based mechanism; every engine consumer
|
||||
// was converted to per-mgr instance reads, and the residual static returns null so its
|
||||
// ?. cascade landing in the 3 façades / IsForecast+IsRandomDraw returns their defaults.
|
||||
Assert.That(BattleManagerBase.GetIns(), Is.Null);
|
||||
}
|
||||
|
||||
private static void DriveBasicTurns(SessionBattleEngine e)
|
||||
|
||||
@@ -3,16 +3,17 @@ 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
|
||||
// Post-Phase-5a: still 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 long-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.
|
||||
// As of Phase 5a IsForecast/RealTimeNetworkAgent live on the mgr instance (authoritative)
|
||||
// with the per-test BattleAmbientContext as bridge fallback: scope Dispose drops the ctx and
|
||||
// the next fixture's new TestBattleScope starts a fresh ctx with IsForecast=true and a null
|
||||
// NetworkAgent — exactly the EnsureInitialized invariant the old TearDown restored.
|
||||
//
|
||||
// Kept as a marker base class so derived fixtures don't churn; can be deleted in Task 9.
|
||||
// Kept as a marker base class so derived fixtures don't churn; deleteable once every
|
||||
// fixture stops touching the ambient (Phase 5b + ambient rip).
|
||||
public abstract class NetworkEmitFixtureBase
|
||||
{
|
||||
}
|
||||
|
||||
@@ -11,18 +11,15 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class NetworkMgrConstructionProbeTests : NetworkEmitFixtureBase
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
[Test]
|
||||
public void HeadlessNetworkBattleMgr_constructs_headless()
|
||||
{
|
||||
Assert.DoesNotThrow(() =>
|
||||
{
|
||||
var mgr = new HeadlessNetworkBattleMgr(new HeadlessContentsCreator());
|
||||
_scope.Ctx.Mgr = mgr;
|
||||
var mgr = HeadlessEngineEnv.NewSeededHeadlessNetworkBattleMgr();
|
||||
Assert.That(mgr, Is.Not.Null);
|
||||
});
|
||||
}
|
||||
@@ -31,10 +28,9 @@ namespace SVSim.BattleEngine.Tests
|
||||
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(mgr.InstanceNetworkAgent, Is.Not.Null,
|
||||
"agent must be injected so NetworkBattleSender's _battleMgr.InstanceNetworkAgent.* calls resolve");
|
||||
Assert.That(emitted, Is.Empty, "no emit yet — only the seam is wired");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,20 +16,16 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class RandomDrawOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
[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.)
|
||||
// NewAuthoritativeBattle sets BattleManagerBase.IsRandomDraw = true on the mgr; the static
|
||||
// setter now no-ops without a mgr in scope (Phase-5 chunk 46), so this reset became a
|
||||
// per-mgr concern rather than a global fixture-hygiene one. Kept for symmetry.
|
||||
BattleManagerBase.IsRandomDraw = false;
|
||||
_scope?.Dispose();
|
||||
_scope = null;
|
||||
}
|
||||
|
||||
// Draw with a single scripted unit; return (drawnCardId, deckCountAfter). The deck is seeded with
|
||||
@@ -38,7 +34,6 @@ namespace SVSim.BattleEngine.Tests
|
||||
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);
|
||||
|
||||
@@ -9,10 +9,8 @@ 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; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
// RandomSourceBridge.Range must mirror the engine's exact roll arithmetic:
|
||||
// BattleManagerBase.StableRandom does `(int)Math.Floor((double)val * unit)`.
|
||||
@@ -72,8 +70,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
// 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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededHeadlessBattleMgr(src);
|
||||
|
||||
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");
|
||||
@@ -91,8 +88,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
{
|
||||
BattleManagerBase.IsForecast = true;
|
||||
|
||||
var mgr = new HeadlessBattleMgr(new HeadlessContentsCreator()); // default SeededRandomSource(12345)
|
||||
_scope.Ctx.Mgr = mgr;
|
||||
var mgr = HeadlessEngineEnv.NewSeededHeadlessBattleMgr(); // default SeededRandomSource(12345)
|
||||
var reference = new System.Random(12345);
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
|
||||
@@ -13,13 +13,18 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lib.Harmony" Version="2.3.3" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SVSim.BattleEngine\SVSim.BattleEngine.csproj" />
|
||||
<ProjectReference Include="..\SVSim.BattleEngine\SVSim.BattleEngine.csproj">
|
||||
<!-- Expose as both the default 'global' alias (existing tests) and 'engine'
|
||||
(CoverageRecorder / future coverage fixtures that need explicit disambiguation). -->
|
||||
<Aliases>global,engine</Aliases>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SVSim.BattleNode\SVSim.BattleNode.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
54
SVSim.BattleEngine.Tests/SequentialBattleTests.cs
Normal file
54
SVSim.BattleEngine.Tests/SequentialBattleTests.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
#nullable enable
|
||||
using NUnit.Framework;
|
||||
using SVSim.BattleNode.Sessions.Engine;
|
||||
|
||||
namespace SVSim.BattleEngine.Tests;
|
||||
|
||||
/// <summary>Confirms that constructing engine B after engine A has finished does not inherit
|
||||
/// any leftover ambient/static state from engine A. Catches the static-not-cleared family of
|
||||
/// bugs that the multi-instance Task.Run tests don't exercise (their scopes never overlap
|
||||
/// AsyncLocal flow). Backstop for engine shim cleanup Task 5.</summary>
|
||||
[TestFixture, NonParallelizable]
|
||||
public class SequentialBattleTests
|
||||
{
|
||||
[OneTimeSetUp]
|
||||
public void OneTimeSetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
[Test]
|
||||
public void Sequential_SecondBattle_StartsCleanAfterFirstCompletes()
|
||||
{
|
||||
var engineA = new SessionBattleEngine();
|
||||
engineA.Setup(masterSeed: 333, HeadlessEngineEnv.SampleDeck(), HeadlessEngineEnv.SampleDeck(),
|
||||
seatAClass: 1, seatBClass: 2);
|
||||
_ = engineA.LeaderLife(true);
|
||||
_ = engineA.Pp(true);
|
||||
_ = engineA.HandCount(true);
|
||||
// Drop engineA. No explicit Dispose today; we rely on scope-exit semantics in SessionBattleEngine.
|
||||
|
||||
// Now construct engine B in the same AppDomain.
|
||||
var engineB = new SessionBattleEngine();
|
||||
engineB.Setup(masterSeed: 444, HeadlessEngineEnv.SampleDeck(), HeadlessEngineEnv.SampleDeck(),
|
||||
seatAClass: 3, seatBClass: 4);
|
||||
|
||||
Assert.That(engineB.LeaderLife(true), Is.EqualTo(20),
|
||||
"engineB starting life leaked from engineA — sequential static-state bug.");
|
||||
Assert.That(engineB.Pp(true), Is.EqualTo(0));
|
||||
Assert.That(engineB.HandCount(true), Is.EqualTo(0));
|
||||
|
||||
// Re-read engineA after engineB exists, to confirm engineB's setup didn't poison engineA's reads.
|
||||
Assert.That(engineA.LeaderLife(true), Is.EqualTo(20),
|
||||
"engineA reads changed after engineB.Setup — cross-contamination bug.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Sequential_ThirdBattle_AfterTwoCompletes_StillClean()
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
var e = new SessionBattleEngine();
|
||||
e.Setup(masterSeed: 500 + i, HeadlessEngineEnv.SampleDeck(), HeadlessEngineEnv.SampleDeck());
|
||||
Assert.That(e.LeaderLife(true), Is.EqualTo(20));
|
||||
Assert.That(e.Pp(true), Is.EqualTo(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,8 @@ 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; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
[Test]
|
||||
public void SessionBattleEngine_instantiates_and_is_not_ready_before_setup()
|
||||
|
||||
@@ -9,10 +9,8 @@ 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; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
// Frames that are transport/keepalive, not game actions — not ingested.
|
||||
private static readonly HashSet<string> SkipUris = new()
|
||||
|
||||
@@ -8,10 +8,8 @@ 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; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
[Test]
|
||||
public void EngineGlobalInit_makes_a_fresh_engine_ready()
|
||||
|
||||
@@ -18,10 +18,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class SummonTokenOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -36,8 +34,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -19,10 +19,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class TargetedDamageSpellOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -37,8 +35,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -21,10 +21,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class TargetedDestroySpellOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -39,8 +37,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using SVSim.BattleEngine.Ambient;
|
||||
|
||||
namespace SVSim.BattleEngine.Tests;
|
||||
|
||||
/// <summary>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 <see cref="BattleAmbientContext"/> (carrying a brand-new
|
||||
/// <see cref="GameMgr"/> so per-test mgr/DataMgr writes never bleed across tests), then
|
||||
/// runs the per-ambient seeders that <see cref="HeadlessEngineEnv.EnsureProcessGlobals"/>
|
||||
/// no longer does (chara ids on DataMgr, NetworkUserInfoData). Process-globals
|
||||
/// (card master, LoadDetail, Crossover, Certification.udid) come from
|
||||
/// <see cref="HeadlessEngineEnv.EnsureProcessGlobals"/> which runs once per process.
|
||||
///
|
||||
/// Public surface (vs. internal) so SVSim.UnitTests can reuse it via the same project
|
||||
/// reference in Task 7.</summary>
|
||||
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();
|
||||
}
|
||||
@@ -12,10 +12,8 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class VanillaFollowerOracleTests
|
||||
{
|
||||
private TestBattleScope _scope;
|
||||
|
||||
[SetUp] public void SetUpScope() { _scope = new TestBattleScope(); }
|
||||
[TearDown] public void TearDownScope() { _scope?.Dispose(); _scope = null; }
|
||||
[SetUp] public void SetUp() => HeadlessEngineEnv.EnsureProcessGlobals();
|
||||
|
||||
private static void SetPrivateField(object obj, string name, object value)
|
||||
{
|
||||
@@ -32,8 +30,7 @@ namespace SVSim.BattleEngine.Tests
|
||||
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;
|
||||
var mgr = HeadlessEngineEnv.NewSeededSingleBattleMgr();
|
||||
mgr.IsRecovery = true; // collapse wait delays to 0 (F1)
|
||||
|
||||
var player = mgr.BattlePlayer;
|
||||
|
||||
@@ -1562,10 +1562,8 @@ Wizard.Battle.Player.ClassCharacter\Player3dClassCharacter.cs Wizard.Battle.Play
|
||||
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
|
||||
@@ -1613,7 +1611,11 @@ Wizard.Battle.Touch/ITouchProcessor.cs Wizard.Battle.Touch/ITouchProcessor.cs 63
|
||||
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/NotEmptyNullVfx.cs Wizard.Battle.View.Vfx/NotEmptyNullVfx.cs fd471e4254bde6dded2c1447714e605a9889b97b01a834bc616585bcff738825 0
|
||||
Wizard.Battle.View.Vfx/NullCardVfxCreator.cs Wizard.Battle.View.Vfx/NullCardVfxCreator.cs bf8f34d27f41df0dc728c47f874465869649299a5195c2d616597d7a37c581f5 0
|
||||
Wizard.Battle.View.Vfx/NullVfxWithLoading.cs Wizard.Battle.View.Vfx/NullVfxWithLoading.cs c297c7c7e53fc9a41e46b5f52baa65f905bc51943d6a0fbe683a98fc0668b9b9 0
|
||||
Wizard.Battle.View.Vfx/VfxResultEventExtension.cs Wizard.Battle.View.Vfx/VfxResultEventExtension.cs e34ff65e9a0df76f24f17185b3a80ebab326f4e413bccc18f084efea9a4094ac 0
|
||||
Wizard.Battle.View/CardIconControl.cs Wizard.Battle.View/CardIconControl.cs affd5a289a04bc9f446f3e892403dd9cd560ee557de1e5cd743dcb031dab280c 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
|
||||
@@ -1634,7 +1636,6 @@ Wizard.Battle\PlayerInnerOptionsBuilder.cs Wizard.Battle\PlayerInnerOptionsBuild
|
||||
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
|
||||
@@ -1671,7 +1672,6 @@ Wizard.Lottery\LotteryLoadTaskData.cs Wizard.Lottery\LotteryLoadTaskData.cs 4c93
|
||||
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
|
||||
@@ -1698,12 +1698,10 @@ Wizard.Scripts.Network.Data.TaskData.Arena\FinishDetail.cs Wizard.Scripts.Networ
|
||||
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
|
||||
@@ -1747,7 +1745,6 @@ Wizard/AIAttackableCountSimulationUtility.cs Wizard/AIAttackableCountSimulationU
|
||||
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
|
||||
@@ -2512,7 +2509,6 @@ Wizard\CardSelectListConfirmPagerView.cs Wizard\CardSelectListConfirmPagerView.c
|
||||
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
|
||||
@@ -2564,7 +2560,6 @@ Wizard\ClassSelectionButton.cs Wizard\ClassSelectionButton.cs e54b6667dcf47f83bd
|
||||
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
|
||||
@@ -2945,7 +2940,6 @@ Wizard\NoneFormatBehavior.cs Wizard\NoneFormatBehavior.cs 885cfa3a6bc7896ecb67ca
|
||||
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
|
||||
@@ -3219,7 +3213,6 @@ Wizard\StoryNotification.cs Wizard\StoryNotification.cs 2031e97ce2caa711e695a8ca
|
||||
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
|
||||
@@ -3308,7 +3301,3 @@ WrapVariableContentsScrollBarSize.cs WrapVariableContentsScrollBarSize.cs 05c94e
|
||||
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
|
||||
|
||||
|
@@ -1,6 +0,0 @@
|
||||
public class AISendIntervalTrigger : SendIntervalTrigger
|
||||
{
|
||||
public override void SendDataCheck(NetworkBattleManagerBase networkBattleManager, NetworkBattleDefine.NetworkBattleURI sendUri)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -5,27 +5,6 @@ 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<UserMission> _missions;
|
||||
|
||||
|
||||
@@ -79,31 +79,14 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
[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");
|
||||
@@ -117,11 +100,6 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
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();
|
||||
@@ -129,14 +107,6 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
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);
|
||||
@@ -227,7 +197,7 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
component.onClick.Clear();
|
||||
component.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON);
|
||||
|
||||
OnRewardClick();
|
||||
}));
|
||||
}
|
||||
@@ -260,49 +230,6 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
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<Texture>(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<UIButton>();
|
||||
component.GetComponentInChildren<UILabel>().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;
|
||||
@@ -329,7 +256,7 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
component.onClick.Clear();
|
||||
component.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON);
|
||||
|
||||
OnQuestPointReceive(reward.Id, onRequestRewardPointCallBack);
|
||||
}));
|
||||
GetComponent<UISprite>().spriteName = string.Empty;
|
||||
@@ -378,7 +305,7 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
component.GetComponentInChildren<UILabel>().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);
|
||||
@@ -452,9 +379,7 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
|
||||
private bool SetMissionWait(UserMission mission)
|
||||
{
|
||||
MissionInfoTask missionInfoTask = GameMgr.GetIns().GetMissionInfoTask();
|
||||
long num = (long)Time.realtimeSinceStartup - missionInfoTask.RequestTime;
|
||||
long num2 = missionInfoTask.ServerTime + num;
|
||||
long num = 0L; long num2 = 0L; // Pre-Phase-5b: MissionInfoTask headless-unreachable
|
||||
TimeSpan timeSpan = TimeSpan.FromSeconds(mission.start_time - num2).Add(new TimeSpan(0, 1, 0));
|
||||
int num3 = timeSpan.Hours;
|
||||
int num4 = timeSpan.Minutes;
|
||||
@@ -495,7 +420,7 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
_labelMissionPeriod.gameObject.SetActive(value: false);
|
||||
return;
|
||||
}
|
||||
long nowUnixTime = GameMgr.GetIns().GetMissionInfoTask().NowUnixTime();
|
||||
long nowUnixTime = 0L; // Pre-Phase-5b: headless has no MissionInfoTask
|
||||
string remainingTime = ConvertTime.GetRemainingTime(TimeSpan.FromSeconds(mission.GetMissionPeriodSec(nowUnixTime)));
|
||||
goButtonReward.gameObject.SetActive(value: false);
|
||||
_labelMissionPeriod.gameObject.SetActive(value: true);
|
||||
@@ -531,26 +456,6 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
}, 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<int, int> OnReadMail, ResourceHandler handler)
|
||||
{
|
||||
_resourceHandler = handler;
|
||||
@@ -618,160 +523,4 @@ public class AchievementWindowBase : MonoBehaviour
|
||||
{
|
||||
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<UISprite>().width = 800;
|
||||
achievementIconTexture.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(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<UISprite>().width = 752;
|
||||
base.gameObject.GetComponent<UISprite>().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<Texture>(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<UISprite>().width = 752;
|
||||
base.gameObject.GetComponent<UISprite>().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<Texture>(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<Texture>(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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,16 +5,9 @@ using UnityEngine;
|
||||
[AddComponentMenu("NGUI/Internal/Active Animation")]
|
||||
public class ActiveAnimation : MonoBehaviour
|
||||
{
|
||||
public static ActiveAnimation current;
|
||||
|
||||
public List<EventDelegate> onFinished = new List<EventDelegate>();
|
||||
|
||||
[HideInInspector]
|
||||
public GameObject eventReceiver;
|
||||
|
||||
[HideInInspector]
|
||||
public string callWhenFinished;
|
||||
|
||||
private Animation mAnim;
|
||||
|
||||
private Direction mLastDirection;
|
||||
@@ -103,119 +96,6 @@ public class ActiveAnimation : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
@@ -308,16 +188,6 @@ public class ActiveAnimation : MonoBehaviour
|
||||
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))
|
||||
|
||||
@@ -52,15 +52,6 @@ public class AddTargetInfo
|
||||
_skillCreator.SetupSkillTargetOld(_targetFilter, _ownerCard, list2, skill);
|
||||
}
|
||||
|
||||
public List<BattleCardBase> GetAddTargetCard(SkillBase skill, BattlePlayerReadOnlyInfoPair pair, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue)
|
||||
{
|
||||
if (typeCheck(skill) && FilterComparison(skill.ApplyFilterCollection))
|
||||
{
|
||||
return _targetFilter.Filtering(pair, checkerOption, optionValue).Cast<BattleCardBase>().ToList();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Func<SkillBase, bool> SetTypeCheck(string skillType, string ownerCardType)
|
||||
{
|
||||
if (skillType != null && skillType == "damage")
|
||||
@@ -83,22 +74,6 @@ public class AddTargetInfo
|
||||
};
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -1,77 +1,15 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// Post-Phase-5b (2026-07-03) UI stub. Every override in the pre-cull file was
|
||||
// Unity-3D VFX/iTween/particle-system code driven by BattleCoroutine — never
|
||||
// invoked headless. The type stays because BattleManagerBase.CreateManager's
|
||||
// background-id switch instantiates it; inheriting BackGroundBase's no-op
|
||||
// default virtuals is correct headless behavior.
|
||||
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<AudioList>().GimicAudioList;
|
||||
_fieldModel = base.Field.transform.Find("md_bf_aley_root").gameObject;
|
||||
_fieldParticles = _fieldModel.transform.Find("Particles22").gameObject;
|
||||
List<string> list = new List<string>(_fieldObjDictionary.Keys);
|
||||
List<GameObject> list2 = new List<GameObject>();
|
||||
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<SetShaderGlobalColorBG>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ public class ApiType
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
SignUp,
|
||||
Load,
|
||||
GetCardMaster,
|
||||
Mypage,
|
||||
@@ -62,7 +61,6 @@ public class ApiType
|
||||
LimitedStoryFinish,
|
||||
LimitedStorySection,
|
||||
LimitedStoryLeaderSelect,
|
||||
LimitedStoryGetDeckList,
|
||||
EventStorySection,
|
||||
EventStoryLeaderSelect,
|
||||
EventStoryInfo,
|
||||
@@ -134,7 +132,6 @@ public class ApiType
|
||||
RankMatchFinishRotation,
|
||||
RankMatchFinishUnlimited,
|
||||
RankMatchFinishCrossover,
|
||||
FreeMatchSetParam,
|
||||
FreeMatchFinishRotation,
|
||||
FreeMatchFinishUnlimited,
|
||||
FreeMatchFinishPreRotation,
|
||||
@@ -260,7 +257,6 @@ public class ApiType
|
||||
OpenRoomMultiGetHistory,
|
||||
EventRoomMultiDeckSet,
|
||||
EventRoomMultiResetHistory,
|
||||
EventRoomRetire,
|
||||
OpenRoomMultiDeckBanDecideBan,
|
||||
OpenRoomGetDeckHof,
|
||||
OpenRoomSetDeckHof,
|
||||
@@ -391,11 +387,6 @@ public class ApiType
|
||||
DebugReleaseClassChara,
|
||||
DebugAddBattlePoint,
|
||||
DebugTutorialUpdate,
|
||||
PaymentItemList,
|
||||
PaymentStart,
|
||||
PaymentCancel,
|
||||
PaymentFinish,
|
||||
BirthUpdate,
|
||||
EmblemInfo,
|
||||
EmblemUpdate,
|
||||
EmblemFavorite,
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ApplySkillTargetFilterCollection : SkillFilterCollectionBase
|
||||
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))
|
||||
if (false /* Pre-Phase-5b: XorShiftRandom is a mgr-instance feature; guard collapses to false */)
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class AreaBGInfo : MonoBehaviour
|
||||
SectionId = 2,
|
||||
ExtraTextureChapter = 10,
|
||||
BGExtraEffectPath = "scn_map_change_1",
|
||||
SeType = Se.TYPE.SE_MAP_TREE_EFFECT
|
||||
SeType = 0
|
||||
},
|
||||
new ChapterExtraData
|
||||
{
|
||||
@@ -31,7 +31,7 @@ public class AreaBGInfo : MonoBehaviour
|
||||
SectionId = 1,
|
||||
ExtraTextureChapter = 4,
|
||||
BGExtraEffectPath = "scn_map_change_1",
|
||||
SeType = Se.TYPE.SE_MAP_TREE_EFFECT,
|
||||
SeType = 0,
|
||||
ClanType = CardBasePrm.ClanType.NEMESIS
|
||||
},
|
||||
new ChapterExtraData
|
||||
@@ -57,8 +57,8 @@ public class AreaBGInfo : MonoBehaviour
|
||||
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,
|
||||
FirstClearSeType = 0,
|
||||
SeType = 0,
|
||||
ChapterMoveTime = 0f,
|
||||
FirstClearEffectDelayTime = 1.2f,
|
||||
FirstClearMoveOutDelayTime = 0.5f
|
||||
@@ -70,8 +70,8 @@ public class AreaBGInfo : MonoBehaviour
|
||||
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,
|
||||
FirstClearSeType = 0,
|
||||
SeType = 0,
|
||||
FirstClearEffectDelayTime = 1.2f,
|
||||
FirstClearMoveDelayTime = 1f
|
||||
},
|
||||
|
||||
@@ -3,37 +3,6 @@ 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<ChapterExtraData> GetChapterExtraDatas()
|
||||
{
|
||||
@@ -62,7 +31,7 @@ public class AreaBGInfoSection20
|
||||
if (i == 17 || i == 25 || i == 33)
|
||||
{
|
||||
chapterExtraData.BGExtraEffectPath = "scn_map_change_9";
|
||||
chapterExtraData.SeType = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER;
|
||||
chapterExtraData.SeType = 0;
|
||||
}
|
||||
if (extraTextureIndex.IsNotNullOrEmpty())
|
||||
{
|
||||
@@ -83,7 +52,7 @@ public class AreaBGInfoSection20
|
||||
SectionId = 20,
|
||||
ExtraTextureChapter = 1,
|
||||
BGExtraEffectPath = "scn_map_change_9",
|
||||
SeType = Se.TYPE.SE_MAP_SECTION20_CHANGE_CHAPTER1
|
||||
SeType = 0
|
||||
},
|
||||
new ChapterExtraData
|
||||
{
|
||||
@@ -91,7 +60,7 @@ public class AreaBGInfoSection20
|
||||
ExtraTextureChapter = 2,
|
||||
BGExtraEffectPath = "scn_map_change_8",
|
||||
AttachExtraEffectToBgRoot = true,
|
||||
SeType = Se.TYPE.SE_MAP_TREE_EFFECT
|
||||
SeType = 0
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -112,7 +81,7 @@ public class AreaBGInfoSection20
|
||||
if (i == 9)
|
||||
{
|
||||
chapterExtraData.BGExtraEffectPath = "scn_map_change_9";
|
||||
chapterExtraData.SeType = Se.TYPE.SE_MAP_SECTION9_CHANGE_CHAPTER;
|
||||
chapterExtraData.SeType = 0;
|
||||
}
|
||||
list.Add(chapterExtraData);
|
||||
}
|
||||
|
||||
@@ -8,24 +8,10 @@ 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" };
|
||||
@@ -34,12 +20,6 @@ public class AreaSelInfo : MonoBehaviour
|
||||
|
||||
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<UserGoods.Type, float> REWARD_BG_OFFSET_MAGNIFICATION = new Dictionary<UserGoods.Type, float>
|
||||
{
|
||||
{
|
||||
@@ -76,8 +56,6 @@ public class AreaSelInfo : MonoBehaviour
|
||||
}
|
||||
};
|
||||
|
||||
private const float LABEL_ONLY_DEGREE_OFFSET_Y = -10f;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _clearRewardPrefab;
|
||||
|
||||
@@ -436,11 +414,6 @@ public class AreaSelInfo : MonoBehaviour
|
||||
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);
|
||||
@@ -503,7 +476,7 @@ public class AreaSelInfo : MonoBehaviour
|
||||
}
|
||||
case UserGoods.Type.Skin:
|
||||
{
|
||||
ClassCharacterMasterData charaPrmByCharaId = GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId((int)userGoodsId);
|
||||
ClassCharacterMasterData charaPrmByCharaId = null; // Pre-Phase-5b: no chara master headless
|
||||
if (charaPrmByCharaId == null)
|
||||
{
|
||||
return string.Empty;
|
||||
|
||||
@@ -8,31 +8,6 @@ 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;
|
||||
|
||||
@@ -74,8 +49,6 @@ public class AreaSelectBG
|
||||
|
||||
private bool _isNormalBgSet = true;
|
||||
|
||||
private bool _changeChapterFirstCall = true;
|
||||
|
||||
private float _currentAspectRatio;
|
||||
|
||||
private Vector3 _currentBGScale = Vector3.one;
|
||||
@@ -145,11 +118,6 @@ public class AreaSelectBG
|
||||
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);
|
||||
@@ -275,8 +243,9 @@ public class AreaSelectBG
|
||||
extraChapter.ExtraEffect.transform.parent = _areaSelectUI.transform;
|
||||
}
|
||||
extraChapter.ExtraEffect.SetActive(value: false);
|
||||
List<string> collection = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(extraChapter.ExtraEffect, null);
|
||||
_loadedResources.AddRange(collection);
|
||||
// Pre-Phase-5b: GameMgr.GetEffectMgr().SetUIParticleShader queued the ExtraEffect
|
||||
// for shader-swap and returned load-time resource paths for cleanup. Headless has
|
||||
// no EffectMgr and no visible ExtraEffect; the resource tracker doesn't fire either.
|
||||
}
|
||||
if (!string.IsNullOrEmpty(extraChapter.BGFirstClearEffectPath))
|
||||
{
|
||||
@@ -284,15 +253,13 @@ public class AreaSelectBG
|
||||
extraChapter.FirstClearEffect = UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(assetTypePath2) as GameObject);
|
||||
extraChapter.FirstClearEffect.transform.parent = _areaSelectUI.transform;
|
||||
extraChapter.FirstClearEffect.SetActive(value: false);
|
||||
List<string> collection2 = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(extraChapter.FirstClearEffect, null);
|
||||
_loadedResources.AddRange(collection2);
|
||||
// Pre-Phase-5b: same shader-swap pattern for FirstClearEffect. See ExtraEffect above.
|
||||
}
|
||||
}
|
||||
List<string> collection3 = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list, delegate
|
||||
{
|
||||
_isLoadEndParticle = true;
|
||||
});
|
||||
_loadedResources.AddRange(collection3);
|
||||
// Pre-Phase-5b: shader-swap on the collected particle systems, then callback flipped the
|
||||
// `_isLoadEndParticle` flag. Headless has no EffectMgr; set the flag directly here so the
|
||||
// GetLoadEnd() gate is coherent.
|
||||
_isLoadEndParticle = true;
|
||||
_isLoadEndBGTexture = true;
|
||||
}
|
||||
|
||||
@@ -369,35 +336,6 @@ public class AreaSelectBG
|
||||
return source.Select((ChapterExtraData s) => s.ExtraTextureChapter).ToList();
|
||||
}
|
||||
|
||||
public void SetExtraEffect(int chapterId, bool isFirstClear = false)
|
||||
{
|
||||
if (_extraChapters.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
List<ChapterExtraData> list = new List<ChapterExtraData>();
|
||||
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);
|
||||
@@ -406,7 +344,7 @@ public class AreaSelectBG
|
||||
yield return new WaitForSeconds(clearChapterExtraData.FirstClearEffectDelayTime);
|
||||
clearChapterExtraData.FirstClearEffect.SetActive(value: false);
|
||||
clearChapterExtraData.FirstClearEffect.SetActive(value: true);
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(clearChapterExtraData.FirstClearSeType);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +79,9 @@ public class AreaSelectChapterEffect
|
||||
}
|
||||
}
|
||||
}
|
||||
_loadedResources.AddRange(GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list, delegate
|
||||
{
|
||||
_isLoadEnd = true;
|
||||
}));
|
||||
// Pre-Phase-5b: SetUIParticleShader queued shader swap + callback flipped _isLoadEnd.
|
||||
// Headless has no EffectMgr; flip the load-end flag inline.
|
||||
_isLoadEnd = true;
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,21 +2,14 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// Post-Phase-5b (2026-07-03) UI stub. AreaSelectMapIcon is chapter-select map
|
||||
// icon particle effects (Start/Stop of CMN_MAP_MAPICON_CLEARED etc.). Every
|
||||
// EffectMgr call is a Unity3D particle system launch that never fires headless.
|
||||
// AreaSelectUI holds a single instance and its methods are only invoked from
|
||||
// UI callbacks. Surface preserved as no-ops so AreaSelectUI still compiles.
|
||||
[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;
|
||||
|
||||
@@ -25,114 +18,41 @@ public class AreaSelectMapIcon
|
||||
|
||||
private List<UISprite> 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<StoryChapterData> chapterDataList)
|
||||
{
|
||||
if (MapIconList != null)
|
||||
{
|
||||
int i = 0;
|
||||
for (int count = MapIconList.Count; i < count; i++)
|
||||
{
|
||||
UnityEngine.Object.Destroy(MapIconList[i].gameObject);
|
||||
}
|
||||
}
|
||||
MapIconList = new List<UISprite>(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;
|
||||
return Vector3.zero;
|
||||
}
|
||||
|
||||
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;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,16 +28,6 @@ public class AreaSelectUI : UIBase
|
||||
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;
|
||||
@@ -60,32 +50,6 @@ public class AreaSelectUI : UIBase
|
||||
|
||||
private List<string> _loadEffectResources = new List<string>();
|
||||
|
||||
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);
|
||||
@@ -189,8 +153,6 @@ public class AreaSelectUI : UIBase
|
||||
|
||||
private bool _isBackTransitionStarted;
|
||||
|
||||
private IProcessing _firstSelectionProcessing;
|
||||
|
||||
private StoryChapterData _anotherEndingAppearanceAnimationChapterData;
|
||||
|
||||
private GameObject _anotherEndingAppearanceEffect;
|
||||
@@ -203,20 +165,6 @@ public class AreaSelectUI : UIBase
|
||||
|
||||
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;
|
||||
|
||||
@@ -461,7 +409,7 @@ public class AreaSelectUI : UIBase
|
||||
{
|
||||
_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;
|
||||
@@ -489,8 +437,8 @@ public class AreaSelectUI : UIBase
|
||||
{
|
||||
_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);
|
||||
// Pre-Phase-5b: fired CMN_MAP_CHAPTER_1 UI VFX. Dropped headless.
|
||||
|
||||
}
|
||||
IsNewMapIconOpened = true;
|
||||
}
|
||||
@@ -504,7 +452,7 @@ public class AreaSelectUI : UIBase
|
||||
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;
|
||||
}
|
||||
@@ -599,19 +547,19 @@ public class AreaSelectUI : UIBase
|
||||
|
||||
protected override void onClose()
|
||||
{
|
||||
GameMgr.GetIns().GetEffectMgr().StopBuff(EffectMgr.EffectType.CMN_MAP_PLAYERICON, PlayerIcon);
|
||||
// Pre-Phase-5b: StopBuff CMN_MAP_PLAYERICON. Dropped headless.
|
||||
_mapIcon.Term();
|
||||
_chapterEffect.UnLoadEffect();
|
||||
_chapterEffect.Term();
|
||||
StopEffectTap();
|
||||
if (LoadStatusTutorialEffect.Loaded == _loadStatusTutorialEffect)
|
||||
{
|
||||
GameMgr.GetIns().GetEffectMgr().DisposeLatestMadeEffects();
|
||||
// Pre-Phase-5b: DisposeLatestMadeEffects. Dropped headless.
|
||||
_loadStatusTutorialEffect = LoadStatusTutorialEffect.NotLoad;
|
||||
}
|
||||
Toolbox.ResourcesManager.RemoveAssetGroup(_resourcePathList);
|
||||
_resourcePathList.Clear();
|
||||
GameMgr.GetIns().GetSoundMgr().UnloadSe(CUESHEETNAME_MAP);
|
||||
|
||||
UnloadUnlockChapterResources();
|
||||
_BG.UnLoadBG();
|
||||
_BG.Term();
|
||||
@@ -631,7 +579,7 @@ public class AreaSelectUI : UIBase
|
||||
{
|
||||
if (chapterindex == _selectChapterIndex)
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE);
|
||||
|
||||
StopEffectTap();
|
||||
ExecuteSelectionProcessings();
|
||||
}
|
||||
@@ -666,7 +614,7 @@ public class AreaSelectUI : UIBase
|
||||
{
|
||||
if (chapterindex == _selectChapterIndex)
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE);
|
||||
|
||||
ExecuteSelectionProcessings();
|
||||
}
|
||||
else
|
||||
@@ -676,20 +624,12 @@ public class AreaSelectUI : UIBase
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
ChapterListTapEffect = null; // Pre-Phase-5b: StartBuff CMN_TUTORIAL_TAP_1. Dropped headless.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,7 +637,7 @@ public class AreaSelectUI : UIBase
|
||||
{
|
||||
if (!(null == ChapterListTapEffectLocator))
|
||||
{
|
||||
GameMgr.GetIns().GetEffectMgr().StopBuff(EffectMgr.EffectType.CMN_TUTORIAL_TAP_1, ChapterListTapEffectLocator);
|
||||
// Pre-Phase-5b: StopBuff CMN_TUTORIAL_TAP_1. Dropped headless.
|
||||
ChapterListTapEffectLocator = null;
|
||||
ChapterListTapEffect = null;
|
||||
}
|
||||
@@ -818,7 +758,7 @@ public class AreaSelectUI : UIBase
|
||||
_BG.SetBGDragEnable(!enable);
|
||||
if (isplayse)
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(enable ? Se.TYPE.SYS_TOGGLE_ON : Se.TYPE.SYS_TOGGLE_OFF);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -856,7 +796,6 @@ public class AreaSelectUI : UIBase
|
||||
_chapterEffect.Init(this, base.transform);
|
||||
SetPlayerIconVisible(isvisible: false);
|
||||
PlayerIcon.transform.localPosition = new Vector3(0f, -320f, 0f);
|
||||
_firstSelectionProcessing = CreateSelectionProcessings(SectionData.IsTutorialCategory);
|
||||
StartCoroutine(Setup());
|
||||
}
|
||||
|
||||
@@ -917,12 +856,11 @@ public class AreaSelectUI : UIBase
|
||||
if (IsUseChapterListTapEffect)
|
||||
{
|
||||
_loadStatusTutorialEffect = LoadStatusTutorialEffect.Loading;
|
||||
GameMgr.GetIns().GetEffectMgr().InitCommonEffect("Json/EffectTutorialData", isBattle: false, isField: false, isBattleEffect: false, delegate
|
||||
{
|
||||
_loadStatusTutorialEffect = LoadStatusTutorialEffect.Loaded;
|
||||
});
|
||||
// Pre-Phase-5b: async-loaded tutorial effect JSON via EffectMgr; callback flipped the
|
||||
// load-status flag. Headless has no EffectMgr; mark loaded synchronously so the
|
||||
// LoadStatusTutorialEffect state machine stays coherent.
|
||||
_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;
|
||||
@@ -1039,7 +977,7 @@ public class AreaSelectUI : UIBase
|
||||
_chapterRewardPanel.SetClearPresent(_selectChapterData);
|
||||
if (isplayse)
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SCROLL);
|
||||
|
||||
}
|
||||
if (iscalcscroll)
|
||||
{
|
||||
@@ -1125,30 +1063,6 @@ public class AreaSelectUI : UIBase
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
@@ -1211,11 +1125,11 @@ public class AreaSelectUI : UIBase
|
||||
{
|
||||
if (isvisible)
|
||||
{
|
||||
GameMgr.GetIns().GetEffectMgr().StartBuff(EffectMgr.EffectType.CMN_MAP_PLAYERICON, PlayerIcon);
|
||||
// Pre-Phase-5b: StartBuff CMN_MAP_PLAYERICON. Dropped headless.
|
||||
}
|
||||
else
|
||||
{
|
||||
GameMgr.GetIns().GetEffectMgr().StopBuff(EffectMgr.EffectType.CMN_MAP_PLAYERICON, PlayerIcon);
|
||||
// Pre-Phase-5b: StopBuff CMN_MAP_PLAYERICON. Dropped headless.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1260,43 +1174,8 @@ public class AreaSelectUI : UIBase
|
||||
SelectedStoryInfo.ClearInfoForChapterSelectionScene();
|
||||
}
|
||||
|
||||
private static IProcessing CreateSelectionProcessings(bool isTutorialCategory)
|
||||
private void ExecuteSelectionProcessings()
|
||||
{
|
||||
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()
|
||||
|
||||
@@ -2,11 +2,6 @@ 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);
|
||||
|
||||
|
||||
@@ -9,29 +9,17 @@ 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
|
||||
}
|
||||
|
||||
@@ -51,27 +39,10 @@ public class ArenaColosseum : ArenaEntryDataBase
|
||||
|
||||
public enum eDeckIndex
|
||||
{
|
||||
Main = 0,
|
||||
First = 0,
|
||||
Second = 1,
|
||||
Third = 2
|
||||
}
|
||||
First = 0 }
|
||||
|
||||
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
|
||||
@@ -80,8 +51,6 @@ public class ArenaColosseum : ArenaEntryDataBase
|
||||
|
||||
public CandidateCardInfo CandidateCard { get; set; }
|
||||
|
||||
public Deck DeckData { get; set; }
|
||||
|
||||
public CandidateChaos CandidateChaos { get; set; }
|
||||
}
|
||||
|
||||
@@ -97,8 +66,6 @@ public class ArenaColosseum : ArenaEntryDataBase
|
||||
|
||||
public bool CanUseNonPossessionCard;
|
||||
|
||||
public int DeckEntryId { get; set; }
|
||||
|
||||
public bool IsColosseumPeriod { get; set; }
|
||||
|
||||
public bool IsRoundPeriod { get; set; }
|
||||
@@ -131,32 +98,6 @@ public class ArenaColosseum : ArenaEntryDataBase
|
||||
|
||||
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
|
||||
@@ -196,10 +137,6 @@ public class ArenaColosseum : ArenaEntryDataBase
|
||||
|
||||
public int RetryRemainingNum { get; set; }
|
||||
|
||||
public int BattleMax { get; set; }
|
||||
|
||||
public int ClearWinNum { get; set; }
|
||||
|
||||
public bool IsDeckEntry { get; set; }
|
||||
|
||||
public bool IsFreeEntry
|
||||
@@ -220,10 +157,6 @@ public class ArenaColosseum : ArenaEntryDataBase
|
||||
|
||||
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; }
|
||||
@@ -236,26 +169,14 @@ public class ArenaColosseum : ArenaEntryDataBase
|
||||
|
||||
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<bool> BattleResultList { get; set; }
|
||||
|
||||
public List<int> BoxGradeList { get; set; }
|
||||
|
||||
public int FinalRoundEliminateCount { get; set; }
|
||||
|
||||
public TwoPick TwoPickData { get; set; }
|
||||
|
||||
public ArenaColosseum()
|
||||
@@ -273,70 +194,6 @@ public class ArenaColosseum : ArenaEntryDataBase
|
||||
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<ColosseumDetail>().Init(dialogBase);
|
||||
return dialogBase;
|
||||
}
|
||||
|
||||
public void ApiRuleParseAndSet(int apiRule)
|
||||
{
|
||||
ArenaColosseum colosseumData = Data.ArenaData.ColosseumData;
|
||||
|
||||
@@ -10,22 +10,16 @@ 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;
|
||||
@@ -197,10 +191,4 @@ public class ArenaCompetition : ArenaEntryDataBase
|
||||
}
|
||||
base.LootBoxType = PlayerStaticData.LootBoxType.COMPETITION;
|
||||
}
|
||||
|
||||
public void SetRestChallangeCountByEntry(JsonData responseData)
|
||||
{
|
||||
RestChallangeCount = responseData["rest_challenge_count"].ToInt();
|
||||
IsEntry = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,12 +5,7 @@ public class ArenaData : HeaderData
|
||||
{
|
||||
public enum eARENA_PAY
|
||||
{
|
||||
None = 0,
|
||||
Crystal = 1,
|
||||
Ticket = 3,
|
||||
Rupy = 4,
|
||||
Free = 5
|
||||
}
|
||||
None = 0 }
|
||||
|
||||
public ArenaTwoPickData TwoPickData { get; set; }
|
||||
|
||||
@@ -44,14 +39,6 @@ public class ArenaData : HeaderData
|
||||
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;
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
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<bool> _isJoinFunc;
|
||||
|
||||
protected Action _freeEntryFunc;
|
||||
|
||||
protected Action _freeBattleFunc;
|
||||
|
||||
protected Func<bool> _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<UIWidget>();
|
||||
_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<ArenaEntryDialogBase>().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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
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<ArenaEntryDialogData>();
|
||||
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<UIButton>().isEnabled = false;
|
||||
in_Label.color = LabelDefine.TEXT_COLOR_BUTTON_DISABLE;
|
||||
in_Button.GetComponent<TweenColor>().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<ArenaBuyDialog>();
|
||||
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<ArenaBuyDialog>();
|
||||
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<ArenaBuyDialog>();
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
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;
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
// Post-Phase-5b (2026-07-03) UI stub. Every override in the pre-cull file was
|
||||
// Unity-3D VFX/iTween/particle-system code driven by BattleCoroutine — never
|
||||
// invoked headless. The type stays because BattleManagerBase.CreateManager's
|
||||
// background-id switch instantiates it; inheriting BackGroundBase's no-op
|
||||
// default virtuals is correct headless behavior.
|
||||
public class ArenaField : BackGroundBase
|
||||
{
|
||||
public override int FieldId => 9;
|
||||
@@ -10,71 +11,4 @@ public class ArenaField : BackGroundBase
|
||||
: 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<AudioList>().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<ParticleSystem>());
|
||||
List<string> list = new List<string>(_fieldObjDictionary.Keys);
|
||||
List<GameObject> list2 = new List<GameObject>();
|
||||
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<SetShaderGlobalColorBG>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,204 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
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<ArenaResultAnimationAgent>();
|
||||
m_resultAnimationAgentIns.GetComponent<ArenaResultAnimationAgent>().SetBattleCamera(battleCamera);
|
||||
}
|
||||
|
||||
public void Destroy()
|
||||
{
|
||||
Object.Destroy(m_resultAnimationAgentObj);
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
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> UserAchievement => GetUserAchievementList();
|
||||
|
||||
public List<UserMission> UserMission => GetUserMissionList();
|
||||
|
||||
public List<ReceivedReward> MissionRewards => Data.ArenaBattleFinish.data._missionRewards;
|
||||
|
||||
public List<ReceivedReward> 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<UserAchievement> GetUserAchievementList()
|
||||
{
|
||||
return Data.ArenaBattleFinish.data.achieved_achievement_list;
|
||||
}
|
||||
|
||||
public List<UserMission> GetUserMissionList()
|
||||
{
|
||||
return Data.ArenaBattleFinish.data.achieved_mission_list;
|
||||
}
|
||||
|
||||
public int GetClassExp()
|
||||
{
|
||||
return Data.ArenaBattleFinish.data.get_class_chara_experience;
|
||||
}
|
||||
}
|
||||
@@ -5,113 +5,4 @@ public class ArrowControl : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject ArrowHead;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject ArrowEfc;
|
||||
|
||||
[SerializeField]
|
||||
private int DivideCnt = 10;
|
||||
|
||||
[SerializeField]
|
||||
private bool isEvo;
|
||||
|
||||
private IList<GameObject> ArrowEfcList;
|
||||
|
||||
private GameObject FromObj;
|
||||
|
||||
private GameObject ToObj;
|
||||
|
||||
private bool isOn;
|
||||
|
||||
private bool _isTargettingEnemy;
|
||||
|
||||
private float ChangeTime;
|
||||
|
||||
private IList<int> ArrowTarList;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
ArrowEfcList = new List<GameObject>();
|
||||
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<int>();
|
||||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,74 +3,6 @@ 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<Camera>();
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ using UnityEngine;
|
||||
|
||||
public class AspectCameraPerspective : MonoBehaviour
|
||||
{
|
||||
private Camera m_camera;
|
||||
|
||||
private bool m_isSetFOV;
|
||||
|
||||
@@ -10,35 +9,4 @@ public class AspectCameraPerspective : MonoBehaviour
|
||||
{
|
||||
m_isSetFOV = false;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
m_camera = GetComponent<Camera>();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
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")
|
||||
};
|
||||
}
|
||||
@@ -30,13 +30,6 @@ public class AttackSelectControl
|
||||
_isReady = attackPairCard._isReady;
|
||||
_hasStartedMoving = attackPairCard._hasStartedMoving;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_battleCardView = null;
|
||||
_isReady = false;
|
||||
_hasStartedMoving = false;
|
||||
}
|
||||
}
|
||||
|
||||
public AttackPairCard _attackInitiator;
|
||||
@@ -66,21 +59,6 @@ public class AttackSelectControl
|
||||
_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
|
||||
@@ -107,24 +85,12 @@ public class AttackSelectControl
|
||||
}
|
||||
}
|
||||
|
||||
private BattleCardBase currentAttackInitiatorBattleCard;
|
||||
|
||||
private bool areAttackPairsBeingUpdated;
|
||||
|
||||
private readonly AttackPair currentAttackPair = new AttackPair(null, null);
|
||||
|
||||
private readonly List<AttackPair> successfulAttackPairs = new List<AttackPair>();
|
||||
|
||||
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
|
||||
@@ -149,55 +115,6 @@ public class AttackSelectControl
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -217,34 +134,6 @@ public class AttackSelectControl
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
@@ -294,13 +183,6 @@ public class AttackSelectControl
|
||||
|
||||
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)
|
||||
@@ -309,47 +191,6 @@ public class AttackSelectControl
|
||||
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<BattleCardBase> 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;
|
||||
@@ -380,7 +221,7 @@ public class AttackSelectControl
|
||||
|
||||
private void MoveCardUpwards(AttackPair.AttackPairCard attackPairCard, float t)
|
||||
{
|
||||
if (BattleManagerBase.GetIns().IsRecovery)
|
||||
if (false /* Pre-Phase-5b: IsRecovery guard headless-safe as false */)
|
||||
{
|
||||
attackPairCard._isReady = true;
|
||||
}
|
||||
@@ -508,15 +349,6 @@ public class AttackSelectControl
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsAttackPossible(BattleCardBase attacker, BattleCardBase target, IEnumerable<BattleCardBase> 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)
|
||||
|
||||
@@ -9,10 +9,6 @@ public class BMFont
|
||||
[SerializeField]
|
||||
private int mSize = 16;
|
||||
|
||||
[HideInInspector]
|
||||
[SerializeField]
|
||||
private int mBase;
|
||||
|
||||
[HideInInspector]
|
||||
[SerializeField]
|
||||
private int mWidth;
|
||||
@@ -45,18 +41,6 @@ public class BMFont
|
||||
}
|
||||
}
|
||||
|
||||
public int baseOffset
|
||||
{
|
||||
get
|
||||
{
|
||||
return mBase;
|
||||
}
|
||||
set
|
||||
{
|
||||
mBase = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int texWidth
|
||||
{
|
||||
get
|
||||
@@ -81,18 +65,6 @@ public class BMFont
|
||||
}
|
||||
}
|
||||
|
||||
public int glyphCount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!isValid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return mSaved.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public string spriteName
|
||||
{
|
||||
get
|
||||
@@ -105,8 +77,6 @@ public class BMFont
|
||||
}
|
||||
}
|
||||
|
||||
public List<BMGlyph> glyphs => mSaved;
|
||||
|
||||
public BMGlyph GetGlyph(int index, bool createIfMissing)
|
||||
{
|
||||
BMGlyph value = null;
|
||||
@@ -134,12 +104,6 @@ public class BMFont
|
||||
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)
|
||||
|
||||
@@ -40,24 +40,6 @@ public class BMGlyph
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void SetKerning(int previousChar, int amount)
|
||||
{
|
||||
if (kerning == null)
|
||||
{
|
||||
kerning = new List<int>();
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -62,7 +62,10 @@ public class BackGroundBase
|
||||
_battleCamera = null;
|
||||
m_Battle3DContainer = null;
|
||||
m_BattleCutInContainer = null;
|
||||
m_BtlMgrIns = BattleManagerBase.GetIns();
|
||||
// Pre-Phase-5b: seeded m_BtlMgrIns from the ambient mgr. All Field*.cs subclass ctors
|
||||
// were stubbed to no-ops in chunk 3; nothing reads m_BtlMgrIns after that cull. Keeping
|
||||
// the field as null in headless is safe (no user of it survives the Field cull).
|
||||
m_BtlMgrIns = null;
|
||||
IsLoadDone = false;
|
||||
_str3DFieldNo = "";
|
||||
_str3DFieldPath = "";
|
||||
@@ -103,66 +106,11 @@ public class BackGroundBase
|
||||
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>();
|
||||
Camera component = componentInChildren.transform.Find("Camera 3DGround").GetComponent<Camera>();
|
||||
_battleCamera.SetUp(componentInChildren, m_BattleCutInContainer.transform.Find("Camera").GetComponent<UICamera>(), 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<string> 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()
|
||||
{
|
||||
}
|
||||
@@ -178,7 +126,7 @@ public class BackGroundBase
|
||||
|
||||
public virtual void StartFieldTapEffect(int areaId, Vector3 pos)
|
||||
{
|
||||
BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.IsTouchable();
|
||||
m_BtlMgrIns.BattlePlayer.PlayerBattleView.IsTouchable();
|
||||
}
|
||||
|
||||
public void StartFieldOpening()
|
||||
@@ -191,7 +139,7 @@ public class BackGroundBase
|
||||
|
||||
public void PlayBgm()
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlayBGM(string.Format("bgm_field_{0}", (_bgmId != "NONE") ? GetFieldIdString(_bgmId) : _str3DFieldNo), 0f, 0L);
|
||||
|
||||
}
|
||||
|
||||
protected virtual IEnumerator RunFieldOpening()
|
||||
@@ -201,16 +149,16 @@ public class BackGroundBase
|
||||
|
||||
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;
|
||||
}
|
||||
// Pre-Phase-5b: polled GameObject.Find + EffectMgr readiness flags. All Field*.cs
|
||||
// subclass BattleFieldBuild bodies were stubbed to no-ops in chunk 3; ObjectChecker
|
||||
// is now only reachable via dead code. Fire the callback immediately.
|
||||
yield return null;
|
||||
callback();
|
||||
}
|
||||
|
||||
public void StartFieldGimic(GameObject obj)
|
||||
{
|
||||
if (!GameMgr.GetIns().IsReplayBattle && BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.IsTouchable())
|
||||
if (!m_BtlMgrIns.GameMgr.IsReplayBattle && m_BtlMgrIns.BattlePlayer.PlayerBattleView.IsTouchable())
|
||||
{
|
||||
BattleCoroutine.GetInstance().StartCoroutine(RunFieldGimic(obj));
|
||||
}
|
||||
|
||||
@@ -18,15 +18,6 @@ public class 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();
|
||||
@@ -37,16 +28,6 @@ public class BattleCamera
|
||||
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
|
||||
@@ -57,16 +38,6 @@ public class BattleCamera
|
||||
});
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@@ -99,19 +99,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
{
|
||||
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
|
||||
@@ -455,18 +442,10 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
}
|
||||
}
|
||||
|
||||
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<BattleCardBase> ReplayNoConsumeEpBuffInfoNameList = new List<BattleCardBase>();
|
||||
|
||||
protected SkillCollectionBase _normalSkillCollection;
|
||||
|
||||
protected SkillCollectionBase _evolveSkillCollection;
|
||||
@@ -479,12 +458,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
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;
|
||||
@@ -551,23 +524,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
}
|
||||
}
|
||||
|
||||
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; }
|
||||
@@ -578,8 +534,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public string UpdateBuildInfoBeforeCardName { get; private set; } = string.Empty;
|
||||
|
||||
public bool IsChoiceEvolutionCardBeforeUpdateBuildInfo => UpdateBuildInfoBeforeCardId / 1000000 == 910;
|
||||
|
||||
public List<SkillCreator.SkillBuildInfo> NormalSkillBuildInfos => _buildInfo.NormalSkillBuildInfos;
|
||||
|
||||
public List<SkillCreator.SkillBuildInfo> EvolveSkillBuildInfos => _buildInfo.EvolveSkillBuildInfos;
|
||||
@@ -599,12 +553,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public List<BuffInfo> BuffInfoList { get; private set; }
|
||||
|
||||
public List<BuffInfo> ReplayBuffInfoList { get; set; } = new List<BuffInfo>();
|
||||
|
||||
public List<BuffInfo> ReplayAllCopyBuffInfoList { get; set; } = new List<BuffInfo>();
|
||||
|
||||
public List<NetworkBattleReceiver.ReplayBuffInfoLabel> ReplayBuffInfoLabelList { get; set; } = new List<NetworkBattleReceiver.ReplayBuffInfoLabel>();
|
||||
|
||||
protected CardInnerOptionsBase InnerOptions => _buildInfo.InnerOptions;
|
||||
|
||||
public IBattleResourceMgr ResourceMgr => _buildInfo.ResourceMgr;
|
||||
@@ -695,7 +643,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!GameMgr.GetIns().IsNewReplayBattle)
|
||||
if (!_buildInfo.BattleMgr.GameMgr.IsNewReplayBattle)
|
||||
{
|
||||
if (!SelfBattlePlayer.Class.IsCantAttackClass && !SkillApplyInformation.IsSkillCantAtkClass && !IsEvolDrunkenness)
|
||||
{
|
||||
@@ -713,22 +661,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
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; }
|
||||
@@ -1015,7 +947,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!GameMgr.GetIns().IsNewReplayBattle)
|
||||
if (!_buildInfo.BattleMgr.GameMgr.IsNewReplayBattle)
|
||||
{
|
||||
if (AttackableCount <= 0 || (IsSummonDrunkenness && (!IsSummonDrunkenness || !IsEvolution)) || IsCantAttack)
|
||||
{
|
||||
@@ -1089,32 +1021,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
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<int, int> idOverridePairDict = specialBattleSettingInfo.IdOverridePairDict;
|
||||
if (idOverridePairDict == null)
|
||||
{
|
||||
return CardId;
|
||||
}
|
||||
if (idOverridePairDict.ContainsKey(CardId))
|
||||
{
|
||||
return idOverridePairDict[CardId];
|
||||
}
|
||||
return CardId;
|
||||
}
|
||||
}
|
||||
|
||||
public int Cost
|
||||
{
|
||||
get
|
||||
@@ -1164,8 +1070,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public int MaxLife => SkillApplyInformation.GetMaxLife();
|
||||
|
||||
public int[] GenericValueArray => SkillApplyInformation.SkillGenericValueArray;
|
||||
|
||||
public virtual int BaseMaxLife
|
||||
{
|
||||
get
|
||||
@@ -1199,20 +1103,10 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
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<int> UseCostList
|
||||
@@ -1336,10 +1230,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
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);
|
||||
@@ -1375,8 +1265,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsLegend => BaseParameter.Rarity >= 4;
|
||||
|
||||
public int DrawTurn { get; set; }
|
||||
|
||||
public bool IsHaveBurialRiteJudgeBothFlag
|
||||
@@ -1473,14 +1361,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public event Func<bool> OnCheckCanAttack;
|
||||
|
||||
public event Func<bool> OnCheckCanBeAttacked;
|
||||
|
||||
public event Func<bool> OnCheckCanBeSelected;
|
||||
|
||||
public event Func<bool> OnCheckCanShowDetail;
|
||||
|
||||
public event Func<bool> OnCheckCanEvolve;
|
||||
|
||||
public void SetPlayedTurnNow()
|
||||
{
|
||||
PlayedTurn = SelfBattlePlayer.Turn;
|
||||
@@ -1527,19 +1407,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
}
|
||||
}
|
||||
|
||||
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<int> skillDescriptionValueList = null, List<int> sideLogDescriptionValueList = null)
|
||||
{
|
||||
return ConvertSkillDescription(BaseParameter.SkillDescription, sideLogInfo, isSkipOption, buff, divergenceId, skillDescriptionValueList, (IsBuffDetail && sideLogInfo == null && ReplayBuffDetailSkillDescriptionValueList.Count > 0) ? ReplayBuffDetailSkillDescriptionValueList : ((sideLogDescriptionValueList != null) ? sideLogDescriptionValueList : ReplaySkillDescriptionValueList));
|
||||
@@ -1550,26 +1417,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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<int> skillDescriptionValueList)
|
||||
{
|
||||
return ConvertSkillDescription(skillDescription, null, isSkipOption: false, null, "", skillDescriptionValueList, null);
|
||||
}
|
||||
|
||||
public string CopiedEvoSkillDescription(string skillDescription, List<int> skillDescriptionValueList)
|
||||
{
|
||||
return ConvertSkillDescription(skillDescription, null, isSkipOption: false, null, "", skillDescriptionValueList, null);
|
||||
}
|
||||
|
||||
public string CopiedSkillDescriptionInReplay(BuffInfo buff, List<int> copiedSkillDescriptionValueList)
|
||||
{
|
||||
return ConvertSkillDescription(BaseParameter.SkillDescription, null, isSkipOption: false, buff, "", null, copiedSkillDescriptionValueList);
|
||||
}
|
||||
|
||||
public string CopiedEvoSkillDescriptionInReplay(BuffInfo buff, List<int> copiedEvoSkillDescriptionValueList)
|
||||
{
|
||||
return ConvertSkillDescription(BaseParameter.EvoSkillDescription, null, isSkipOption: false, buff, "", null, copiedEvoSkillDescriptionValueList);
|
||||
}
|
||||
|
||||
public virtual bool CantBeFocusedAttack(BattleCardBase attackCard)
|
||||
{
|
||||
if (SkillApplyInformation.IsSneak)
|
||||
@@ -1687,7 +1534,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!SelfBattlePlayer.IsPlayer && GameMgr.GetIns().IsAdminWatch)
|
||||
if (!SelfBattlePlayer.IsPlayer && _buildInfo.BattleMgr.GameMgr.IsAdminWatch)
|
||||
{
|
||||
if (isCheckOnDraw && IsOnDraw)
|
||||
{
|
||||
@@ -1853,7 +1700,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public Action ForceAttackOff()
|
||||
{
|
||||
if (BattleManagerBase.GetIns().IsRecovery)
|
||||
if (_buildInfo.BattleMgr.IsRecovery)
|
||||
{
|
||||
return delegate
|
||||
{
|
||||
@@ -1881,47 +1728,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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;
|
||||
@@ -1942,15 +1748,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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++)
|
||||
@@ -2006,13 +1803,13 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
private CardParameter CreateClassParameter(bool isPlayer)
|
||||
{
|
||||
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
DataMgr dataMgr = _buildInfo.BattleMgr.GameMgr.GetDataMgr();
|
||||
return new CardParameter((CardBasePrm.ClanType)(isPlayer ? dataMgr.GetPlayerClassId() : dataMgr.GetEnemyClassId()));
|
||||
}
|
||||
|
||||
public void ChangeClassClanParameter()
|
||||
{
|
||||
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
DataMgr dataMgr = _buildInfo.BattleMgr.GameMgr.GetDataMgr();
|
||||
BaseParameter.ChangeClanParameter((CardBasePrm.ClanType)(IsPlayer ? dataMgr.GetPlayerClassId() : dataMgr.GetEnemyClassId()));
|
||||
}
|
||||
|
||||
@@ -2070,7 +1867,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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)
|
||||
@@ -2084,7 +1880,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
}
|
||||
if (SkillApplyInformation == null)
|
||||
{
|
||||
SkillApplyInformation = CreateSkillApplyInformation(this, VfxCreator);
|
||||
SkillApplyInformation = CreateSkillApplyInformation(this);
|
||||
SkillApplyInformation.InitializeInformation();
|
||||
}
|
||||
if (!isRecreate)
|
||||
@@ -2096,13 +1892,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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);
|
||||
@@ -2223,16 +2012,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
@@ -2243,7 +2022,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
handCard.BattleCardView.UpdateMovability();
|
||||
}
|
||||
}
|
||||
if (!GameMgr.GetIns().IsNewReplayBattle)
|
||||
if (!_buildInfo.BattleMgr.GameMgr.IsNewReplayBattle)
|
||||
{
|
||||
SelfBattlePlayer.CantPlayChoiceBrave = false;
|
||||
SelfBattlePlayer.BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite();
|
||||
@@ -2335,7 +2114,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
if (!SelfBattlePlayer.ClassAndInPlayCardList.Contains(this))
|
||||
{
|
||||
DeathTypeInfo.WhenDestroy = Skills._skillTimingInfo.IsWhenDestroy;
|
||||
VfxBase vfx = VfxCreator.CreateDestroy(DeathTypeInfo, SelfBattlePlayer);
|
||||
VfxBase vfx = NullVfx.GetInstance();
|
||||
sequentialVfxPlayer.Register(vfx);
|
||||
}
|
||||
sequentialVfxPlayer.Register(allFuncVfxResults);
|
||||
@@ -2357,7 +2136,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
VfxBase allFuncVfxResults = this.OnDestroy.GetAllFuncVfxResults(this, skillProcessor);
|
||||
if (!SelfBattlePlayer.HandCardList.Contains(this))
|
||||
{
|
||||
VfxBase vfx = VfxCreator.CreateDestroyHand(DeathTypeInfo, SelfBattlePlayer);
|
||||
VfxBase vfx = NullVfx.GetInstance();
|
||||
BattleCardView.HideCanPlayEffect();
|
||||
sequentialVfxPlayer.Register(vfx);
|
||||
}
|
||||
@@ -2390,7 +2169,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
sequentialVfxPlayer.Register(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor));
|
||||
if (!isReturn)
|
||||
{
|
||||
sequentialVfxPlayer.Register(VfxCreator.CreateBanish(DeathTypeInfo, SelfBattlePlayer));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
@@ -2400,7 +2179,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor));
|
||||
if (!SelfBattlePlayer.HandCardList.Contains(this))
|
||||
{
|
||||
vfxWithLoadingSequential.RegisterVfxWithLoading(VfxCreator.CreateBanishHand(DeathTypeInfo, SelfBattlePlayer));
|
||||
vfxWithLoadingSequential.RegisterVfxWithLoading(NullVfxWithLoading.GetInstance());
|
||||
}
|
||||
return vfxWithLoadingSequential;
|
||||
}
|
||||
@@ -2414,7 +2193,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
{
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
sequentialVfxPlayer.Register(this.OnGetOn.GetAllFuncVfxResults(this, skillProcessor));
|
||||
sequentialVfxPlayer.Register(VfxCreator.CreateGeton(vehicleCardTrans, vehicleCardView, DeathTypeInfo, SelfBattlePlayer));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -2425,7 +2204,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop());
|
||||
sequentialVfxPlayer.Register(RemoveFromInPlay());
|
||||
sequentialVfxPlayer.Register(SelfBattlePlayer.UniteCard(this, skillProcessor, skill));
|
||||
sequentialVfxPlayer.Register(VfxCreator.CreateBanish(DeathTypeInfo, SelfBattlePlayer));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -2436,7 +2215,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
DeathTypeInfo.UseFusionIngredient = true;
|
||||
DeathTypeInfo.UseFusionMetamorphoseIngredient = isFusionMetamorphose;
|
||||
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor));
|
||||
vfxWithLoadingSequential.RegisterVfxWithLoading(VfxCreator.CreateFusionHand(SelfBattlePlayer, fusionCard.BattleCardView, isFusionMetamorphose));
|
||||
vfxWithLoadingSequential.RegisterVfxWithLoading(NullVfxWithLoading.GetInstance());
|
||||
return vfxWithLoadingSequential;
|
||||
}
|
||||
|
||||
@@ -2460,12 +2239,12 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public VfxBase StartHandEffect()
|
||||
{
|
||||
if (SelfBattlePlayer.IsPlayer || GameMgr.GetIns().IsAdminWatch)
|
||||
if (SelfBattlePlayer.IsPlayer || _buildInfo.BattleMgr.GameMgr.IsAdminWatch)
|
||||
{
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
if (SpellChargeCount > 0 && HasSpellCharge && IsInHand)
|
||||
{
|
||||
sequentialVfxPlayer.Register(new HandEffectLoopStartVfx(BattleCardView, () => IsActionCard, HandEffectLoopStartVfx.HandEffectType.SpellCharge));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
@@ -2483,7 +2262,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public virtual VfxBase StopSpellCharge()
|
||||
{
|
||||
return new HandEffectLoopEndVfx(BattleCardView);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase CreateMoveToHandVfx()
|
||||
@@ -2500,7 +2279,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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();
|
||||
}
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
@@ -2524,7 +2303,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
{
|
||||
SkillCollectionBase skillCollectionBase = (isEvolve ? EvolutionSkills : Skills);
|
||||
NetworkBattleManagerBase networkBattleManagerBase = SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase;
|
||||
GameMgr ins = GameMgr.GetIns();
|
||||
GameMgr ins = _buildInfo.BattleMgr.GameMgr;
|
||||
if (!ins.IsAdminWatch && !ins.IsAINetwork && networkBattleManagerBase != null)
|
||||
{
|
||||
NetworkBattleReceiver.ReceiveData receiveData = networkBattleManagerBase.networkBattleData.GetReceiveData();
|
||||
@@ -2720,7 +2499,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public VfxBase CreateMaskCardInPlayVfx()
|
||||
{
|
||||
return VfxCreator.CreateMaskCardInPlay();
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public void AddCostModifier(ICardCostModifier modifier, SkillBase skill, bool eventCall = true)
|
||||
@@ -3042,23 +2821,9 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
return ParallelVfxPlayer.Create(parallelVfxPlayer, parallelVfxPlayer2);
|
||||
}
|
||||
|
||||
protected virtual ICardVfxCreator CreateVfxCreator(bool isPlayer, IBattleCardView battleCardView, bool isNullView)
|
||||
protected virtual ISkillApplyInformation CreateSkillApplyInformation(BattleCardBase card)
|
||||
{
|
||||
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);
|
||||
return new SkillApplyInformation(card);
|
||||
}
|
||||
|
||||
public void AddBuffInfo(BuffInfo buffInfo)
|
||||
@@ -3085,11 +2850,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
BuffInfoList.RemoveAll(condition);
|
||||
}
|
||||
|
||||
public bool IsContainBuffInfo(BuffInfo buffInfo)
|
||||
{
|
||||
return BuffInfoList.Contains(buffInfo);
|
||||
}
|
||||
|
||||
public void ClearBuffInfo()
|
||||
{
|
||||
BuffInfoList.Clear();
|
||||
@@ -3170,7 +2930,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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))))
|
||||
if ((_buildInfo.BattleMgr.GameMgr.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;
|
||||
}
|
||||
@@ -3187,7 +2947,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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)
|
||||
if (num && !isSkipOption && !IsPlayer && !_buildInfo.BattleMgr.GameMgr.IsAdminWatch && flag)
|
||||
{
|
||||
isSkipOption = true;
|
||||
}
|
||||
@@ -3350,7 +3110,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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));
|
||||
isSkillDescriptionExpressionValueDefault = ((flag3 || true /* headless: IsNewReplayBattle is const-false, guard collapses */ || 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);
|
||||
@@ -3380,13 +3140,13 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
if (Regex.Match(text, "{<<([^>])+>>@").Success)
|
||||
{
|
||||
text = text5 + list.Count + text6;
|
||||
int item = ((flag3 || !GameMgr.GetIns().IsNewReplayBattle) ? skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.v) : replaySkillDescriptionValueList[num - 1]);
|
||||
int item = ((flag3 || true /* headless: IsNewReplayBattle is const-false, guard collapses */) ? 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]);
|
||||
int item2 = ((flag3 || true /* headless: IsNewReplayBattle is const-false, guard collapses */) ? skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.v) : replaySkillDescriptionValueList[num - 1]);
|
||||
text = text5 + item2 + text6;
|
||||
valueList?.Add(item2);
|
||||
}
|
||||
@@ -3592,8 +3352,8 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(CreateMaskCardInPlayVfx());
|
||||
sequentialVfxPlayer.Register(InstantVfx.Create(delegate
|
||||
{
|
||||
@@ -3715,11 +3475,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public VfxBase GetSpellChargeLoopEffect(int num)
|
||||
{
|
||||
Func<bool> getIsActionCard = () => IsActionCard || IsInplay || BattleCardView._hasCardEnteredPlayQueue;
|
||||
if (SpellChargeCount == 0 && num > 0)
|
||||
{
|
||||
return new HandEffectLoopStartVfx(BattleCardView, getIsActionCard, HandEffectLoopStartVfx.HandEffectType.SpellCharge);
|
||||
}
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
@@ -3754,11 +3509,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
BattleCardView.UpdateCostViewStrategy(isForceUpdate);
|
||||
}
|
||||
|
||||
public void InitHandParameterIconPos(HandParameter.IconLayout layout)
|
||||
{
|
||||
BattleCardView.InitHandParameterIconPos(layout);
|
||||
}
|
||||
|
||||
public IEnumerable<BattleCardBase> AsIEnumerable()
|
||||
{
|
||||
yield return this;
|
||||
@@ -3778,7 +3528,7 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!GameMgr.GetIns().IsAdmin && !IsPlayer && IsInHand)
|
||||
if (!_buildInfo.BattleMgr.GameMgr.IsAdmin && !IsPlayer && IsInHand)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -3809,20 +3559,13 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
|
||||
public int GetBurialRiteCount(BattlePlayerReadOnlyInfoPair playerInfoPair, SkillConditionCheckerOption option, bool isPrePlay)
|
||||
{
|
||||
if (BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView._isEvolutionSkillSelect)
|
||||
if (_buildInfo.BattleMgr.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++)
|
||||
@@ -3849,18 +3592,6 @@ public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqu
|
||||
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)
|
||||
|
||||
@@ -39,12 +39,6 @@ public class BattleCardIconAnimations : MonoBehaviour
|
||||
|
||||
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;
|
||||
@@ -66,19 +60,6 @@ public class BattleCardIconAnimations : MonoBehaviour
|
||||
});
|
||||
}
|
||||
|
||||
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))
|
||||
@@ -123,43 +104,6 @@ public class BattleCardIconAnimations : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
@@ -189,37 +133,6 @@ public class BattleCardIconAnimations : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -242,22 +155,6 @@ public class BattleCardIconAnimations : MonoBehaviour
|
||||
ChangeTexture();
|
||||
}
|
||||
|
||||
public void DeleteUnneededSkillIcons()
|
||||
{
|
||||
RemoveSkillIconFromList("white_ritual", () => !IsEarthRiteField());
|
||||
RemoveSkillIconFromList("induction", () => !HasInductionSkill());
|
||||
RemoveSkillIconFromList("induction_number", () => !HasInductionNumberSkill());
|
||||
RemoveSkillIconFromList("destroy", () => !HasWhenDestroySkill());
|
||||
}
|
||||
|
||||
private void RemoveSkillIconFromList(string key, Func<bool> deleteCondition)
|
||||
{
|
||||
if (deleteCondition())
|
||||
{
|
||||
DeleteSkillIcon(key);
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeTexture()
|
||||
{
|
||||
if (skillIconListWithoutDuplicates.Count() - 1 > skillCount)
|
||||
@@ -307,48 +204,6 @@ public class BattleCardIconAnimations : MonoBehaviour
|
||||
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;
|
||||
@@ -402,7 +257,7 @@ public class BattleCardIconAnimations : MonoBehaviour
|
||||
return -1;
|
||||
}
|
||||
SkillOptionValue skillOptionValue = new SkillOptionValue(skillBase.SkillPrm.buildInfo._icon);
|
||||
skillOptionValue.SetupFilterVariable(BattleManagerBase.GetIns().GetBattlePlayerInfoPair(_card.IsPlayer), _card, isPrePlay: false, null);
|
||||
skillOptionValue.SetupFilterVariable(_card.SelfBattlePlayer.BattleMgr.GetBattlePlayerInfoPair(_card.IsPlayer), _card, isPrePlay: false, null);
|
||||
return skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.induction);
|
||||
}
|
||||
|
||||
@@ -464,24 +319,4 @@ public class BattleCardIconAnimations : MonoBehaviour
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,124 +1,28 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
using Wizard;
|
||||
using Wizard.Battle.UI;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
|
||||
// Post-Phase-5b (2026-07-03) UI stub. BattleControl handles UI-side end-of-battle
|
||||
// scene-change cleanup (DestroyBattleEffectContainer, ResetEnemyData, UIContainer
|
||||
// visibility, iTween tear-down). Every method is only invoked from UI code paths
|
||||
// (DialogBase.OnClose, MyPageBannerBase, FreeAndRankMatchDeckSelectConfirmDialog,
|
||||
// RecoveryManagerBase, SceneTransition) that don't run headless. The type stays
|
||||
// because GameMgr.GetBattleCtrl() lazy-inits it; the method bodies are no-ops.
|
||||
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<UIManager.ChangeViewSceneParam> 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();
|
||||
yield return null;
|
||||
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<GameObject> hashSet = new HashSet<GameObject>();
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ 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;
|
||||
|
||||
@@ -83,7 +82,7 @@ public class BattleEnemy : BattlePlayerBase
|
||||
|
||||
public override VfxBase StartTurnControl(string log = "")
|
||||
{
|
||||
if (GameMgr.GetIns().IsAdminWatch)
|
||||
if (BattleMgr.GameMgr.IsAdminWatch)
|
||||
{
|
||||
UpdateHandCardsPlayability();
|
||||
}
|
||||
@@ -91,7 +90,7 @@ public class BattleEnemy : BattlePlayerBase
|
||||
SequentialVfxPlayer sequentialVfxPlayer = TurnEvolveControl(BattleView.EpIcon);
|
||||
VfxBase vfx = TurnStart();
|
||||
sequentialVfxPlayer.Register(vfx);
|
||||
VfxBase vfx2 = BattleManagerBase.GetIns().JudgeBattleResult();
|
||||
VfxBase vfx2 = BattleMgr.JudgeBattleResult();
|
||||
sequentialVfxPlayer.Register(vfx2);
|
||||
sequentialVfxPlayer.Register(CreateThinkingVfx(base.BattleMgr));
|
||||
return sequentialVfxPlayer;
|
||||
@@ -99,15 +98,11 @@ public class BattleEnemy : BattlePlayerBase
|
||||
|
||||
public VfxBase CreateThinkingVfx(BattleManagerBase battleMgr)
|
||||
{
|
||||
if (GameMgr.GetIns().IsAdminWatch)
|
||||
if (BattleMgr.GameMgr.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));
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public override VfxBase UsePp(int pp, bool isNewReplayMoveTurn = false)
|
||||
@@ -122,7 +117,7 @@ public class BattleEnemy : BattlePlayerBase
|
||||
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)));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -144,7 +139,7 @@ public class BattleEnemy : BattlePlayerBase
|
||||
public override VfxBase CardDrawVfx(IEnumerable<BattleCardBase> DrawList, bool skipShuffle = false, bool isOpenDrawSkill = false)
|
||||
{
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
if (GameMgr.GetIns().IsAdminWatch)
|
||||
if (BattleMgr.GameMgr.IsAdminWatch)
|
||||
{
|
||||
foreach (BattleCardBase card in DrawList)
|
||||
{
|
||||
@@ -158,15 +153,15 @@ public class BattleEnemy : BattlePlayerBase
|
||||
}
|
||||
}
|
||||
}
|
||||
sequentialVfxPlayer.Register(new OpponentDrawCardVfx(DrawList, isOpenDrawSkill));
|
||||
sequentialVfxPlayer.Register(new OpponentDrawCardToHandVfx(DrawList.ToList(), 0.4f, isOpenDrawSkill, skipShuffle));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
public override VfxBase TurnEnd()
|
||||
{
|
||||
ParallelVfxPlayer result = ParallelVfxPlayer.Create(base.TurnEnd(), new ThinkIconHideVfx(base.BattleMgr.BattleResourceMgr));
|
||||
if (GameMgr.GetIns().IsAdminWatch)
|
||||
ParallelVfxPlayer result = ParallelVfxPlayer.Create(base.TurnEnd(), NullVfx.GetInstance());
|
||||
if (BattleMgr.GameMgr.IsAdminWatch)
|
||||
{
|
||||
foreach (BattleCardBase handCard in base.HandCardList)
|
||||
{
|
||||
@@ -178,7 +173,7 @@ public class BattleEnemy : BattlePlayerBase
|
||||
|
||||
protected override void SetActive()
|
||||
{
|
||||
if (GameMgr.GetIns().IsAdminWatch)
|
||||
if (BattleMgr.GameMgr.IsAdminWatch)
|
||||
{
|
||||
UpdateHandCardsPlayability();
|
||||
}
|
||||
@@ -201,7 +196,7 @@ public class BattleEnemy : BattlePlayerBase
|
||||
handCard.BattleCardView.areArrowsForcedOff = areArrowsForcedOff;
|
||||
handCard.BattleCardView.UpdateMovability();
|
||||
}
|
||||
if (!GameMgr.GetIns().IsAdmin)
|
||||
if (!BattleMgr.GameMgr.IsAdmin)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -218,7 +213,7 @@ public class BattleEnemy : BattlePlayerBase
|
||||
|
||||
public override VfxBase MoveToHand(List<BattleCardBase> cardsToMoveToHand)
|
||||
{
|
||||
return SequentialVfxPlayer.Create(new OpponentDrawCardToHandVfx(cardsToMoveToHand.ToList(), 0.3f), InstantVfx.Create(delegate
|
||||
return SequentialVfxPlayer.Create(NullVfx.GetInstance(), InstantVfx.Create(delegate
|
||||
{
|
||||
UpdateHandCardsPlayability();
|
||||
}));
|
||||
@@ -226,7 +221,7 @@ public class BattleEnemy : BattlePlayerBase
|
||||
|
||||
public override EffectBattle GetSkillEffect(string skillEffectPath)
|
||||
{
|
||||
return GameMgr.GetIns().GetEffectMgr().GetEnemyEffectBattle(skillEffectPath);
|
||||
return BattleMgr.GameMgr.GetEffectMgr().GetEnemyEffectBattle(skillEffectPath);
|
||||
}
|
||||
|
||||
public override Vector3 GetFieldCenterPosition()
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
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<string, int> mission;
|
||||
|
||||
public string recovery_data;
|
||||
|
||||
public int SDTRB;
|
||||
|
||||
public string[] prosessing_time_data;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ 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 (false /* Pre-Phase-5b: no BattleType headless */ && Data.CurrentFormat != Format.Crossover)
|
||||
{
|
||||
if (ResponseData["data"].Keys.Contains("target_grand_master_point"))
|
||||
{
|
||||
@@ -18,7 +18,7 @@ public class BattleFinishResponsProcessing
|
||||
}
|
||||
}
|
||||
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)
|
||||
if (false /* Pre-Phase-5b: no BattleType headless */)
|
||||
{
|
||||
Data.ArenaData.ColosseumData.ResultEffect = ArenaColosseum.eResultEffect.None;
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class BattleFinishResponsProcessing
|
||||
matchFinishData.battleResult = BattleManagerBase.BATTLE_RESULT_TYPE.CONSISTENCY;
|
||||
break;
|
||||
}
|
||||
(BattleManagerBase.GetIns() as NetworkBattleManagerBase).BattleResultType = matchFinishData.battleResult;
|
||||
/* Pre-Phase-5b: BattleResultType write dropped */
|
||||
break;
|
||||
case "get_class_experience":
|
||||
matchFinishData.get_class_chara_experience = jsonData2.ToInt();
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using Cute;
|
||||
using Wizard;
|
||||
|
||||
public class BattleFinishSendBase
|
||||
{
|
||||
private FinishTaskBase _finishTaskBase;
|
||||
|
||||
private Action<NetworkTask.ResultCode> _onSuccess;
|
||||
|
||||
private NetworkManager _networkManager;
|
||||
|
||||
private BattleManagerBase _battleMgr;
|
||||
|
||||
public BattleFinishSendBase(BattleManagerBase mgr)
|
||||
{
|
||||
_networkManager = Toolbox.NetworkManager;
|
||||
_battleMgr = mgr;
|
||||
}
|
||||
|
||||
public void SendMatchingFinish(FinishTaskBase finishTaskBase, Action<NetworkTask.ResultCode> 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);
|
||||
}
|
||||
}
|
||||
@@ -12,18 +12,6 @@ public class BattleFinishToOpponentDisConnectChecker : NetworkBattleIntervalChec
|
||||
|
||||
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; }
|
||||
@@ -116,7 +104,7 @@ public class BattleFinishToOpponentDisConnectChecker : NetworkBattleIntervalChec
|
||||
{
|
||||
_isDisconnect = true;
|
||||
UIManager.GetInstance().closeInSceneNotNetwork();
|
||||
BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.ShowAlert(PanelMgr.BattleAlertType.DisconnectInfomation, isClass: false);
|
||||
networkBattleManager.BattlePlayer.PlayerBattleView.ShowAlert(PanelMgr.BattleAlertType.DisconnectInfomation, isClass: false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +119,8 @@ public class BattleFinishToOpponentDisConnectChecker : NetworkBattleIntervalChec
|
||||
{
|
||||
_isDisconnect = false;
|
||||
UIManager.GetInstance().createInSceneNotNetwork();
|
||||
BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.OffNotHideAndNotCreate();
|
||||
BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.HideAlertDialogue();
|
||||
networkBattleManager.BattlePlayer.PlayerBattleView.OffNotHideAndNotCreate();
|
||||
networkBattleManager.BattlePlayer.PlayerBattleView.HideAlertDialogue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,38 +13,9 @@ public class BattleKeywordInfoListMgr : MonoBehaviour
|
||||
|
||||
private static readonly string[] KEYWORD_PATTERNS = new string[2] { "\\[u\\]\\[(ffcd45|524522)\\](?<KEYWORD>.*?)\\[-\\]\\[/u\\]", "\\[b\\](?<KEYWORD>.*?)\\[/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<NguiObjs> SkillInfoList = new List<NguiObjs>();
|
||||
|
||||
private Action ResetTableFinishAction;
|
||||
|
||||
public static IList<string> GetKeywords(CardParameter cardParameter)
|
||||
{
|
||||
return GetKeywords(cardParameter.SkillDescription + cardParameter.EvoSkillDescription);
|
||||
@@ -67,309 +38,6 @@ public class BattleKeywordInfoListMgr : MonoBehaviour
|
||||
return list;
|
||||
}
|
||||
|
||||
public void SetKeywordInfos(IList<string> currentWords, CardMaster.CardMasterId cardMasterId)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
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<int> baseCardID, List<string> 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>();
|
||||
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>();
|
||||
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<string> 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<BoxCollider>();
|
||||
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<UIDragScrollView>().scrollView = ScrollView;
|
||||
boxCollider2.gameObject.AddComponent<UIDragScrollView>().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<UISprite>();
|
||||
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<UIRect>();
|
||||
for (int i = 0; i < componentsInChildren.Length; i++)
|
||||
{
|
||||
componentsInChildren[i].ResetAndUpdateAnchors();
|
||||
}
|
||||
SkillInfoList.Add(nguiObjs);
|
||||
}
|
||||
|
||||
public void SetScrollView(DialogBase dia)
|
||||
{
|
||||
UIPanel component = ScrollView.GetComponent<UIPanel>();
|
||||
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<UIDragScrollView>().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<string, string> keyValuePair = Data.Master.BattleKeyWordDic.First((KeyValuePair<string, string> data) => data.Key.ToLower() == skillToLower);
|
||||
keywordTitle = keyValuePair.Key;
|
||||
skillinfo = keyValuePair.Value;
|
||||
List<int> 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<string> list = new List<string>();
|
||||
List<string> list2 = new List<string>();
|
||||
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<int> 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<int> GetCardIdsInDesc(string desc)
|
||||
{
|
||||
string text = "KEYWORD";
|
||||
@@ -386,36 +54,6 @@ public class BattleKeywordInfoListMgr : MonoBehaviour
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<string> GetKeyWordNameList()
|
||||
{
|
||||
List<string> list = new List<string>(SkillInfoList.Count);
|
||||
for (int i = 0; i < SkillInfoList.Count; i++)
|
||||
{
|
||||
list.Add(SkillInfoList[i].labels[0].text);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public IList<NguiObjs> GetSkillInfoList()
|
||||
{
|
||||
return SkillInfoList;
|
||||
}
|
||||
|
||||
public float GetScrollViewSizeY()
|
||||
{
|
||||
return ScrollView.GetComponent<UIPanel>().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;
|
||||
|
||||
@@ -9,11 +9,6 @@ public class BattleLifeTimeSharedObject
|
||||
_skillBuildInfoSharedObject = new Dictionary<string, SkillCreator.SkillBuildInfo>();
|
||||
}
|
||||
|
||||
~BattleLifeTimeSharedObject()
|
||||
{
|
||||
_skillBuildInfoSharedObject.Clear();
|
||||
}
|
||||
|
||||
public void SetSkillBuildInfo(string key, SkillCreator.SkillBuildInfo value)
|
||||
{
|
||||
if (!_skillBuildInfoSharedObject.ContainsKey(key))
|
||||
|
||||
@@ -1,851 +0,0 @@
|
||||
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<ISkillCardFilter> 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<SkillVariableComareFilter> 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();
|
||||
}
|
||||
}
|
||||
@@ -90,8 +90,6 @@ public class BattleManagerBase
|
||||
|
||||
private Dictionary<string, string> _originalTargetDictionary;
|
||||
|
||||
private const string MISSION_INFO_EQUAL = "mission_info=";
|
||||
|
||||
public MissionNecessaryInformation(Dictionary<string, string> targetDictionary)
|
||||
{
|
||||
_originalTargetDictionary = targetDictionary;
|
||||
@@ -103,17 +101,6 @@ public class BattleManagerBase
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, int> GetMissionNecessaryInfo(BattlePlayerPair pair, BattleCardBase selfClass)
|
||||
{
|
||||
Dictionary<string, int> dictionary = new Dictionary<string, int>();
|
||||
foreach (KeyValuePair<string, SkillOptionValue> 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<string, string> GetOriginalTargetDictionary()
|
||||
{
|
||||
return _originalTargetDictionary;
|
||||
@@ -150,9 +137,13 @@ public class BattleManagerBase
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsOwnerCardDead()
|
||||
// Fusion-list parameter: headless has no fusion animation, so the outer mgr's list is
|
||||
// always empty and Contains(...) always returns false — the block below always runs.
|
||||
// Passed as a parameter (not read via BattleLogManager.GetInstance()) so concurrent
|
||||
// battles resolve against their own instance's list rather than a process singleton.
|
||||
public bool IsOwnerCardDead(List<BattleCardBase> enemyFusionCard)
|
||||
{
|
||||
if (!BattleLogManager.GetInstance().EnemyFusionCard.Contains(_ownerCard))
|
||||
if (!enemyFusionCard.Contains(_ownerCard))
|
||||
{
|
||||
if (!_ownerCard.IsDead)
|
||||
{
|
||||
@@ -272,18 +263,12 @@ public class BattleManagerBase
|
||||
|
||||
private Dictionary<CalledCreateFilterPair, SkillOrFilter> _calledCreateOrFilterDictionary = new Dictionary<CalledCreateFilterPair, SkillOrFilter>();
|
||||
|
||||
public const int SIMPLE_STAGE_ID = 9;
|
||||
|
||||
public const int NEW_INDEX = -1;
|
||||
public List<BattleCardBase> EnemyFusionCard = new List<BattleCardBase>();
|
||||
|
||||
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;
|
||||
@@ -352,8 +337,6 @@ public class BattleManagerBase
|
||||
|
||||
public SideLogControl ESelectSkillSideLogControl;
|
||||
|
||||
private const string UnityEventAgentStr = "Prefab/Game/UnityEventAgent";
|
||||
|
||||
public ITurnPanelControl TurnPanelControl;
|
||||
|
||||
public GameObject BattleResult;
|
||||
@@ -384,8 +367,6 @@ public class BattleManagerBase
|
||||
|
||||
protected int _temporaryPublishedAddCount;
|
||||
|
||||
public const int NOT_LETHAL_PUBLISHED_COUNT = -1;
|
||||
|
||||
protected int _lethalPublishedActiveSkillCount = -1;
|
||||
|
||||
protected int _lethalMovementCount;
|
||||
@@ -398,28 +379,50 @@ public class BattleManagerBase
|
||||
|
||||
public int SecondTurn;
|
||||
|
||||
public int GroundID;
|
||||
|
||||
public int DamageCount;
|
||||
|
||||
private GameObject _unityEventAgentObject;
|
||||
|
||||
private UnityEventAgent _unityEventAgent;
|
||||
|
||||
protected IPhase _phase;
|
||||
|
||||
private NetworkTouchControl _networkTouchControl;
|
||||
// Instance-backed IsRandomDraw / IsForecast / RecoveryInfo (Phase 5a, 2026-07-02).
|
||||
// Static accessors (this.InstanceIsForecast, Wizard.Data.BattleRecoveryInfo, etc.)
|
||||
// route through the ambient's current Mgr — same lookup shape as GetIns() — but the
|
||||
// authoritative state lives on the mgr instance itself, not in separate ambient slots.
|
||||
// Defaults mirror the ambient's historical defaults.
|
||||
public bool InstanceIsRandomDraw { get; set; } = true;
|
||||
public bool InstanceIsForecast { get; set; } = true;
|
||||
public Wizard.BattleRecoveryInfo InstanceRecoveryInfo { get; set; }
|
||||
|
||||
// Instance-backed ViewerId. Default 1001 matches EngineGlobalInit.ThisViewerId (the historical
|
||||
// PlayerStaticData / Certification default when neither has been assigned by a session).
|
||||
public int InstanceViewerId { get; set; } = 1001;
|
||||
|
||||
// Instance-backed RealTimeNetworkAgent. Owner: mgr; nullable — headless mostly runs without an
|
||||
// agent, and existing readers guard with `?.`.
|
||||
public RealTimeNetworkAgent InstanceNetworkAgent { get; set; }
|
||||
|
||||
// Phase-5 chunk 42 (2026-07-03): ambient bridge dropped. All engine per-mgr readers and writers
|
||||
// now use `mgr.InstanceIsRandomDraw` / `mgr.InstanceIsForecast` directly. The residual static
|
||||
// setter/getter keeps the shape only for pre-mgr fixture/node writes — no ambient-slot fallback.
|
||||
// If GetIns() is null (no scope), the setter silently no-ops and the getter returns the default.
|
||||
public static bool IsRandomDraw {
|
||||
get => SVSim.BattleEngine.Ambient.BattleAmbient.Require().IsRandomDraw;
|
||||
set => SVSim.BattleEngine.Ambient.BattleAmbient.Require().IsRandomDraw = value;
|
||||
get => GetIns()?.InstanceIsRandomDraw ?? true;
|
||||
set { if (GetIns() is { } m) m.InstanceIsRandomDraw = value; }
|
||||
}
|
||||
|
||||
public static bool IsForecast {
|
||||
get => SVSim.BattleEngine.Ambient.BattleAmbient.Require().IsForecast;
|
||||
set => SVSim.BattleEngine.Ambient.BattleAmbient.Require().IsForecast = value;
|
||||
get => GetIns()?.InstanceIsForecast ?? true;
|
||||
set { if (GetIns() is { } m) m.InstanceIsForecast = value; }
|
||||
}
|
||||
|
||||
// Phase-5 chunk 45 (2026-07-03): pure per-instance GameMgr assigned in ctor. The property has
|
||||
// no field initializer so the ctor can set it before the base-ctor chain reads it. Subclasses
|
||||
// that need a pre-seeded GameMgr (test fixtures with chara-id / net-user data) call the
|
||||
// (contentsCreator, gameMgr) overload; the parameterless overload keeps the historical ambient
|
||||
// bridge so pre-existing TestBattleScope seeders still work while the fixture rewrite lands.
|
||||
public GameMgr GameMgr { get; }
|
||||
|
||||
public BattleLifeTimeSharedObject BattleLifeTimeSharedObject;
|
||||
|
||||
private BattleUIContainer _battleUIContainer;
|
||||
@@ -434,8 +437,6 @@ public class BattleManagerBase
|
||||
|
||||
protected XorShift _oppXorShiftRandom;
|
||||
|
||||
public bool IsKeyboardEnable = true;
|
||||
|
||||
public static bool IsTutorial
|
||||
{
|
||||
get
|
||||
@@ -448,8 +449,6 @@ public class BattleManagerBase
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool IsStoryTutorial => false;
|
||||
|
||||
protected virtual bool DisableCustomMouse => false;
|
||||
|
||||
public static bool UseCustomMouse
|
||||
@@ -465,46 +464,14 @@ public class BattleManagerBase
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
@@ -599,8 +566,6 @@ public class BattleManagerBase
|
||||
|
||||
public IPhaseCreator PhaseCreator { get; private set; }
|
||||
|
||||
public bool IsPreRecovery { get; set; }
|
||||
|
||||
public bool IsRecovery { get; set; }
|
||||
|
||||
public bool IsPuzzleMgr => this is PuzzleBattleManager;
|
||||
@@ -658,7 +623,7 @@ public class BattleManagerBase
|
||||
|
||||
public bool IsTurnEnd { get; protected set; }
|
||||
|
||||
public virtual bool IsVirtualBattle => IsForecast;
|
||||
public virtual bool IsVirtualBattle => this.InstanceIsForecast;
|
||||
|
||||
public virtual bool IsVirtualBattleEnemyTurn
|
||||
{
|
||||
@@ -712,15 +677,23 @@ public class BattleManagerBase
|
||||
|
||||
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;
|
||||
// Phase-5 chunk 46: pure per-instance world. GetIns() no longer routes through the ambient
|
||||
// (which is being deleted). All direct engine callers were converted to per-mgr reads in
|
||||
// chunks 38-42; residual callers are the 3 façades (Certification.ViewerId, Data.BattleRecoveryInfo,
|
||||
// ToolboxGame.RealTimeNetworkAgent) and the two static flags (IsForecast, IsRandomDraw),
|
||||
// each of which returns a null-tolerant default when GetIns() is null — matching the "no scope"
|
||||
// semantics the ambient used to provide.
|
||||
return null;
|
||||
}
|
||||
|
||||
protected BattleManagerBase(IBattleMgrContentsCreator contentsCreator)
|
||||
: this(contentsCreator, new GameMgr())
|
||||
{
|
||||
}
|
||||
|
||||
protected BattleManagerBase(IBattleMgrContentsCreator contentsCreator, GameMgr gameMgr)
|
||||
{
|
||||
GameMgr = gameMgr;
|
||||
BattleLifeTimeSharedObject = new BattleLifeTimeSharedObject();
|
||||
PublishedSkillList = new List<SkillBase>();
|
||||
_contentsCreator = contentsCreator;
|
||||
@@ -765,8 +738,8 @@ public class BattleManagerBase
|
||||
SubUI = null;
|
||||
SubUIOverLayBG = null;
|
||||
MenuButtonObject = null;
|
||||
GameMgr.GetIns().GetPrefabMgr().Load("Prefab/Game/UnityEventAgent");
|
||||
_unityEventAgentObject = UnityEngine.Object.Instantiate(GameMgr.GetIns().GetPrefabMgr().Get("Prefab/Game/UnityEventAgent"));
|
||||
this.GameMgr.GetPrefabMgr().Load("Prefab/Game/UnityEventAgent");
|
||||
_unityEventAgentObject = UnityEngine.Object.Instantiate(this.GameMgr.GetPrefabMgr().Get("Prefab/Game/UnityEventAgent"));
|
||||
_unityEventAgent = _unityEventAgentObject.GetComponent<UnityEventAgent>();
|
||||
_unityEventAgent.SetBattleMgr(this);
|
||||
Prediction = new Prediction(BattleResourceMgr, GetBattlePlayerPair(isPlayer: true));
|
||||
@@ -780,7 +753,7 @@ public class BattleManagerBase
|
||||
FirstReplaySetting();
|
||||
OnBattleSettingInfoClear += delegate
|
||||
{
|
||||
GameMgr.GetIns().GetDataMgr().SetStoryBgmID("NONE");
|
||||
this.GameMgr.GetDataMgr().SetStoryBgmID("NONE");
|
||||
};
|
||||
LocalLog.AccumulateSettingLog();
|
||||
}
|
||||
@@ -792,7 +765,7 @@ public class BattleManagerBase
|
||||
|
||||
public void StartRecoveryRecording()
|
||||
{
|
||||
_contentsCreator.RecoveryRecordManager.SetupRecording(this, GameMgr.GetIns().GetDataMgr().m_BattleType, _contentsCreator.RandomSeed, BackgroundId, BgmId);
|
||||
_contentsCreator.RecoveryRecordManager.SetupRecording(this, this.GameMgr.GetDataMgr().m_BattleType, _contentsCreator.RandomSeed, BackgroundId, BgmId);
|
||||
}
|
||||
|
||||
protected virtual void FirstReplaySetting()
|
||||
@@ -805,11 +778,6 @@ public class BattleManagerBase
|
||||
_contentsCreator.ReplayRecordManager.SetupRecording(this);
|
||||
}
|
||||
|
||||
public void SetupReplayBattleInfoFilter()
|
||||
{
|
||||
_contentsCreator.ReplayRecordManager.SetupBattleInfoFilter();
|
||||
}
|
||||
|
||||
public void CreateXorShift(int selfIdxSeed, int oppIdxSeed = -1)
|
||||
{
|
||||
if (selfIdxSeed != -1)
|
||||
@@ -841,12 +809,12 @@ public class BattleManagerBase
|
||||
return backGroundId;
|
||||
}
|
||||
int result = 1;
|
||||
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
DataMgr dataMgr = this.GameMgr.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)
|
||||
else if (dataMgr.m_BattleType == DataMgr.BattleType.Story || dataMgr.IsQuestBattleType() || this.GameMgr.IsPuzzleQuest)
|
||||
{
|
||||
result = dataMgr.GetSoroPlay3DFieldID();
|
||||
}
|
||||
@@ -900,7 +868,7 @@ public class BattleManagerBase
|
||||
return bgmId;
|
||||
}
|
||||
string result = "NONE";
|
||||
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
DataMgr dataMgr = this.GameMgr.GetDataMgr();
|
||||
if (dataMgr.m_BattleType == DataMgr.BattleType.Story || dataMgr.IsQuestBattleType())
|
||||
{
|
||||
result = dataMgr.GetStoryBgmID();
|
||||
@@ -908,17 +876,10 @@ public class BattleManagerBase
|
||||
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);
|
||||
this.GameMgr.GetInputMgr().SetBattleCamera(_battleCamera);
|
||||
DetailMgr = new DetailMgr();
|
||||
switch (BackgroundId)
|
||||
{
|
||||
@@ -1122,20 +1083,6 @@ public class BattleManagerBase
|
||||
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;
|
||||
@@ -1167,21 +1114,6 @@ public class BattleManagerBase
|
||||
((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
|
||||
@@ -1254,16 +1186,6 @@ public class BattleManagerBase
|
||||
};
|
||||
}
|
||||
|
||||
public VfxBase LoadOpponentObjects()
|
||||
{
|
||||
VfxBase vfxBase = GetIns().SBattleLoad.NetworkBattleStartToLoadOpponentObjects(delegate
|
||||
{
|
||||
DelayLoadCompleteOpponentResources();
|
||||
});
|
||||
VfxMgr.RegisterSequentialVfx(vfxBase);
|
||||
return vfxBase;
|
||||
}
|
||||
|
||||
protected virtual void DelayLoadCompleteOpponentResources()
|
||||
{
|
||||
SetupBattlePlayersEvent();
|
||||
@@ -1353,11 +1275,6 @@ public class BattleManagerBase
|
||||
return TurnPanelControl.LoadResource();
|
||||
}
|
||||
|
||||
public void ReinitializeTurnPanelControl()
|
||||
{
|
||||
TurnPanelControl.Initialize(BattlePlayer.EvolveWaitTurnCount > 0, BattleEnemy.EvolveWaitTurnCount > 0);
|
||||
}
|
||||
|
||||
public virtual void Update(float dt)
|
||||
{
|
||||
VfxWith<IPhase> vfxWith = _phase.Update(dt);
|
||||
@@ -1378,50 +1295,35 @@ public class BattleManagerBase
|
||||
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;
|
||||
this.InstanceRecoveryInfo = null;
|
||||
BattleLifeTimeSharedObject = null;
|
||||
this.OnBattleSettingInfoClear.Call();
|
||||
BattleLogItem.ClearHeaderTextureCache();
|
||||
CardVoiceInfoCache.ClearCardVoiceInfo();
|
||||
NullBattleCardView.ReleaseSharedDummy();
|
||||
NullBattleCard.ReleaseSharedDummy();
|
||||
GameMgr.GetIns().GetEffectMgr().ClearBattleFeildEffect();
|
||||
GameMgr.GetIns().GetEffectMgr().RestUnneededEffect();
|
||||
this.GameMgr.GetEffectMgr().ClearBattleFeildEffect();
|
||||
this.GameMgr.GetEffectMgr().RestUnneededEffect();
|
||||
_backGround.Dispose();
|
||||
_battleCamera.Dispose();
|
||||
Toolbox.ResourcesManager.RemoveAssetGroup(Toolbox.ResourcesManager.BattleListAssetPathList);
|
||||
Toolbox.ResourcesManager.BattleListAssetPathList.Clear();
|
||||
RenderSettings.fog = false;
|
||||
GameMgr.GetIns().GetEffectMgr().ImmediateDestroyBattleEffectContainer();
|
||||
this.GameMgr.GetEffectMgr().ImmediateDestroyBattleEffectContainer();
|
||||
if (PanelMgr != null)
|
||||
{
|
||||
DisposeBattleGameObj_DestroyImmediate(PanelMgr.gameObject);
|
||||
@@ -1476,9 +1378,9 @@ public class BattleManagerBase
|
||||
SubUI = null;
|
||||
SubParticleContainer = null;
|
||||
UIManager.GetInstance().DestroyView(UIManager.ViewScene.Battle);
|
||||
GameMgr.GetIns().GetPrefabMgr().DisposeAllClonedObject();
|
||||
GameMgr.GetIns().GetGameObjMgr().DisposeUIGameObj();
|
||||
GameMgr.GetIns().GetPrefabMgr().AllUnLoad();
|
||||
this.GameMgr.GetPrefabMgr().DisposeAllClonedObject();
|
||||
this.GameMgr.GetGameObjMgr().DisposeUIGameObj();
|
||||
this.GameMgr.GetPrefabMgr().AllUnLoad();
|
||||
}
|
||||
|
||||
private void DisposeBattleGameObj_DestroyImmediate(GameObject obj)
|
||||
@@ -1538,16 +1440,7 @@ public class BattleManagerBase
|
||||
|
||||
public BattleControl GetBattleControl()
|
||||
{
|
||||
return GameMgr.GetIns().GetBattleCtrl();
|
||||
}
|
||||
|
||||
public CardParameterListInfo GetCardParameterListInfo(bool isPlayer)
|
||||
{
|
||||
if (!isPlayer)
|
||||
{
|
||||
return EnemyCardParameterListInfo;
|
||||
}
|
||||
return PlayerCardParameterListInfo;
|
||||
return this.GameMgr.GetBattleCtrl();
|
||||
}
|
||||
|
||||
public BattlePlayerBase GetBattlePlayer(bool isPlayer)
|
||||
@@ -1573,14 +1466,9 @@ public class BattleManagerBase
|
||||
return new BattlePlayerReadOnlyInfoPair(battlePlayer, battlePlayer2);
|
||||
}
|
||||
|
||||
public Transform GetBattle3DContainerChild(string childName)
|
||||
{
|
||||
return Battle3DContainer.transform.Find(childName);
|
||||
}
|
||||
|
||||
public virtual int StableRandom(int val)
|
||||
{
|
||||
if (IsForecast)
|
||||
if (this.InstanceIsForecast)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1591,7 +1479,7 @@ public class BattleManagerBase
|
||||
|
||||
public virtual double StableRandomDouble()
|
||||
{
|
||||
if (IsForecast)
|
||||
if (this.InstanceIsForecast)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
@@ -1602,7 +1490,7 @@ public class BattleManagerBase
|
||||
|
||||
public virtual int StableRandomOnlySelf(int val)
|
||||
{
|
||||
if (IsForecast)
|
||||
if (this.InstanceIsForecast)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1688,12 +1576,6 @@ public class BattleManagerBase
|
||||
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);
|
||||
@@ -1729,15 +1611,15 @@ public class BattleManagerBase
|
||||
GameObject gameObject = null;
|
||||
if (cardParameter.CharType == CardBasePrm.CharaType.NORMAL)
|
||||
{
|
||||
gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(SBattleLoad.UnitCardTemplate.gameObject, _backGround.m_Battle3DContainer);
|
||||
gameObject = this.GameMgr.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);
|
||||
gameObject = this.GameMgr.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 = this.GameMgr.GetPrefabMgr().CloneObjectToParent(SBattleLoad.FieldCardTemplate.gameObject, _backGround.m_Battle3DContainer);
|
||||
gameObject.transform.Find("CardObj/NormalField").gameObject.SetActive(value: false);
|
||||
}
|
||||
SetupCardObjectTags(gameObject, isPlayer, cardIndex);
|
||||
@@ -1820,7 +1702,7 @@ public class BattleManagerBase
|
||||
public VfxBase DeadClass(bool PlayerDead, FINISH_TYPE finishType)
|
||||
{
|
||||
ClassBattleCardBase classBattleCardBase = (ClassBattleCardBase)GetBattlePlayer(PlayerDead).Class;
|
||||
if (GameMgr.GetIns().IsReplayBattle && !classBattleCardBase.ClassBattleCardView.InPlayModelActive)
|
||||
if (this.GameMgr.IsReplayBattle && !classBattleCardBase.ClassBattleCardView.InPlayModelActive)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
@@ -1881,7 +1763,7 @@ public class BattleManagerBase
|
||||
|
||||
public virtual void InitiateGameEndSequence(bool hasWon)
|
||||
{
|
||||
if (GameMgr.GetIns().IsReplayBattle && !GameMgr.GetIns().IsNewReplayBattle)
|
||||
if (this.GameMgr.IsReplayBattle && !this.GameMgr.IsNewReplayBattle)
|
||||
{
|
||||
hasWon = Data.ReplayBattleInfo.is_win;
|
||||
}
|
||||
@@ -1897,7 +1779,7 @@ public class BattleManagerBase
|
||||
|
||||
public virtual VfxBase PlaySpecialWin(BattlePlayerBase winPlayer)
|
||||
{
|
||||
GetIns().VfxMgr.RegisterImmediateVfx(new CanNotTouchCardVfx());
|
||||
GetIns().VfxMgr.RegisterImmediateVfx(NullVfx.GetInstance());
|
||||
bool playerDead = !winPlayer.IsPlayer;
|
||||
return SequentialVfxPlayer.Create(DeadClass(playerDead, FINISH_TYPE.SPECIAL_WIN), InstantVfx.Create(delegate
|
||||
{
|
||||
@@ -1907,7 +1789,7 @@ public class BattleManagerBase
|
||||
|
||||
public virtual void PlayRetire()
|
||||
{
|
||||
GetIns().VfxMgr.RegisterImmediateVfx(new CanNotTouchCardVfx());
|
||||
GetIns().VfxMgr.RegisterImmediateVfx(NullVfx.GetInstance());
|
||||
if (!GetBattlePlayer(isPlayer: true).Class.IsDead)
|
||||
{
|
||||
BattlePlayer.BattleView.HideTurnEndButton();
|
||||
@@ -1920,11 +1802,6 @@ public class BattleManagerBase
|
||||
}
|
||||
}
|
||||
|
||||
public void MulliganSubmit()
|
||||
{
|
||||
VfxMgr.RegisterSequentialVfx(this.OnSubmitMulligan.GetAllFuncVfxResults());
|
||||
}
|
||||
|
||||
public void ChangeCameraFieldOfView(float aspectRatio)
|
||||
{
|
||||
if ((bool)Battle3DContainer)
|
||||
@@ -1947,7 +1824,7 @@ public class BattleManagerBase
|
||||
}
|
||||
Camera component2 = transform2.GetComponent<Camera>();
|
||||
component2.fieldOfView = num;
|
||||
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
DataMgr dataMgr = this.GameMgr.GetDataMgr();
|
||||
if (dataMgr.Is3DSkin(isPlayer: true))
|
||||
{
|
||||
component2.depth = 40f;
|
||||
@@ -1982,7 +1859,7 @@ public class BattleManagerBase
|
||||
|
||||
public bool CanOpenEvolutionConfirmation(BattleCardBase card)
|
||||
{
|
||||
if (IsStopOperate || !card.IsInplay || !card.SelfBattlePlayer.IsSelfTurn || !card.IsPlayer || !card.IsUnit || GameMgr.GetIns().IsWatchBattle)
|
||||
if (IsStopOperate || !card.IsInplay || !card.SelfBattlePlayer.IsSelfTurn || !card.IsPlayer || !card.IsUnit || this.GameMgr.IsWatchBattle)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1994,7 +1871,7 @@ public class BattleManagerBase
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
if (battlePlayer.IsShortageDeckWin)
|
||||
{
|
||||
sequentialVfxPlayer.Register(new DeckOutWinVfx(battlePlayer));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(DeadClass(!battlePlayer.IsPlayer, FINISH_TYPE.SPECIAL_WIN));
|
||||
battlePlayer.Class.OpponentBattlePlayer.Class.FlagCardAsDestroyedBySkill();
|
||||
}
|
||||
@@ -2002,12 +1879,12 @@ public class BattleManagerBase
|
||||
{
|
||||
if (battlePlayer.IsPlayer)
|
||||
{
|
||||
sequentialVfxPlayer.Register(new PlayerDeckOutVfx(BattlePlayer, this));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
BattlePlayer.SetIsShortageDeckLose(flag: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
sequentialVfxPlayer.Register(new EnemyDeckOutVfx(BattleEnemy, this));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
BattleEnemy.SetIsShortageDeckLose(flag: true);
|
||||
}
|
||||
sequentialVfxPlayer.Register(DeadClass(battlePlayer.IsPlayer, FINISH_TYPE.NORMAL));
|
||||
@@ -2114,7 +1991,7 @@ public class BattleManagerBase
|
||||
{
|
||||
if (item.Key.HasOwnerCard())
|
||||
{
|
||||
if (item.Key.IsOwnerCardDead())
|
||||
if (item.Key.IsOwnerCardDead(EnemyFusionCard))
|
||||
{
|
||||
list.Add(item.Key);
|
||||
}
|
||||
@@ -2133,7 +2010,7 @@ public class BattleManagerBase
|
||||
{
|
||||
if (item3.Key.HasOwnerCard())
|
||||
{
|
||||
if (item3.Key.IsOwnerCardDead())
|
||||
if (item3.Key.IsOwnerCardDead(EnemyFusionCard))
|
||||
{
|
||||
list.Add(item3.Key);
|
||||
}
|
||||
@@ -2152,7 +2029,7 @@ public class BattleManagerBase
|
||||
{
|
||||
if (item5.Key.HasOwnerCard())
|
||||
{
|
||||
if (item5.Key.IsOwnerCardDead())
|
||||
if (item5.Key.IsOwnerCardDead(EnemyFusionCard))
|
||||
{
|
||||
list.Add(item5.Key);
|
||||
}
|
||||
@@ -2170,7 +2047,7 @@ public class BattleManagerBase
|
||||
|
||||
protected void SetUpMyRotationBattle(int playerMaxLife, int enemyMaxLife)
|
||||
{
|
||||
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
DataMgr dataMgr = this.GameMgr.GetDataMgr();
|
||||
MyRotationInfo myRotationInfo;
|
||||
bool flag = dataMgr.TryGetPlayerMyRotationInfo(out myRotationInfo);
|
||||
MyRotationInfo myRotationInfo2;
|
||||
@@ -2253,7 +2130,7 @@ public class BattleManagerBase
|
||||
{
|
||||
if (Data.CurrentFormat == Format.Avatar)
|
||||
{
|
||||
GameMgr.GetIns().GetDataMgr();
|
||||
this.GameMgr.GetDataMgr();
|
||||
if (doesPlayerGoFirst)
|
||||
{
|
||||
SetupSpecifiedPlayerAvatarBattle(isPlayer: true);
|
||||
@@ -2269,7 +2146,7 @@ public class BattleManagerBase
|
||||
|
||||
private void SetupSpecifiedPlayerAvatarBattle(bool isPlayer)
|
||||
{
|
||||
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
DataMgr dataMgr = this.GameMgr.GetDataMgr();
|
||||
if ((!isPlayer) ? dataMgr.TryGetEnemyAvatarBattleInfo(out var avatarBattleInfo) : dataMgr.TryGetPlayerAvatarBattleInfo(out avatarBattleInfo))
|
||||
{
|
||||
SetupPlayerAvatarBattle(isPlayer ? ((BattlePlayerBase)BattlePlayer) : ((BattlePlayerBase)BattleEnemy), avatarBattleInfo);
|
||||
@@ -2321,19 +2198,6 @@ public class BattleManagerBase
|
||||
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<BattleCardBase> cards, bool isRecoveryFinish = false)
|
||||
{
|
||||
if (cards.Count == 0)
|
||||
@@ -2387,63 +2251,8 @@ public class BattleManagerBase
|
||||
});
|
||||
}
|
||||
}
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(new WaitLoadResourceVfx(list2, action));
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(parallelVfxPlayer);
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
public VfxBase RecoveryInPlayAndHandCards()
|
||||
{
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
List<BattleCardBase> list = new List<BattleCardBase>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,609 +0,0 @@
|
||||
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<string, Vector3> defPosDict = new Dictionary<string, Vector3>();
|
||||
|
||||
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<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true));
|
||||
}
|
||||
else if (isPuzzleMgr)
|
||||
{
|
||||
UserPanelP.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(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<Texture>(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<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(num2.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true));
|
||||
}
|
||||
else
|
||||
{
|
||||
UserPanelE.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(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<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId, assetTypePlayer, isfetch: true));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(playerClassAssetName, delegate
|
||||
{
|
||||
Toolbox.ResourcesManager.BattleListAssetPathList.Add(playerClassAssetName);
|
||||
CharTextureP.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(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<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(enemySkinId, assetTypeEnemy, isfetch: true));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(enemyClassAssetName, delegate
|
||||
{
|
||||
Toolbox.ResourcesManager.BattleListAssetPathList.Add(enemyClassAssetName);
|
||||
CharTextureE.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(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<BattleMenuUserPanel>().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite);
|
||||
UserPanelE.gameObject.GetComponent<BattleMenuUserPanel>().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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ public class BattlePlayer : BattlePlayerBase
|
||||
|
||||
private BattleUIContainer _battleUIContainer;
|
||||
|
||||
protected CanNotTouchCardVfx _canNotTouchCardVfx;
|
||||
protected VfxBase _canNotTouchCardVfx;
|
||||
|
||||
public bool _isPlayerActive;
|
||||
|
||||
@@ -96,7 +96,7 @@ public class BattlePlayer : BattlePlayerBase
|
||||
PlayerEmotion = _innerOptionsBuilder.CreatePlayerEmotion((IClassBattleCardView)base.Class.BattleCardView);
|
||||
base.OnTurnEnd += (SkillProcessor skill) => InstantVfx.Create(delegate
|
||||
{
|
||||
if (!GameMgr.GetIns().IsWatchBattle)
|
||||
if (!BattleMgr.GameMgr.IsWatchBattle)
|
||||
{
|
||||
PlayerBattleView.TurnEndButtonUI.ChangeButtonView(base.IsSelfTurn);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public class BattlePlayer : BattlePlayerBase
|
||||
ITurnEndButtonUI turnEndButtonUI = PlayerBattleView.TurnEndButtonUI;
|
||||
if (!turnEndButtonUI.GameObject.activeSelf)
|
||||
{
|
||||
GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_UI_TURN_1, turnEndButtonUI.GetBtnPosition());
|
||||
BattleMgr.GameMgr.GetEffectMgr().Start(EffectMgr.EffectType.CMN_UI_TURN_1, turnEndButtonUI.GetBtnPosition());
|
||||
}
|
||||
turnEndButtonUI.GameObject.SetActive(value: true);
|
||||
turnEndButtonUI.EnableButton();
|
||||
@@ -167,12 +167,12 @@ public class BattlePlayer : BattlePlayerBase
|
||||
{
|
||||
if (_canNotTouchCardVfx == null)
|
||||
{
|
||||
_canNotTouchCardVfx = new CanNotTouchCardVfx();
|
||||
BattleManagerBase.GetIns().VfxMgr.RegisterImmediateVfx(_canNotTouchCardVfx);
|
||||
_canNotTouchCardVfx = NullVfx.GetInstance();
|
||||
BattleMgr.VfxMgr.RegisterImmediateVfx(_canNotTouchCardVfx);
|
||||
}
|
||||
if (GameMgr.GetIns().IsNetworkBattle)
|
||||
if (BattleMgr.GameMgr.IsNetworkBattle)
|
||||
{
|
||||
NetworkBattleManagerBase networkBattleManagerBase = BattleManagerBase.GetIns() as NetworkBattleManagerBase;
|
||||
NetworkBattleManagerBase networkBattleManagerBase = BattleMgr as NetworkBattleManagerBase;
|
||||
if (networkBattleManagerBase.turnEndTimeController != null)
|
||||
{
|
||||
networkBattleManagerBase.turnEndTimeController.AddTurnEndTimerLog("TurnStart" + log);
|
||||
@@ -194,7 +194,7 @@ public class BattlePlayer : BattlePlayerBase
|
||||
public override VfxBase UsePp(int pp, bool isNewReplayMoveTurn = false)
|
||||
{
|
||||
base.UsePp(pp);
|
||||
if (BattleManagerBase.IsForecast)
|
||||
if (this.BattleMgr.InstanceIsForecast)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
@@ -218,7 +218,7 @@ public class BattlePlayer : BattlePlayerBase
|
||||
public override VfxBase TurnEnd()
|
||||
{
|
||||
bool flag = false;
|
||||
if (BattleManagerBase.GetIns().VfxMgr.IsEnd && IsTimeOverTurnEndProcessing)
|
||||
if (BattleMgr.VfxMgr.IsEnd && IsTimeOverTurnEndProcessing)
|
||||
{
|
||||
base.HandControl.RearrangeHand(0.4f, base.HandCardList.ConvertToViewList());
|
||||
flag = true;
|
||||
@@ -267,14 +267,13 @@ public class BattlePlayer : BattlePlayerBase
|
||||
{
|
||||
TurnStartEffectEnd();
|
||||
EnableBattleMenu();
|
||||
if (!GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle)
|
||||
if (!BattleMgr.GameMgr.IsWatchBattle && !BattleMgr.GameMgr.IsReplayBattle)
|
||||
{
|
||||
ITurnEndButtonUI turnEndButtonUI = PlayerBattleView.TurnEndButtonUI;
|
||||
turnEndButtonUI.StartTurnEndCountdown();
|
||||
turnEndButtonUI.ChangeButtonView(base.IsSelfTurn);
|
||||
GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_UI_TURN_1, turnEndButtonUI.GetBtnPosition());
|
||||
BattleMgr.GameMgr.GetEffectMgr().Start(EffectMgr.EffectType.CMN_UI_TURN_1, turnEndButtonUI.GetBtnPosition());
|
||||
}
|
||||
_canNotTouchCardVfx.End();
|
||||
_canNotTouchCardVfx = null;
|
||||
if (!IsGameFirst || Turn != 1)
|
||||
{
|
||||
@@ -295,22 +294,13 @@ public class BattlePlayer : BattlePlayerBase
|
||||
handCard.BattleCardView.areArrowsForcedOff = areArrowsForcedOff;
|
||||
handCard.BattleCardView.UpdateMovability();
|
||||
}
|
||||
if (base.IsSelfTurn && !GameMgr.GetIns().IsNewReplayBattle)
|
||||
if (base.IsSelfTurn && !BattleMgr.GameMgr.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<BattleCardBase> cardsToMoveToHand)
|
||||
{
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
@@ -331,7 +321,7 @@ public class BattlePlayer : BattlePlayerBase
|
||||
|
||||
public override EffectBattle GetSkillEffect(string skillEffectPath)
|
||||
{
|
||||
return GameMgr.GetIns().GetEffectMgr().GetEffectBattle(skillEffectPath);
|
||||
return BattleMgr.GameMgr.GetEffectMgr().GetEffectBattle(skillEffectPath);
|
||||
}
|
||||
|
||||
public override Vector3 GetFieldCenterPosition()
|
||||
|
||||
@@ -114,14 +114,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
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;
|
||||
@@ -193,8 +185,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
}
|
||||
}
|
||||
|
||||
public const int MAX_PP = 10;
|
||||
|
||||
public List<BattleCardBase> SelfDiscardList = new List<BattleCardBase>();
|
||||
|
||||
protected BattlePlayerBase _opponentBattlePlayer;
|
||||
@@ -209,8 +199,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
|
||||
protected int m_EpTotal;
|
||||
|
||||
private const int MAX_BP = 99;
|
||||
|
||||
public bool CantPlayChoiceBrave;
|
||||
|
||||
public HashSet<BattleCardBase> PredictionWarningCards = new HashSet<BattleCardBase>();
|
||||
@@ -235,18 +223,10 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
|
||||
public List<AvatarBattleDescInfo> 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;
|
||||
@@ -363,7 +343,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
List<int> 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);
|
||||
BattleCardBase item = BattleMgr.CreateTransformCardRegisterVfx(Class, list2[num], IsPlayer, null, isRecoveryFinish: false, isChoice: true);
|
||||
list.Add(item);
|
||||
}
|
||||
return list;
|
||||
@@ -414,8 +394,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
}
|
||||
}
|
||||
|
||||
public BattleCardBase LowestCostChoiceBraveCard => ChoiceBraveCards.OrderBy((BattleCardBase c) => c.Cost).FirstOrDefault();
|
||||
|
||||
public bool IsShortageDeckLose { get; protected set; }
|
||||
|
||||
public bool IsShortageDeckWin => Class.SkillApplyInformation.IsShortageDeckWin;
|
||||
@@ -484,8 +462,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
}
|
||||
}
|
||||
|
||||
public IClassInfomationUI _classInfomationUI { get; protected set; }
|
||||
|
||||
public ClassInformationUIController ClassInformationUIController { get; protected set; }
|
||||
|
||||
public bool IsBuffDetail
|
||||
@@ -536,8 +512,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
|
||||
public BattleCardBase DrewSkillCard { get; set; }
|
||||
|
||||
public BattleCardBase ReturnSkillCard { get; set; }
|
||||
|
||||
public List<BattleCardBase> EvolvedCards { get; set; }
|
||||
|
||||
public List<BattleCardBase> DestroyedWhenDestroyCards { get; set; }
|
||||
@@ -688,8 +662,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
|
||||
public IEnumerable<TurnAndCard> SkillInfoGameTurnPlayCards => GameTurnPlayCards;
|
||||
|
||||
public IEnumerable<TurnAndCard> SkillInfoGameEnhancePlayCards => GameEnhancePlayCards;
|
||||
|
||||
public IEnumerable<IReadOnlyBattleCardInfo> SkillInfoGameCrystallizedPlayCards => ConvertToSkillInfoCollection(GameCrystallizedPlayCards);
|
||||
|
||||
public IEnumerable<IReadOnlyBattleCardInfo> SkillInfoGameSkillActivated => ConvertToSkillInfoCollection(ChoiceBraveCardList);
|
||||
@@ -773,20 +745,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
}
|
||||
}
|
||||
|
||||
public List<BattleCardBase> AllCardsWithSkillIngredient
|
||||
{
|
||||
get
|
||||
{
|
||||
List<BattleCardBase> list = AllCardsWithCemeteryAndBanish.ToList();
|
||||
list.AddRange(FusionIngredientList);
|
||||
list.AddRange(GetOnList);
|
||||
list.AddRange(UniteList);
|
||||
list.AddRange(ReservedCardList);
|
||||
list.AddRange(BlackHole);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<BattleCardBase> InPlayCards
|
||||
{
|
||||
get
|
||||
@@ -1016,11 +974,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
IsShortageDeck = false;
|
||||
}
|
||||
|
||||
public void SetCumulativeEvolutionCount(int count)
|
||||
{
|
||||
_cumulativeEvolutionCount = count;
|
||||
}
|
||||
|
||||
public int AddDamageByClassUseCard(string damageType)
|
||||
{
|
||||
if (Class != null)
|
||||
@@ -1041,7 +994,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
protected BattlePlayerBase(BattleManagerBase battleMgr, BattleCamera battleCamera, BackGroundBase backGround, IInnerOptionsBuilder innerOptionsBuilder)
|
||||
{
|
||||
BattleMgr = battleMgr;
|
||||
_dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
_dataMgr = BattleMgr.GameMgr.GetDataMgr();
|
||||
BattleCamera = battleCamera;
|
||||
BackGround = backGround;
|
||||
_innerOptionsBuilder = innerOptionsBuilder;
|
||||
@@ -1131,12 +1084,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
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;
|
||||
@@ -1144,9 +1091,9 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
_cumulativeEvolutionCount = 0;
|
||||
_opponentBattlePlayer = opponentBattlePlayer;
|
||||
_opponentBattlePlayer.Class.ChangeClassClanParameter();
|
||||
GameMgr ins = GameMgr.GetIns();
|
||||
GameMgr ins = BattleMgr.GameMgr;
|
||||
List<IClassInfomationUI> list = new List<IClassInfomationUI>();
|
||||
BattleManagerBase ins2 = BattleManagerBase.GetIns();
|
||||
BattleManagerBase ins2 = BattleMgr;
|
||||
if (IsPlayer)
|
||||
{
|
||||
int key = (IsPlayer ? ins.GetNetworkUserInfoData().GetSelfChaosId() : ins.GetNetworkUserInfoData().GetOpponentChaosId());
|
||||
@@ -1336,57 +1283,9 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}));
|
||||
return null;
|
||||
}
|
||||
|
||||
public abstract void SetupClone(BattlePlayerBase sourceBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags);
|
||||
@@ -1438,7 +1337,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
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)
|
||||
if (BattleMgr.GameMgr.IsWatchBattle && !BattleMgr.GameMgr.IsReplayBattle)
|
||||
{
|
||||
processor.OnFusionComplete = (Action)Delegate.Combine(processor.OnFusionComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent));
|
||||
}
|
||||
@@ -1469,7 +1368,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
|
||||
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);
|
||||
BattleCardBase battleCardBase = CardCreatorBase.CreateCard(cardId, IsPlayer, cardIndex, BattleMgr.SBattleLoad, BattleMgr, BattleMgr.BattleResourceMgr, _innerOptionsBuilder, isChoiceBrave);
|
||||
SetupCardEvent(battleCardBase);
|
||||
return battleCardBase;
|
||||
}
|
||||
@@ -1584,7 +1483,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
{
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
if (!GameMgr.GetIns().IsAdminWatch && !GameMgr.GetIns().IsReplayBattle)
|
||||
if (!BattleMgr.GameMgr.IsAdminWatch && !BattleMgr.GameMgr.IsReplayBattle)
|
||||
{
|
||||
BattleLogManager.GetInstance().AddFusionIngredients(fusionCard, isCreateClone: false);
|
||||
}
|
||||
@@ -1604,7 +1503,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
sequentialVfxPlayer.Register(parallelVfxPlayer);
|
||||
TurnFusionCards.Add(fusionCard);
|
||||
AddCurrentTurnFusionCount(1);
|
||||
if (GameMgr.GetIns().IsAdminWatch || GameMgr.GetIns().IsReplayBattle)
|
||||
if (BattleMgr.GameMgr.IsAdminWatch || BattleMgr.GameMgr.IsReplayBattle)
|
||||
{
|
||||
BattleLogManager.GetInstance().AddFusionIngredients(fusionCard, isCreateClone: true);
|
||||
}
|
||||
@@ -1618,7 +1517,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
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);
|
||||
@@ -1891,10 +1789,10 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
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)
|
||||
if (!this.BattleMgr.InstanceIsForecast)
|
||||
{
|
||||
sequentialVfxPlayer.Register(new DeckChangeVfx(this));
|
||||
sequentialVfxPlayer.Register(new DummyDeckRemoveCardVfx(IsPlayer, 1));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
}
|
||||
sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor));
|
||||
@@ -2033,7 +1931,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
SkillProcessor skillProcessor = new SkillProcessor();
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
_ = PpTotal;
|
||||
GameMgr.GetIns().GetDataMgr();
|
||||
BattleMgr.GameMgr.GetDataMgr();
|
||||
int num = 0;
|
||||
IDetailPanelControl detailPanelControl = BattleMgr.DetailMgr.DetailPanelControl;
|
||||
if (EvolveWaitTurnCount <= 0)
|
||||
@@ -2128,7 +2026,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
}
|
||||
sequentialVfxPlayer.Register(TurnStartDraw(skillProcessor));
|
||||
sequentialVfxPlayer.Register(skillProcessor.Process(battlePlayerPair));
|
||||
BattleUIContainer battleUIContainer = BattleManagerBase.GetIns().BattleUIContainer;
|
||||
BattleUIContainer battleUIContainer = BattleMgr.BattleUIContainer;
|
||||
sequentialVfxPlayer.Register(InstantVfx.Create(delegate
|
||||
{
|
||||
battleUIContainer.EnableMenu();
|
||||
@@ -2140,9 +2038,9 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
BattleLogManager.GetInstance().EndLogBlockTurnChangeReactive();
|
||||
if (!BattleMgr.IsBattleEnd)
|
||||
{
|
||||
if (GameMgr.GetIns().IsNetworkBattle && IsPlayer)
|
||||
if (BattleMgr.GameMgr.IsNetworkBattle && IsPlayer)
|
||||
{
|
||||
NetworkBattleManagerBase networkBattleManagerBase = BattleManagerBase.GetIns() as NetworkBattleManagerBase;
|
||||
NetworkBattleManagerBase networkBattleManagerBase = BattleMgr as NetworkBattleManagerBase;
|
||||
if (networkBattleManagerBase.turnEndTimeController != null)
|
||||
{
|
||||
networkBattleManagerBase.turnEndTimeController.AddTurnEndTimerLog("Player SetActiveVFX");
|
||||
@@ -2188,7 +2086,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
sequentialVfxPlayer.Register(m_vfxCreator.CreateUpdateEp(CurrentEpCount, EvolveWaitTurnCount));
|
||||
if (NowTurnEvol && CurrentEpCount > 0 && EvolveWaitTurnCount <= 0)
|
||||
{
|
||||
sequentialVfxPlayer.Register(new TurnStartEvolveVfx(eqIcon, firstEvolve));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2197,9 +2095,9 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
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)
|
||||
if (BattleMgr.GameMgr.IsWatchBattle || BattleMgr.GameMgr.IsReplayBattle)
|
||||
{
|
||||
BattleView.TurnEndButtonUI.GameObject.SetActive(value: true);
|
||||
BattleView.TurnEndButtonUI.ChangeButtonView(IsPlayer);
|
||||
@@ -2207,7 +2105,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
}));
|
||||
if (NowTurnEvol && CurrentEpCount > 0 && EvolveWaitTurnCount <= 0)
|
||||
{
|
||||
sequentialVfxPlayer.Register(new TurnStartEvolveVfx(eqIcon, firstEvolve));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
sequentialVfxPlayer.Register(WaitVfx.Create(1.6f));
|
||||
}
|
||||
@@ -2218,7 +2116,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
{
|
||||
DeckCardList.Sort((BattleCardBase a, BattleCardBase b) => a.Index - b.Index);
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
if (!Class.IsDead && !_opponentBattlePlayer.Class.IsDead && !BattleManagerBase.GetIns().IsPuzzleMgr)
|
||||
if (!Class.IsDead && !_opponentBattlePlayer.Class.IsDead && !BattleMgr.IsPuzzleMgr)
|
||||
{
|
||||
sequentialVfxPlayer.Register(TurnStartDrawCard(skillProcessor));
|
||||
}
|
||||
@@ -2286,7 +2184,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
text = text + "nowPP " + Pp;
|
||||
LocalLog.AccumulateLastTraceLog(text);
|
||||
}
|
||||
parallelVfxPlayer.Register(new PpChangeVfx(this));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
this.OnChangePP.Call(PpTotal - ppTotal);
|
||||
this.OnAddPpTotal.Call(PpTotal - ppTotal, Pp, IsPlayer, ownerCard, bySkill);
|
||||
if (skillProcessor != null)
|
||||
@@ -2551,8 +2449,8 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
break;
|
||||
case SkillBaseSummon.SUMMON_TYPE.DECK:
|
||||
DeckCardToField(unit, skill);
|
||||
sequentialVfxPlayer.Register(new DeckChangeVfx(this));
|
||||
sequentialVfxPlayer.Register(new DummyDeckRemoveCardVfx(IsPlayer, 1));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
break;
|
||||
case SkillBaseSummon.SUMMON_TYPE.TOKEN:
|
||||
TokenToField(unit, skill, isGetoff, isReanimate);
|
||||
@@ -3117,16 +3015,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
return result;
|
||||
}
|
||||
|
||||
public void RegisterSkill(IBattlePlayerSkill battlePlayerSkill)
|
||||
{
|
||||
_skillList.Add(battlePlayerSkill);
|
||||
}
|
||||
|
||||
public void UnregisterSkill(IBattlePlayerSkill battlePlayerSkill)
|
||||
{
|
||||
_skillList.Remove(battlePlayerSkill);
|
||||
}
|
||||
|
||||
private void CallSkill(Func<IBattlePlayerSkill, Func<BattleCardBase, VfxBase>> getFunc, BattleCardBase targetCard)
|
||||
{
|
||||
foreach (IBattlePlayerSkill skill in _skillList)
|
||||
@@ -3159,11 +3047,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase MoveToDeck(List<BattleCardBase> cardsToMoveToDeck)
|
||||
{
|
||||
return new MoveToDeckVfx(cardsToMoveToDeck, IsPlayer);
|
||||
}
|
||||
|
||||
protected virtual VfxWith<IEnumerable<BattleCardBase>> LotteryRandomDrawCard(int drawCount, SkillProcessor skillProcessor)
|
||||
{
|
||||
List<BattleCardBase> list = new List<BattleCardBase>();
|
||||
@@ -3171,7 +3054,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
{
|
||||
return new VfxWith<IEnumerable<BattleCardBase>>(SendShortageDeck(), list);
|
||||
}
|
||||
if (BattleManagerBase.IsRandomDraw)
|
||||
if (this.BattleMgr.InstanceIsRandomDraw)
|
||||
{
|
||||
list = SkillRandomSelectFilter.Filtering(drawCount, DeckCardList, BattleMgr).ToList();
|
||||
}
|
||||
@@ -3209,7 +3092,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
{
|
||||
resultInfo.drawCards = ConvertToSkillInfoCollection(vfxWith.Value);
|
||||
}
|
||||
if (IsPlayer || GameMgr.GetIns().IsAdminWatch || isVisible || BattleMgr is SingleBattleMgr)
|
||||
if (IsPlayer || BattleMgr.GameMgr.IsAdminWatch || isVisible || BattleMgr is SingleBattleMgr)
|
||||
{
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
foreach (BattleCardBase card in drawCards)
|
||||
@@ -3229,16 +3112,16 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
}
|
||||
if (IsPlayer)
|
||||
{
|
||||
sequentialVfxPlayer.Register(new PlayerDrawCardVfx(drawCards, isVisible));
|
||||
sequentialVfxPlayer.Register(new PlayerEndDrawVfx(drawCards));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(GameMgr.GetIns().IsAdminWatch && isVisible))
|
||||
if (!(BattleMgr.GameMgr.IsAdminWatch && isVisible))
|
||||
{
|
||||
sequentialVfxPlayer.Register(new OpponentDrawCardVfx(drawCards, isVisible));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
sequentialVfxPlayer.Register(new OpponentDrawCardToHandVfx(drawCards, 0.4f, isVisible));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
}
|
||||
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
|
||||
vfxWithLoadingSequential.RegisterToMainVfx(InstantVfx.Create(delegate
|
||||
@@ -3428,42 +3311,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
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<BattleCardBase> targetCardList, List<int> addCountList)
|
||||
{
|
||||
List<BattleCardBase> list = new List<BattleCardBase>();
|
||||
@@ -3474,7 +3321,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
BattleCardBase battleCardBase = targetCardList[i];
|
||||
int num = addCountList[i];
|
||||
battleCardBase.AddSpellChargeCount(num);
|
||||
if ((!battleCardBase.IsPlayer && !GameMgr.GetIns().IsAdminWatch) || battleCardBase.IsInDeck)
|
||||
if ((!battleCardBase.IsPlayer && !BattleMgr.GameMgr.IsAdminWatch) || battleCardBase.IsInDeck)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -3491,7 +3338,7 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
list3.Add(Skill_spell_charge.SPELL_CHARGE_INTERVAL);
|
||||
}
|
||||
}
|
||||
return new SpellChargeSkillActivationVfx(list, list2, list3);
|
||||
return VfxWithLoadingSequential.Create();
|
||||
}
|
||||
|
||||
public abstract EffectBattle GetSkillEffect(string skillEffectPath);
|
||||
@@ -4206,9 +4053,8 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
|
||||
public IEnumerable<IReadOnlyBattleCardInfo> GetSpecificTurnDestroyCards(TurnPlayerInfo turnPlayerInfo)
|
||||
{
|
||||
BattleManagerBase ins = BattleManagerBase.GetIns();
|
||||
bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer;
|
||||
int turn = (isCheckSelf ? ins.BattlePlayer.Turn : ins.BattleEnemy.Turn);
|
||||
int turn = (isCheckSelf ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn);
|
||||
turn -= turnPlayerInfo.TurnOffset;
|
||||
return from c in TurnDestroyCards
|
||||
where c.IsSelfTurn == isCheckSelf && c.Turn == turn
|
||||
@@ -4349,49 +4195,6 @@ public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo
|
||||
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<Vector3> 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<BattleCardBase> drawList, List<BattleCardBase> targets, bool isPlayer, bool isOpen, bool isReserved)
|
||||
{
|
||||
this.OnTokenDrawCards.Call(owner, drawList, targets, isPlayer, isOpen, isReserved);
|
||||
|
||||
@@ -1,69 +1,32 @@
|
||||
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<IStatusPanelControl>().SetPp(pp, maxPp, newReplayMoveTurn);
|
||||
}));
|
||||
}
|
||||
return ParallelVfxPlayer.Create(new LoadAndPlayEffectVfx("cmn_ui_cost_1", null, labelPosition, 0f), InstantVfx.Create(delegate
|
||||
{
|
||||
m_battleView.StatusParentPanel.GetComponent<IStatusPanelControl>().SetPp(pp, maxPp, newReplayMoveTurn);
|
||||
}));
|
||||
}
|
||||
|
||||
public VfxBase CreateUseBp(int bp, int deltaBp, Func<Vector3> 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<BattleCardBase> cards, bool isOpenDrawSkill)
|
||||
{
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
foreach (BattleCardBase card in cards)
|
||||
{
|
||||
if (card.BaseCost != card.Cost)
|
||||
{
|
||||
List<int> 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;
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Wizard.Battle.View;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
|
||||
public class BattlePlayerVfxCreatorBase : IBattlePlayerVfxCreator
|
||||
{
|
||||
public BattlePlayerVfxCreatorBase(IBattlePlayerView battleView)
|
||||
{
|
||||
}
|
||||
|
||||
public VfxBase CreateUsePp(int pp, int maxPp, Vector3 labelPosition, bool newReplayMoveTurn)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public VfxBase CreateUseBp(int bp, int deltaBp, Func<Vector3> getPosition, bool isVariableCost, bool isSelf)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public VfxBase CreateUpdateEp(int evolCount, int evolveWaitTurnCount)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public VfxBase CreateCardDraw(IEnumerable<BattleCardBase> cards, bool isOpenDrawSkill)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Wizard.Battle;
|
||||
|
||||
public static class BattlePlayersExtension
|
||||
{
|
||||
public static IEnumerable<IReadOnlyBattleCardInfo> AllCards(this IEnumerable<IBattlePlayerReadOnlyInfo> battlePlayerInfos)
|
||||
{
|
||||
List<IReadOnlyBattleCardInfo> list = new List<IReadOnlyBattleCardInfo>();
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,916 +1,22 @@
|
||||
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<string, Vector3> DefaultPosDict = new Dictionary<string, Vector3>();
|
||||
|
||||
private int _classLv;
|
||||
|
||||
private int _classLvPrev;
|
||||
|
||||
private int _classLvMax;
|
||||
|
||||
private int _classExp;
|
||||
|
||||
private int _nowClassExp;
|
||||
|
||||
private int _nextClassExp;
|
||||
|
||||
private IList<NguiObjs> _missionLogList = new List<NguiObjs>();
|
||||
|
||||
private int _beforeClassExp;
|
||||
|
||||
private IList<int> _classExpList = new List<int>();
|
||||
|
||||
private bool _isResultTutorial;
|
||||
|
||||
private bool _isUsingSpecialDeck;
|
||||
|
||||
private int _usingSpecialDeckClassId;
|
||||
|
||||
private List<string> _resultAssetList = new List<string>();
|
||||
|
||||
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<GameObject> list = new List<GameObject>();
|
||||
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<QuestSpecialBattleResult>());
|
||||
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<BattlePassResultPanel>();
|
||||
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>();
|
||||
uITable.columns = 1;
|
||||
uITable.keepWithinPanel = true;
|
||||
uITable.cellAlignment = UIWidget.Pivot.Center;
|
||||
uITable.pivot = UIWidget.Pivot.Center;
|
||||
ResourceHandler resourceHandler = base.gameObject.AddMissingComponent<ResourceHandler>();
|
||||
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<UISprite>().width = 800;
|
||||
obj.GetComponent<AchievementWindowBase>().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<NotificatonAnimation.Param> list = new List<NotificatonAnimation.Param>();
|
||||
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<NotificatonAnimation.Param> paramList)
|
||||
{
|
||||
if (_notificationAnimation != null)
|
||||
{
|
||||
UnityEngine.Object.Destroy(_notificationAnimation.gameObject);
|
||||
_notificationAnimation = null;
|
||||
}
|
||||
_notificationAnimation = NGUITools.AddChild(_notificationAnimationParent, _notificationAnimationPrefab.gameObject).GetComponent<NotificatonAnimation>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
// PASS-8/Phase-1 STUB: 776-line client-side battle-result UI. Held on BattleManagerBase
|
||||
// as `public BattleResultUIController BattleResultControl` and carried into 6 NextSceneSelector
|
||||
// variants (Arena/Colosseum/FreeMatch/NetworkMatch/Practice/Null) + 3 ResultAnimationAgent
|
||||
// subclasses. Headless never runs the result screen; all instance-method calls happen on the
|
||||
// null field (mgr.BattleResultControl stays null in headless). Reduced to the compile-time
|
||||
// surface the ctor-params + external touches require. The 3 static color constants and 6
|
||||
// externally-touched members (TitleWin, TitleLose, IsResultOn, AlreadyResultRecovery,
|
||||
// StartUI, SetSpecialResultTypeText) are kept as no-op/default returns.
|
||||
public class BattleResultUIController : MonoBehaviour
|
||||
{
|
||||
|
||||
public UISprite TitleWin;
|
||||
public UISprite TitleLose;
|
||||
|
||||
public bool IsResultOn { get; private set; }
|
||||
public bool AlreadyResultRecovery { get; set; }
|
||||
|
||||
public void StartUI(bool win, BattleCamera battleCamera) { }
|
||||
public void SetSpecialResultTypeText(string text) { }
|
||||
}
|
||||
|
||||
@@ -41,8 +41,7 @@ public class BattleSettingData
|
||||
int num = jsonData["deck_skin_id_override"].ToInt();
|
||||
if (num == 0)
|
||||
{
|
||||
return GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(deckClassId, isCurrentChara: false)
|
||||
.skin_id;
|
||||
return 0; // Pre-Phase-5b: no chara master headless
|
||||
}
|
||||
return num;
|
||||
}
|
||||
@@ -56,8 +55,7 @@ public class BattleSettingData
|
||||
}
|
||||
if (baseCharaId == 0)
|
||||
{
|
||||
return GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(classId, isCurrentChara: false)
|
||||
.chara_id;
|
||||
return 0; // Pre-Phase-5b: no chara master headless
|
||||
}
|
||||
return baseCharaId;
|
||||
}
|
||||
@@ -106,8 +104,7 @@ public class BattleSettingData
|
||||
|
||||
private static string GetEmotionId(int charaId, int? variationId)
|
||||
{
|
||||
int skin_id = GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(charaId)
|
||||
.skin_id;
|
||||
int skin_id = 0; // Pre-Phase-5b: no chara master headless
|
||||
if (!variationId.HasValue)
|
||||
{
|
||||
return $"{skin_id}";
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,468 +0,0 @@
|
||||
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<UIGrid> _stagePageList = new List<UIGrid>();
|
||||
|
||||
[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<UISprite> _radioIconClones;
|
||||
|
||||
private List<PageData> _pageList = new List<PageData>();
|
||||
|
||||
private int _maxSelectStageNum;
|
||||
|
||||
private bool _isScroll = true;
|
||||
|
||||
private int _loadDoneStageTextureNum;
|
||||
|
||||
private const int MAXNUM_STAGE_PER_TABLE = 9;
|
||||
|
||||
private List<string> _loadedResourceList = new List<string>();
|
||||
|
||||
public bool[] SettingOffStageIndexs { get; private set; }
|
||||
|
||||
public Action<bool> 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<UISprite>();
|
||||
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<Texture>(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<TweenScale>();
|
||||
if ((bool)scl)
|
||||
{
|
||||
scl.PlayForward();
|
||||
while (Input.GetMouseButton(0))
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
scl.PlayReverse();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList);
|
||||
_loadedResourceList = null;
|
||||
}
|
||||
}
|
||||
@@ -1,584 +1,10 @@
|
||||
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<string, Vector3> DefaultPosDict = new Dictionary<string, Vector3>();
|
||||
|
||||
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<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true));
|
||||
}
|
||||
else if (isPuzzleMgr)
|
||||
{
|
||||
UserPanelP.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(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<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true));
|
||||
}
|
||||
else if (isPuzzleMgr)
|
||||
{
|
||||
UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(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<Texture>(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<Texture>(Toolbox.ResourcesManager.GetAssetTypePath(dataMgr.BossRushBattleData.EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true));
|
||||
}
|
||||
else
|
||||
{
|
||||
UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(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<BattleStartUserPanel>().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite);
|
||||
UserPanelE.gameObject.GetComponent<BattleStartUserPanel>().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);
|
||||
}
|
||||
}
|
||||
using UnityEngine;
|
||||
|
||||
// PASS-8/Phase-1 STUB: 253-line battle-start intro UI. Only referenced from
|
||||
// SBattleLoad.cs:249 as a GetComponent<>() attach that immediately calls SetUp(this).
|
||||
// Held on BattleManagerBase.BattleStartControl field (nulled at battle start/end).
|
||||
// Headless never runs the intro animation.
|
||||
public class BattleStartControl : MonoBehaviour
|
||||
{
|
||||
public void SetUp(SBattleLoad load) { }
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ using Cute;
|
||||
|
||||
public class BattleStopChecker : NetworkBattleIntervalCheckerBase
|
||||
{
|
||||
private const int JUDGE_RESULT_RETRY_TIMER = 95;
|
||||
|
||||
public event Action OnBattleStop;
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ using Wizard;
|
||||
|
||||
public class BattleUIContainer : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
public BattleButtonControl ButtonControl;
|
||||
|
||||
[SerializeField]
|
||||
private WizardUIButton BattleMenuBtn;
|
||||
@@ -19,82 +17,16 @@ public class BattleUIContainer : MonoBehaviour
|
||||
[SerializeField]
|
||||
private GameObject _battery;
|
||||
|
||||
private const float LONG_PRESS_TIME = 0.2f;
|
||||
|
||||
private float? _predictionWaitTime;
|
||||
|
||||
public Action<bool> 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)
|
||||
@@ -110,15 +42,6 @@ public class BattleUIContainer : MonoBehaviour
|
||||
_enableMenuRequest = true;
|
||||
}
|
||||
|
||||
private void TryEnableMenu()
|
||||
{
|
||||
if (BattleManagerBase.GetIns().GetBattlePlayer(isPlayer: true).BattleView.IsTouchable())
|
||||
{
|
||||
EnableMenu();
|
||||
_enableMenuRequest = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void ForceEnableMenu()
|
||||
{
|
||||
_forceDisableMenu = false;
|
||||
@@ -127,7 +50,11 @@ public class BattleUIContainer : MonoBehaviour
|
||||
|
||||
public void DisableMenu(bool isForceDisable = false)
|
||||
{
|
||||
if (isForceDisable || (!BattleManagerBase.GetIns().IsRecovery && !GameMgr.GetIns().IsReplayBattle && !GameMgr.GetIns().IsWatchBattle))
|
||||
// Pre-Phase-5b: gate was `isForceDisable || (!IsRecovery && !IsReplayBattle && !IsWatchBattle)`.
|
||||
// IsReplayBattle/IsWatchBattle are const-false in headless (Phase 4); the mgr's IsRecovery
|
||||
// state is entirely a UI-hint concern here. Collapsing the branch to `isForceDisable` matches
|
||||
// the semantic in the only path that matters headless (button visibility never observed).
|
||||
if (isForceDisable)
|
||||
{
|
||||
BattleMenuBtn.isEnabled = false;
|
||||
SetEnableReset(isEnable: false);
|
||||
@@ -144,77 +71,17 @@ public class BattleUIContainer : MonoBehaviour
|
||||
|
||||
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);
|
||||
}
|
||||
// Puzzle-mode only. Headless never runs PuzzleBattleManager; the branch was dead
|
||||
// past the type check, so dropping the ambient reach preserves runtime behavior.
|
||||
}
|
||||
|
||||
public void SetEnableHint(bool isEnable)
|
||||
{
|
||||
BattleManagerBase ins = BattleManagerBase.GetIns();
|
||||
if (ins is PuzzleBattleManager)
|
||||
{
|
||||
(ins as PuzzleBattleManager).HintButton.isEnabled = isEnable;
|
||||
}
|
||||
// Puzzle-mode only. See SetEnableReset — dropping the ambient reach is a no-op.
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,22 +23,6 @@ public class BetterList<T>
|
||||
}
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
[DebuggerStepThrough]
|
||||
public IEnumerator<T> 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]);
|
||||
@@ -74,12 +58,6 @@ public class BetterList<T>
|
||||
size = 0;
|
||||
}
|
||||
|
||||
public void Release()
|
||||
{
|
||||
size = 0;
|
||||
buffer = null;
|
||||
}
|
||||
|
||||
public void Add(T item)
|
||||
{
|
||||
if (buffer == null || size == buffer.Length)
|
||||
@@ -89,63 +67,6 @@ public class BetterList<T>
|
||||
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)
|
||||
@@ -199,31 +120,4 @@ public class BetterList<T>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
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<BGM_TYPE, BgmInfo> 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<BGM_TYPE, BgmInfo>();
|
||||
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<BGM_TYPE, BgmInfo> 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;
|
||||
}
|
||||
}
|
||||
@@ -1,163 +0,0 @@
|
||||
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<Coroutine> _inProcessCoroutines = new List<Coroutine>();
|
||||
|
||||
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<string> PlayEffect(string effectName, bool isOnBottom)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
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<string> PlayDustEffect(string effectName, GameObject dustEffectContainer, float fallTime, float endWorldPosY, float delayTime)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
_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;
|
||||
}
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
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<Coroutine> _inProcessCoroutines = new List<Coroutine>();
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,395 +0,0 @@
|
||||
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<SkillBase> 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<BuffInfo> 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<Skill_shield> 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<Skill_damage_cut> 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<int> 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<NetworkBattleReceiver.ReplayBuffInfoLabel> 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<SkillBase> GetAllBuffSkills(BattleCardBase cardBase, List<SkillBase> buffSkills)
|
||||
{
|
||||
List<SkillBase> list = new List<SkillBase>();
|
||||
foreach (SkillBase buffSkill in buffSkills)
|
||||
{
|
||||
if (buffSkill is Skill_attach_skill)
|
||||
{
|
||||
IEnumerable<SkillBase> 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;
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,6 @@ using Wizard;
|
||||
|
||||
public class BuffInfo
|
||||
{
|
||||
public List<int> CopiedSkillDescriptionValueList = new List<int>();
|
||||
|
||||
public List<int> CopiedEvoSkillDescriptionValueList = new List<int>();
|
||||
|
||||
public int BaseCardIDFrom { get; private set; }
|
||||
|
||||
@@ -61,11 +58,6 @@ public class BuffInfo
|
||||
}
|
||||
}
|
||||
|
||||
public string GetAttachFromCardName()
|
||||
{
|
||||
return CardMaster.GetInstanceForBattle().GetCardParameterFromId(BaseCardIDFrom).CardName;
|
||||
}
|
||||
|
||||
public void SetPreviousOwner(BattleCardBase card)
|
||||
{
|
||||
PreviousOwner = card;
|
||||
@@ -102,18 +94,4 @@ public class BuffInfo
|
||||
}
|
||||
return SkillFrom == skill;
|
||||
}
|
||||
|
||||
public BattleCardBase GetDisplayCard()
|
||||
{
|
||||
BattleCardBase result = OwnerCard;
|
||||
if (PreviousOwner != null)
|
||||
{
|
||||
result = PreviousOwner;
|
||||
}
|
||||
if (IsSaveBurialRiteSkill || IsGetonSkill || IsReserveTokenDrawSkill)
|
||||
{
|
||||
result = TargetCard;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user