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.
64 lines
1.7 KiB
C#
64 lines
1.7 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace Wizard;
|
|
|
|
public class AIDamagedBuff : AIScriptArgumentExpressions
|
|
{
|
|
private AIPolishConvertedExpression _atkBuff;
|
|
|
|
private AIPolishConvertedExpression _lifeBuff;
|
|
|
|
private const int ATTACK_BUFF_INDEX = 0;
|
|
|
|
private const int LIFE_BUFF_INDERX = 1;
|
|
|
|
public AIDamagedBuff(string text)
|
|
: base(text)
|
|
{
|
|
}
|
|
|
|
protected override void InitExpressions(string text)
|
|
{
|
|
base.InitExpressions(text);
|
|
if (_exprList.Count < 2)
|
|
{
|
|
AIConsoleUtility.LogError("AIDamagedBuff Argument Error!! Arg Count = " + _exprList.Count);
|
|
return;
|
|
}
|
|
_atkBuff = _exprList[0];
|
|
_lifeBuff = _exprList[1];
|
|
}
|
|
|
|
public override void Execute(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation = null)
|
|
{
|
|
AIBuffExecutingInfo_old buffExecutingInfo_old = AIBuffSimulationUtility.GetBuffExecutingInfo_old(tagOwner, field, situation, playPtn, _atkBuff, _lifeBuff);
|
|
AIBuffSimulationUtility.BuffSingle_old(tagOwner, field, buffExecutingInfo_old, isTemp: false, playPtn, situation);
|
|
}
|
|
|
|
public int GetAttackBuff(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation)
|
|
{
|
|
if (_atkBuff == null)
|
|
{
|
|
return 0;
|
|
}
|
|
if (_atkBuff.IsMultiplyMarked)
|
|
{
|
|
return 0;
|
|
}
|
|
return (int)_atkBuff.EvalArg(tagOwner, playPtn, field, situation);
|
|
}
|
|
|
|
public int GetLifeBuff(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation)
|
|
{
|
|
if (_lifeBuff == null)
|
|
{
|
|
return 0;
|
|
}
|
|
if (_lifeBuff.IsMultiplyMarked)
|
|
{
|
|
return 0;
|
|
}
|
|
return (int)_lifeBuff.EvalArg(tagOwner, playPtn, field, situation);
|
|
}
|
|
}
|