Files
SVSimServer/SVSim.BattleEngine/Engine/Skill_bp_modifier.cs
gamer147 957af3d1ec 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.
2026-06-05 17:22:20 -04:00

55 lines
2.0 KiB
C#

using System.Linq;
using Wizard.Battle.View.Vfx;
public class Skill_bp_modifier : SkillBase
{
public static readonly int BP_NONE = -1;
public const string BP_MINUS_EFFECT = "cmn_ui_hbp_1";
public const string BP_PLUS_EFFECT = "cmn_ui_hbp_2";
public Skill_bp_modifier(SkillParameter skillPrm, string option)
: base(skillPrm, option)
{
}
public override VfxWithLoading Start(CallParameter parameter)
{
int num = base.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add_bp, 0);
int num2 = base.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.gain_bp, BP_NONE);
_ = IsBattleLog;
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
for (int i = 0; i < parameter.targetCards.Count(); i++)
{
BattlePlayerBase targetClass = parameter.targetCards.ElementAt(i).SelfBattlePlayer;
if (num != 0)
{
parallelVfxPlayer.Register(new LoadAndPlayEffectVfx("cmn_ui_hbp_2", null, () => targetClass.BattleView.GetBPLabelPosition(), 0f, BattleManagerBase.GetIns().Battle3DContainer.layer));
parallelVfxPlayer.Register(AddBp(targetClass, num));
if (targetClass is BattlePlayer)
{
parallelVfxPlayer.Register(InstantVfx.Create(delegate
{
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_HBP_UP);
}));
}
}
else if (num2 > BP_NONE)
{
parallelVfxPlayer.Register(new LoadAndPlayEffectVfx("cmn_ui_hbp_1", null, () => targetClass.BattleView.GetBPLabelPosition(), 0f, BattleManagerBase.GetIns().Battle3DContainer.layer));
parallelVfxPlayer.Register(AddBp(targetClass, -num2));
}
}
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
vfxWithLoadingSequential.RegisterVfxWithLoading(CreateSkillEffect(base.SkillPrm.resourceMgr, parameter.targetCards));
vfxWithLoadingSequential.RegisterToMainVfx(parallelVfxPlayer);
return vfxWithLoadingSequential;
}
protected virtual VfxBase AddBp(BattlePlayerBase target, int value)
{
return target.AddBp(value);
}
}