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.
54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
namespace Wizard;
|
|
|
|
public class AIFirstMoveBonus : AIScriptArgumentExpressions
|
|
{
|
|
private AIPolishConvertedExpression valueArg;
|
|
|
|
private readonly int BONUS_VALUE_START_INDEX = 1;
|
|
|
|
public AIScriptTokenArgType ActionArgType { get; private set; }
|
|
|
|
public AIFirstMoveBonus(string text)
|
|
: base(text)
|
|
{
|
|
}
|
|
|
|
protected override void InitExpressions(string text)
|
|
{
|
|
base.InitExpressions(text);
|
|
if (_exprList.Count <= BONUS_VALUE_START_INDEX)
|
|
{
|
|
AIConsoleUtility.LogError($"AIFirstMoveBonus Argument Error!! Arg count is not enough !! [count:{_exprList.Count}]");
|
|
return;
|
|
}
|
|
for (int i = 0; i < _exprList.Count - BONUS_VALUE_START_INDEX; i++)
|
|
{
|
|
if (IsLegalArgType(_exprList[i], out var argType))
|
|
{
|
|
ActionArgType = argType;
|
|
}
|
|
else
|
|
{
|
|
AIConsoleUtility.LogError($"AIFirstMoveBonus ArgType Expression Error!! ArgType [{argType}] is Ilegal!");
|
|
}
|
|
}
|
|
valueArg = _exprList[_exprList.Count - BONUS_VALUE_START_INDEX];
|
|
}
|
|
|
|
public float GetEvaluateValue(AIVirtualCard tagOwner, AISituationInfo situation)
|
|
{
|
|
return valueArg.EvalArg(tagOwner, EnemyAI.EmptyPlayPtn, tagOwner.SelfField, situation);
|
|
}
|
|
|
|
private bool IsLegalArgType(AIPolishConvertedExpression arg, out AIScriptTokenArgType argType)
|
|
{
|
|
argType = GetFirstTokenArgType(arg);
|
|
AIScriptTokenArgType aIScriptTokenArgType = argType;
|
|
if (aIScriptTokenArgType == AIScriptTokenArgType.ALL || (uint)(aIScriptTokenArgType - 161) <= 1u)
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|