Files
SVSimServer/SVSim.BattleEngine/Engine/Skill_change_white_ritual_stack.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

59 lines
2.2 KiB
C#

using System.Collections.Generic;
using System.Linq;
using Wizard.Battle;
using Wizard.Battle.UI;
using Wizard.Battle.View.Vfx;
public class Skill_change_white_ritual_stack : SkillBase
{
public Skill_change_white_ritual_stack(SkillParameter skillPrm, string option)
: base(skillPrm, option)
{
}
public override VfxWithLoading Start(CallParameter parameter)
{
VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create();
SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create();
int num = base.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.add, -1);
BattleCardBase newestInplayStack = base.SkillPrm.selfBattlePlayer.InPlayCards.Where((BattleCardBase c) => c.IsTribe(CardBasePrm.TribeType.WHITE_RITUAL) && c.HasSkillStackWhiteRitual).LastOrDefault();
if (newestInplayStack != null)
{
newestInplayStack.SkillApplyInformation.GiveWhiteRitualCount(num);
sequentialVfxPlayer.Register(new ChangeWhiteRitualCountVfx(newestInplayStack, num));
CallOnChangeWhiteRitualStack(newestInplayStack, num);
if (newestInplayStack.SkillApplyInformation.WhiteRitualCount <= 0)
{
CallOnSkillDestroy();
newestInplayStack.FlagCardAsDestroyedBySkill();
sequentialVfxPlayer.Register(newestInplayStack.SelfBattlePlayer.CardManagement(newestInplayStack, parameter.skillProcessor, BattlePlayerBase.CARD_MANAGEMENT.DESTROY, isRandom: false, null, null, this));
}
if (IsBattleLog)
{
if (base.SkillPrm.selfBattlePlayer.SkillInfoCemeterys.Any((IReadOnlyBattleCardInfo c) => c == newestInplayStack))
{
BattleLogManager.GetInstance().AddLogSkillDeath(new List<BattleCardBase> { newestInplayStack }, this);
}
else if (num >= 0)
{
BattleLogManager.GetInstance().AddLogGiveWhiteRitualStack(num, newestInplayStack, this);
}
else
{
BattleLogManager.GetInstance().AddLogDepriveWhiteRitualStack(num, newestInplayStack, this);
}
}
}
vfxWithLoadingSequential.RegisterToMainVfx(sequentialVfxPlayer);
return vfxWithLoadingSequential;
}
protected virtual void CallOnChangeWhiteRitualStack(BattleCardBase target, int changeCount)
{
}
protected virtual void CallOnSkillDestroy()
{
}
}