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.
66 lines
1.5 KiB
C#
66 lines
1.5 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Wizard;
|
|
|
|
public class AINecromance : AIScriptArgumentExpressions
|
|
{
|
|
private AIPolishConvertedExpression valueArg;
|
|
|
|
private const int ValueArgIndex = 0;
|
|
|
|
private const int TimingIndex = 1;
|
|
|
|
public AIScriptTokenArgType Timing { get; private set; }
|
|
|
|
public AINecromance(string text)
|
|
: base(text)
|
|
{
|
|
}
|
|
|
|
protected override void InitExpressions(string text)
|
|
{
|
|
base.InitExpressions(text);
|
|
if (_exprList.Count < 2)
|
|
{
|
|
return;
|
|
}
|
|
valueArg = _exprList[0];
|
|
AIPolishConvertedExpression aIPolishConvertedExpression = _exprList[1];
|
|
if (aIPolishConvertedExpression.TokenList[0] is AIScriptArgumentToken)
|
|
{
|
|
AIScriptArgumentToken aIScriptArgumentToken = aIPolishConvertedExpression.TokenList[0] as AIScriptArgumentToken;
|
|
if (CheckValidTimingType(aIScriptArgumentToken.ArgumentType))
|
|
{
|
|
Timing = aIScriptArgumentToken.ArgumentType;
|
|
}
|
|
else
|
|
{
|
|
Timing = AIScriptTokenArgType.NONE;
|
|
}
|
|
}
|
|
}
|
|
|
|
public int GetNecromanceValue(AIVirtualCard tagOwner, int currentCemetery, AIVirtualField field, AISituationInfo situation, List<int> playPtn)
|
|
{
|
|
if (valueArg == null)
|
|
{
|
|
return 0;
|
|
}
|
|
int num = (int)valueArg.EvalArg(tagOwner, playPtn, field, situation);
|
|
if (num <= currentCemetery)
|
|
{
|
|
return num;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
public bool CheckValidTimingType(AIScriptTokenArgType type)
|
|
{
|
|
if ((uint)(type - 60) <= 2u || (uint)(type - 65) <= 2u)
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|