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:
@@ -23,7 +23,7 @@ public interface IMulliganMgr
|
||||
|
||||
VfxBase CompleteMulligan(BattleManagerBase m_BtlMgrIns);
|
||||
|
||||
VfxBase InitMulligan(MulliganInfoControl mulliganInfo, IPlayerView view);
|
||||
VfxBase InitMulligan(BattleManagerBase mgr, MulliganInfoControl mulliganInfo, IPlayerView view);
|
||||
|
||||
VfxBase RecoverMulligan(bool didPlayerSubmitMulligan, BattleManagerBase battleMgr);
|
||||
|
||||
|
||||
@@ -2,16 +2,14 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 7 of 19 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.MulliganCtrl
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
public abstract class MulliganCtrl
|
||||
{
|
||||
public const int MULLIGAN_CARD_MAX = 3;
|
||||
|
||||
public const int MULLIGAN_FIRST_EXCHANGE_MAX = 6;
|
||||
|
||||
public const int MULLIGAN_CHANGED_NUM_NULL = -1;
|
||||
|
||||
protected BattlePlayerBase _battlePlayer;
|
||||
|
||||
@@ -73,6 +71,8 @@ public abstract class MulliganCtrl
|
||||
|
||||
protected IDictionary<int, BattleCardBase> NetworkMoveNewCardToHand(IList<BattleCardBase> AbandonCards)
|
||||
{
|
||||
// Phase-5 chunk 48: restored card lookup — chunk 35's stub broke live receive Deal path.
|
||||
var battleMgr = _battlePlayer.BattleMgr;
|
||||
BattlePlayerBase player = GetBattlePlayer();
|
||||
List<BattleCardBase> list = new List<BattleCardBase>();
|
||||
for (int i = 0; i < _mulliganAfterCardIndexList.Count; i++)
|
||||
@@ -80,7 +80,7 @@ public abstract class MulliganCtrl
|
||||
int num = _mulliganAfterCardIndexList[i];
|
||||
if (!DealIdxList.Contains(num))
|
||||
{
|
||||
list.Add(BattleManagerBase.GetIns().GetBattleCardIdx(player.DeckCardList, num));
|
||||
list.Add(battleMgr.GetBattleCardIdx(player.DeckCardList, num));
|
||||
}
|
||||
}
|
||||
if (AbandonCards.Count != list.Count)
|
||||
@@ -137,7 +137,7 @@ public abstract class MulliganCtrl
|
||||
_mulliganView.HideMulliganTitle();
|
||||
}
|
||||
}));
|
||||
sequentialVfxPlayer.Register(new PlayerMulliganSwapVfx(list2, list, oldList, isCardHolderPlayer));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
int count = newList.Count;
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
for (int num = 0; num < count; num++)
|
||||
@@ -148,7 +148,7 @@ public abstract class MulliganCtrl
|
||||
}
|
||||
parallelVfxPlayer.Register(InstantVfx.Create(delegate
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_HAND_MOVE_RIGHT);
|
||||
|
||||
}));
|
||||
sequentialVfxPlayer.Register(parallelVfxPlayer);
|
||||
return sequentialVfxPlayer;
|
||||
@@ -161,16 +161,6 @@ public abstract class MulliganCtrl
|
||||
retCardList = source.Select((int index) => battleMgr.GetBattleCardIdx(GetBattlePlayer().AllCards.ToList(), index)).ToList();
|
||||
}
|
||||
|
||||
public SequentialVfxPlayer MoveCardToStaticPosition(BattleCardBase card, int posIndex, bool isAbandon)
|
||||
{
|
||||
return _mulliganView.MoveCardToStaticPosition(card, posIndex, isAbandon);
|
||||
}
|
||||
|
||||
public VfxBase MoveMulliganUIOutWhenSubmitMulligan()
|
||||
{
|
||||
return _mulliganView.MoveMulliganUIOutWhenSubmitMulligan();
|
||||
}
|
||||
|
||||
public VfxBase DrawFirstMulliganCard()
|
||||
{
|
||||
SkillProcessor skillProcessor = new SkillProcessor();
|
||||
@@ -181,11 +171,11 @@ public abstract class MulliganCtrl
|
||||
{
|
||||
List<int> list = new List<int>(6);
|
||||
List<int> list2 = Enumerable.Range(1, maxNum).ToList();
|
||||
if (BattleManagerBase.IsRandomDraw || GameMgr.GetIns().IsNetworkBattle)
|
||||
if (_battlePlayer.BattleMgr.InstanceIsRandomDraw /* Pre-Phase-5b: IsNetworkBattle assumed true */)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
int index = BattleManagerBase.GetIns().StableRandom(list2.Count);
|
||||
int index = 0; // Pre-Phase-5b: no mgr in scope; deterministic fallback
|
||||
list.Add(list2[index]);
|
||||
list2.Remove(list2[index]);
|
||||
}
|
||||
@@ -202,11 +192,15 @@ public abstract class MulliganCtrl
|
||||
|
||||
protected void _CreateMulliganCardList(List<int> indexList)
|
||||
{
|
||||
// Phase-5 chunk 48 (2026-07-03): restored the real card lookup — chunk 35's null stub
|
||||
// broke the live receive-driven Deal path (BattlePlayerBase.DrawCard NRE'd on null
|
||||
// entries). mgr is reachable via _battlePlayer.BattleMgr (chunk 42 seam).
|
||||
var battleMgr = _battlePlayer.BattleMgr;
|
||||
List<BattleCardBase> deckCardList = GetBattlePlayer().DeckCardList;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
BattleCardBase battleCardIdx = BattleManagerBase.GetIns().GetBattleCardIdx(deckCardList, indexList[i]);
|
||||
BattleCardBase battleCardIdx2 = BattleManagerBase.GetIns().GetBattleCardIdx(deckCardList, indexList[i + 3]);
|
||||
BattleCardBase battleCardIdx = battleMgr.GetBattleCardIdx(deckCardList, indexList[i]);
|
||||
BattleCardBase battleCardIdx2 = battleMgr.GetBattleCardIdx(deckCardList, indexList[i + 3]);
|
||||
_firstDrawList.Add(battleCardIdx);
|
||||
_stockList.Add(battleCardIdx2);
|
||||
}
|
||||
@@ -214,10 +208,12 @@ public abstract class MulliganCtrl
|
||||
|
||||
public void CreateMulliganDealList(List<int> indexList)
|
||||
{
|
||||
// Phase-5 chunk 48 (2026-07-03): restored the real card lookup — see _CreateMulliganCardList.
|
||||
var battleMgr = _battlePlayer.BattleMgr;
|
||||
List<BattleCardBase> deckCardList = GetBattlePlayer().DeckCardList;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
BattleCardBase battleCardIdx = BattleManagerBase.GetIns().GetBattleCardIdx(deckCardList, indexList[i]);
|
||||
BattleCardBase battleCardIdx = battleMgr.GetBattleCardIdx(deckCardList, indexList[i]);
|
||||
_firstDrawList.Add(battleCardIdx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ using System.Linq;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 47 of 50 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.MulliganInfoControl
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
@@ -48,16 +51,6 @@ public class MulliganInfoControl : UIBase
|
||||
|
||||
private static readonly Vector3 SUBMIT_BUTTON_SCALE = new Vector3(1.4f, 1.4f, 1f);
|
||||
|
||||
private const float ZONE_VERTICAL_OFFSET_INNER = 50f;
|
||||
|
||||
private const float ZONE_VERTICAL_OFFSET_OUTSIDE = 80f;
|
||||
|
||||
private const float TITLEBAR_VERTICAL_OFFSET = 40f;
|
||||
|
||||
private const float TITLEBAR_HORIZONTAL_OFFSET_BASE = 180f;
|
||||
|
||||
private const float WATCH_BATTLE_TITLEBAR_HORIZONTAL_OFFSET_BASE = 0f;
|
||||
|
||||
private static readonly float[] ABANDON_TEXT_OFFSET_BOTTOM = new float[2] { -5f, -50f };
|
||||
|
||||
private static readonly float[] ABANDON_TEXT_OFFSET_TOP = new float[2] { 55f, 10f };
|
||||
@@ -66,20 +59,8 @@ public class MulliganInfoControl : UIBase
|
||||
|
||||
private static readonly float[] KEEP_TEXT_OFFSET_TOP = new float[2] { 55f, 10f };
|
||||
|
||||
private const float FADEIN_SEC = 0.5f;
|
||||
|
||||
private const float FADEIN_ALPHA = 1f;
|
||||
|
||||
private const float FADEOUT_SEC = 0.5f;
|
||||
|
||||
private const float FADEOUT_ALPHA = 0f;
|
||||
|
||||
private const float CARD_POS_Z = -10f;
|
||||
|
||||
private static readonly int[] CARD_POS_Y = new int[2] { -25, 25 };
|
||||
|
||||
private const float CHANGEMARK_POS_Z = -12f;
|
||||
|
||||
private static readonly float[][] CHANGEMARK_POS_Y = new float[2][]
|
||||
{
|
||||
new float[2] { -25f, 0f },
|
||||
@@ -104,8 +85,6 @@ public class MulliganInfoControl : UIBase
|
||||
|
||||
private static readonly int[] ZONE_POS_X = new int[2] { 0, 416 };
|
||||
|
||||
private const float HIDE_TOP_PANEL_DURATION = 0.3f;
|
||||
|
||||
private static readonly Vector3 ENEMY_CLASS_ICON_POSITION = new Vector3(-274.2f, -33f, 0f);
|
||||
|
||||
private static readonly Vector3[] ENEMY_CLASS_ICON_POSITION_2 = new Vector3[2]
|
||||
@@ -136,10 +115,6 @@ public class MulliganInfoControl : UIBase
|
||||
|
||||
private static readonly Vector3 MY_ROTATION_INFO_POSITION = new Vector3(-246f, -21.9f, 0f);
|
||||
|
||||
private const int MY_ROTATION_PACK_RABEL_WIDTH_SHORT = 50;
|
||||
|
||||
private const int MY_ROTATION_PACK_RABEL_WIDTH_LONG = 80;
|
||||
|
||||
private static readonly string[] USE_SHORT_WIDTH_LANGUAGE = new string[2] { "Jpn", "Kor" };
|
||||
|
||||
[SerializeField]
|
||||
@@ -187,9 +162,6 @@ public class MulliganInfoControl : UIBase
|
||||
[SerializeField]
|
||||
private GameObject TimerObj;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel TimerLabel;
|
||||
|
||||
[SerializeField]
|
||||
public UIButton SubmitBtn;
|
||||
|
||||
@@ -217,30 +189,12 @@ public class MulliganInfoControl : UIBase
|
||||
|
||||
private BattleManagerBase m_BtlMgrIns;
|
||||
|
||||
private long startTicks;
|
||||
|
||||
private int passageStartSecond;
|
||||
|
||||
private float maxSecond;
|
||||
|
||||
private bool isTimerOn;
|
||||
|
||||
private int StateCnt;
|
||||
|
||||
public const float ENEMY_INFO_HIDE_POS = 340f;
|
||||
|
||||
private float extendTime;
|
||||
|
||||
private Color TIMER_COLOR_RED = new Color(0.85490197f, 0.2901961f, 0.2509804f);
|
||||
|
||||
private Color TIMER_COLOR_YELLOW = new Color(1f, 41f / 51f, 23f / 85f);
|
||||
|
||||
private Color TIMER_COLOR_WHITE = new Color(1f, 0.99215686f, 47f / 51f);
|
||||
|
||||
public bool IsEnd { get; private set; }
|
||||
|
||||
public bool IsShowingMulliganSelect { get; private set; }
|
||||
|
||||
private int SCREEN_HEIGHT => m_3DCamera.pixelHeight;
|
||||
|
||||
public event Action OnStartMulligan;
|
||||
@@ -249,53 +203,10 @@ public class MulliganInfoControl : UIBase
|
||||
|
||||
public event Func<VfxBase> OnTimeUp;
|
||||
|
||||
public void SetExtendTime(float leftTime)
|
||||
{
|
||||
extendTime = leftTime;
|
||||
}
|
||||
|
||||
public void InitMulliganInfo()
|
||||
{
|
||||
m_BtlMgrIns = BattleManagerBase.GetIns();
|
||||
base.gameObject.SetActive(value: false);
|
||||
m_3DCamera = m_BtlMgrIns.Battle3DContainer.transform.Find("Camera").GetComponent<Camera>();
|
||||
List<GameObject> list = new List<GameObject>();
|
||||
for (int i = 0; i < _partsPlayer._exchangeMark.Length; i++)
|
||||
{
|
||||
list.Add(_partsPlayer._exchangeMark[i].gameObject);
|
||||
}
|
||||
for (int j = 0; j < _partsOpponent._exchangeMark.Length; j++)
|
||||
{
|
||||
list.Add(_partsOpponent._exchangeMark[j].gameObject);
|
||||
}
|
||||
UIManager.GetInstance().AttachAtlas(list);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (GameMgr.GetIns().IsAINetwork && m_BtlMgrIns.IsRecovery)
|
||||
{
|
||||
return;
|
||||
}
|
||||
long ticks = TimeUtil.GetAbsoluteTime().Ticks - startTicks;
|
||||
TimeSpan timeSpan = new TimeSpan(ticks);
|
||||
if (!isTimerOn)
|
||||
{
|
||||
return;
|
||||
}
|
||||
float num = maxSecond - (float)timeSpan.TotalMilliseconds / 1000f + extendTime;
|
||||
SetTimerLabel(num);
|
||||
if (num <= 0f)
|
||||
{
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
VfxBase[] allFuncCallResults = this.OnTimeUp.GetAllFuncCallResults();
|
||||
foreach (VfxBase vfx in allFuncCallResults)
|
||||
{
|
||||
sequentialVfxPlayer.Register(vfx);
|
||||
}
|
||||
sequentialVfxPlayer.Register(m_BtlMgrIns.MulliganMgr.Submit(m_BtlMgrIns));
|
||||
m_BtlMgrIns.VfxMgr.RegisterSequentialVfx(sequentialVfxPlayer);
|
||||
}
|
||||
// Pre-Phase-5b: MulliganInfoControl is UI-only headless; camera lookup + AttachAtlas dropped
|
||||
m_BtlMgrIns = null;
|
||||
}
|
||||
|
||||
public override void assetBundleEnd()
|
||||
@@ -329,7 +240,7 @@ public class MulliganInfoControl : UIBase
|
||||
StateCnt = 0;
|
||||
base.gameObject.SetActive(value: true);
|
||||
SetSubmitLabel();
|
||||
if (GameMgr.GetIns().IsWatchBattle)
|
||||
if (false /* Pre-Phase-5b: IsWatchBattle const-false */)
|
||||
{
|
||||
_SetTitleLabel(TitleType.Watch);
|
||||
}
|
||||
@@ -347,7 +258,7 @@ public class MulliganInfoControl : UIBase
|
||||
isTimerOn = false;
|
||||
TimerObj.SetActive(value: false);
|
||||
EnableButton(on: false);
|
||||
if (GameMgr.GetIns().IsNetworkBattle && StateCnt < 2 && !GameMgr.GetIns().IsWatchBattle)
|
||||
if (StateCnt < 2 /* Pre-Phase-5b: IsNetworkBattle assumed true; IsWatchBattle const-false */)
|
||||
{
|
||||
_SetTitleLabel(TitleType.WaitOpponent);
|
||||
}
|
||||
@@ -369,23 +280,11 @@ public class MulliganInfoControl : UIBase
|
||||
TweenAlpha.Begin(_partsPlayer._abandonBG.gameObject, 0.5f, 0f);
|
||||
}
|
||||
|
||||
public void HideMulliganCenterUI()
|
||||
{
|
||||
TweenAlpha.Begin(_partsPlayer._keepBG.gameObject, 0.5f, 0f);
|
||||
TweenAlpha.Begin(_partsPlayer._abandonBG.gameObject, 0.5f, 0f);
|
||||
}
|
||||
|
||||
public void HideMulliganOpponentChangeUI()
|
||||
{
|
||||
TweenAlpha.Begin(_partsOpponent._abandonBG.gameObject, 0.5f, 0f);
|
||||
}
|
||||
|
||||
public void HideMulliganOpponentCenterUI()
|
||||
{
|
||||
TweenAlpha.Begin(_partsOpponent._keepBG.gameObject, 0.5f, 0f);
|
||||
TweenAlpha.Begin(_partsOpponent._abandonBG.gameObject, 0.5f, 0f);
|
||||
}
|
||||
|
||||
public void InitiallizeView()
|
||||
{
|
||||
AnchorTL.uiCamera = m_3DCamera;
|
||||
@@ -458,66 +357,11 @@ public class MulliganInfoControl : UIBase
|
||||
TitleBar.bottomAnchor.Set(0.5f, -40f);
|
||||
TitleBar.leftAnchor.target = target;
|
||||
TitleBar.rightAnchor.target = target;
|
||||
float num3 = ((GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle) ? 0f : 180f);
|
||||
float num3 = 180f; // Pre-Phase-5b: IsWatchBattle / IsReplayBattle const-false
|
||||
TitleBar.leftAnchor.Set(0f, num3 * m_3DCamera.aspect);
|
||||
TitleBar.rightAnchor.Set(1f, (0f - num3) * m_3DCamera.aspect);
|
||||
}
|
||||
|
||||
public void ShowMulliganUI()
|
||||
{
|
||||
if (GameMgr.GetIns().IsNetworkBattle && !GameMgr.GetIns().IsReplayBattle)
|
||||
{
|
||||
isTimerOn = true;
|
||||
startTicks = TimeUtil.GetAbsoluteTime().Ticks;
|
||||
if (ToolboxGame.RealTimeNetworkAgent != null)
|
||||
{
|
||||
passageStartSecond = ToolboxGame.RealTimeNetworkAgent.GetPreparedStartTimer();
|
||||
}
|
||||
if ((float)passageStartSecond <= 25f)
|
||||
{
|
||||
maxSecond = 60f;
|
||||
}
|
||||
else
|
||||
{
|
||||
maxSecond = 60f - ((float)passageStartSecond - 25f);
|
||||
if (maxSecond <= 0f)
|
||||
{
|
||||
maxSecond = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool active = true;
|
||||
bool active2 = true;
|
||||
bool flag = true;
|
||||
if (ViewType.Watch == _viewType)
|
||||
{
|
||||
active = false;
|
||||
active2 = false;
|
||||
flag = false;
|
||||
}
|
||||
TurnImg.gameObject.SetActive(active);
|
||||
EnemyInfo.gameObject.SetActive(active2);
|
||||
EnableButton(flag);
|
||||
TweenAlpha.Begin(TitleBar.gameObject, 0.5f, 1f);
|
||||
TweenAlpha.Begin(_partsPlayer._keepBG.gameObject, 0.5f, 1f);
|
||||
TweenAlpha.Begin(_partsPlayer._abandonBG.gameObject, 0.5f, 1f);
|
||||
if (ViewType.Watch == _viewType)
|
||||
{
|
||||
TweenAlpha.Begin(_partsOpponent._keepBG.gameObject, 0.5f, 1f);
|
||||
TweenAlpha.Begin(_partsOpponent._abandonBG.gameObject, 0.5f, 1f);
|
||||
}
|
||||
TweenAlpha.Begin(TurnImg.gameObject, 0.5f, 1f);
|
||||
TweenAlpha.Begin(EnemyInfo.gameObject, 0.5f, 1f);
|
||||
SetEnemyReady(-1);
|
||||
SetTimerLabel(maxSecond);
|
||||
IsShowingMulliganSelect = true;
|
||||
}
|
||||
|
||||
public void ShowTimerUI()
|
||||
{
|
||||
TimerObj.SetActive(ViewType.Watch != _viewType && isTimerOn);
|
||||
}
|
||||
|
||||
private void EnableButton(bool on)
|
||||
{
|
||||
SubmitBtn.gameObject.SetActive(on);
|
||||
@@ -536,11 +380,6 @@ public class MulliganInfoControl : UIBase
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
public void SetMulliganEnd()
|
||||
{
|
||||
IsEnd = true;
|
||||
}
|
||||
|
||||
public void SetEnemyReady(int num)
|
||||
{
|
||||
SystemText systemText = Data.SystemText;
|
||||
@@ -562,7 +401,7 @@ public class MulliganInfoControl : UIBase
|
||||
|
||||
private void SetEnemyClassInfo()
|
||||
{
|
||||
DataMgr dataMgr = GameMgr.GetIns().GetDataMgr();
|
||||
DataMgr dataMgr = null; // Pre-Phase-5b: headless has no DataMgr
|
||||
MyRotationInfo myRotationInfo;
|
||||
if (dataMgr.GetEnemySubClassId() != 10)
|
||||
{
|
||||
@@ -615,58 +454,12 @@ public class MulliganInfoControl : UIBase
|
||||
EnemyInfo.spriteName = MARIGAN_PANEL_CLASS + dataMgr.GetEnemyClassId().ToString("00");
|
||||
}
|
||||
|
||||
private void SetTimerLabel(float milliseconds)
|
||||
{
|
||||
if (GameMgr.GetIns().IsNetworkBattle)
|
||||
{
|
||||
float num = Mathf.Max(0f, Mathf.Ceil(milliseconds));
|
||||
if (num <= 10f)
|
||||
{
|
||||
TimerLabel.color = TIMER_COLOR_RED;
|
||||
}
|
||||
else if (num <= 30f)
|
||||
{
|
||||
TimerLabel.color = TIMER_COLOR_YELLOW;
|
||||
}
|
||||
else
|
||||
{
|
||||
TimerLabel.color = TIMER_COLOR_WHITE;
|
||||
}
|
||||
TimerLabel.text = num.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
TimerLabel.text = "";
|
||||
TimerObj.SetActive(value: false);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSubmitLabel()
|
||||
{
|
||||
SystemText systemText = Data.SystemText;
|
||||
SubmitBtnLabel.text = systemText.Get("Battle_0102");
|
||||
}
|
||||
|
||||
public VfxBase OnMulliganSubmit()
|
||||
{
|
||||
HideButtons();
|
||||
for (int i = 0; i < _partsPlayer._exchangeMark.Length; i++)
|
||||
{
|
||||
_partsPlayer._exchangeMark[i].gameObject.SetActive(value: false);
|
||||
}
|
||||
for (int j = 0; j < _partsOpponent._exchangeMark.Length; j++)
|
||||
{
|
||||
_partsOpponent._exchangeMark[j].gameObject.SetActive(value: false);
|
||||
}
|
||||
return InstantVfx.Create(delegate
|
||||
{
|
||||
if (!BattleManagerBase.GetIns().IsRecovery)
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.MULLIGAN_DECIDE);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void _SetTitleLabel(TitleType type)
|
||||
{
|
||||
TitleLabel.text = string.Empty;
|
||||
@@ -681,7 +474,7 @@ public class MulliganInfoControl : UIBase
|
||||
TitleLabel.text = Data.SystemText.Get("Battle_0104");
|
||||
break;
|
||||
case TitleType.Watch:
|
||||
if (GameMgr.GetIns().IsReplayBattle)
|
||||
if (false /* Pre-Phase-5b: IsReplayBattle const-false */)
|
||||
{
|
||||
TitleLabel.text = Data.SystemText.Get("Battle_0467");
|
||||
break;
|
||||
|
||||
@@ -7,6 +7,10 @@ using UnityEngine;
|
||||
using Wizard.Battle.UI;
|
||||
using Wizard.Battle.View;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 13 of 18 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.MulliganMgrBase
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
@@ -14,16 +18,12 @@ public abstract class MulliganMgrBase : IMulliganMgr
|
||||
{
|
||||
protected OpponentMulliganCtrl _opponentMulliganControl;
|
||||
|
||||
private const float MULLIGAN_LIMIT_TIME = 5f;
|
||||
|
||||
private Coroutine mulliganTimeoutCoroutine;
|
||||
|
||||
public PlayerMulliganCtrl PlayerMlgCtrl { get; protected set; }
|
||||
|
||||
public OpponentMulliganCtrl OpponentMlgCtrl => _opponentMulliganControl;
|
||||
|
||||
public IList<BattleCardBase> AbandonList => PlayerMlgCtrl.AbandonList;
|
||||
|
||||
public Action OnSubmit { get; set; }
|
||||
|
||||
public VfxBase StartDeal(List<int> playerDealIdxList, List<int> oppoDealIdxList, SkillProcessor skillProcessor)
|
||||
@@ -40,7 +40,7 @@ public abstract class MulliganMgrBase : IMulliganMgr
|
||||
instance2 = _opponentMulliganControl.StartMulliganVfx(skillProcessor);
|
||||
parallelVfxPlayer.Register(instance);
|
||||
parallelVfxPlayer.Register(instance2);
|
||||
if (BattleManagerBase.GetIns().IsRecovery && Data.BattleRecoveryInfo.IsMulliganEnd)
|
||||
if (false /* Pre-Phase-5b: recovery+mulligan-end guard headless-safe as false */)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public abstract class MulliganMgrBase : IMulliganMgr
|
||||
BattleCoroutine.GetInstance().StopCoroutine(mulliganTimeoutCoroutine);
|
||||
mulliganTimeoutCoroutine = null;
|
||||
}
|
||||
BattleManagerBase.GetIns().BattlePlayer.BattleView.HideAlertDialogue();
|
||||
/* Pre-Phase-5b: HideAlertDialogue dropped; no BattleView headless */
|
||||
}
|
||||
|
||||
private IEnumerator MulliganNetworkTimeout()
|
||||
@@ -69,20 +69,19 @@ public abstract class MulliganMgrBase : IMulliganMgr
|
||||
do
|
||||
{
|
||||
yield return null;
|
||||
if (BattleManagerBase.GetIns().IsBattleEnd)
|
||||
if (false /* Pre-Phase-5b: IsBattleEnd guard on coroutine timeout; unreachable headless */)
|
||||
{
|
||||
StopTimeout();
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
while (!((float)NetworkUtility.GetTimeSpanSecond(matchedTimer) >= 5f));
|
||||
BattleManagerBase.GetIns().BattlePlayer.BattleView.ShowAlert(PanelMgr.BattleAlertType.DisconnectInfomationMulligan, isClass: false);
|
||||
/* Pre-Phase-5b: ShowAlert dropped; no BattleView headless */
|
||||
}
|
||||
|
||||
public virtual VfxBase Submit(BattleManagerBase m_BtlMgrIns)
|
||||
{
|
||||
OnSubmit.Call();
|
||||
ImmediateVfxMgr.GetInstance().Register(PlayerMlgCtrl.MoveMulliganUIOutWhenSubmitMulligan());
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
@@ -106,17 +105,17 @@ public abstract class MulliganMgrBase : IMulliganMgr
|
||||
|
||||
public virtual VfxBase CompleteMulligan(BattleManagerBase battleMgr)
|
||||
{
|
||||
if (!battleMgr.IsVirtualBattle && !GameMgr.GetIns().IsNewReplayBattle)
|
||||
if (!battleMgr.IsVirtualBattle && !battleMgr.GameMgr.IsNewReplayBattle)
|
||||
{
|
||||
AddBattleLogMulliganResult(battleMgr);
|
||||
}
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
public virtual VfxBase InitMulligan(MulliganInfoControl mulliganInfo, IPlayerView view)
|
||||
public virtual VfxBase InitMulligan(BattleManagerBase mgr, MulliganInfoControl mulliganInfo, IPlayerView view)
|
||||
{
|
||||
PlayerMlgCtrl = new PlayerMulliganCtrl(BattleManagerBase.GetIns().BattlePlayer, mulliganInfo, view);
|
||||
_opponentMulliganControl = new OpponentMulliganCtrl(BattleManagerBase.GetIns().BattleEnemy, mulliganInfo, isUseExchangeMark: false);
|
||||
PlayerMlgCtrl = new PlayerMulliganCtrl(mgr.BattlePlayer, mulliganInfo, view);
|
||||
_opponentMulliganControl = new OpponentMulliganCtrl(mgr.BattleEnemy, mulliganInfo, isUseExchangeMark: false);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,19 +35,11 @@ public class MulliganOperateControl
|
||||
|
||||
private BattleCardBase _pressedCard;
|
||||
|
||||
private const float SHOW_DETAIL_DELAY = 0f;
|
||||
|
||||
private const int START_CARD_NUMBER = 0;
|
||||
|
||||
private const int END_CARD_NUMBER = 2;
|
||||
|
||||
private const int ENTER_MULLIGAN_NUMBER = 3;
|
||||
|
||||
public STATE State => _state;
|
||||
|
||||
public MulliganOperateControl(PlayerMulliganCtrl mulliganCtrl)
|
||||
{
|
||||
_inputManager = GameMgr.GetIns().GetInputMgr();
|
||||
_inputManager = null; // Pre-Phase-5b: no InputMgr headless
|
||||
_state = STATE.WAIT;
|
||||
_playerMulliganCtrl = mulliganCtrl;
|
||||
_mulliganView = mulliganCtrl.GetPlayerMulliganView();
|
||||
@@ -93,7 +85,7 @@ public class MulliganOperateControl
|
||||
}
|
||||
else if (UseChangeShortcut())
|
||||
{
|
||||
if (!BattleManagerBase.GetIns().VfxMgr.IsEnd)
|
||||
if (false /* Pre-Phase-5b: MulliganOperateControl is UI-only headless */)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
@@ -120,7 +112,7 @@ public class MulliganOperateControl
|
||||
_mulliganView.ShowCardDetail(_showDetailCard);
|
||||
}
|
||||
}
|
||||
else if (_inputManager.IsNone() && BattleManagerBase.GetIns().HasFocus && OptionSettingWindow.ShortcutDetailPanel == OptionSettingWindow.ShortcutDetail.Auto)
|
||||
else if (false /* Pre-Phase-5b: MulliganOperateControl is UI-only headless */)
|
||||
{
|
||||
RaycastHit[] hits = _mulliganView.ConvertMousePositionToFrontUIRaycastHits(Input.mousePosition);
|
||||
if (!IsTouchingDetail(hits))
|
||||
@@ -469,42 +461,12 @@ public class MulliganOperateControl
|
||||
_mulliganView.ShutDownCardDetail();
|
||||
}
|
||||
|
||||
private bool UseChangeShortcut()
|
||||
{
|
||||
return OptionSettingWindow.ShortcutPlay switch
|
||||
{
|
||||
OptionSettingWindow.Shortcut.RightClick => Input.GetMouseButtonDown(1),
|
||||
OptionSettingWindow.Shortcut.MiddleClick => Input.GetMouseButtonDown(2),
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
// OptionSettingWindow removed (DEAD-COLD engine cleanup Task 13) — shortcut methods return false (headless default)
|
||||
private bool UseChangeShortcut() => false;
|
||||
|
||||
private bool UseChangeShortcutDoubleClick()
|
||||
{
|
||||
if (OptionSettingWindow.ShortcutPlay == OptionSettingWindow.Shortcut.DoubleClick)
|
||||
{
|
||||
return _inputManager.IsDoubleClick();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private bool UseChangeShortcutDoubleClick() => false;
|
||||
|
||||
private bool UseDetailShortcut()
|
||||
{
|
||||
return OptionSettingWindow.ShortcutDetailPanel switch
|
||||
{
|
||||
OptionSettingWindow.ShortcutDetail.RightClick => Input.GetMouseButtonDown(1),
|
||||
OptionSettingWindow.ShortcutDetail.MiddleClick => Input.GetMouseButtonDown(2),
|
||||
OptionSettingWindow.ShortcutDetail.LongPress => _inputManager.IsLongPress(),
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
private bool UseDetailShortcut() => false;
|
||||
|
||||
private bool UseDetailShortcutDoubleClick()
|
||||
{
|
||||
if (OptionSettingWindow.ShortcutDetailPanel == OptionSettingWindow.ShortcutDetail.DoubleClick)
|
||||
{
|
||||
return _inputManager.IsDoubleClick();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private bool UseDetailShortcutDoubleClick() => false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 4 of 9 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.MulliganViewBase
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
@@ -27,11 +31,6 @@ public abstract class MulliganViewBase
|
||||
});
|
||||
}
|
||||
|
||||
public VfxBase MoveMulliganUIOutWhenSubmitMulligan()
|
||||
{
|
||||
return m_MlgUI.OnMulliganSubmit();
|
||||
}
|
||||
|
||||
public VfxBase SortFirstDrawsToKeepZone(IList<BattleCardBase> firstDraws)
|
||||
{
|
||||
return new PlayerMulliganCardSortOutVfx(GetMulliganUIKeepZone(), firstDraws, m_MlgUI);
|
||||
@@ -46,7 +45,7 @@ public abstract class MulliganViewBase
|
||||
target.BattleCardView.GameObject.transform.parent = mulliganZone.transform;
|
||||
Vector3 mulliganZoneCardPos = mulliganUI.GetMulliganZoneCardPos(posIndex, isAbandon, target.IsPlayer);
|
||||
Vector3 mulliganZoneCardScale = mulliganUI.GetMulliganZoneCardScale();
|
||||
if (BattleManagerBase.GetIns().IsRecovery)
|
||||
if (false /* Pre-Phase-5b: IsRecovery guard headless-safe as false in view code */)
|
||||
{
|
||||
gameObject.transform.localScale = mulliganZoneCardScale;
|
||||
}
|
||||
@@ -54,13 +53,13 @@ public abstract class MulliganViewBase
|
||||
{
|
||||
iTween.ScaleTo(gameObject, iTween.Hash("scale", mulliganZoneCardScale, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo));
|
||||
}
|
||||
if (GameMgr.GetIns().IsWatchBattle)
|
||||
if (false /* Pre-Phase-5b: IsWatchBattle const-false */)
|
||||
{
|
||||
if (GameMgr.GetIns().IsAdmin)
|
||||
if (false /* Pre-Phase-5b: IsAdmin const-false */)
|
||||
{
|
||||
RotatePlayer(gameObject);
|
||||
}
|
||||
else if (!BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.HandControl.IsVisibleHand())
|
||||
else if (false /* Pre-Phase-5b: no BattleView headless */)
|
||||
{
|
||||
RotateEnemy(gameObject);
|
||||
}
|
||||
@@ -77,7 +76,7 @@ public abstract class MulliganViewBase
|
||||
{
|
||||
RotatePlayer(gameObject);
|
||||
}
|
||||
if (BattleManagerBase.GetIns().IsRecovery)
|
||||
if (false /* Pre-Phase-5b: IsRecovery guard headless-safe as false in view code */)
|
||||
{
|
||||
gameObject.transform.localPosition = mulliganZoneCardPos;
|
||||
}
|
||||
@@ -91,7 +90,7 @@ public abstract class MulliganViewBase
|
||||
|
||||
private static void RotatePlayer(GameObject cardObj)
|
||||
{
|
||||
if (BattleManagerBase.GetIns().IsRecovery)
|
||||
if (false /* Pre-Phase-5b: IsRecovery guard headless-safe as false in view code */)
|
||||
{
|
||||
cardObj.transform.localRotation = Quaternion.Euler(CARD_ROTATION);
|
||||
return;
|
||||
@@ -101,7 +100,7 @@ public abstract class MulliganViewBase
|
||||
|
||||
private static void RotateEnemy(GameObject cardObj)
|
||||
{
|
||||
if (BattleManagerBase.GetIns().IsRecovery)
|
||||
if (false /* Pre-Phase-5b: IsRecovery guard headless-safe as false in view code */)
|
||||
{
|
||||
cardObj.transform.localRotation = Quaternion.Euler(CARD_ROTATION_OPPO);
|
||||
return;
|
||||
|
||||
@@ -4,25 +4,29 @@ using Cute;
|
||||
using UnityEngine;
|
||||
using Wizard.Battle.View;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 3 of 9 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.NetworkMulliganMgr
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
public class NetworkMulliganMgr : MulliganMgrBase
|
||||
{
|
||||
private readonly NetworkBattleManagerBase _networkBattleManager;
|
||||
private NetworkBattleManagerBase _networkBattleManager;
|
||||
|
||||
private readonly NetworkBattleSender _networkBattleSender;
|
||||
|
||||
public NetworkMulliganMgr(NetworkBattleSender sender)
|
||||
{
|
||||
_networkBattleSender = sender;
|
||||
_networkBattleManager = BattleManagerBase.GetIns() as NetworkBattleManagerBase;
|
||||
}
|
||||
|
||||
public override VfxBase InitMulligan(MulliganInfoControl mulliganInfo, IPlayerView view)
|
||||
public override VfxBase InitMulligan(BattleManagerBase mgr, MulliganInfoControl mulliganInfo, IPlayerView view)
|
||||
{
|
||||
base.PlayerMlgCtrl = new NetworkPlayerMulliganCtrl(BattleManagerBase.GetIns().BattlePlayer, mulliganInfo, view);
|
||||
_opponentMulliganControl = new NetworkOpponentMulliganCtrl(BattleManagerBase.GetIns().BattleEnemy, mulliganInfo, isUseExchangeMark: false);
|
||||
_networkBattleManager = mgr as NetworkBattleManagerBase;
|
||||
base.PlayerMlgCtrl = new NetworkPlayerMulliganCtrl(mgr.BattlePlayer, mulliganInfo, view);
|
||||
_opponentMulliganControl = new NetworkOpponentMulliganCtrl(mgr.BattleEnemy, mulliganInfo, isUseExchangeMark: false);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
|
||||
@@ -127,7 +131,7 @@ public class NetworkMulliganMgr : MulliganMgrBase
|
||||
battleCardView.Transform.localRotation = Quaternion.Euler(MulliganViewBase.CARD_ROTATION);
|
||||
battleCardView.GameObject.SetActive(value: true);
|
||||
}
|
||||
DummyDeckRemoveCardVfx dummyDeckRemoveCardVfx = new DummyDeckRemoveCardVfx(isPlayer: true, 3);
|
||||
VfxBase dummyDeckRemoveCardVfx = NullVfx.GetInstance();
|
||||
return ParallelVfxPlayer.Create(dummyDeckRemoveCardVfx, _networkBattleManager.LoadCardResources(list));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class NetworkOpponentMulliganCtrl : OpponentMulliganCtrl
|
||||
{
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
sequentialVfxPlayer.Register(_battlePlayer.BattleMgr.LoadCardResources(_firstDrawList));
|
||||
sequentialVfxPlayer.Register(new EnemyMulliganDrawVfx(_firstDrawList, GetMulliganInfo()));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
_battlePlayer.CallRecordingMulliganStart(_firstDrawList);
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using Wizard.Battle.View;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 1 of 3 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.NetworkPlayerMulliganCtrl
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
@@ -18,7 +22,7 @@ public class NetworkPlayerMulliganCtrl : PlayerMulliganCtrl
|
||||
{
|
||||
DrawFirstMulliganCard();
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
sequentialVfxPlayer.Register(new PlayerMulliganDrawVfx(_firstDrawList, GetMulliganInfo()));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(_playerMulliganView.SortFirstDrawsToKeepZone(_firstDrawList));
|
||||
sequentialVfxPlayer.Register(InstantVfx.Create(delegate
|
||||
{
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 2 of 4 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.OpponentMulliganCtrl
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
@@ -24,7 +28,7 @@ public class OpponentMulliganCtrl : MulliganCtrl
|
||||
_CreateMulliganCardList(opponentIndexList);
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
sequentialVfxPlayer.Register(battlePlayer.BattleMgr.LoadCardResources(_firstDrawList));
|
||||
sequentialVfxPlayer.Register(new EnemyMulliganDrawVfx(_firstDrawList, GetMulliganInfo()));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -36,18 +40,13 @@ public class OpponentMulliganCtrl : MulliganCtrl
|
||||
{
|
||||
parallelVfxPlayer.Register(_MulliganCardChange(abandonCards));
|
||||
}
|
||||
parallelVfxPlayer.Register(new DummyDeckRemoveCardVfx(isPlayer: false, 3));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
parallelVfxPlayer.Register(_mulliganView.UpdateOpponentMulliganStatusLabel(abandonCards.Count));
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
|
||||
public List<int> GetOpponentIndexList()
|
||||
{
|
||||
return opponentIndexList;
|
||||
}
|
||||
|
||||
protected override VfxBase _MulliganSwap(IDictionary<int, BattleCardBase> newList, IList<BattleCardBase> oldList)
|
||||
{
|
||||
return new EnemyMulliganSwapVfx(newList.Values.ToList(), newList.Keys.ToList(), oldList);
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,13 +39,13 @@ public class PlayerMulliganCardSortOutVfx : SequentialVfxPlayer
|
||||
{
|
||||
parallelVfxPlayer.Register(MulliganViewBase.MoveCardToMulliganZone(firstDraws[i], keepZone, i, mulliganUI, isAbandon: false));
|
||||
}
|
||||
if (BattleManagerBase.GetIns().IsRecovery)
|
||||
if (false /* Pre-Phase-5b: IsRecovery guard collapsed headless */)
|
||||
{
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
parallelVfxPlayer.Register(InstantVfx.Create(delegate
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_HAND_MOVE_RIGHT);
|
||||
|
||||
}));
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ using System.Collections.Generic;
|
||||
using Cute;
|
||||
using Wizard.Battle.View;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 6 of 9 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.PlayerMulliganCtrl
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
@@ -18,8 +21,6 @@ public class PlayerMulliganCtrl : MulliganCtrl
|
||||
|
||||
public IList<BattleCardBase> AbandonList => m_AbandonList;
|
||||
|
||||
public bool IsSetOnCard => _isSetOnCard;
|
||||
|
||||
public PlayerMulliganCtrl(BattlePlayerBase player, MulliganInfoControl mulliganInfo, IPlayerView view)
|
||||
: base(player)
|
||||
{
|
||||
@@ -35,7 +36,7 @@ public class PlayerMulliganCtrl : MulliganCtrl
|
||||
_CreateMulliganCardList(indexList);
|
||||
DrawFirstMulliganCard();
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
sequentialVfxPlayer.Register(new PlayerMulliganDrawVfx(_firstDrawList, GetMulliganInfo()));
|
||||
sequentialVfxPlayer.Register(NullVfx.GetInstance());
|
||||
sequentialVfxPlayer.Register(_playerMulliganView.SortFirstDrawsToKeepZone(_firstDrawList));
|
||||
sequentialVfxPlayer.Register(InstantVfx.Create(delegate
|
||||
{
|
||||
@@ -59,7 +60,7 @@ public class PlayerMulliganCtrl : MulliganCtrl
|
||||
sequentialVfxPlayer.Register(_MulliganCardChange(abandonCards));
|
||||
parallelVfxPlayer.Register(sequentialVfxPlayer);
|
||||
}
|
||||
parallelVfxPlayer.Register(new DummyDeckRemoveCardVfx(isPlayer: true, 3));
|
||||
parallelVfxPlayer.Register(NullVfx.GetInstance());
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
|
||||
@@ -77,7 +78,7 @@ public class PlayerMulliganCtrl : MulliganCtrl
|
||||
{
|
||||
if (_firstDrawList.Contains(card) && !m_AbandonList.Contains(card))
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_1);
|
||||
|
||||
m_AbandonList.Add(card);
|
||||
}
|
||||
}
|
||||
@@ -86,7 +87,7 @@ public class PlayerMulliganCtrl : MulliganCtrl
|
||||
{
|
||||
if (m_AbandonList.Contains(card))
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_1);
|
||||
|
||||
m_AbandonList.Remove(card);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@ using System;
|
||||
using UnityEngine;
|
||||
using Wizard.Battle.View;
|
||||
using Wizard.Battle.View.Vfx;
|
||||
// TODO(engine-cleanup-pass2): 16 of 18 methods unrun in baseline
|
||||
// Type: Wizard.Battle.Mulligan.PlayerMulliganView
|
||||
// See data_dumps/reports/engine-cleanup/live-methods.baseline.txt
|
||||
|
||||
namespace Wizard.Battle.Mulligan;
|
||||
|
||||
@@ -32,7 +35,7 @@ public class PlayerMulliganView : MulliganViewBase
|
||||
public void DragCardStop(BattleCardBase card)
|
||||
{
|
||||
m_PlayerBattleView.CardMoveEffectSwitch(on: false);
|
||||
GameMgr.GetIns().GetSoundMgr().StopSe(Se.TYPE.SYS_DRAG_SLIDE);
|
||||
|
||||
card.SetOnMove(move: false);
|
||||
}
|
||||
|
||||
@@ -58,14 +61,14 @@ public class PlayerMulliganView : MulliganViewBase
|
||||
|
||||
public void ShowCardDetail(BattleCardBase card)
|
||||
{
|
||||
bool flag = !GameMgr.GetIns().IsWatchBattle && Mathf.Approximately(card.BattleCardView.Transform.localPosition.x, 0f);
|
||||
bool flag = Mathf.Approximately(card.BattleCardView.Transform.localPosition.x, 0f); // Pre-Phase-5b: IsWatchBattle const-false
|
||||
m_PlayerBattleView.SetDetailScreenPosition(!flag && _IsDetailScreenRight());
|
||||
m_PlayerBattleView.ShowDetailPanel(null, null, card, DetailPanelControl.ShowRequest.MULLIGAN);
|
||||
}
|
||||
|
||||
private bool _IsDetailScreenRight()
|
||||
{
|
||||
if (InputMgr.ShowDetailLeftAndRight || GameMgr.GetIns().IsWatchBattle)
|
||||
if (InputMgr.ShowDetailLeftAndRight /* Pre-Phase-5b: IsWatchBattle const-false */)
|
||||
{
|
||||
return Input.mousePosition.x < (float)Screen.width / 2f;
|
||||
}
|
||||
@@ -111,15 +114,4 @@ public class PlayerMulliganView : MulliganViewBase
|
||||
{
|
||||
m_MlgUI.HideMulliganChangeUI();
|
||||
}
|
||||
|
||||
public void SelectEffectOn(BattleCardBase targetCard)
|
||||
{
|
||||
m_PlayerBattleView.DetailPanelSelectEffectOff();
|
||||
m_PlayerBattleView.DetailPanelSelectEffectOn(targetCard, DetailPanelControl.ShowRequest.MULLIGAN);
|
||||
}
|
||||
|
||||
public void SelectEffectOff()
|
||||
{
|
||||
m_PlayerBattleView.DetailPanelSelectEffectOff();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class SingleMulliganMgr : MulliganMgrBase
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
sequentialVfxPlayer.Register(base.Submit(battleManager));
|
||||
if (GameMgr.GetIns().IsAINetwork && !battleManager.IsRecovery)
|
||||
if (battleManager.GameMgr.IsAINetwork && !battleManager.IsRecovery)
|
||||
{
|
||||
sequentialVfxPlayer.Register(parallelVfxPlayer);
|
||||
return sequentialVfxPlayer;
|
||||
@@ -24,19 +24,13 @@ public class SingleMulliganMgr : MulliganMgrBase
|
||||
return sequentialVfxPlayer;
|
||||
}
|
||||
|
||||
public override VfxBase InitMulligan(MulliganInfoControl mulliganInfo, IPlayerView view)
|
||||
public override VfxBase InitMulligan(BattleManagerBase mgr, MulliganInfoControl mulliganInfo, IPlayerView view)
|
||||
{
|
||||
VfxBase result = base.InitMulligan(mulliganInfo, view);
|
||||
if (GameMgr.GetIns().IsAINetwork && !BattleManagerBase.GetIns().IsRecovery)
|
||||
{
|
||||
((AINetworkBattleManager)BattleManagerBase.GetIns()).SetupMulliganLaunchCompleteEvent();
|
||||
}
|
||||
return result;
|
||||
return base.InitMulligan(mgr, mulliganInfo, view);
|
||||
}
|
||||
|
||||
public void AIMulliganEndAction()
|
||||
public void AIMulliganEndAction(BattleManagerBase ins)
|
||||
{
|
||||
BattleManagerBase ins = BattleManagerBase.GetIns();
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
|
||||
parallelVfxPlayer.Register(PlayerChangeCardVfx(ins));
|
||||
|
||||
Reference in New Issue
Block a user