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:
56
SVSim.BattleEngine/Engine/Wizard/AIWhenPlayRecoverPp.cs
Normal file
56
SVSim.BattleEngine/Engine/Wizard/AIWhenPlayRecoverPp.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class AIWhenPlayRecoverPp : AIWhenPlayTagArgument
|
||||
{
|
||||
private readonly int NUM_ARG_OFFSET = 1;
|
||||
|
||||
private AIPolishConvertedExpression _numberArgument;
|
||||
|
||||
public AIWhenPlayRecoverPp(string text)
|
||||
: base(text)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitExpressions(string text)
|
||||
{
|
||||
base.InitExpressions(text);
|
||||
_numberArgument = _exprList[_exprList.Count - NUM_ARG_OFFSET];
|
||||
}
|
||||
|
||||
protected override void InitializeFilter()
|
||||
{
|
||||
base.Filters = null;
|
||||
}
|
||||
|
||||
protected override void InitSelectType()
|
||||
{
|
||||
base.SelectType = AIScriptTokenArgType.NONE;
|
||||
}
|
||||
|
||||
public int GetPlayRecoverPp(AIVirtualCard tagOwner, List<int> playPtn, AIVirtualField field, AISituationInfo situation)
|
||||
{
|
||||
return (int)_numberArgument.EvalArg(tagOwner, playPtn, field, situation);
|
||||
}
|
||||
|
||||
public override void Execute(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation = null)
|
||||
{
|
||||
if (situation == null || situation.ActionType != AIOperationType.PLAY || situation.Actor == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int playRecoverPp = GetPlayRecoverPp(tagOwner, playPtn, field, situation);
|
||||
if (playRecoverPp >= 0)
|
||||
{
|
||||
if (tagOwner.IsAlly)
|
||||
{
|
||||
field.AllyPp += playRecoverPp;
|
||||
}
|
||||
else
|
||||
{
|
||||
field.EnemyPp += playRecoverPp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user