engine cleanup passes 4-7 + multi-instancing ambient rip
Squashes 146 commits from battle-engine-extraction. Net: 2,045 files changed, +11,896 / -158,687 lines. Ships engine passes 4-7 (dead-code cull, view-layer stub, receive-path shrink) plus the Phase-5 AsyncLocal ambient deletion that turns concurrent battles into a type-system property rather than a scope contract. ## What landed **Passes 4-7 (chunks 1-34):** Extended the Phase-4 const-false collapse into a cascading cull across the skill graph, view layer, and receive-path periphery. Six mode flags (IsWatchBattle/IsReplayBattle/IsAdmin/IsAdminWatch/IsPuzzleQuest/ IsAINetwork) became `const false`, every guarded block deleted. Field*.cs subclass ctors + BackGroundBase + ObjectChecker culled to no-ops. Mulligan family reworked to take a mgr param through IMulliganMgr.InitMulligan. Emotion/Recovery/Resource clusters null-stubbed. Prediction/OperationSimulator/ skill filters converted from static ambient reads to per-mgr reads via SkillPrm.ownerCard.SelfBattlePlayer.BattleMgr / ins.BattleMgr / this.BattleMgr. **Phase-5 ambient rip (chunks 35-47):** Deleted BattleAmbient / BattleAmbient- Context / TestBattleScope in full. Every per-battle mutable slot now lives on the mgr instance itself: mgr.InstanceIsForecast / InstanceIsRandomDraw / InstanceRecoveryInfo / InstanceViewerId / InstanceNetworkAgent / GameMgr BattleManagerBase.GetIns() returns null unconditionally; the residual static flags + 3 façades (Certification.ViewerId, Data.BattleRecoveryInfo, ToolboxGame.RealTimeNetworkAgent) are null-tolerant defaults kept for the handful of engine-internal readers that still reference their types. Zero BattleAmbient references anywhere in engine + node + tests. Added pre-seeded GameMgr ctor overload threaded through the mgr chain (BattleManagerBase → SingleBattleMgr / NetworkBattleManagerBase → NetworkStandard- BattleMgr → HeadlessBattleMgr / HeadlessNetworkBattleMgr). Fixtures build a GameMgr, seed it via HeadlessEngineEnv.SeedCharaIds/SeedNetUser, and pass it to the mgr's ctor — no ambient reach. Node side (SVSim.BattleNode/SessionBattleEngine): _ctx replaced with a plain GameMgr field; 34 `using var _ambient = BattleAmbient.Enter(_ctx)` scope wraps ripped from every accessor and mutator; EngineGlobalInit.WirePerSessionGameMgr takes GameMgr as a param and runs from SessionBattleEngine.SetupInternal BEFORE mgr construction. Test side: TestBattleScope deleted; 18 fixture [SetUp]s migrated to `HeadlessEngineEnv.EnsureProcessGlobals()`; MultiInstanceEngineTests rewritten around per-mgr construction (GetIns() → null is the pinned invariant). ## Regression fixes - **chunk-48** (MulliganCtrl): chunk-35's `= null` stubs on card lookups broke the live receive-driven Deal path (BattlePlayerBase.DrawCard NRE'd downstream of NetworkPlayerMulliganCtrl.StartMulliganVfx). Restored the three lookups via `_battlePlayer.BattleMgr.GetBattleCardIdx`. Engine tests were satisfied by the WireMulliganPhase seam; unit tests exposed the live-path gap. ## Ship state - SVSim.BattleEngine.Tests: 56/56 pass, 2 skip - SVSim.UnitTests: 1554/1554 pass (was 1523/31-fail before chunk 48) - Solution build: 0 source warnings (40 pre-existing NU1902 MessagePack CVEs in SVSim.EmulatedEntrypoint, unrelated) - Sequential PVP smoke: verified live (two back-to-back battles, no regression on cleanup/spinup) - Concurrent PVP smoke: verified live Adds tools/engine-port/ClosureAnalyzer/ — the Roslyn transitive-type-closure analyzer needed to make future cascade cleanup safe (per feedback memory "Engine cleanup needs closure tool" from the 2026-06-28 pass-3 failure). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -10,12 +10,6 @@ public class AIActivateCountTagArgument : AIScriptArgumentExpressions
|
||||
AIScriptTokenArgType.NONE
|
||||
};
|
||||
|
||||
protected const int RESET_SIDE_TYPE_OFFSET = 3;
|
||||
|
||||
protected const int SKILL_OWNER_ID_OFFSET = 2;
|
||||
|
||||
protected const int SKILL_INDEX_OFFSET = 1;
|
||||
|
||||
public AIScriptTokenArgType ResetSideType { get; protected set; }
|
||||
|
||||
public int SkillOwnerId { get; protected set; }
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIAfterAttackBanish : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int SELECT_TYPE_ARG_INDEX = 1;
|
||||
|
||||
public AIScriptTokenArgType SelectType { get; private set; }
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIAfterAttackDraw : AIFiltersArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _drawCountArg;
|
||||
|
||||
private const int DRAW_COUNT_ARG_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
public AIAfterAttackDraw(string text)
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIAfterAttackEvo : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int SELECT_TYPE_ARG_INDEX = 1;
|
||||
|
||||
public AIScriptTokenArgType SelectType { get; private set; }
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIAfterAttackHeal : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int HEAL_AMOUNT_ARG_INDEX = 1;
|
||||
|
||||
public AIPolishConvertedExpression HealAmount { get; private set; }
|
||||
|
||||
|
||||
@@ -14,80 +14,6 @@ public static class AIAttachEventToBattleModuleUtility
|
||||
SetupOperateMgrEvent(operateMgr, ai);
|
||||
}
|
||||
|
||||
public static void DepriveAttachedAIBattleModule(BattlePlayerBase ally, BattlePlayerBase opponent, OperateMgr operateMgr, EnemyAI ai)
|
||||
{
|
||||
DepriveAttachedPlayerBattleEvent(ally, opponent, ai.PlayerBattleEvent);
|
||||
DepriveAttachedOperateMgrBattleEvent(operateMgr, ai.OprMgrBattleEvent);
|
||||
}
|
||||
|
||||
private static void DepriveAttachedPlayerBattleEvent(BattlePlayerBase ally, BattlePlayerBase opponent, AIAttachPlayerBattleEventCache playerBattleEvent)
|
||||
{
|
||||
if (playerBattleEvent.AllyAddCemeteryEvent != null)
|
||||
{
|
||||
ally.OnAddCemeteryEvent -= playerBattleEvent.AllyAddCemeteryEvent;
|
||||
playerBattleEvent.AllyAddCemeteryEvent = null;
|
||||
}
|
||||
if (playerBattleEvent.OpponentAddCemeteryEvent != null)
|
||||
{
|
||||
opponent.OnAddCemeteryEvent -= playerBattleEvent.OpponentAddCemeteryEvent;
|
||||
playerBattleEvent.OpponentAddCemeteryEvent = null;
|
||||
}
|
||||
if (playerBattleEvent.AllyTurnStartCompleteEvent != null)
|
||||
{
|
||||
ally.OnTurnStartComplete = (Action)Delegate.Remove(ally.OnTurnStartComplete, playerBattleEvent.AllyTurnStartCompleteEvent);
|
||||
playerBattleEvent.AllyTurnStartCompleteEvent = null;
|
||||
}
|
||||
if (playerBattleEvent.OpponentTurnStartCompleteEvent != null)
|
||||
{
|
||||
opponent.OnTurnStartComplete = (Action)Delegate.Remove(opponent.OnTurnStartComplete, playerBattleEvent.OpponentTurnStartCompleteEvent);
|
||||
playerBattleEvent.OpponentTurnStartCompleteEvent = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void DepriveAttachedOperateMgrBattleEvent(OperateMgr oprMgr, AIAttachOperateMgrBattleEventCache oprMgrBattleEvent)
|
||||
{
|
||||
if (oprMgrBattleEvent.OnSetCardSuccessEvent != null)
|
||||
{
|
||||
oprMgr.OnSetCardSuccess -= oprMgrBattleEvent.OnSetCardSuccessEvent;
|
||||
oprMgrBattleEvent.OnSetCardSuccessEvent = null;
|
||||
}
|
||||
if (oprMgrBattleEvent.OnSetCardExecutedEvent != null)
|
||||
{
|
||||
oprMgr.OnSetCardExecuted -= oprMgrBattleEvent.OnSetCardExecutedEvent;
|
||||
oprMgrBattleEvent.OnSetCardExecutedEvent = null;
|
||||
}
|
||||
if (oprMgrBattleEvent.OnEvolveSuccessEvent != null)
|
||||
{
|
||||
oprMgr.OnEvolveSuccess -= oprMgrBattleEvent.OnEvolveSuccessEvent;
|
||||
oprMgrBattleEvent.OnEvolveSuccessEvent = null;
|
||||
}
|
||||
if (oprMgrBattleEvent.OnEvolveCompleteEvent != null)
|
||||
{
|
||||
oprMgr.OnEvoleComplete -= oprMgrBattleEvent.OnEvolveCompleteEvent;
|
||||
oprMgrBattleEvent.OnEvolveCompleteEvent = null;
|
||||
}
|
||||
if (oprMgrBattleEvent.OnBeforeAttackEvent != null)
|
||||
{
|
||||
oprMgr.OnBeforeAttack -= oprMgrBattleEvent.OnBeforeAttackEvent;
|
||||
oprMgrBattleEvent.OnBeforeAttackEvent = null;
|
||||
}
|
||||
if (oprMgrBattleEvent.OnAttackExecutedEvent != null)
|
||||
{
|
||||
oprMgr.OnAttackExecuted -= oprMgrBattleEvent.OnAttackExecutedEvent;
|
||||
oprMgrBattleEvent.OnAttackExecutedEvent = null;
|
||||
}
|
||||
if (oprMgrBattleEvent.OnBeforeFusionEvent != null)
|
||||
{
|
||||
oprMgr.OnBeforeFusion -= oprMgrBattleEvent.OnBeforeFusionEvent;
|
||||
oprMgrBattleEvent.OnBeforeFusionEvent = null;
|
||||
}
|
||||
if (oprMgrBattleEvent.OnAfterFusionEvent != null)
|
||||
{
|
||||
oprMgr.OnAfterFusion -= oprMgrBattleEvent.OnAfterFusionEvent;
|
||||
oprMgrBattleEvent.OnAfterFusionEvent = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetupOnAddCemeteryEvent(BattlePlayerBase ally, BattlePlayerBase opponent, EnemyAI ai)
|
||||
{
|
||||
ai.PlayerBattleEvent.AllyAddCemeteryEvent = delegate(BattleCardBase card, BattlePlayerBase.CEMETERY_TYPE cemeteryType, bool isOpen, SkillBase skill)
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AIAttackAddDeck : AIWhenAttackOrWhenFightTagArgument
|
||||
|
||||
private AIPolishConvertedExpression _id;
|
||||
|
||||
private const int COUNT_ARG_INDEX = 1;
|
||||
|
||||
private const int ID_ARG_INDEX = 0;
|
||||
|
||||
public AIAttackAddDeck(string text)
|
||||
: base(text)
|
||||
{
|
||||
|
||||
@@ -6,10 +6,6 @@ public class AIAttackAttachTag : AIWhenAttackOrWhenFightTagArgument
|
||||
{
|
||||
private AIScriptTokenArgType _removeTiming;
|
||||
|
||||
private const int REMOVE_TIMING_OFFSET = 1;
|
||||
|
||||
private const int TAG_WORD_START_INDEX = 1;
|
||||
|
||||
public AIPlayTag Tag { get; private set; }
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIAttackAttackableCount : AIWhenAttackOrWhenFightTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _attackableCountArg;
|
||||
|
||||
private const int ATTACKABLE_COUNT_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIAttackAttackableCount(string text)
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIAttackDiscard : AIWhenAttackOrWhenFightTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _discardCountArg;
|
||||
|
||||
private const int DISCARD_COUNT_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIAttackDiscard(string text)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
namespace Wizard;
|
||||
|
||||
internal class AIAttackMove : AIMove
|
||||
{
|
||||
public BattleCardBase Src { get; private set; }
|
||||
|
||||
public BattleCardBase Target { get; private set; }
|
||||
|
||||
public AIAttackMove(BattleCardBase src, BattleCardBase target)
|
||||
: base(AIOperationType.ATTACK)
|
||||
{
|
||||
Src = src;
|
||||
Target = target;
|
||||
}
|
||||
|
||||
public override void RunOperation(BattleManagerBase mgr, bool isPlayer)
|
||||
{
|
||||
mgr.VfxMgr.RegisterSequentialVfx(mgr.OperateMgr.Attack(Src, Target, isPlayer));
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,6 @@ public class AIAttackOrClashDamageClip : AIAttackOrClashBarrierBase
|
||||
{
|
||||
private AIPolishConvertedExpression _clipAmount;
|
||||
|
||||
private const int CLIP_AMOUNT_OFFSET = 1;
|
||||
|
||||
protected override int _defaultDamageTypeOffset => 3;
|
||||
|
||||
protected override int _stopTimingOffset => 2;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIAttackOrClashHeal : AIWhenAttackOrWhenFightTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _healValueArg;
|
||||
|
||||
private const int HEAL_VALUE_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIAttackOrClashHeal(string text)
|
||||
|
||||
@@ -4,9 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIAttackOrClashRemoveTag : AIWhenAttackOrWhenFightTagArgument, IAIRemoveTagArgument
|
||||
{
|
||||
private const int NEEDS_SPLITED_WORDS_LENGS = 3;
|
||||
|
||||
private const int REMOVE_TAG_START_SPLITED_INDEX = 0;
|
||||
|
||||
public AIPlayTag RemoveTag { get; private set; }
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIAttackOrClashSpellboost : AIWhenAttackOrWhenFightTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _spellboostValue;
|
||||
|
||||
private const int SPELLBOOST_VALUE_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIAttackOrClashSpellboost(string text)
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIAttackOrClashToken : AIWhenAttackOrWhenFightTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenCount;
|
||||
|
||||
private const int TOKEN_COUNT_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 0;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIAttackSubtractCountdown : AIWhenAttackOrWhenFightTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _countChange;
|
||||
|
||||
private const int COUNT_CHANGE_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIAttackSubtractCountdown(string text)
|
||||
|
||||
@@ -8,8 +8,6 @@ public class AIBanishAttachTag : AITargetSelectTagArgument
|
||||
|
||||
private readonly int REMOVE_TIMING_OFFSET = 1;
|
||||
|
||||
private const int TAG_WORD_START_INDEX = 1;
|
||||
|
||||
public AIPlayTag Tag { get; private set; }
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Wizard;
|
||||
|
||||
public static class AIBarrierGlobal
|
||||
{
|
||||
public const int CLIPPING_RANGE_MAX = 9999;
|
||||
}
|
||||
@@ -86,15 +86,6 @@ public abstract class AIBarrierInfoBase
|
||||
Hash = AIBarrierSimulationUtility.CalculateBarrierInfoBaseHash(DamageType, BarrierType, StopTimingList);
|
||||
}
|
||||
|
||||
public bool IsDuplicate(AIBarrierType barrierType, AIDamageType damageType, int barrierAmount)
|
||||
{
|
||||
if ((long)BarrierAmount * (long)AIBarrierSimulationUtility.BARRIER_AMOUNT_HASH_COEFFICIENT + (long)DamageType * (long)AIBarrierSimulationUtility.DAMAGE_TYPE_HASH_COEFFICIENT + (long)BarrierType * (long)AIBarrierSimulationUtility.BARRIER_TYPE_HASH_COEFFICIENT == (long)Hash)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract AIBarrierInfoBase Clone();
|
||||
|
||||
public abstract bool IsShield();
|
||||
|
||||
@@ -157,22 +157,6 @@ public class AIBarrierInfoCollection
|
||||
}
|
||||
}
|
||||
|
||||
private bool HasDuplicateBarrier(AIBarrierType barrierType, AIDamageType damageType, int barrierAmount)
|
||||
{
|
||||
if (BarrierList == null || BarrierList.Count <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < BarrierList.Count; i++)
|
||||
{
|
||||
if (BarrierList[i].IsDuplicate(barrierType, damageType, barrierAmount))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int CalcDamageAmount(AIVirtualCard owner, int damage, bool isSkillDamage, bool isSpellDamage)
|
||||
{
|
||||
if (BarrierList == null || BarrierList.Count <= 0)
|
||||
|
||||
@@ -4,11 +4,6 @@ namespace Wizard;
|
||||
|
||||
public static class AIBarrierSimulationUtility
|
||||
{
|
||||
public static AIScriptTokenArgType[] LegalBarrierType = new AIScriptTokenArgType[2]
|
||||
{
|
||||
AIScriptTokenArgType.DAMAGE_CUT,
|
||||
AIScriptTokenArgType.DAMAGE_CLIP
|
||||
};
|
||||
|
||||
public static AIScriptTokenArgType[] LegalDamageType = new AIScriptTokenArgType[4]
|
||||
{
|
||||
|
||||
@@ -8,9 +8,4 @@ public class AIBattleInfoReceivedData
|
||||
{
|
||||
AttachedInfoReceiveCollection = new AttachedSkillInfoReceiveDataCollection();
|
||||
}
|
||||
|
||||
public void ClearAll()
|
||||
{
|
||||
AttachedInfoReceiveCollection.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIBattleInfoReceiver
|
||||
{
|
||||
private const string NOT_FOUND_INSTANCE_LOG = "AIBattleInfoReceiver.GetInstance() error. battleMgr does not have battleInfoReceiver.";
|
||||
|
||||
private IEnemyAIBattleInfoRecieveDataAccessor _enemyAI;
|
||||
|
||||
@@ -28,22 +27,14 @@ public class AIBattleInfoReceiver
|
||||
|
||||
public static bool CheckCreatedValidEnemyAI()
|
||||
{
|
||||
return BattleManagerBase.GetIns().EnemyAI is IEnemyAIBattleInfoRecieveDataAccessor;
|
||||
// Pre-Phase-5b: no mgr in static scope; headless has no AI battle path
|
||||
return false;
|
||||
}
|
||||
|
||||
public static AIBattleInfoReceiver GetInstance()
|
||||
{
|
||||
AIBattleInfoReceiver result = null;
|
||||
BattleManagerBase ins = BattleManagerBase.GetIns();
|
||||
if (ins is SingleBattleMgr singleBattleMgr)
|
||||
{
|
||||
result = singleBattleMgr.BattleInfoReceiver;
|
||||
}
|
||||
else if (ins is AINetworkBattleManager aINetworkBattleManager)
|
||||
{
|
||||
result = aINetworkBattleManager.BattleInfoReceiver;
|
||||
}
|
||||
return result;
|
||||
// Pre-Phase-5b: no mgr in static scope; headless has no SingleBattleMgr AI info receiver
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void ShowNotFoundInstanceLog()
|
||||
|
||||
@@ -4,8 +4,6 @@ public class AIBattleStartData : HeaderData
|
||||
{
|
||||
public AIBattleStartDetail Data;
|
||||
|
||||
public int TurnState = -1;
|
||||
|
||||
public AIBattleStartData()
|
||||
{
|
||||
Data = new AIBattleStartDetail();
|
||||
|
||||
@@ -14,8 +14,6 @@ public class AIBattleStartDetail
|
||||
}
|
||||
}
|
||||
|
||||
public int AIid;
|
||||
|
||||
public UserInfo SelfInfo;
|
||||
|
||||
public UserInfo OppoInfo;
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
using LitJson;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class AIBattleStartTask : BaseTask
|
||||
{
|
||||
public AIBattleStartTask()
|
||||
{
|
||||
base.type = ((Data.CurrentFormat == Format.Rotation) ? ApiType.Type.AIRotationRankBattleStart : ApiType.Type.AIUnlimitedRankBattleStart);
|
||||
}
|
||||
|
||||
protected override int Parse()
|
||||
{
|
||||
int num = base.Parse();
|
||||
if (num != 1)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
JsonData jsonData = base.ResponseData["data"];
|
||||
Data.AIBattleStartData = new AIBattleStartData();
|
||||
Data.AIBattleStartData.Data.AIid = (jsonData.Keys.Contains("ai_id") ? jsonData["ai_id"].ToInt() : (-1));
|
||||
Data.AIBattleStartData.TurnState = (jsonData.Keys.Contains("turnState") ? jsonData["turnState"].ToInt() : (-1));
|
||||
SetAIBattleStartDetail(Data.AIBattleStartData.Data.SelfInfo, jsonData, "self_info");
|
||||
SetAIBattleStartDetail(Data.AIBattleStartData.Data.OppoInfo, jsonData, "oppo_info");
|
||||
return num;
|
||||
}
|
||||
|
||||
private void SetAIBattleStartDetail(AIBattleStartDetail.UserInfo info, JsonData data, string userKey)
|
||||
{
|
||||
JsonData jsonData = null;
|
||||
if (data.Keys.Contains(userKey))
|
||||
{
|
||||
jsonData = data[userKey];
|
||||
}
|
||||
if (jsonData != null)
|
||||
{
|
||||
info.DataDictionary.Add("country_code", jsonData.Keys.Contains("country_code") ? jsonData["country_code"] : ((JsonData)"NONE"));
|
||||
info.DataDictionary.Add("userName", jsonData.Keys.Contains("userName") ? jsonData["userName"] : ((JsonData)"NONE"));
|
||||
info.DataDictionary.Add("sleeveId", jsonData.Keys.Contains("sleeveId") ? jsonData["sleeveId"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("emblemId", jsonData.Keys.Contains("emblemId") ? jsonData["emblemId"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("degreeId", jsonData.Keys.Contains("degreeId") ? jsonData["degreeId"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("fieldId", jsonData.Keys.Contains("fieldId") ? jsonData["fieldId"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("isOfficial", jsonData.Keys.Contains("isOfficial") ? jsonData["isOfficial"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("oppoId", jsonData.Keys.Contains("oppoId") ? jsonData["oppoId"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("seed", jsonData.Keys.Contains("seed") ? jsonData["seed"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("rank", jsonData.Keys.Contains("rank") ? jsonData["rank"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("battlePoint", jsonData.Keys.Contains("battlePoint") ? jsonData["battlePoint"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("classId", jsonData.Keys.Contains("classId") ? jsonData["classId"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("charaId", jsonData.Keys.Contains("charaId") ? jsonData["charaId"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("isMasterRank", jsonData.Keys.Contains("isMasterRank") ? jsonData["isMasterRank"].ToInt() : (-1));
|
||||
info.DataDictionary.Add("masterPoint", jsonData.Keys.Contains("masterPoint") ? jsonData["masterPoint"].ToInt() : (-1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIBreakAttachTag : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int TIMING_OFFSET = 1;
|
||||
|
||||
public AIPlayTag AttachedTag { get; private set; }
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIBreakRecoverPp : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private AIPolishConvertedExpression _recoverPpValue;
|
||||
|
||||
private const int VALUE_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
public AIBreakRecoverPp(string text)
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AIBreakSetLeaderMaxLife : AIFiltersArgument
|
||||
|
||||
private AIPolishConvertedExpression _life;
|
||||
|
||||
private const int SIDE_OFFSET = 2;
|
||||
|
||||
private const int VALUE_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 2;
|
||||
|
||||
public AIBreakSetLeaderMaxLife(string text)
|
||||
|
||||
@@ -18,14 +18,6 @@ public class AIBuffBuff : AITriggerAndTargetFiltersTagBase
|
||||
|
||||
private AIScriptTokenArgType _permOrTemp;
|
||||
|
||||
private const int PERM_OR_TEMP_OFFSET = 1;
|
||||
|
||||
private const int LIFE_BUFF_OFFSET = 2;
|
||||
|
||||
private const int ATTACK_BUFF_OFFSET = 3;
|
||||
|
||||
private const int SELECT_TYPE_OFFSET = 4;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 4;
|
||||
|
||||
public AIBuffBuff(string text)
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIBuffDamage : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int DAMAGE_ARG_OFFSET = 1;
|
||||
|
||||
private AIPolishConvertedExpression _damageArg;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIBuffDraw : AIScriptArgumentExpressions
|
||||
{
|
||||
private const int COUNT_ARG_INDEX = 1;
|
||||
|
||||
public AIPolishConvertedExpression DrawCount { get; private set; }
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIBuffHeal : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int HEAL_AMOUNT_ARG_OFFSET = 1;
|
||||
|
||||
private AIPolishConvertedExpression _healArg;
|
||||
|
||||
|
||||
@@ -93,12 +93,6 @@ public class AIBuffRecorderCollection
|
||||
return (atkSum: num, lifeSum: num2);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
RecorderList.Clear();
|
||||
RecorderList = null;
|
||||
}
|
||||
|
||||
public void CreateRecorderListFromTurnBuffCountList(List<BuffCountInfo> turnBuffCountList)
|
||||
{
|
||||
if (turnBuffCountList != null && turnBuffCountList.Count > 0)
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIBuffRecoverPp : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int HEAL_ARG_OFFSET = 1;
|
||||
|
||||
private AIPolishConvertedExpression _healArg;
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AIBuffShield : AIFiltersAndSelectTypeArgument
|
||||
|
||||
private AIScriptTokenArgType _damageType;
|
||||
|
||||
private const int DEFAULT_DAMAGE_TYPE_OFFSET = 2;
|
||||
|
||||
private const int STOP_TIMING_OFFSET = 1;
|
||||
|
||||
private bool _isDamageTypeDefinedByMaster;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 1 + ((!_isDamageTypeDefinedByMaster) ? 1 : 2);
|
||||
|
||||
@@ -50,9 +50,4 @@ public class AICardDataAsset
|
||||
TagList.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSameCard(AICardDataAsset data)
|
||||
{
|
||||
return CardID == data.CardID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ public class AIChangeInplayAttachTag : AIWhenChangeInplayTagArgument
|
||||
|
||||
private readonly int REMOVE_TIMING_OFFSET = 1;
|
||||
|
||||
private const int TAG_WORD_START_INDEX = 1;
|
||||
|
||||
public AIPlayTag Tag { get; private set; }
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
@@ -8,8 +8,6 @@ public class AIChangeInplayImmediateDamageClip : AIChangeInplayImmediateBarrierB
|
||||
|
||||
private AIPolishConvertedExpression _clipRange;
|
||||
|
||||
private const int DEFAULT_CLIP_AMOUNT_OFFSET = 1;
|
||||
|
||||
private bool _isClipRangeDefinedByMaster;
|
||||
|
||||
protected override int _stopTimingOffset
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIChangeInplayImmediateDamageCut : AIChangeInplayImmediateBarrierBa
|
||||
{
|
||||
private AIPolishConvertedExpression _cutAmount;
|
||||
|
||||
private const int CUT_AMOUNT_OFFSET = 1;
|
||||
|
||||
protected override int _stopTimingOffset => 2;
|
||||
|
||||
protected override int _defaultDamageTypeOffset => 3;
|
||||
|
||||
@@ -14,10 +14,6 @@ public class AIChangeInplayImmediateDamageModifier : AIWhenChangeInplayTagArgume
|
||||
|
||||
private AIPolishConvertedExpression _modifyValue;
|
||||
|
||||
private const int MODIFY_OPTION_ARG_OFFSET = 2;
|
||||
|
||||
private const int MODIFY_VALUE_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => -1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 2;
|
||||
|
||||
@@ -8,8 +8,6 @@ public class AIChangeInplayImmediateKeywordSkill : AIWhenChangeInplayTagArgument
|
||||
|
||||
private readonly AIScriptTokenArgType _skillType;
|
||||
|
||||
private IEnumerable<AIVirtualCard> _giveCardList;
|
||||
|
||||
protected virtual int StopTimingOffset => 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
@@ -4,9 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIChangePpTotalBuff : AIWhenChangeInplayTagArgument
|
||||
{
|
||||
private const int LIFE_OFFSET = 1;
|
||||
|
||||
private const int ATTACK_OFFSET = 2;
|
||||
|
||||
public AIPolishConvertedExpression Attack { get; private set; }
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ public class AIChoiceTagArgument : AIScriptArgumentExpressions
|
||||
|
||||
protected AIPolishConvertedExpression _choiceCount;
|
||||
|
||||
private const int CHOICE_COUNT_OFFSET = 1;
|
||||
|
||||
private List<AIVirtualCard> _playerChoiceFakeCards;
|
||||
|
||||
private List<AIVirtualCard> _enemyChoiceFakeCards;
|
||||
@@ -72,11 +70,6 @@ public class AIChoiceTagArgument : AIScriptArgumentExpressions
|
||||
return (int)_choiceCount.EvalArg(owner, null, field, situation);
|
||||
}
|
||||
|
||||
public List<int> GetChoiceIdList()
|
||||
{
|
||||
return _choiceIds;
|
||||
}
|
||||
|
||||
protected override AITokenIdCollection CreateRegisterTokenPoolInfo(AIVirtualCard owner, List<int> idList)
|
||||
{
|
||||
return AISummonTokenUtility.CreateTokenIdCollectionFromIdList(owner, AIScriptTokenArgType.ALLY, idList, AITokenType.Choice);
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class AIClashHeal : AIFiltersAndSelectTypeArgument
|
||||
{
|
||||
private readonly int HEAL_ARG_OFFSET = 1;
|
||||
|
||||
private AIPolishConvertedExpression _healArg;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIClashHeal(string text)
|
||||
: base(text)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitExpressions(string text)
|
||||
{
|
||||
base.InitExpressions(text);
|
||||
_healArg = _exprList[_exprList.Count - HEAL_ARG_OFFSET];
|
||||
}
|
||||
|
||||
public override void Execute(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation = null)
|
||||
{
|
||||
List<AIVirtualCard> targetsFromField = GetTargetsFromField(tagOwner, field, playPtn, situation);
|
||||
if (targetsFromField != null && targetsFromField.Count > 0)
|
||||
{
|
||||
int heal = (int)_healArg.EvalArg(tagOwner, playPtn, field, situation);
|
||||
if (base.SelectType == AIScriptTokenArgType.ALL_SELECT)
|
||||
{
|
||||
AISkillSimulationUtility.HealAll(targetsFromField, field, heal, playPtn, situation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override List<AIVirtualCard> GetFilteredTargets(List<AIVirtualCard> candidates, AIVirtualCard tagOwner, List<int> playPtn, AISituationInfo situation, bool isBlockDead = true)
|
||||
{
|
||||
return AIFilteringUtility.FilteringForStatusEffectiveAbility(candidates, tagOwner, base.Filters, playPtn, situation, isAttackEffective: false, isBlockDead);
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIConsoleUtility
|
||||
{
|
||||
private static StringBuilder _logBuilder;
|
||||
|
||||
public static void Log(string log)
|
||||
{
|
||||
@@ -17,8 +16,4 @@ public class AIConsoleUtility
|
||||
public static void LogError(string log)
|
||||
{
|
||||
}
|
||||
|
||||
private static void BuildLog(string text)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIDamageSelectLogicArgument : AISelectLogicArgumentBase
|
||||
{
|
||||
private const int DAMAGE_VALUE_ARG_INDEX = 0;
|
||||
|
||||
public override AIScriptTokenArgType LogicType => AIScriptTokenArgType.DAMAGE_LOGIC;
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIDamagedBonus : AIScriptArgumentExpressions
|
||||
{
|
||||
private AIPolishConvertedExpression _bonus;
|
||||
|
||||
private const int BONUS_ARG_INDEX = 0;
|
||||
|
||||
public AIDamagedBonus(string text)
|
||||
: base(text)
|
||||
{
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AIDamagedBuff : AIScriptArgumentExpressions
|
||||
|
||||
private AIPolishConvertedExpression _lifeBuff;
|
||||
|
||||
private const int ATTACK_BUFF_INDEX = 0;
|
||||
|
||||
private const int LIFE_BUFF_INDERX = 1;
|
||||
|
||||
public AIDamagedBuff(string text)
|
||||
: base(text)
|
||||
{
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AIDamagedDamage : AIFiltersAndSelectTypeArgument
|
||||
|
||||
private AIPolishConvertedExpression _damageCount;
|
||||
|
||||
private const int DAMAGE_VALUE_OFFSET = 2;
|
||||
|
||||
private const int DAMAGE_COUNT_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 3;
|
||||
|
||||
public AIDamagedDamage(string text)
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIDamagedHeal : AIFiltersAndSelectTypeArgument
|
||||
{
|
||||
private const int HEAL_AMOUNT_OFFSET = 1;
|
||||
|
||||
private AIPolishConvertedExpression _healAmount;
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIDamagedToken : AIFiltersArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenCount;
|
||||
|
||||
private const int TOKEN_COUNT_INDEX_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
public AIDamagedToken(string text)
|
||||
|
||||
@@ -168,17 +168,4 @@ public class AIDataLibrary
|
||||
_deckStyleDic.Add(styleName, aIStyleData);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static List<int> GetAIDeckCardList(string deckname)
|
||||
{
|
||||
List<int> list = new List<int>();
|
||||
foreach (AICardData value in GameMgr.GetIns().GetDataMgr().m_AIDataLibrary.SearchDeckData(deckname).CardDic.Values)
|
||||
{
|
||||
for (int i = 0; i < value.CardNum; i++)
|
||||
{
|
||||
list.Add(value.CardID);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,6 @@ namespace Wizard;
|
||||
|
||||
public class AIDeckFileNameList
|
||||
{
|
||||
private const int DECK_ID_INDEX = 0;
|
||||
|
||||
private const int FILE_NAME_INDEX = 1;
|
||||
|
||||
private readonly Dictionary<int, string> _dataTable = new Dictionary<int, string>();
|
||||
|
||||
@@ -25,9 +22,4 @@ public class AIDeckFileNameList
|
||||
{
|
||||
return _dataTable[id];
|
||||
}
|
||||
|
||||
public List<string> GetFileNameList()
|
||||
{
|
||||
return _dataTable.Values.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIDiscardDamage : AIFiltersAndSelectTypeArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _damageArg;
|
||||
|
||||
private const int DAMAGE_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIDiscardDamage(string text)
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIDiscardHeal : AIFiltersAndSelectTypeArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _healAmount;
|
||||
|
||||
private const int HEAL_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIDiscardHeal(string text)
|
||||
|
||||
@@ -43,8 +43,6 @@ public static class AIDiscardUtility
|
||||
}
|
||||
}
|
||||
|
||||
private const float TURN_COST_DIFF_BONUS_RATE = 0.001f;
|
||||
|
||||
public static float CalcAllDiscardedBonus(AIVirtualField field, AISituationInfo playSituation, List<int> playPtn)
|
||||
{
|
||||
AIDiscardInfo discardInfo = playSituation.DiscardInfo;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIDiscardedToken : AIFiltersArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenCount;
|
||||
|
||||
private const int TOKEN_COUNT_INDEX_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
public AIDiscardedToken(string text)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,9 +5,6 @@ namespace Wizard;
|
||||
|
||||
public class AIEmoteFileNameList
|
||||
{
|
||||
private const int EMOTE_ID_INDEX = 0;
|
||||
|
||||
private const int FILE_NAME_INDEX = 1;
|
||||
|
||||
private readonly Dictionary<int, string> _dataTable = new Dictionary<int, string>();
|
||||
|
||||
@@ -29,9 +26,4 @@ public class AIEmoteFileNameList
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public List<string> GetFileNameList()
|
||||
{
|
||||
return _dataTable.Values.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,8 +45,6 @@ public class AIEmoteMng
|
||||
|
||||
public bool IsOpponentTurnEmoteOccured => _isOpponentTurnEmoteOccured;
|
||||
|
||||
public Stopwatch Stopwatch => _stopwatch;
|
||||
|
||||
public int EmoteRandomSeed { get; private set; }
|
||||
|
||||
public AIEmoteMng(EnemyAI ai)
|
||||
@@ -135,20 +133,6 @@ public class AIEmoteMng
|
||||
_isOpponentTurnEmoteOccured = false;
|
||||
}
|
||||
|
||||
public AIEmoteCmd OnAllyCardDestroy()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool IsReverseDisAdv()
|
||||
{
|
||||
if (_allyAdvOnTurnStart >= 0f)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return AI.CalcFieldAdvantage() >= 0f;
|
||||
}
|
||||
|
||||
public bool IsOpponentEarnGreatMerit()
|
||||
{
|
||||
float num = AI.CalcFieldAdvantage();
|
||||
@@ -156,24 +140,6 @@ public class AIEmoteMng
|
||||
return _opponentAdvOnTurnStart - num > (float)ppTotal * 2f;
|
||||
}
|
||||
|
||||
public bool IsFailedReverseDisAdv()
|
||||
{
|
||||
if (_allyAdvOnTurnStart >= 0f)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return AI.CalcFieldAdvantage() < 0f;
|
||||
}
|
||||
|
||||
public bool IsOpponentFailedReverseDisAdv()
|
||||
{
|
||||
if (_opponentAdvOnTurnStart <= 0f)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return AI.CalcFieldAdvantage() > 0f;
|
||||
}
|
||||
|
||||
public bool IsRemainTooPP()
|
||||
{
|
||||
return AI.ALLY.Pp >= 2;
|
||||
@@ -344,22 +310,6 @@ public class AIEmoteMng
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsThinkingLong()
|
||||
{
|
||||
float num = 20000f;
|
||||
if (!_isThinkingEmoteOccured)
|
||||
{
|
||||
return (float)_stopwatch.ElapsedMilliseconds > num;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void OnThinkingEmote()
|
||||
{
|
||||
_isThinkingEmoteOccured = true;
|
||||
_stopwatch.Reset();
|
||||
}
|
||||
|
||||
public void OnOperationRequest()
|
||||
{
|
||||
if (!_isThinkingEmoteOccured)
|
||||
|
||||
@@ -7,28 +7,7 @@ public class AIEmoteQuery
|
||||
{
|
||||
public enum Category
|
||||
{
|
||||
UnexpectedPlayResult_Good = 1,
|
||||
UnexpectedPlayResult_Bad = 2,
|
||||
LongThinking = 3,
|
||||
UnexpectedBattleResult = 11,
|
||||
ReverseDisAdv = 12,
|
||||
CheckMated = 13,
|
||||
HuntDown = 14,
|
||||
RemainTooPP = 15,
|
||||
SpellBanishOverExpected = 21,
|
||||
FatalAttack = 22,
|
||||
OpponentRemainTooPP = 31,
|
||||
OpponentReverseDisAdvFail = 32,
|
||||
OpponentGetGreatMerit = 33,
|
||||
OpponentPlayGiant = 34,
|
||||
OpponentBanishSpell_Good = 35,
|
||||
OpponentBanishSpell_Bad = 36,
|
||||
OpponentWellHealing = 37,
|
||||
EliminatedAllyLegion = 101,
|
||||
EnoughUnit = 102,
|
||||
Awake = 401,
|
||||
EnoughGrave = 501
|
||||
}
|
||||
Awake = 401 }
|
||||
|
||||
private EnemyAI enemyAI;
|
||||
|
||||
@@ -46,8 +25,6 @@ public class AIEmoteQuery
|
||||
|
||||
private Dictionary<int, int> _categoryIntervalDic;
|
||||
|
||||
private const int EMOTE_QUEUE_LENGTH = 3;
|
||||
|
||||
public bool UseInnerEmote => _useInnerEmote;
|
||||
|
||||
public AIEmoteQuery(EnemyAI ai)
|
||||
|
||||
@@ -4,9 +4,6 @@ namespace Wizard;
|
||||
|
||||
public static class AIEvalAttackRemoveUtility
|
||||
{
|
||||
private const int REMOVE_TYPE_INDEX = 1;
|
||||
|
||||
private const int REMOVE_COUNT_INDEX = 0;
|
||||
|
||||
public static float EvalAttackRemove(AIVirtualCard tagOwner, AIVirtualField field, List<int> playPtn, AISituationInfo situation, List<AIScriptTokenBase> argList)
|
||||
{
|
||||
|
||||
@@ -4,9 +4,6 @@ namespace Wizard;
|
||||
|
||||
public static class AIEvalReanimateUtility
|
||||
{
|
||||
private const int SIDE_INDEX = 0;
|
||||
|
||||
private const int REANIMATE_COST_INDEX = 1;
|
||||
|
||||
public static float EvalReanimate(AIVirtualCard tagOwner, List<int> playPtn, AISituationInfo situation, List<AIScriptTokenBase> argList)
|
||||
{
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIEvoAddDeck : AIEvoTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenCount;
|
||||
|
||||
private const int TOKEN_COUNT_ARG_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => -1;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIEvoAddStack : AIEvoTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _addStackCount;
|
||||
|
||||
private const int ADD_STACK_COUNT_ARG_INDEX = 0;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => -1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => -1;
|
||||
|
||||
@@ -10,10 +10,6 @@ public class AIEvoAttachTag : AIEvoTagArgument
|
||||
|
||||
private readonly int REMOVE_TIMING_OFFSET = 1;
|
||||
|
||||
private const int TAG_WORD_START_INDEX = 1;
|
||||
|
||||
private const int SELECT_LOGIC_WORD_START_INDEX = 4;
|
||||
|
||||
public AIPlayTag Tag { get; private set; }
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIEvoAttackableCount : AIEvoTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _attackableCount;
|
||||
|
||||
private const int ATTACKABLE_COUNT_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIEvoAttackableCount(string text)
|
||||
|
||||
@@ -12,10 +12,6 @@ public class AIEvoChangeCost : AIEvoTagArgument
|
||||
|
||||
private AIPolishConvertedExpression _costValue;
|
||||
|
||||
private const int COST_VALUE_ARG_OFFSET = 1;
|
||||
|
||||
private const int COST_TYPE_ARG_OFFSET = 2;
|
||||
|
||||
public AIScriptTokenArgType CostVariableType { get; private set; }
|
||||
|
||||
public override TargetSelectType SimulationTargetSelectType => TargetSelectType.NormalRuleBase;
|
||||
|
||||
@@ -12,12 +12,6 @@ public class AIEvoDamageCut : AIEvoTagArgument
|
||||
|
||||
private bool _isDamageTypeDefinedByMaster;
|
||||
|
||||
private const int CUT_AMOUNT_OFFSET = 1;
|
||||
|
||||
private const int STOP_TIMING_OFFSET = 2;
|
||||
|
||||
private const int DEFAULT_DAMAGE_TYPE_OFFSET = 3;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 1 + (_isDamageTypeDefinedByMaster ? 3 : 2);
|
||||
|
||||
public AIEvoDamageCut(string text)
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIEvoDiscard : AIEvoTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _discardCountArg;
|
||||
|
||||
private const int DISCARD_COUNT_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public override TargetSelectType SimulationTargetSelectType => TargetSelectType.NormalRuleBase;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIEvoReanimate : AIEvoTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _costArgument;
|
||||
|
||||
private const int REANIMATE_COST_ARG_INDEX = 0;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => -1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 0;
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AIEvoSetLeaderMaxLife : AIEvoTagArgument
|
||||
|
||||
private AIPolishConvertedExpression _life;
|
||||
|
||||
private const int SIDE_OFFSET = 2;
|
||||
|
||||
private const int VALUE_OFFSET = 1;
|
||||
|
||||
public AIEvoSetLeaderMaxLife(string text)
|
||||
: base(text)
|
||||
{
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AIEvoShield : AIEvoTagArgument
|
||||
|
||||
private AIScriptTokenArgType _damageType;
|
||||
|
||||
private const int DEFAULT_DAMAGE_TYPE_OFFSET = 2;
|
||||
|
||||
private const int STOP_TIMING_OFFSET = 1;
|
||||
|
||||
private bool _isDamageTypeDefinedByMaster;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 1 + ((!_isDamageTypeDefinedByMaster) ? 1 : 2);
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIEvoSubtractCountdown : AIEvoTagArgument
|
||||
{
|
||||
private const int COUNTDOWN_ARG_OFFSET = 1;
|
||||
|
||||
private AIPolishConvertedExpression _countDownArg;
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIEvoToken : AIEvoTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenCount;
|
||||
|
||||
private const int TOKEN_COUNT_ARG_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => -1;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIEvoTokenDraw : AIEvoTagArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenCount;
|
||||
|
||||
private const int TOKEN_COUNT_ARG_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => -1;
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
internal class AIEvolMove : AIMove
|
||||
{
|
||||
public BattleCardBase Src { get; private set; }
|
||||
|
||||
public List<BattleCardBase> Targets { get; private set; }
|
||||
|
||||
public AIEvolMove(BattleCardBase src, List<BattleCardBase> targets)
|
||||
: base(AIOperationType.EVOLVE)
|
||||
{
|
||||
Src = src;
|
||||
Targets = targets;
|
||||
}
|
||||
|
||||
public override void RunOperation(BattleManagerBase mgr, bool isPlayer)
|
||||
{
|
||||
mgr.VfxMgr.RegisterSequentialVfx(mgr.OperateMgr.EvolutionCard(Src, isPlayer, Targets));
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,4 @@ public class AIEvolvedAttackableCount : AIScriptArgumentExpressions
|
||||
tagOwner.GiveAttackableCount(count);
|
||||
}
|
||||
}
|
||||
|
||||
public int GetAttackableCount(AIVirtualCard owner, List<int> playPtn, AIVirtualField field, AISituationInfo situation)
|
||||
{
|
||||
return (int)Count.EvalArg(owner, playPtn, field, situation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIFilteringActivateCountArgument : AIActivateCountTagArgument
|
||||
{
|
||||
private const int MAX_ACTIVATE_COUNT_OFFSET = 4;
|
||||
|
||||
public List<AIScriptTokenBase> Filters { get; private set; }
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIFusionDraw : AIScriptArgumentExpressions
|
||||
{
|
||||
private AIPolishConvertedExpression _drawCount;
|
||||
|
||||
private const int DRAW_COUNT_ARG_INDEX = 0;
|
||||
|
||||
public AIFusionDraw(string text)
|
||||
: base(text)
|
||||
{
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
internal class AIFusionMove : AIMove
|
||||
{
|
||||
public BattleCardBase Src { get; private set; }
|
||||
|
||||
public List<BattleCardBase> Targets { get; private set; }
|
||||
|
||||
public AIFusionMove(BattleCardBase src, List<BattleCardBase> targets)
|
||||
: base(AIOperationType.FUSION)
|
||||
{
|
||||
Src = src;
|
||||
Targets = targets;
|
||||
}
|
||||
|
||||
public override void RunOperation(BattleManagerBase mgr, bool isPlayer)
|
||||
{
|
||||
mgr.VfxMgr.RegisterSequentialVfx(mgr.OperateMgr.FusionCard(Src, isPlayer, Targets));
|
||||
}
|
||||
}
|
||||
@@ -12,18 +12,6 @@ public class AIFusionSituationInfo : AISituationInfo
|
||||
|
||||
public AIPolishConvertedExpression PriorityExpression { get; private set; }
|
||||
|
||||
public bool HasTargets
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Targets != null)
|
||||
{
|
||||
return Targets.Count > 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public AIFusionSituationInfo(AIVirtualCard actor, List<AIVirtualCard> targets)
|
||||
: base(actor, null, null, AIOperationType.FUSION)
|
||||
{
|
||||
|
||||
@@ -8,8 +8,6 @@ public class AIGameStartAttachTag : AIFiltersAndSelectTypeArgument
|
||||
|
||||
private AIScriptTokenArgType _removeTiming;
|
||||
|
||||
private const int REMOVE_TIMING_ARG_OFFSET = 1;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
public AIGameStartAttachTag(string text)
|
||||
|
||||
@@ -8,8 +8,6 @@ public class AIGenerateTag : AIScriptArgumentExpressions
|
||||
|
||||
public AIPlayTag Tag;
|
||||
|
||||
private const int REMOVE_TIMING_ARG_OFFSET = 1;
|
||||
|
||||
public AIScriptTokenArgType RemoveTiming { get; private set; }
|
||||
|
||||
private int HASH_ARG_END_OFFSET => 1;
|
||||
|
||||
@@ -65,11 +65,6 @@ public class AIGenerateTagOwnerTable
|
||||
_ownerInfoList = new List<GenerateTagOwnerInfo>();
|
||||
}
|
||||
|
||||
public void ClearAll()
|
||||
{
|
||||
_ownerInfoList.Clear();
|
||||
}
|
||||
|
||||
public AIGenerateTagOwnerTable Clone()
|
||||
{
|
||||
AIGenerateTagOwnerTable aIGenerateTagOwnerTable = new AIGenerateTagOwnerTable();
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIGetOffEvo : AIFiltersAndSelectTypeArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenId;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 1;
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@ public class AIGetOffMetamorphose : AIFiltersAndSelectTypeArgument
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenId;
|
||||
|
||||
private const int INVALID_TOKEN_ID = -1;
|
||||
|
||||
private const int TOKEN_ID_ARG_OFFSET = 1;
|
||||
|
||||
private AIScriptTokenArgType _registerSide = AIScriptTokenArgType.BOTH;
|
||||
|
||||
protected override int SELECT_TYPE_OFFSET => 2;
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIGetOnBanish : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private AIScriptTokenArgType _selectType;
|
||||
|
||||
private const int SELECT_TYPE_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
public AIGetOnBanish(string text)
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AIGetOnDamage : AITriggerAndTargetFiltersTagBase
|
||||
|
||||
public AIScriptTokenArgType SelectType;
|
||||
|
||||
private const int DAMAGE_VALUE_ARG_OFFSET = 1;
|
||||
|
||||
private const int SELECT_TYPE_ARG_OFFSET = 2;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 2;
|
||||
|
||||
public AIGetOnDamage(string text)
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIGetOnEvo : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private AIScriptTokenArgType _selectType;
|
||||
|
||||
private const int SELECT_TYPE_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
public AIGetOnEvo(string text)
|
||||
|
||||
@@ -111,17 +111,6 @@ public static class AIHandPtnCalculator
|
||||
}
|
||||
}
|
||||
|
||||
public static int ConvertPlayPtnToHandPtnIndex(List<int> playPtn, int handNum)
|
||||
{
|
||||
int num = 0;
|
||||
for (int i = 0; i < playPtn.Count; i++)
|
||||
{
|
||||
int num2 = (int)Mathf.Pow(2f, handNum - playPtn[i] - 1);
|
||||
num += num2;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public static void PrioritySortHand(EnemyAI ai, List<int> handList)
|
||||
{
|
||||
IComparer<int> comparer = new PriorityComparer(ai, handList);
|
||||
|
||||
@@ -6,12 +6,6 @@ public class AIHealAttachTag : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private AIPolishConvertedExpression _selectCountArg;
|
||||
|
||||
private const int SELECT_TYPE_ARG_OFFSET = 3;
|
||||
|
||||
private const int SELECT_COUNT_ARG_OFFSET = 2;
|
||||
|
||||
private const int REMOVE_TIMING_ARG_OFFSET = 1;
|
||||
|
||||
public AIPlayTag Tag { get; private set; }
|
||||
|
||||
public AIScriptTokenArgType SelectType { get; private set; }
|
||||
|
||||
@@ -4,11 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIHealBuff : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int LIFE_OFFSET = 1;
|
||||
|
||||
private const int ATTACK_OFFSET = 2;
|
||||
|
||||
private const int SELECT_TYPE_OFFSET = 3;
|
||||
|
||||
public AIScriptTokenArgType SelectType { get; private set; }
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@ namespace Wizard;
|
||||
|
||||
public class AIHealDamage : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private const int DAMAGE_OFFSET = 1;
|
||||
|
||||
private const int SELECT_TYPE_OFFSET = 2;
|
||||
|
||||
public AIScriptTokenArgType SelectType { get; private set; }
|
||||
|
||||
|
||||
@@ -6,10 +6,6 @@ public class AIHealHeal : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private AIPolishConvertedExpression _healValue;
|
||||
|
||||
private const int SELECT_TYPE_ARG_OFFSET = 2;
|
||||
|
||||
private const int HEAL_VALUE_ARG_OFFSET = 1;
|
||||
|
||||
public AIScriptTokenArgType SelectType { get; private set; }
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 2;
|
||||
|
||||
@@ -65,10 +65,4 @@ public class AIHealRecorderCollection
|
||||
{
|
||||
(isAlly ? AllyHealRecorderList : EnemyHealRecorderList).Add(new AIHealRecorder(turn, healedCard));
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
AllyHealRecorderList.Clear();
|
||||
EnemyHealRecorderList.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ public class AIHealToken : AITriggerAndTargetFiltersTagBase
|
||||
{
|
||||
private AIPolishConvertedExpression _tokenCount;
|
||||
|
||||
private const int TOKEN_COUNT_INDEX_OFFSET = 1;
|
||||
|
||||
protected override int NON_FILTER_FIRST_OFFSET => 1;
|
||||
|
||||
public AIHealToken(string text)
|
||||
|
||||
@@ -8,10 +8,6 @@ public class AILastwordAddDeck : AIScriptArgumentExpressions
|
||||
|
||||
private AIPolishConvertedExpression _addCountExpression;
|
||||
|
||||
private const int ADD_CARD_ID_ARG_INDEX = 0;
|
||||
|
||||
private const int ADD_COUNT_ARG_INDEX = 1;
|
||||
|
||||
public AILastwordAddDeck(string text)
|
||||
: base(text)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user