feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
This commit is contained in:
69
SVSim.BattleEngine/Engine/Wizard/AILastwordReanimate.cs
Normal file
69
SVSim.BattleEngine/Engine/Wizard/AILastwordReanimate.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class AILastwordReanimate : AIFiltersArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _costArgument;
|
||||
|
||||
public AIScriptTokenArgType TokenSide;
|
||||
|
||||
private const int SIDE_OFFSET = 1;
|
||||
|
||||
private const int REANIMATE_COST_ARG_OFFSET = 2;
|
||||
|
||||
private int _ommittedIndexOffset;
|
||||
|
||||
private int _realNonFilterFirstOffset;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => _realNonFilterFirstOffset;
|
||||
|
||||
public AILastwordReanimate(string text)
|
||||
: base(text)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitExpressions(string text)
|
||||
{
|
||||
InitExprList(text);
|
||||
InitializeSide();
|
||||
_costArgument = _exprList[_exprList.Count - (2 - _ommittedIndexOffset)];
|
||||
_realNonFilterFirstOffset = 2 - _ommittedIndexOffset;
|
||||
InitializeFilter();
|
||||
}
|
||||
|
||||
private void InitializeSide()
|
||||
{
|
||||
if (AIPlayTagInitializingUtility.TryCreateTokenSideType(_exprList[_exprList.Count - 1], out var sideType))
|
||||
{
|
||||
_ommittedIndexOffset = 0;
|
||||
TokenSide = sideType;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ommittedIndexOffset = 1;
|
||||
TokenSide = AIScriptTokenArgType.ALLY;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitializeFilter()
|
||||
{
|
||||
base.Filters = new List<AIScriptTokenBase>();
|
||||
int num = _exprList.Count - NON_FILTER_FIRST_OFFSET;
|
||||
if (num > 0)
|
||||
{
|
||||
List<AIPolishConvertedExpression> range = _exprList.GetRange(0, num);
|
||||
base.Filters = GetFilters(range);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Execute(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation = null)
|
||||
{
|
||||
bool isTokenAlly;
|
||||
int reanimateTokenId = AIReanimateSimulationUtility.GetReanimateTokenId(tagOwner, field, playPtn, situation, base.Filters, _costArgument, TokenSide, out isTokenAlly);
|
||||
if (reanimateTokenId != -1)
|
||||
{
|
||||
AISummonTokenUtility.CreateTokenIdCollectionForReanimate(tagOwner, reanimateTokenId, isTokenAlly).SummonAllTokenToField(field, tagOwner, situation);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user