using System;
using System.Collections.Generic;
using System.Linq;
using Wizard.Battle.View.Vfx;

public class NewReplayOperationCollection
{
	private readonly NetworkBattleReceiver.ReplayReceiveData _receivedData;

	private readonly NewReplayBattleMgr _networkReplayBattleMgr;

	private readonly NetworkBattleData _networkBattleData;

	private ReplayBattlePlayer ReplayBattlePlayer;

	private ReplayBattleEnemy ReplayBattleEnemy;

	public NewReplayOperationCollection(NetworkReplayBattleMgr networkReplayBattleMgr, NetworkBattleReceiver.ReplayReceiveData receiveData, NetworkBattleData networkBattleData)
	{
		_receivedData = receiveData;
		_networkReplayBattleMgr = networkReplayBattleMgr as NewReplayBattleMgr;
		_networkBattleData = networkBattleData;
		ReplayBattlePlayer = _networkReplayBattleMgr.BattlePlayer as ReplayBattlePlayer;
		ReplayBattleEnemy = _networkReplayBattleMgr.BattleEnemy as ReplayBattleEnemy;
	}

	private void RegisterSequentialVfx(VfxBase operationVfx)
	{
		if (_networkReplayBattleMgr.IsDuringSkillProcess)
		{
			if (operationVfx is VfxWithLoading vfxWithLoadingToRegister)
			{
				_networkReplayBattleMgr.SkillVfxStack.Peek().RegisterVfxWithLoading(vfxWithLoadingToRegister);
			}
			else
			{
				_networkReplayBattleMgr.SkillVfxStack.Peek().RegisterToMainVfx(operationVfx);
			}
		}
		else
		{
			_networkReplayBattleMgr.VfxMgr.RegisterSequentialVfx(operationVfx);
		}
	}

	public void DealOperation()
	{
		_networkReplayBattleMgr.SetSkillDescriptionValueList(ReplayBattlePlayer.AllCards.ToList(), _receivedData.CardInfoList);
		_networkReplayBattleMgr.OperateReceive.OnReceiveDeal(_receivedData.selfIdxList, _receivedData.oppoIdxList);
		RegisterSequentialVfx(WaitVfx.Create(0.2f));
	}

	public void SwapOperation(Func<List<int>, VfxBase> OnReceiveOpponentMulligan, Func<List<int>, VfxBase> OnReceivePlayerMulligan)
	{
		OperateMulligan(OnReceiveOpponentMulligan, OnReceivePlayerMulligan);
	}

	public void SecondMulliganOperation(Func<List<int>, VfxBase> OnReceiveOpponentMulligan, Func<List<int>, VfxBase> OnReceivePlayerMulligan, Func<VfxBase> OnEndMulligan)
	{
		OperateMulligan(OnReceiveOpponentMulligan, OnReceivePlayerMulligan);
		RegisterSequentialVfx(OnEndMulligan.GetAllFuncVfxResults());
	}

	private void OperateMulligan(Func<List<int>, VfxBase> OnReceiveOpponentMulligan, Func<List<int>, VfxBase> OnReceivePlayerMulligan)
	{
		if (_receivedData.isSelf)
		{
			_networkReplayBattleMgr.SetSkillDescriptionValueList(ReplayBattlePlayer.AllCards.ToList(), _receivedData.CardInfoList);
		}
		RegisterSequentialVfx(_receivedData.isSelf ? OperatePlayerMulligan(_receivedData, OnReceivePlayerMulligan) : OperateOppoMulligan(_receivedData, OnReceiveOpponentMulligan));
	}

	private VfxBase OperatePlayerMulligan(NetworkBattleReceiver.ReplayReceiveData receiveData, Func<List<int>, VfxBase> OnReceivePlayerMulligan)
	{
		if (_networkBattleData.isPlayerMulliganEnd)
		{
			return NullVfx.GetInstance();
		}
		if (receiveData.selfIdxList != null && receiveData.selfIdxList.Count >= 1)
		{
			_networkBattleData.isPlayerMulliganEnd = true;
			return OnReceivePlayerMulligan.GetAllFuncVfxResults(receiveData.selfIdxList);
		}
		return NullVfx.GetInstance();
	}

	protected virtual VfxBase OperateOppoMulligan(NetworkBattleReceiver.ReplayReceiveData receiveData, Func<List<int>, VfxBase> OnReceiveOpponentMulligan)
	{
		if (_networkBattleData.isOppoMulliganEnd)
		{
			return NullVfx.GetInstance();
		}
		if (receiveData.oppoIdxList != null && receiveData.oppoIdxList.Count >= 1)
		{
			_networkBattleData.isOppoMulliganEnd = true;
			return OnReceiveOpponentMulligan.GetAllFuncVfxResults(receiveData.oppoIdxList);
		}
		return NullVfx.GetInstance();
	}

	public void TurnStartOperation()
	{
		RegisterSequentialVfx(_receivedData.isSelf ? ReplayBattlePlayer.StartTurnControl() : ReplayBattleEnemy.StartTurnControl());
	}

	public void TurnStartFinishOperation()
	{
		RegisterSequentialVfx(_receivedData.isSelf ? ReplayBattlePlayer.TurnStartFinish() : ReplayBattleEnemy.TurnStartFinish());
	}

