base-clause recovery strips interfaces (to dodge CS0535), but copied code converts
the stubs to those interfaces -> ~120 CS0266/CS1503. Two mechanisms:
- _IfaceImpl.g.cs: explicit no-op impls of the FULL (copied) interfaces, layered
onto each hierarchy base (BattleCardView/CardVfxCreatorBase/BattlePlayerView/
BattleEnemyView/ClassInfomationUIBase + NullCardVfxCreator). Explicit form never
collides with existing members; leaves inherit. Walks base-interface chains
(IPlayerView : IBattlePlayerView) and emits events.
- _InterfaceReattach.g.cs: plain ': IFoo' for the empty stub interfaces
(IProcessing, IReplayRecordManager).
- ClassBattleCardViewBase/NullBattleCardView: restore dropped BattleCardView base
so they inherit its IBattleCardView impl.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- VfxWith<T> ctor params were swapped ((T,VfxBase) vs decomp (VfxBase,T)) -> ~38
CS1503 across SkillCollectionBase/BattleCardBase skill-processing (ProcessInfo
<-> VfxBase). These are on the resolution path. Fixed to match decomp.
- UnityEngine primitives: implicit Vector3/Vector2<->Vector4 + Color->Color32
conversions; Transform.Translate/Rotate(Vector3,Space) overloads (iTween).
- ITouchProcessor was dropped from touch-processor stubs by base-clause recovery;
re-attach via Shim/View/TouchProcessorIfaces.cs (interface-only for generated
full-surface stubs, interface+no-op members for the empty hand stubs).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Regenerate 31 VFX/View/UI/Touch stubs to keep their decomp ': base(...)' /
': this(...)' ctor initializers (m1_stub_gen was dropping them -> CS7036/CS1729
when the copied base has no parameterless ctor). Whole base-ctor cluster cleared.
- UnityEngine.Event: add rawType/keyCode/modifiers/Use() + EventType enum (NGUI
UIInput/UIInputOnGUI legacy IMGUI path).
- Reward: copy the real Wizard.Scripts.Network.Data.TaskData.Arena.Reward verbatim
(was an empty ambiguous-name shim in LooseEnds); deps (UserGoods/JsonData) present.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
BestHTTP.SocketIO: Socket.On/Off/Emit + SocketIOCallback delegate, SocketManager ctors/
State/Socket/indexer/Open/Close/SettingRealtimeNetworkAgent, SocketOptions. Spine: Skeleton
(Data/Skin/Scale/FindBone/SetSkin/Update), Bone (WorldX/Y/RotationX), SkeletonMecanim
(MonoBehaviour + skeleton). All minimal hand shims (no full-surface -> no SDK closure pull);
node-socket path is Phase-2, off the battle path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make the minimal hand shims partial + generate full member surface for the manager/
task/controller god-objects (LoadingViewManager/DeckUpdateTask/MyPageTask/ReplayController/
PlayerControllerForWatching/WatchDataHandler/EvolutionTouchProcessor/StoryChapterSelection
Utility/NonDialogPopup). NonDialogPopup given MonoBehaviour base + hand Close() removed
(superseded by full surface). LoadTask dup deleted (already copied verbatim). RoomMatch
watch/replay closure types stubbed. Copied 8 more closure files.
CS0246-in-generated-signature masking note: 4 such errors were hiding ~1582 — generated
CS0246 masks as hard as header CS0246; the real frontier is 1586 (CS7036 base-ctor +
member-level), 0 structural.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The hand-shim VFX containers only had no-arg Create(); the engine calls them with
collection/params/loading-main args (510 CS1501). Add the real decomp Create overloads
to SequentialVfxPlayer/ParallelVfxPlayer/VfxWithLoading/VfxWithLoadingSequential.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The stub generator emits net-new types as base-LESS partials, so generated Vfx/View
types weren't actually VfxBase/etc. -> hundreds of CS1503/CS0029 'cannot convert to
VfxBase' at every polymorphic call site. m1_baseclauses.py recovers each generated
type's decomp base CLASS (interfaces dropped to avoid CS0535) into _BaseClauses.g.cs,
cross-namespace bases fully qualified. Generated the intermediate Vfx/processing base
types (SpreadOutVfx/OpenCardVfx/ProcessingBase/DamageVfxBase/ForecastIconVfxBase/...).
DefaultOpeningVfx regenerated WITH override (its base OpeningVfx is copied+abstract).
Clearing the polymorphism cascade + the masking base-type CS0246s unmasked the true
member-level frontier: 2202 (CS1501/CS1061/CS1503), 0 structural errors.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extend the UnityEngine value/component shims with no-op members surfaced by the compile
loop (UnityWebRequest/Font/Mesh/LODGroup/AudioSource/Rigidbody/Camera/Sprite/Animation/
Transform/Material/Texture2D/Light/Input/Resources + CharacterInfo/Vector4), via partial
declarations + UnityShimExt.cs. Add the missing UnityEngine static classes (PlayerPrefs/
Physics/GUI/SystemInfo/Graphics/QualitySettings/StackTraceUtility) + enums (TextureFormat/
ColorSpace/EventModifiers/RenderTextureReadWrite) + Experimental.Rendering.GraphicsFormat*
in UnityStatics.cs. All cosmetic, off the battle path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Hand-model the CRI ADX2 (audio) + CRI Mana (movie) SDK surface exercised by the copied
audio/movie engine files (AudioManager/Voice/Se/Effect/MoviePlayer). No decomp source
exists; signatures mirror the real CRI API as called at the sites (arg counts/types from
the call sites). All no-op, cosmetic, off the battle path. Reconciled with the empty CRI
stubs already in SdkStubs (CriAtomExAcb/CriAtomExPlayback/CriManaMovieMaterial).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generate no-op shells for the entire stop-listed View/Vfx/UI/Touch/Story missing-
type closure (~180 types) + 5 copyable engine files. Net-new shells emitted base-less,
so override members are stripped via the new --no-override generator flag. SDK/BCL
over-reach (Adjust/GZipStream/Socket*) and non-battle Story-world clusters reduced to
minimal/empty stubs instead of full-surface. Nested-type closure (BuildInfo/BattleDialog/
ROOM_URI/FuncGetCantAttackText) placed top-level in their decomp namespaces.
Clearing the last View CS0115 unmasked the true member-level frontier: 3916 errors,
0 generated/structural errors, now dominated by Unity-type + god-object members.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add no-op members + supporting types (FilterMode/TextureWrapMode/WrapMode/Keyframe/
AnimatorStateInfo/AnimatorClipInfo) to the UnityEngine shim. Standard Unity API surface,
inferred from frontier member names — Unity types aren't in the decomp so they're
hand-extended, not generated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generate the COMPLETE decomp member surface (not frontier-subset, which silently drops
already-provided members) for UIManager(+ViewScene/ChangeViewSceneParam), GameObjMgr,
BattleLogManager/Item, InPlayCardFrameEffectControl. UIManager/Footer base fixes:
UIManager is MonoBehaviour (singleton kept by hand via --exclude); Footer is the copied
Engine type (removed the conflicting global shim). Add HUDMode enum, Wizard manager
return-type stubs, and a closure-stubs file for 7 referenced empties.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Stub-generate BattleLogManager(45)/BattleLogItem(17)/InPlayCardFrameEffectControl(4)
member surfaces from decomp signatures; declare BattleLogWindow+nested enum; make
BattleLogItem a MonoBehaviour so inherited gameObject/transform resolve.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Clears the last type+header frontier (RoomInviteFriendColum override). Per F3 this
unmasks the remaining View/UI/god-object member bodies (~8k) -- the next grind is
pure member-surface growth, closure (~3242 files) now essentially complete.
Clears the last CS0246/CS0234 type frontier; per F3 this unmasks the AI-subsystem
member bodies (~9k member-level errors) -- next grind is extension copies + god-object
member growth.
Copied the 89 uncopied AI*SimulationUtility/extension files defining the
AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed
the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
Grows Vector2/3, Mathf, Color, Quaternion, GameObject, Transform, Camera, Material,
ParticleSystem, Rect, Bounds, Time to the surface the engine references; adds Input/
Random/Resources statics + full KeyCode enum. Copies the verbatim extension files that
collapse thousands of CS1061s at once (ContentKeywordExt, JsonData/LitJson extensions,
EventExtension.Call, GameObjectExtension(s)). 26.5k -> 15.9k errors; residual now
dominated by god-object member surface (GameMgr/UIManager/EffectMgr/Vfx*).
Resolves the 268-error header frontier: settings Item base, ErrorDialog.Data,
RoomConnectController nested types, Unity asset/light/collider types, CriWare/
CodeStage/Spine SDK surface, and copies INetworkLogger + SingletonMonoBehaviour
verbatim. Per F3 this unmasks the type bodies (~26.5k member-level errors now
visible) -- the real M1 bulk, attacked in following waves.
The node hardcoded knownList.spellboost=0 on every played card. Prod sends
the true accumulated count, which the client reads straight into the card's
cost model; with 0 the opponent computes the card at full price and silently
rejects the play in OperateReceiveChecker.IsPlayCard (PP-over -> ConductError
-> NullOperationCollection -> no render/echo), desyncing the board.
Mine spellboost-count changes from the sender''s orderList alter ops
(MineAlterSpellboosts: a/s/h ops), accumulate per-side idx->count in
BattleSessionState (RecordSpellboostFrom), and surface the current count on
the played card via BuildPlayedCard. Recorded from the authoritative
PlayActions only (never the Echo) and folded in AFTER the played card is
built, since a card''s cost is fixed as it leaves hand and a play that grants
spellboost targets the rest of the hand.
Also adds a [sio-in-body] full-body inbound log to RealParticipant to capture
both clients'' re-simulated responses for PvP RNG verification.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Behavior-identical; 231 BattleNode tests green with ZERO test changes.
The 10 handler arms no longer switch on BattleType:
- 4 Bot arms gate on the new FrameDispatchContext.OpponentIsAckOnly
(Other is not IHasHandshakePhase) — the participant property the audit asked for.
- 6 relay arms drop the Type == Pvp guard; it was redundant with BothSidesAfterReady()
(only a two-real-player session has both handshake phases). Its doc now records that.
- FrameDispatchContext.Type removed (+ the Type = Type in BuildContext). BattleSession.Type
stays for the session-level drop cascade.
Zero test churn because the stubs already encode the split: FakeRealParticipant/ProbeParticipant
implement IHasHandshakePhase, the bot stub FakeParticipant doesn't, and NewBotSession uses it as
the opponent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment-only; behavior-preserving; 231 BattleNode tests green.
- OutboundSequencer._archive: name the unbounded-per-match growth + ack-prune point.
- NodeCrypto.BuildAes: SECURITY remarks on key-derived IV reuse + base64 entropy loss;
warn against caching the session key.
- MatchContext/BattlePlayer: FOOTGUN notes on reference-based record equality over the deck list.
- RecordTokensFrom: TRUST note on isSelf/idx overwrite; name the idx>deckCount guard for
untrusted peers (not added — trusted-LAN today).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Behavior-preserving; full solution builds, 1013 tests green.
ClassId is the one genuinely-closed set of the three flagged stringly fields, so it
becomes a CardClass enum (1..8). Wire stays "1".."8": producer casts
(CardClass)run.ClassId, ServerBattleFrames renders via CardClassWire.ToWireValue().
RankBattleController's AI-start path drops a fragile int.TryParse(...)?:-1 for (int)cast.
CharaId (free-form leader/skin id, e.g. "5000123") and CountryCode (open-ended account
data) stay string with proper XML docs; CountryCodes.Korea/Japan name the captured values.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Behavior-preserving; 231 BattleNode tests green.
FrameDispatchContext.BothAfterReady() -> BothSidesAfterReady() (7 call sites). The
4 inline `SenderPhase == AfterReady` checks in TurnEndHandler/TurnEndFinalHandler now
read a new SenderIsAfterReady property. Both carry cross-referencing docs so the
Bot-arm (sender-only) vs PvP-arm (both-sides) distinction is explicit at the type.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Behavior-preserving; 271 BattleNode/Matching/Services tests green, full solution builds.
"BattleType" meant two things: the Sessions.BattleType enum (Pvp/Bot) and an int
"mode id" field. Renamed the int field on MatchContext AND the BattleStartBody wire
DTO to BattleModeId (wire key stays "battleType" via JsonPropertyName), so BattleType
now means only the enum project-wide.
New Bridge/BattleModes.cs (TakeTwo = 11) replaces every 11 literal — both prod
MatchContextBuilder sites and the test fixtures/assertions. The arbitrary-passthrough
42 and bot 0 stay literal.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Behavior-preserving; 231 BattleNode tests green.
The envelope key set was encoded three times (ReservedEnvelopeKeys, the ToJson
writes, the FromJson reads). Added a private nested MsgEnvelope.Keys with a const
per key; the reserved set, writes, and reads now all draw from it, so a key added
in one place but not another (letting a body key shadow an envelope field) can no
longer happen.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Behavior-preserving; 231 BattleNode tests green (capture-conformance suite drives
real prod frames, so a wrong constant would fail).
New Sessions/Dispatch/WireKeys.cs holds the 28 inbound-body read keys (orderList /
keyAction / targetList / uList field names). KnownListBuilder, PlayActionsHandler,
EchoHandler, and BattleFrames.ExtractIdxList now read through it instead of repeated
inline strings, so a parse-side typo ("isSelf" vs "IsSelf") can no longer silently
degrade token resolution. Outbound [JsonPropertyName] attributes left as-is (already
single-source per DTO).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Behavior-preserving; 231 BattleNode tests green.
One enum conflated two axes. Split:
- HandshakePhase (per participant): AwaitingInitNetwork..AfterReady. On
IHasHandshakePhase.Phase, FrameDispatchContext.SenderPhase, the handler gates.
- SessionLifecycle (per battle): Active | Terminal. On the renamed
BattleSessionState.Lifecycle (was SessionPhase, defaulting to a handshake value)
and BattleSession.Lifecycle (was Phase). Reads are only != Terminal, so the
Active default is behavior-identical.
OpponentTurn was dead (never assigned) -> dropped. BattleSessionPhase deleted; the
two axes can no longer be cross-assigned.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Behavior-preserving; 231 BattleNode tests green.
- MinedToken record struct replaces the transpose-prone (int Idx, long CardId,
CardOwner IsSelf) tuple returned by KnownListBuilder.Mine*. Positional deconstruct
keeps the Record*From call sites unchanged.
- enum Stock { Normal, Bypass } replaces the negative `bool noStock` on
IBattleParticipant.PushAsync and DispatchRoute, threaded through both participants,
BattleSession, and all handler construction sites.
- enum KeyActionType mirrors the client's SendKeyActionDataManager.KeyActionType;
the StripKeyActionForOpponent guard compares named values, KeyActionEntry.Type is
the enum (wire-identical via JsonNumberEnumConverter).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MineAddOps/MineChoicePicks/MineCopyTokens return types and all
extraction casts changed from int to CardOwner. The 4 routing
comparisons in BattleSessionState now read isSelf == CardOwner.Self
instead of isSelf == 1.
No wire or behavioral change — CardOwner was already in use on the
wire-facing side (OppoTargetEntry, UnapprovedCardEntry); this extends
it to the internal mining path so the bare-int transpose risk is gone.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RegisterPending → TryRegisterPending (TryAdd instead of indexer) so
battle-id collisions return false instead of silently evicting a live
battle. MatchingBridge retries with fresh IDs on collision (max 5).
Before registering, EvictStaleForViewer removes any stale pending
battle the viewer left behind, enforcing the one-pending-per-viewer
invariant that was previously comment-asserted.
Store tests switched to per-test local stores to fix a race under
the assembly-wide ParallelScope.All.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
#5: BattleSession.RunAsync now unsubscribes FrameEmitted handlers
(-= OnFrameFromA/B) before termination and calls DisposeAsync on
both participants + the dispatch gate SemaphoreSlim afterward. This
unpins the session state from live delegates and releases the WS.
#6: Bare catch {} blocks replaced with filtered exception handlers
that silently swallow OperationCanceledException and WebSocketException
(expected at battle end) but log anything else at Warning. NREs and
other real bugs in handler threads are now visible instead of silently
eaten.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
#3: SocketIoFrame.Parse now range-checks the packet type char (was
unchecked cast — any char outside 0-6 produced an undefined enum
value) and uses int.TryParse for ack-id (was int.Parse — a >10-digit
ack-id threw OverflowException, tearing down the WS mid-game). Both
now throw ArgumentException consistently. The read loop in
RealParticipant wraps both EIO and SIO parse calls with try-catch so
a malformed frame is logged and skipped instead of killing the battle.
#4: MatchedSelfInfo/MatchedOppoInfo OppoId and Seed narrowed from
long to int. The client reads both with Convert.ToInt32 inside a
swallowing try/catch — any value > int.MaxValue silently dropped the
Matched event, preventing the battle from starting. Seed was already
int-range (BattleSeeds.Stable returns int); OppoId (viewer ID) is
~847M in captures, well under int.MaxValue. The narrowing cast now
happens explicitly in ServerBattleFrames.BuildMatched at the wire
boundary.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>