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:
79
SVSim.BattleEngine/Engine/Wizard/AIRemoveSkill.cs
Normal file
79
SVSim.BattleEngine/Engine/Wizard/AIRemoveSkill.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
using System.Linq;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class AIRemoveSkill : AIScriptArgumentExpressions
|
||||
{
|
||||
private readonly AIScriptTokenArgType[] LEGAL_TIMING_ARGS = new AIScriptTokenArgType[2]
|
||||
{
|
||||
AIScriptTokenArgType.WHEN_DESTROY,
|
||||
AIScriptTokenArgType.WHEN_CLASH
|
||||
};
|
||||
|
||||
private readonly AIScriptTokenArgType[] LEGAL_TYPE_ARGS = new AIScriptTokenArgType[2]
|
||||
{
|
||||
AIScriptTokenArgType.ALL,
|
||||
AIScriptTokenArgType.KILLER
|
||||
};
|
||||
|
||||
public AIScriptTokenArgType Timing { get; private set; }
|
||||
|
||||
public AIScriptTokenArgType RemoveSkillType { get; private set; }
|
||||
|
||||
public AIRemoveSkill(string text)
|
||||
: base(text)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitExpressions(string text)
|
||||
{
|
||||
base.InitExpressions(text);
|
||||
Timing = AIScriptTokenArgType.NONE;
|
||||
RemoveSkillType = AIScriptTokenArgType.NONE;
|
||||
int num = -1;
|
||||
AIScriptTokenArgType legalType = AIScriptTokenArgType.NONE;
|
||||
for (int i = 0; i < _exprList.Count; i++)
|
||||
{
|
||||
if (IsLegalType(_exprList[i], LEGAL_TYPE_ARGS, out legalType))
|
||||
{
|
||||
num = i;
|
||||
RemoveSkillType = legalType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (num < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num2 = -1;
|
||||
for (int j = 0; j < _exprList.Count; j++)
|
||||
{
|
||||
if (IsLegalType(_exprList[j], LEGAL_TIMING_ARGS, out legalType))
|
||||
{
|
||||
num2 = j;
|
||||
Timing = legalType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
_ = 0;
|
||||
}
|
||||
|
||||
private bool IsLegalType(AIPolishConvertedExpression arg, AIScriptTokenArgType[] argArray, out AIScriptTokenArgType legalType)
|
||||
{
|
||||
legalType = AIScriptTokenArgType.NONE;
|
||||
if (arg.TokenList != null && arg.TokenList.Count > 0)
|
||||
{
|
||||
AIScriptTokenBase aIScriptTokenBase = arg.TokenList[0];
|
||||
if (aIScriptTokenBase is AIScriptArgumentToken)
|
||||
{
|
||||
AIScriptTokenArgType argumentType = ((AIScriptArgumentToken)aIScriptTokenBase).ArgumentType;
|
||||
if (argArray.Contains(argumentType))
|
||||
{
|
||||
legalType = argumentType;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user