	public void TurnEndOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.TurnEnd());
	}

	public void TurnEndFinishOperation()
	{
		if (_receivedData.isSelf)
		{
			ReplayBattlePlayer.IsSelfTurn = false;
		}
		else
		{
			ReplayBattleEnemy.IsSelfTurn = false;
		}
	}

	public void AddPpTotalOperation()
	{
		RegisterSequentialVfx(_receivedData.isSelf ? ReplayBattlePlayer.AddPpTotal(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.AddPpTotalCount, _receivedData.Pp, _receivedData.BySkill) : ReplayBattleEnemy.AddPpTotal(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.AddPpTotalCount, _receivedData.Pp));
	}

	public void AddPpOperation()
	{
		RegisterSequentialVfx(_receivedData.isSelf ? ReplayBattlePlayer.AddPp(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.Pp) : ReplayBattleEnemy.AddPp(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.Pp));
	}

	public void AddBpOperation()
	{
		RegisterSequentialVfx(_receivedData.isSelf ? ReplayBattlePlayer.AddBp(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.Bp) : ReplayBattleEnemy.AddBp(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.Bp));
	}

	public void AddEpOperation()
	{
		RegisterSequentialVfx(_receivedData.isSelf ? ReplayBattlePlayer.AddEp(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.Ep, _receivedData.EffectInfo) : ReplayBattleEnemy.AddEp(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.Ep, _receivedData.EffectInfo));
	}

	public void SetEpOperation()
	{
		RegisterSequentialVfx(_receivedData.isSelf ? ReplayBattlePlayer.SetEp(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.Ep, _receivedData.EffectInfo) : ReplayBattleEnemy.SetEp(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.Ep, _receivedData.EffectInfo));
	}

	public void DrawCardOperation()
	{
		if (_receivedData.isSelf)
		{
			List<BattleCardBase> list = new List<BattleCardBase>();
			ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
			for (int i = 0; i < _receivedData.CardInfoList.Count; i++)
			{
				BattleCardBase drawCard = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.DeckCardList, _receivedData.CardInfoList[i].Index);
				_networkReplayBattleMgr.ClearAndUpdateParameterModifier(drawCard, _receivedData.CardInfoList[i]);
				int cost = drawCard.Cost;
				parallelVfxPlayer.Register(InstantVfx.Create(delegate
				{
					drawCard.BattleCardView.UpdateCost(drawCard.BattleCardView.GetUseCostList(cost, useNomalCost: true), isGenerateInHand: true, playEffect: false, isForceUpdate: true);
				}));
				list.Add(drawCard);
			}
			RegisterSequentialVfx(parallelVfxPlayer);
			RegisterSequentialVfx(ReplayBattlePlayer.DrawCard(list, _receivedData.CardInfoList, _receivedData.IsOpenDrawSkill));
			RegisterSequentialVfx(_networkReplayBattleMgr.UpdateHandInfo(ReplayBattlePlayer.HandCardList, ReplayBattleEnemy.HandCardList, _receivedData.CardInfoList, ReplayBattlePlayer.AllCardsWithSkillIngredient, ReplayBattleEnemy.AllCardsWithSkillIngredient));
			return;
		}
		List<BattleCardBase> list2 = new List<BattleCardBase>();
		if (_receivedData.IsOpenDrawSkill)
		{
			SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
			for (int num = 0; num < _receivedData.CardInfoList.Count; num++)
			{
				BattleCardBase battleCardIdx = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.DeckCardList, _receivedData.CardInfoList[num].Index);
				VfxWith<BattleCardBase> vfxWith = _networkReplayBattleMgr.ReplaceReceivedCard(battleCardIdx, _receivedData.CardInfoList[num], ReplayBattleEnemy, isFusion: false);
				BattleCardBase card = vfxWith.Value;
				int cost2 = _receivedData.CardInfoList[num].Cost;
				sequentialVfxPlayer.Register(InstantVfx.Create(delegate
				{
					card.BattleCardView.UpdateParameterView(card.Atk, card.Life, cost2, card.BaseParameter.CardName, card.IsInplay);
				}));
				list2.Add(card);
				sequentialVfxPlayer.Register(vfxWith.Vfx);
			}
			RegisterSequentialVfx(sequentialVfxPlayer);
		}
		else
		{
			list2 = _receivedData.CardInfoList.Select((NetworkBattleReceiver.CardInfo cardInfo) => _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.DeckCardList, cardInfo.Index)).ToList();
		}
		RegisterSequentialVfx(ReplayBattleEnemy.DrawCard(list2, _receivedData.CardInfoList, _receivedData.IsOpen, _receivedData.IsOpenDrawSkill));
	}

	public void TokenDrawCardOperation()
	{
		if (_receivedData.isSelf)
		{
			List<BattleCardBase> targets = _receivedData.TargetIndexList.Select((int i) => _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.AllCardsWithSkillIngredient, i)).ToList();
			RegisterSequentialVfx(ReplayBattlePlayer.TokenDrawCard(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList, targets, _receivedData.IsOpen, _receivedData.IsReserved, _receivedData.EffectInfo));
			RegisterSequentialVfx(_networkReplayBattleMgr.UpdateHandInfo(ReplayBattlePlayer.HandCardList, ReplayBattleEnemy.HandCardList, _receivedData.CardInfoList, ReplayBattlePlayer.AllCardsWithSkillIngredient, ReplayBattleEnemy.AllCardsWithSkillIngredient));
		}
		else
		{
			List<BattleCardBase> targets2 = _receivedData.TargetIndexList.Select((int i) => _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.AllCardsWithSkillIngredient, i)).ToList();
			RegisterSequentialVfx(ReplayBattleEnemy.TokenDrawCard(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList, targets2, _receivedData.IsOpen, _receivedData.IsReserved, _receivedData.EffectInfo));
		}
	}

	public void CreateReservedCardOperation()
	{
		if (_receivedData.isSelf)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.CreateReservedCard(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattleEnemy.CreateReservedCard(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList));
		}
	}

	public void PlayHandCardOperation()
	{
		if (ReplayBattlePlayer.IsSelfTurn)
		{
			BattleCardBase indexToCardBase = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattlePlayer, _receivedData.CardInfo.Index);
			_networkReplayBattleMgr.UpdateSkillDescriptionValueList(indexToCardBase, _receivedData.CardInfo);
			_networkReplayBattleMgr.UpdateExecutedFixedUseCostIndex(indexToCardBase, _receivedData.CardInfo);
			_networkReplayBattleMgr.UpdateUnionBurstAndSkyboundArtModifier(indexToCardBase, _receivedData.CardInfo);
			RegisterSequentialVfx(ReplayBattlePlayer.PlayCard(indexToCardBase, _receivedData.Cost, _receivedData.TransformCardId, _receivedData.TransformType, _receivedData.CardInfo));
			return;
		}
		BattleCardBase battleCardBase = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattleEnemy, _receivedData.CardInfo.Index);
		if (_receivedData.TransformCardId == -1 || _receivedData.TransformType == BattleCardBase.TransformType.Accelerate || _receivedData.TransformType == BattleCardBase.TransformType.Crystallize)
		{
			VfxWith<BattleCardBase> vfxWith = _networkReplayBattleMgr.ReplaceReceivedCard(battleCardBase, _receivedData.CardInfo, ReplayBattleEnemy, isFusion: false);
			battleCardBase = vfxWith.Value;
			RegisterSequentialVfx(vfxWith.Vfx);
		}
		RegisterSequentialVfx(ReplayBattleEnemy.PlayCard(battleCardBase, _receivedData.Cost, _receivedData.TransformCardId, _receivedData.TransformType, _receivedData.CardInfo));
	}

	public void PlayChoiceBraveCardOperation()
	{
		if (ReplayBattlePlayer.IsSelfTurn)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.PlayChoiceBraveCard(_receivedData.Cost, _receivedData.TransformCardId, _receivedData.CardInfo));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattleEnemy.PlayChoiceBraveCard(_receivedData.Cost, _receivedData.TransformCardId, _receivedData.CardInfo));
		}
	}

	public void ShowWhenPlayEffectOperation()
	{
		BattleCardBase battleCardBase = (_receivedData.isSelf ? NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattlePlayer, _receivedData.CardIndex) : NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattleEnemy, _receivedData.CardIndex));
		RegisterSequentialVfx(_networkReplayBattleMgr.CreateWhenPlayEffect(_receivedData.WhenPlayEffectType, battleCardBase.BattleCardView, _receivedData.IsInvoked));
	}

	public void SummonTokenOperation()
	{
		if (_receivedData.isSelf)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.SummonToken(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList, _receivedData.EffectInfo, _receivedData.IsOwnerEffect, _receivedData.IsIgnoreVoice, _receivedData.IsRandomVoice, _receivedData.IsEvoVoice));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattleEnemy.SummonToken(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList, _receivedData.EffectInfo, _receivedData.IsOwnerEffect, _receivedData.IsIgnoreVoice, _receivedData.IsRandomVoice, _receivedData.IsEvoVoice));
		}
	}

	public void SummonCardOperation()
	{
		if (_receivedData.isSelf)
		{
			List<BattleCardBase> list = new List<BattleCardBase>();
			for (int i = 0; i < _receivedData.CardInfoList.Count; i++)
			{
				BattleCardBase battleCardIdx = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.AllCards.ToList(), _receivedData.CardInfoList[i].Index);
				_networkReplayBattleMgr.UpdateParameterModifierAndCostView(battleCardIdx, _receivedData.CardInfoList[i]);
				list.Add(battleCardIdx);
			}
			RegisterSequentialVfx(ReplayBattlePlayer.SummonCard(GetOwnerCard(_receivedData.OwnerCardName), list, _receivedData.IsDeckSelf, _receivedData.IsBurialRite, _receivedData.EffectInfo, _receivedData.IsIgnoreVoice, _receivedData.CardInfoList));
			return;
		}
		SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
		List<BattleCardBase> list2 = new List<BattleCardBase>();
		for (int j = 0; j < _receivedData.CardInfoList.Count; j++)
		{
			BattleCardBase battleCardIdx2 = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.AllCards.ToList(), _receivedData.CardInfoList[j].Index);
			VfxWith<BattleCardBase> vfxWith = _networkReplayBattleMgr.ReplaceReceivedCard(battleCardIdx2, _receivedData.CardInfoList[j], ReplayBattleEnemy, isFusion: false);
			list2.Add(vfxWith.Value);
			sequentialVfxPlayer.Register(vfxWith.Vfx);
		}
		RegisterSequentialVfx(sequentialVfxPlayer);
		RegisterSequentialVfx(ReplayBattleEnemy.SummonCard(GetOwnerCard(_receivedData.OwnerCardName), list2, _receivedData.IsDeckSelf, _receivedData.IsBurialRite, _receivedData.EffectInfo, _receivedData.IsIgnoreVoice, _receivedData.CardInfoList));
	}

	public void AttackStartOperation()
	{
		if (_receivedData.isSelf)
		{
			BattleCardBase indexToCardBase = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattlePlayer, _receivedData.CardIndex);
			BattleCardBase indexToCardBase2 = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattleEnemy, _receivedData.TargetIndexList[0]);
			RegisterSequentialVfx(ReplayBattlePlayer.AttackStart(indexToCardBase, indexToCardBase2));
		}
		else
		{
			BattleCardBase indexToCardBase3 = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattleEnemy, _receivedData.CardIndex);
			BattleCardBase indexToCardBase4 = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattlePlayer, _receivedData.TargetIndexList[0]);
			RegisterSequentialVfx(ReplayBattleEnemy.AttackStart(indexToCardBase3, indexToCardBase4));
		}
	}

	public void AttackOperation()
	{
		List<BattleCardBase> cardListFromCardNameList = GetCardListFromCardNameList(_receivedData.DestroyCardNameList);
		List<BattleCardBase> cardListFromCardNameList2 = GetCardListFromCardNameList(_receivedData.BanishCardNameList);
		if (_receivedData.isSelf)
		{
			BattleCardBase indexToCardBase = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattlePlayer, _receivedData.CardIndex);
			BattleCardBase indexToCardBase2 = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattleEnemy, _receivedData.TargetIndexList[0]);
			RegisterSequentialVfx(ReplayBattlePlayer.Attack(indexToCardBase, indexToCardBase2, _receivedData.DealDamageList[0], _receivedData.ReceiveDamage, cardListFromCardNameList, _receivedData.DestroyTypeList, cardListFromCardNameList2, _receivedData.HealList[0], _receivedData.CardInfo, _receivedData.SideLogSkillInfoList, _receivedData.IsAttackerDead, _receivedData.IsTargetDead));
		}
		else
		{
			BattleCardBase indexToCardBase3 = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattleEnemy, _receivedData.CardIndex);
			BattleCardBase indexToCardBase4 = NetworkBattleGenericTool.GetIndexToCardBase(_networkReplayBattleMgr, ReplayBattlePlayer, _receivedData.TargetIndexList[0]);
			RegisterSequentialVfx(ReplayBattleEnemy.Attack(indexToCardBase3, indexToCardBase4, _receivedData.DealDamageList[0], _receivedData.ReceiveDamage, cardListFromCardNameList, _receivedData.DestroyTypeList, cardListFromCardNameList2, _receivedData.HealList[0], _receivedData.CardInfo, _receivedData.SideLogSkillInfoList, _receivedData.IsAttackerDead, _receivedData.IsTargetDead));
		}
	}

	public void CostChangeOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.CostChange(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.AddCostList, _receivedData.SetCostList, _receivedData.IsCostUpList, _receivedData.IsHalf, _receivedData.IsSpellCharge, _receivedData.IsOpenCard, _receivedData.EffectInfo));
	}

	public void RemoveCostChangeOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.RemoveCostChange(GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.RemoveCostChangeList, _receivedData.IsSpellCharge, _receivedData.IsAdd));
	}

	public void PowerUpOperation()
	{
		List<BattleCardBase> cardListFromCardNameList = GetCardListFromCardNameList(_receivedData.DestroyCardNameList);
		List<BattleCardBase> cardListFromCardNameList2 = GetCardListFromCardNameList(_receivedData.BanishCardNameList);
		BattleCardBase playVoiceOnDeathCard = GetPlayVoiceOnDeathCard(_receivedData.PlayVoiceOnDeathCard);
		RegisterSequentialVfx(_networkReplayBattleMgr.PowerUp(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.Attack, _receivedData.Life, _receivedData.MultiplyAttack, _receivedData.MultiplyLife, _receivedData.MaxLife, cardListFromCardNameList, _receivedData.DestroyTypeList, cardListFromCardNameList2, _receivedData.EffectInfo, playVoiceOnDeathCard, _receivedData.SideLogSkillInfoList));
	}

	public void GainPowerDownOperation()
	{
		List<BattleCardBase> cardListFromCardNameList = GetCardListFromCardNameList(_receivedData.DestroyCardNameList);
		List<BattleCardBase> cardListFromCardNameList2 = GetCardListFromCardNameList(_receivedData.BanishCardNameList);
		BattleCardBase playVoiceOnDeathCard = GetPlayVoiceOnDeathCard(_receivedData.PlayVoiceOnDeathCard);
		RegisterSequentialVfx(_networkReplayBattleMgr.GainPowerDown(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.Attack, _receivedData.Life, _receivedData.MaxLife, cardListFromCardNameList, _receivedData.DestroyTypeList, cardListFromCardNameList2, _receivedData.EffectInfo, playVoiceOnDeathCard, _receivedData.SideLogSkillInfoList));
	}

	public void SetPowerDownOperation()
	{
		List<BattleCardBase> cardListFromCardNameList = GetCardListFromCardNameList(_receivedData.DestroyCardNameList);
		List<BattleCardBase> cardListFromCardNameList2 = GetCardListFromCardNameList(_receivedData.BanishCardNameList);
		BattleCardBase playVoiceOnDeathCard = GetPlayVoiceOnDeathCard(_receivedData.PlayVoiceOnDeathCard);
		RegisterSequentialVfx(_networkReplayBattleMgr.SetPowerDown(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.Attack, _receivedData.Life, _receivedData.MaxLife, cardListFromCardNameList, _receivedData.DestroyTypeList, cardListFromCardNameList2, _receivedData.EffectInfo, playVoiceOnDeathCard, _receivedData.SideLogSkillInfoList));
	}

	public void DepriveBuffOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.DepriveBuff(GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.DepriveOffenseBuffList, _receivedData.DepriveLifeBuffList));
	}

	public void SpellChargeOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.SpellCharge(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.AddSpellChargeList, _receivedData.EffectInfo));
	}

	private BattleCardBase GetPlayVoiceOnDeathCard(string card)
	{
		if (string.IsNullOrEmpty(card))
		{
			return null;
		}
		List<BattleCardBase> source = (IsPlayerCardName(card) ? ReplayBattlePlayer.AllCardsWithCemeteryAndBanish : ReplayBattleEnemy.AllCardsWithCemeteryAndBanish);
		return _networkReplayBattleMgr.GetBattleCardIdx(source.ToList(), Convert.ToInt32(card.Substring(1)));
	}

	private List<BattleCardBase> GetCardListFromCardNameList(List<string> cardNameList)
	{
		List<BattleCardBase> list = new List<BattleCardBase>();
		for (int i = 0; i < cardNameList.Count; i++)
		{
			List<BattleCardBase> list2 = (IsPlayerCardName(cardNameList[i]) ? ReplayBattlePlayer.AllCardsWithSkillIngredient : ReplayBattleEnemy.AllCardsWithSkillIngredient);
			list.Add(_networkReplayBattleMgr.GetBattleCardIdx(list2, Convert.ToInt32(cardNameList[i].Substring(1))));
		}
		return list;
	}

	private BattleCardBase GetOwnerCard(string cardName)
	{
		if (string.IsNullOrEmpty(cardName))
		{
			return null;
		}
		List<BattleCardBase> list = (IsPlayerCardName(cardName) ? ReplayBattlePlayer.AllCardsWithSkillIngredient : ReplayBattleEnemy.AllCardsWithSkillIngredient);
		return _networkReplayBattleMgr.GetBattleCardIdx(list, Convert.ToInt32(cardName.Substring(1)));
	}

	private bool IsPlayerCardName(string name)
	{
		return name.Substring(0, 1) == "p";
	}

	public void DamageOperation()
	{
		List<BattleCardBase> cardListFromCardNameList = GetCardListFromCardNameList(_receivedData.DestroyCardNameList);
		List<BattleCardBase> cardListFromCardNameList2 = GetCardListFromCardNameList(_receivedData.BanishCardNameList);
		BattleCardBase playVoiceOnDeathCard = GetPlayVoiceOnDeathCard(_receivedData.PlayVoiceOnDeathCard);
		RegisterSequentialVfx(_networkReplayBattleMgr.Damage(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.DealDamageList, cardListFromCardNameList, _receivedData.DestroyTypeList, cardListFromCardNameList2, _receivedData.EffectInfo, _receivedData.IsReflectionDamage, playVoiceOnDeathCard, _receivedData.SideLogSkillInfoList, GetCardListFromCardNameList(_receivedData.EffectTargetCardNameList)));
	}

	public void HealOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.Heal(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.HealList, _receivedData.EffectInfo));
	}

	public void DiscardOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.Discard(GetCardListFromCardNameList(_receivedData.CardNameList)));
	}

	public void DestroyOrBanishOperation()
	{
		BattleCardBase playVoiceOnDeathCard = GetPlayVoiceOnDeathCard(_receivedData.PlayVoiceOnDeathCard);
		List<BattleCardBase> list = new List<BattleCardBase>();
		if (_receivedData.IsOpen)
		{
			if (_receivedData.CardInfoList != null)
			{
				if (_receivedData.isSelf)
				{
					for (int i = 0; i < _receivedData.CardInfoList.Count; i++)
					{
						BattleCardBase battleCardIdx = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.DeckCardList, _receivedData.CardInfoList[i].Index);
						_networkReplayBattleMgr.ClearAndUpdateParameterModifier(battleCardIdx, _receivedData.CardInfoList[i]);
						list.Add(battleCardIdx);
					}
				}
				else
				{
					ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
					for (int j = 0; j < _receivedData.CardInfoList.Count; j++)
					{
						BattleCardBase battleCardIdx2 = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.DeckCardList, _receivedData.CardInfoList[j].Index);
						VfxWith<BattleCardBase> vfxWith = _networkReplayBattleMgr.ReplaceReceivedCard(battleCardIdx2, _receivedData.CardInfoList[j], ReplayBattleEnemy, isFusion: false);
						list.Add(vfxWith.Value);
						parallelVfxPlayer.Register(vfxWith.Vfx);
					}
					RegisterSequentialVfx(parallelVfxPlayer);
				}
			}
		}
		else
		{
			list = GetCardListFromCardNameList(_receivedData.BanishCardNameList);
		}
		RegisterSequentialVfx(_networkReplayBattleMgr.DestroyOrBanish(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.DestroyCardNameList), _receivedData.DestroyTypeList, list, GetCardListFromCardNameList(_receivedData.IndestructibleCardNameList), _receivedData.EffectInfo, playVoiceOnDeathCard, _receivedData.IsBurialRite, _receivedData.IsOpen, _receivedData.SideLogSkillInfoList));
	}

	public void EvolveOperation()
	{
		if (_receivedData.CardInfo.IsSelf)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.Evolve(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.ClassAndInPlayCardList, _receivedData.CardInfo.Index), !_receivedData.IsNotConsumeEp, _receivedData.TransformCardId, _receivedData.CardInfo, _receivedData.CardInfoList));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattleEnemy.Evolve(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.ClassAndInPlayCardList, _receivedData.CardInfo.Index), !_receivedData.IsNotConsumeEp, _receivedData.TransformCardId, _receivedData.CardInfo));
		}
	}

	public void SkillEvolveOperation()
	{
		if (_receivedData.isSelf)
		{
			RegisterSequentialVfx(_networkReplayBattleMgr.SkillEvolve(GetOwnerCard(_receivedData.OwnerCardName), ReplayBattlePlayer.ClassAndInPlayCardList, _receivedData.CardInfoList, _receivedData.EffectInfo, _receivedData.EvolveMeWhenAttackIndex));
		}
		else
		{
			RegisterSequentialVfx(_networkReplayBattleMgr.SkillEvolve(GetOwnerCard(_receivedData.OwnerCardName), ReplayBattleEnemy.ClassAndInPlayCardList, _receivedData.CardInfoList, _receivedData.EffectInfo, _receivedData.EvolveMeWhenAttackIndex));
		}
	}

	public void ReturnOperation()
	{
		BattleCardBase playVoiceOnDeathCard = GetPlayVoiceOnDeathCard(_receivedData.PlayVoiceOnDeathCard);
		RegisterSequentialVfx(_networkReplayBattleMgr.Return(GetCardListFromCardNameList(_receivedData.CardNameList), GetCardListFromCardNameList(_receivedData.BanishCardNameList), GetCardListFromCardNameList(_receivedData.DestroyCardNameList), _receivedData.DestroyTypeList, _receivedData.SideLogSkillInfoList, playVoiceOnDeathCard));
		if (_receivedData.CardInfoList != null)
		{
			RegisterSequentialVfx(_networkReplayBattleMgr.UpdateHandInfo(ReplayBattlePlayer.HandCardList, ReplayBattleEnemy.HandCardList, _receivedData.CardInfoList, ReplayBattlePlayer.AllCardsWithSkillIngredient, ReplayBattleEnemy.AllCardsWithSkillIngredient));
		}
	}

	public void StartSelectOperation()
	{
		if (_receivedData.IsEvolve || _receivedData.IsChoiceBraveData)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.StartSelect(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.ClassAndInPlayCardList, _receivedData.CardIndex), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.IsEvolve, _receivedData.CardInfo, _receivedData.IsChoiceBraveData));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattlePlayer.StartSelect(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardIndex), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.IsEvolve, _receivedData.CardInfo, isChoiceBrave: false));
		}
	}

	public void SelectOperation()
	{
		IEnumerable<BattleCardBase> source = (IsPlayerCardName(_receivedData.SelectCard) ? ReplayBattlePlayer.AllCards : ReplayBattleEnemy.AllCards);
		BattleCardBase battleCardIdx = _networkReplayBattleMgr.GetBattleCardIdx(source.ToList(), Convert.ToInt32(_receivedData.SelectCard.Substring(1)));
		if (_receivedData.IsEvolve || _receivedData.IsChoiceBraveData)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.Select(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.ClassAndInPlayCardList, _receivedData.CardIndex), battleCardIdx, GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.IsEvolve, _receivedData.CardInfo, _receivedData.IsBurialRite));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattlePlayer.Select(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardIndex), battleCardIdx, GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.IsEvolve, _receivedData.CardInfo, _receivedData.IsBurialRite));
		}
	}

	public void CompleteSelectOperation()
	{
		RegisterSequentialVfx(ReplayBattlePlayer.CompleteSelect(_networkReplayBattleMgr.GetBattleCardIdx((_receivedData.IsEvolve || _receivedData.IsChoiceBraveData) ? ReplayBattlePlayer.ClassAndInPlayCardList : ReplayBattlePlayer.HandCardList, _receivedData.CardIndex), GetCardListFromCardNameList(_receivedData.CardNameList)[0], _receivedData.IsEvolve, _receivedData.IsBurialRite, _receivedData.IsChoiceBraveData));
	}

	public void CancelSelectOperation()
	{
		if (_receivedData.IsEvolve || _receivedData.IsChoiceBraveData)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.CancelSelect(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.ClassAndInPlayCardList, _receivedData.CardIndex), _receivedData.IsEvolve, _receivedData.IsChoiceBraveData));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattlePlayer.CancelSelect(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardIndex), _receivedData.IsEvolve, _receivedData.IsChoiceBraveData));
		}
	}

	public void StartChoiceOperation()
	{
		if (_receivedData.IsEvolve || _receivedData.IsChoiceBraveData)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.StartChoice(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.ClassAndInPlayCardList, _receivedData.CardIndex), _receivedData.CardInfoList, _receivedData.IsEvolve));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattlePlayer.StartChoice(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardIndex), _receivedData.CardInfoList, _receivedData.IsEvolve));
		}
	}

	public void CompleteChoiceOperation()
	{
		RegisterSequentialVfx(ReplayBattlePlayer.SelectChoice(_receivedData.TargetIndexList, _receivedData.IsTransformSelect));
		RegisterSequentialVfx(ReplayBattlePlayer.CompleteChoice(_networkReplayBattleMgr.GetBattleCardIdx((_receivedData.IsEvolve || _receivedData.IsChoiceBraveData) ? ReplayBattlePlayer.ClassAndInPlayCardList : ReplayBattlePlayer.HandCardList, _receivedData.CardIndex), _receivedData.IsTransformSelect, _receivedData.IsEvolve, _receivedData.IsChoiceBraveData));
	}

	public void CancelChoiceOperation()
	{
		if (_receivedData.IsEvolve || _receivedData.IsChoiceBraveData)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.CancelChoice(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.ClassAndInPlayCardList, _receivedData.CardIndex), _receivedData.IsEvolve));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattlePlayer.CancelChoice(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardIndex), _receivedData.IsEvolve));
		}
	}

	public void StartFusionOperation()
	{
		List<BattleCardBase> selectableCards = _receivedData.TargetIndexList.Select((int i) => _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, i)).ToList();
		RegisterSequentialVfx(ReplayBattlePlayer.StartFusion(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardIndex), selectableCards, _receivedData.CardInfo));
	}

	public void SelectFusionOperation()
	{
		RegisterSequentialVfx(ReplayBattlePlayer.SelectFusion(_receivedData.CardIndex, _receivedData.IsActive, _receivedData.MaxSelectCount, _receivedData.CanFusionMetamorphose));
		RegisterSequentialVfx(WaitVfx.Create(0.5f));
	}

	public void CompleteFusionOperation()
	{
		if (_receivedData.isSelf)
		{
			List<BattleCardBase> ingredientCards = _receivedData.CardInfoList.Select((NetworkBattleReceiver.CardInfo i) => _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, i.Index)).ToList();
			RegisterSequentialVfx(ReplayBattlePlayer.CompleteFusion(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardInfo.Index), ingredientCards, _receivedData.CardInfo, _receivedData.IsFusionMetamorphose, _receivedData.FusionMetamorphoseCardId, _receivedData.SideLogSkillInfoList));
			return;
		}
		SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
		BattleCardBase battleCardIdx = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.HandCardList, _receivedData.CardInfo.Index);
		VfxWith<BattleCardBase> vfxWith = _networkReplayBattleMgr.ReplaceReceivedCard(battleCardIdx, _receivedData.CardInfo, ReplayBattleEnemy, isFusion: true);
		battleCardIdx = vfxWith.Value;
		battleCardIdx.BattleCardView.UpdateParameterView(battleCardIdx.Atk, battleCardIdx.Life, _receivedData.CardInfo.Cost, battleCardIdx.BaseParameter.CardName, battleCardIdx.IsInplay);
		sequentialVfxPlayer.Register(vfxWith.Vfx);
		List<BattleCardBase> list = new List<BattleCardBase>();
		for (int num = 0; num < _receivedData.CardInfoList.Count; num++)
		{
			BattleCardBase battleCardIdx2 = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.HandCardList, _receivedData.CardInfoList[num].Index);
			VfxWith<BattleCardBase> vfxWith2 = _networkReplayBattleMgr.ReplaceReceivedCard(battleCardIdx2, _receivedData.CardInfoList[num], ReplayBattleEnemy, isFusion: true);
			BattleCardBase value = vfxWith2.Value;
			value.BattleCardView.UpdateParameterView(value.Atk, value.Life, _receivedData.CardInfoList[num].Cost, value.BaseParameter.CardName, value.IsInplay);
			list.Add(value);
			sequentialVfxPlayer.Register(vfxWith2.Vfx);
		}
		RegisterSequentialVfx(sequentialVfxPlayer);
		RegisterSequentialVfx(ReplayBattleEnemy.CompleteFusion(battleCardIdx, list, _receivedData.CardInfo, _receivedData.IsFusionMetamorphose, _receivedData.FusionMetamorphoseCardId, _receivedData.SideLogSkillInfoList));
	}

	public void CancelFusionOperation()
	{
		RegisterSequentialVfx(ReplayBattlePlayer.CancelFusion(_networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardIndex)));
	}

	public void ChantCountChangeOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ChantCountChange(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.ChangeCount, _receivedData.EffectInfo));
	}

	public void ChangeWhiteRitualStackOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ChangeWhiteRitualStack(GetCardListFromCardNameList(_receivedData.CardNameList).First(), _receivedData.ChangeCount, _receivedData.IsDestroy, _receivedData.CardInfo));
	}

	public void Necromance()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.Necromance(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.IsFusionNecromance));
	}

	public void ChangeMaxAttackableCountOperation()
	{
		List<BattleCardBase> cardListFromCardNameList = GetCardListFromCardNameList(_receivedData.CardNameList);
		for (int i = 0; i < cardListFromCardNameList.Count(); i++)
		{
			cardListFromCardNameList.ElementAt(i).attackCountinfo.Add(new BattleCardBase.SetAttackCountInfo(null, _receivedData.ChangeCount));
		}
	}

	public void UpdateDeckOperation()
	{
		if (_receivedData.isSelf)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.UpdateDeck(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList, _receivedData.IsChange, _receivedData.IsOpen, _receivedData.EffectInfo));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattleEnemy.UpdateDeck(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList, _receivedData.IsChange, _receivedData.IsOpen, _receivedData.EffectInfo));
		}
	}

	public void IndexChangeOperation()
	{
		if (_receivedData.isSelf)
		{
			_networkReplayBattleMgr.IndexChange(ReplayBattlePlayer, _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.DeckCardList, _receivedData.CardIndexList[0]), _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.DeckCardList, _receivedData.CardIndexList[1]));
		}
		else
		{
			_networkReplayBattleMgr.IndexChange(ReplayBattleEnemy, _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.DeckCardList, _receivedData.CardIndexList[0]), _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.DeckCardList, _receivedData.CardIndexList[1]));
		}
	}

	public void MetamorphoseOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.Metamorphose(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.CardIdList, _receivedData.EffectInfo));
	}

	public void GetonOperation()
	{
		if (_receivedData.isSelf)
		{
			List<BattleCardBase> targets = _receivedData.TargetIndexList.Select((int i) => _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.ClassAndInPlayCardList, i)).ToList();
			RegisterSequentialVfx(_networkReplayBattleMgr.Geton(GetOwnerCard(_receivedData.OwnerCardName), targets, _receivedData.EffectInfo));
		}
		else
		{
			List<BattleCardBase> targets2 = _receivedData.TargetIndexList.Select((int i) => _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.ClassAndInPlayCardList, i)).ToList();
			RegisterSequentialVfx(_networkReplayBattleMgr.Geton(GetOwnerCard(_receivedData.OwnerCardName), targets2, _receivedData.EffectInfo));
		}
	}

	public void GetoffOperation()
	{
		if (_receivedData.isSelf)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.Getoff(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList, _receivedData.EffectInfo));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattleEnemy.Getoff(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.CardInfoList, _receivedData.EffectInfo));
		}
	}

	public void UniteOperation()
	{
		if (_receivedData.isSelf)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.Unite(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.CardIdList[0], _receivedData.CardIndexList[0], _receivedData.EffectInfo));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattleEnemy.Unite(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.CardIdList[0], _receivedData.CardIndexList[0], _receivedData.EffectInfo));
		}
	}

	public void OpenCardOperation()
	{
		if (_receivedData.isSelf)
		{
			BattleCardBase battleCardIdx = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattlePlayer.HandCardList, _receivedData.CardInfo.Index);
			RegisterSequentialVfx(ReplayBattlePlayer.OpenCard(battleCardIdx));
			return;
		}
		BattleCardBase battleCardIdx2 = _networkReplayBattleMgr.GetBattleCardIdx(ReplayBattleEnemy.HandCardList, _receivedData.CardInfo.Index);
		VfxWith<BattleCardBase> vfxWith = _networkReplayBattleMgr.ReplaceReceivedCard(battleCardIdx2, _receivedData.CardInfo, ReplayBattleEnemy, isFusion: false);
		battleCardIdx2 = vfxWith.Value;
		RegisterSequentialVfx(vfxWith.Vfx);
		RegisterSequentialVfx(ReplayBattleEnemy.OpenCard(battleCardIdx2, _receivedData.CardInfo.Cost, _receivedData.IsLastDrawOpenCard));
	}

	public void ShowSkillEffectOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ShowSkillEffect(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.EffectInfo));
	}

	public void ShowSkillInductionEffect()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ShowSkillInductionEffect(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.SkillVoice, _receivedData.IsIgnoreVoice, _receivedData.CardInfo));
	}

	public void ShowIndependentEffect()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ShowIndependentEffect(GetCardListFromCardNameList(_receivedData.CardNameList)));
	}

	public void ChangeAffiliationOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ShowChangeAffiliation(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.Clan, _receivedData.Tribe, _receivedData.EffectInfo));
	}

	public void ShowChangeUnionBurstAndSkyboundArtEffect()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ShowChangeUnionBurstAndSkyboundArtEffect(GetCardListFromCardNameList(_receivedData.CardNameList)));
	}

	public void ShowRepeatSkillEffect()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ShowRepeatSkillEffect(_receivedData.isSelf));
	}

	public void GiveCantActivateFanfareOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.GiveCantActivateFanfare(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.EffectInfo));
	}

	public void DepriveCantActivateFanfareOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.DepriveCantActivateFanfare(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList)));
	}

	public void LoseSkillOperation()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.LoseSkill(GetOwnerCard(_receivedData.OwnerCardName), GetCardListFromCardNameList(_receivedData.CardNameList), _receivedData.EffectInfo));
	}

	public void UpdateHandInfo()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.UpdateHandInfo(ReplayBattlePlayer.HandCardList, ReplayBattleEnemy.HandCardList, _receivedData.CardInfoList, ReplayBattlePlayer.AllCardsWithSkillIngredient, ReplayBattleEnemy.AllCardsWithSkillIngredient, _receivedData.IsImmediate));
	}

	public void UpdateChoiceBraveButtonEffet()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.UpdateChoiceBraveButtonEffet(_receivedData.IsActive, _receivedData.IsImmediate));
	}

	public void UpdateInplayInfo()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.UpdateInplayInfo(ReplayBattlePlayer.ClassAndInPlayCardList, ReplayBattleEnemy.ClassAndInPlayCardList, _receivedData.CardInfoList, ReplayBattlePlayer.AllCardsWithSkillIngredient, ReplayBattleEnemy.AllCardsWithSkillIngredient, ReplayBattlePlayer.IsSelfTurn, isInitialize: false, _receivedData.OnlyEffect, _receivedData.OnlyAttackEffect, _receivedData.UpdateAttackEffect, _receivedData.UseRecordAttackEffect));
	}

	public void UpdateDeckInfo()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.UpdateDeckOrReservedInfo(ReplayBattlePlayer.DeckCardList, ReplayBattleEnemy.DeckCardList, _receivedData.CardInfoList));
	}

	public void UpdateAttachedCardInfo()
	{
		_networkReplayBattleMgr.UpdateAttachedCardInfo(ReplayBattlePlayer.AllCardsWithSkillIngredient, ReplayBattleEnemy.AllCardsWithSkillIngredient, _receivedData.CardInfoList);
	}

	public void UpdateFusionCardInfo()
	{
		for (int i = 0; i < _receivedData.CardInfoList.Count; i++)
		{
			_networkReplayBattleMgr.UpdateFusionCardInfo(_receivedData.CardInfoList[i]);
		}
	}

	public void UpdateStatusPanel()
	{
		_networkReplayBattleMgr.UpdateStatusPanel(_receivedData.PlayerStatusPanelInfo, _receivedData.EnemyStatusPanelInfo);
	}

	public void UpdateBattleLog()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.UpdateBattleLog(ReplayBattlePlayer.AllCardsWithSkillIngredient, ReplayBattleEnemy.AllCardsWithSkillIngredient, _receivedData.BattleLogIndex, new List<NewReplayBattleMgr.BattleLogTextureInfo>()));
	}

	public void UpdateClassInfoUi()
	{
		_networkReplayBattleMgr.UpdateClassInfoUi(_receivedData.PlayerClassInfo, _receivedData.EnemyClassInfo);
	}

	public void UpdateMyRotationBonus()
	{
		_networkReplayBattleMgr.UpdateMyRotationBonus(_receivedData.MyRotationBonusInfoList);
	}

	public void UpdateAvatarBattleDescValueList()
	{
		_networkReplayBattleMgr.UpdateAvatarBattleDescValueList(_receivedData.PlayerAvatarBattleDescInfo, _receivedData.EnemyAvatarBattleDescInfo);
	}

	public void UpdateAttackableEffect()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.UpdateAttackableEffect(ReplayBattlePlayer.ClassAndInPlayCardList, ReplayBattleEnemy.ClassAndInPlayCardList, _receivedData.CardInfoList, ReplayBattlePlayer.IsSelfTurn));
	}

	public void SkillProcessStart()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.CreateSkillSideLog(_receivedData.SideLogSkillInfoList));
	}

	public void SkillVfxStart()
	{
		_networkReplayBattleMgr.IsDuringSkillProcess = true;
		_networkReplayBattleMgr.SkillVfxStack.Push(VfxWithLoadingSequential.Create());
	}

	public void SkillVfxEnd()
	{
		VfxWithLoadingSequential vfxWithLoadingSequential = _networkReplayBattleMgr.SkillVfxStack.Pop();
		if (_networkReplayBattleMgr.SkillVfxStack.Count > 0)
		{
			_networkReplayBattleMgr.SkillVfxStack.Peek().RegisterToMainVfx(vfxWithLoadingSequential);
			return;
		}
		_networkReplayBattleMgr.IsDuringSkillProcess = false;
		RegisterSequentialVfx(vfxWithLoadingSequential);
	}

	public void ClearSideLog()
	{
		SideLogControl sideLogControl = (_receivedData.isSelf ? ReplayBattlePlayer.BattleView.GetSideLogControl(isSkillTargetSelect: false) : ReplayBattleEnemy.BattleView.GetSideLogControl(isSkillTargetSelect: false));
		RegisterSequentialVfx(sideLogControl.ClearLastShowLogCard());
	}

	public void ClearDestroyedCardList()
	{
		_networkReplayBattleMgr.OperateMgr.BattleLogManager.ClearDestroyedCardList(_receivedData.isSelf);
	}

	public void PlayEmotion()
	{
		if (_receivedData.isSelf)
		{
			RegisterSequentialVfx(ReplayBattlePlayer.PlayEmotion(_receivedData.EmoteType));
		}
		else
		{
			RegisterSequentialVfx(ReplayBattleEnemy.PlayEmotion(_receivedData.EmoteType));
		}
	}

	public void AttachShortageDeckWin()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.AttachShortageDeckWin(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.EffectInfo));
	}

	public void ShortageDeckWin()
	{
		if (_receivedData.isSelf)
		{
			RegisterSequentialVfx(_networkReplayBattleMgr.ShortageDeckWin(ReplayBattlePlayer));
		}
		else
		{
			RegisterSequentialVfx(_networkReplayBattleMgr.ShortageDeckWin(ReplayBattleEnemy));
		}
	}

	public void ShortageDeckLose()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.ShortageDeckLose(_receivedData.isSelf));
	}

	public void SpecialWin()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.SpecialWin(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.EffectInfo));
	}

	public void SpecialLose()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.SpecialLose(GetOwnerCard(_receivedData.OwnerCardName), _receivedData.EffectInfo));
	}

	public void BattleFinish()
	{
		RegisterSequentialVfx(_networkReplayBattleMgr.BattleFinish(_receivedData.isWin, _receivedData.IsPlayerDead, _receivedData.IsEnemyDead, _receivedData.FinishType, _receivedData.ResultCode));
	}
}
