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.
This commit is contained in:
120
SVSim.BattleEngine/Engine/NetworkWatchBattleSetupCardEvent.cs
Normal file
120
SVSim.BattleEngine/Engine/NetworkWatchBattleSetupCardEvent.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using System.Linq;
|
||||
|
||||
public class NetworkWatchBattleSetupCardEvent : NetworkBattleSetupCardEvent
|
||||
{
|
||||
public NetworkWatchBattleSetupCardEvent(BattleManagerBase manager, RegisterActionManager registerCardList, NetworkBattleData data)
|
||||
: base(manager, registerCardList, data)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void SkillEventSetting(BattleCardBase card, SkillBase skill)
|
||||
{
|
||||
if (skill is Skill_none && !skill.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessBurialRite))
|
||||
{
|
||||
return;
|
||||
}
|
||||
NetworkExecutionInfoCreator networkExecutionInfoCreator = skill._executionInfoCreator as NetworkExecutionInfoCreator;
|
||||
bool flag = RegisterValidate.IsValidateCard(skill);
|
||||
NetworkBattleReceiver.ReceiveData receiveData = base.networkBattleData.GetReceiveData();
|
||||
if (!GameMgr.GetIns().IsAdmin)
|
||||
{
|
||||
SettingConditionValidateCard(skill, card, networkExecutionInfoCreator);
|
||||
}
|
||||
if (!IsSettingUnapprovedCard(skill) || IsNotSettingUnapproved(skill))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (RegisterFilter.IsFilterCard(skill))
|
||||
{
|
||||
if (!card.IsPlayer && RegisterFilter.IsHandAllSelect(skill) && !GameMgr.GetIns().IsAdmin)
|
||||
{
|
||||
networkExecutionInfoCreator.SetHandAllSelect();
|
||||
}
|
||||
else if (RegisterFilter.IsDeckAllSelect(skill))
|
||||
{
|
||||
networkExecutionInfoCreator.SetUseUListOnlySelfTurn();
|
||||
if (!card.IsPlayer && !GameMgr.GetIns().IsAdmin)
|
||||
{
|
||||
networkExecutionInfoCreator.SetDeckAllSelect();
|
||||
}
|
||||
}
|
||||
if (RegisterFilter.IsFilterCardUnapproved(skill))
|
||||
{
|
||||
networkExecutionInfoCreator.SetUnapproved();
|
||||
if (RegisterFilter.IsSkillUpdateDeckCard(skill))
|
||||
{
|
||||
networkExecutionInfoCreator.SetUseUListOnlySelfTurn();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
if ((!GameMgr.GetIns().IsAdmin || (GameMgr.GetIns().IsAdminWatch && skill.ApplyingTargetFilter is SkillTargetDeckSelfFilter)) && flag && !(skill.ApplyingTargetFilter is SkillTargetDiscardThisTurnCardListFilter))
|
||||
{
|
||||
if (!NetworkBattleGenericTool.IsBurialRite(skill))
|
||||
{
|
||||
if (!RegisterValidate.IsOpenMyHandSkill(skill) && !RegisterValidate.IsSendOpenMyCardsSkill(skill))
|
||||
{
|
||||
networkExecutionInfoCreator.SetUnapproved();
|
||||
}
|
||||
}
|
||||
else if (!card.IsPlayer)
|
||||
{
|
||||
networkExecutionInfoCreator.SetNotCheckBuriaRiteCondition(value: true);
|
||||
}
|
||||
}
|
||||
if (!GameMgr.GetIns().IsAdmin && !card.IsPlayer && receiveData != null)
|
||||
{
|
||||
_networkBattleSetupValidateEvent.OpponentPlayerIncludedValidateSkillToNotPlay(skill);
|
||||
}
|
||||
SettingUnapprovedRegisterLotEvent(skill, networkExecutionInfoCreator);
|
||||
bool flag2 = (GameMgr.GetIns().IsAdmin || card.IsPlayer) && RegisterSkillConditionCheck.IsGameAddDeckCardsNumInvestigationSkill(skill);
|
||||
SettingReplaceSkillOption(skill, card, networkExecutionInfoCreator, !RegisterSkillConditionCheck.DoesSkillUsePrivateCount(skill, notHandCheck: true) && !flag2);
|
||||
if (!card.IsPlayer && !GameMgr.GetIns().IsAdmin)
|
||||
{
|
||||
SettingBurialRiteSkillPlayOrNotPlay(skill, networkExecutionInfoCreator);
|
||||
CheckApplySelectFilter(skill, networkExecutionInfoCreator);
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool IsSendUnapprovedList(SkillBase skill)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override bool IsCheckValidateCard()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override bool IsCheckSkillConditionCard(BattleCardBase card)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool CheckSkillCondition(SkillBase skill)
|
||||
{
|
||||
if (skill.SkillPrm.ownerCard.IsPlayer)
|
||||
{
|
||||
return RegisterSkillConditionCheck.IsSkillConditionCheck(skill, isNotHandCheck: true);
|
||||
}
|
||||
if (!RegisterSkillConditionCheck.IsSkillConditionCheck(skill, GameMgr.GetIns().IsAdmin))
|
||||
{
|
||||
if (!GameMgr.GetIns().IsAdmin)
|
||||
{
|
||||
return RegisterSkillConditionCheck.IsSelectedCardSkillConditionCheck(skill);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool IsSettingUnapprovedCard(SkillBase skill)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool IsSetNotCheckSelectSkillCard()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user