Copied the 89 uncopied AI*SimulationUtility/extension files defining the AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
51 lines
1.7 KiB
C#
51 lines
1.7 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using LitJson;
|
|
using Wizard.AutoTest;
|
|
using Wizard.Battle.Recovery;
|
|
using Wizard.Battle.View.Vfx;
|
|
|
|
namespace Wizard.Battle.Operation;
|
|
|
|
public class FusionOperationCommand : SkillOperationCommandBase
|
|
{
|
|
public FusionOperationCommand(JsonData actionJsonData)
|
|
: base(actionJsonData)
|
|
{
|
|
}
|
|
|
|
protected virtual BattleCardBase ReplaceCardData(BattleManagerBase battleMgr, BattleCardBase fusionCard)
|
|
{
|
|
return fusionCard;
|
|
}
|
|
|
|
public override void Operation(BattleManagerBase battleMgr)
|
|
{
|
|
BattleCardBase battleCardBase = battleMgr.GetBattlePlayer(_cardInfo.IsPlayer).HandCardList.SingleOrDefault((BattleCardBase c) => c.Index == _cardInfo.Index);
|
|
if (battleCardBase == null)
|
|
{
|
|
if (!(UIManager.GetInstance().NowOpenDialog != null))
|
|
{
|
|
LocalLog.AccumulateTraceLog("Card not found in hand :" + _cardInfo.Index + " " + _cardInfo.Name);
|
|
RecoveryManagerBase.OpenRecoveryFailedDialog();
|
|
}
|
|
return;
|
|
}
|
|
battleCardBase = ReplaceCardData(battleMgr, battleCardBase);
|
|
List<BattleCardBase> list = new List<BattleCardBase>();
|
|
foreach (SkillTargetInfo skillTargetInfo in _skillTargetInfoList)
|
|
{
|
|
AutoTestBattleMgr.CardInfo targetCardInfo = skillTargetInfo.TargetCard;
|
|
BattleCardBase item = battleMgr.GetBattlePlayer(targetCardInfo.IsPlayer).AllCards.Single((BattleCardBase c) => c.Index == targetCardInfo.Index);
|
|
list.Add(item);
|
|
}
|
|
VfxBase vfx = battleMgr.OperateMgr.FusionCard(battleCardBase, _cardInfo.IsPlayer, list);
|
|
battleMgr.VfxMgr.RegisterSequentialVfx(vfx);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "Operation comp_fusion " + _cardInfo.Name;
|
|
}
|
|
}
|