Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard.Battle.View.Vfx/NullVfxWithLoading.cs
gamer147 c47ae93027 feat(battle-engine-port): M3 COMPLETE — fixed-damage spell resolves headless (leader-life-delta oracle passes)
Card 900124030 (ELF cost-3, when_play damage=3 to enemy leader) resolves to
correct authoritative state headless via the IsForecast/IsRecovery +
ActionProcessor.PlayCard path. New oracle dimension (opponent leader-life delta)
passes; 3/3 tests green; engine still 0 errors; check_drift clean.

Four headless gaps, each mechanical (no logic/Unity wall):
- Data seam: InitLeaderLife (SetupInitialGameState->InitializeClassLife subset);
  leader BaseMaxLife was 0 => game-over => play silently rejected. M2 missed it
  (only asserted leader life unchanged: 0==0).
- Runtime cast: re-attach IClassBattleCardView on the generated
  NullClassBattleCardView stub (members already present; base-clause recovery
  stripped the decl). Compiled fine -> M1 loop never surfaced it.
- M1 mis-cut: copy NullVfxWithLoading verbatim (its GetInstance() lazy singleton
  was stubbed to default!/null). Same pattern as M2 NullCardVfxCreator.
- Card events: CreateHeadlessHandCard now calls SetupCardEvent so a spell's
  OnPlay->RemoveSpellCardFromHand / OnFinishWhenPlaySkill->AddSpellCardToCemetery
  fire (the bare CreateCardWithoutResources seam skips them).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 02:19:54 -04:00

37 lines
690 B
C#

using System.Collections.Generic;
namespace Wizard.Battle.View.Vfx;
public class NullVfxWithLoading : VfxWithLoading
{
private static NullVfxWithLoading _instance;
public override VfxBase LoadingVfx => NullVfx.GetInstance();
public override VfxBase MainVfx => NullVfx.GetInstance();
public override bool IsEnd => true;
public static NullVfxWithLoading GetInstance()
{
if (_instance == null)
{
_instance = new NullVfxWithLoading();
}
return _instance;
}
public override void Play()
{
}
public override void Update(float dt, List<IEffectVfx> effectVfxList)
{
}
public override bool IsVfxNonEmpty()
{
return false;
}
}