From bb80815b0127b3717ed7b290505b377de5846318 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Fri, 5 Jun 2026 16:34:46 -0400 Subject: [PATCH 001/129] feat(battle-engine): scaffold empty SVSim.BattleEngine library --- DCGEngine.sln | 6 ++++++ SVSim.BattleEngine/Engine/.gitkeep | 0 SVSim.BattleEngine/Patches/.gitkeep | 0 SVSim.BattleEngine/SVSim.BattleEngine.csproj | 16 ++++++++++++++++ SVSim.BattleEngine/Shim/.gitkeep | 0 5 files changed, 22 insertions(+) create mode 100644 SVSim.BattleEngine/Engine/.gitkeep create mode 100644 SVSim.BattleEngine/Patches/.gitkeep create mode 100644 SVSim.BattleEngine/SVSim.BattleEngine.csproj create mode 100644 SVSim.BattleEngine/Shim/.gitkeep diff --git a/DCGEngine.sln b/DCGEngine.sln index 11e82b4..e44f59e 100644 --- a/DCGEngine.sln +++ b/DCGEngine.sln @@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVSim.Bootstrap", "SVSim.Bo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVSim.BattleNode", "SVSim.BattleNode\SVSim.BattleNode.csproj", "{F4549DD3-566A-4155-8D52-3A4D2A7072F7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SVSim.BattleEngine", "SVSim.BattleEngine\SVSim.BattleEngine.csproj", "{CCE23D9D-6A66-456B-9812-F09B1FDA3C81}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -37,5 +39,9 @@ Global {F4549DD3-566A-4155-8D52-3A4D2A7072F7}.Debug|Any CPU.Build.0 = Debug|Any CPU {F4549DD3-566A-4155-8D52-3A4D2A7072F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {F4549DD3-566A-4155-8D52-3A4D2A7072F7}.Release|Any CPU.Build.0 = Release|Any CPU + {CCE23D9D-6A66-456B-9812-F09B1FDA3C81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCE23D9D-6A66-456B-9812-F09B1FDA3C81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCE23D9D-6A66-456B-9812-F09B1FDA3C81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCE23D9D-6A66-456B-9812-F09B1FDA3C81}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/SVSim.BattleEngine/Engine/.gitkeep b/SVSim.BattleEngine/Engine/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/SVSim.BattleEngine/Patches/.gitkeep b/SVSim.BattleEngine/Patches/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/SVSim.BattleEngine/SVSim.BattleEngine.csproj b/SVSim.BattleEngine/SVSim.BattleEngine.csproj new file mode 100644 index 0000000..3a21d91 --- /dev/null +++ b/SVSim.BattleEngine/SVSim.BattleEngine.csproj @@ -0,0 +1,16 @@ + + + + net8.0 + + disable + disable + latest + true + + false + $(NoWarn);CS0108;CS0114;CS0162;CS0164;CS0219;CS0414;CS0649;CS0660;CS0661;CS1998 + true + + + diff --git a/SVSim.BattleEngine/Shim/.gitkeep b/SVSim.BattleEngine/Shim/.gitkeep new file mode 100644 index 0000000..e69de29 From 550cedbf1e04ec304800a3d0540e7b0dd38d0cf1 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Fri, 5 Jun 2026 16:45:12 -0400 Subject: [PATCH 002/129] feat(battle-engine): seed copy roots + UnityEngine primitive shim Co-Authored-By: Claude Sonnet 4.6 --- SVSim.BattleEngine/COPIED.manifest.tsv | 6 + SVSim.BattleEngine/Engine/.gitattributes | 2 + SVSim.BattleEngine/Engine/BattleCardBase.cs | 3876 ++++++++++++++ .../Engine/BattleManagerBase.cs | 2443 +++++++++ SVSim.BattleEngine/Engine/BattlePlayerBase.cs | 4574 +++++++++++++++++ SVSim.BattleEngine/Engine/SkillCreator.cs | 2227 ++++++++ .../Engine/Wizard.Battle/ActionProcessor.cs | 897 ++++ .../Shim/UnityEngine/Primitives.cs | 35 + 8 files changed, 14060 insertions(+) create mode 100644 SVSim.BattleEngine/COPIED.manifest.tsv create mode 100644 SVSim.BattleEngine/Engine/.gitattributes create mode 100644 SVSim.BattleEngine/Engine/BattleCardBase.cs create mode 100644 SVSim.BattleEngine/Engine/BattleManagerBase.cs create mode 100644 SVSim.BattleEngine/Engine/BattlePlayerBase.cs create mode 100644 SVSim.BattleEngine/Engine/SkillCreator.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle/ActionProcessor.cs create mode 100644 SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs diff --git a/SVSim.BattleEngine/COPIED.manifest.tsv b/SVSim.BattleEngine/COPIED.manifest.tsv new file mode 100644 index 0000000..a9bf525 --- /dev/null +++ b/SVSim.BattleEngine/COPIED.manifest.tsv @@ -0,0 +1,6 @@ +# engine-relpath source-relpath sha256 patched(0|1) +BattleCardBase.cs BattleCardBase.cs b105aec032149ab0a1730c6e06e25530699851707150ad4b72e24fe6d17fd50f 0 +BattleManagerBase.cs BattleManagerBase.cs b4181eac7af0ed578835ea75b7003e1b3466331006a35cd84b40139825680eb7 0 +BattlePlayerBase.cs BattlePlayerBase.cs 9d3a665158706460a52900008dcfcdf575dbe08cb6d3cc05e63e718b2885b51b 0 +SkillCreator.cs SkillCreator.cs 6b90cd32dea619058e1cf942bdd288981495f7711a76bff8ccc9e2787e3f6439 0 +Wizard.Battle/ActionProcessor.cs Wizard.Battle/ActionProcessor.cs 7c8b40454a4948dd48a58c0efc240703eab9a77aea0add64e542f6b06c7323af 0 diff --git a/SVSim.BattleEngine/Engine/.gitattributes b/SVSim.BattleEngine/Engine/.gitattributes new file mode 100644 index 0000000..9f9dc72 --- /dev/null +++ b/SVSim.BattleEngine/Engine/.gitattributes @@ -0,0 +1,2 @@ +# Verbatim engine copies: never normalize line endings (keeps sha256 manifest valid). +*.cs -text diff --git a/SVSim.BattleEngine/Engine/BattleCardBase.cs b/SVSim.BattleEngine/Engine/BattleCardBase.cs new file mode 100644 index 0000000..0d24e10 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleCardBase.cs @@ -0,0 +1,3876 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Card.InnerOptions; +using Wizard.Battle.Resource; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public abstract class BattleCardBase : IReadOnlyBattleCardInfo, IBattleCardUniqueID +{ + public class BuildInfo + { + public GameObject GameObject; + + public int CardId; + + public BattlePlayerBase SelfBattlePlayer; + + public BattlePlayerBase OpponentBattlePlayer; + + public IBattlePlayerReadOnlyInfo SelfBattlePlayerReadOnlyInfo; + + public List NormalSkillBuildInfos; + + public List EvolveSkillBuildInfos; + + public bool IsPlayer; + + public int BattleCardIndex; + + public CardInnerOptionsBase InnerOptions; + + public BattleManagerBase BattleMgr; + + public IBattleResourceMgr ResourceMgr; + + public BuildInfo(GameObject _gameObject, int _cardId, BattlePlayerBase _selfBattlePlayer, BattlePlayerBase _opponentBattlePlayer, IBattlePlayerReadOnlyInfo _selfBattlePlayerReadOnlyInfo, List _normalSkillBuildInfos, List _evolveSkillBuildInfos, bool _isPlayer, int _battleCardIndex, CardInnerOptionsBase _innerOptions, BattleManagerBase _battleMgr, IBattleResourceMgr _resourceMgr) + { + GameObject = _gameObject; + CardId = _cardId; + SelfBattlePlayer = _selfBattlePlayer; + OpponentBattlePlayer = _opponentBattlePlayer; + SelfBattlePlayerReadOnlyInfo = _selfBattlePlayerReadOnlyInfo; + NormalSkillBuildInfos = _normalSkillBuildInfos; + EvolveSkillBuildInfos = _evolveSkillBuildInfos; + IsPlayer = _isPlayer; + BattleCardIndex = _battleCardIndex; + InnerOptions = _innerOptions; + BattleMgr = _battleMgr; + ResourceMgr = _resourceMgr; + } + + public BuildInfo VirtualClone(BattlePlayerBase virtualSelfBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer) + { + return new BuildInfo(null, CardId, virtualSelfBattlePlayer, virtualOpponentBattlePlayer, virtualSelfBattlePlayer, new List(NormalSkillBuildInfos), new List(EvolveSkillBuildInfos), IsPlayer, BattleCardIndex, InnerOptions.VirtualClone(), BattleMgr, ResourceMgr); + } + } + + public class DeathTypeInformation + { + public bool WhenDestroy; + + public bool DestroyedByKiller; + + public bool ChantDestroy; + + public bool MysteriesDestroy; + + public bool BanishDestroy; + + public bool BurialRite; + + public bool UseFusionIngredient; + + public bool UseFusionMetamorphoseIngredient; + + public bool LeaveByGetOn; + + public DeathTypeInformation() + { + WhenDestroy = false; + DestroyedByKiller = false; + ChantDestroy = false; + MysteriesDestroy = false; + BanishDestroy = false; + BurialRite = false; + UseFusionIngredient = false; + UseFusionMetamorphoseIngredient = false; + LeaveByGetOn = false; + } + + public DeathTypeInformation Clone() + { + return (DeathTypeInformation)MemberwiseClone(); + } + + public void Reset() + { + WhenDestroy = false; + DestroyedByKiller = false; + ChantDestroy = false; + MysteriesDestroy = false; + BanishDestroy = false; + BurialRite = false; + UseFusionIngredient = false; + UseFusionMetamorphoseIngredient = false; + LeaveByGetOn = false; + } + } + + public class ParameterChangeInformation + { + public int CurrentAtk; + + public int BaseAtk; + + public int CurrentHealth; + + public int MaxHealth; + + public int BaseHealth; + + public ParameterChangeInformation(int currentAtk, int baseAtk, int currentHealth, int maxHealth, int baseHealth) + { + CurrentAtk = currentAtk; + BaseAtk = baseAtk; + CurrentHealth = currentHealth; + MaxHealth = maxHealth; + BaseHealth = baseHealth; + } + } + + public class ItWasDamagedCounter + { + public int SelfTurnDamage { get; private set; } + + public int OpponentTurnDamage { get; private set; } + + public ItWasDamagedCounter() + { + Clear(); + } + + public ItWasDamagedCounter(int selfTurnDamage, int opponentTurnDamage) + { + SelfTurnDamage = selfTurnDamage; + OpponentTurnDamage = opponentTurnDamage; + } + + public void Clear() + { + SelfTurnDamage = 0; + OpponentTurnDamage = 0; + } + + public void AddDamageCount(bool selfTurn) + { + if (selfTurn) + { + SelfTurnDamage++; + } + else + { + OpponentTurnDamage++; + } + } + + public int GetDamageCount(bool selfTurn) + { + if (selfTurn) + { + return SelfTurnDamage; + } + return OpponentTurnDamage; + } + } + + private struct DamageClipping + { + public int ClippingMax; + + public int GiveCount; + + public DamageClipping(int clippingMax, int count) + { + ClippingMax = clippingMax; + GiveCount = count; + } + } + + public struct TransformInformation + { + public BattleCardBase OriginalCard { get; private set; } + + public TransformType Type { get; private set; } + + public TransformInformation(TransformType type, BattleCardBase card) + { + Type = type; + OriginalCard = card; + } + } + + public struct SkillActivationInfo + { + public long SkillId { get; private set; } + + public SkillBase Skill { get; private set; } + + public SkillActivationInfo(long skillId, SkillBase skill) + { + SkillId = skillId; + Skill = skill; + } + } + + public enum CHECK_CONDITION_MUTATIONSKILL_TYPE + { + NONE, + NOT_HAVE_MUTATION_SKILL, + SELECT_ACCELERATE_SKILL_NOT_ACTIVE, + CRYSTALLIZE_SKILL_ACTIVE, + SELECT_CRYSTALLIZE_SKILL_NOT_ACTIVE, + NOT_PLAY, + PLAY + } + + public enum TransformType + { + None, + Accelerate, + Crystallize, + Choice, + Metamorphose + } + + public class DestroyedBySkillInfo + { + public enum DestroyedBySkillAbility + { + None, + WhenPlay, + Accelerate, + Crystallize, + WhenDestroy + } + + public DestroyedBySkillAbility Ability { get; private set; } + + public int BaseCardId { get; private set; } + + public string Player { get; private set; } + + public DestroyedBySkillInfo(DestroyedBySkillAbility ability, int baseCardId, bool isDestroyedBySelf) + { + Ability = ability; + BaseCardId = baseCardId; + Player = (isDestroyedBySelf ? "me" : "op"); + } + } + + public class BanishInfo + { + public enum BanishPlace + { + None, + Hand, + Field, + Deck + } + + public int Turn { get; private set; } + + public bool IsSelfTurn { get; private set; } + + public BanishPlace Place { get; private set; } + + public BanishInfo(int turn, bool isSelfTurn, BanishPlace place) + { + Turn = turn; + IsSelfTurn = isSelfTurn; + Place = place; + } + } + + public class AttackCountInfo + { + public Skill_attack_count Skill { get; private set; } + + public int Count { get; private set; } + + public AttackCountInfo(Skill_attack_count skill, int count) + { + Skill = skill; + Count = count; + } + + public virtual int CalcAttackCount(int baseAttackCount) + { + return baseAttackCount; + } + } + + public class SetAttackCountInfo : AttackCountInfo + { + public SetAttackCountInfo(Skill_attack_count skill, int count) + : base(skill, count) + { + } + + public override int CalcAttackCount(int baseAttackCount) + { + return base.Count; + } + } + + public class AddAttackCountInfo : AttackCountInfo + { + public AddAttackCountInfo(Skill_attack_count skill, int count) + : base(skill, count) + { + } + + public override int CalcAttackCount(int baseAttackCount) + { + return baseAttackCount + base.Count; + } + } + + public class AttackOpponentResult + { + public VfxBase attackVfx { get; private set; } + + public VfxBase damageVfx { get; private set; } + + public DamageResult damageResult { get; private set; } + + public AttackOpponentResult(VfxBase _attackVfx, VfxBase _damageVfx, DamageResult _damageResult) + { + attackVfx = _attackVfx; + damageVfx = _damageVfx; + damageResult = _damageResult; + } + } + + public struct DamageParam + { + public int Damage; + + public BattleCardBase OwnerCard { get; private set; } + + public DamageParam(int damage, BattleCardBase card, string damageType = "_OPT_NULL_", CardBasePrm.ClanType damageClan = CardBasePrm.ClanType.NONE) + { + List list = card.SkillApplyInformation.AddDamageList.Where((DamageModifier m) => m.IsEffective(damageType, damageClan, isUseClass: false)).ToList(); + list.AddRange(card.SelfBattlePlayer.Class.SkillApplyInformation.AddDamageList.Where((DamageModifier m) => m.IsEffective(damageType, damageClan, isUseClass: true))); + list.Sort((DamageModifier a, DamageModifier b) => a.OrderCount - b.OrderCount); + for (int num = 0; num < list.Count; num++) + { + damage = list[num].Calc(damage); + } + Damage = damage; + OwnerCard = card; + } + } + + public class DamageResult + { + public VfxBase Vfx { get; private set; } + + public VfxBase PreDamageVfx { get; private set; } + + public VfxBase PostDamageVfx { get; private set; } + + public int DamageApplied { get; private set; } + + public int GainLife { get; private set; } + + public bool IsReflectedDamage { get; private set; } + + public DamageResult(VfxBase _vfx, int _damageApplied, int _gainLife, VfxBase _preDamageVfx = null, VfxBase _postDamageVfx = null, bool isReflectedDamage = false) + { + Vfx = _vfx; + DamageApplied = _damageApplied; + GainLife = _gainLife; + IsReflectedDamage = isReflectedDamage; + PreDamageVfx = ((_preDamageVfx == null) ? NullVfx.GetInstance() : _preDamageVfx); + PostDamageVfx = ((_postDamageVfx == null) ? NullVfx.GetInstance() : _postDamageVfx); + } + } + + public struct HealParam + { + public int HealAmount; + + public HealParam(int healAmount, BattleCardBase owner, BattleCardBase target, bool applyModifier = true) + { + if (applyModifier) + { + List list = owner.SelfBattlePlayer.Class.SkillApplyInformation.HealModifierList.ToList(); + list.AddRange(owner.OpponentBattlePlayer.Class.SkillApplyInformation.HealModifierList); + list.Sort((HealModifier a, HealModifier b) => a.OrderCount - b.OrderCount); + for (int num = 0; num < list.Count; num++) + { + healAmount = list[num].Calc(healAmount, owner, target); + } + } + HealAmount = healAmount; + } + } + + public class HealResult + { + public int HealAmount { get; private set; } + + public VfxBase HealVfx { get; private set; } + + public VfxBase PrehealVfxVfx { get; private set; } + + public VfxBase PosthealVfxVfx { get; private set; } + + public HealResult(int healAmount, VfxBase _healVfx, VfxBase _prehealVfxVfx = null, VfxBase _posthealVfxVfx = null) + { + HealAmount = healAmount; + HealVfx = _healVfx; + PrehealVfxVfx = ((_prehealVfxVfx == null) ? NullVfx.GetInstance() : _prehealVfxVfx); + PosthealVfxVfx = ((_posthealVfxVfx == null) ? NullVfx.GetInstance() : _posthealVfxVfx); + } + } + + public class CopySkillInfo + { + public VfxBase Vfx { get; private set; } + + public bool IsEvolutionSkill { get; private set; } + + public SkillBaseCopy NewCopySkill { get; private set; } + + public List CopiedSkillList { get; private set; } + + public List AttachBuffs { get; private set; } + + public CopySkillInfo(VfxBase vfx, bool isEvolutionSkill, SkillBaseCopy copySkill, List copiedSkillList, List buffs) + { + Vfx = vfx; + IsEvolutionSkill = isEvolutionSkill; + NewCopySkill = copySkill; + CopiedSkillList = copiedSkillList; + AttachBuffs = buffs; + } + } + + private const string CONDITION_CHARGE_COUNT = "charge_count"; + + private const string TARGET_CONDITION_CHARGE_COUNT = "self.charge_count"; + + private const string ME_INPLAY_CLASS_COUNT = "{me.inplay.class.count}"; + + private BattleCardBase _finalMetamorphoseCard; + + protected BuildInfo _buildInfo; + + public List ReplayNoConsumeEpBuffInfoNameList = new List(); + + protected SkillCollectionBase _normalSkillCollection; + + protected SkillCollectionBase _evolveSkillCollection; + + private CardParameter _baseParameter; + + private CardParameter _evolveToOtherCardBaseParameter; + + public readonly IBattlePlayerReadOnlyInfo SelfBattlePlayerReadOnlyInfo; + + private bool _isOndraw; + + public const int NONE_COST = -1; + + public const int DEFAULT_SKILL_ACTIVATED_COUNT = 1; + + public const int DEFAULT_THIS_TURN_SKILL_ACTIVATED_COUNT = 0; + + private int _skillActivatedCountWrapValue = -1; + + private int _skillActivatedCount; + + private int _normalIndividualId = -1; + + private int _evolutionIndividualId = -1; + + private List _tribeCache; + + private List _lastTribeInfo = new List(); + + private int _playedCost = -1; + + private int _lastCost = -1; + + public readonly List CostModifierList; + + public List attackCountinfo; + + private static StringBuilder _extractedText = new StringBuilder(512); + + public BattleCardBase Card + { + get + { + if (MetamorphoseCard != null) + { + return MetamorphoseCard.Card; + } + return this; + } + } + + public virtual bool IsClass => false; + + public virtual bool IsUnit => false; + + public virtual bool IsSpell => false; + + public virtual bool IsField => false; + + public virtual bool IsChantField => false; + + public virtual bool IsSpecialSkill => false; + + public BattleCardBase LastDrawOpenCard { get; set; } + + public BattleCardBase MetamorphoseCard { get; set; } + + public BattleCardBase FinalMetamorphoseCard + { + get + { + if (_finalMetamorphoseCard == null && MetamorphoseCard != null) + { + _finalMetamorphoseCard = MetamorphoseCard; + } + while (_finalMetamorphoseCard != null && _finalMetamorphoseCard.MetamorphoseCard != null) + { + _finalMetamorphoseCard = _finalMetamorphoseCard.MetamorphoseCard; + } + return _finalMetamorphoseCard; + } + } + + public int MetamorphoseCount + { + get + { + int num = 0; + BattleCardBase metamorphoseCard = MetamorphoseCard; + while (metamorphoseCard != null) + { + metamorphoseCard = metamorphoseCard.MetamorphoseCard; + num++; + } + return num; + } + } + + public BattleCardBase ReplayBuffInfoCard { get; set; } + + public int PlayedTurn { get; protected set; } + + public DeathTypeInformation DeathTypeInfo { get; protected set; } + + public BuildInfo GetBuildInfo => _buildInfo; + + public int UpdateBuildInfoBeforeCardId { get; private set; } = -1; + + public string UpdateBuildInfoBeforeCardName { get; private set; } = string.Empty; + + public bool IsChoiceEvolutionCardBeforeUpdateBuildInfo => UpdateBuildInfoBeforeCardId / 1000000 == 910; + + public List NormalSkillBuildInfos => _buildInfo.NormalSkillBuildInfos; + + public List EvolveSkillBuildInfos => _buildInfo.EvolveSkillBuildInfos; + + public IEnumerable GetCopiedCardList + { + get + { + List list = new List(); + list.AddRange(NormalSkillBuildInfos); + list.AddRange(EvolveSkillBuildInfos); + return (from b in list + where b._previousSkillOwner != null + select b._previousSkillOwner).Distinct(); + } + } + + public List BuffInfoList { get; private set; } + + public List ReplayBuffInfoList { get; set; } = new List(); + + public List ReplayAllCopyBuffInfoList { get; set; } = new List(); + + public List ReplayBuffInfoLabelList { get; set; } = new List(); + + protected CardInnerOptionsBase InnerOptions => _buildInfo.InnerOptions; + + public IBattleResourceMgr ResourceMgr => _buildInfo.ResourceMgr; + + public IBattleCardView BattleCardView { get; protected set; } + + public virtual int Index => _buildInfo.BattleCardIndex; + + public BattlePlayerBase SelfBattlePlayer { get; protected set; } + + public BattlePlayerBase OpponentBattlePlayer { get; protected set; } + + public CardParameter BaseParameter + { + get + { + if (_evolveToOtherCardBaseParameter != null) + { + return _evolveToOtherCardBaseParameter; + } + return _baseParameter; + } + private set + { + _baseParameter = value; + } + } + + public SkillCollectionBase Skills { get; protected set; } + + public SkillCollectionBase NormalSkills => _normalSkillCollection; + + public SkillCollectionBase EvolutionSkills => _evolveSkillCollection; + + public TransformInformation TransformInfo { get; set; } + + public ISkillApplyInformation SkillApplyInformation { get; protected set; } + + public bool HasAnySkill { get; private set; } + + public bool IsTokenLoad { get; set; } + + public bool IsPlayer { get; private set; } + + public bool IsFirstTurn { get; protected set; } + + public bool IsOnMove { get; private set; } + + public bool IsSelfTurn => SelfBattlePlayer.IsSelfTurn; + + public virtual bool IsOnDraw + { + get + { + return _isOndraw; + } + private set + { + _isOndraw = value; + if (value) + { + OnStartDraw.Call(); + } + } + } + + public Action OnStartDraw { get; set; } + + public virtual bool IsActionCard => false; + + public virtual bool IsEvolution => false; + + public virtual bool IsEvolvedOnWhenLeave => false; + + public bool IsEvolDrunkenness + { + get + { + if (IsFirstTurn && IsSummonDrunkenness) + { + return !SkillApplyInformation.IsQuick; + } + return false; + } + } + + public virtual bool IsCantAttackClass + { + get + { + if (!GameMgr.GetIns().IsNewReplayBattle) + { + if (!SelfBattlePlayer.Class.IsCantAttackClass && !SkillApplyInformation.IsSkillCantAtkClass && !IsEvolDrunkenness) + { + if (IsFirstTurn && SkillApplyInformation.IsRush) + { + return !SkillApplyInformation.IsQuick; + } + return false; + } + return true; + } + return IsCantAttackClassOnReplay; + } + } + + public bool IsCantAttackClassOnReplay { get; set; } + + public bool IsCantAttackClassOnlyEvolDrunkenness + { + get + { + if (!SelfBattlePlayer.Class.IsCantAttackClass && !SkillApplyInformation.IsSkillCantAtkClass && IsEvolDrunkenness) + { + if (IsFirstTurn && SkillApplyInformation.IsRush) + { + return SkillApplyInformation.IsQuick; + } + return true; + } + return false; + } + } + + public bool IsSummonDrunkenness { get; set; } + + public bool IsPreviousTurnAttacked { get; set; } + + public bool IsSelectedDuringSelectingBurialRiteTarget { get; set; } + + public bool IsCantAttack + { + get + { + if (IsCantAttackClass) + { + return SkillApplyInformation.IsSkillCantAtkUnit; + } + return false; + } + } + + public List ReplaySkillDescriptionValueList { get; set; } = new List(); + + public List ReplayEvoSkillDescriptionValueList { get; set; } = new List(); + + public List ReplayBuffDetailSkillDescriptionValueList { get; set; } = new List(); + + public List ReplayBuffDetailEvoSkillDescriptionValueList { get; set; } = new List(); + + public virtual bool IsCantActivateFanfare => false; + + public int SpellChargeCount { get; protected set; } + + public int ChantCount => SkillApplyInformation.GetChantCount(BaseParameter.ChantCount); + + public int ExecutedFixedUseCostIndex { get; set; } + + public bool IsExecutedEarthRite { get; set; } + + public bool IsSkillLost { get; set; } + + public bool IsReanimate { get; set; } + + public ItWasDamagedCounter DamagedCounter { get; private set; } + + public bool HasSkillActivatedCountWrapValue => _skillActivatedCountWrapValue != -1; + + public int SkillActivatedCount + { + get + { + if (_skillActivatedCountWrapValue == -1) + { + return _skillActivatedCount; + } + int num; + for (num = _skillActivatedCount; num > _skillActivatedCountWrapValue; num -= _skillActivatedCountWrapValue) + { + } + return num; + } + protected set + { + _skillActivatedCount = value; + } + } + + public int ThisTurnSkillActivatedCount { get; protected set; } + + public int NormalIndividualId + { + get + { + if (_normalIndividualId == -1) + { + return _normalSkillCollection.GetIndividualId(); + } + return _normalIndividualId; + } + set + { + _normalIndividualId = value; + } + } + + public int EvolutionIndividualId + { + get + { + if (_evolutionIndividualId == -1) + { + return _evolveSkillCollection.GetIndividualId(); + } + return _evolutionIndividualId; + } + set + { + _evolutionIndividualId = value; + } + } + + public List SkillActivationList { get; set; } + + public bool AlreadyInactiveSkillActivateCountBySimultaneousDestroyedCardList { get; private set; } + + public bool ActiveSkillActivateCountBySimultaneousDestroyedCardList { get; set; } + + public bool AlreadyInactiveSkillActivateCountBySimultaneousBuffingCards { get; private set; } + + public bool ActiveSkillActivateCountBySimultaneousBuffingCards { get; set; } + + public bool AlreadyInactiveSkillActivateCountBySimultaneousSummonedCard { get; private set; } + + public bool ActiveSkillActivateCountBySimultaneousSummonedCard { get; set; } + + public bool HasSpellCharge + { + get + { + if (IsClass) + { + return false; + } + if (Skills.Any((SkillBase s) => s.OnWhenSpellChargeStart != 0)) + { + return true; + } + if (Skills.Any((SkillBase s) => Regex.IsMatch(s.CallCountText, "CHARGE_COUNT"))) + { + return true; + } + if (Skills.Any((SkillBase s) => s.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter t) => t.Lhs.Contains("charge_count")))) + { + return true; + } + if (BaseParameter.SkillTarget.Contains("self.charge_count")) + { + return true; + } + string oddChargeCountText = SkillFilterCreator.ContentKeyword.odd_charge_count.ToStringCustom(); + string evenChargeCountText = SkillFilterCreator.ContentKeyword.even_charge_count.ToStringCustom(); + return Skills.Any((SkillBase s) => s.IsRefVariable("CHARGE_COUNT") || s.IsRefVariable(oddChargeCountText) || s.IsRefVariable(evenChargeCountText)); + } + } + + public bool IsFusionable + { + get + { + SkillBase skillBase = Skills.FirstOrDefault((SkillBase s) => s is Skill_fusion); + if (skillBase == null) + { + return false; + } + if (IsAlreadyFusionInThisTurn) + { + return false; + } + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + if (skillBase.GetSelectableCards(playerInfoPair, option).Count() == 0) + { + return false; + } + if (!skillBase.CheckCondition(playerInfoPair, option, isPrePlay: true)) + { + return false; + } + return true; + } + } + + public bool IsAlreadyFusionInThisTurn => SkillApplyInformation.FusionIngredients.Any((FusionIngredientInfo c) => c.FusionTurn == SelfBattlePlayer.Turn); + + public List FusionIngredients => SkillApplyInformation.FusionIngredients.Select((FusionIngredientInfo f) => f.Card).ToList(); + + public int FusionedTurn { get; protected set; } + + public List GetOnCards => SkillApplyInformation.GetOnCards.ToList(); + + public bool IsChoiceEvolutionCard => CardId / 1000000 == 910; + + public List GetOffCards { get; set; } + + public bool CanPlayAsChoiceBraveCard + { + get + { + if (CardMaster.IsChoiceBraveCardCheck(CardId) && Cost <= SelfBattlePlayer.Bp) + { + if (Skills.Any((SkillBase s) => s.IsUserSelectType)) + { + return Skills.CheckWhenPlaySelectTargetSkillCondition; + } + return true; + } + return false; + } + } + + public virtual CHECK_CONDITION_MUTATIONSKILL_TYPE IsCheckActiveMutationSkill + { + get + { + using (IEnumerator enumerator = Skills.GetEnumerator()) + { + if (enumerator.MoveNext()) + { + if (!(enumerator.Current is Skill_pp_fixeduse skill_pp_fixeduse)) + { + return CHECK_CONDITION_MUTATIONSKILL_TYPE.NOT_HAVE_MUTATION_SKILL; + } + if (skill_pp_fixeduse.IsMutationFixedUseCost) + { + Skill_transform accelerateOrCrystallizeTransformSkill = GetAccelerateOrCrystallizeTransformSkill(); + if (accelerateOrCrystallizeTransformSkill != null) + { + BattleCardBase battleCardBase = SelfBattlePlayer.BattleMgr.CreateTransformCardRegisterVfx(this, accelerateOrCrystallizeTransformSkill.TransformId, accelerateOrCrystallizeTransformSkill.SkillPrm.ownerCard.IsPlayer); + if (battleCardBase.Skills.Any((SkillBase t) => t.IsUserSelectType)) + { + IEnumerable selectTypeSkill = battleCardBase.GetSelectTypeSkill(); + if (selectTypeSkill != null && selectTypeSkill.Count() > 0 && (battleCardBase.BaseParameter.CharType != CardBasePrm.CharaType.SPELL || (battleCardBase as SpellBattleCard).IsSelectableSkillTarget())) + { + return (battleCardBase.BaseParameter.CharType == CardBasePrm.CharaType.SPELL) ? CHECK_CONDITION_MUTATIONSKILL_TYPE.PLAY : CHECK_CONDITION_MUTATIONSKILL_TYPE.CRYSTALLIZE_SKILL_ACTIVE; + } + return (battleCardBase.BaseParameter.CharType == CardBasePrm.CharaType.SPELL) ? CHECK_CONDITION_MUTATIONSKILL_TYPE.SELECT_ACCELERATE_SKILL_NOT_ACTIVE : CHECK_CONDITION_MUTATIONSKILL_TYPE.SELECT_CRYSTALLIZE_SKILL_NOT_ACTIVE; + } + return (battleCardBase.BaseParameter.CharType == CardBasePrm.CharaType.SPELL) ? CHECK_CONDITION_MUTATIONSKILL_TYPE.PLAY : CHECK_CONDITION_MUTATIONSKILL_TYPE.CRYSTALLIZE_SKILL_ACTIVE; + } + } + return CHECK_CONDITION_MUTATIONSKILL_TYPE.NOT_PLAY; + } + } + return CHECK_CONDITION_MUTATIONSKILL_TYPE.NONE; + } + } + + public virtual bool BaseMovable => Movable(); + + public virtual bool IsInHand => SelfBattlePlayer.HandCardList.Contains(this); + + public virtual bool IsInDeck => SelfBattlePlayer.DeckCardList.Contains(this); + + public virtual bool IsInplay => SelfBattlePlayer.ClassAndInPlayCardList.Contains(this); + + public virtual bool IsInCemetery => SelfBattlePlayer.CemeteryList.Contains(this); + + public virtual bool IsInNecromanceZone => SelfBattlePlayer.NecromanceZoneList.Contains(this); + + public virtual bool IsFusionIngredient => SelfBattlePlayer.FusionIngredientList.Contains(this); + + public bool IsDestroyedByKiller { get; protected set; } + + public bool IsDestroyedBySkill { get; protected set; } + + public virtual bool IsDead + { + get + { + if (!IsLifeZeroDead && !IsDestroyedByKiller) + { + return IsDestroyedBySkill; + } + return true; + } + } + + public virtual bool IsLifeZeroDead => Life <= 0; + + public int DestroyedTurn { get; private set; } + + public bool IsDestroySelfTurn { get; private set; } + + public List DestroyedBySkillList { get; private set; } + + public BanishInfo BanishedInfo { get; private set; } + + public SkillBase DiscardedSkill { get; private set; } + + public SkillBase ReturnedSkill { get; private set; } + + public bool HasDeckSelfSkill => Skills.Any((SkillBase s) => s.IsDeckSelfSkill); + + public int AttackableCount { get; set; } + + public virtual bool Attackable + { + get + { + if (!GameMgr.GetIns().IsNewReplayBattle) + { + if (AttackableCount <= 0 || (IsSummonDrunkenness && (!IsSummonDrunkenness || !IsEvolution)) || IsCantAttack) + { + if (SkillApplyInformation.IsInfiniteAttack && !IsSummonDrunkenness) + { + return !IsCantAttack; + } + return false; + } + return true; + } + return AttackableOnReplay; + } + } + + public bool AttackableOnReplay { get; set; } + + public virtual List Tribe + { + get + { + if (SkillApplyInformation == null || SkillApplyInformation.TribeSkinInfo.Count == 0) + { + return BaseParameter.Tribe; + } + if (_tribeCache != null && _lastTribeInfo != null && _lastTribeInfo.SequenceEqual(SkillApplyInformation.TribeSkinInfo)) + { + return _tribeCache; + } + List list = new List(BaseParameter.Tribe); + for (int i = 0; i < SkillApplyInformation.TribeSkinInfo.Count(); i++) + { + if (SkillApplyInformation.TribeSkinInfo[i].TribeTypeList != null) + { + switch (SkillApplyInformation.TribeSkinInfo[i].ChangeType) + { + case CardBasePrm.TribeChangeType.CHANGE: + list = SkillApplyInformation.TribeSkinInfo[i].TribeTypeList; + break; + case CardBasePrm.TribeChangeType.ADD: + list.AddRange(SkillApplyInformation.TribeSkinInfo[i].TribeTypeList); + break; + default: + list = SkillApplyInformation.TribeSkinInfo[i].TribeTypeList; + break; + } + } + } + _tribeCache = list.Distinct().ToList(); + if (_tribeCache.Count >= 2 && _tribeCache.Contains(CardBasePrm.TribeType.ALL)) + { + _tribeCache.Remove(CardBasePrm.TribeType.ALL); + } + _lastTribeInfo.Clear(); + _lastTribeInfo.AddRange(SkillApplyInformation.TribeSkinInfo); + return _tribeCache; + } + } + + public virtual CardBasePrm.ClanType Clan + { + get + { + if (SkillApplyInformation.ClanSkinInfo.Count <= 0) + { + return BaseParameter.Clan; + } + return SkillApplyInformation.ClanSkinInfo.Last(); + } + } + + public int CardId => _buildInfo.CardId; + + public int EquitedCardId + { + get + { + if (IsChoiceEvolutionCard) + { + return BaseParameter.BaseCardId; + } + DataMgr.SpecialBattleSetting specialBattleSettingInfo = GameMgr.GetIns().GetDataMgr().SpecialBattleSettingInfo; + if (specialBattleSettingInfo == null) + { + return CardId; + } + Dictionary idOverridePairDict = specialBattleSettingInfo.IdOverridePairDict; + if (idOverridePairDict == null) + { + return CardId; + } + if (idOverridePairDict.ContainsKey(CardId)) + { + return idOverridePairDict[CardId]; + } + return CardId; + } + } + + public int Cost + { + get + { + int num = BaseParameter.Cost; + if (IsChoiceBraveSkillCard) + { + return num; + } + for (int i = 0; i < CostModifierList.Count; i++) + { + ICardCostModifier cardCostModifier = CostModifierList[i]; + if (!(cardCostModifier is CostHalfModifier)) + { + num = cardCostModifier.CalcCost(num); + } + } + for (int j = 0; j < CostModifierList.Count; j++) + { + ICardCostModifier cardCostModifier2 = CostModifierList[j]; + if (cardCostModifier2 is CostHalfModifier) + { + num = cardCostModifier2.CalcCost(num); + } + } + return Math.Max(0, num); + } + } + + public int BaseCost => BaseParameter.Cost; + + public int Atk => SkillApplyInformation.GetAtk(); + + public int BaseAtk + { + get + { + if (!IsEvolution) + { + return BaseParameter.Atk; + } + return BaseParameter.EvoAtk; + } + } + + public int Life => SkillApplyInformation.GetLife(); + + public int MaxLife => SkillApplyInformation.GetMaxLife(); + + public int[] GenericValueArray => SkillApplyInformation.SkillGenericValueArray; + + public virtual int BaseMaxLife + { + get + { + if (!IsEvolution) + { + return BaseParameter.Life; + } + return BaseParameter.EvoLife; + } + } + + public int PlayedCost => _playedCost; + + public int LastCost => _lastCost; + + public int MaxAttackableCount + { + get + { + int num = 1; + for (int i = 0; i < attackCountinfo.Count; i++) + { + num = attackCountinfo[i].CalcAttackCount(num); + } + return num; + } + } + + public DamageParam DamageCalculationAtkTypeAttack => new DamageParam(SkillApplyInformation.IsAttackByLifeTypeAttack ? Life : Atk, this, SkillFilterCreator.ContentKeyword.unit.ToString(), Clan); + + public DamageParam DamageCalculationAtkTypeBeAttacked => new DamageParam(SkillApplyInformation.IsAttackByLifeTypeBeAttacked ? Life : Atk, this, SkillFilterCreator.ContentKeyword.unit.ToString(), Clan); + + public ICardVfxCreator VfxCreator { get; protected set; } + + public bool AreCanPlayConditionsFulfilled => this.OnCheckCanPlay.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanAttackConditionsFulfilled => this.OnCheckCanAttack.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanBeAttackedConditionsFulfilled => this.OnCheckCanBeAttacked.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanBeSelectedConditionsFulfilled => this.OnCheckCanBeSelected.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanShowDetailConditionsFulfilled => this.OnCheckCanShowDetail.GetAllFuncCallResults().All((bool condition) => condition); + + public bool AreCanEvolveConditionsFulfilled => this.OnCheckCanEvolve.GetAllFuncCallResults().All((bool condition) => condition); + + public int FixedUseCost => CalcFixedUseCost(SelfBattlePlayer.Pp); + + public List UseCostList + { + get + { + List list = new List(); + List list2 = new List(); + int pp = SelfBattlePlayer.Pp; + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse skill_pp_fixeduse) + { + if (skill_pp_fixeduse.IsAccelerateOrCrystallize) + { + list2.Add(skill_pp_fixeduse._fixedUsePP); + } + else + { + list.Add(skill_pp_fixeduse._fixedUsePP); + } + } + } + List list3 = new List(); + if (!list.Any() && !list2.Any()) + { + return list3; + } + if (IsSelectedDuringSelectingBurialRiteTarget) + { + return list3; + } + if (!IsCantActivateFanfare) + { + list3.AddRange(list.Where((int c) => c <= pp).Reverse()); + } + if ((!list.Any((int c) => c <= Cost) || IsCantActivateFanfare) && Cost <= pp) + { + list3.Add(Cost); + } + list3.AddRange(list2.Where((int c) => pp >= c && c < Cost).Reverse()); + list3.AddRange(list2.Where((int c) => pp < c && c < Cost)); + if (!list.Any((int c) => c <= Cost) && pp < Cost) + { + list3.Add(Cost); + } + if (!IsCantActivateFanfare) + { + list3.AddRange(list.Where((int c) => pp < c)); + } + list3.AddRange(list2.Where((int c) => Cost <= c)); + if (list.Any((int c) => c <= Cost)) + { + list3.Add(Cost); + } + if (IsCantActivateFanfare) + { + list3.AddRange(list); + } + return list3; + } + } + + public bool HasSkillFixedUseCost => FixedUseCost != -1; + + public bool HasSkillAccelerate => Skills.Any((SkillBase s) => s.OnWhenAccelerate != 0); + + public bool HasSkillCrystallize => Skills.Any((SkillBase s) => s.OnWhenCrystallize != 0); + + public bool HasSkillEnhance => Skills.Any((SkillBase s) => s.IsEnhance()); + + public bool HasSkillDestroyWhiteRitual => HasSkillDestroyTribe(CardBasePrm.TribeType.WHITE_RITUAL); + + public bool HasSkillStackWhiteRitual => Skills.Any((SkillBase s) => s is Skill_stack_white_ritual); + + public bool HasSkillBurialRite + { + get + { + if (!NormalSkills.Any((SkillBase s) => s.IsBurialRite)) + { + return EvolutionSkills.Any((SkillBase s) => s.IsBurialRite); + } + return true; + } + } + + public bool HasSkillNecromance { get; private set; } + + public bool HasSkillWhenDestroy + { + get + { + if (IsInDeck) + { + if (!NormalSkills.Any((SkillBase s) => s.IsWhenDestroySkill)) + { + return EvolutionSkills.Any((SkillBase s) => s.IsWhenDestroySkill); + } + return true; + } + return Skills.Any((SkillBase s) => s.IsWhenDestroySkill); + } + } + + public bool HasSkillReanimate + { + get + { + if (!NormalSkills.Any((SkillBase s) => s is Skill_summon_token && (s as Skill_summon_token).IsReanimate)) + { + return EvolutionSkills.Any((SkillBase s) => s is Skill_summon_token && (s as Skill_summon_token).IsReanimate); + } + return true; + } + } + + public bool HasSkillFusion => NormalSkills.Any((SkillBase s) => s is Skill_fusion); + + public bool HasWhenAttack => Skills.Any((SkillBase s) => s.IsBeforAttackSkill); + + public bool HasWhenFight => Skills.Any((SkillBase s) => s.IsWhenFightSkill); + + public bool HasFusionSkill => Skills.Any((SkillBase s) => s is Skill_fusion); + + public bool HasNoSelectFusionSkill => Skills.Any((SkillBase s) => s.IsNoSelectFusionSkill); + + public bool IsChoiceBraveSkillCard { get; set; } + + public bool HasSkillWhenEvolve => EvolutionSkills.Any((SkillBase s) => s.IsWhenEvolveSkill); + + public bool HasUnionBurst + { + get + { + string unionBurstString = SkillFilterCreator.ContentKeyword.union_burst_count.ToString(); + if (Skills.Any((SkillBase s) => s.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter t) => t.Lhs.Contains(unionBurstString)))) + { + return true; + } + return false; + } + } + + public bool HasSkyboundArt + { + get + { + string skyboundArtString = SkillFilterCreator.ContentKeyword.skybound_art_count.ToString(); + return Skills.Any((SkillBase s) => s.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter t) => t.Lhs.Contains(skyboundArtString))); + } + } + + public bool HasSuperSkyboundArt + { + get + { + string superSkyboundArtString = SkillFilterCreator.ContentKeyword.super_skybound_art_count.ToString(); + return Skills.Any((SkillBase s) => s.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter t) => t.Lhs.Contains(superSkyboundArtString))); + } + } + + public bool IsLegend => BaseParameter.Rarity >= 4; + + public int DrawTurn { get; set; } + + public bool IsHaveBurialRiteJudgeBothFlag + { + get + { + bool flag = false; + bool flag2 = false; + foreach (SkillBase skill in Skills) + { + List list = skill.ConditionFilterCollection.ConditionCheckerFilterList.FindAll((ISkillConditionChecker x) => x is SkillConditionBurialRite).ConvertAll((ISkillConditionChecker x) => x as SkillConditionBurialRite); + if (list == null) + { + continue; + } + if (!flag) + { + flag = list.Find((SkillConditionBurialRite x) => x.judgeFlg) != null; + } + if (!flag2) + { + flag2 = list.Find((SkillConditionBurialRite x) => !x.judgeFlg) != null; + } + } + return flag && flag2; + } + } + + public bool IsBuffDetail + { + get + { + if (IsShowBuffDetail || IsRecordingBuffDetail) + { + return !IsRecordingExceptBuffDetail; + } + return false; + } + } + + public bool IsShowBuffDetail { get; set; } + + public bool IsRecordingBuffDetail { get; set; } + + public bool IsRecordingExceptBuffDetail { get; set; } + + public bool IsRecordingFusionInfo { get; set; } + + public event Func OnRemoveFromInPlayAfterOneTime; + + public event Func OnBeforeEvolve; + + public event Action OnEvolveEvent; + + public event Func OnPlay; + + public event Func OnFinishWhenPlaySkill; + + public event Func OnDestroy; + + public event Func OnBanish; + + public event Func OnReturnCard; + + public event Func OnMetamorphose; + + public event Func OnGetOn; + + public event Action OnAddCostState; + + public event Action OnRemoveCostState; + + public event Func OnAfterAddDamage; + + public event Action OnAttachSkill; + + public event Action OnCopySkillComplete; + + public event Func OnLoseSkillOneTime; + + public event Func OnDamageAfter; + + public event Func OnGiveDamage; + + public event Func OnReflectionAfter; + + public event Action OnResetCardParameter; + + public event Action> OnFusionEvent; + + public event Action OnTurnStart; + + public event Func OnCheckCanPlay; + + public event Func OnCheckCanAttack; + + public event Func OnCheckCanBeAttacked; + + public event Func OnCheckCanBeSelected; + + public event Func OnCheckCanShowDetail; + + public event Func OnCheckCanEvolve; + + public void SetPlayedTurnNow() + { + PlayedTurn = SelfBattlePlayer.Turn; + } + + private void ResetUpdateBuildInfo() + { + UpdateBuildInfoBeforeCardId = -1; + UpdateBuildInfoBeforeCardName = string.Empty; + } + + public void UpdateBuildInfoAndSkillCollection(int cardId, bool isFoil, bool isNotUpdateAtkLife = false) + { + UpdateBuildInfoBeforeCardId = BaseParameter.NormalCardId; + UpdateBuildInfoBeforeCardName = BaseParameter.CardName; + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId)); + _buildInfo = new BuildInfo(_buildInfo.GameObject, isFoil ? (cardId + 1) : cardId, _buildInfo.SelfBattlePlayer, _buildInfo.OpponentBattlePlayer, _buildInfo.SelfBattlePlayer, cardSkillsBuildInfo.normalSkillBuildInfos, cardSkillsBuildInfo.evolveSkillBuildInfos, _buildInfo.IsPlayer, _buildInfo.BattleCardIndex, _buildInfo.InnerOptions, _buildInfo.BattleMgr, _buildInfo.ResourceMgr); + int evoAtk = BaseParameter.EvoAtk; + int evoLife = BaseParameter.EvoLife; + _evolveToOtherCardBaseParameter = CardMaster.GetInstanceForBattle().GetCardParameterFromId(_buildInfo.CardId).Clone(); + InitSkillCollection(); + if (isNotUpdateAtkLife) + { + _evolveToOtherCardBaseParameter.UpdateEvoAtkLife(evoAtk, evoLife); + } + } + + public void ResetChoiceEvolutionCardBuildInfo() + { + UpdateBuildInfoAndSkillCollection(BaseParameter.BaseCardId, BaseParameter.IsFoil); + if (!SelfBattlePlayer.BattleMgr.IsRecovery || IsPlayer) + { + BattleCardView.CardTemplate.NormalNameLabelTemp.text = BaseParameter.CardName; + Global.SetRepositionNameLabel(BattleCardView.CardTemplate.NormalNameLabelTemp, BaseParameter.CardName, is2D: false); + BattleCardView.InitializeVoiceInfo(CardId); + for (int i = 0; i < NormalSkills.Count(); i++) + { + NormalSkills.ElementAt(i).SetInductionVoiceIndex(); + } + for (int j = 0; j < EvolutionSkills.Count(); j++) + { + EvolutionSkills.ElementAt(j).SetInductionVoiceIndex(); + } + } + } + + public void UpdateChoiceEvolutionBeforeCard(int cardId, string cardName) + { + UpdateBuildInfoBeforeCardId = cardId; + UpdateBuildInfoBeforeCardName = cardName; + } + + public void ResetReplayBuffInfo() + { + ReplayBuffInfoList.Clear(); + ReplayNoConsumeEpBuffInfoNameList.Clear(); + ReplayBuffInfoLabelList.Clear(); + } + + public virtual string SkillDescription(BattlePlayerBase.SideLogInfo sideLogInfo = null, bool isSkipOption = false, BuffInfo buff = null, string divergenceId = "", List skillDescriptionValueList = null, List sideLogDescriptionValueList = null) + { + return ConvertSkillDescription(BaseParameter.SkillDescription, sideLogInfo, isSkipOption, buff, divergenceId, skillDescriptionValueList, (IsBuffDetail && sideLogInfo == null && ReplayBuffDetailSkillDescriptionValueList.Count > 0) ? ReplayBuffDetailSkillDescriptionValueList : ((sideLogDescriptionValueList != null) ? sideLogDescriptionValueList : ReplaySkillDescriptionValueList)); + } + + public virtual string EvoSkillDescription(BattlePlayerBase.SideLogInfo sideLogInfo = null, bool isSkipOption = false, BuffInfo buff = null, string divergenceId = "", List skillDescriptionValueList = null, List sideLogDescriptionValueList = null) + { + return ConvertSkillDescription(BaseParameter.EvoSkillDescription, sideLogInfo, isSkipOption, buff, divergenceId, skillDescriptionValueList, (IsBuffDetail && sideLogInfo == null && ReplayBuffDetailEvoSkillDescriptionValueList.Count > 0) ? ReplayBuffDetailEvoSkillDescriptionValueList : ((sideLogDescriptionValueList != null) ? sideLogDescriptionValueList : ReplayEvoSkillDescriptionValueList)); + } + + public string CopiedSkillDescription(string skillDescription, List skillDescriptionValueList) + { + return ConvertSkillDescription(skillDescription, null, isSkipOption: false, null, "", skillDescriptionValueList, null); + } + + public string CopiedEvoSkillDescription(string skillDescription, List skillDescriptionValueList) + { + return ConvertSkillDescription(skillDescription, null, isSkipOption: false, null, "", skillDescriptionValueList, null); + } + + public string CopiedSkillDescriptionInReplay(BuffInfo buff, List copiedSkillDescriptionValueList) + { + return ConvertSkillDescription(BaseParameter.SkillDescription, null, isSkipOption: false, buff, "", null, copiedSkillDescriptionValueList); + } + + public string CopiedEvoSkillDescriptionInReplay(BuffInfo buff, List copiedEvoSkillDescriptionValueList) + { + return ConvertSkillDescription(BaseParameter.EvoSkillDescription, null, isSkipOption: false, buff, "", null, copiedEvoSkillDescriptionValueList); + } + + public virtual bool CantBeFocusedAttack(BattleCardBase attackCard) + { + if (SkillApplyInformation.IsSneak) + { + return true; + } + if (SkillApplyInformation.NotBeAttackedInfoList.Any((NotBeAttackedInfo s) => !s.CheckAttacked(attackCard))) + { + return true; + } + return false; + } + + public bool CanEvolution(bool isSkill, bool isSelfBattlePlayer) + { + BattlePlayerBase battlePlayerBase = (isSelfBattlePlayer ? SelfBattlePlayer : OpponentBattlePlayer); + if (isSkill) + { + if (!IsEvolution) + { + return true; + } + } + else if (battlePlayerBase.EvolveWaitTurnCount <= 0 && battlePlayerBase.NowTurnEvol && (battlePlayerBase.CurrentEpCount - SkillApplyInformation.GetEp() >= 0 || battlePlayerBase.CheckNotConsumeEpCard(this)) && !IsEvolution && !SkillApplyInformation.CantEvolutionList.Any((int f) => (f & Skill_cant_evolution.BIT_FLAG_EPUSE) != 0)) + { + return true; + } + return false; + } + + public void IncrementSkillActivatedCount() + { + SkillActivatedCount++; + ThisTurnSkillActivatedCount++; + } + + public void SetSkillActivatedCount(int value) + { + SkillActivatedCount = value; + } + + public void SetSkillActivatedCountWrapValue(int value) + { + _skillActivatedCountWrapValue = value; + } + + public void ResetSkillActivateCountBySimultaneousDestroyedCardList() + { + ActiveSkillActivateCountBySimultaneousDestroyedCardList = false; + AlreadyInactiveSkillActivateCountBySimultaneousDestroyedCardList = false; + } + + public void InactiveSkillActivateCountBySimultaneousDestroyedCardList() + { + ActiveSkillActivateCountBySimultaneousDestroyedCardList = false; + AlreadyInactiveSkillActivateCountBySimultaneousDestroyedCardList = true; + } + + public void ResetSkillActivateCountBySimultaneousBuffingCards() + { + ActiveSkillActivateCountBySimultaneousBuffingCards = false; + AlreadyInactiveSkillActivateCountBySimultaneousBuffingCards = false; + } + + public void InactiveSkillActivateCountBySimultaneousBuffingCards() + { + ActiveSkillActivateCountBySimultaneousBuffingCards = false; + AlreadyInactiveSkillActivateCountBySimultaneousBuffingCards = true; + } + + public void ResetSkillActivateCountBySimultaneousSummonedCard() + { + ActiveSkillActivateCountBySimultaneousSummonedCard = false; + AlreadyInactiveSkillActivateCountBySimultaneousSummonedCard = false; + } + + public void InactiveSkillActivateCountBySimultaneousSummonedCard() + { + ActiveSkillActivateCountBySimultaneousSummonedCard = false; + AlreadyInactiveSkillActivateCountBySimultaneousSummonedCard = true; + } + + protected virtual bool GetIsMovableOnView() + { + if (IsOnDraw) + { + return false; + } + return Movable(isCheckOnDraw: false); + } + + public virtual bool Movable(bool isCheckOnDraw = true, bool isSkipSelecting = false, CHECK_CONDITION_MUTATIONSKILL_TYPE type = CHECK_CONDITION_MUTATIONSKILL_TYPE.NONE, bool isRecording = false) + { + if (SelfBattlePlayer.Class.SkillApplyInformation.IsCantPlay(this, type)) + { + return false; + } + if (!SelfBattlePlayer.HandCardList.Contains(this)) + { + return false; + } + if (SelfBattlePlayer.Pp < Cost && FixedUseCost == -1) + { + return false; + } + if (!IsSelfTurn) + { + return false; + } + if (SelfBattlePlayer.Class.IsDead || OpponentBattlePlayer.Class.IsDead) + { + return false; + } + if (!InnerOptions.CheckMovable(SelfBattlePlayer.BattleView, BattleCardView, isCheckOnDraw && IsOnDraw, isSkipSelecting, isRecording)) + { + return false; + } + if (!SelfBattlePlayer.IsPlayer && GameMgr.GetIns().IsAdminWatch) + { + if (isCheckOnDraw && IsOnDraw) + { + return false; + } + if (BattleCardView._hasCardEnteredPlayQueue) + { + return false; + } + if (SelfBattlePlayer.BattleView.IsSelecting && !isSkipSelecting) + { + return false; + } + } + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption checkerOption = new SkillConditionCheckerOption(); + if (Skills.Any((SkillBase s) => s is Skill_can_play_self && !s.CheckCondition(playerInfoPair, checkerOption, isPrePlay: true))) + { + return false; + } + return true; + } + + public Skill_transform GetAccelerateOrCrystallizeTransformSkill() + { + BattlePlayerReadOnlyInfoPair pair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse { IsAccelerateOrCrystallize: false } skill_pp_fixeduse && !IsCantActivateFanfare && skill_pp_fixeduse.CheckCondition(pair, option, isPrePlay: true)) + { + return null; + } + } + return (Skill_transform)Skills.LastOrDefault((SkillBase s) => (s.OnWhenAccelerate != 0 || s.OnWhenCrystallize != 0) && s is Skill_transform && s.CheckCondition(pair, option, isPrePlay: true)); + } + + public bool IsMutationMovable(CHECK_CONDITION_MUTATIONSKILL_TYPE type) + { + if (type == CHECK_CONDITION_MUTATIONSKILL_TYPE.SELECT_ACCELERATE_SKILL_NOT_ACTIVE) + { + return false; + } + if (SelfBattlePlayer.InPlayCards.Count() >= 5) + { + switch (type) + { + case CHECK_CONDITION_MUTATIONSKILL_TYPE.CRYSTALLIZE_SKILL_ACTIVE: + case CHECK_CONDITION_MUTATIONSKILL_TYPE.SELECT_CRYSTALLIZE_SKILL_NOT_ACTIVE: + return false; + default: + return false; + case CHECK_CONDITION_MUTATIONSKILL_TYPE.NONE: + case CHECK_CONDITION_MUTATIONSKILL_TYPE.PLAY: + break; + } + } + return true; + } + + public void SetDestroyedBySkillList(SkillBase skill) + { + DestroyedBySkillList = new List(); + if (skill == null) + { + return; + } + bool isDestroyedBySelf = skill.SkillPrm.ownerCard.SelfBattlePlayer.IsPlayer == SelfBattlePlayer.IsPlayer; + if (skill.IsWhenPlaySkill) + { + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.WhenPlay, skill.SkillPrm.ownerCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + TransformInformation transformInfo = skill.SkillPrm.ownerCard.TransformInfo; + switch (transformInfo.Type) + { + case TransformType.Accelerate: + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.Accelerate, transformInfo.OriginalCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + break; + case TransformType.Crystallize: + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.Crystallize, transformInfo.OriginalCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + break; + } + } + else if (skill.IsWhenDestroySkill) + { + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.WhenDestroy, skill.SkillPrm.ownerCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + } + else + { + DestroyedBySkillList.Add(new DestroyedBySkillInfo(DestroyedBySkillInfo.DestroyedBySkillAbility.None, skill.SkillPrm.ownerCard.BaseParameter.BaseCardId, isDestroyedBySelf)); + } + } + + public void SetBanishedInfo(BanishInfo.BanishPlace place) + { + BattlePlayerBase battlePlayerBase = (SelfBattlePlayer.IsSelfTurn ? SelfBattlePlayer : OpponentBattlePlayer); + BanishedInfo = new BanishInfo(battlePlayerBase.Turn, battlePlayerBase.IsPlayer, place); + } + + public void SetDiscardedSkill(SkillBase discardedSkill) + { + DiscardedSkill = discardedSkill; + } + + public void SetReturnedSkill(SkillBase returnedSkill) + { + ReturnedSkill = returnedSkill; + } + + public bool IsTribe(CardBasePrm.TribeType tribe) + { + if (Tribe != null) + { + return Tribe.Contains(tribe); + } + return false; + } + + public bool HasMoreDamageThan(BattleCardBase other) + { + return SkillApplyInformation.HasMoreDamageThan(other.SkillApplyInformation); + } + + protected void ResetPlayedCost() + { + _playedCost = -1; + } + + protected void ResetLastCost() + { + _lastCost = -1; + } + + public void GiveAttackCount(Skill_attack_count skill, int count) + { + if (skill.IsAddAttackCount()) + { + attackCountinfo.Add(new AddAttackCountInfo(skill, count)); + } + else if (skill.IsSetAttackCount()) + { + attackCountinfo.Add(new SetAttackCountInfo(skill, count)); + } + } + + public void DepriveAttackCount(Skill_attack_count skill) + { + attackCountinfo.RemoveAll((AttackCountInfo s) => s.Skill == skill); + } + + public void ClearAttackCount() + { + attackCountinfo.Clear(); + } + + public void CallOnAttachSkill(BattleCardBase card, SkillBase skill) + { + if (card.IsClass) + { + skill.SetAndAddPublishedActiveSkillCount(); + } + this.OnAttachSkill.Call(card, skill); + } + + public Action ForceAttackOff() + { + if (BattleManagerBase.GetIns().IsRecovery) + { + return delegate + { + }; + } + Func forceAttackOffFunc = () => false; + OnCheckCanAttack += forceAttackOffFunc; + return delegate + { + OnCheckCanAttack -= forceAttackOffFunc; + }; + } + + public bool HasSkillWhenPlay(bool isOnlyNoSelect) + { + if (isOnlyNoSelect) + { + bool hasChoiceTransform = NormalSkills.Any((SkillBase s) => s.OnWhenChoicePlayStart != 0 && s is Skill_transform); + if (NormalSkills.Any((SkillBase s) => s.IsWhenPlaySkill)) + { + return !NormalSkills.Any((SkillBase s) => (s.IsWhenPlaySkill && (s.IsUserSelectType || s.IsBurialRite)) || (!hasChoiceTransform && s.OnWhenChoicePlayStart != 0)); + } + return false; + } + return NormalSkills.Any((SkillBase s) => s.IsWhenPlaySkill); + } + + public int GetCurrentAtkBuff() + { + if (IsEvolution) + { + return SkillApplyInformation.GetAtk(ignoreLowerLimit: true) - BaseParameter.EvoAtk; + } + return SkillApplyInformation.GetAtk(ignoreLowerLimit: true) - BaseParameter.Atk; + } + + public int GetCurrentLifeBuff() + { + if (IsEvolution) + { + return SkillApplyInformation.GetMaxLife() - BaseParameter.EvoLife; + } + return SkillApplyInformation.GetMaxLife() - BaseParameter.Life; + } + + public bool IsMutationPlayPp(int pp) + { + int num = CalcFixedUseCost(pp, skipCondition: true); + if (-1 != num && num <= pp) + { + return pp < Cost; + } + return false; + } + + public Skill_pp_fixeduse GetAccelerateOrCrystallizeSkill(int currentPp) + { + Skill_pp_fixeduse result = null; + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse skill_pp_fixeduse && skill_pp_fixeduse._fixedUsePP <= currentPp && skill_pp_fixeduse._fixedUsePP < Cost && currentPp < Cost) + { + result = skill_pp_fixeduse; + } + } + return result; + } + + public int CalcFixedUseCost(int currentPp, bool skipCondition = false) + { + int num = -1; + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse skill_pp_fixeduse && currentPp >= skill_pp_fixeduse._fixedUsePP) + { + bool flag = skill_pp_fixeduse.CheckCondition(playerInfoPair, new SkillConditionCheckerOption(), isPrePlay: true); + bool num2 = flag && num < skill_pp_fixeduse._fixedUsePP; + bool flag2 = (skipCondition || flag) && skill_pp_fixeduse._fixedUsePP < Cost && currentPp < Cost; + if (num2 || flag2) + { + num = skill_pp_fixeduse._fixedUsePP; + } + } + } + return num; + } + + public int GetPaidFixedCost() + { + if (ExecutedFixedUseCostIndex != -1 && Skills.ElementAt(ExecutedFixedUseCostIndex) is Skill_pp_fixeduse skill_pp_fixeduse) + { + return skill_pp_fixeduse._fixedUsePP; + } + return -1; + } + + public bool CheckConditionFixedUseCost(bool isPrePlay) + { + for (int i = 0; i < Skills.Count(); i++) + { + if (Skills.ElementAt(i) is Skill_pp_fixeduse skill_pp_fixeduse && skill_pp_fixeduse.CheckCondition(new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer), new SkillConditionCheckerOption(), isPrePlay)) + { + return true; + } + } + return false; + } + + protected bool IsFixedUseEnable(int labelCost) + { + if (Skills.Any((SkillBase s) => s is Skill_pp_fixeduse && (s as Skill_pp_fixeduse)._fixedUsePP == labelCost && ((s as Skill_pp_fixeduse)._fixedUsePP < Cost || !(s as Skill_pp_fixeduse).IsAccelerateOrCrystallize))) + { + return true; + } + return false; + } + + public bool HasSkillDestroyTribe(CardBasePrm.TribeType tribe) + { + if (_normalSkillCollection != null && HasSkillDestroyTribeInner(tribe, _normalSkillCollection)) + { + return true; + } + if (_evolveSkillCollection != null && HasSkillDestroyTribeInner(tribe, _evolveSkillCollection)) + { + return true; + } + return false; + } + + private bool HasSkillDestroyTribeInner(CardBasePrm.TribeType tribe, SkillCollectionBase skills) + { + if (skills == null) + { + return false; + } + for (int i = 0; i < skills.Count(); i++) + { + for (int j = 0; j < skills.ElementAt(i).PreprocessList.Count; j++) + { + if (skills.ElementAt(i).PreprocessList[j] is SkillPreprocessDestroyTribe skillPreprocessDestroyTribe && tribe == skillPreprocessDestroyTribe.GetDestroyTribe()) + { + return true; + } + } + } + return false; + } + + private CardParameter CreateClassParameter(bool isPlayer) + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + return new CardParameter((CardBasePrm.ClanType)(isPlayer ? dataMgr.GetPlayerClassId() : dataMgr.GetEnemyClassId())); + } + + public void ChangeClassClanParameter() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + BaseParameter.ChangeClanParameter((CardBasePrm.ClanType)(IsPlayer ? dataMgr.GetPlayerClassId() : dataMgr.GetEnemyClassId())); + } + + public void CreateParameter() + { + if (CardMaster.IsClass(_buildInfo.CardId)) + { + BaseParameter = CreateClassParameter(IsPlayer); + } + else + { + BaseParameter = CardMaster.GetInstanceForBattle().GetCardParameterFromId(_buildInfo.CardId); + } + } + + public BattleCardBase(BuildInfo buildInfo) + { + _buildInfo = buildInfo; + IsTokenLoad = false; + SelfBattlePlayer = buildInfo.SelfBattlePlayer; + OpponentBattlePlayer = buildInfo.OpponentBattlePlayer; + SelfBattlePlayerReadOnlyInfo = buildInfo.SelfBattlePlayerReadOnlyInfo; + IsPlayer = buildInfo.IsPlayer; + CreateParameter(); + CostModifierList = new List(); + attackCountinfo = new List(); + SpellChargeCount = 0; + ExecutedFixedUseCostIndex = -1; + DamagedCounter = new ItWasDamagedCounter(); + GetOffCards = new List(); + IsSummonDrunkenness = true; + IsOnMove = false; + IsOnDraw = true; + ResetPlayedCost(); + ResetLastCost(); + PlayedTurn = -1; + DeathTypeInfo = new DeathTypeInformation(); + BuffInfoList = new List(); + SkillActivationList = new List(); + _skillActivatedCount = 1; + ThisTurnSkillActivatedCount = 0; + InitSkillCollection(); + Skills = _normalSkillCollection; + IsSkillLost = false; + IsReanimate = false; + HasAnySkill = (NormalSkills != null && NormalSkills.Any((SkillBase skill) => !(skill is Skill_none) && !skill.IsAttachedSkill)) || (EvolutionSkills != null && EvolutionSkills.Any((SkillBase skill) => !(skill is Skill_none) && !skill.IsAttachedSkill)); + HasSkillNecromance = (NormalSkills != null && NormalSkills.Any((SkillBase skill) => skill.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessNecromance) && !skill.IsAttachedSkill)) || (EvolutionSkills != null && EvolutionSkills.Any((SkillBase skill) => skill.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessNecromance) && !skill.IsAttachedSkill)); + OnPlay += delegate + { + BattleCardView.HideCanPlayEffect(); + return NullVfx.GetInstance(); + }; + } + + public virtual void Setup(bool createNullView = false, bool isRecreate = false) + { + BattleCardView = CreateView(CreateViewBuildInfo(_buildInfo), createNullView); + VfxCreator = CreateVfxCreator(IsPlayer, BattleCardView, createNullView); + if (!createNullView) + { + foreach (SkillBase normalSkill in NormalSkills) + { + normalSkill.SetInductionVoiceIndex(); + } + foreach (SkillBase evolutionSkill in EvolutionSkills) + { + evolutionSkill.SetInductionVoiceIndex(); + } + } + if (SkillApplyInformation == null) + { + SkillApplyInformation = CreateSkillApplyInformation(this, VfxCreator); + SkillApplyInformation.InitializeInformation(); + } + if (!isRecreate) + { + DrawTurn = -1; + } + DestroyedTurn = -1; + DestroyedBySkillList = new List(); + BanishedInfo = new BanishInfo(-1, isSelfTurn: false, BanishInfo.BanishPlace.None); + } + + public void RecreateView(GameObject cardGameObject) + { + _buildInfo.GameObject = cardGameObject; + Setup(createNullView: false, isRecreate: true); + SkillApplyInformation.ReSetupVfxCreator(VfxCreator); + } + + protected virtual void InitSkillCollection() + { + _normalSkillCollection = CreateSkillCondition(_buildInfo.NormalSkillBuildInfos, _buildInfo.SelfBattlePlayer, _buildInfo.OpponentBattlePlayer, _buildInfo.ResourceMgr); + _evolveSkillCollection = CreateSkillCondition(_buildInfo.EvolveSkillBuildInfos, _buildInfo.SelfBattlePlayer, _buildInfo.OpponentBattlePlayer, _buildInfo.ResourceMgr); + } + + public void SetIndex(int setIndex) + { + _buildInfo.BattleCardIndex = setIndex; + } + + public virtual void UpdateSkillCollection() + { + } + + protected virtual BattleCardView.BuildInfo CreateViewBuildInfo(BuildInfo baseBuildInfo) + { + Func getIsTouchable = null; + if (baseBuildInfo.SelfBattlePlayer != null) + { + getIsTouchable = baseBuildInfo.SelfBattlePlayer.BattleView.IsTouchable; + } + return new BattleCardView.BuildInfo(this, new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer), baseBuildInfo.GameObject, SelfBattlePlayer.BattleCamera, SelfBattlePlayer.BackGround, baseBuildInfo.ResourceMgr, getIsTouchable, () => GetIsMovableOnView(), () => IsOnMove, (int cost) => IsFixedUseEnable(cost), () => !IsActionCard, () => Attackable && IsInplay && IsSelfTurn, () => IsCantAttackClass, GetHandCardFrameEffectType); + } + + protected virtual IBattleCardView CreateView(BattleCardView.BuildInfo buildInfo, bool IsNullView) + { + if (IsNullView) + { + return new NullBattleCardView(buildInfo); + } + return new BattleCardView(buildInfo); + } + + protected SkillCollectionBase CreateSkillCondition(IEnumerable buildInfos, BattlePlayerBase selfBattlPlayer, BattlePlayerBase opponentBattlePlayer, IBattleResourceMgr resourceMgr) + { + if (buildInfos == null) + { + return null; + } + SkillCollectionBase skillCollectionBase = CreateSkillCollection(); + List list = null; + SkillCreator skillCreator = CreateSkillCreator(selfBattlPlayer, opponentBattlePlayer, resourceMgr); + foreach (SkillCreator.SkillBuildInfo buildInfo in buildInfos) + { + SkillBase skillBase = skillCreator.Create(buildInfo, list); + skillCollectionBase.Add(skillBase); + if (skillBase.PreprocessList.Any()) + { + if (skillBase.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessReferencePrevious)) + { + list.AddRange(skillBase.PreprocessList); + } + else + { + list = skillBase.PreprocessList.ToList(); + } + } + } + skillCollectionBase.Complete(); + return skillCollectionBase; + } + + public virtual SkillCreator CreateSkillCreator(BattlePlayerBase selfBattlPlayer, BattlePlayerBase opponentBattlePlayer, IBattleResourceMgr resourceMgr) + { + return new SkillCreator(this, selfBattlPlayer, opponentBattlePlayer, resourceMgr); + } + + protected virtual SkillCollectionBase CreateSkillCollection() + { + return new SkillCollectionBase(this); + } + + public virtual VfxBase TurnStart(SkillProcessor skillProcessor) + { + if (IsInplay) + { + this.OnTurnStart.Call(); + AttackableCount = MaxAttackableCount; + IsFirstTurn = false; + IsSummonDrunkenness = false; + } + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + skillProcessor.Register(Skills.CreateTurnStartInfo(skillProcessor, playerInfoPair)); + return Skills.RegisterAndProcessWhenTurnStartImmediateInfo(new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer)); + } + + public virtual VfxBase OpponentTurnStart(SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + skillProcessor.Register(Skills.CreateTurnStartInfo(skillProcessor, playerInfoPair)); + return Skills.RegisterAndProcessWhenTurnStartImmediateInfo(new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer)); + } + + public virtual void Necromance(BattleCardBase necromanceCard, SkillProcessor skillProcessor, int necromanceCount) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + skillProcessor.Register(Skills.CreateNecromanceInfo(necromanceCard, skillProcessor, playerInfoPair, necromanceCount)); + } + + public virtual VfxBase TurnEndPostProcess() + { + return NullVfx.GetInstance(); + } + + public virtual void TurnEndSkillProcess(SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + skillProcessor.Register(Skills.CreateTurnEndInfo(skillProcessor, playerInfoPair)); + ThisTurnSkillActivatedCount = 0; + } + + public void CheckPreviousTurnAttacked() + { + if (SelfBattlePlayer.IsSelfTurn && IsInplay) + { + IsPreviousTurnAttacked = AttackableCount < MaxAttackableCount; + } + } + + public virtual VfxBase Draw(Vector3 Pos) + { + return VfxCreator.CreateDraw(Pos, IsLegend); + } + + public virtual VfxBase Moving(Vector3 Pos) + { + return VfxCreator.CreateMoving(Pos); + } + + protected virtual VfxBase StartPlayCard() + { + foreach (BattleCardBase handCard in SelfBattlePlayer.HandCardList) + { + if (handCard != this) + { + handCard.BattleCardView.areArrowsForcedOff = false; + handCard.BattleCardView.UpdateMovability(); + } + } + if (!GameMgr.GetIns().IsNewReplayBattle) + { + SelfBattlePlayer.CantPlayChoiceBrave = false; + SelfBattlePlayer.BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + BattleCardView.HideHandCardInfo(); + return NullVfx.GetInstance(); + } + + public VfxWith PlayCard(SkillProcessor skillProcessor, SkillConditionCheckerOption option, bool isInplayGeneration = false, BattleCardBase originalCard = null) + { + SequentialVfxPlayer sequentialVfx = SequentialVfxPlayer.Create(); + IsSummonDrunkenness = true; + AttackableCount = MaxAttackableCount; + VfxBase instance = NullVfx.GetInstance(); + if (!IsChoiceBraveSkillCard) + { + int useCost = Cost; + if (CheckConditionFixedUseCost(isPrePlay: true)) + { + useCost = CalcFixedUseCost(SelfBattlePlayer.Pp); + List list = Skills.Where((SkillBase s) => s is Skill_pp_fixeduse && !(s as Skill_pp_fixeduse).IsAccelerateOrCrystallize).ToList(); + SkillBase item = list.SingleOrDefault((SkillBase s) => (s as Skill_pp_fixeduse)._fixedUsePP == useCost); + ExecutedFixedUseCostIndex = list.IndexOf(item); + } + instance = SelfBattlePlayer.UsePp(useCost); + _playedCost = useCost; + _lastCost = useCost; + SelfBattlePlayer.SummonedCards.Add(this); + } + else + { + instance = SelfBattlePlayer.UseBp(Cost, BaseParameter.IsVariableCost, IsPlayer); + _playedCost = Cost; + } + VfxBase vfxBase = StartPlayCard(); + sequentialVfx.Register(ParallelVfxPlayer.Create(instance, vfxBase)); + sequentialVfx.Register(SetUpInplay()); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + VfxWith vfxWith = (isInplayGeneration ? new VfxWith(NullVfx.GetInstance(), null) : Skills.CreateWhenPlayInfo(this, skillProcessor, playerInfoPair, option)); + VfxBase allFuncVfxResults = this.OnPlay.GetAllFuncVfxResults(); + sequentialVfx.Register(allFuncVfxResults); + sequentialVfx.Register(vfxWith.Vfx); + SelfBattlePlayer.CallOnPlayCard((originalCard != null) ? originalCard : this, this, IsChoiceBraveSkillCard); + SelfBattlePlayer.AddRallyCount(SelfBattlePlayer.SummonedCards.Where((BattleCardBase c) => c.IsInplay && c.IsUnit).Count()); + sequentialVfx.Register(InstantVfx.Create(delegate + { + if (SelfBattlePlayer.HandCardList.Count <= 0) + { + sequentialVfx.Register(SelfBattlePlayer.BattleView.HandUnfocus()); + } + })); + sequentialVfx.Register(InstantVfx.Create(delegate + { + MotionUtils.SetLayerAll(BattleCardView.CardTemplate.CardNormalTemp.gameObject, 10); + })); + return new VfxWith(sequentialVfx, vfxWith.Value); + } + + public virtual VfxWith PlayChoiceCard(SkillProcessor skillProcessor, SkillConditionCheckerOption option) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + return Skills.CreateWhenChoicePlayInfo(skillProcessor, playerInfoPair, option); + } + + public VfxBase FinishWhenPlaySkill() + { + VfxBase[] allFuncCallResults = this.OnFinishWhenPlaySkill.GetAllFuncCallResults(); + if (allFuncCallResults.IsNotNullOrEmpty()) + { + return SequentialVfxPlayer.Create(allFuncCallResults); + } + return null; + } + + public virtual VfxBase DestroyInPlay(SkillProcessor skillProcessor, bool useDestroy = true, SkillBase destroyedSkill = null) + { + if (IsDead) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (IsChoiceEvolutionCard) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + UpdateBuildInfoAndSkillCollection(BaseParameter.BaseCardId, BaseParameter.IsFoil, isNotUpdateAtkLife: true); + })); + } + sequentialVfxPlayer.Register(RemoveFromInPlay()); + VfxBase allFuncVfxResults = this.OnDestroy.GetAllFuncVfxResults(this, skillProcessor); + if (!SelfBattlePlayer.ClassAndInPlayCardList.Contains(this)) + { + DeathTypeInfo.WhenDestroy = Skills._skillTimingInfo.IsWhenDestroy; + VfxBase vfx = VfxCreator.CreateDestroy(DeathTypeInfo, SelfBattlePlayer); + sequentialVfxPlayer.Register(vfx); + } + sequentialVfxPlayer.Register(allFuncVfxResults); + BattlePlayerBase battlePlayerBase = (SelfBattlePlayer.IsSelfTurn ? SelfBattlePlayer : OpponentBattlePlayer); + DestroyedTurn = battlePlayerBase.Turn; + IsDestroySelfTurn = battlePlayerBase.IsPlayer; + return sequentialVfxPlayer; + } + return NullVfx.GetInstance(); + } + + public virtual VfxBase DestroyInHand(SkillProcessor skillProcessor) + { + BattlePlayerBase battlePlayerBase = (SelfBattlePlayer.IsSelfTurn ? SelfBattlePlayer : OpponentBattlePlayer); + DestroyedTurn = battlePlayerBase.Turn; + IsDestroySelfTurn = battlePlayerBase.IsPlayer; + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(StopSpellCharge()); + VfxBase allFuncVfxResults = this.OnDestroy.GetAllFuncVfxResults(this, skillProcessor); + if (!SelfBattlePlayer.HandCardList.Contains(this)) + { + VfxBase vfx = VfxCreator.CreateDestroyHand(DeathTypeInfo, SelfBattlePlayer); + BattleCardView.HideCanPlayEffect(); + sequentialVfxPlayer.Register(vfx); + } + sequentialVfxPlayer.Register(allFuncVfxResults); + return sequentialVfxPlayer; + } + + public virtual VfxBase Banish(SkillProcessor skillProcessor, bool isReturn = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (IsChoiceEvolutionCard) + { + if (isReturn) + { + UpdateBuildInfoAndSkillCollection(BaseParameter.BaseCardId, BaseParameter.IsFoil); + if (!SelfBattlePlayer.BattleMgr.IsRecovery || IsPlayer) + { + BattleCardView.CardTemplate.NormalNameLabelTemp.text = BaseParameter.CardName; + Global.SetRepositionNameLabel(BattleCardView.CardTemplate.NormalNameLabelTemp, BaseParameter.CardName, is2D: false); + } + } + else + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + UpdateBuildInfoAndSkillCollection(BaseParameter.BaseCardId, BaseParameter.IsFoil, isNotUpdateAtkLife: true); + })); + } + } + sequentialVfxPlayer.Register(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor)); + if (!isReturn) + { + sequentialVfxPlayer.Register(VfxCreator.CreateBanish(DeathTypeInfo, SelfBattlePlayer)); + } + return sequentialVfxPlayer; + } + + public virtual VfxWithLoading BanishInHand(SkillProcessor skillProcessor) + { + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor)); + if (!SelfBattlePlayer.HandCardList.Contains(this)) + { + vfxWithLoadingSequential.RegisterVfxWithLoading(VfxCreator.CreateBanishHand(DeathTypeInfo, SelfBattlePlayer)); + } + return vfxWithLoadingSequential; + } + + public virtual VfxBase BanishInDeck(SkillProcessor skillProcessor) + { + return this.OnBanish.GetAllFuncVfxResults(this, skillProcessor); + } + + public virtual VfxBase GetOn(Transform vehicleCardTrans, IBattleCardView vehicleCardView, SkillProcessor skillProcessor, bool isReturn = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(this.OnGetOn.GetAllFuncVfxResults(this, skillProcessor)); + sequentialVfxPlayer.Register(VfxCreator.CreateGeton(vehicleCardTrans, vehicleCardView, DeathTypeInfo, SelfBattlePlayer)); + return sequentialVfxPlayer; + } + + public virtual VfxBase UniteInPlay(SkillProcessor skillProcessor, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(LoseSkill()); + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop()); + sequentialVfxPlayer.Register(RemoveFromInPlay()); + sequentialVfxPlayer.Register(SelfBattlePlayer.UniteCard(this, skillProcessor, skill)); + sequentialVfxPlayer.Register(VfxCreator.CreateBanish(DeathTypeInfo, SelfBattlePlayer)); + return sequentialVfxPlayer; + } + + public virtual VfxWithLoading FusionMaterialized(SkillProcessor skillProcessor, BattleCardBase fusionCard, bool isFusionMetamorphose) + { + fusionCard.SkillApplyInformation.AddFusionIngredientCard(this); + FusionedTurn = SelfBattlePlayer.Turn; + DeathTypeInfo.UseFusionIngredient = true; + DeathTypeInfo.UseFusionMetamorphoseIngredient = isFusionMetamorphose; + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(this.OnBanish.GetAllFuncVfxResults(this, skillProcessor)); + vfxWithLoadingSequential.RegisterVfxWithLoading(VfxCreator.CreateFusionHand(SelfBattlePlayer, fusionCard.BattleCardView, isFusionMetamorphose)); + return vfxWithLoadingSequential; + } + + public virtual VfxBase Metamorphose(SkillProcessor SkillProcessor) + { + return this.OnMetamorphose.GetAllFuncVfxResults(this, SkillProcessor); + } + + public VfxWithLoadingSequential SkillPlayCard(bool isPlayer, SkillBaseSummon.SUMMON_TYPE summonType, SkillProcessor skillProcessor, SkillBase skill, bool isGetoff = false, bool isReanimate = false) + { + _lastCost = Cost; + VfxBase vfxBase = SelfBattlePlayer.PickCard(this, skill, summonType, isGetoff, isReanimate); + VfxBase vfxBase2 = SetUpInplay(); + IsReanimate = isReanimate; + if (summonType == SkillBaseSummon.SUMMON_TYPE.HAND) + { + skillProcessor.Register(Skills.CreateWhenHandToNotPlayInfo(skillProcessor, new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer), new SkillConditionCheckerOption())); + } + return VfxWithLoadingSequential.Create(vfxBase, vfxBase2); + } + + public VfxBase StartHandEffect() + { + if (SelfBattlePlayer.IsPlayer || GameMgr.GetIns().IsAdminWatch) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (SpellChargeCount > 0 && HasSpellCharge && IsInHand) + { + sequentialVfxPlayer.Register(new HandEffectLoopStartVfx(BattleCardView, () => IsActionCard, HandEffectLoopStartVfx.HandEffectType.SpellCharge)); + } + return sequentialVfxPlayer; + } + return NullVfx.GetInstance(); + } + + public virtual VfxBase RecoveryAttackCount() + { + AttackableCount = MaxAttackableCount; + return InstantVfx.Create(delegate + { + BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect(); + }); + } + + public virtual VfxBase StopSpellCharge() + { + return new HandEffectLoopEndVfx(BattleCardView); + } + + public virtual VfxBase CreateMoveToHandVfx() + { + if (IsPlayer) + { + return new PlayerDrawCardToHandVfx(this); + } + return NullVfx.GetInstance(); + } + + public VfxBase CreateShowLogVfx(float time, SkillBase skill, bool isEvolve, string SkillDescription) + { + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SHOW_SIDE_LOG)) + { + BattlePlayerBase.SideLogInfo sideLogInfo = new BattlePlayerBase.SideLogInfo(skill); + return new ShowSideLogVfx(this, skill, SelfBattlePlayer.BattleView.GetSideLogControl(isSkillTargetSelect: false), (SkillDescription == string.Empty) ? GetCardSkillDescription(sideLogInfo, isEvolve) : SkillDescription, time, isEvol: false, sideLogInfo); + } + return NullVfx.GetInstance(); + } + + public virtual AttackOpponentResult AttackOpponent(BattleCardBase target, DamageParam damageParam, SkillProcessor skillProcessor, bool IsChallenge) + { + return new AttackOpponentResult(NullVfx.GetInstance(), NullVfx.GetInstance(), null); + } + + public void SetOnMove(bool move) + { + IsOnMove = move; + } + + public void SetOnDraw(bool draw) + { + IsOnDraw = draw; + } + + public IEnumerable GetSelectTypeSkill(bool isEvolve = false, bool isFusion = false, bool isRegister = false, bool isEvolutionSimpleProcessor = false, bool isChoiceCheck = false) + { + SkillCollectionBase skillCollectionBase = (isEvolve ? EvolutionSkills : Skills); + NetworkBattleManagerBase networkBattleManagerBase = SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase; + GameMgr ins = GameMgr.GetIns(); + if (!ins.IsAdminWatch && !ins.IsAINetwork && networkBattleManagerBase != null) + { + NetworkBattleReceiver.ReceiveData receiveData = networkBattleManagerBase.networkBattleData.GetReceiveData(); + if (Index == receiveData.playCardIndex && !isEvolutionSimpleProcessor && !isChoiceCheck) + { + List list = new List(); + for (int i = 0; i < receiveData.OpponentTargetDataList.Count; i++) + { + list.AddRange(receiveData.OpponentTargetDataList[i].SelectSkillIndexList); + } + list = list.Distinct().ToList(); + if (list.Count > 0) + { + List list2 = new List(); + for (int j = 0; j < list.Count; j++) + { + if (list[j] < skillCollectionBase.Count()) + { + list2.Add(skillCollectionBase.ElementAt(list[j])); + continue; + } + LocalLog.AccumulateTraceLog("SelectSkillIndex " + list[j] + " out of range. CardId:" + CardId + " &&" + StackTraceUtility.ExtractStackTrace()); + } + return list2; + } + } + } + BattlePlayerReadOnlyInfoPair readOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + BattleCardBase battleCardBase = SelfBattlePlayer.Class; + bool isActivateFanfare = (!IsUnit || !battleCardBase.SkillApplyInformation.IsCantActivateFanfareUnit) && (!IsField || !battleCardBase.SkillApplyInformation.IsCantActivateFanfareField); + IEnumerable selectTypeSkill = skillCollectionBase.GetSelectTypeSkill(isEvolve, isFusion, isActivateFanfare, readOnlyInfoPair); + if (isRegister && SelfBattlePlayer.BattleMgr is NetworkBattleManagerBase networkBattleManagerBase2) + { + for (int k = 0; k < selectTypeSkill.Count(); k++) + { + networkBattleManagerBase2.AddRegisterSelectTypeSkillIndexList(skillCollectionBase.IndexOf(selectTypeSkill.ElementAt(k))); + } + } + return selectTypeSkill; + } + + public virtual VfxBase StartAttack(BattleCardBase underAttackCard, BattlePlayerPair battlePlayerPair) + { + return NullVfx.GetInstance(); + } + + public virtual DamageResult ApplyDamage(SkillBase skill, DamageParam damage, bool doesAttackerPossessKiller, bool isReflectedDamage, SkillProcessor skillProcessor, BattleCardBase reflectCard) + { + DamagedCounter.AddDamageCount(SelfBattlePlayer.IsSelfTurn); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (this.OnDamageAfter != null) + { + sequentialVfxPlayer.Register(this.OnDamageAfter.GetAllFuncVfxResults(skillProcessor)); + } + if (reflectCard != null && reflectCard.OnReflectionAfter != null) + { + sequentialVfxPlayer.Register(reflectCard.OnReflectionAfter.GetAllFuncVfxResults(skillProcessor)); + } + BattleCardBase battleCardBase = damage.OwnerCard.SelfBattlePlayer.Class; + if (battleCardBase != damage.OwnerCard && battleCardBase.SkillApplyInformation.AddDamageList.Count() > 0 && battleCardBase.OnGiveDamage != null) + { + sequentialVfxPlayer.Register(battleCardBase.OnGiveDamage.GetAllFuncVfxResults(skillProcessor)); + } + if (damage.OwnerCard.OnGiveDamage != null) + { + sequentialVfxPlayer.Register(damage.OwnerCard.OnGiveDamage.GetAllFuncVfxResults(skillProcessor)); + } + return new DamageResult(sequentialVfxPlayer, 0, 0); + } + + public virtual HealResult ApplyHealing(HealParam healParam, SkillProcessor skillProcessor) + { + return new HealResult(-1, NullVfx.GetInstance()); + } + + protected VfxBase CreateVfxWithCardPlayabilityRefresh(VfxBase originalVfx) + { + return SequentialVfxPlayer.Create(originalVfx, InstantVfx.Create(delegate + { + SelfBattlePlayer.UpdateHandCardsPlayability(); + })); + } + + public virtual VfxBase Evolution(bool isSkill, SkillProcessor skillProcessor, SkillConditionCheckerOption option, Func getEvolveVfxFunc = null) + { + return NullVfx.GetInstance(); + } + + public void CallOnFusionEvent(List ingredientCards) + { + this.OnFusionEvent.Call(ingredientCards); + } + + public VfxBase Fusion(SkillProcessor skillProcessor, List ingredientCards, bool isFusionMetamorphose) + { + if (!isFusionMetamorphose) + { + SetActiveSkillCount(); + } + skillProcessor.Register(Skills.CreateWhenFusionInfo(ingredientCards, skillProcessor, new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer))); + for (int i = 0; i < ingredientCards.Count; i++) + { + skillProcessor.Register(ingredientCards[i].Skills.CreateWhenFusionedInfo(skillProcessor, new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer))); + } + BattlePlayerBase battlePlayerBase = (IsSelfTurn ? SelfBattlePlayer : OpponentBattlePlayer); + BattlePlayerBase obj = (IsSelfTurn ? OpponentBattlePlayer : SelfBattlePlayer); + battlePlayerBase.StartSkillWhenFusionOther(ingredientCards, skillProcessor); + obj.StartSkillWhenFusionOther(ingredientCards, skillProcessor); + return NullVfx.GetInstance(); + } + + public virtual void InitializeParameterOnWhenReturn() + { + InitSkillApplyInformationOnWhenReturn(); + } + + protected virtual void InitSkillApplyInformationOnWhenReturn() + { + SkillApplyInformation.InitializeInformation(isReturnCard: true); + SkillApplyInformation.ClearParameterModifier(); + ClearCostModifier(); + TransformInfo = default(TransformInformation); + int normalIndividualId = NormalIndividualId; + int evolutionIndividualId = EvolutionIndividualId; + SkillApplyInformation.AttachedSkillsInfo.Clear(); + _normalSkillCollection.Clear(); + _evolveSkillCollection.Clear(); + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(CardMaster.GetInstanceForBattle().GetCardParameterFromId(CardId)); + _buildInfo.NormalSkillBuildInfos = cardSkillsBuildInfo.normalSkillBuildInfos; + _buildInfo.EvolveSkillBuildInfos = cardSkillsBuildInfo.evolveSkillBuildInfos; + foreach (SkillBase item in CreateSkillCondition(cardSkillsBuildInfo.normalSkillBuildInfos, SelfBattlePlayer, OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _normalSkillCollection.Add(item); + item.SetInductionVoiceIndex(); + item.SetIndividualId(normalIndividualId); + } + foreach (SkillBase item2 in CreateSkillCondition(cardSkillsBuildInfo.evolveSkillBuildInfos, SelfBattlePlayer, OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _evolveSkillCollection.Add(item2); + item2.SetInductionVoiceIndex(); + item2.SetIndividualId(evolutionIndividualId); + } + Skills = _normalSkillCollection; + Skills.Complete(); + } + + public virtual VfxBase ReturnCard(SkillProcessor skillProcessor) + { + if (IsChoiceEvolutionCard) + { + ResetChoiceEvolutionCardBuildInfo(); + } + InitSkill(); + SpellChargeCount = 0; + SkillApplyInformation.ForceDepriveChantCount(); + SkillApplyInformation.ForceDepriveBuffLife(); + _skillActivatedCount = 1; + ThisTurnSkillActivatedCount = 0; + VfxBase[] allFuncCallResults = this.OnReturnCard.GetAllFuncCallResults(this, skillProcessor); + ClearCostModifier(); + BattleCardView.InitHandParameter(); + UpdateCostViewStrategy(isForceUpdate: true); + BattleCardView.UpdateCost(BattleCardView.GetUseCostList(BaseParameter.Cost), isGenerateInHand: false); + ClearBuffInfo(); + ResetPlayedCost(); + ResetLastCost(); + ExecutedFixedUseCostIndex = -1; + IsExecutedEarthRite = false; + IsSkillLost = false; + IsReanimate = false; + DamagedCounter.Clear(); + GetOffCards.Clear(); + ResetUpdateBuildInfo(); + return ParallelVfxPlayer.Create(allFuncCallResults); + } + + public void FlagCardAsDestroyedByKiller() + { + IsDestroyedByKiller = true; + DeathTypeInfo.DestroyedByKiller = true; + } + + public virtual void ResetFlagCardAsDestroyed() + { + IsDestroyedBySkill = false; + IsDestroyedByKiller = false; + } + + public virtual void FlagCardAsDestroyedBySkill() + { + IsDestroyedBySkill = true; + } + + public VfxBase CreateMaskCardInPlayVfx() + { + return VfxCreator.CreateMaskCardInPlay(); + } + + public void AddCostModifier(ICardCostModifier modifier, SkillBase skill, bool eventCall = true) + { + if (eventCall && skill != null) + { + this.OnAddCostState.Call(skill, modifier); + } + if (modifier.IsClearBeforeModifier) + { + CostModifierList.RemoveAll((ICardCostModifier c) => !c.IsResidentModifier); + } + CostModifierList.Add(modifier); + } + + public void RemoveCostModifier(SkillBase skill, ICardCostModifier modifier) + { + this.OnRemoveCostState.Call(skill, modifier); + CostModifierList.Remove(modifier); + } + + public void ClearCostModifier() + { + CostModifierList.Clear(); + } + + public int CalculateFinalDamageAmount(int damageAmount, bool isSkillDamage = false, bool isSpellDamage = false, ParallelVfxPlayer lifeLowerLimitEffectVfx = null) + { + bool flag = !isSkillDamage && !isSpellDamage; + if (SkillApplyInformation.IsShieldAll || (isSkillDamage && SkillApplyInformation.IsShieldSkill) || (isSpellDamage && SkillApplyInformation.IsShieldSpell) || (flag && SkillApplyInformation.IsShieldAttack)) + { + return 0; + } + damageAmount -= SkillApplyInformation.GetDamageCutAmount(isSkillDamage ? DamageCutInfo.DamageType.SKILL : DamageCutInfo.DamageType.ALL); + damageAmount = SkillApplyInformation.GetClippingDamage(damageAmount, lifeLowerLimitEffectVfx); + return Mathf.Max(damageAmount, 0); + } + + public int HealLife(int healAmount, int turn, bool isSelfTurn) + { + int life = Life; + SkillApplyInformation.HealLife(healAmount, turn, isSelfTurn); + return Life - life; + } + + public virtual string GetCardSkillDescription(BattlePlayerBase.SideLogInfo sideLogInfo, bool? isForceGetEvolveText = null) + { + return SkillDescription(sideLogInfo); + } + + public VfxBase LoseSkill(SkillBase loseSkill = null, SkillProcessor skillProcessor = null) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + IsSkillLost = true; + AttackableCount = ((AttackableCount >= MaxAttackableCount) ? 1 : 0); + NormalSkills.Clear(); + NormalSkills.InitTimingInfo(); + EvolutionSkills.Clear(); + EvolutionSkills.InitTimingInfo(); + SkillApplyInformation.AttachedSkillsInfo.Clear(); + SkillApplyInformation.AttachedSkillsInfo.AttachedSkills.InitTimingInfo(); + _buildInfo.NormalSkillBuildInfos.Clear(); + _buildInfo.EvolveSkillBuildInfos.Clear(); + parallelVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop()); + SkillApplyInformation.InitializeInformationWithoutLifeOffenseModifier(); + parallelVfxPlayer.Register(ParallelVfxPlayer.Create(this.OnLoseSkillOneTime.GetAllFuncCallResults(loseSkill, skillProcessor, this))); + this.OnLoseSkillOneTime = null; + RemoveBuffInfo((BuffInfo buff) => !(buff.SkillFrom is Skill_powerup) && !(buff.SkillFrom is Skill_power_down)); + parallelVfxPlayer.Register(BattleCardView.InitializeBattleCardIcon(this, Skills)); + if (IsFirstTurn) + { + IsSummonDrunkenness = true; + } + else + { + IsSummonDrunkenness = false; + } + bool isSelfTurn = SelfBattlePlayer.IsSelfTurn; + return SequentialVfxPlayer.Create(parallelVfxPlayer, SkillApplyInformation.AllSkillEffectRestart(), InstantVfx.Create(delegate + { + BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect(null, isSelfTurn); + })); + } + + public CopySkillInfo CopySkill(BattleCardBase targetCard, string copySkillType, bool isRemain) + { + SkillFilterCreator.ContentKeyword skillType = (SkillFilterCreator.ContentKeyword)Enum.Parse(typeof(SkillFilterCreator.ContentKeyword), copySkillType, ignoreCase: true); + List copySkills = GetCopySkill(targetCard.Skills, skillType); + bool isEvolutionSkill = targetCard.EvolutionSkills.Any((SkillBase skill) => skill == copySkills.FirstOrDefault()); + int num = 0; + List list = new List(); + foreach (SkillBase item in copySkills) + { + if (!isRemain) + { + targetCard.Skills.Remove(item); + if (!targetCard.IsEvolution) + { + List list2 = new List(); + foreach (SkillBase evolutionSkill in targetCard.EvolutionSkills) + { + if (item.IsSameSkill(evolutionSkill)) + { + list2.Add(evolutionSkill); + } + } + foreach (SkillBase item2 in list2) + { + targetCard.EvolutionSkills.Remove(item2); + } + } + } + if (item.GetAttachSkill == null) + { + num++; + } + } + List copiedSkillBuildInfoList = new List(); + if (num > 0) + { + string timing = skillType.ToStringCustom(); + copiedSkillBuildInfoList.AddRange(SettingRobSkillInfo(targetCard, timing, targetCard.IsEvolution, isRemain)); + } + foreach (SkillBase item3 in _normalSkillCollection) + { + if (item3.GetAttachSkill != null) + { + list.Add(item3); + } + } + _normalSkillCollection.Clear(); + _evolveSkillCollection.Clear(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop()); + CombineVirtualCardSkill(this); + AttachedSkillInformation attachedSkillsInfo = targetCard.SkillApplyInformation.AttachedSkillsInfo; + List copySkill = GetCopySkill(attachedSkillsInfo.AttachedSkills, skillType); + List list3 = new List(); + foreach (SkillBase item4 in copySkill) + { + int index = attachedSkillsInfo.AttachedSkills.IndexOf(item4); + Skill_attach_skill creatorSkill = attachedSkillsInfo.CreatorSkillList[index] as Skill_attach_skill; + string text = attachedSkillsInfo.OwnerCardNameList[index]; + int num2 = attachedSkillsInfo.OwnerCardIdList[index]; + long duplicateBanNum = attachedSkillsInfo.DuplicateBanNum[index]; + if (isRemain) + { + SkillBase attachSkill = targetCard.SkillApplyInformation.CloneAttachSkill(SkillApplyInformation as SkillApplyInformation, creatorSkill); + SkillBase.BuffInfoContainer buffInfo = creatorSkill.GetBuffInfo(targetCard); + if (buffInfo != null) + { + buffInfo = buffInfo.Clone(); + buffInfo._targetCard = this; + buffInfo._attachSkill = attachSkill; + buffInfo._buffInfo = buffInfo._buffInfo.Clone(); + buffInfo._buffInfo.IsCopied = true; + buffInfo._buffInfo.IsCopiedEvolutionSkill = creatorSkill.SkillPrm.ownerCard.EvolutionSkills.Any((SkillBase s) => s == creatorSkill); + buffInfo._buffInfo.SetPreviousOwner(creatorSkill.SkillPrm.ownerCard); + AddBuffInfo(buffInfo._buffInfo); + creatorSkill.AddBuffInfo(buffInfo); + list3.Add(buffInfo._buffInfo); + } + else + { + BuffInfo buffInfo2 = creatorSkill.AddBuffInfoIfNeeded(this); + buffInfo2.SetPreviousOwner(creatorSkill.SkillPrm.ownerCard); + buffInfo2.IsCopied = true; + buffInfo2.IsCopiedEvolutionSkill = creatorSkill.SkillPrm.ownerCard.EvolutionSkills.Any((SkillBase s) => s == creatorSkill); + buffInfo = new SkillBase.BuffInfoContainer(this, buffInfo2, -1, "", null, 0L); + buffInfo._attachSkill = attachSkill; + creatorSkill.AddBuffInfo(buffInfo); + list3.Add(buffInfo._buffInfo); + } + } + else + { + int index2 = attachedSkillsInfo.CreatorSkillIndexList[index]; + item4.SkillPrm.ownerCard = this; + item4.SkillPrm.selfBattlePlayer = SelfBattlePlayer; + item4.SkillPrm.opponentBattlePlayer = OpponentBattlePlayer; + SkillApplyInformation.AttachSkill(item4.SkillPrm.buildInfo, item4.SkillPrm.resourceMgr, text, num2, duplicateBanNum, creatorSkill); + targetCard.SkillApplyInformation.AttachedSkillsInfo.Remove(item4, text, num2, duplicateBanNum, creatorSkill, index2); + SkillBase.BuffInfoContainer buffInfoContainer = creatorSkill.PopBuffInfo(targetCard); + if (buffInfoContainer == null) + { + CardParameter baseParameter = creatorSkill.SkillPrm.ownerCard.BaseParameter; + BuffInfo buffInfo3 = new BuffInfo(baseParameter.BaseCardId, baseParameter.NormalCardId, creatorSkill); + buffInfoContainer = new SkillBase.BuffInfoContainer(targetCard, buffInfo3, -1, "", null, 0L); + } + buffInfoContainer._buffInfo.IsCopied = true; + buffInfoContainer._buffInfo.IsCopiedEvolutionSkill = creatorSkill.SkillPrm.ownerCard.EvolutionSkills.Any((SkillBase s) => s == creatorSkill); + buffInfoContainer._buffInfo.SetPreviousOwner(creatorSkill.SkillPrm.ownerCard); + targetCard.RemoveBuffInfo(buffInfoContainer._buffInfo); + buffInfoContainer._targetCard = this; + AddBuffInfo(buffInfoContainer._buffInfo); + creatorSkill.AddBuffInfo(buffInfoContainer); + list3.Add(buffInfoContainer._buffInfo); + } + } + Skills.Complete(); + SetActiveSkillCount(); + targetCard.SkillApplyInformation.AttachedSkillsInfo.AttachedSkills.InitTimingInfo(); + SkillApplyInformation.AttachedSkillsInfo.AttachedSkills.InitTimingInfo(); + targetCard.NormalSkills.InitTimingInfo(); + NormalSkills.InitTimingInfo(); + targetCard.EvolutionSkills.InitTimingInfo(); + EvolutionSkills.InitTimingInfo(); + sequentialVfxPlayer.Register(targetCard.BattleCardView.InitializeBattleCardIcon(targetCard, targetCard.Skills)); + sequentialVfxPlayer.Register(BattleCardView.InitializeBattleCardIcon(this, Skills)); + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectRestart()); + this.OnCopySkillComplete.Call(this); + SkillBaseCopy copySkill2 = Skills.Where((SkillBase s) => s is SkillBaseCopy && s.OptionValue.GetString(SkillFilterCreator.ContentKeyword.ability, "NONE") == skillType.ToString()).FirstOrDefault() as SkillBaseCopy; + List copiedSkillList = Skills.Where((SkillBase s) => copiedSkillBuildInfoList.Contains(s.SkillPrm.buildInfo)).ToList(); + return new CopySkillInfo(sequentialVfxPlayer, isEvolutionSkill, copySkill2, copiedSkillList, list3); + } + + private List SettingRobSkillInfo(BattleCardBase targetCard, string timing, bool isEvolution, bool isRemain) + { + List list = new List(); + bool flag = false; + List list2 = (isEvolution ? targetCard._buildInfo.EvolveSkillBuildInfos : targetCard._buildInfo.NormalSkillBuildInfos); + foreach (SkillCreator.SkillBuildInfo skillInfo in list2) + { + if (!(skillInfo._timing == timing)) + { + continue; + } + flag = true; + _buildInfo.NormalSkillBuildInfos.Add(skillInfo); + if (_buildInfo.EvolveSkillBuildInfos.IsNotNullOrEmpty()) + { + _buildInfo.EvolveSkillBuildInfos.Add(skillInfo); + } + if (skillInfo._previousSkillOwner == null) + { + skillInfo._previousSkillOwner = targetCard; + } + OnRemoveFromInPlayAfterOneTime += delegate + { + if (!IsDead) + { + _buildInfo.NormalSkillBuildInfos.Remove(skillInfo); + if (_buildInfo.EvolveSkillBuildInfos.Contains(skillInfo)) + { + _buildInfo.EvolveSkillBuildInfos.Remove(skillInfo); + } + } + return NullVfx.GetInstance(); + }; + list.Add(skillInfo); + } + if (flag || !isEvolution) + { + if (!isRemain) + { + list2.RemoveAll((SkillCreator.SkillBuildInfo b) => b._timing == timing); + } + } + else + { + list.AddRange(SettingRobSkillInfo(targetCard, timing, isEvolution: false, isRemain)); + } + return list; + } + + private List GetCopySkill(SkillCollectionBase skills, SkillFilterCreator.ContentKeyword skillType) + { + List list = new List(); + foreach (SkillBase skill in skills) + { + switch (skillType) + { + case SkillFilterCreator.ContentKeyword.when_destroy: + if (skill.IsWhenDestroySkill) + { + list.Add(skill); + } + break; + case SkillFilterCreator.ContentKeyword.when_attack: + if (skill.IsBeforAttackSkill) + { + list.Add(skill); + } + break; + case SkillFilterCreator.ContentKeyword.when_fight: + if (skill.IsWhenFightSkill) + { + list.Add(skill); + } + break; + } + } + return list; + } + + public virtual VfxBase RemoveFromInPlay() + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + if (!IsClass) + { + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + BattleCardView.BattleCardIconAnimations.ClearAllSkillIcons(); + })); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + BattleCardView.HideAttackFinished(); + })); + } + return parallelVfxPlayer; + } + + public virtual VfxBase RemoveFromInPlayAfter(SkillProcessor skillProcessor, bool isReturn = false) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(this.OnRemoveFromInPlayAfterOneTime.GetAllFuncCallResults(isReturn, skillProcessor)); + this.OnRemoveFromInPlayAfterOneTime = null; + ParallelVfxPlayer parallelVfxPlayer2 = ParallelVfxPlayer.Create(this.OnLoseSkillOneTime.GetAllFuncCallResults(null, skillProcessor, this)); + this.OnLoseSkillOneTime = null; + return ParallelVfxPlayer.Create(parallelVfxPlayer, parallelVfxPlayer2); + } + + protected virtual ICardVfxCreator CreateVfxCreator(bool isPlayer, IBattleCardView battleCardView, bool isNullView) + { + if (isNullView) + { + return NullCardVfxCreator.GetInstance(); + } + return new CardVfxCreatorBase(isPlayer, this, battleCardView, _buildInfo.ResourceMgr); + } + + protected virtual ISkillApplyInformation CreateSkillApplyInformation(BattleCardBase card, ICardVfxCreator vfxCreator) + { + return new SkillApplyInformation(card, vfxCreator); + } + + public ParameterChangeInformation CreateParameterChangeInfo() + { + return new ParameterChangeInformation(Atk, BaseAtk, Life, MaxLife, BaseMaxLife); + } + + public void AddBuffInfo(BuffInfo buffInfo) + { + BuffInfoList.Add(buffInfo); + } + + public void InsertBuffInfo(BuffInfo buffInfo, int index) + { + if (index >= BuffInfoList.Count) + { + index = BuffInfoList.Count; + } + BuffInfoList.Insert(index, buffInfo); + } + + public void RemoveBuffInfo(BuffInfo buffInfo) + { + BuffInfoList.Remove(buffInfo); + } + + public void RemoveBuffInfo(Predicate condition) + { + BuffInfoList.RemoveAll(condition); + } + + public bool IsContainBuffInfo(BuffInfo buffInfo) + { + return BuffInfoList.Contains(buffInfo); + } + + public void ClearBuffInfo() + { + BuffInfoList.Clear(); + } + + public void ShallowCopyBuffInfoList(BattleCardBase originalCard) + { + BuffInfoList = originalCard.BuffInfoList; + this.OnResetCardParameter = originalCard.OnResetCardParameter; + } + + public VfxBase AfterAddDamage() + { + VfxBase allFuncVfxResults = this.OnAfterAddDamage.GetAllFuncVfxResults(); + this.OnAfterAddDamage = null; + return allFuncVfxResults; + } + + public virtual VfxBase SetUpInplay() + { + ResetCardParameter(); + IsFirstTurn = true; + SetOnMove(move: false); + AttackableCount = MaxAttackableCount; + IsSummonDrunkenness = true; + IsOnDraw = true; + SetActiveSkillCount(); + return NullVfx.GetInstance(); + } + + public void SetActiveSkillCount() + { + _normalSkillCollection.SetAndAddPublishedActiveSkillsCount(); + _evolveSkillCollection.SetAndAddPublishedActiveSkillsCount(); + } + + public virtual void ResetCardParameter() + { + IsDestroyedByKiller = false; + IsDestroyedBySkill = false; + DeathTypeInfo.DestroyedByKiller = false; + DeathTypeInfo.MysteriesDestroy = false; + DeathTypeInfo.WhenDestroy = false; + ClearCostModifier(); + this.OnResetCardParameter.Call(); + } + + public void ResetCardParameterInHand() + { + IsDestroyedByKiller = false; + IsDestroyedBySkill = false; + DeathTypeInfo.DestroyedByKiller = false; + DeathTypeInfo.MysteriesDestroy = false; + DeathTypeInfo.WhenDestroy = false; + } + + public HandCardFrameEffectType GetHandCardFrameEffectType() + { + return GetHandCardFrameEffectType(isNewReplayRecord: false); + } + + public HandCardFrameEffectType GetHandCardFrameEffectType(bool isNewReplayRecord) + { + HandCardFrameEffectType handCardFrameEffectType = HandCardFrameEffectType.NONE; + BattlePlayerReadOnlyInfoPair pair = new BattlePlayerReadOnlyInfoPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + List list = new List(); + list.AddRange(NormalSkills); + list.AddRange(EvolutionSkills); + for (int i = 0; i < list.Count(); i++) + { + SkillBase skill = list[i]; + if (skill == null) + { + continue; + } + HandCardFrameEffectType handCardFrameEffectType2 = skill.SkillPrm.buildInfo._handCardFrameEffectType; + if ((handCardFrameEffectType < handCardFrameEffectType2 || (handCardFrameEffectType == HandCardFrameEffectType.LIGHT_BLUE && skill is Skill_pp_fixeduse)) && skill.VisualCheckCondition(pair, option, isPrePlay: true) && skill.PreprocessList.All((SkillPreprocessBase p) => p.IsRight(pair, option))) + { + handCardFrameEffectType = handCardFrameEffectType2; + if ((GameMgr.GetIns().IsWatchBattle || isNewReplayRecord) && handCardFrameEffectType == HandCardFrameEffectType.YELLOW && (skill.ConditionTargetFilter is SkillTargetDeckFilter || skill.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter c) => c.Text.Contains("deck") && RegisterSkillConditionCheck.IsSkillConditionCheck(skill)))) + { + handCardFrameEffectType = HandCardFrameEffectType.NONE; + } + } + } + return handCardFrameEffectType; + } + + protected string ConvertSkillDescription(string text, BattlePlayerBase.SideLogInfo sideLogInfo, bool isSkipOption, BuffInfo buff, string divergenceId, List skillDescriptionValueList, List replaySkillDescriptionValueList) + { + SelfBattlePlayer.SideLogSkill = sideLogInfo; + OpponentBattlePlayer.SideLogSkill = sideLogInfo; + bool num = sideLogInfo != null; + bool isRobBuff = buff != null && buff.IsCopied; + string text2 = (text.Contains("<<${") ? GetSkillDescriptionVariables(text) : text); + bool flag = IsInHand || (text2.Contains("{me.inplay.class.count}") && (text2.Contains(SkillFilterCreator.ContentKeyword.hand.ToString()) || text2.Contains(SkillFilterCreator.ContentKeyword.deck.ToString()))); + if (num && !isSkipOption && !IsPlayer && !GameMgr.GetIns().IsAdminWatch && flag) + { + isSkipOption = true; + } + Action setupOptionValue = (isSkipOption ? null : ((Action)delegate(SkillOptionValue optionValue) + { + BattleCardBase battleCardBase = ((!isRobBuff) ? this : ((buff.SkillFrom != null) ? buff.SkillFrom.SkillPrm.ownerCard : buff.OwnerCard)); + bool flag2 = isRobBuff && SelfBattlePlayer != battleCardBase.SelfBattlePlayer; + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(flag2 ? OpponentBattlePlayer : SelfBattlePlayer, flag2 ? SelfBattlePlayer : OpponentBattlePlayer); + SkillBase skill = null; + if (text.Contains(SkillFilterCreator.ContentKeyword.is_individual.ToString())) + { + skill = SelfBattlePlayer.Class.Skills.FirstOrDefault((SkillBase s) => s.HasIndividualId && s.IsAttachedSkill && s.GetAttachSkill.SkillPrm.ownerCard.Index == Index); + } + SkillCollectionBase.SetupOptionValue(optionValue, playerInfoPair, battleCardBase, skill); + })); + string result = ConvertSkillDescriptionText(text, setupOptionValue, IsPlayer, divergenceId, skillDescriptionValueList, replaySkillDescriptionValueList); + SelfBattlePlayer.SideLogSkill = null; + OpponentBattlePlayer.SideLogSkill = null; + return result; + } + + private string GetSkillDescriptionVariables(string originalText) + { + if (originalText == null || originalText == string.Empty) + { + return string.Empty; + } + string text = string.Empty; + string text2 = originalText; + int num = 0; + while (true) + { + num++; + if (num >= 21) + { + Debug.LogError("Maybe infinity loop. OriginalText=" + originalText); + break; + } + string variableNumberText = GetVariableNumberText(text2); + if (variableNumberText == string.Empty) + { + break; + } + if (variableNumberText.Contains('?')) + { + List list = variableNumberText.Split('?').ToList(); + text2 = text2.Replace("<<" + list[0] + "?" + list[1] + "?" + list[2] + ">>", string.Empty); + text = text + list[1] + list[2]; + } + } + return text; + } + + private static string GetDefaultValue(string expression) + { + if (expression.Contains(SkillFilterCreator.ContentKeyword.union_burst_count.ToStringCustom())) + { + return 10.ToString(); + } + if (expression.Contains(SkillFilterCreator.ContentKeyword.super_skybound_art_count.ToStringCustom())) + { + return 15.ToString(); + } + if (expression.Contains(SkillFilterCreator.ContentKeyword.skybound_art_count.ToStringCustom())) + { + return 10.ToString(); + } + if (expression.Contains(SkillFilterCreator.ContentKeyword.fixed_generic_value.ToStringCustom())) + { + return (-1).ToString(); + } + if (expression.Contains(SkillFilterCreator.ContentKeyword.white_ritual_stack.ToStringCustom())) + { + return 1.ToString(); + } + return "0"; + } + + private static string CreateDefaultOptionValue(string expression) + { + if (expression.Contains('{')) + { + bool flag = false; + bool flag2 = false; + int num = 0; + int count = 0; + for (int i = 0; i < expression.Length; i++) + { + if (expression[i] == '{') + { + flag = true; + num = i; + } + if (expression[i] == '}') + { + flag2 = true; + count = ((i != expression.Length) ? (i - num + 1) : (i - num)); + } + if (flag && flag2) + { + string defaultValue = GetDefaultValue(expression); + expression = expression.Remove(num, count); + expression = expression.Insert(num, defaultValue); + i = 0; + flag = false; + flag2 = false; + } + } + } + return expression; + } + + public static string ConvertSkillDescriptionText(string originalText, Action setupOptionValue = null, bool isPlayer = false, string divergenceId = "", List valueList = null, List replaySkillDescriptionValueList = null) + { + if (originalText == null || originalText == "") + { + return null; + } + string text = originalText; + int num = 0; + List list = new List(); + Dictionary dictionary = new Dictionary(); + while (true) + { + num++; + if (num >= 21) + { + Debug.LogError("Maybe infinity loop. OriginalText=" + originalText); + break; + } + Match match = Regex.Match(text, "<<([^>]+(>[^>])*)+>>"); + string variableNumberText = GetVariableNumberText(text); + if (variableNumberText == string.Empty) + { + break; + } + string text2 = variableNumberText; + bool flag = text2.Contains('?'); + List list2 = null; + if (flag) + { + list2 = text2.Split('?').ToList(); + text2 = list2[0]; + } + bool flag2 = text2.StartsWith("$", StringComparison.Ordinal); + if (flag && flag2) + { + text2 = text2.Remove(0, 1); + } + Action action = setupOptionValue; + bool flag3 = action == null; + if (flag3) + { + if (!flag2) + { + text2 = CreateDefaultOptionValue(text2); + } + action = SetupDefaultOptionValue; + } + bool isSkillDescriptionExpressionValueDefault = !flag2; + if (flag) + { + isSkillDescriptionExpressionValueDefault = ((flag3 || !GameMgr.GetIns().IsNewReplayBattle || text2.Contains("(divergence_id=")) ? EvalExpressionAndCondition(isSkillDescriptionExpressionValueDefault, text2, flag2, flag3, divergenceId, action, dictionary) : (replaySkillDescriptionValueList[num - 1] == 1)); + string empty = string.Empty; + empty = ((!isSkillDescriptionExpressionValueDefault) ? list2[2] : list2[1]); + valueList?.Add(isSkillDescriptionExpressionValueDefault ? 1 : 0); + text = text.Replace("<<" + list2[0] + "?" + list2[1] + "?" + list2[2] + ">>", empty); + continue; + } + SkillOptionValue skillOptionValue = new SkillOptionValue("v=" + text2); + action(skillOptionValue); + isSkillDescriptionExpressionValueDefault = IsSkillDescriptionExpressionValueDefault(text2, action, dictionary); + string text3 = ""; + string text4 = ""; + if (isSkillDescriptionExpressionValueDefault) + { + Match match2 = Regex.Match(text, "\\[[\\w\\d]+\\]([^[]*<<([^>])+>>[^[]*)\\[-\\]"); + MatchCollection matchCollection = Regex.Matches(text, "\\[[\\w\\d]+\\]([^[]*<<([^>])+>>[^[]*)\\[-\\]|<<([^>]+(>[^>])*)+>>"); + if (match2.Success && matchCollection[0].Value == match2.Value) + { + match = match2; + string value = match.Groups[1].Value; + Match match3 = Regex.Match(value, "<<([^>]+(>[^>])*)+>>"); + text3 = value.Substring(0, match3.Index); + text4 = value.Substring(match3.Index + match3.Length); + } + } + string text5 = text.Substring(0, match.Index) + text3; + string text6 = text4 + text.Substring(match.Index + match.Length); + if (Regex.Match(text, "{<<([^>])+>>@").Success) + { + text = text5 + list.Count + text6; + int item = ((flag3 || !GameMgr.GetIns().IsNewReplayBattle) ? skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.v) : replaySkillDescriptionValueList[num - 1]); + list.Add(item.ToString()); + valueList?.Add(item); + } + else + { + int item2 = ((flag3 || !GameMgr.GetIns().IsNewReplayBattle) ? skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.v) : replaySkillDescriptionValueList[num - 1]); + text = text5 + item2 + text6; + valueList?.Add(item2); + } + } + text = Data.SystemText.Convert(text, list.ToArray()); + return text.Replace("\\n", "\n"); + } + + private static bool EvalExpressionAndCondition(bool isSkillDescriptionExpressionValueDefault, string expression, bool isNewExpression, bool isNotBattleScene, string divergenceId, Action setupOptVal, Dictionary evalConditionCache) + { + string[] array = expression.Split('|'); + for (int i = 0; i < array.Length; i++) + { + string text = array[i]; + if (isNewExpression) + { + if (isNotBattleScene) + { + isSkillDescriptionExpressionValueDefault = false; + } + else if (text.StartsWith("(divergence_id=")) + { + text = text.Substring(1, text.Length - 2); + string text2 = text.Split('=')[1]; + isSkillDescriptionExpressionValueDefault |= text2 == divergenceId; + } + else + { + isSkillDescriptionExpressionValueDefault |= EvalNewExpressionAndCondition(text, setupOptVal, evalConditionCache); + } + } + else + { + isSkillDescriptionExpressionValueDefault &= EvalOldExpressionAndCondition(text, setupOptVal, evalConditionCache); + } + } + return isSkillDescriptionExpressionValueDefault; + } + + private static bool EvalNewExpressionAndCondition(string expression, Action setupOptionValue, Dictionary cache) + { + bool flag = true; + string[] array = expression.Split('&'); + for (int i = 0; i < array.Length; i++) + { + SkillTextVariableComareFilter skillTextVariableComareFilter = new SkillTextVariableComareFilter(array[i]); + SkillOptionValue skillOptionValue = new SkillOptionValue("v=" + skillTextVariableComareFilter.Lhs); + setupOptionValue(skillOptionValue); + if (cache.ContainsKey(skillTextVariableComareFilter.Lhs)) + { + skillTextVariableComareFilter.LhsFilteringResult = cache[skillTextVariableComareFilter.Lhs]; + } + else + { + cache[skillTextVariableComareFilter.Lhs] = skillTextVariableComareFilter.FilteringLhs(skillOptionValue); + } + if (cache.ContainsKey(skillTextVariableComareFilter.Rhs)) + { + skillTextVariableComareFilter.RhsFilteringResult = cache[skillTextVariableComareFilter.Rhs]; + } + else + { + cache[skillTextVariableComareFilter.Rhs] = skillTextVariableComareFilter.FilteringRhs(skillOptionValue); + } + flag &= skillTextVariableComareFilter.Filtering(skillOptionValue); + } + return flag; + } + + private static bool EvalOldExpressionAndCondition(string expression, Action setupOptionValue, Dictionary cache) + { + bool flag = false; + string[] array = expression.Split('&'); + for (int i = 0; i < array.Length; i++) + { + string text = array[i]; + bool flag2 = false; + if (!text.Contains("+1")) + { + text += "+1"; + flag2 = true; + } + SkillOptionValue obj = new SkillOptionValue("v=" + text); + setupOptionValue(obj); + bool flag3 = (flag2 ? (!IsSkillDescriptionExpressionValueDefault(text, setupOptionValue, cache)) : IsSkillDescriptionExpressionValueDefault(text, setupOptionValue, cache)); + flag = flag || flag3; + } + return flag; + } + + private static string GetVariableNumberText(string text) + { + _extractedText.Length = 0; + int num = 0; + for (int i = 0; i < text.Length - 1; i++) + { + if (text[i] == '<' && text[i + 1] == '<') + { + if (num > 0) + { + _extractedText.Append(text[i]); + _extractedText.Append(text[i + 1]); + } + i++; + num++; + } + else if (text[i] == '>' && text[i + 1] == '>') + { + num--; + if (num <= 0) + { + break; + } + _extractedText.Append(text[i]); + _extractedText.Append(text[i + 1]); + i++; + } + else if (num > 0) + { + _extractedText.Append(text[i]); + } + } + return _extractedText.ToString(); + } + + private static void SetupDefaultOptionValue(SkillOptionValue optionValue) + { + optionValue.SetVariable("PLAY_COUNT", "0"); + optionValue.SetVariable("HAND_COUNT", "0"); + optionValue.SetVariable("HAND_SPACE_COUNT", "0"); + optionValue.SetVariable("CHANT_COUNT", "0"); + optionValue.SetVariable("CHARGE_COUNT", "0"); + optionValue.SetVariable("DROP_COUNT", "0"); + optionValue.SetVariable("RETURN_COUNT", "0"); + optionValue.SetVariable("INPLAY_ME_COUNT", "0"); + optionValue.SetVariable("INPLAY_OP_COUNT", "0"); + optionValue.SetVariable("INPLAY_UNIT_ME_COUNT", "0"); + optionValue.SetVariable("INPLAY_UNIT_OP_COUNT", "0"); + optionValue.SetVariable("CLASS_ME_LIFE", "0"); + optionValue.SetVariable("CLASS_OP_LIFE", "0"); + optionValue.SetVariable("ADD_CHARGE_COUNT", "0"); + optionValue.SetVariable("ADD_ODD_CHARGE_COUNT", "0"); + optionValue.SetVariable("ADD_EVEN_CHARGE_COUNT", "0"); + } + + private static bool IsSkillDescriptionExpressionValueDefault(string expression, Action setupOptionValue, Dictionary cache) + { + string expression2 = string.Copy(expression); + expression2 = CreateDefaultOptionValue(expression2); + SkillOptionValue skillOptionValue = new SkillOptionValue("v=" + expression2); + SetupDefaultOptionValue(skillOptionValue); + int num; + if (cache.ContainsKey(expression)) + { + num = cache[expression]; + } + else + { + SkillOptionValue skillOptionValue2 = new SkillOptionValue("v=" + expression); + setupOptionValue(skillOptionValue2); + num = (cache[expression] = skillOptionValue2.GetInt(SkillFilterCreator.ContentKeyword.v)); + } + return skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.v) == num; + } + + public virtual VfxBase LoadResource(bool isLogging = false) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(BattleCardView.LoadChoiceTransformCardsResources(this)); + parallelVfxPlayer.Register(BattleCardView.LoadResource()); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(parallelVfxPlayer); + if (isLogging) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + LocalLog.AccumulateLastTraceLog("Loaded" + CardId); + })); + } + return sequentialVfxPlayer; + } + + public virtual VfxBase UnloadResource() + { + return BattleCardView.UnloadResource(); + } + + protected void OnEvolve(bool isSkill) + { + this.OnEvolveEvent(isSkill); + } + + protected VfxBase OnBeforeEvolveEvent(SkillProcessor skillProcessor) + { + return this.OnBeforeEvolve.GetAllFuncVfxResults(skillProcessor); + } + + protected void InitSkill() + { + Skills = _normalSkillCollection; + } + + public virtual VfxBase RecoveryInPlay(int inPlayIndex, bool newReplayMoveTurn = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(new SummonCardPreperationVfx(this)); + sequentialVfxPlayer.Register(new ChangeInPlayViewVfx(BattleCardView)); + sequentialVfxPlayer.Register(CreateMaskCardInPlayVfx()); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + BattleCardView.GameObject.transform.localPosition = InPlayCardControl.CalcPosition(SelfBattlePlayer.InPlayCards.Count(), inPlayIndex, IsPlayer); + BattleCardView.GameObject.SetLayer(10, isSetChildren: true); + BattleCardView.GameObject.SetActive(value: true); + BattleCardView.isHiddenFromInPlayView = false; + SetOnDraw(draw: false); + })); + if (!newReplayMoveTurn) + { + sequentialVfxPlayer.Register(BattleCardView.BattleCardIconAnimations.Initialize(this, Skills)); + } + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectStop()); + sequentialVfxPlayer.Register(SkillApplyInformation.AllSkillEffectRestart()); + return sequentialVfxPlayer; + } + + public abstract BattleCardBase VirtualClone(BattlePlayerBase selfBattlePlayer, BattlePlayerBase opponentBattlePlayer); + + protected void CopyToVirtualCardBase(BattleCardBase target) + { + target.PlayedTurn = PlayedTurn; + target.DeathTypeInfo = DeathTypeInfo.Clone(); + target.BaseParameter = BaseParameter; + target.IsTokenLoad = IsTokenLoad; + target.IsFirstTurn = IsFirstTurn; + target.IsOnMove = IsOnMove; + target.SpellChargeCount = SpellChargeCount; + target.SkillActivatedCount = SkillActivatedCount; + target.ThisTurnSkillActivatedCount = ThisTurnSkillActivatedCount; + target.IsSummonDrunkenness = IsSummonDrunkenness; + target.IsPreviousTurnAttacked = IsPreviousTurnAttacked; + target.IsDestroyedByKiller = IsDestroyedByKiller; + target.IsDestroyedBySkill = IsDestroyedBySkill; + target.AttackableCount = AttackableCount; + target._playedCost = _playedCost; + target._lastCost = _lastCost; + target.IsSkillLost = IsSkillLost; + target.IsReanimate = IsReanimate; + target.DamagedCounter = new ItWasDamagedCounter(DamagedCounter.GetDamageCount(selfTurn: true), DamagedCounter.GetDamageCount(selfTurn: false)); + target.GetOffCards = GetOffCards; + target.TransformInfo = TransformInfo; + for (int i = 0; i < CostModifierList.Count; i++) + { + target.CostModifierList.Add(CostModifierList[i].Clone()); + } + for (int j = 0; j < attackCountinfo.Count; j++) + { + if (attackCountinfo[j].Skill.IsAddAttackCount()) + { + target.attackCountinfo.Add(new AddAttackCountInfo(attackCountinfo[j].Skill, attackCountinfo[j].Count)); + } + else if (attackCountinfo[j].Skill.IsSetAttackCount()) + { + target.attackCountinfo.Add(new SetAttackCountInfo(attackCountinfo[j].Skill, attackCountinfo[j].Count)); + } + } + if (IsEvolution && EvolutionSkills.Count() > 0) + { + target.Skills = target.EvolutionSkills; + } + target.SkillApplyInformation = SkillApplyInformation.Clone(target); + target._buildInfo = _buildInfo.VirtualClone(SelfBattlePlayer, OpponentBattlePlayer); + target.HasSkillNecromance = HasSkillNecromance; + target.Setup(); + } + + public virtual VfxBase CombineVirtualCardSkill(BattleCardBase target) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + IsSkillLost = false; + foreach (SkillBase item in CreateSkillCondition(target._buildInfo.NormalSkillBuildInfos, SelfBattlePlayer, OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + _normalSkillCollection.Add(item); + } + foreach (SkillBase item2 in CreateSkillCondition(target._buildInfo.EvolveSkillBuildInfos, SelfBattlePlayer, OpponentBattlePlayer, _buildInfo.ResourceMgr)) + { + item2.ConditionCheckerList = item2.ConditionCheckerList.Where((ISkillConditionChecker c) => !(c is SkillPreprocessEvolutionEndStop)).ToList(); + item2.PreprocessList = item2.PreprocessList.Where((SkillPreprocessBase c) => !(c is SkillPreprocessEvolutionEndStop)).ToList(); + _evolveSkillCollection.Add(item2); + } + Skills = ((IsEvolution && EvolutionSkills.Count() > 0) ? _evolveSkillCollection : _normalSkillCollection); + SkillApplyInformation.Combine(target.SkillApplyInformation); + int count = target.BuffInfoList.Count; + for (int num = 0; num < count; num++) + { + BuffInfo buffInfo = target.BuffInfoList[num]; + if (!(buffInfo.SkillFrom is Skill_powerup) && !(buffInfo.SkillFrom is Skill_power_down) && !BuffInfoList.Contains(buffInfo)) + { + AddBuffInfo(buffInfo); + } + } + Skills.Complete(); + CostModifierList.AddRange(target.CostModifierList); + attackCountinfo.AddRange(target.attackCountinfo); + if (!SelfBattlePlayer.BattleMgr.IsVirtualBattle && !SelfBattlePlayer.BattleMgr.IsRecovery) + { + parallelVfxPlayer.Register(SequentialVfxPlayer.Create(SkillApplyInformation.AllSkillEffectRestart(), InstantVfx.Create(delegate + { + BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect(); + }), BattleCardView.BattleCardIconAnimations.Initialize(this, Skills))); + } + return parallelVfxPlayer; + } + + public void SetSpellChargeCount(int num) + { + if (num != -1) + { + SpellChargeCount = num; + } + } + + public void AddSpellChargeCount(int num) + { + SpellChargeCount += num; + } + + public VfxBase GetSpellChargeLoopEffect(int num) + { + Func getIsActionCard = () => IsActionCard || IsInplay || BattleCardView._hasCardEnteredPlayQueue; + if (SpellChargeCount == 0 && num > 0) + { + return new HandEffectLoopStartVfx(BattleCardView, getIsActionCard, HandEffectLoopStartVfx.HandEffectType.SpellCharge); + } + return NullVfx.GetInstance(); + } + + public BattleCardBase GetDamageReflectionTarget(bool isSkillDamage) + { + if (SkillApplyInformation.IsReflectionClass && (isSkillDamage || SkillApplyInformation.ReflectionInfoList.Any((ReflectionInfo b) => b.Type == ReflectionInfo.DamageType.ALL))) + { + return OpponentBattlePlayer.Class; + } + return this; + } + + public VfxBase CalcHandCost(bool playEffect = true, bool isOnlyFixedUseCost = false) + { + if (SelfBattlePlayer.BattleMgr.IsRecovery) + { + return NullVfx.GetInstance(); + } + if (IsInHand) + { + List costList = BattleCardView.GetUseCostList(Cost); + return InstantVfx.Create(delegate + { + BattleCardView.UpdateCost(costList, isGenerateInHand: true, playEffect, isForceUpdate: false, isOnlyFixedUseCost); + }); + } + return NullVfx.GetInstance(); + } + + public void UpdateCostViewStrategy(bool isForceUpdate = false) + { + BattleCardView.UpdateCostViewStrategy(isForceUpdate); + } + + public void InitHandParameterIconPos(HandParameter.IconLayout layout) + { + BattleCardView.InitHandParameterIconPos(layout); + } + + public IEnumerable AsIEnumerable() + { + yield return this; + } + + public bool IsHoverActionCard() + { + if (IsClass) + { + return false; + } + if (IsOnMove) + { + return false; + } + if (IsOnDraw) + { + return false; + } + if (!GameMgr.GetIns().IsAdmin && !IsPlayer && IsInHand) + { + return false; + } + return true; + } + + public List GetSelectSkillsNoDuplication(List skills) + { + List list = new List(); + BattlePlayerPair playerInfoPair = new BattlePlayerPair(SelfBattlePlayer, OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + for (int i = 0; i < skills.Count; i++) + { + SkillBase skillBase = skills[i]; + int val = ((skillBase.IsBurialRite && !skillBase.IsUserSelectType) ? 1 : skillBase.GetSelectableCards(playerInfoPair, option, isSkipForceSelect: true).Count()); + int num = Math.Min(skillBase.GetSkillSelectCount(), val); + for (int j = 0; j < num; j++) + { + list.Add(skillBase); + } + } + if (list.Count == 0) + { + list.AddRange(skills); + } + return list; + } + + public int GetBurialRiteCount(BattlePlayerReadOnlyInfoPair playerInfoPair, SkillConditionCheckerOption option, bool isPrePlay) + { + if (BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView._isEvolutionSkillSelect) + { + return EvolutionSkills.Count((SkillBase s) => s.CheckConditionWithoutBurialRite(playerInfoPair, option, isPrePlay)); + } + return Skills.Count((SkillBase s) => s.CheckConditionWithoutBurialRite(playerInfoPair, option, isPrePlay)); + } + + public void ReplaceParameterAndSkillOnDeck(int id) + { + _buildInfo.CardId = id; + CreateParameter(); + InitSkillApplyInformationOnWhenReturn(); + } + + public bool HasInductionSkill() + { + for (int i = 0; i < Skills.Count(); i++) + { + SkillBase skillBase = Skills.ElementAt(i); + if (skillBase.IsInductionSkill && skillBase.SkillPrm.buildInfo._icon == "induction") + { + return true; + } + } + return false; + } + + public bool HasInductionNumberSkill() + { + for (int i = 0; i < Skills.Count(); i++) + { + SkillBase skillBase = Skills.ElementAt(i); + if (skillBase.IsInductionSkill && skillBase.SkillPrm.buildInfo._icon != "induction" && skillBase.SkillPrm.buildInfo._icon.Contains("induction")) + { + return true; + } + } + return false; + } + + public int GetInductionLabelNumber() + { + SkillBase skillBase = Skills.FirstOrDefault((SkillBase s) => s.IsInductionSkill && s.SkillPrm.buildInfo._icon != "induction" && s.SkillPrm.buildInfo._icon.Contains("induction")); + if (skillBase == null) + { + return -1; + } + SkillOptionValue skillOptionValue = new SkillOptionValue(skillBase.SkillPrm.buildInfo._icon); + skillOptionValue.SetupFilterVariable(BattleManagerBase.GetIns().GetBattlePlayerInfoPair(IsPlayer), this, isPrePlay: false, null); + return skillOptionValue.GetInt(SkillFilterCreator.ContentKeyword.induction); + } + + public bool HasStackWhiteRitualAndOtherIconSkill() + { + if (HasSkillStackWhiteRitual) + { + if (!HasInductionSkill() && !HasInductionNumberSkill()) + { + return HasSkillWhenDestroy; + } + return true; + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleManagerBase.cs b/SVSim.BattleEngine/Engine/BattleManagerBase.cs new file mode 100644 index 0000000..d6fa1d1 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleManagerBase.cs @@ -0,0 +1,2443 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Mulligan; +using Wizard.Battle.Phase; +using Wizard.Battle.Resource; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; +using Wizard.BattleMgr; + +public class BattleManagerBase +{ + public class CardParameterListInfo + { + public IList HolderCards { get; set; } + + public CardParameterListInfo() + { + HolderCards = new List(); + } + + public void Clear() + { + HolderCards.Clear(); + } + } + + public class XorShift + { + private int w = 111111111; + + private int x = 123456789; + + private int y = 987654321; + + private int z = 555555555; + + public bool IsActive { get; private set; } + + public XorShift(int seed = -1) + { + IsActive = seed != -1; + w = seed; + } + + public int GetChangeInt(double val) + { + double num = Math.Floor((double)Next() / 2147483647.0 * 10000000000.0) / 10000000000.0; + return (int)Math.Floor(val * num); + } + + private int Next() + { + int num = x ^ (x << 11); + x = y; + y = z; + z = w; + return w = w ^ (w >> 19) ^ (num ^ (num >> 8)); + } + } + + public class IndexInfo + { + public int AddIndex { get; private set; } + + public int TargetIndex { get; private set; } + + public bool IsSkillCopy { get; private set; } + + public int CopySkillSelectIndex { get; private set; } + + public IndexInfo(int addIndex = -1, int targetIndex = -1, bool skillCopy = false, int copySelectIndex = -1) + { + AddIndex = addIndex; + TargetIndex = targetIndex; + IsSkillCopy = skillCopy; + CopySkillSelectIndex = copySelectIndex; + } + } + + public class MissionNecessaryInformation + { + private Dictionary NecessaryTargetDictionary; + + private Dictionary _originalTargetDictionary; + + private const string MISSION_INFO_EQUAL = "mission_info="; + + public MissionNecessaryInformation(Dictionary targetDictionary) + { + _originalTargetDictionary = targetDictionary; + NecessaryTargetDictionary = new Dictionary(); + foreach (KeyValuePair item in targetDictionary) + { + SkillOptionValue value = new SkillOptionValue(SkillCreator.ParseContentInfos("mission_info=" + item.Value)); + NecessaryTargetDictionary.Add(item.Key, value); + } + } + + public Dictionary GetMissionNecessaryInfo(BattlePlayerPair pair, BattleCardBase selfClass) + { + Dictionary dictionary = new Dictionary(); + foreach (KeyValuePair item in NecessaryTargetDictionary) + { + SkillCollectionBase.SetupOptionValue(item.Value, pair, selfClass, null); + dictionary.Add(item.Key, item.Value.GetInt(SkillFilterCreator.ContentKeyword.mission_info, 0)); + } + return dictionary; + } + + public Dictionary GetOriginalTargetDictionary() + { + return _originalTargetDictionary; + } + } + + public class CalledCreateFilterPair + { + private readonly IReadOnlyBattleCardInfo _ownerCard; + + private readonly string _checkText; + + public CalledCreateFilterPair(IReadOnlyBattleCardInfo ownerCard, string checkText) + { + _ownerCard = ownerCard; + _checkText = checkText; + } + + public bool Equal(CalledCreateFilterPair piar) + { + if (piar._ownerCard == _ownerCard) + { + return piar._checkText == _checkText; + } + return false; + } + + public bool HasOwnerCard() + { + if (_ownerCard != null) + { + return _ownerCard.SkillApplyInformation != null; + } + return false; + } + + public bool IsOwnerCardDead() + { + if (!BattleLogManager.GetInstance().EnemyFusionCard.Contains(_ownerCard)) + { + if (!_ownerCard.IsDead) + { + if (!_ownerCard.IsInHand) + { + return !_ownerCard.IsInplay; + } + return false; + } + return true; + } + return false; + } + } + + public class CardCreateInfo + { + public readonly bool IsPlayer; + + public readonly NetworkBattleDefine.NetworkCardPlaceState PlaceStatus; + + public readonly IndexInfo IndexInfo; + + public readonly bool IsChoice; + + public readonly bool IsReferenceOpponenCard; + + public int Id { get; private set; } + + public SkillBase Skill { get; private set; } + + public int Cost { get; private set; } = -1; + + public CardCreateInfo(int id, bool isPlayer, bool isChoice, NetworkBattleDefine.NetworkCardPlaceState placeStatus, bool isReferenceOpponentCard = false, SkillBase skill = null) + { + Id = id; + IsPlayer = isPlayer; + PlaceStatus = placeStatus; + IsChoice = isChoice; + IsReferenceOpponenCard = isReferenceOpponentCard; + Skill = skill; + } + + public void SetId(int id) + { + Id = id; + } + + public void SetCost(int cost) + { + Cost = cost; + } + } + + public enum BATTLE_RESULT_TYPE + { + NONE, + WIN, + LOSE, + CONSISTENCY + } + + public enum FINISH_TYPE + { + NORMAL, + RETIRE, + SPECIAL_WIN + } + + protected class AttachInfo + { + public BattleCardBase _classCard; + + public SkillBase _attachSkill; + + public SkillCreator.SkillBuildInfo _targetSkillBuildInfo; + + public string _myRotationBonusId; + + public AttachInfo(BattleCardBase classCard, SkillBase attachSkill, SkillCreator.SkillBuildInfo targetSkillBuildInfo, string myRotationBonusId = "") + { + _classCard = classCard; + _attachSkill = attachSkill; + _targetSkillBuildInfo = targetSkillBuildInfo; + _myRotationBonusId = myRotationBonusId; + } + } + + public class ResourceInfo + { + public string ObjectPath { get; private set; } + + public string SePath { get; private set; } + + public string ObjectFullPath { get; private set; } + + public bool IsEffectBattleInfoDictionary { get; set; } + + public ResourceInfo(string objectPath, string sePath) + { + ObjectPath = objectPath; + SePath = sePath; + ObjectFullPath = Toolbox.ResourcesManager.GetAssetTypePath(objectPath, ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true); + } + + public ResourceInfo(string objectFullPath) + { + ObjectPath = string.Empty; + SePath = string.Empty; + ObjectFullPath = objectFullPath; + } + } + + private Dictionary _calledCreateFilterDictionary = new Dictionary(); + + private Dictionary _calledCreateLimitFilterDictionary = new Dictionary(); + + private Dictionary _calledCreateOrFilterDictionary = new Dictionary(); + + public const int SIMPLE_STAGE_ID = 9; + + public const int NEW_INDEX = -1; + + public static readonly int FIRST_PLAYER_EP_NUM = 2; + + public static readonly int SECOND_PLAYER_EP_NUM = 3; + + protected const int FIRST_PLAYER_EVOLVE_WAIT_TURN = 5; + + protected const int SECOND_PLAYER_EVOLVE_WAIT_TURN = 4; + + public SBattleLoad SBattleLoad; + + protected IBattleMgrContentsCreator _contentsCreator; + + public EmoteUI EmoteUI; + + public BattleEnemy BattleEnemy; + + public BattlePlayer BattlePlayer; + + public GameObject BtlContainer; + + public GameObject BtlUIContainer; + + public GameObject CutInContainer; + + public GameObject Battle3DContainer; + + public GameObject SubParticleContainer; + + protected BattleCamera _battleCamera; + + protected BackGroundBase _backGround; + + public DetailMgr DetailMgr; + + public PanelMgr PanelMgr; + + public IMulliganMgr MulliganMgr; + + protected Camera _subParticleCamera; + + public IEnemyAI EnemyAI; + + public GameObject CardHolder; + + public GameObject ECardHolder; + + public GameObject PCardPlace; + + public GameObject ChoiceCardHolder; + + public GameObject EvolveCardHolder; + + public GameObject Arrow; + + public ArrowControl ArrowControl; + + public GameObject AttackArrowHead; + + public GameObject EvolutionArrowHead; + + public GameObject AlertDialogue; + + public UILabel AlertDialogueLabel; + + public GameObject PSideLog; + + public SideLogControl PSideLogControl; + + public GameObject ESideLog; + + public SideLogControl ESideLogControl; + + public GameObject ESelectSkillSideLog; + + public SideLogControl ESelectSkillSideLogControl; + + private const string UnityEventAgentStr = "Prefab/Game/UnityEventAgent"; + + public ITurnPanelControl TurnPanelControl; + + public GameObject BattleResult; + + public BattleResultUIController BattleResultControl; + + public GameObject BattleStart; + + public BattleStartControl BattleStartControl; + + public CardParameterListInfo PlayerCardParameterListInfo = new CardParameterListInfo(); + + public CardParameterListInfo EnemyCardParameterListInfo = new CardParameterListInfo(); + + public List TransformCardList = new List(); + + public bool IsFirst; + + public Transform SubUI; + + public TweenAlpha SubUIOverLayBG; + + public GameObject MenuButtonObject; + + public int isStorySuccessful; + + protected int _allPublishedActiveSkillCount; + + protected int _temporaryPublishedAddCount; + + public const int NOT_LETHAL_PUBLISHED_COUNT = -1; + + protected int _lethalPublishedActiveSkillCount = -1; + + protected int _lethalMovementCount; + + protected int _allPublishedDamageModifierCount; + + protected int _allPublishedHealModifierCount; + + public int FirstTurn; + + public int SecondTurn; + + public int GroundID; + + public int DamageCount; + + private GameObject _unityEventAgentObject; + + private UnityEventAgent _unityEventAgent; + + protected IPhase _phase; + + private NetworkTouchControl _networkTouchControl; + + private static BattleManagerBase main; + + public static bool IsRandomDraw = false; + + public static bool IsForecast = false; + + public BattleLifeTimeSharedObject BattleLifeTimeSharedObject; + + private BattleUIContainer _battleUIContainer; + + protected System.Random _stableRandom; + + protected System.Random _stableRandomOnlySelf; + + private int stableRandomCount; + + protected XorShift _selfXorShiftRandom; + + protected XorShift _oppXorShiftRandom; + + public bool IsKeyboardEnable = true; + + public static bool IsTutorial + { + get + { + if (Data.Load.data._userTutorial.tutorial_step == 100) + { + return false; + } + return true; + } + } + + protected virtual bool IsStoryTutorial => false; + + protected virtual bool DisableCustomMouse => false; + + public static bool UseCustomMouse + { + get + { + bool flag = GetIns()?.DisableCustomMouse ?? false; + if (InputMgr.MouseControl) + { + return !flag; + } + return false; + } + } + + public static bool UseKeyboard + { + get + { + bool flag = GetIns()?.IsStoryTutorial ?? false; + GameMgr ins = GameMgr.GetIns(); + bool isWatchBattle = ins.IsWatchBattle; + bool isReplayBattle = ins.IsReplayBattle; + if (InputMgr.KeyboardControl && !flag && !isWatchBattle) + { + return !isReplayBattle; + } + return false; + } + } + + public static bool UseKeyboardTurnEndSpaceShortcut + { + get + { + if (UseKeyboard) + { + return InputMgr.KeyboardControlSpace; + } + return false; + } + } + + public int BackgroundId { get; private set; } + + public string BgmId { get; private set; } + + public bool IsBackGroundLoad => _backGround.IsLoadDone; + + public BattleCamera Camera => _battleCamera; + + public BackGroundBase BackGround => _backGround; + + public Camera SubParticleCamera => _subParticleCamera; + + public int AllPublishedActiveSkillCount + { + get + { + return _allPublishedActiveSkillCount; + } + set + { + _allPublishedActiveSkillCount = value; + } + } + + public int TemporaryPublishedAddCount + { + get + { + return _temporaryPublishedAddCount; + } + protected set + { + _temporaryPublishedAddCount = value; + } + } + + public List PublishedSkillList { get; protected set; } + + public int LethalPublishedActiveSkillCount + { + get + { + return _lethalPublishedActiveSkillCount; + } + set + { + _lethalPublishedActiveSkillCount = value; + } + } + + public int LethalMovementCount + { + get + { + return _lethalMovementCount; + } + set + { + _lethalMovementCount = value; + } + } + + public int AllPublishedDamageModifierCount + { + get + { + return _allPublishedDamageModifierCount; + } + set + { + _allPublishedDamageModifierCount = value; + } + } + + public int AllPublishedHealModifierCount + { + get + { + return _allPublishedHealModifierCount; + } + set + { + _allPublishedHealModifierCount = value; + } + } + + public int NextIndividualId { get; private set; } = 1; + + public int CurrentTurn + { + get + { + if (!BattlePlayer.IsSelfTurn) + { + return BattleEnemy.Turn; + } + return BattlePlayer.Turn; + } + } + + public virtual TouchControl TouchControl { get; protected set; } + + public virtual OperateMgr OperateMgr { get; protected set; } + + public IPhaseCreator PhaseCreator { get; private set; } + + public bool IsPreRecovery { get; set; } + + public bool IsRecovery { get; set; } + + public bool IsPuzzleMgr => this is PuzzleBattleManager; + + public virtual bool IsBattleEnd + { + get + { + if (BattlePlayer != null && BattleEnemy != null && !BattlePlayer.Class.IsDead) + { + return BattleEnemy.Class.IsDead; + } + return true; + } + } + + public IBattleResourceMgr BattleResourceMgr { get; private set; } + + public VfxMgr VfxMgr { get; protected set; } + + public virtual bool IsStopOperate => false; + + public BattleUIContainer BattleUIContainer + { + get + { + return _battleUIContainer; + } + set + { + _battleUIContainer = value; + if (Prediction == null || !(_battleUIContainer != null)) + { + return; + } + _battleUIContainer.ShowPrediction = delegate(bool isPress) + { + if (isPress) + { + Prediction.TurnEnd(); + } + else + { + Prediction.Clear(); + } + }; + } + } + + public bool HasFocus => _unityEventAgent.HasFocus; + + public double randomResult { get; protected set; } + + public bool IsMulliganEnd { get; set; } + + public bool IsTurnEnd { get; protected set; } + + public virtual bool IsVirtualBattle => IsForecast; + + public virtual bool IsVirtualBattleEnemyTurn + { + get + { + if (EnemyAI is EnemyAI) + { + return BattleEnemy.IsSelfTurn; + } + return false; + } + } + + public bool IsPlayerRetire { get; protected set; } + + public Prediction Prediction { get; private set; } + + public event Action OnStartOpening; + + public event Action OnWin; + + public event Action OnBattleSettingInfoClear; + + public event Action OnBattleFinish; + + public event Func OnSubmitMulligan; + + public void AddPublishedSkillList(SkillBase skill) + { + PublishedSkillList.Add(skill); + } + + public void IncrementIndividualId() + { + NextIndividualId++; + } + + public virtual int GetMaxDeckCount(bool isSelf) + { + return 40; + } + + public XorShift XorShiftRandom(bool isSelf) + { + if (!isSelf) + { + return _oppXorShiftRandom; + } + return _selfXorShiftRandom; + } + + public static BattleManagerBase GetIns() + { + return main; + } + + protected BattleManagerBase(IBattleMgrContentsCreator contentsCreator) + { + main = this; + BattleLifeTimeSharedObject = new BattleLifeTimeSharedObject(); + PublishedSkillList = new List(); + _contentsCreator = contentsCreator; + BattleResourceMgr = _contentsCreator.CreateResourceMgr(); + _stableRandom = new System.Random(_contentsCreator.RandomSeed); + _stableRandomOnlySelf = new System.Random(_contentsCreator.RandomSeed); + BackgroundId = CreateBackgroundId(); + BgmId = CreateBgmId(); + CreateManager(); + BattlePlayer = CreateBattlePlayer(); + BattleEnemy = CreateBattleEnemy(); + BattlePlayer.ClassAndInPlayCardList[0].Setup(); + BattleEnemy.ClassAndInPlayCardList[0].Setup(); + PhaseCreator = _contentsCreator.CreatePhaseCreator(this); + PhaseCreator.CreateFirstPhase().Setup(); + EmoteUI = null; + PanelMgr = null; + SBattleLoad = null; + IsFirst = false; + BattlePlayer.EvolveWaitTurnCount = 0; + BattleEnemy.EvolveWaitTurnCount = 0; + FirstTurn = (SecondTurn = 0); + EnemyAI = null; + BtlContainer = null; + BtlUIContainer = null; + CutInContainer = null; + Battle3DContainer = null; + SubParticleContainer = null; + CardHolder = null; + PCardPlace = null; + ECardHolder = null; + Arrow = null; + ArrowControl = null; + AttackArrowHead = null; + EvolutionArrowHead = null; + AlertDialogue = null; + TurnPanelControl = null; + BattleResult = null; + BattleResultControl = null; + BattleStart = null; + BattleStartControl = null; + SubUI = null; + SubUIOverLayBG = null; + MenuButtonObject = null; + GameMgr.GetIns().GetPrefabMgr().Load("Prefab/Game/UnityEventAgent"); + _unityEventAgentObject = UnityEngine.Object.Instantiate(GameMgr.GetIns().GetPrefabMgr().Get("Prefab/Game/UnityEventAgent")); + _unityEventAgent = _unityEventAgentObject.GetComponent(); + _unityEventAgent.SetBattleMgr(this); + Prediction = new Prediction(BattleResourceMgr, GetBattlePlayerPair(isPlayer: true)); + TouchControl = new TouchControl(this, _battleCamera, _backGround); + OperateMgr = CreateOperateMgr(); + VfxMgr = _contentsCreator.CreateVfxMgr(); + VfxBase vfx = ChangePhase(PhaseCreator.CreateFirstPhase()); + VfxMgr.RegisterSequentialVfx(vfx); + SetupEvent(); + FirstRecoverySetting(); + FirstReplaySetting(); + OnBattleSettingInfoClear += delegate + { + GameMgr.GetIns().GetDataMgr().SetStoryBgmID("NONE"); + }; + LocalLog.AccumulateSettingLog(); + } + + protected virtual void FirstRecoverySetting() + { + StartRecoveryRecording(); + } + + public void StartRecoveryRecording() + { + _contentsCreator.RecoveryRecordManager.SetupRecording(this, GameMgr.GetIns().GetDataMgr().m_BattleType, _contentsCreator.RandomSeed, BackgroundId, BgmId); + } + + protected virtual void FirstReplaySetting() + { + StartReplayRecording(); + } + + public void StartReplayRecording() + { + _contentsCreator.ReplayRecordManager.SetupRecording(this); + } + + public void SetupReplayBattleInfoFilter() + { + _contentsCreator.ReplayRecordManager.SetupBattleInfoFilter(); + } + + public void CreateXorShift(int selfIdxSeed, int oppIdxSeed = -1) + { + if (selfIdxSeed != -1) + { + _selfXorShiftRandom = new XorShift(selfIdxSeed); + } + if (oppIdxSeed != -1) + { + _oppXorShiftRandom = new XorShift(oppIdxSeed); + } + } + + public void SetBattleMenuBtn() + { + MenuButtonObject = BtlUIContainer.transform.Find("BattleMenuBtn").gameObject; + SetBattleMenuBtnVisibility(); + } + + public virtual void SetBattleMenuBtnVisibility() + { + MenuButtonObject.SetActive(value: false); + } + + protected virtual int CreateBackgroundId() + { + int backGroundId = _contentsCreator.RecoveryManager.BackGroundId; + if (backGroundId >= 0) + { + return backGroundId; + } + int result = 1; + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (dataMgr.m_BattleType == DataMgr.BattleType.BossRushQuest && PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SIMPLE_STAGE)) + { + result = 9; + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.Story || dataMgr.IsQuestBattleType() || GameMgr.GetIns().IsPuzzleQuest) + { + result = dataMgr.GetSoroPlay3DFieldID(); + } + else if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SIMPLE_STAGE)) + { + result = 9; + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.Practice && dataMgr.GetSoroPlay3DFieldID() != 0) + { + result = CalculationRandomStage(); + } + else if (!IsTutorial) + { + result = UnityEngine.Random.Range(1, 8); + } + return result; + } + + protected int CalculationRandomStage() + { + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SIMPLE_STAGE)) + { + return 9; + } + List list = new List(); + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.USE_OFF_STAGE)) + { + list = PlayerPrefsWrapper.CreateServerSendStageOffList(); + } + List list2 = new List(); + for (int i = 0; i < Data.Load.data.OpenBattleFieldIdList.Count; i++) + { + int item = int.Parse(Data.Load.data.OpenBattleFieldIdList[i]); + if (!list.Contains(item)) + { + list2.Add(item); + } + } + if (list2.Count == 0) + { + return 9; + } + return list2[UnityEngine.Random.Range(0, list2.Count)]; + } + + protected virtual string CreateBgmId() + { + string bgmId = _contentsCreator.RecoveryManager.BgmId; + if (bgmId != "NONE") + { + return bgmId; + } + string result = "NONE"; + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (dataMgr.m_BattleType == DataMgr.BattleType.Story || dataMgr.IsQuestBattleType()) + { + result = dataMgr.GetStoryBgmID(); + } + return result; + } + + public BackGroundBase CreateBattleField() + { + _backGround.CreateField(_battleCamera, Battle3DContainer, CutInContainer); + GameMgr.GetIns().GetInputMgr().SetBackGround(_backGround); + return _backGround; + } + + protected void CreateManager() + { + _battleCamera = new BattleCamera(); + GameMgr.GetIns().GetInputMgr().SetBattleCamera(_battleCamera); + DetailMgr = new DetailMgr(); + switch (BackgroundId) + { + case 1: + _backGround = new ForestField(BgmId); + break; + case 2: + _backGround = new CastleField(BgmId); + break; + case 3: + _backGround = new VolcanoField(BgmId); + break; + case 4: + _backGround = new RoyalPalaceField(BgmId); + break; + case 5: + _backGround = new TempleField(BgmId); + break; + case 6: + _backGround = new ChateauField(BgmId); + break; + case 7: + _backGround = new LaboratoryField(BgmId); + break; + case 8: + _backGround = new GateField(BgmId); + break; + case 9: + _backGround = new ArenaField(BgmId); + break; + case 10: + _backGround = new PlazField(BgmId); + break; + case 11: + _backGround = new ForestNightField(BgmId); + break; + case 14: + _backGround = new RoyalPalaceNightField(BgmId); + break; + case 15: + _backGround = new TempleNightField(BgmId); + break; + case 17: + _backGround = new LaboratoryNightField(BgmId); + break; + case 18: + _backGround = new YuwanField(BgmId); + break; + case 20: + _backGround = new PlazRiotingField(BgmId); + break; + case 21: + _backGround = new HillField(BgmId); + break; + case 22: + _backGround = new AlleyField(BgmId); + break; + case 23: + _backGround = new HillRiotingField(BgmId); + break; + case 30: + _backGround = new IronField(BgmId); + break; + case 31: + _backGround = new NateField(BgmId); + break; + case 32: + _backGround = new Nat2Field(BgmId); + break; + case 33: + _backGround = new Nat3Field(BgmId); + break; + case 34: + _backGround = new Nat4Field(BgmId); + break; + case 41: + _backGround = new RivayleField(BgmId); + break; + case 42: + _backGround = new RivayleBackalleyField(BgmId); + break; + case 43: + _backGround = new VellsarDesertField(BgmId); + break; + case 51: + _backGround = new Field51(BgmId); + break; + case 52: + _backGround = new Field52(BgmId); + break; + case 61: + _backGround = new Field61(BgmId); + break; + case 62: + _backGround = new Field62(BgmId); + break; + case 71: + _backGround = new Field71(BgmId); + break; + case 72: + _backGround = new Field72(BgmId); + break; + case 73: + _backGround = new Field73(BgmId); + break; + case 74: + _backGround = new Field74(BgmId); + break; + case 75: + _backGround = new Field75(BgmId); + break; + case 76: + _backGround = new Field76(BgmId); + break; + case 1001: + _backGround = new SpecialArenaField(BgmId); + break; + case 1002: + _backGround = new llField(); + break; + case 1003: + _backGround = new PriConnField(BgmId); + break; + case 1004: + _backGround = new StageField(BgmId); + break; + case 1005: + _backGround = new Field1005(BgmId); + break; + case 1006: + _backGround = new Field1006(BgmId); + break; + case 1007: + _backGround = new Field1007(BgmId); + break; + case 1008: + _backGround = new Field1008(BgmId); + break; + case 1009: + _backGround = new Field1009(BgmId); + break; + case 1010: + _backGround = new Field1010(BgmId); + break; + case 1011: + _backGround = new Field1011(BgmId); + break; + case 1012: + _backGround = new Field1012(BgmId); + break; + } + } + + protected virtual OperateMgr CreateOperateMgr() + { + return new OperateMgr(this, TouchControl); + } + + protected virtual BattlePlayer CreateBattlePlayer() + { + return new BattlePlayer(this, _battleCamera, _backGround, CreatePlayerInnerOptionsBuilder()); + } + + protected virtual BattleEnemy CreateBattleEnemy() + { + return new BattleEnemy(this, _battleCamera, _backGround, CreateEnemyInnerOptionsBuilder()); + } + + public virtual IInnerOptionsBuilder CreatePlayerInnerOptionsBuilder() + { + return new PlayerInnerOptionsBuilder(BattleResourceMgr); + } + + public virtual IInnerOptionsBuilder CreateEnemyInnerOptionsBuilder() + { + return NullInnerOptionsBuilder.GetInstance(); + } + + public virtual void StartOpening(int FirstAttack) + { + LocalLog.AccumulateLastTraceLog("StartOpening"); + FirstAttack = GetFirstAttack(FirstAttack); + bool doesPlayerGoFirst = FirstAttack == 0; + SetupInitialGameState(doesPlayerGoFirst, areCardsRandomlyDrawn: true, 20, 20); + VfxBase vfx = ChangePhase(PhaseCreator.CreateOpeningPhase()); + SkillProcessor skillProcessor = new SkillProcessor(); + VfxBase vfx2 = BattlePlayer.StartSkillWhenBattleStart(skillProcessor); + VfxMgr.RegisterSequentialVfx(vfx); + VfxMgr.RegisterSequentialVfx(vfx2); + this.OnStartOpening.Call(IsFirst); + } + + public virtual void SetupInitialGameState(bool doesPlayerGoFirst, bool areCardsRandomlyDrawn, int playerMaxLife, int enemyMaxLife) + { + IsFirst = doesPlayerGoFirst; + IsRandomDraw = areCardsRandomlyDrawn; + InitializeClassLife(playerMaxLife, enemyMaxLife); + SetUpMyRotationBattle(playerMaxLife, enemyMaxLife); + SetupAvatarBattle(doesPlayerGoFirst); + TurnPanelControl.Initialize(); + SetupEvolCount(doesPlayerGoFirst); + } + + protected virtual void SetupInitialGameState(bool doesPlayerGoFirst, bool areCardsRandomlyDrawn, int playerCurrentLife, int enemyCurrentLife, int playerMaxLife, int enemyMaxLife, int playerEvolCount, int enemyEvolCount, int playerEvolWaitTurnCount, int enemyEvolWaitTurnCount, int playerInitialPp, int enemyInitialPp, int playerInitialCemeteryAmount, int enemyInitialCemeteryAmount, int currentTurnNumber, bool showTurnsLeftUntilEvolve) + { + IsFirst = doesPlayerGoFirst; + IsRandomDraw = areCardsRandomlyDrawn; + InitializeClassLife(playerMaxLife, enemyMaxLife); + TurnPanelControl.Initialize(showTurnsLeftUntilEvolve, showTurnsLeftUntilEvolve); + int maxEvolCount = (doesPlayerGoFirst ? FIRST_PLAYER_EP_NUM : SECOND_PLAYER_EP_NUM); + int maxEvolCount2 = ((!doesPlayerGoFirst) ? FIRST_PLAYER_EP_NUM : SECOND_PLAYER_EP_NUM); + InitializePlayer(BattlePlayer, playerEvolCount, maxEvolCount, playerEvolWaitTurnCount, playerInitialPp, playerInitialCemeteryAmount, playerCurrentLife, playerMaxLife); + InitializePlayer(BattleEnemy, enemyEvolCount, maxEvolCount2, enemyEvolWaitTurnCount, enemyInitialPp, enemyInitialCemeteryAmount, enemyCurrentLife, enemyMaxLife); + FirstTurn = currentTurnNumber; + SecondTurn = currentTurnNumber; + } + + public void SetupEvolCount(bool doesPlayerGoFirst) + { + BattlePlayerBase battlePlayerBase; + BattlePlayerBase battlePlayerBase2; + if (doesPlayerGoFirst) + { + battlePlayerBase = BattlePlayer; + battlePlayerBase2 = BattleEnemy; + } + else + { + battlePlayerBase = BattleEnemy; + battlePlayerBase2 = BattlePlayer; + } + SetPlayerInitialEp(battlePlayerBase, FIRST_PLAYER_EP_NUM, FIRST_PLAYER_EP_NUM, 5); + SetPlayerInitialEp(battlePlayerBase2, SECOND_PLAYER_EP_NUM, SECOND_PLAYER_EP_NUM, 4); + } + + public void SetPlayerInitialEp(BattlePlayerBase battlePlayerBase, int usableEp, int maxEp, int turnsLeftUntilCanEvolve) + { + battlePlayerBase.SetCurrentEpCount(usableEp); + battlePlayerBase.EpTotal = maxEp; + battlePlayerBase.EvolveWaitTurnCount = turnsLeftUntilCanEvolve; + } + + private void InitializeClassLife(int playerMaxLife, int enemyMaxLife) + { + ((ClassBattleCardBase)BattlePlayer.Class).InitBaseMaxLife(playerMaxLife); + ((ClassBattleCardBase)BattleEnemy.Class).InitBaseMaxLife(enemyMaxLife); + } + + private void InitializePlayer(BattlePlayerBase battlePlayerBase, int evolCount, int maxEvolCount, int evolWaitTurnCount, int initialPp, int initialCemeteryAmount, int currentLife, int maxLife) + { + SetPlayerInitialEp(battlePlayerBase, evolCount, maxEvolCount, evolWaitTurnCount); + battlePlayerBase.SetPpTotal(initialPp, isUpdatePp: true, null); + for (int i = 0; i < initialCemeteryAmount; i++) + { + BattleCardBase item = CardCreatorBase.CreateDummyInstance(); + battlePlayerBase.CemeteryList.Add(item); + } + if (currentLife < maxLife) + { + battlePlayerBase.Class.SkillApplyInformation.DamageLife(maxLife - currentLife, -1, isSelfTurn: false); + } + } + + protected virtual void SetupEvent() + { + BattlePlayer.OnTurnEndFinish += delegate + { + BattleResourceMgr.UnloadEffectBattle(); + BattlePlayer.PlayerBattleView.ResetTouchable(); + return NullVfx.GetInstance(); + }; + BattleEnemy.OnTurnEndFinish += delegate + { + BattleResourceMgr.UnloadEffectBattle(); + return NullVfx.GetInstance(); + }; + } + + public VfxBase ControlTurnStartPlayer() + { + return ControlTurnStart(BattleEnemy, BattlePlayer, IsFirst); + } + + public VfxBase ControlTurnStartOpponent() + { + return ControlTurnStart(BattlePlayer, BattleEnemy, !IsFirst); + } + + private VfxBase ControlTurnStart(BattlePlayerBase selfBattlePlayer, BattlePlayerBase opponentBattlePlayer, bool didPlayerGoFirst) + { + if (IsBattleEnd) + { + return NullVfx.GetInstance(); + } + int num = 0; + VfxBase result; + if (selfBattlePlayer.IsExtraTurn) + { + result = selfBattlePlayer.StartTurnControl("ExtraTurn"); + selfBattlePlayer.DecreasesExtraTurnCount(); + num = selfBattlePlayer.Turn; + } + else + { + result = opponentBattlePlayer.StartTurnControl("Normal"); + opponentBattlePlayer.DecreasesExtraTurnCount(); + num = opponentBattlePlayer.Turn; + } + if (num >= 1) + { + LocalLog.SetLastTraceLogTurn(num); + } + return result; + } + + public virtual void SetUpOperateEvent(OperateMgr operateMgr) + { + SetupEndTurnButtonEvents(operateMgr); + } + + public virtual void SetupBattlePlayersEvent() + { + BattlePlayer.OnSetupCardEvent += SetupCardEvent; + BattleEnemy.OnSetupCardEvent += SetupCardEvent; + BattlePlayer.OnSetupClassEvent += SetupPlayerClassEvent; + BattleEnemy.OnSetupClassEvent += SetupOpponentClassEvent; + BattlePlayer.Setup(BattleEnemy); + BattleEnemy.Setup(BattlePlayer); + BattlePlayer.OnTurnEnd += delegate + { + VfxMgr.Cancel(); + return NullVfx.GetInstance(); + }; + } + + public VfxBase LoadOpponentObjects() + { + VfxBase vfxBase = GetIns().SBattleLoad.NetworkBattleStartToLoadOpponentObjects(delegate + { + DelayLoadCompleteOpponentResources(); + }); + VfxMgr.RegisterSequentialVfx(vfxBase); + return vfxBase; + } + + protected virtual void DelayLoadCompleteOpponentResources() + { + SetupBattlePlayersEvent(); + } + + public virtual void SetupActionProcessorEvent(ActionProcessor processor, bool isPlayer) + { + GetBattlePlayer(isPlayer).SetupActionProcessorEvent(processor); + processor.OnAfterPlayCard += delegate + { + BattlePlayer.UpdateHandCardsPlayability(); + BattleEnemy.UpdateHandCardsPlayability(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(BattlePlayer.UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(JudgeBattleResult()); + return sequentialVfxPlayer; + }; + processor.OnBeforeAttack += JudgeBattleResult; + processor.OnAfterAttack += delegate + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(BattlePlayer.UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(JudgeBattleResult()); + return sequentialVfxPlayer; + }; + processor.OnAfterEvolution += delegate + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(BattlePlayer.UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(JudgeBattleResult()); + return sequentialVfxPlayer; + }; + processor.OnAfterFusion += delegate + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(BattlePlayer.UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(JudgeBattleResult()); + return sequentialVfxPlayer; + }; + } + + protected virtual void SetupEndTurnButtonEvents(OperateMgr operateMgr) + { + SetupInstantEndTurnConditions(); + BattlePlayer.OnTurnStartAfterDraw += () => InstantVfx.Create(delegate + { + BattlePlayer.PlayerBattleView.UpdateTurnEndPulseEffect(); + }); + operateMgr.OnPlayerAttack += delegate + { + BattlePlayer.PlayerBattleView.UpdateTurnEndPulseEffect(); + BattlePlayer.UpdateHandCardsPlayability(); + return NullVfx.GetInstance(); + }; + operateMgr.OnPlayerEvolve += delegate + { + BattlePlayer.PlayerBattleView.UpdateTurnEndPulseEffect(); + return NullVfx.GetInstance(); + }; + operateMgr.OnPlayerFusion += delegate + { + BattlePlayer.PlayerBattleView.UpdateTurnEndPulseEffect(); + return NullVfx.GetInstance(); + }; + BattlePlayer.OnTurnEnd += delegate + { + BattlePlayer.PlayerBattleView.HideTurnEndPulseEffect(); + Prediction.Clear(); + return NullVfx.GetInstance(); + }; + } + + protected virtual void SetupInstantEndTurnConditions() + { + BattlePlayer.PlayerBattleView.OnCheckImmediateTurnEnd += delegate + { + if (BattlePlayer.CheckPlayableCards()) + { + return false; + } + return !BattlePlayer.CheckAttackableCards(); + }; + } + + public virtual VfxBase LoadTurnPanelResource() + { + return TurnPanelControl.LoadResource(); + } + + public void ReinitializeTurnPanelControl() + { + TurnPanelControl.Initialize(BattlePlayer.EvolveWaitTurnCount > 0, BattleEnemy.EvolveWaitTurnCount > 0); + } + + public virtual void Update(float dt) + { + VfxWith vfxWith = _phase.Update(dt); + VfxMgr.RegisterSequentialVfx(SequentialVfxPlayer.Create(vfxWith.Vfx, ChangePhase(vfxWith.Value))); + VfxMgr.Update(Time.deltaTime); + if (_backGround != null) + { + _backGround.UpdateFieldRandom(); + } + if (BattlePlayer.BattleView.PlayQueueView != null) + { + BattlePlayer.BattleView.PlayQueueView.UpdatePlayQueuePositions(Time.deltaTime); + } + if (BattleEnemy.BattleView.PlayQueueView != null) + { + BattleEnemy.BattleView.PlayQueueView.UpdatePlayQueuePositions(Time.deltaTime); + } + LocalLog.SubmitAccumulateLastTraceLog(); + } + + public virtual void Pause() + { + _phase.Pause(); + Prediction.Clear(); + } + + public IPhase GetCurrentPhase() + { + return _phase; + } + + public virtual void Resume() + { + } + + public virtual void FinishBattle() + { + } + + public void OnBattleSettingInfoClearIsNullClear() + { + this.OnBattleSettingInfoClear = null; + } + + public virtual void DisposeBattleGameObj() + { + BattleResourceMgr.Dispose(); + VfxMgr.Dispose(); + DetailMgr.Dispose(); + Data.BattleRecoveryInfo = null; + BattleLifeTimeSharedObject = null; + this.OnBattleSettingInfoClear.Call(); + BattleLogItem.ClearHeaderTextureCache(); + CardVoiceInfoCache.ClearCardVoiceInfo(); + NullBattleCardView.ReleaseSharedDummy(); + NullBattleCard.ReleaseSharedDummy(); + GameMgr.GetIns().GetEffectMgr().ClearBattleFeildEffect(); + GameMgr.GetIns().GetEffectMgr().RestUnneededEffect(); + _backGround.Dispose(); + _battleCamera.Dispose(); + Toolbox.ResourcesManager.RemoveAssetGroup(Toolbox.ResourcesManager.BattleListAssetPathList); + Toolbox.ResourcesManager.BattleListAssetPathList.Clear(); + RenderSettings.fog = false; + GameMgr.GetIns().GetEffectMgr().ImmediateDestroyBattleEffectContainer(); + if (PanelMgr != null) + { + DisposeBattleGameObj_DestroyImmediate(PanelMgr.gameObject); + } + DisposeBattleGameObj_DestroyImmediate(Battle3DContainer); + DisposeBattleGameObj_DestroyImmediate(BtlUIContainer); + DisposeBattleGameObj_DestroyImmediate(CutInContainer); + DisposeBattleGameObj_DestroyImmediate(SubParticleContainer); + DisposeBattleGameObj_DestroyImmediate(_unityEventAgentObject); + if (SubUI != null) + { + DisposeBattleGameObj_DestroyImmediate(SubUI.gameObject); + } + SBattleLoad.Dispoose(); + SBattleLoad = null; + BattlePlayer.Clear(); + BattleEnemy.Clear(); + BattlePlayer = null; + BattleEnemy = null; + EmoteUI = null; + _unityEventAgentObject = null; + PanelMgr = null; + PlayerCardParameterListInfo.Clear(); + EnemyCardParameterListInfo.Clear(); + PlayerCardParameterListInfo = null; + EnemyCardParameterListInfo = null; + TransformCardList.Clear(); + PublishedSkillList.Clear(); + Prediction.Dispose(); + Prediction = null; + TouchControl.Dispose(); + TouchControl = null; + EnemyAI = null; + BtlContainer = null; + BtlUIContainer = null; + CutInContainer = null; + CardHolder = null; + PCardPlace = null; + ECardHolder = null; + Arrow = null; + ArrowControl = null; + AttackArrowHead = null; + EvolutionArrowHead = null; + AlertDialogue = null; + TurnPanelControl = null; + BattleResult = null; + BattleResultControl = null; + BattleStart = null; + BattleStartControl = null; + MenuButtonObject = null; + Battle3DContainer = null; + SubUI = null; + SubParticleContainer = null; + UIManager.GetInstance().DestroyView(UIManager.ViewScene.Battle); + GameMgr.GetIns().GetPrefabMgr().DisposeAllClonedObject(); + GameMgr.GetIns().GetGameObjMgr().DisposeUIGameObj(); + GameMgr.GetIns().GetPrefabMgr().AllUnLoad(); + main = null; + } + + private void DisposeBattleGameObj_DestroyImmediate(GameObject obj) + { + if (obj != null) + { + UnityEngine.Object.DestroyImmediate(obj); + } + } + + public VfxBase TurnEnd(bool isPlayer) + { + IsTurnEnd = true; + VfxBase result = GetBattlePlayer(isPlayer).TurnEnd(); + IsTurnEnd = false; + return result; + } + + public virtual VfxBase StartBattle() + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + LocalLog.SetLastTraceLogTurn(1); + sequentialVfxPlayer.Register(ChangePhase(PhaseCreator.CreateMainPhase())); + if (IsRecovery) + { + return sequentialVfxPlayer; + } + if (IsFirst) + { + sequentialVfxPlayer.Register(BattlePlayer.StartTurnControl()); + } + else + { + sequentialVfxPlayer.Register(BattleEnemy.StartTurnControl()); + } + return sequentialVfxPlayer; + } + + public virtual VfxBase ChangePhase(IPhase phase) + { + if (phase == null) + { + return NullVfx.GetInstance(); + } + LocalLog.AccumulateLastTraceLog("ChangePhase" + phase.ToString()); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (_phase != null) + { + VfxBase vfx = _phase.Teardown(); + sequentialVfxPlayer.Register(vfx); + } + _phase = phase; + VfxBase vfx2 = _phase.Setup(); + sequentialVfxPlayer.Register(vfx2); + return sequentialVfxPlayer; + } + + public BattleControl GetBattleControl() + { + return GameMgr.GetIns().GetBattleCtrl(); + } + + public CardParameterListInfo GetCardParameterListInfo(bool isPlayer) + { + if (!isPlayer) + { + return EnemyCardParameterListInfo; + } + return PlayerCardParameterListInfo; + } + + public BattlePlayerBase GetBattlePlayer(bool isPlayer) + { + if (isPlayer) + { + return BattlePlayer; + } + return BattleEnemy; + } + + public BattlePlayerPair GetBattlePlayerPair(bool isPlayer) + { + BattlePlayerBase battlePlayer = GetBattlePlayer(isPlayer); + BattlePlayerBase battlePlayer2 = GetBattlePlayer(!isPlayer); + return new BattlePlayerPair(battlePlayer, battlePlayer2); + } + + public BattlePlayerReadOnlyInfoPair GetBattlePlayerInfoPair(bool isPlayer) + { + BattlePlayerBase battlePlayer = GetBattlePlayer(isPlayer); + BattlePlayerBase battlePlayer2 = GetBattlePlayer(!isPlayer); + return new BattlePlayerReadOnlyInfoPair(battlePlayer, battlePlayer2); + } + + public Transform GetBattle3DContainerChild(string childName) + { + return Battle3DContainer.transform.Find(childName); + } + + public virtual int StableRandom(int val) + { + if (IsForecast) + { + return 0; + } + stableRandomCount++; + randomResult = _stableRandom.NextDouble(); + return (int)Math.Floor((double)val * randomResult); + } + + public double StableRandomDouble() + { + if (IsForecast) + { + return 0.0; + } + stableRandomCount++; + randomResult = _stableRandom.NextDouble(); + return randomResult; + } + + public int StableRandomOnlySelf(int val) + { + if (IsForecast) + { + return 0; + } + return _stableRandomOnlySelf.Next(val); + } + + public BattleCardBase GetBattleCardIdx(IList list, int idx) + { + return list.SingleOrDefault((BattleCardBase c) => c.Index == idx); + } + + public virtual BattleCardBase MetamorphoseCard(int cardId, bool isPlayer, int addIndex, SkillBase skill, bool isFusion = false) + { + return CreateBattleCardWithGameObject(new CardCreateInfo(cardId, isPlayer, skill.ApplyingTargetFilter is SkillTargetChosenCardsFilter, NetworkBattleDefine.NetworkCardPlaceState.None, isReferenceOpponentCard: false, skill), new IndexInfo(addIndex)); + } + + public virtual BattleCardBase CreateBattleCardWithGameObject(CardCreateInfo info, IndexInfo indexInfo, int repeatCount = -1, bool isVirtual = false, bool isActualCard = false) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(info.Id); + BattlePlayerBase battlePlayer = GetBattlePlayer(info.IsPlayer); + int cardIndex = SetupCardIndex(battlePlayer, indexInfo.AddIndex); + GameObject cardGameObject = null; + if (!IsRecovery || !isVirtual) + { + cardGameObject = CreateBaseCardGameObject(cardParameterFromId, info.IsPlayer, cardIndex); + } + BattleCardBase battleCardBase = CreateBattleCard(info.Id, info.IsPlayer, cardGameObject, cardParameterFromId, battlePlayer, cardIndex, info.Cost); + SetupCardObjectMaterials(cardGameObject, battleCardBase); + return battleCardBase; + } + + public BattleCardBase CreateBattleCard(int cardId, bool isPlayer, GameObject cardGameObject, CardParameter cardParameter, BattlePlayerBase battlePlayer, int cardIndex, int cost = -1) + { + BattleCardBase battleCardBase = CardCreatorBase.CreateToken(CreateCardBuildInfo(cardGameObject, cardParameter, isPlayer, cardIndex, cardId), cardGameObject == null); + battleCardBase.IsTokenLoad = true; + battlePlayer.SetupCardEvent(battleCardBase); + if (cost != -1) + { + battleCardBase.CostModifierList.Add(new CostSetModifier(cost)); + } + return battleCardBase; + } + + public BattleCardBase CreateTransformCardRegisterVfx(BattleCardBase originalCard, int tokenId, bool isPlayer, VfxMgr predictionVfxMgr = null, bool isRecoveryFinish = false, bool isChoice = false) + { + BattleCardBase battleCardBase = null; + if (!IsRecovery || isRecoveryFinish) + { + battleCardBase = CreateTransformCardWithGameObject(tokenId, originalCard, isPlayer, isChoice); + } + else + { + battleCardBase = TransformCardList.FirstOrDefault((BattleCardBase c) => c.CardId == tokenId && c.IsPlayer == isPlayer); + if (battleCardBase == null) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(tokenId); + battleCardBase = CreateChoiceCard(tokenId, isPlayer, null, cardParameterFromId, GetBattlePlayer(isPlayer)); + } + } + battleCardBase.TransformInfo = new BattleCardBase.TransformInformation(battleCardBase.TransformInfo.Type, originalCard); + return battleCardBase; + } + + protected virtual BattleCardBase CreateTransformCardWithGameObject(int cardId, BattleCardBase originalCard, bool isPlayer, bool isChoice) + { + BattleCardBase battleCardBase = TransformCardList.FirstOrDefault((BattleCardBase c) => c.CardId == cardId && c.IsPlayer == isPlayer && (isChoice || c.TransformInfo.OriginalCard == originalCard)); + if (battleCardBase == null) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + BattlePlayerBase battlePlayer = GetBattlePlayer(isPlayer); + GameObject cardGameObject = CreateBaseCardGameObject(cardParameterFromId, isPlayer, cardId); + battleCardBase = CreateChoiceCard(cardId, isPlayer, cardGameObject, cardParameterFromId, battlePlayer); + SetupCardObjectMaterials(cardGameObject, battleCardBase); + TransformCardList.Add(battleCardBase); + } + return battleCardBase; + } + + protected BattleCardBase CreateChoiceCard(int cardId, bool isPlayer, GameObject cardGameObject, CardParameter cardParameter, BattlePlayerBase battlePlayer) + { + BattleCardBase battleCardBase = CardCreatorBase.CreateToken(CreateCardBuildInfo(cardGameObject, cardParameter, isPlayer, cardId, cardId), cardGameObject == null); + battleCardBase.IsTokenLoad = true; + return battleCardBase; + } + + public BattleCardBase CreateFusionCard(int cardId, bool isPlayer) + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + return CardCreatorBase.CreateToken(CreateCardBuildInfo(null, cardParameterFromId, isPlayer, cardId, cardId), createNullView: true); + } + + public BattleCardBase ReplaceChoiceBraveCard(BattleCardBase originalCard, int cardId, BattleCardBase selectSkillCard) + { + BattleCardBase choiceBraveCard = originalCard.SelfBattlePlayer.CreateCard(cardId, originalCard.SelfBattlePlayer.Class.Index, isChoiceBrave: true); + choiceBraveCard.BattleCardView.GameObject.SetActive(value: false); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(ParallelVfxPlayer.Create(choiceBraveCard.SelfBattlePlayer.BattleMgr.LoadCardResources(new List { choiceBraveCard }), InstantVfx.Create(delegate + { + if (!IsRecovery) + { + Transform transform = choiceBraveCard.BattleCardView.Transform; + Transform transform2 = ((selectSkillCard != null) ? selectSkillCard.BattleCardView.Transform : originalCard.SelfBattlePlayer.BattleView.ChoiceBraveButtonTransform); + transform.position = ((selectSkillCard != null) ? transform2.position : new Vector3(transform2.position.x, transform2.position.y, 0f)); + transform.rotation = transform2.rotation; + transform.parent = originalCard.SelfBattlePlayer.BattleView.HandDeck.transform; + transform.localScale = transform2.localScale; + transform.SetSiblingIndex(transform2.GetSiblingIndex()); + choiceBraveCard.BattleCardView.GameObject.SetActive(value: true); + } + }))); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + if (selectSkillCard != null) + { + selectSkillCard.BattleCardView.GameObject.SetActive(value: false); + } + })); + choiceBraveCard.SelfBattlePlayer.BattleMgr.VfxMgr.RegisterImmediateVfx(sequentialVfxPlayer); + return choiceBraveCard; + } + + protected GameObject CreateBaseCardGameObject(CardParameter cardParameter, bool isPlayer, int cardIndex) + { + GameObject gameObject = null; + if (cardParameter.CharType == CardBasePrm.CharaType.NORMAL) + { + gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(SBattleLoad.UnitCardTemplate.gameObject, _backGround.m_Battle3DContainer); + } + else if (cardParameter.CharType == CardBasePrm.CharaType.SPELL) + { + gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(SBattleLoad.SpellCardTemplate.gameObject, _backGround.m_Battle3DContainer); + } + else if (cardParameter.CharType == CardBasePrm.CharaType.FIELD || cardParameter.CharType == CardBasePrm.CharaType.CHANT_FIELD) + { + gameObject = GameMgr.GetIns().GetPrefabMgr().CloneObjectToParent(SBattleLoad.FieldCardTemplate.gameObject, _backGround.m_Battle3DContainer); + gameObject.transform.Find("CardObj/NormalField").gameObject.SetActive(value: false); + } + SetupCardObjectTags(gameObject, isPlayer, cardIndex); + return gameObject; + } + + private void SetupCardObjectTags(GameObject cardGameObject, bool isPlayer, int cardIndex) + { + string tag; + string text; + if (isPlayer) + { + tag = "PlayerToken"; + text = "P"; + } + else + { + tag = "Enemy"; + text = "E"; + } + cardGameObject.tag = tag; + cardGameObject.transform.Find("CardObj").tag = tag; + cardGameObject.transform.Find("Collider").tag = tag; + cardGameObject.name = text + cardIndex; + } + + protected void SetupCardObjectMaterials(GameObject cardGameObject, BattleCardBase battleCard) + { + cardGameObject.GetComponent().DynamicSetupMaterials(battleCard, BattleResourceMgr); + cardGameObject.SetActive(value: false); + cardGameObject.transform.localPosition = Vector3.zero; + cardGameObject.transform.localScale = Global.CARD_BATTLE_SCALE; + cardGameObject.transform.rotation = Quaternion.identity; + } + + protected int SetupCardIndex(BattlePlayerBase battlePlayer, int cardIndex) + { + if (cardIndex == -1) + { + cardIndex = battlePlayer.cardTotalNum; + battlePlayer.cardTotalNum++; + } + return cardIndex; + } + + private BattleCardBase.BuildInfo CreateCardBuildInfo(GameObject cardGameObject, CardParameter cardParameter, bool isPlayer, int cardIndex, int cardId) + { + SkillCreator.CardSkillsBuildInfo cardSkillsBuildInfo = SkillCreator.CreateBuildInfo(cardParameter); + IInnerOptionsBuilder innerOptionsBuilder = (isPlayer ? CreatePlayerInnerOptionsBuilder() : CreateEnemyInnerOptionsBuilder()); + bool isPlayer2 = isPlayer; + return new BattleCardBase.BuildInfo(cardGameObject, cardId, GetBattlePlayer(isPlayer), GetBattlePlayer(!isPlayer), GetBattlePlayer(isPlayer), cardSkillsBuildInfo.normalSkillBuildInfos, cardSkillsBuildInfo.evolveSkillBuildInfos, isPlayer2, cardIndex, innerOptionsBuilder.CreateCardOptions(), this, BattleResourceMgr); + } + + public virtual VfxBase JudgeBattleResult() + { + if (BattlePlayer.Class.IsDead && BattleEnemy.Class.IsDead) + { + return InstantVfx.Create(delegate + { + InitiateGameEndSequence(!BattlePlayer.IsSelfTurn); + }); + } + if (BattlePlayer.Class.IsDead) + { + return InstantVfx.Create(delegate + { + InitiateGameEndSequence(hasWon: false); + }); + } + if (BattleEnemy.Class.IsDead) + { + return InstantVfx.Create(delegate + { + InitiateGameEndSequence(hasWon: true); + }); + } + return NullVfx.GetInstance(); + } + + public VfxBase DeadClass(bool PlayerDead, FINISH_TYPE finishType) + { + ClassBattleCardBase classBattleCardBase = (ClassBattleCardBase)GetBattlePlayer(PlayerDead).Class; + if (GameMgr.GetIns().IsReplayBattle && !classBattleCardBase.ClassBattleCardView.InPlayModelActive) + { + return NullVfx.GetInstance(); + } + switch ((int)finishType) + { + case 0: + return classBattleCardBase.SelfBattlePlayer.CardManagement(classBattleCardBase, new SkillProcessor(), BattlePlayerBase.CARD_MANAGEMENT.DESTROY, isRandom: false); + case 1: + if (IsBothClassDead(PlayerDead)) + { + return NullVfx.GetInstance(); + } + classBattleCardBase.FlagCardAsDestroyedBySkill(); + return classBattleCardBase.Retire(); + case 2: + if (IsBothClassDead(PlayerDead)) + { + return NullVfx.GetInstance(); + } + return classBattleCardBase.DestroyBySpecialWin(); + default: + return classBattleCardBase.SelfBattlePlayer.CardManagement(classBattleCardBase, new SkillProcessor(), BattlePlayerBase.CARD_MANAGEMENT.DESTROY, isRandom: false); + } + } + + private bool IsBothClassDead(bool isPlayer) + { + ClassBattleCardBase obj = (ClassBattleCardBase)GetBattlePlayer(isPlayer).Class; + ClassBattleCardBase classBattleCardBase = (ClassBattleCardBase)GetBattlePlayer(!isPlayer).Class; + if (obj.IsDead && classBattleCardBase.IsDead) + { + return true; + } + return false; + } + + protected virtual int GetFirstAttack(int FirstAttack) + { + return UnityEngine.Random.Range(0, 2); + } + + public virtual void SetupEnemyAI() + { + EnemyAI = new EnemyAINull(); + } + + public virtual void SetupPlayerClassEvent() + { + } + + public virtual void SetupOpponentClassEvent() + { + } + + public virtual void SetupCardEvent(BattleCardBase card) + { + } + + public virtual void InitiateGameEndSequence(bool hasWon) + { + if (GameMgr.GetIns().IsReplayBattle && !GameMgr.GetIns().IsNewReplayBattle) + { + hasWon = Data.ReplayBattleInfo.is_win; + } + IResultPhase resultPhase = PhaseCreator.CreateResultPhase(hasWon); + if (hasWon) + { + resultPhase.OnSetupEnd += this.OnWin; + } + VfxBase vfx = ChangePhase(resultPhase); + VfxMgr.RegisterSequentialVfx(vfx); + this.OnBattleFinish.Call(hasWon); + } + + public virtual VfxBase PlaySpecialWin(BattlePlayerBase winPlayer) + { + GetIns().VfxMgr.RegisterImmediateVfx(new CanNotTouchCardVfx()); + bool playerDead = !winPlayer.IsPlayer; + return SequentialVfxPlayer.Create(DeadClass(playerDead, FINISH_TYPE.SPECIAL_WIN), InstantVfx.Create(delegate + { + InitiateGameEndSequence(winPlayer.IsPlayer); + })); + } + + public virtual void PlayRetire() + { + GetIns().VfxMgr.RegisterImmediateVfx(new CanNotTouchCardVfx()); + if (!GetBattlePlayer(isPlayer: true).Class.IsDead) + { + BattlePlayer.BattleView.HideTurnEndButton(); + IsPlayerRetire = true; + VfxMgr.RegisterSequentialVfx(DeadClass(PlayerDead: true, FINISH_TYPE.RETIRE)); + VfxMgr.RegisterSequentialVfx(InstantVfx.Create(delegate + { + InitiateGameEndSequence(hasWon: false); + })); + } + } + + public void MulliganSubmit() + { + VfxMgr.RegisterSequentialVfx(this.OnSubmitMulligan.GetAllFuncVfxResults()); + } + + public void ChangeCameraFieldOfView(float aspectRatio) + { + if ((bool)Battle3DContainer) + { + int num = CalculateCameraFieldOfView(aspectRatio); + int num2 = CalculateBackgroundCameraFieldOfView(aspectRatio); + Transform transform = Battle3DContainer.transform.Find("Camera"); + Camera component; + Camera camera = (component = transform.GetComponent()); + component.fieldOfView = num; + component = transform.Find("Camera 3DGround").GetComponent(); + component.fieldOfView = num2; + (_subParticleCamera = transform.Find("Camera SubParticles").GetComponent()).fieldOfView = num; + component = transform.Find("Camera BattleUnder").GetComponent(); + component.fieldOfView = num; + Transform transform2 = Battle3DContainer.transform.Find("Camera HighRankEvolve"); + if (transform2 == null) + { + transform2 = transform.transform.Find("Camera HighRankEvolve"); + } + Camera component2 = transform2.GetComponent(); + component2.fieldOfView = num; + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (dataMgr.Is3DSkin(isPlayer: true)) + { + component2.depth = 40f; + } + if (dataMgr.GetPlayerCharaData().IsNoEvolveShift) + { + component2.transform.SetParent(camera.transform); + } + component = CutInContainer.transform.Find("Camera").GetComponent(); + component.fieldOfView = num; + } + } + + private int CalculateCameraFieldOfView(float aspectRatio) + { + if (!(aspectRatio < 1.5f)) + { + _ = Global.NormalFieldOfView; + } + else + { + _ = Global.WideFieldOfView; + } + float num = aspectRatio - 1.5f; + return Mathf.Clamp((int)((float)(Global.WideFieldOfView + Global.NormalFieldOfView) / 2f * (1f - num)), Global.NormalFieldOfView, Global.WideFieldOfView); + } + + private int CalculateBackgroundCameraFieldOfView(float aspectRatio) + { + return CalculateCameraFieldOfView(aspectRatio); + } + + public bool CanOpenEvolutionConfirmation(BattleCardBase card) + { + if (IsStopOperate || !card.IsInplay || !card.SelfBattlePlayer.IsSelfTurn || !card.IsPlayer || !card.IsUnit || GameMgr.GetIns().IsWatchBattle) + { + return false; + } + return card.CanEvolution(isSkill: false, isSelfBattlePlayer: true); + } + + protected virtual SequentialVfxPlayer OnShortageDeck(BattlePlayerBase battlePlayer) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (battlePlayer.IsShortageDeckWin) + { + sequentialVfxPlayer.Register(new DeckOutWinVfx(battlePlayer)); + sequentialVfxPlayer.Register(DeadClass(!battlePlayer.IsPlayer, FINISH_TYPE.SPECIAL_WIN)); + battlePlayer.Class.OpponentBattlePlayer.Class.FlagCardAsDestroyedBySkill(); + } + else + { + if (battlePlayer.IsPlayer) + { + sequentialVfxPlayer.Register(new PlayerDeckOutVfx(BattlePlayer, this)); + BattlePlayer.SetIsShortageDeckLose(flag: true); + } + else + { + sequentialVfxPlayer.Register(new EnemyDeckOutVfx(BattleEnemy, this)); + BattleEnemy.SetIsShortageDeckLose(flag: true); + } + sequentialVfxPlayer.Register(DeadClass(battlePlayer.IsPlayer, FINISH_TYPE.NORMAL)); + } + return sequentialVfxPlayer; + } + + public SkillCardLimitUpperCountFilter CheackCalledCreateFilterDictionary(IReadOnlyBattleCardInfo ownerCard, string partText, string infoText) + { + SkillCardLimitUpperCountFilter result = null; + CalledCreateFilterPair calledFilterPair = new CalledCreateFilterPair(ownerCard, partText); + if (_calledCreateLimitFilterDictionary.Any((KeyValuePair c) => c.Key.Equal(calledFilterPair))) + { + KeyValuePair keyValuePair = _calledCreateLimitFilterDictionary.FirstOrDefault((KeyValuePair c) => c.Key.Equal(calledFilterPair)); + if (keyValuePair.Value != null) + { + result = keyValuePair.Value; + } + } + else if (SkillFilterCreator.COUNT_EXTENSIONS_FILTER_NAMES.Any((string n) => Regex.IsMatch(partText, "^" + n + "[<>!:=]=?"))) + { + SkillCardLimitUpperCountFilter skillCardLimitUpperCountFilter = new SkillCardLimitUpperCountFilter(infoText); + result = skillCardLimitUpperCountFilter; + if (!IsVirtualBattleEnemyTurn) + { + _calledCreateLimitFilterDictionary.Add(calledFilterPair, skillCardLimitUpperCountFilter); + } + } + else if (!IsVirtualBattleEnemyTurn) + { + _calledCreateLimitFilterDictionary.Add(calledFilterPair, null); + } + return result; + } + + public SkillOrFilter CheackCalledCreateOrFilterDictionary(IReadOnlyBattleCardInfo ownerCard, string partText, string infoText) + { + SkillOrFilter result = null; + CalledCreateFilterPair calledFilterPair = new CalledCreateFilterPair(ownerCard, partText); + if (_calledCreateOrFilterDictionary.Any((KeyValuePair c) => c.Key.Equal(calledFilterPair))) + { + KeyValuePair keyValuePair = _calledCreateOrFilterDictionary.FirstOrDefault((KeyValuePair c) => c.Key.Equal(calledFilterPair)); + if (keyValuePair.Value != null) + { + result = keyValuePair.Value; + } + } + else + { + string text = SkillFilterCreator.ContentKeyword.or.ToStringCustom(); + if (Regex.IsMatch(partText, "^" + text + "[<>!:=]=?")) + { + SkillOrFilter skillOrFilter = new SkillOrFilter(int.Parse(infoText)); + result = skillOrFilter; + if (!IsVirtualBattleEnemyTurn) + { + _calledCreateOrFilterDictionary.Add(calledFilterPair, skillOrFilter); + } + } + else if (!IsVirtualBattleEnemyTurn) + { + _calledCreateOrFilterDictionary.Add(calledFilterPair, null); + } + } + return result; + } + + public ISkillCardFilter CheackCalledCreateSkillCardFilterDictionary(IReadOnlyBattleCardInfo ownerCard, string partText, string infoText) + { + ISkillCardFilter result = null; + CalledCreateFilterPair calledFilterPair = new CalledCreateFilterPair(ownerCard, partText); + if (_calledCreateFilterDictionary.Any((KeyValuePair c) => c.Key.Equal(calledFilterPair))) + { + KeyValuePair keyValuePair = _calledCreateFilterDictionary.FirstOrDefault((KeyValuePair c) => c.Key.Equal(calledFilterPair)); + if (keyValuePair.Value != null) + { + result = keyValuePair.Value; + } + } + else if (SkillFilterCreator.CARD_PARAMETER_COMPARE_FILTER_NAMES.Any((string n) => Regex.IsMatch(partText, "^" + n + "[<>!:=]=?"))) + { + ISkillCardFilter skillCardFilter = SkillFilterCreator.CreateCardParameterCompareFilter(partText, ownerCard); + result = skillCardFilter; + if (!IsVirtualBattleEnemyTurn) + { + _calledCreateFilterDictionary.Add(calledFilterPair, skillCardFilter); + } + } + else if (!IsVirtualBattleEnemyTurn) + { + _calledCreateFilterDictionary.Add(calledFilterPair, null); + } + return result; + } + + public void RemoveUnUseCalledFilterDictionary() + { + if (IsVirtualBattleEnemyTurn) + { + return; + } + List list = new List(); + foreach (KeyValuePair item in new Dictionary(_calledCreateFilterDictionary)) + { + if (item.Key.HasOwnerCard()) + { + if (item.Key.IsOwnerCardDead()) + { + list.Add(item.Key); + } + } + else + { + list.Add(item.Key); + } + } + foreach (CalledCreateFilterPair item2 in list) + { + _calledCreateFilterDictionary.Remove(item2); + } + list.Clear(); + foreach (KeyValuePair item3 in new Dictionary(_calledCreateLimitFilterDictionary)) + { + if (item3.Key.HasOwnerCard()) + { + if (item3.Key.IsOwnerCardDead()) + { + list.Add(item3.Key); + } + } + else + { + list.Add(item3.Key); + } + } + foreach (CalledCreateFilterPair item4 in list) + { + _calledCreateLimitFilterDictionary.Remove(item4); + } + list.Clear(); + foreach (KeyValuePair item5 in new Dictionary(_calledCreateOrFilterDictionary)) + { + if (item5.Key.HasOwnerCard()) + { + if (item5.Key.IsOwnerCardDead()) + { + list.Add(item5.Key); + } + } + else + { + list.Add(item5.Key); + } + } + foreach (CalledCreateFilterPair item6 in list) + { + _calledCreateOrFilterDictionary.Remove(item6); + } + } + + protected void SetUpMyRotationBattle(int playerMaxLife, int enemyMaxLife) + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + MyRotationInfo myRotationInfo; + bool flag = dataMgr.TryGetPlayerMyRotationInfo(out myRotationInfo); + MyRotationInfo myRotationInfo2; + bool flag2 = dataMgr.TryGetEnemyMyRotationInfo(out myRotationInfo2); + if (!flag && !flag2) + { + return; + } + List list = new List(); + if (flag) + { + for (int i = 0; i < myRotationInfo.Abilities.Count; i++) + { + MyRotationInfo.MyRotationBonus myRotationBonus = myRotationInfo.Abilities[i]; + for (int j = 0; j < myRotationBonus.AttachAbilities.Length; j++) + { + AttachInfo attachInfo = AddAttachSkillToClass(isPlayer: true, myRotationBonus.AttachAbilities[j], myRotationBonus.AbilityId); + if (attachInfo != null) + { + list.Add(attachInfo); + } + } + BattlePlayer.PpTotal += myRotationBonus.AddStartPp; + playerMaxLife += myRotationBonus.AddStartLife; + BattlePlayer.BonusConditionList.Add(new BattlePlayerBase.MyRotationBonusCondition(myRotationBonus)); + } + } + if (flag2) + { + for (int k = 0; k < myRotationInfo2.Abilities.Count; k++) + { + MyRotationInfo.MyRotationBonus myRotationBonus2 = myRotationInfo2.Abilities[k]; + for (int l = 0; l < myRotationBonus2.AttachAbilities.Length; l++) + { + AttachInfo attachInfo2 = AddAttachSkillToClass(isPlayer: false, myRotationBonus2.AttachAbilities[l], myRotationBonus2.AbilityId); + if (attachInfo2 != null) + { + list.Add(attachInfo2); + } + } + BattleEnemy.PpTotal += myRotationBonus2.AddStartPp; + enemyMaxLife += myRotationBonus2.AddStartLife; + BattleEnemy.BonusConditionList.Add(new BattlePlayerBase.MyRotationBonusCondition(myRotationBonus2)); + } + } + for (int m = 0; m < list.Count; m++) + { + AttachInfo attachInfo3 = list[m]; + SkillBase attachSkill = Skill_attach_skill.CreateAndAttachSkill(attachInfo3._classCard, attachInfo3._attachSkill, attachInfo3._targetSkillBuildInfo); + IDetailPanelControl detailPanel = DetailMgr.DetailPanelControl; + if (!attachSkill.PreprocessList.Any((SkillPreprocessBase s) => s is SkillPreprocessRemoveAfterAction)) + { + continue; + } + attachSkill.OnSkillStart += delegate + { + attachSkill.OnSkillEnd += delegate + { + if (attachSkill.PreprocessList.Any((SkillPreprocessBase s) => s is SkillPreprocessRemoveAfterAction && (s as SkillPreprocessRemoveAfterAction).IsEnd())) + { + List list2 = (attachInfo3._classCard.IsPlayer ? BattlePlayer.BonusConditionList : BattleEnemy.BonusConditionList); + BattlePlayerBase.MyRotationBonusCondition myRotationBonusCondition = list2.FirstOrDefault((BattlePlayerBase.MyRotationBonusCondition b) => b.MyRotationBonus.AbilityId == attachInfo3._myRotationBonusId); + myRotationBonusCondition.ReduceSkillCount(); + myRotationBonusCondition.UseUpSkill(); + if (detailPanel._card != null && detailPanel._card.IsClass && detailPanel._card.IsPlayer == attachInfo3._classCard.IsPlayer) + { + detailPanel.UpdateBuffInfo(attachInfo3._classCard, list2); + } + } + return NullVfx.GetInstance(); + }; + }; + } + BattlePlayer.SetPpTotal(BattlePlayer.PpTotal, isUpdatePp: true, null); + BattleEnemy.SetPpTotal(BattleEnemy.PpTotal, isUpdatePp: true, null); + InitializeClassLife(playerMaxLife, enemyMaxLife); + } + + protected void SetupAvatarBattle(bool doesPlayerGoFirst) + { + if (Data.CurrentFormat == Format.Avatar) + { + GameMgr.GetIns().GetDataMgr(); + if (doesPlayerGoFirst) + { + SetupSpecifiedPlayerAvatarBattle(isPlayer: true); + SetupSpecifiedPlayerAvatarBattle(isPlayer: false); + } + else + { + SetupSpecifiedPlayerAvatarBattle(isPlayer: false); + SetupSpecifiedPlayerAvatarBattle(isPlayer: true); + } + } + } + + private void SetupSpecifiedPlayerAvatarBattle(bool isPlayer) + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if ((!isPlayer) ? dataMgr.TryGetEnemyAvatarBattleInfo(out var avatarBattleInfo) : dataMgr.TryGetPlayerAvatarBattleInfo(out avatarBattleInfo)) + { + SetupPlayerAvatarBattle(isPlayer ? ((BattlePlayerBase)BattlePlayer) : ((BattlePlayerBase)BattleEnemy), avatarBattleInfo); + } + } + + private void SetupPlayerAvatarBattle(BattlePlayerBase battlePlayerBase, AvatarBattleInfo avatarBattleInfo) + { + battlePlayerBase.AvatarBattleInfo = avatarBattleInfo; + AvatarBattleInfo.AvatarBattleBonus bonus = avatarBattleInfo.Bonus; + string[] abilities = bonus.Abilities; + List list = new List(); + for (int i = 0; i < abilities.Length; i++) + { + AttachInfo attachInfo = AddAttachSkillToClass(battlePlayerBase is BattlePlayer, abilities[i]); + if (attachInfo != null) + { + list.Add(attachInfo); + } + } + for (int j = 0; j < list.Count; j++) + { + AttachInfo attachInfo2 = list[j]; + Skill_attach_skill.CreateAndAttachSkill(attachInfo2._classCard, attachInfo2._attachSkill, attachInfo2._targetSkillBuildInfo); + } + battlePlayerBase.AvatarBattlePassiveSkillDescInfo = new BattlePlayerBase.AvatarBattleDescInfo(avatarBattleInfo.Bonus.PassiveAbilityDesc, ""); + battlePlayerBase.ChoiceBraveSkillDescInfoList = new List(); + for (int k = 0; k < bonus.AbilityDesc.Count(); k++) + { + battlePlayerBase.ChoiceBraveSkillDescInfoList.Add(new BattlePlayerBase.AvatarBattleDescInfo(bonus.AbilityDesc[k], bonus.AbilityCosts[k])); + } + VfxMgr.RegisterImmediateVfx(battlePlayerBase.SetBp(battlePlayerBase.IsGameFirst ? bonus.BattleStartFirstPlayerTurnBp : bonus.BattleStartSecondPlayerTurnBp)); + ((ClassBattleCardBase)battlePlayerBase.Class).InitBaseMaxLife(bonus.BattleStartMaxLife); + } + + protected AttachInfo AddAttachSkillToClass(bool isPlayer, string skillText, string myRotationBonusId = "") + { + if (skillText == string.Empty) + { + return null; + } + SkillCreator.SkillBuildInfo targetSkillBuildInfo = Skill_attach_skill.CreateAttachSkillBuildInfo(skillText); + BattleCardBase battleCardBase = null; + battleCardBase = ((!isPlayer) ? BattleEnemy.ClassAndInPlayCardList.First((BattleCardBase c) => c is ClassBattleCardBase) : BattlePlayer.ClassAndInPlayCardList.First((BattleCardBase c) => c is ClassBattleCardBase)); + SkillCreator.SkillBuildInfo skillBuildInfo = new SkillCreator.SkillBuildInfo("attach_skill", "none", "character=me", "character=me&target=inplay&card_type=class", "skill=" + skillText, "none"); + SkillBase skillBase = battleCardBase.CreateSkillCreator(battleCardBase.SelfBattlePlayer, battleCardBase.OpponentBattlePlayer, BattleResourceMgr).Create(skillBuildInfo, null, isAttachSkill: true); + battleCardBase.NormalSkills.Add(skillBase); + battleCardBase.NormalSkillBuildInfos.Add(skillBuildInfo); + return new AttachInfo(battleCardBase, skillBase, targetSkillBuildInfo, myRotationBonusId); + } + + public static bool IsCardPrivate(BattleCardBase card) + { + if (!card.IsPlayer) + { + if (!card.IsInHand) + { + return card.IsInDeck; + } + return true; + } + return false; + } + + public VfxBase LoadCardResources(List cards, bool isRecoveryFinish = false) + { + if (cards.Count == 0) + { + return NullVfx.GetInstance(); + } + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + List list = new List(); + for (int i = 0; i < cards.Count; i++) + { + BattleCardBase battleCardBase = cards[i]; + if (battleCardBase != null) + { + parallelVfxPlayer.Register(battleCardBase.BattleCardView.GetResourcePathes(list)); + parallelVfxPlayer.Register(battleCardBase.BattleCardView.GetChoiceTransformCardsResourcePathes(battleCardBase, list, isRecoveryFinish)); + } + } + List list2 = new List(); + Action action = delegate + { + }; + for (int num = 0; num < list.Count; num++) + { + ResourceInfo info = list[num]; + if (info.ObjectPath != string.Empty) + { + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(info.ObjectPath, ResourcesManager.AssetLoadPathType.Effect2D); + if (!list2.Contains(assetTypePath)) + { + list2.Add(assetTypePath); + } + } + else if (!list2.Contains(info.ObjectFullPath)) + { + list2.Add(info.ObjectFullPath); + } + if (info.SePath != string.Empty) + { + string item = "s/" + info.SePath + ".acb"; + if (!list2.Contains(item)) + { + list2.Add(item); + } + } + if (info.IsEffectBattleInfoDictionary) + { + BattleResourceMgr.AddEffectBattleInfoDictionary(info.ObjectPath, info.SePath); + action = (Action)Delegate.Combine(action, (Action)delegate + { + BattleResourceMgr.SetEffectBattleInfoDictionary(info.ObjectPath, info.ObjectFullPath); + }); + } + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(new WaitLoadResourceVfx(list2, action)); + sequentialVfxPlayer.Register(parallelVfxPlayer); + return sequentialVfxPlayer; + } + + public VfxBase RecoveryInPlayAndHandCards() + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + List list = new List(); + for (int i = 0; i < BattlePlayer.InPlayCards.Count(); i++) + { + BattleCardBase battleCardBase = BattlePlayer.InPlayCards.ElementAt(i); + battleCardBase.BattleCardView.CardWrapObject.SetActive(value: true); + iTween.Stop(battleCardBase.BattleCardView.GameObject); + list.Add(battleCardBase); + parallelVfxPlayer.Register(battleCardBase.RecoveryInPlay(i, newReplayMoveTurn: true)); + } + for (int j = 0; j < BattleEnemy.InPlayCards.Count(); j++) + { + BattleCardBase battleCardBase2 = BattleEnemy.InPlayCards.ElementAt(j); + iTween.Stop(battleCardBase2.BattleCardView.GameObject); + list.Add(battleCardBase2); + parallelVfxPlayer.Register(battleCardBase2.RecoveryInPlay(j, newReplayMoveTurn: true)); + } + for (int k = 0; k < BattlePlayer.HandCardList.Count; k++) + { + BattleCardBase card = BattlePlayer.HandCardList[k]; + list.Add(card); + card.SetOnDraw(draw: false); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(card.BattleCardView.RecoveryInHand()); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + card.BattleCardView.GameObject.SetActive(value: false); + MotionUtils.SetLayerAll(card.BattleCardView.GameObject, 10); + card.BattleCardView.InitCostViewAnim(); + card.BattleCardView.Transform.parent = BattlePlayer.HandControl.Transform; + BattlePlayer.BattleView.HandView.AddCardToView(card.BattleCardView, 0f, isNewReplayMoveTurn: true); + card.BattleCardView.GameObject.SetActive(value: true); + card.BattleCardView.CardWrapObject.SetActive(value: true); + })); + parallelVfxPlayer.Register(sequentialVfxPlayer); + } + for (int num = 0; num < BattleEnemy.HandCardList.Count; num++) + { + BattleCardBase card2 = BattleEnemy.HandCardList[num]; + list.Add(card2); + SequentialVfxPlayer sequentialVfxPlayer2 = SequentialVfxPlayer.Create(); + sequentialVfxPlayer2.Register(InstantVfx.Create(delegate + { + card2.BattleCardView.GameObject.SetActive(value: false); + MotionUtils.SetLayerAll(card2.BattleCardView.GameObject, 10); + card2.BattleCardView.Transform.parent = BattleEnemy.HandControl.Transform; + BattleEnemy.BattleView.HandView.AddCardToView(card2.BattleCardView, 0f, isNewReplayMoveTurn: true); + card2.BattleCardView.GameObject.SetActive(value: true); + })); + parallelVfxPlayer.Register(sequentialVfxPlayer2); + } + return SequentialVfxPlayer.Create(LoadCardResources(list), parallelVfxPlayer); + } +} diff --git a/SVSim.BattleEngine/Engine/BattlePlayerBase.cs b/SVSim.BattleEngine/Engine/BattlePlayerBase.cs new file mode 100644 index 0000000..1ec0059 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattlePlayerBase.cs @@ -0,0 +1,4574 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Player.Emotion; +using Wizard.Battle.Resource; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public abstract class BattlePlayerBase : IBattlePlayerReadOnlyInfo +{ + public class TurnAndCard + { + public int Turn { get; private set; } + + public bool IsSelfTurn { get; private set; } + + public IReadOnlyBattleCardInfo Card { get; private set; } + + public bool IsTurnEnd { get; private set; } + + public TurnAndCard(int turn, bool isSelfTurn, IReadOnlyBattleCardInfo card, bool isTurnEnd) + { + Turn = turn; + Card = card; + IsSelfTurn = isSelfTurn; + IsTurnEnd = isTurnEnd; + } + } + + public class CardAndId + { + public IReadOnlyBattleCardInfo Card { get; private set; } + + public int Id { get; private set; } + + public CardAndId(IReadOnlyBattleCardInfo card, int id) + { + Card = card; + Id = id; + } + } + + public class CardAndTribe + { + public IReadOnlyBattleCardInfo Card { get; private set; } + + public List Tribes { get; private set; } + + public CardAndTribe(IReadOnlyBattleCardInfo card, List tribes) + { + Card = card; + Tribes = tribes; + } + } + + public class CardAndValue + { + public IReadOnlyBattleCardInfo Card { get; private set; } + + public int Value { get; private set; } + + public CardAndValue(IReadOnlyBattleCardInfo card, int value) + { + Card = card; + Value = value; + } + } + + public enum CARD_MANAGEMENT + { + NONE, + DESTROY, + BANISH, + RETURN, + FUSION_MATERIAL, + GETON, + GETOFF, + SUMMON + } + + public class SideLogInfo + { + public SkillBase Skill; + + public SideLogInfo(SkillBase skill) + { + Skill = skill; + } + } + + public class MyRotationBonusCondition + { + public MyRotationInfo.MyRotationBonus MyRotationBonus { get; } + + public int RemainingIncreaseAddPptotalTurn { get; private set; } + + public bool IsRemainIncreaseAddPptotalTurn { get; private set; } + + public int RemainingSkillCount { get; private set; } + + public bool IsRemainSkill { get; private set; } + + public MyRotationBonusCondition(MyRotationInfo.MyRotationBonus myRotationBonus) + { + MyRotationBonus = myRotationBonus; + RemainingIncreaseAddPptotalTurn = myRotationBonus.IncreaseAddPptotalTurn; + IsRemainIncreaseAddPptotalTurn = RemainingIncreaseAddPptotalTurn > 0; + RemainingSkillCount = myRotationBonus.AttachAbilities.Length; + IsRemainSkill = RemainingSkillCount > 0; + } + + public void SetConditionInReplay(NetworkBattleReceiver.MyRotationBonusInfo bonusInfo) + { + RemainingIncreaseAddPptotalTurn = bonusInfo.RemainingIncreaseAddPptotalTurn; + IsRemainIncreaseAddPptotalTurn = bonusInfo.IsRemainIncreaseAddPptotalTurn; + RemainingSkillCount = bonusInfo.RemainingSkillCount; + IsRemainSkill = bonusInfo.IsRemainSkill; + } + + public bool GetAndReduceAddPpTurn() + { + bool num = RemainingIncreaseAddPptotalTurn > 0; + if (num) + { + RemainingIncreaseAddPptotalTurn--; + } + return num; + } + + public void ReduceSkillCount() + { + RemainingSkillCount--; + } + + public void UseUpAddPpTotalBonus() + { + IsRemainIncreaseAddPptotalTurn = RemainingIncreaseAddPptotalTurn > 0; + } + + public void UseUpSkill() + { + IsRemainSkill = RemainingSkillCount > 0; + } + } + + public class AvatarBattleDescInfo + { + public string DescText; + + public string Cost; + + public List ReplaySkillDescriptionValueList; + + public AvatarBattleDescInfo(string descText, string cost) + { + DescText = descText; + Cost = cost; + ReplaySkillDescriptionValueList = new List(); + } + } + + public enum CEMETERY_TYPE + { + NORMAL, + FIELD_RETURN_HAND_OVER, + DECK_DRAW_HAND_OVER + } + + public class SummonInfo + { + public bool IsPlayer { get; private set; } + + public SkillBaseSummon.SummonedCardsList SummonedCardsList { get; private set; } + + public SkillBaseSummon.SUMMON_TYPE SummonType { get; private set; } + + public bool IsReanimate { get; private set; } + + public bool IsDeckSelfSummon { get; private set; } + + public SummonInfo(bool isPlayer, SkillBaseSummon.SummonedCardsList summonedCardsList, SkillBaseSummon.SUMMON_TYPE summonType, bool isReanimate = false, bool isDeckSelfSummon = false) + { + IsPlayer = isPlayer; + SummonedCardsList = summonedCardsList; + SummonType = summonType; + IsReanimate = isReanimate; + IsDeckSelfSummon = isDeckSelfSummon; + } + } + + public const int MAX_PP = 10; + + public List SelfDiscardList = new List(); + + protected BattlePlayerBase _opponentBattlePlayer; + + private List _skillList = new List(); + + protected IBattlePlayerVfxCreator m_vfxCreator; + + protected readonly IInnerOptionsBuilder _innerOptionsBuilder; + + private int _ppTotal; + + protected int m_EpTotal; + + private const int MAX_BP = 99; + + public bool CantPlayChoiceBrave; + + public HashSet PredictionWarningCards = new HashSet(); + + public Func OnTurnStartSkillAfter; + + public Func OnTurnEndSkillAfter; + + public Action OnTurnStartComplete; + + public Action OnPreTurnEndComplete; + + public Action OnPostTurnEndComplete; + + public Action OnEndOneSkillProcess; + + public List BonusConditionList; + + public List BossRushSpecialSkillList; + + public AvatarBattleDescInfo AvatarBattlePassiveSkillDescInfo; + + public List ChoiceBraveSkillDescInfoList; + + public const int MAX_NUM_HAND_CARDS = 9; + + public const int MAX_NUM_IN_PLAY_CARDS_WITH_CLASS = 6; + + public const int MAX_NUM_IN_PLAY_CARDS = 5; + + protected int _gameUsedEpCount; + + protected int _turnUsedEpCount; + + private const string TOKEN_EFFECT_PATH = "cmn_token_draw_1"; + + public BattleManagerBase BattleMgr { get; protected set; } + + public virtual bool IsGameFirst => false; + + public BattleCamera BattleCamera { get; private set; } + + public BackGroundBase BackGround { get; private set; } + + protected DataMgr _dataMgr { get; set; } + + public virtual bool IsPlayer => true; + + public virtual int Turn + { + get + { + if (!BattleMgr.IsFirst) + { + return BattleMgr.SecondTurn; + } + return BattleMgr.FirstTurn; + } + set + { + if (BattleMgr.IsFirst) + { + BattleMgr.FirstTurn = value; + } + else + { + BattleMgr.SecondTurn = value; + } + } + } + + public int Pp { get; set; } + + public int PpTotal + { + get + { + return _ppTotal; + } + set + { + _ppTotal = value; + } + } + + public int EpTotal + { + get + { + return m_EpTotal; + } + set + { + m_EpTotal = value; + } + } + + public int CurrentEpCount { get; private set; } + + public int EvolveWaitTurnCount { get; set; } + + public bool NowTurnEvol { get; set; } + + public bool IsEpEvolveThisTurn { get; set; } + + public bool IsEvolve + { + get + { + if (NowTurnEvol && CurrentEpCount > 0) + { + return EvolveWaitTurnCount <= 0; + } + return false; + } + } + + public bool IsExceptionEvolve + { + get + { + if (NowTurnEvol && EvolveWaitTurnCount <= 0) + { + return InPlayCards.Any((BattleCardBase c) => !c.IsEvolution && CheckNotConsumeEpCard(c)); + } + return false; + } + } + + public int GameUsedEpCount => _gameUsedEpCount; + + public int TurnUsedEpCount => _turnUsedEpCount; + + public int Bp { get; private set; } + + public bool IsAlreadyChoiceBraveInThisTurn { get; set; } = true; + + public bool IsChoiceBraveEffectTiming { get; set; } + + public List ChoiceBraveCards + { + get + { + List list = new List(); + SkillBase skillBase = Class.Skills.FirstOrDefault((SkillBase s) => s.OnWhenChoiceBrave != 0); + if (skillBase == null) + { + return list; + } + List list2 = SkillOptionValue.ParseOptionTokenID(skillBase.OptionValue.GetOption(SkillFilterCreator.ContentKeyword.card_id, "_OPT_NULL_")).ToList(); + for (int num = 0; num < list2.Count(); num++) + { + BattleCardBase item = BattleManagerBase.GetIns().CreateTransformCardRegisterVfx(Class, list2[num], IsPlayer, null, isRecoveryFinish: false, isChoice: true); + list.Add(item); + } + return list; + } + } + + public bool CanPlayAnyChoiceBraveCard + { + get + { + if (IsAlreadyChoiceBraveInThisTurn) + { + return false; + } + List choiceBraveCards = ChoiceBraveCards; + for (int i = 0; i < choiceBraveCards.Count(); i++) + { + if (choiceBraveCards[i].CanPlayAsChoiceBraveCard) + { + return true; + } + } + return false; + } + } + + public virtual bool CanChoiceBraveThisTurn + { + get + { + if (!IsAlreadyChoiceBraveInThisTurn) + { + return IsChoiceBraveEffectTiming; + } + return false; + } + } + + public virtual bool CanChoiceBrave + { + get + { + if (CanChoiceBraveThisTurn && CanPlayAnyChoiceBraveCard && BattleView.IsTouchable()) + { + return !BattleView.IsSelecting; + } + return false; + } + } + + public BattleCardBase LowestCostChoiceBraveCard => ChoiceBraveCards.OrderBy((BattleCardBase c) => c.Cost).FirstOrDefault(); + + public bool IsShortageDeckLose { get; protected set; } + + public bool IsShortageDeckWin => Class.SkillApplyInformation.IsShortageDeckWin; + + public bool IsChangeShortageDeck + { + get + { + if (!Class.SkillApplyInformation.IsShortageDeckWin) + { + return Class.Skills.Any((SkillBase s) => s.OnWhenShortageDeck != 0); + } + return false; + } + } + + public List HandCardList { get; private set; } + + public List DeckCardList { get; private set; } + + public List BattleStartDeckCardList { get; set; } + + public List DeckSkillCardList { get; private set; } + + public List ClassAndInPlayCardList { get; private set; } + + public List CemeteryList { get; private set; } + + public List BanishList { get; set; } + + public List FusionIngredientList { get; set; } + + public List TurnFusionCards { get; set; } + + public List NecromanceZoneList { get; set; } + + public List DiscardedCardList { get; set; } + + public List FusionIngredientAndDiscardedCardList { get; set; } + + public List ReservedCardList { get; set; } + + public List UniteList { get; set; } + + public List GetOnList { get; set; } + + public List BlackHole { get; set; } + + public List ChoiceBraveCardList { get; set; } + + public List PredictionCemeteryRandomCards { get; private set; } + + public List PredictionDamageRandomCards { get; private set; } + + public List PredictionBanishRandomCards { get; private set; } + + public virtual IStatusPanelControl StatusPanelControl + { + get + { + if ((bool)BattleView.StatusParentPanel) + { + return BattleView.StatusParentPanel.GetComponent(); + } + return new NullStatusPanelControl(); + } + } + + public IClassInfomationUI _classInfomationUI { get; protected set; } + + public ClassInformationUIController ClassInformationUIController { get; protected set; } + + public bool IsBuffDetail + { + get + { + if (IsShowBuffDetail || IsRecordingBuffDetail) + { + return !IsRecordingExceptBuffDetail; + } + return false; + } + } + + public bool IsShowBuffDetail { get; set; } + + public bool IsRecordingBuffDetail { get; set; } + + public bool IsRecordingExceptBuffDetail { get; set; } + + public SideLogInfo SideLogSkill { get; set; } + + protected BattleCardBase _class { get; set; } + + public HandControl HandControl => BattleView.HandControl; + + public abstract IBattlePlayerView BattleView { get; } + + public abstract IEmotion Emotion { get; } + + public bool IsSelfTurn { get; set; } + + public List ReturnList { get; set; } + + public List> LastTargetCardsList { get; set; } + + public List InHandCards { get; set; } + + public List SkillDiscards { get; set; } + + public List SkillBanishCards { get; set; } + + public List HealingCards { get; set; } + + public List SkillSummonedCards { get; set; } + + public List SummonedCards { get; set; } + + public BattleCardBase DrewSkillCard { get; set; } + + public BattleCardBase ReturnSkillCard { get; set; } + + public List EvolvedCards { get; set; } + + public List DestroyedWhenDestroyCards { get; set; } + + public List TurnPlayCardCountInfo { get; set; } + + public List TurnFusionCountInfo { get; set; } + + public List TurnEvolveCardCountInfo { get; set; } + + public int TurnNecromanceCount { get; set; } + + public int GameNecromanceCount { get; set; } + + public int GameUsedPpCount { get; set; } + + public BattleCardBase CardOnPlay { get; set; } + + public List TurnPlayCards { get; set; } + + public List TurnDrawCards { get; set; } + + public List TurnDrawTokenCardsWithId { get; set; } + + public List GameDrawCards { get; set; } + + public List GameDrawTokenCards { get; set; } + + public List GameAddUpdateDeckCards { get; set; } + + public List GameSummonCards { get; set; } + + public List GameSummonMomentTribe { get; set; } + + public List GamePlayMomentTribe { get; set; } + + public List GamePlayMomentSpellChargeCards { get; set; } + + public List GameUpdateDeckMomentTribe { get; set; } + + public List GamePlayCards { get; set; } + + public List GameTurnPlayCards { get; set; } + + public List GameEnhancePlayCards { get; set; } + + public List GameCrystallizedPlayCards { get; set; } + + public List GameLeftCards { get; set; } + + public List GameTurnLeftCards { get; set; } + + public List GameReturnedCards { get; set; } + + public List GameSuperSkyboundArtCards { get; set; } + + public List GameInplayMetamorphoseCards { get; set; } + + public List OkSkillInProcess { get; set; } + + public List TurnDestroyCards { get; set; } + + public List TurnWhenHealingCount { get; set; } + + public List GameBurialRiteCards { get; set; } + + public List TurnBurialRiteCards { get; set; } + + public List BurialRiteOrDiscardCardHandIndexList { get; set; } + + public List GameReanimatedCards { get; set; } + + protected List AddToDeckCardList { get; set; } + + public List TurnStartLifeList { get; protected set; } + + public int RallyCount { get; protected set; } + + public int DeckBanishCount { get; protected set; } + + public int GameResonanceStartCount { get; set; } + + public int TurnResonanceStartCount { get; set; } + + public int GameUsedWhiteRitualCount { get; set; } + + public int LastInplayWhiteRitualStack { get; set; } + + public List GameSkillReturnCardCountList { get; set; } + + public List GameSkillDiscardCountList { get; set; } + + public List GameSkillBuffCountList { get; set; } + + public List GameSkillMetamorphoseCountList { get; set; } + + public int GameSkillDiscardCount { get; set; } + + public List GameQuickAttackCards { get; set; } + + public IEnumerable SkillInfoDeckCards => ConvertToSkillInfoCollection(DeckCardList); + + public IEnumerable SkillInfoBattleStartDeckCards => ConvertToSkillInfoCollection(BattleStartDeckCardList); + + public IEnumerable SkillInfoHandCards => ConvertToSkillInfoCollection(HandCardList); + + public IEnumerable SkillInfoClassAndInPlayCards => ConvertToSkillInfoCollection(ClassAndInPlayCardList); + + public IEnumerable SkillInfoCemeterys => ConvertToSkillInfoCollection(CemeteryList); + + public IEnumerable SkillInfoBanishCards => ConvertToSkillInfoCollection(BanishList); + + public IEnumerable SkillInfoFusionIngredientList => ConvertToSkillInfoCollection(FusionIngredientList); + + public IEnumerable SkillInfoTurnFusionCards => ConvertToSkillInfoCollection(TurnFusionCards); + + public IEnumerable SkillInfoNecromanceZoneCards => ConvertToSkillInfoCollection(NecromanceZoneList); + + public IEnumerable SkillInfoInPlayCards => ConvertToSkillInfoCollection(InPlayCards); + + public IEnumerable> SkillInfoLastTargets => ConvertToSkillInfoCollectionList(LastTargetCardsList); + + public IEnumerable SkillInfoDiscards => ConvertToSkillInfoCollection(SkillDiscards); + + public IEnumerable SkillInfoDiscardedCards => ConvertToSkillInfoCollection(DiscardedCardList); + + public IEnumerable SkillInfoFusionIngredientAndDiscardedCards => ConvertToSkillInfoCollection(FusionIngredientAndDiscardedCardList); + + public IEnumerable SkillInfoReturnedCards => GameReturnedCards; + + public IEnumerable SkillInfoHealingCards => ConvertToSkillInfoCollection(HealingCards); + + public IEnumerable SkillInfoSkillSummonedCards => ConvertToSkillInfoCollection(SkillSummonedCards); + + public IEnumerable SkillInfoEvolvedCards => ConvertToSkillInfoCollection(EvolvedCards); + + public IEnumerable SkillInfoDestroyedWhenDestroyCards => ConvertToSkillInfoCollection(DestroyedWhenDestroyCards); + + public IEnumerable SkillInfoTurnPlayCards => ConvertToSkillInfoCollection(TurnPlayCards); + + public IEnumerable SkillInfoTurnDrawCards => ConvertToSkillInfoCollection(TurnDrawCards); + + public IEnumerable SkillInfoTurnDrawTokenCardsWithId => TurnDrawTokenCardsWithId; + + public IEnumerable SkillInfoGameSummonCards => GameSummonCards; + + public IEnumerable SkillInfoGamePlayCards => ConvertToSkillInfoCollection(GamePlayCards); + + public IEnumerable SkillInfoGameTurnPlayCards => GameTurnPlayCards; + + public IEnumerable SkillInfoGameEnhancePlayCards => GameEnhancePlayCards; + + public IEnumerable SkillInfoGameCrystallizedPlayCards => ConvertToSkillInfoCollection(GameCrystallizedPlayCards); + + public IEnumerable SkillInfoGameSkillActivated => ConvertToSkillInfoCollection(ChoiceBraveCardList); + + public IEnumerable SkillInfoInplayMetamorphosedCards => ConvertToSkillInfoCollection(GameInplayMetamorphoseCards); + + public IEnumerable SkillInfoGameBurialRiteCards => ConvertToSkillInfoCollection(GameBurialRiteCards); + + public IEnumerable SkillInfoTurnBurialRiteCards => ConvertToSkillInfoCollection(TurnBurialRiteCards); + + public IEnumerable SkillInfoGameReanimatedCards => GameReanimatedCards; + + public IEnumerable SkillInfoGameDrawCards => ConvertToSkillInfoCollection(GameDrawCards); + + public IEnumerable SkillInfoGameDrawTokenCards => ConvertToSkillInfoCollection(GameDrawTokenCards); + + public IEnumerable SkillInfoGameAddUpdateDeckCards => ConvertToSkillInfoCollection(GameAddUpdateDeckCards); + + public IEnumerable SkillInfoGameLeftCards => ConvertToSkillInfoCollection(GameLeftCards); + + public IEnumerable SkillInfoGameTurnLeftCards => GameTurnLeftCards; + + public IEnumerable SkillInfoGameSuperSkyboundArtCards => ConvertToSkillInfoCollection(GameSuperSkyboundArtCards); + + public IReadOnlyBattleCardInfo SkillInfoClass => Class; + + public IEnumerable SkillInfoGameQuickAttackCards => ConvertToSkillInfoCollection(GameQuickAttackCards); + + public AvatarBattleInfo AvatarBattleInfo { get; set; } + + public int extraTurnCount { get; set; } + + public bool IsExtraTurn => extraTurnCount > 0; + + public int cardTotalNum { get; set; } + + public bool IsShortageDeck { get; private set; } + + public int _cumulativeEvolutionCount { get; protected set; } + + public bool IsSkinEvolved + { + get + { + if (_dataMgr.IsEvolveSkin(IsPlayer)) + { + return _cumulativeEvolutionCount > 0; + } + return false; + } + } + + public IEnumerable AllCards + { + get + { + for (int i = 0; i < HandCardList.Count(); i++) + { + yield return HandCardList[i]; + } + for (int i = 0; i < ClassAndInPlayCardList.Count; i++) + { + yield return ClassAndInPlayCardList[i]; + } + for (int i = 0; i < DeckCardList.Count(); i++) + { + yield return DeckCardList[i]; + } + } + } + + public List AllCardsWithCemeteryAndBanish + { + get + { + List list = AllCards.ToList(); + list.AddRange(CemeteryList); + list.AddRange(NecromanceZoneList); + list.AddRange(BanishList); + return list; + } + } + + public List AllCardsWithSkillIngredient + { + get + { + List list = AllCardsWithCemeteryAndBanish.ToList(); + list.AddRange(FusionIngredientList); + list.AddRange(GetOnList); + list.AddRange(UniteList); + list.AddRange(ReservedCardList); + list.AddRange(BlackHole); + return list; + } + } + + public IEnumerable InPlayCards + { + get + { + for (int i = 0; i < ClassAndInPlayCardList.Count; i++) + { + if (!(ClassAndInPlayCardList[i] is ClassBattleCardBase)) + { + yield return ClassAndInPlayCardList[i]; + } + } + } + } + + public BattleCardBase Class => _class; + + public event Action OnTurnStartStart; + + public event Func OnTurnStartFinish; + + public event Action OnTurnEndStart; + + public event Func OnTurnEnd; + + public event Func OnTurnEndFinish; + + public event Func OnTurnStartBeforeDraw; + + public event Func OnTurnStartAfterDraw; + + public event Action OnNecromance; + + public event Action OnPickCard; + + public event Action OnAfterPickCard; + + public event Action OnSetupClassEvent; + + public event Action OnSetupCardEvent; + + public event Func OnShortageDeck; + + public event Action> OnMulliganStart; + + public event Action, IEnumerable> OnMulliganEnd; + + public event Action OnClearDeck; + + public event Action OnChangePP; + + public event Action OnAddPpTotal; + + public event Action OnAddPp; + + public event Action OnAddBp; + + public event Action OnEpModifier; + + public event Action OnAddHandCardEvent; + + public event Action OnAddCemeteryEvent; + + public event Action OnAddPlayCardEvent; + + public event Action OnAddBanishEvent; + + public event Action OnAddDeckEvent; + + public event Action OnAddUniteEvent; + + public event Action OnSpellPlayEvent; + + public event Action OnFusion; + + public event Action OnGeton; + + public event Action, List, SkillBase> OnGetoff; + + public event Action, SkillBase> OnAddBlackHole; + + public event Action OnAfterReturnCardEvent; + + public event Func, VfxBase> OnAfterSummonCardEvent; + + public event Action OnAddHandCardAfterEvent; + + public event Func OnAddCemeteryAfterEvent; + + public event Action OnAddPlayCardAfterEvent; + + public event Action OnAddBanishAfterEvent; + + public event Action OnAddUniteAfterEvent; + + public event Action OnLeaveAfterEvent; + + public event Action OnSummonAfterEvent; + + public event Action OnMetamorphoseAfterEvent; + + public event Action> OnChangeDeckAfterEvent; + + public event Action, BattlePlayerBase, bool> OnDrawCards; + + public event Action, List, bool, bool, bool> OnTokenDrawCards; + + public event Action, bool> OnCreateReservedCards; + + public event Action, bool, bool, bool> OnUpdateDeck; + + public event Action OnIndexChange; + + public event Action, List, bool, bool, bool, bool, bool> OnSummonTokenCards; + + public event Action, bool, bool, bool, bool> OnSummonCards; + + public event Action, List, List, List, bool, bool, bool> OnCostChange; + + public event Action, bool, bool> OnRemoveCostChange; + + public event Action, int, int, int, int, int> OnPowerUp; + + public event Action OnPowerDownStart; + + public event Action, int, int, int, bool> OnPowerDown; + + public event Action> OnDeprivePowerUp; + + public event Action> OnDeprivePowerDown; + + public event Action, List> OnSpellCharge; + + public event Action OnDrain; + + public event Action OnSkillDamageStart; + + public event Action, List, List> OnDamage; + + public event Action, List> OnHeal; + + public event Action> OnDiscard; + + public event Action OnStartLeaveCard; + + public event Action OnDestroy; + + public event Action OnSkillDestroyOrBanish; + + public event Action OnBanish; + + public event Action OnPlayVoiceOnDeath; + + public event Action OnReturn; + + public event Action OnSkillReturn; + + public event Action> OnBeforeSkillEvolve; + + public event Action OnEvolveMeWhenAttack; + + public event Action> OnAfterSkillEvolve; + + public event Action OnPlayCard; + + public event Action OnWhenPlayEffect; + + public event Action, int> OnChantCountChange; + + public event Action OnChangeWhiteRitualStack; + + public event Action, int> OnChangeMaxAttackableCount; + + public event Action, int> OnMetamorphose; + + public event Action OnFusionMetamorphose; + + public event Action OnOpenCard; + + public event Action, BattleCardBase> OnUnite; + + public event Action OnRemoveLatestOperationJsonData; + + public event Action OnPlayComplete; + + public event Action OnEmotion; + + public event Action OnClearDestroyedCardList; + + public void SetCurrentEpCount(int setCount) + { + CurrentEpCount = setCount; + } + + public void AddCurrentEpCount(int addCount = 1) + { + CurrentEpCount += addCount; + } + + public void GainCurrentEpCount(int gainCount = 1) + { + CurrentEpCount -= gainCount; + } + + public VfxBase SetBp(int value) + { + Bp = value; + Bp = Math.Max(0, Bp); + Bp = Math.Min(Bp, 99); + return BattleView.SetBp(value); + } + + public VfxBase AddBp(int value) + { + Bp += value; + Bp = Math.Max(0, Bp); + Bp = Math.Min(Bp, 99); + return BattleView.SetBp(Bp); + } + + public void SetIsShortageDeckLose(bool flag) + { + IsShortageDeckLose = flag; + } + + public void ResetIsShortageDeck() + { + IsShortageDeck = false; + } + + public void SetCumulativeEvolutionCount(int count) + { + _cumulativeEvolutionCount = count; + } + + public int AddDamageByClassUseCard(string damageType) + { + if (Class != null) + { + int num = 0; + for (int i = 0; i < Class.SkillApplyInformation.AddDamageList.Count; i++) + { + if (Class.SkillApplyInformation.AddDamageList[i] is AddDamageInfo addDamageInfo && addDamageInfo.IsEffective(damageType, Class.Clan, isUseClass: true)) + { + num += addDamageInfo.AddDamage; + } + } + return num; + } + return 0; + } + + protected BattlePlayerBase(BattleManagerBase battleMgr, BattleCamera battleCamera, BackGroundBase backGround, IInnerOptionsBuilder innerOptionsBuilder) + { + BattleMgr = battleMgr; + _dataMgr = GameMgr.GetIns().GetDataMgr(); + BattleCamera = battleCamera; + BackGround = backGround; + _innerOptionsBuilder = innerOptionsBuilder; + Initialize(); + HandCardList = new List(); + DeckCardList = new List(); + BattleStartDeckCardList = new List(); + DeckSkillCardList = new List(); + ClassAndInPlayCardList = new List(); + CemeteryList = new List(); + PredictionCemeteryRandomCards = new List(); + PredictionDamageRandomCards = new List(); + PredictionBanishRandomCards = new List(); + BanishList = new List(); + FusionIngredientList = new List(); + TurnFusionCards = new List(); + NecromanceZoneList = new List(); + DiscardedCardList = new List(); + FusionIngredientAndDiscardedCardList = new List(); + ReservedCardList = new List(); + UniteList = new List(); + GetOnList = new List(); + BlackHole = new List(); + ChoiceBraveCardList = new List(); + ReturnList = new List(); + HealingCards = new List(); + LastTargetCardsList = new List>(); + SkillSummonedCards = new List(); + SummonedCards = new List(); + EvolvedCards = new List(); + DestroyedWhenDestroyCards = new List(); + InHandCards = new List(); + SkillDiscards = new List(); + SkillBanishCards = new List(); + TurnPlayCards = new List(); + TurnDrawCards = new List(); + TurnDrawTokenCardsWithId = new List(); + GameSummonCards = new List(); + GameSummonMomentTribe = new List(); + GamePlayMomentTribe = new List(); + GamePlayMomentSpellChargeCards = new List(); + GameUpdateDeckMomentTribe = new List(); + GamePlayCards = new List(); + GameTurnPlayCards = new List(); + GameEnhancePlayCards = new List(); + GameCrystallizedPlayCards = new List(); + GameInplayMetamorphoseCards = new List(); + GameBurialRiteCards = new List(); + GameQuickAttackCards = new List(); + TurnBurialRiteCards = new List(); + BurialRiteOrDiscardCardHandIndexList = new List(); + GameReanimatedCards = new List(); + OkSkillInProcess = new List(); + TurnDestroyCards = new List(); + AddToDeckCardList = new List(); + GameDrawCards = new List(); + GameDrawTokenCards = new List(); + GameAddUpdateDeckCards = new List(); + TurnStartLifeList = new List(); + TurnWhenHealingCount = new List(); + TurnPlayCardCountInfo = new List(); + TurnFusionCountInfo = new List(); + TurnEvolveCardCountInfo = new List(); + GameLeftCards = new List(); + GameTurnLeftCards = new List(); + GameReturnedCards = new List(); + GameSuperSkyboundArtCards = new List(); + GameSkillReturnCardCountList = new List(); + GameSkillDiscardCountList = new List(); + GameSkillBuffCountList = new List(); + GameSkillMetamorphoseCountList = new List(); + BonusConditionList = new List(); + BossRushSpecialSkillList = new List(); + ChoiceBraveSkillDescInfoList = new List(); + NowTurnEvol = true; + m_vfxCreator = CreateVfxCreator(); + CreateSelfBattleCard(); + _class = ClassAndInPlayCardList[0]; + } + + protected abstract void Initialize(); + + protected abstract void CreateSelfBattleCard(); + + protected virtual IBattlePlayerVfxCreator CreateVfxCreator() + { + return new BattlePlayerVfxCreatorBase(BattleView); + } + + public virtual VfxBase LoadResources(IBattleResourceMgr resourceMgr) + { + long sleeveId = (IsPlayer ? _dataMgr.GetPlayerSleeveId() : _dataMgr.GetEnemySleeveId()); + return SequentialVfxPlayer.Create(resourceMgr.LoadSleeveMaterial(sleeveId, IsPlayer), ClassInformationUIController.LoadResources(StatusPanelControl.GetClassInfoAnchor(), IsPlayer)); + } + + public virtual void Setup(BattlePlayerBase opponentBattlePlayer) + { + IsShortageDeckLose = false; + extraTurnCount = 0; + _cumulativeEvolutionCount = 0; + _opponentBattlePlayer = opponentBattlePlayer; + _opponentBattlePlayer.Class.ChangeClassClanParameter(); + GameMgr ins = GameMgr.GetIns(); + List list = new List(); + BattleManagerBase ins2 = BattleManagerBase.GetIns(); + if (IsPlayer) + { + int key = (IsPlayer ? ins.GetNetworkUserInfoData().GetSelfChaosId() : ins.GetNetworkUserInfoData().GetOpponentChaosId()); + if (Data.Master.ClassInfomationOrder != null && Data.Master.ClassInfomationOrder.ContainsKey(key)) + { + List value = new List(); + int num = 1; + Data.Master.ClassInfomationOrder.TryGetValue(key, out value); + for (int i = 0; i < value.Count; i++) + { + list.Add(CreateClassInfomationUI(num, value.Count, value[i])); + num++; + } + } + else if (ins.GetDataMgr().GetPlayerSubClassId() != 10) + { + int num2 = 1; + List crossOverClassInfoListOrNull = Data.Master.GetCrossOverClassInfoListOrNull(ins.GetDataMgr().GetPlayerClassId(), ins.GetDataMgr().GetPlayerSubClassId()); + if (crossOverClassInfoListOrNull == null || crossOverClassInfoListOrNull.Count <= 0) + { + list.Add(CreateClassInfomationUI()); + } + else + { + for (int j = 0; j < crossOverClassInfoListOrNull.Count; j++) + { + list.Add(CreateClassInfomationUI(num2, crossOverClassInfoListOrNull.Count, crossOverClassInfoListOrNull[j])); + num2++; + } + } + } + else if (Data.CurrentFormat == Format.Avatar) + { + int key2 = ((ins2 is NetworkBattleManagerBase) ? int.Parse(ins.GetNetworkUserInfoData().GetSelfAvatarBattleId()) : ins.GetDataMgr().GetPlayerCharaId()); + List value2 = new List(); + Data.Master.AvatarClassInformationOrder.TryGetValue(key2, out value2); + for (int k = 0; k < value2.Count; k++) + { + list.Add(CreateClassInfomationUI(k + 1, value2.Count, value2[k])); + } + } + else if (ins2.IsPuzzleMgr) + { + int playerClass = (ins2 as PuzzleBattleManager).PuzzleQuestData.BattleData.PlayerClass; + list.Add(CreateClassInfomationUI(1, 1, playerClass)); + } + else + { + list.Add(CreateClassInfomationUI()); + } + } + else if (ins.GetDataMgr().GetEnemySubClassId() != 10) + { + int num3 = 1; + List crossOverClassInfoListOrNull2 = Data.Master.GetCrossOverClassInfoListOrNull(ins.GetDataMgr().GetEnemyClassId(), ins.GetDataMgr().GetEnemySubClassId()); + if (crossOverClassInfoListOrNull2 == null || crossOverClassInfoListOrNull2.Count <= 0) + { + list.Add(CreateClassInfomationUI()); + } + else + { + for (int l = 0; l < crossOverClassInfoListOrNull2.Count; l++) + { + list.Add(CreateClassInfomationUI(num3, crossOverClassInfoListOrNull2.Count, crossOverClassInfoListOrNull2[l])); + num3++; + } + } + } + else if (Data.CurrentFormat == Format.Avatar && ins2 is NetworkBattleManagerBase) + { + int key3 = int.Parse(ins.GetNetworkUserInfoData().GetOpponentAvatarBattleId()); + List value3 = new List(); + Data.Master.AvatarClassInformationOrder.TryGetValue(key3, out value3); + for (int m = 0; m < value3.Count; m++) + { + list.Add(CreateClassInfomationUI(m + 1, value3.Count, value3[m])); + } + } + else + { + list.Add(CreateClassInfomationUI()); + } + ClassInformationUIController = new ClassInformationUIController(list); + ClassInformationUIController.SetUpEvent(this); + SetUpClassEvent(); + foreach (BattleCardBase deckCard in DeckCardList) + { + SetupCardEvent(deckCard); + } + foreach (BattleCardBase handCard in HandCardList) + { + SetupCardEvent(handCard); + } + foreach (BattleCardBase classAndInPlayCard in ClassAndInPlayCardList) + { + SetupCardEvent(classAndInPlayCard); + } + OnNecromance += delegate(BattleCardBase necromanceCard, SkillProcessor skillProcessor, int necromanceCount, bool isFusion) + { + List list2 = ClassAndInPlayCardList.ToList(); + list2.AddRange(DeckSkillCardList); + foreach (BattleCardBase item in list2) + { + item.Necromance(necromanceCard, skillProcessor, necromanceCount); + } + if (BattleMgr is NetworkBattleManagerBase networkBattleManagerBase) + { + networkBattleManagerBase.RegisterActionManager.Add(new RegisterPlayerParameter(RegisterActionBase.ActionBaseParameter.cemetery, -1 * necromanceCount, necromanceCard.IsPlayer)); + } + }; + Emotion.OnPlay += (ClassCharaPrm.EmotionType emoteType) => opponentBattlePlayer.Emotion.ReceiveOpponentEmotion(emoteType); + OnNecromance += delegate + { + BattleMgr.VfxMgr.RegisterImmediateVfx(InstantVfx.Create(delegate + { + StatusPanelControl.SetGrave(CemeteryList.Count((BattleCardBase c) => !c.IsClass)); + UpdateHandCardsPlayability(); + })); + }; + OnAddPlayCardAfterEvent += delegate + { + UpdateStatusPanelHandCount(); + }; + OnAddHandCardAfterEvent += delegate + { + UpdateStatusPanelHandCount(); + }; + OnAddCemeteryAfterEvent += delegate + { + UpdateStatusPanelHandCount(); + return NullVfx.GetInstance(); + }; + OnAddCemeteryAfterEvent += delegate + { + BattleMgr.VfxMgr.RegisterImmediateVfx(InstantVfx.Create(delegate + { + if (StatusPanelControl != null) + { + StatusPanelControl.SetGrave(CemeteryList.Count((BattleCardBase c) => !c.IsClass)); + } + })); + return InstantVfx.Create(delegate + { + UpdateHandCardsPlayability(); + }); + }; + OnAddBanishAfterEvent += delegate + { + UpdateHandCardsPlayability(); + UpdateStatusPanelHandCount(); + }; + OnAddUniteAfterEvent += delegate + { + UpdateHandCardsPlayability(); + UpdateStatusPanelHandCount(); + }; + OnChangeDeckAfterEvent += delegate(int previousCount, SkillProcessor skillProcessor, List summonCards) + { + if (previousCount % 2 == 1 && DeckCardList.Count % 2 == 0) + { + int gameResonanceStartCount = GameResonanceStartCount; + GameResonanceStartCount = gameResonanceStartCount + 1; + gameResonanceStartCount = TurnResonanceStartCount; + TurnResonanceStartCount = gameResonanceStartCount + 1; + StartSkillWhenResonanceStart(skillProcessor, summonCards); + } + }; + OnChangeDeckAfterEvent += delegate + { + DeckSkillCardList.RemoveAll((BattleCardBase c) => !c.IsInDeck); + }; + OnMulliganEnd += delegate + { + DeckSkillCardList.RemoveAll((BattleCardBase c) => !c.IsInDeck); + }; + OnTurnStartComplete = (Action)Delegate.Combine(OnTurnStartComplete, new Action(AddToDeckCardIndexChange)); + OnTurnStartComplete = (Action)Delegate.Combine(OnTurnStartComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + OnPostTurnEndComplete = (Action)Delegate.Combine(OnPostTurnEndComplete, new Action(AddToDeckCardIndexChange)); + OnPreTurnEndComplete = (Action)Delegate.Combine(OnPreTurnEndComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + } + + private void UpdateStatusPanelHandCount() + { + if (StatusPanelControl != null && HandCardList != null) + { + StatusPanelControl.SetHandCount(HandCardList.Count); + } + } + + public void UpdateStatusPanel(int handCount, int cemeteryCount, int deckCount) + { + if (StatusPanelControl != null) + { + StatusPanelControl.SetHandCount(handCount); + StatusPanelControl.SetGrave(cemeteryCount); + StatusPanelControl.SetDeck(deckCount); + } + } + + public virtual IClassInfomationUI CreateClassInfomationUI(int orderCount = 1, int totalInfoNum = 1, int clanId = -1) + { + if (clanId == -1) + { + clanId = (IsPlayer ? _dataMgr.GetPlayerClassId() : _dataMgr.GetEnemyClassId()); + } + IBattlePlayerView battlePlayerView = (IsPlayer ? BattleView : _opponentBattlePlayer.BattleView); + IBattlePlayerView battleEnemyView = (IsPlayer ? _opponentBattlePlayer.BattleView : BattleView); + switch ((CardBasePrm.ClanType)clanId) + { + case CardBasePrm.ClanType.MIN: + return new ElfInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.ROYAL: + return new RoyalInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.WITCH: + if (IsPlayer || totalInfoNum > 1) + { + return new WitchInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + } + return new ClassInfomationUIBase(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.DRAGON: + return new DragonInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.NECRO: + return new NecromanceInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.VAMPIRE: + return new VampireInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.BISHOP: + return new BishopInfomationUI(this, battlePlayerView, battleEnemyView, orderCount, totalInfoNum); + case CardBasePrm.ClanType.NEMESIS: + return new NemesisInfomationUI(this, battlePlayerView, orderCount, totalInfoNum); + default: + return new ClassInfomationUIBase(this, battlePlayerView, orderCount, totalInfoNum); + } + } + + public VfxBase Recovery() + { + return SequentialVfxPlayer.Create(ClassInformationUIController.LoadResources(StatusPanelControl.GetClassInfoAnchor(), IsPlayer), InstantVfx.Create(delegate + { + ClassInformationUIController.ShowInfomation(playEffect: false); + })); + } + + public abstract void SetupClone(BattlePlayerBase sourceBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags); + + public void SetupActionProcessorEvent(ActionProcessor processor) + { + processor.OnBeforePlayCard += delegate(BattleCardBase originalCard, BattleCardBase card, IEnumerable selectedCards) + { + if (!card.IsChoiceBraveSkillCard) + { + AddCurrentTrunPlayCount(1); + CardOnPlay = card; + TurnPlayCards.Add(card); + GamePlayCards.Add(card); + GameTurnPlayCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + GamePlayMomentTribe.Add(new CardAndTribe(card, card.Tribe)); + if (card.HasSpellCharge) + { + GamePlayMomentSpellChargeCards.Add(card); + } + if (card.CheckConditionFixedUseCost(isPrePlay: true)) + { + GameEnhancePlayCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + } + if (card.TransformInfo.Type == BattleCardBase.TransformType.Crystallize) + { + GameCrystallizedPlayCards.Add(card); + } + if (!BattleMgr.IsVirtualBattle) + { + BattleLogManager.GetInstance().AddLogDestFollower(BattleLogWindow.BattleLogType.PlayCardLog, card); + } + BattleView.HandView.RemoveCardFromView(card.BattleCardView, 0.3f); + } + }; + processor.OnAfterFusion += delegate + { + AddToDeckCardIndexChange(); + return NullVfx.GetInstance(); + }; + processor.OnPlayComplete = (Action)Delegate.Combine(processor.OnPlayComplete, new Action(AddToDeckCardIndexChange)); + processor.OnPlayComplete = (Action)Delegate.Combine(processor.OnPlayComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + processor.OnPlayComplete = (Action)Delegate.Combine(processor.OnPlayComplete, this.OnPlayComplete); + processor.OnPlayComplete = (Action)Delegate.Combine(processor.OnPlayComplete, (Action)delegate + { + CardOnPlay = null; + }); + processor.OnEvolutionComplete = (Action)Delegate.Combine(processor.OnEvolutionComplete, new Action(AddToDeckCardIndexChange)); + processor.OnEvolutionComplete = (Action)Delegate.Combine(processor.OnEvolutionComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvolutionEvent)); + processor.OnAttackComplete = (Action)Delegate.Combine(processor.OnAttackComplete, new Action(AddToDeckCardIndexChange)); + processor.OnAttackComplete = (Action)Delegate.Combine(processor.OnAttackComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + if (GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle) + { + processor.OnFusionComplete = (Action)Delegate.Combine(processor.OnFusionComplete, new Action(BattleMgr.DetailMgr.DetailPanelControl.UpdateCardDescriptionOnEvent)); + } + } + + private void SetUpClassEvent() + { + this.OnSetupClassEvent.Call(); + } + + public virtual void SetupCardEvent(BattleCardBase card) + { + if (card.IsUnit) + { + card.OnEvolveEvent += delegate(bool isSkill) + { + EvolveProcess(card, isSkill); + }; + } + this.OnSetupCardEvent.Call(card); + if (card.IsSpell) + { + card.OnPlay += () => RemoveSpellCardFromHand(card); + card.OnFinishWhenPlaySkill += () => AddSpellCardToCemetery(card); + } + card.OnRemoveFromInPlayAfterOneTime += (bool flg, SkillProcessor skillProcessorOneTime) => flg ? NullVfx.GetInstance() : card.SkillApplyInformation.AllSkillEffectStop(); + } + + public virtual BattleCardBase CreateCard(int cardId, int cardIndex, bool isChoiceBrave = false) + { + BattleCardBase battleCardBase = CardCreatorBase.CreateCard(cardId, IsPlayer, cardIndex, BattleManagerBase.GetIns().SBattleLoad, BattleMgr, BattleManagerBase.GetIns().BattleResourceMgr, _innerOptionsBuilder, isChoiceBrave); + SetupCardEvent(battleCardBase); + return battleCardBase; + } + + public BattleCardBase CreateVirtualCard(int cardId, int cardIndex) + { + BattleCardBase battleCardBase = CardCreatorBase.CreateVirtualCard(cardId, cardIndex, IsPlayer, BattleMgr, this, _opponentBattlePlayer, _innerOptionsBuilder); + SetupCardEvent(battleCardBase); + return battleCardBase; + } + + public BattleCardBase CreateNextIndexCard(int cardId, bool isChoiceBrave = false) + { + BattleCardBase result = CreateCard(cardId, cardTotalNum, isChoiceBrave); + if (!isChoiceBrave) + { + cardTotalNum++; + } + return result; + } + + public VfxBase CardManagement(BattleCardBase card, SkillProcessor skillProcessor, CARD_MANAGEMENT management, bool isRandom, List fusionCards = null, BattleCardBase vehicleCard = null, SkillBase skill = null, SummonInfo summonInfo = null, bool isOpen = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + switch (management) + { + case CARD_MANAGEMENT.DESTROY: + if (card.SkillApplyInformation.IsBanishByDestroy && card.SkillApplyInformation.IsDestroyByBanish) + { + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + else if (!card.SkillApplyInformation.IsBanishByDestroy && card.SkillApplyInformation.IsDestroyByBanish) + { + if (card.SkillApplyInformation.IsIndestructible && card.IsDestroyedBySkill) + { + card.ResetFlagCardAsDestroyed(); + } + else + { + sequentialVfxPlayer.Register(BanishManagement(card, skillProcessor, skill, isReturn: false, isRandom, isOpen)); + } + } + else + { + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + break; + case CARD_MANAGEMENT.BANISH: + if (card.SkillApplyInformation.IsBanishByDestroy && card.SkillApplyInformation.IsDestroyByBanish) + { + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + else if (card.SkillApplyInformation.IsBanishByDestroy && !card.SkillApplyInformation.IsDestroyByBanish) + { + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + else + { + sequentialVfxPlayer.Register(BanishManagement(card, skillProcessor, skill, isReturn: false, isRandom, isOpen)); + } + break; + case CARD_MANAGEMENT.RETURN: + GameReturnedCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + card.SetReturnedSkill(skill); + if (card.SkillApplyInformation.IsReturnByBanish && card.SkillApplyInformation.IsBanishByDestroy) + { + if (card.SkillApplyInformation.IsIndestructible) + { + sequentialVfxPlayer.Register(ReturnCardManagement(card, skillProcessor, skill)); + break; + } + card.FlagCardAsDestroyedBySkill(); + sequentialVfxPlayer.Register(DestroyManagement(card, skillProcessor, isRandom, skill)); + } + else if (card.SkillApplyInformation.IsReturnByBanish) + { + sequentialVfxPlayer.Register(BanishManagement(card, skillProcessor, skill, isReturn: true, isRandom, isOpen)); + } + else + { + sequentialVfxPlayer.Register(ReturnCardManagement(card, skillProcessor, skill)); + } + break; + case CARD_MANAGEMENT.FUSION_MATERIAL: + sequentialVfxPlayer.Register(Fusion(card, fusionCards, skillProcessor)); + break; + case CARD_MANAGEMENT.GETON: + sequentialVfxPlayer.Register(GetOnCardManagement(card, skillProcessor, vehicleCard, skill)); + break; + case CARD_MANAGEMENT.GETOFF: + return GetOffCardManagement(summonInfo, skillProcessor, vehicleCard, skill); + case CARD_MANAGEMENT.SUMMON: + return SummonCardManagement(summonInfo, skillProcessor, skill); + } + return sequentialVfxPlayer; + } + + public void CallOnSummonTokenCards(BattleCardBase card, List summonCards, List overflowCards, bool isSelf, bool isOwnerEffect, bool isIgnoreVoice, bool isRandomVoice, bool isEvoVoice) + { + this.OnSummonTokenCards.Call(card, summonCards, overflowCards, isSelf, isOwnerEffect, isIgnoreVoice, isRandomVoice, isEvoVoice); + } + + public void CallOnSummonCards(BattleCardBase card, List cards, bool isSelf, bool isDeckSelf, bool isIgnoreVoice, bool isBurialRite = false) + { + this.OnSummonCards.Call(card, cards, isSelf, isDeckSelf, isIgnoreVoice, isBurialRite); + } + + protected VfxBase Fusion(BattleCardBase fusionCard, List ingredientCards, SkillProcessor skillProcessor) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (!fusionCard.IsFusionable) + { + return sequentialVfxPlayer; + } + if (!GameMgr.GetIns().IsAdminWatch && !GameMgr.GetIns().IsReplayBattle) + { + BattleLogManager.GetInstance().AddFusionIngredients(fusionCard, isCreateClone: false); + } + if (!BattleMgr.IsVirtualBattle && !BattleMgr.IsRecovery) + { + sequentialVfxPlayer.Register(BattleView.CreateBeforeFusionVfx(fusionCard, ingredientCards)); + } + new SkillConditionCheckerOption(); + SkillProcessor.ProcessInfo processInfo = fusionCard.Skills.CreateWhenFusionMetamorphoseInfo(ingredientCards, skillProcessor, new BattlePlayerPair(fusionCard.SelfBattlePlayer, fusionCard.OpponentBattlePlayer)); + skillProcessor.Register(processInfo); + bool flag = processInfo != null; + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + foreach (BattleCardBase ingredientCard in ingredientCards) + { + parallelVfxPlayer.Register(UseFusionIngredientManagement(ingredientCard, fusionCard, skillProcessor, isRandom: false, flag)); + } + sequentialVfxPlayer.Register(parallelVfxPlayer); + TurnFusionCards.Add(fusionCard); + AddCurrentTurnFusionCount(1); + if (GameMgr.GetIns().IsAdminWatch || GameMgr.GetIns().IsReplayBattle) + { + BattleLogManager.GetInstance().AddFusionIngredients(fusionCard, isCreateClone: true); + } + BattleCardBase originalCard = fusionCard; + fusionCard.CallOnFusionEvent(ingredientCards); + sequentialVfxPlayer.Register(skillProcessor.Process(new BattlePlayerPair(this, _opponentBattlePlayer))); + if (flag) + { + fusionCard = fusionCard.MetamorphoseCard; + } + sequentialVfxPlayer.Register(BattleView.ReturnActCardAfterFusion(fusionCard.BattleCardView, flag)); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + ImmediateVfxMgr.GetInstance().Register(new ShowSideLogVfx(originalCard, null, originalCard.SelfBattlePlayer.BattleView.GetSideLogControl(isSkillTargetSelect: false), originalCard.GetCardSkillDescription(new SideLogInfo(null)), 3f)); + })); + VfxBase vfx = fusionCard.Fusion(skillProcessor, ingredientCards, flag); + sequentialVfxPlayer.Register(vfx); + VfxBase vfx2 = skillProcessor.Process(new BattlePlayerPair(this, _opponentBattlePlayer)); + sequentialVfxPlayer.Register(vfx2); + return sequentialVfxPlayer; + } + + public VfxBase CardManagement(List cards, SkillProcessor skillProcessor, CARD_MANAGEMENT management, bool isRandom, SkillBase skill = null) + { + if (!BattleMgr.IsRecovery) + { + for (int i = 0; i < cards.Count; i++) + { + BurialRiteOrDiscardCardHandIndexList.Add(HandCardList.IndexOf(cards[i])); + } + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (management == CARD_MANAGEMENT.DESTROY) + { + sequentialVfxPlayer.Register(DestroyManagement(cards, skillProcessor, isRandom, skill)); + } + return sequentialVfxPlayer; + } + + protected VfxBase DestroyManagement(BattleCardBase card, SkillProcessor skillProcessor, bool isRandom, SkillBase destroyedSkill = null) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + bool num = ClassAndInPlayCardList.Contains(card); + bool flag = HandCardList.Contains(card); + if (num) + { + this.OnStartLeaveCard.Call(); + sequentialVfxPlayer.Register(DestroyCard(card, skillProcessor, isRandom, destroyedSkill)); + sequentialVfxPlayer.Register(card.DestroyInPlay(skillProcessor, useDestroy: true, destroyedSkill)); + this.OnDestroy.Call(card); + } + else if (flag) + { + sequentialVfxPlayer.Register(DestroyCard(card, skillProcessor, isRandom, destroyedSkill)); + sequentialVfxPlayer.Register(DisCard(card, new List { card }, skillProcessor, destroyedSkill)); + } + return sequentialVfxPlayer; + } + + protected VfxBase DestroyManagement(List cards, SkillProcessor skillProcessor, bool isRandom, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (HandCardList.Contains(cards.First())) + { + for (int i = 0; i < cards.Count; i++) + { + sequentialVfxPlayer.Register(DestroyCard(cards[i], skillProcessor, isRandom, skill)); + } + sequentialVfxPlayer.Register(DisCards(cards, skillProcessor, skill)); + } + return sequentialVfxPlayer; + } + + protected VfxBase BanishManagement(BattleCardBase card, SkillProcessor skillProcessor, SkillBase skill, bool isReturn = false, bool isRandom = false, bool isOpen = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + bool num = InPlayCards.Contains(card); + bool flag = HandCardList.Contains(card); + bool flag2 = DeckCardList.Contains(card); + this.OnStartLeaveCard.Call(); + if (num) + { + card.SetBanishedInfo(BattleCardBase.BanishInfo.BanishPlace.Field); + sequentialVfxPlayer.Register(card.SkillApplyInformation.AllSkillEffectStop()); + sequentialVfxPlayer.Register(BanishCard(card, skillProcessor, isRandom, skill, isOpen)); + sequentialVfxPlayer.Register(card.Banish(skillProcessor, isReturn)); + } + else if (flag) + { + card.SetBanishedInfo(BattleCardBase.BanishInfo.BanishPlace.Hand); + sequentialVfxPlayer.Register(BanishCard(card, skillProcessor, isRandom, skill, isOpen)); + VfxWithLoading vfxWithLoading = card.BanishInHand(skillProcessor); + sequentialVfxPlayer.Register(vfxWithLoading.LoadingVfx); + sequentialVfxPlayer.Register(vfxWithLoading.MainVfx); + } + else if (flag2) + { + card.SetBanishedInfo(BattleCardBase.BanishInfo.BanishPlace.Deck); + sequentialVfxPlayer.Register(BanishCard(card, skillProcessor, isRandom, skill, isOpen)); + sequentialVfxPlayer.Register(card.BanishInDeck(skillProcessor)); + } + this.OnBanish.Call(card); + return sequentialVfxPlayer; + } + + public VfxBase UseFusionIngredientManagement(BattleCardBase ingredientCard, BattleCardBase fusionCard, SkillProcessor skillProcessor, bool isRandom = false, bool isFusionMetamorphose = false) + { + if (FusionIngredientList.Any((BattleCardBase c) => c == fusionCard)) + { + return NullVfx.GetInstance(); + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + VfxWithLoading vfxWithLoading = ingredientCard.FusionMaterialized(skillProcessor, fusionCard, isFusionMetamorphose); + this.OnFusion.Call(ingredientCard); + HandCardList.Remove(ingredientCard); + CallSkill((IBattlePlayerSkill s) => s.StopBattleHandCard, ingredientCard); + FusionIngredientList.Add(ingredientCard); + FusionIngredientAndDiscardedCardList.Add(ingredientCard); + if (isRandom) + { + PredictionBanishRandomCards.Add(ingredientCard); + } + this.OnAddBanishAfterEvent.Call(fusionCard); + sequentialVfxPlayer.Register(ingredientCard.UnloadResource()); + sequentialVfxPlayer.Register(vfxWithLoading.LoadingVfx); + sequentialVfxPlayer.Register(vfxWithLoading.MainVfx); + return sequentialVfxPlayer; + } + + protected VfxBase ReturnCardManagement(BattleCardBase card, SkillProcessor skillProcessor, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + this.OnStartLeaveCard.Call(); + sequentialVfxPlayer.Register(ReturnCard(card, skillProcessor, skill)); + this.OnReturn.Call(card); + return sequentialVfxPlayer; + } + + protected VfxBase GetOnCardManagement(BattleCardBase getOnCard, SkillProcessor skillProcessor, BattleCardBase vehicleCard, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + vehicleCard.SkillApplyInformation.AddGetOnCard(getOnCard); + getOnCard.DeathTypeInfo.LeaveByGetOn = true; + sequentialVfxPlayer.Register(getOnCard.RemoveFromInPlay()); + sequentialVfxPlayer.Register(CardToVehicleZone(getOnCard, skill)); + SkillProcessor.ProcessInfo info = vehicleCard.Skills.CreateWhenGetOnInfo(skillProcessor, playerInfoPair); + sequentialVfxPlayer.Register(getOnCard.RemoveFromInPlayAfter(skillProcessor)); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor)); + skillProcessor.Register(info); + sequentialVfxPlayer.Register(getOnCard.GetOn(vehicleCard.BattleCardView.Transform, vehicleCard.BattleCardView, skillProcessor)); + return sequentialVfxPlayer; + } + + protected VfxBase GetOffCardManagement(SummonInfo summonInfo, SkillProcessor skillProcessor, BattleCardBase vehicleCard, SkillBase skill) + { + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + foreach (BattleCardBase summonedCard in summonInfo.SummonedCardsList.summonedCards) + { + vfxWithLoadingSequential.RegisterVfxWithLoading(summonedCard.SkillPlayCard(IsPlayer, SkillBaseSummon.SUMMON_TYPE.TOKEN, skillProcessor, skill, isGetoff: true)); + } + vfxWithLoadingSequential.RegisterToLoadingVfx(BattleMgr.LoadCardResources(summonInfo.SummonedCardsList.summonedCards.ToList())); + vfxWithLoadingSequential.RegisterToLoadingVfx(BattleMgr.LoadCardResources(summonInfo.SummonedCardsList.overflowCards.ToList())); + this.OnGetoff.Call(summonInfo.SummonedCardsList.summonedCards.ToList(), summonInfo.SummonedCardsList.overflowCards.ToList(), skill); + vfxWithLoadingSequential.RegisterToMainVfx(StartSkillWhenChangeInplay(null, summonInfo.SummonedCardsList.summonedCards.ToList(), skillProcessor, isSummonCheck: false)); + vehicleCard.GetOffCards.AddRange(summonInfo.SummonedCardsList.summonedCards); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + skillProcessor.Register(vehicleCard.Skills.CreateWhenGetOffInfo(skillProcessor, playerInfoPair), ignoreOwnerDeadCheck: true); + UpdateHandCardsPlayability(); + return vfxWithLoadingSequential; + } + + protected VfxBase SummonCardManagement(SummonInfo summonInfo, SkillProcessor skillProcessor, SkillBase skill) + { + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + if (summonInfo.IsReanimate) + { + skillConditionCheckerOption.ReanimatedCards = ConvertToSkillInfoCollection(summonInfo.SummonedCardsList); + } + if (summonInfo.IsDeckSelfSummon) + { + skillConditionCheckerOption.DeckSelfSummonedCards = ConvertToSkillInfoCollection(summonInfo.SummonedCardsList); + } + foreach (BattleCardBase summonedCard in summonInfo.SummonedCardsList.summonedCards) + { + vfxWithLoadingSequential.RegisterVfxWithLoading(summonedCard.SkillPlayCard(summonInfo.IsPlayer, summonInfo.SummonType, skillProcessor, skill, isGetoff: false, summonInfo.IsReanimate)); + } + vfxWithLoadingSequential.RegisterToLoadingVfx(BattleMgr.LoadCardResources(summonInfo.SummonedCardsList.summonedCards.ToList())); + SkillSummonedCards = new List(summonInfo.SummonedCardsList.summonedCards); + SummonedCards = new List(summonInfo.SummonedCardsList.ToList()); + vfxWithLoadingSequential.RegisterToLoadingVfx(BattleMgr.LoadCardResources(summonInfo.SummonedCardsList.overflowCards.ToList())); + vfxWithLoadingSequential.RegisterToMainVfx(StartSkillWhenChangeInplay(null, summonInfo.SummonedCardsList.summonedCards.ToList(), skillProcessor, isSummonCheck: true, null, skillConditionCheckerOption)); + for (int i = 0; i < SkillSummonedCards.Count; i++) + { + List list = new List(); + for (int j = i + 1; j < SkillSummonedCards.Count; j++) + { + list.Add(SkillSummonedCards[j]); + } + StartSkillWhenSummonOther(SkillSummonedCards[i], skillProcessor, summonInfo.IsReanimate, list); + } + BattleCardBase[] array = summonInfo.SummonedCardsList.Where((BattleCardBase c) => c.IsInplay && c.IsUnit).ToArray(); + for (int num = 0; num < array.Length; num++) + { + array[num].SelfBattlePlayer.AddRallyCount(1); + } + UpdateHandCardsPlayability(); + return vfxWithLoadingSequential; + } + + protected VfxBase DestroyCard(BattleCardBase destroyCard, SkillProcessor skillProcessor, bool isRandom, SkillBase skill) + { + bool flag = destroyCard.IsChantField && destroyCard.ChantCount <= 0; + if (destroyCard.SkillApplyInformation.IsIndestructible && destroyCard.IsDestroyedBySkill && !flag && !destroyCard.DeathTypeInfo.MysteriesDestroy && (!destroyCard.IsTribe(CardBasePrm.TribeType.WHITE_RITUAL) || destroyCard.SkillApplyInformation.WhiteRitualCount > 0 || (!(destroyCard is FieldBattleCard) && !(destroyCard is ChantFieldBattleCard)))) + { + destroyCard.ResetFlagCardAsDestroyed(); + if (!destroyCard.IsDead) + { + return NullVfx.GetInstance(); + } + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (skillProcessor != null) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + if (ClassAndInPlayCardList.Any((BattleCardBase c) => c == destroyCard)) + { + new SkillConditionCheckerOption().DestroyedCard = destroyCard; + TurnDestroyCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, destroyCard, BattleMgr.IsTurnEnd)); + GameLeftCards.Add(destroyCard); + GameTurnLeftCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, destroyCard, BattleMgr.IsTurnEnd)); + sequentialVfxPlayer.Register(destroyCard.RemoveFromInPlay()); + sequentialVfxPlayer.Register(CardToCemetery(destroyCard, skill, CEMETERY_TYPE.NORMAL, isRandom)); + SkillProcessor.ProcessInfo info = destroyCard.Skills.CreateWhenLeaveInfo(skillProcessor, playerInfoPair); + VfxWith info2 = destroyCard.Skills.CreateWhenDestroyInfo(destroyCard, skillProcessor, playerInfoPair); + if (destroyCard.HasSkillWhenDestroy && !DestroyedWhenDestroyCards.Any((BattleCardBase x) => x.Index == destroyCard.Index)) + { + DestroyedWhenDestroyCards.Add(destroyCard); + } + sequentialVfxPlayer.Register(destroyCard.RemoveFromInPlayAfter(skillProcessor)); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor)); + skillProcessor.Register(info, ignoreOwnerDeadCheck: true); + skillProcessor.Register(info2.Value, ignoreOwnerDeadCheck: true); + destroyCard.OnDestroy += (BattleCardBase _card, SkillProcessor _skillProcessor) => info2.Vfx; + destroyCard.SetDestroyedBySkillList(skill); + StartSkillWhenDestroyOther(destroyCard, skillProcessor); + } + else if (HandCardList.Any((BattleCardBase c) => c == destroyCard)) + { + skillProcessor.Register(destroyCard.Skills.CreateDisCardInfo(skillProcessor, playerInfoPair)); + sequentialVfxPlayer.Register(CardToCemetery(destroyCard, skill)); + } + return sequentialVfxPlayer; + } + return CardToCemetery(destroyCard, skill); + } + + protected VfxBase BanishCard(BattleCardBase banishedCard, SkillProcessor skillProcessor, bool isRandom, SkillBase skill, bool isOpen) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + new SkillConditionCheckerOption(); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + if (InPlayCards.Any((BattleCardBase c) => c == banishedCard)) + { + SkillProcessor.ProcessInfo info = banishedCard.Skills.CreateWhenLeaveInfo(skillProcessor, playerInfoPair); + SkillProcessor.ProcessInfo info2 = banishedCard.Skills.CreateWhenBanishInfo(banishedCard, skillProcessor, playerInfoPair); + skillProcessor.Register(info, ignoreOwnerDeadCheck: true); + skillProcessor.Register(info2, ignoreOwnerDeadCheck: true); + sequentialVfxPlayer.Register(banishedCard.RemoveFromInPlay()); + sequentialVfxPlayer.Register(CardToBanishZone(banishedCard, skill, registerEvent: true, isRandom, isOpen)); + sequentialVfxPlayer.Register(banishedCard.RemoveFromInPlayAfter(skillProcessor)); + StartSkillWhenBanishOther(banishedCard, skillProcessor, isInplay: true); + } + else if (HandCardList.Any((BattleCardBase c) => c == banishedCard)) + { + SkillProcessor.ProcessInfo info3 = banishedCard.Skills.CreateWhenBanishInfo(banishedCard, skillProcessor, playerInfoPair); + skillProcessor.Register(info3, ignoreOwnerDeadCheck: true); + sequentialVfxPlayer.Register(CardToBanishZone(banishedCard, skill, registerEvent: true, isRandom, isOpen)); + StartSkillWhenBanishOther(banishedCard, skillProcessor, isInplay: false); + } + else if (DeckCardList.Any((BattleCardBase c) => c == banishedCard)) + { + SkillProcessor.ProcessInfo info4 = banishedCard.Skills.CreateWhenBanishInfo(banishedCard, skillProcessor, playerInfoPair); + skillProcessor.Register(info4, ignoreOwnerDeadCheck: true); + sequentialVfxPlayer.Register(CardToBanishZone(banishedCard, skill, registerEvent: true, isRandom, isOpen)); + if (!BattleManagerBase.IsForecast) + { + sequentialVfxPlayer.Register(new DeckChangeVfx(this)); + sequentialVfxPlayer.Register(new DummyDeckRemoveCardVfx(IsPlayer, 1)); + } + } + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor)); + return sequentialVfxPlayer; + } + + protected VfxBase ReturnCard(BattleCardBase targetCard, SkillProcessor skillProcessor, SkillBase skill) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + List list = new List(); + bool flag = HandCardList.Count < 9; + if (flag) + { + list.Add(targetCard); + targetCard.DrawTurn = ((targetCard.SelfBattlePlayer.IsSelfTurn && !BattleMgr.IsTurnEnd) ? targetCard.SelfBattlePlayer.Turn : (targetCard.SelfBattlePlayer.Turn + 1)); + } + BattleCardBase battleCardBase = targetCard.VirtualClone(this, _opponentBattlePlayer); + GameLeftCards.Add(battleCardBase); + GameTurnLeftCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, battleCardBase, BattleMgr.IsTurnEnd)); + skillConditionCheckerOption.InHandCard = ConvertToSkillInfoCollection(list); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + SequentialVfxPlayer sequentialVfxPlayer2 = SequentialVfxPlayer.Create(); + List list2 = new List(); + if (targetCard.SkillApplyInformation.IsSkillCantAtkAll) + { + list2.Add(targetCard); + } + SkillProcessor.ProcessInfo info = targetCard.Skills.CreateWhenLeaveInfo(skillProcessor, playerInfoPair); + skillProcessor.Register(info, ignoreOwnerDeadCheck: true); + SkillProcessor.ProcessInfo info2 = targetCard.Skills.CreateWhenReturnInfo(skillProcessor, playerInfoPair); + sequentialVfxPlayer2.Register(targetCard.ReturnCard(skillProcessor)); + parallelVfxPlayer.Register(ReturnToHand(targetCard, skill)); + sequentialVfxPlayer2.Register(targetCard.RemoveFromInPlayAfter(skillProcessor, isReturn: true)); + parallelVfxPlayer.Register(sequentialVfxPlayer2); + this.OnAfterReturnCardEvent.Call(targetCard); + this.OnLeaveAfterEvent.Call(targetCard); + skillProcessor.Register(info2, ignoreOwnerDeadCheck: true); + sequentialVfxPlayer.Register(parallelVfxPlayer); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(new List { targetCard }, null, skillProcessor, isSummonCheck: true, flag ? ((Func)((SkillBase s) => s.OnWhenAddToHand)) : null, skillConditionCheckerOption)); + StartSkillWhenReturnOther(targetCard, skillProcessor, list2); + return sequentialVfxPlayer; + } + + public VfxBase UniteCard(BattleCardBase destroyCard, SkillProcessor skillProcessor, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + new SkillConditionCheckerOption(); + destroyCard.FlagCardAsDestroyedBySkill(); + sequentialVfxPlayer.Register(CardToUniteZone(destroyCard, skill)); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, null, skillProcessor)); + return sequentialVfxPlayer; + } + + protected virtual VfxBase DisCard(BattleCardBase ownerCard, List targetCards, SkillProcessor skillProcessor, SkillBase discardedSkill) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + for (int i = 0; i < targetCards.Count; i++) + { + parallelVfxPlayer.Register(targetCards[i].DestroyInHand(skillProcessor)); + targetCards[i].SetDiscardedSkill(discardedSkill); + } + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: false, (BattleCardBase card) => card != ownerCard && card.Skills.Any((SkillBase s) => s.OnDisCardOtherStart != 0)); + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateDisCardOtherInfo(targetCards, cardsOrderBySkillActivation[num].IsPlayer, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + return SequentialVfxPlayer.Create(parallelVfxPlayer); + } + + protected virtual VfxBase DisCards(List targetCards, SkillProcessor skillProcessor, SkillBase discardedSkill) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + BurialRiteOrDiscardCardHandIndexList.Clear(); + })); + for (int num = 0; num < targetCards.Count; num++) + { + parallelVfxPlayer.Register(targetCards[num].DestroyInHand(skillProcessor)); + targetCards[num].SetDiscardedSkill(discardedSkill); + } + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: false, (BattleCardBase card) => !targetCards.Contains(card) && card.Skills.Any((SkillBase s) => s.OnDisCardOtherStart != 0)); + for (int num2 = 0; num2 < cardsOrderBySkillActivation.Count; num2++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num2].Skills.CreateDisCardOtherInfo(targetCards, cardsOrderBySkillActivation[num2].IsPlayer, skillProcessor, (cardsOrderBySkillActivation[num2].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + return SequentialVfxPlayer.Create(parallelVfxPlayer); + } + + protected virtual VfxBase ReturnToHand(BattleCardBase returnCard, SkillBase skill) + { + return FieldCardToHandCard(returnCard, skill); + } + + public VfxBase StartBattleMainView(bool playEffect = true) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(CreateUpdateClassInfoVfx(playEffect)); + for (int i = 0; i < InHandCards.Count; i++) + { + parallelVfxPlayer.Register(InHandCards.ToList()[i].BattleCardView.ShowHandCardInfo()); + } + return parallelVfxPlayer; + } + + public virtual VfxBase TurnStart() + { + foreach (BattleCardBase handCard in HandCardList) + { + handCard.SetOnDraw(draw: true); + } + IsSelfTurn = true; + _opponentBattlePlayer.IsSelfTurn = false; + this.OnTurnStartStart.Call(); + NowTurnEvol = true; + IsEpEvolveThisTurn = false; + TurnNecromanceCount = 0; + TurnPlayCards.Clear(); + TurnDrawCards.Clear(); + TurnDrawTokenCardsWithId.Clear(); + TurnBurialRiteCards.Clear(); + TurnFusionCards.Clear(); + if (!IsGameFirst || Turn != 1) + { + IsAlreadyChoiceBraveInThisTurn = false; + } + _turnUsedEpCount = 0; + TurnStartLifeList.Add(new TurnAndIntValue(Class.Life, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + _opponentBattlePlayer.TurnStartLifeList.Add(new TurnAndIntValue(_opponentBattlePlayer.Class.Life, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + SkillProcessor skillProcessor = new SkillProcessor(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + _ = PpTotal; + GameMgr.GetIns().GetDataMgr(); + int num = 0; + IDetailPanelControl detailPanelControl = BattleMgr.DetailMgr.DetailPanelControl; + if (EvolveWaitTurnCount <= 0) + { + for (int i = 0; i < BonusConditionList.Count; i++) + { + if (BonusConditionList[i].GetAndReduceAddPpTurn()) + { + BonusConditionList[i].UseUpAddPpTotalBonus(); + if (detailPanelControl._card != null && detailPanelControl._card.IsClass && detailPanelControl._card.IsPlayer == IsPlayer) + { + detailPanelControl.UpdateBuffInfo(_class, BonusConditionList); + } + num += BonusConditionList[i].MyRotationBonus.IncreaseAddPptotalAmount; + } + } + } + int count = ((!Class.SkillApplyInformation.IsTurnStartFixedPP) ? (1 + num) : 0); + VfxBase vfx = AddPpTotal(count, isUpdatePp: true, skillProcessor); + sequentialVfxPlayer.Register(vfx); + BattleLogManager.GetInstance().AddLogTurn(IsPlayer); + BattleLogManager.GetInstance().BeginLogBlockTurnChangeReactive(); + VfxBase[] allFuncCallResults = this.OnTurnStartBeforeDraw.GetAllFuncCallResults(skillProcessor); + foreach (VfxBase vfx2 in allFuncCallResults) + { + sequentialVfxPlayer.Register(vfx2); + } + BattleCardBase[] array = HandCardList.ToArray(); + BattleCardBase[] array2 = _opponentBattlePlayer.HandCardList.ToArray(); + BattleCardBase[] array3 = ClassAndInPlayCardList.ToArray(); + BattleCardBase[] array4 = _opponentBattlePlayer.ClassAndInPlayCardList.ToArray(); + BattleCardBase[] array5 = DeckSkillCardList.ToArray(); + BattleCardBase[] array6 = _opponentBattlePlayer.DeckSkillCardList.ToArray(); + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + BattleCardBase[] array7 = array; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx3 = array7[j].TurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx3); + } + array7 = array2; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx4 = array7[j].OpponentTurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx4); + } + array7 = array3; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx5 = array7[j].TurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx5); + } + array7 = array4; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx6 = array7[j].OpponentTurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx6); + } + array7 = array5; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx7 = array7[j].TurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx7); + } + array7 = array6; + for (int j = 0; j < array7.Length; j++) + { + VfxBase vfx8 = array7[j].OpponentTurnStart(skillProcessor); + parallelVfxPlayer.Register(vfx8); + } + BattleMgr.OperateMgr.CallOnUpdateAttackableEffect(array3.Where((BattleCardBase c) => c.Attackable).ToList(), array4.Where((BattleCardBase c) => c.Attackable).ToList()); + sequentialVfxPlayer.Register(parallelVfxPlayer); + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + VfxBase vfx9 = skillProcessor.Process(battlePlayerPair); + sequentialVfxPlayer.Register(vfx9); + allFuncCallResults = OnTurnStartSkillAfter.GetAllFuncCallResults(skillProcessor); + foreach (VfxBase vfx10 in allFuncCallResults) + { + sequentialVfxPlayer.Register(vfx10); + } + if (IsGameFirst && Turn == 1) + { + for (int num2 = 0; num2 < HandCardList.Count(); num2++) + { + HandCardList[num2].Skills.CreateAndRegisterWhenChangeInplaySelfhandInfo(HandCardList, skillProcessor, battlePlayerPair); + } + BattlePlayerPair playerInfoPair = new BattlePlayerPair(_opponentBattlePlayer, this); + for (int num3 = 0; num3 < _opponentBattlePlayer.HandCardList.Count(); num3++) + { + _opponentBattlePlayer.HandCardList[num3].Skills.CreateAndRegisterWhenChangeInplaySelfhandInfo(_opponentBattlePlayer.HandCardList, skillProcessor, playerInfoPair); + } + } + sequentialVfxPlayer.Register(TurnStartDraw(skillProcessor)); + sequentialVfxPlayer.Register(skillProcessor.Process(battlePlayerPair)); + BattleUIContainer battleUIContainer = BattleManagerBase.GetIns().BattleUIContainer; + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + battleUIContainer.EnableMenu(); + })); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + BattleMgr.BattlePlayer.TurnStartEffectEnd(); + })); + BattleLogManager.GetInstance().EndLogBlockTurnChangeReactive(); + if (!BattleMgr.IsBattleEnd) + { + if (GameMgr.GetIns().IsNetworkBattle && IsPlayer) + { + NetworkBattleManagerBase networkBattleManagerBase = BattleManagerBase.GetIns() as NetworkBattleManagerBase; + if (networkBattleManagerBase.turnEndTimeController != null) + { + networkBattleManagerBase.turnEndTimeController.AddTurnEndTimerLog("Player SetActiveVFX"); + } + } + ParallelVfxPlayer parallelVfxPlayer2 = ParallelVfxPlayer.Create(); + parallelVfxPlayer2.Register(InstantVfx.Create(SetActive)); + sequentialVfxPlayer.Register(parallelVfxPlayer2); + } + VfxBase allFuncVfxResults = this.OnTurnStartAfterDraw.GetAllFuncVfxResults(); + sequentialVfxPlayer.Register(allFuncVfxResults); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + foreach (BattleCardBase handCard2 in HandCardList) + { + handCard2.SetOnDraw(draw: false); + } + UpdateHandCardsPlayability(); + })); + sequentialVfxPlayer.Register(UpdateHandCardsCost()); + sequentialVfxPlayer.Register(UpdateInPlayBattleCardIconLabel()); + sequentialVfxPlayer.Register(this.OnTurnStartFinish.GetAllFuncVfxResults()); + OnTurnStartComplete.Call(); + return sequentialVfxPlayer; + } + + public abstract VfxBase StartTurnControl(string log = ""); + + public SequentialVfxPlayer TurnEvolveControl(GameObject eqIcon) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + bool firstEvolve = false; + if (EvolveWaitTurnCount > 0) + { + if (EvolveWaitTurnCount == 1) + { + firstEvolve = true; + } + EvolveWaitTurnCount--; + } + if (BattleMgr.IsRecovery || BattleMgr.IsPuzzleMgr) + { + sequentialVfxPlayer.Register(m_vfxCreator.CreateUpdateEp(CurrentEpCount, EvolveWaitTurnCount)); + if (NowTurnEvol && CurrentEpCount > 0 && EvolveWaitTurnCount <= 0) + { + sequentialVfxPlayer.Register(new TurnStartEvolveVfx(eqIcon, firstEvolve)); + } + } + else + { + sequentialVfxPlayer.Register(BattleMgr.LoadTurnPanelResource()); + sequentialVfxPlayer.Register(m_vfxCreator.CreateUpdateEp(CurrentEpCount, EvolveWaitTurnCount)); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_YOURTURN); + BattleMgr.TurnPanelControl.StartUI(Turn, EvolveWaitTurnCount, IsPlayer); + if (GameMgr.GetIns().IsWatchBattle || GameMgr.GetIns().IsReplayBattle) + { + BattleView.TurnEndButtonUI.GameObject.SetActive(value: true); + BattleView.TurnEndButtonUI.ChangeButtonView(IsPlayer); + } + })); + if (NowTurnEvol && CurrentEpCount > 0 && EvolveWaitTurnCount <= 0) + { + sequentialVfxPlayer.Register(new TurnStartEvolveVfx(eqIcon, firstEvolve)); + } + sequentialVfxPlayer.Register(WaitVfx.Create(1.6f)); + } + return sequentialVfxPlayer; + } + + public virtual VfxBase TurnStartDraw(SkillProcessor skillProcessor) + { + DeckCardList.Sort((BattleCardBase a, BattleCardBase b) => a.Index - b.Index); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (!Class.IsDead && !_opponentBattlePlayer.Class.IsDead && !BattleManagerBase.GetIns().IsPuzzleMgr) + { + sequentialVfxPlayer.Register(TurnStartDrawCard(skillProcessor)); + } + return sequentialVfxPlayer; + } + + protected abstract VfxBase TurnStartDrawCard(SkillProcessor skillProcessor); + + protected abstract void SetActive(); + + public abstract BattlePlayerBase CreateVirtualPlayer(); + + public VfxBase AddPpTotal(int count, bool isUpdatePp, SkillProcessor skillProcessor, BattleCardBase ownerCard = null, bool bySkill = false) + { + string text = ""; + bool flag = false; + if (Turn <= 1 && !IsPlayer) + { + flag = true; + } + if (flag) + { + text = text + "AddPpTotal " + count + "isUpdatePp " + isUpdatePp + "NotPPcounter " + Class.SkillApplyInformation.NotDecreasePPCounter + "IsTurnStartFixedPP " + Class.SkillApplyInformation.IsTurnStartFixedPP + ":" + StackTraceUtility.ExtractStackTrace(); + } + if (count < 0 && Class.SkillApplyInformation.NotDecreasePPCounter > 0) + { + if (flag) + { + LocalLog.AccumulateLastTraceLog(text); + } + return NullVfx.GetInstance(); + } + new SkillConditionCheckerOption(); + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + int ppTotal = PpTotal; + PpTotal += count; + if (PpTotal > 10) + { + PpTotal = 10; + } + else if (PpTotal < 0) + { + PpTotal = 0; + } + int num = PpTotal; + if (flag) + { + text = text + "DecreaseList " + Class.SkillApplyInformation.DecreaseTurnStartPPList.Count; + } + for (int i = 0; i < Class.SkillApplyInformation.DecreaseTurnStartPPList.Count; i++) + { + if (flag) + { + text = text + "Decrease:" + Class.SkillApplyInformation.DecreaseTurnStartPPList[i]; + } + num -= Class.SkillApplyInformation.DecreaseTurnStartPPList[i]; + if (num < 0) + { + num = 0; + } + } + Pp = (isUpdatePp ? num : Math.Min(Pp, PpTotal)); + if (flag) + { + text = text + "nowPP " + Pp; + LocalLog.AccumulateLastTraceLog(text); + } + parallelVfxPlayer.Register(new PpChangeVfx(this)); + this.OnChangePP.Call(PpTotal - ppTotal); + this.OnAddPpTotal.Call(PpTotal - ppTotal, Pp, IsPlayer, ownerCard, bySkill); + if (skillProcessor != null) + { + StartSkillWhenChangePPTotal(skillProcessor); + } + return parallelVfxPlayer; + } + + public VfxBase SetPpTotal(int pp, bool isUpdatePp, SkillProcessor skillProcessor) + { + return AddPpTotal(pp - PpTotal, isUpdatePp, skillProcessor); + } + + public SkillProcessor GetTurnEndSkillProcess() + { + SkillProcessor skillProcessor = new SkillProcessor(); + List list = new List(); + list.AddRange(HandCardList); + list.AddRange(_opponentBattlePlayer.HandCardList); + list.AddRange(ClassAndInPlayCardList); + list.AddRange(_opponentBattlePlayer.ClassAndInPlayCardList); + list.AddRange(DeckSkillCardList); + list.AddRange(_opponentBattlePlayer.DeckSkillCardList); + int num = list.Count(); + for (int i = 0; i < num; i++) + { + list[i].TurnEndSkillProcess(skillProcessor); + } + return skillProcessor; + } + + public virtual VfxBase TurnEnd() + { + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + SequentialVfxPlayer turnEndVfx = SequentialVfxPlayer.Create(); + if (this.OnTurnEndStart != null) + { + this.OnTurnEndStart.Call(); + } + BattleLogManager.GetInstance().BeginLogBlockTurnChangeReactive(); + turnEndVfx.Register(BattleView.SetIsNowTurnEnd(flg: true)); + SkillProcessor turnEndSkillProcess = GetTurnEndSkillProcess(); + VfxBase vfx = turnEndSkillProcess.Process(battlePlayerPair); + turnEndVfx.Register(vfx); + List list = new List(); + list.AddRange(ClassAndInPlayCardList); + list.AddRange(_opponentBattlePlayer.ClassAndInPlayCardList); + for (int i = 0; i < list.Count; i++) + { + list[i].CheckPreviousTurnAttacked(); + } + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + foreach (BattleCardBase inPlayCard in InPlayCards) + { + parallelVfxPlayer.Register(inPlayCard.TurnEndPostProcess()); + } + turnEndVfx.Register(parallelVfxPlayer); + VfxBase[] allFuncCallResults = this.OnTurnEnd.GetAllFuncCallResults(turnEndSkillProcess); + foreach (VfxBase vfx2 in allFuncCallResults) + { + turnEndVfx.Register(vfx2); + } + allFuncCallResults = OnTurnEndSkillAfter.GetAllFuncCallResults(turnEndSkillProcess); + foreach (VfxBase vfx3 in allFuncCallResults) + { + turnEndVfx.Register(vfx3); + } + turnEndVfx.Register(turnEndSkillProcess.Process(battlePlayerPair)); + turnEndVfx.Register(UpdateInPlayBattleCardIconLabel()); + turnEndVfx.Register(InstantVfx.Create(delegate + { + if (HandCardList.Count <= 0) + { + turnEndVfx.Register(BattleView.HandUnfocus()); + } + })); + TurnPlayCards.Clear(); + TurnDrawCards.Clear(); + TurnDrawTokenCardsWithId.Clear(); + TurnBurialRiteCards.Clear(); + TurnFusionCards.Clear(); + TurnNecromanceCount = 0; + _turnUsedEpCount = 0; + TurnResonanceStartCount = 0; + _opponentBattlePlayer.TurnResonanceStartCount = 0; + BattleLogManager.GetInstance().EndLogBlockTurnChangeReactive(); + turnEndVfx.Register(BattleMgr.JudgeBattleResult()); + if (!BattleMgr.IsRecovery) + { + turnEndVfx.Register(InstantVfx.Create(delegate + { + int count = ClassAndInPlayCardList.Count; + for (int k = 0; k < count; k++) + { + BattleCardBase card = ClassAndInPlayCardList[k]; + if (!card.BattleCardView.GameObject.activeSelf) + { + turnEndVfx.Register(InstantVfx.Create(delegate + { + card.BattleCardView.GameObject.SetActive(value: true); + if (card.IsInplay) + { + card.SetOnDraw(draw: false); + } + })); + } + } + })); + } + OnPreTurnEndComplete.Call(); + if (!Class.IsDead && !_opponentBattlePlayer.Class.IsDead) + { + IsSelfTurn = false; + VfxBase allFuncVfxResults = this.OnTurnEndFinish.GetAllFuncVfxResults(); + turnEndVfx.Register(allFuncVfxResults); + } + OnPostTurnEndComplete.Call(); + turnEndVfx.Register(BattleView.SetIsNowTurnEnd(flg: false)); + LocalLog.RecordTurnEndIfLoadErrorOccured(); + return turnEndVfx; + } + + public void DecreasesExtraTurnCount() + { + extraTurnCount = Math.Max(0, extraTurnCount - 1); + } + + public void Clear() + { + ClearSpineObject(); + ClearClassAndMainPlace(); + ClearBattleCount(); + } + + protected void ClearSpineObject() + { + if (Class is ClassBattleCardBase classBattleCardBase) + { + classBattleCardBase.ClearSpineObject(); + } + } + + public void ClearClassAndMainPlace() + { + HandCardList.Clear(); + DeckCardList.Clear(); + BattleStartDeckCardList.Clear(); + DeckSkillCardList.Clear(); + ClassAndInPlayCardList.Clear(); + } + + public void ClearBattleCount() + { + CemeteryList.Clear(); + PredictionCemeteryRandomCards.Clear(); + PredictionDamageRandomCards.Clear(); + PredictionBanishRandomCards.Clear(); + BanishList.Clear(); + NecromanceZoneList.Clear(); + UniteList.Clear(); + GetOnList.Clear(); + BlackHole.Clear(); + ChoiceBraveCardList.Clear(); + ReturnList.Clear(); + HealingCards.Clear(); + LastTargetCardsList.Clear(); + SkillSummonedCards.Clear(); + SummonedCards.Clear(); + EvolvedCards.Clear(); + DestroyedWhenDestroyCards.Clear(); + InHandCards.Clear(); + SkillDiscards.Clear(); + SkillBanishCards.Clear(); + DrewSkillCard = null; + TurnPlayCards.Clear(); + TurnDrawCards.Clear(); + TurnDrawTokenCardsWithId.Clear(); + GamePlayCards.Clear(); + GameTurnPlayCards.Clear(); + GameEnhancePlayCards.Clear(); + GameCrystallizedPlayCards.Clear(); + OkSkillInProcess.Clear(); + TurnDestroyCards.Clear(); + AddToDeckCardList.Clear(); + GameSummonCards.Clear(); + GameSummonMomentTribe.Clear(); + GamePlayMomentTribe.Clear(); + GamePlayMomentSpellChargeCards.Clear(); + GameUpdateDeckMomentTribe.Clear(); + GameDrawCards.Clear(); + GameDrawTokenCards.Clear(); + GameAddUpdateDeckCards.Clear(); + GameQuickAttackCards.Clear(); + TurnBurialRiteCards.Clear(); + GameReanimatedCards.Clear(); + TurnWhenHealingCount.Clear(); + GameLeftCards.Clear(); + GameTurnLeftCards.Clear(); + GameReturnedCards.Clear(); + GameSuperSkyboundArtCards.Clear(); + TurnPlayCardCountInfo.Clear(); + TurnFusionCountInfo.Clear(); + TurnNecromanceCount = 0; + GameNecromanceCount = 0; + GameUsedPpCount = 0; + RallyCount = 0; + DeckBanishCount = 0; + GameResonanceStartCount = 0; + TurnResonanceStartCount = 0; + GameUsedWhiteRitualCount = 0; + LastInplayWhiteRitualStack = 0; + _turnUsedEpCount = 0; + GameSkillReturnCardCountList.Clear(); + GameSkillDiscardCountList.Clear(); + GameSkillBuffCountList.Clear(); + GameSkillMetamorphoseCountList.Clear(); + GameSkillDiscardCount = 0; + DiscardedCardList.Clear(); + FusionIngredientList.Clear(); + FusionIngredientAndDiscardedCardList.Clear(); + ReservedCardList.Clear(); + TurnEvolveCardCountInfo.Clear(); + GameInplayMetamorphoseCards.Clear(); + GameBurialRiteCards.Clear(); + TurnStartLifeList.Clear(); + TurnFusionCards.Clear(); + } + + public BattleCardBase FindCardFromGameObject(GameObject cardObject) + { + return AllCards.FirstOrDefault((BattleCardBase s) => s.BattleCardView.GameObject == cardObject); + } + + protected void AddInplayCard(BattleCardBase card, bool isGetoff = false, bool isReanimate = false) + { + ClassAndInPlayCardList.Add(card); + if (!card.IsClass && !isGetoff) + { + GameSummonCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + GameSummonMomentTribe.Add(new CardAndTribe(card, card.Tribe)); + if (isReanimate) + { + GameReanimatedCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, card, BattleMgr.IsTurnEnd)); + } + } + } + + public void AddRallyCount(int addCount) + { + RallyCount += addCount; + } + + public VfxBase PickCard(BattleCardBase unit, SkillBase skill, SkillBaseSummon.SUMMON_TYPE summonType = SkillBaseSummon.SUMMON_TYPE.HAND, bool isGetoff = false, bool isReanimate = false) + { + this.OnPickCard.Call(unit); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + switch (summonType) + { + case SkillBaseSummon.SUMMON_TYPE.HAND: + HandCardToField(unit, skill); + break; + case SkillBaseSummon.SUMMON_TYPE.DECK: + DeckCardToField(unit, skill); + sequentialVfxPlayer.Register(new DeckChangeVfx(this)); + sequentialVfxPlayer.Register(new DummyDeckRemoveCardVfx(IsPlayer, 1)); + break; + case SkillBaseSummon.SUMMON_TYPE.TOKEN: + TokenToField(unit, skill, isGetoff, isReanimate); + break; + case SkillBaseSummon.SUMMON_TYPE.DESTROYED: + DestroyedToField(unit, skill); + break; + } + this.OnAfterPickCard.Call(); + return sequentialVfxPlayer; + } + + public virtual void HandCardToField(BattleCardBase targetCard, SkillBase skill = null) + { + BattleCardBase battleCardBase = HandCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null) + { + throw new Exception("Target card was not found in hand cards."); + } + this.OnAddPlayCardEvent.Call(battleCardBase, arg2: false, skill); + AddInplayCard(battleCardBase); + HandCardList.Remove(battleCardBase); + CallSkill((IBattlePlayerSkill s) => s.StopBattleHandCard, battleCardBase); + this.OnAddPlayCardAfterEvent.Call(); + this.OnSummonAfterEvent.Call(battleCardBase); + } + + private bool TokenToField(BattleCardBase targetCard, SkillBase skill, bool isGetoff = false, bool isReanimate = false) + { + if (InPlayCards.Count() < 6) + { + this.OnAddPlayCardEvent.Call(targetCard, isGetoff, skill); + AddInplayCard(targetCard, isGetoff, isReanimate); + this.OnSummonAfterEvent.Call(targetCard); + return true; + } + return false; + } + + public bool CemeteryConsumption(int num, BattleCardBase necromanceCard, SkillProcessor skillprocessor, bool isFusion) + { + if (CemeteryList.Count < num) + { + return false; + } + if (num == -1) + { + num = 0; + } + for (int i = 0; i < num; i++) + { + BattleCardBase item = CemeteryList.First(); + NecromanceZoneList.Add(item); + CemeteryList.Remove(item); + } + SuccessNecromance(necromanceCard, skillprocessor, num, isFusion); + return true; + } + + public void SuccessNecromance(BattleCardBase necromanceCard, SkillProcessor skillprocessor, int necromanceCount, bool isFusion) + { + int turnNecromanceCount = TurnNecromanceCount + 1; + TurnNecromanceCount = turnNecromanceCount; + GameNecromanceCount += necromanceCount; + this.OnNecromance.Call(necromanceCard, skillprocessor, necromanceCount, isFusion); + } + + public VfxBase GainCemetery(int gainCount) + { + if (gainCount > CemeteryList.Count()) + { + gainCount = CemeteryList.Count(); + } + for (int i = 0; i < gainCount; i++) + { + BattleCardBase item = CemeteryList.First(); + NecromanceZoneList.Add(item); + CemeteryList.Remove(item); + } + return this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults(); + } + + protected VfxBase FieldCardToHandCard(BattleCardBase targetCard, SkillBase skill) + { + BattleCardBase battleCardBase = ClassAndInPlayCardList.Single((BattleCardBase c) => c == targetCard); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(battleCardBase.RemoveFromInPlay()); + if (HandCardList.Count >= 9) + { + VfxBase vfx = CardToCemetery(battleCardBase, skill, CEMETERY_TYPE.FIELD_RETURN_HAND_OVER); + sequentialVfxPlayer.Register(vfx); + return sequentialVfxPlayer; + } + ClassAndInPlayCardList.Remove(battleCardBase); + HandCardAddList(battleCardBase, NetworkBattleDefine.NetworkCardPlaceState.Field, skill); + return sequentialVfxPlayer; + } + + protected void HandCardAddList(BattleCardBase targetCard, NetworkBattleDefine.NetworkCardPlaceState fromState, SkillBase skill, bool isOpen = false) + { + InHandCards.Add(targetCard); + this.OnAddHandCardEvent.Call(targetCard, fromState, isOpen, skill); + HandCardList.Add(targetCard); + CallSkill((IBattlePlayerSkill s) => s.StartBattleHandCard, targetCard); + this.OnAddHandCardAfterEvent.Call(); + } + + public VfxBase CardToCemetery(BattleCardBase targetCard, SkillBase skill, CEMETERY_TYPE cemeteryType = CEMETERY_TYPE.NORMAL, bool wasRandom = false) + { + if (CemeteryList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + BattleCardBase battleCardBase = ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + BattleCardBase battleCardBase2 = HandCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + BattleCardBase battleCardBase3 = DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null && battleCardBase2 == null && battleCardBase3 == null) + { + return NullVfx.GetInstance(); + } + this.OnAddCemeteryEvent.Call(targetCard, cemeteryType, arg3: false, skill); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + BattleCardBase battleCardBase4 = null; + if (battleCardBase != null) + { + ClassAndInPlayCardList.Remove(battleCardBase); + battleCardBase4 = battleCardBase; + if (battleCardBase.IsUnit && cemeteryType != CEMETERY_TYPE.FIELD_RETURN_HAND_OVER && !BattleMgr.IsVirtualBattle) + { + BattleLogManager.GetInstance().AddLogDestFollower(BattleLogWindow.BattleLogType.Destruction, battleCardBase); + } + } + else + { + battleCardBase4 = ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + } + if (battleCardBase4 == null && battleCardBase2 != null) + { + HandCardList.Remove(battleCardBase2); + CallSkill((IBattlePlayerSkill s) => s.StopBattleHandCard, battleCardBase2); + battleCardBase4 = battleCardBase2; + } + if (battleCardBase4 == null && battleCardBase3 != null) + { + DeckCardList.Remove(battleCardBase3); + sequentialVfxPlayer.Register(CreateUpdateDeckCountLabelVfx()); + battleCardBase4 = battleCardBase3; + } + VfxBase vfxBase = NullVfx.GetInstance(); + if (battleCardBase4 != null) + { + CemeteryList.Add(battleCardBase4); + if (!battleCardBase4.IsClass) + { + vfxBase = battleCardBase4.UnloadResource(); + sequentialVfxPlayer.Register(this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults()); + this.OnLeaveAfterEvent.Call(battleCardBase4); + } + if (wasRandom) + { + PredictionCemeteryRandomCards.Add(battleCardBase4); + } + } + return SequentialVfxPlayer.Create(vfxBase, sequentialVfxPlayer); + } + + public VfxBase CardToVehicleZone(BattleCardBase targetCard, SkillBase skill) + { + if (CemeteryList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + if (!ClassAndInPlayCardList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + this.OnGeton.Call(targetCard, skill); + ClassAndInPlayCardList.Remove(targetCard); + GetOnList.Add(targetCard); + sequentialVfxPlayer.Register(targetCard.UnloadResource()); + return sequentialVfxPlayer; + } + + public VfxBase DummyCardToCemetery(BattleCardBase targetCard, SkillBase skill = null) + { + this.OnAddCemeteryEvent.Call(targetCard, CEMETERY_TYPE.NORMAL, arg3: false, skill); + CemeteryList.Add(targetCard); + return this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults(); + } + + public VfxBase ClearDestroyedAndDiscardedCardList(SkillBase skill) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + int count = CemeteryList.Count; + this.OnAddBlackHole.Call(CemeteryList, skill); + this.OnAddBlackHole.Call(NecromanceZoneList, skill); + BlackHole.AddRange(CemeteryList); + BlackHole.AddRange(NecromanceZoneList); + CemeteryList.Clear(); + NecromanceZoneList.Clear(); + DestroyedWhenDestroyCards.Clear(); + for (int i = 0; i < DiscardedCardList.Count; i++) + { + FusionIngredientAndDiscardedCardList.Remove(DiscardedCardList[i]); + } + DiscardedCardList.Clear(); + for (int j = 0; j < count; j++) + { + parallelVfxPlayer.Register(DummyCardToCemetery(CardCreatorBase.GetDummyInstance(), skill)); + } + return parallelVfxPlayer; + } + + public VfxBase RemoveSpellCardFromHand(BattleCardBase targetSpellCard) + { + if (targetSpellCard.IsChoiceBraveSkillCard) + { + return NullVfx.GetInstance(); + } + BattleCardBase battleCardBase = HandCardList.SingleOrDefault((BattleCardBase c) => c == targetSpellCard); + if (battleCardBase == null) + { + throw new Exception("Target card was not found in hand cards."); + } + this.OnSpellPlayEvent.Call(battleCardBase); + HandCardList.Remove(battleCardBase); + return NullVfx.GetInstance(); + } + + public VfxBase AddSpellCardToCemetery(BattleCardBase targetSpellCard) + { + if (CemeteryList.Any((BattleCardBase c) => c == targetSpellCard)) + { + return NullVfx.GetInstance(); + } + if (!targetSpellCard.IsChoiceBraveSkillCard) + { + CemeteryList.Add(targetSpellCard); + } + else + { + ChoiceBraveCardList.Add(targetSpellCard); + } + BattleMgr.VfxMgr.RegisterImmediateVfx(this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults()); + return targetSpellCard.UnloadResource(); + } + + public VfxBase CardToBanishZone(BattleCardBase targetCard, SkillBase skill, bool registerEvent = true, bool wasRandom = false, bool isOpen = false) + { + targetCard.DeathTypeInfo.BanishDestroy = true; + if (BanishList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + if (registerEvent) + { + bool arg = isOpen || (skill is Skill_banish && skill.OnSelfTurnEndStart != 0 && skill.ConditionFilterCollection.VariableCompareFilter.Any((SkillVariableComareFilter f) => f.Text.Contains("hand_self"))); + this.OnAddBanishEvent.Call(targetCard, skill, arg); + } + BattleCardBase battleCardBase = null; + if (ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + battleCardBase = ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + ClassAndInPlayCardList.Remove(ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c == targetCard)); + BattleCardBase battleCardBase2 = battleCardBase.VirtualClone(this, _opponentBattlePlayer); + GameLeftCards.Add(battleCardBase2); + GameTurnLeftCards.Add(new TurnAndCard(IsSelfTurn ? Turn : BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn, battleCardBase2, BattleMgr.IsTurnEnd)); + } + else if (HandCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + battleCardBase = HandCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + HandCardList.Remove(battleCardBase); + CallSkill((IBattlePlayerSkill s) => s.StopBattleHandCard, battleCardBase); + } + else if (DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + battleCardBase = DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null) + { + throw new Exception("Target card was not found in either field, hand or deck."); + } + DeckCardList.Remove(battleCardBase); + battleCardBase.SelfBattlePlayer.DeckBanishCount++; + } + if (battleCardBase == null) + { + return NullVfx.GetInstance(); + } + BanishList.Add(battleCardBase); + SkillBanishCards.Add(battleCardBase); + if (wasRandom) + { + PredictionBanishRandomCards.Add(battleCardBase); + } + this.OnAddBanishAfterEvent.Call(targetCard); + this.OnLeaveAfterEvent.Call(targetCard); + return battleCardBase.UnloadResource(); + } + + public VfxBase CardToUniteZone(BattleCardBase targetCard, SkillBase skill) + { + targetCard.DeathTypeInfo.BanishDestroy = true; + if (UniteList.Any((BattleCardBase c) => c == targetCard)) + { + return NullVfx.GetInstance(); + } + this.OnAddUniteEvent.Call(targetCard, skill); + ClassAndInPlayCardList.Remove(targetCard); + UniteList.Add(targetCard); + this.OnAddUniteAfterEvent.Call(targetCard); + this.OnLeaveAfterEvent.Call(targetCard); + return targetCard.UnloadResource(); + } + + private void DeckCardToField(BattleCardBase targetCard, SkillBase skill) + { + BattleCardBase battleCardBase = DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null) + { + throw new Exception("Target card is not found from deck cards."); + } + this.OnAddPlayCardEvent.Call(battleCardBase, arg2: false, skill); + AddInplayCard(battleCardBase); + DeckCardList.Remove(battleCardBase); + this.OnSummonAfterEvent.Call(battleCardBase); + } + + private void DestroyedToField(BattleCardBase targetCard, SkillBase skill) + { + BattleCardBase battleCardBase = null; + battleCardBase = CemeteryList.SingleOrDefault((BattleCardBase c) => c == targetCard); + if (battleCardBase == null) + { + battleCardBase = NecromanceZoneList.SingleOrDefault((BattleCardBase c) => c == targetCard); + } + if (battleCardBase == null) + { + throw new Exception("Target card is not found from destroyed cards."); + } + this.OnAddPlayCardEvent.Call(battleCardBase, arg2: false, skill); + AddInplayCard(battleCardBase); + CemeteryList.Remove(battleCardBase); + NecromanceZoneList.Remove(battleCardBase); + this.OnSummonAfterEvent.Call(battleCardBase); + } + + public virtual VfxBase CardDrawVfx(IEnumerable DrawList, bool skipShuffle = false, bool isOpenDrawSkill = false) + { + return NullVfx.GetInstance(); + } + + private VfxBase DrawCard(BattleCardBase targetCard, SkillBase skill, bool isOpen = false, bool isToken = false, bool isReservation = false) + { + bool flag = false; + if (!isToken && DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + DeckCardList.Remove(targetCard); + if (!BattleMgr.IsVirtualBattle) + { + flag = true; + StatusPanelControl.SetDeck(DeckCardList.Count); + } + } + if (HandCardList.Count >= 9) + { + return NullVfx.GetInstance(); + } + if (isToken) + { + HandCardAddList(targetCard, isReservation ? NetworkBattleDefine.NetworkCardPlaceState.Reservation : NetworkBattleDefine.NetworkCardPlaceState.None, skill, isOpen); + return CreateUpdateDeckCountLabelVfx(); + } + targetCard.ResetCardParameterInHand(); + HandCardAddList(targetCard, NetworkBattleDefine.NetworkCardPlaceState.Deck, skill, isOpen); + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + if (DeckCardList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + DeckCardList.Remove(targetCard); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + StatusPanelControl.SetDeck(DeckCardList.Count); + })); + } + else if (NecromanceZoneList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + NecromanceZoneList.Remove(targetCard); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + targetCard.BattleCardView.ResetCardView(targetCard.BaseParameter); + })); + } + else if (CemeteryList.SingleOrDefault((BattleCardBase c) => c == targetCard) != null) + { + CemeteryList.Remove(targetCard); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + targetCard.BattleCardView.ResetCardView(targetCard.BaseParameter); + })); + } + if (flag) + { + return parallelVfxPlayer; + } + return SequentialVfxPlayer.Create(parallelVfxPlayer, CreateUpdateDeckCountLabelVfx()); + } + + public virtual VfxBase CreateUpdateDeckCountLabelVfx() + { + return InstantVfx.Create(delegate + { + StatusPanelControl.SetDeck(DeckCardList.Count); + }); + } + + protected virtual VfxBase CreateUpdateClassInfoVfx(bool playEffect) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + StatusPanelControl.SetHandCount(HandCardList.Count); + })); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + ClassInformationUIController.ShowInfomation(playEffect); + })); + return parallelVfxPlayer; + } + + private void EvolveProcess(BattleCardBase card, bool isSkill) + { + if (!CheckNotConsumeEpCard(card)) + { + GainCurrentEpCount(card.SkillApplyInformation.GetEp()); + _gameUsedEpCount += card.SkillApplyInformation.GetEp(); + _turnUsedEpCount += card.SkillApplyInformation.GetEp(); + } + if (!isSkill) + { + _cumulativeEvolutionCount++; + } + } + + public bool UseEpCount(int count) + { + if (CurrentEpCount >= count) + { + GainCurrentEpCount(count); + _gameUsedEpCount += count; + _turnUsedEpCount += count; + return true; + } + return false; + } + + public VfxBase AddDeckTokenCards(List cards, SkillProcessor skillProcessor, string updateType, SkillBase skill, bool isOpen) + { + if (updateType == "change") + { + DeckClear(skill); + } + for (int i = 0; i < cards.Count; i++) + { + AddToDeck(cards[i], callEvent: true, skill); + } + this.OnUpdateDeck.Call(skill.SkillPrm.ownerCard, cards, IsPlayer, updateType == "change", isOpen); + return NullVfx.GetInstance(); + } + + public void CallOnChangeDeckAfterEvent(int previousCount, SkillProcessor skillProcessor, List summonCards) + { + this.OnChangeDeckAfterEvent.Call(previousCount, skillProcessor, summonCards); + } + + public void DeckClear(SkillBase skill) + { + this.OnClearDeck.Call(); + this.OnAddBlackHole.Call(DeckCardList, skill); + BlackHole.AddRange(DeckCardList); + DeckCardList.Clear(); + } + + public void AddToDeck(BattleCardBase card, bool callEvent = false, SkillBase skill = null) + { + if (callEvent) + { + this.OnAddDeckEvent.Call(card, skill); + } + DeckCardList.Add(card); + if (card.HasDeckSelfSkill) + { + AddDeckSkillCard(card); + } + if (BattleMgr.XorShiftRandom(card.IsPlayer) != null && BattleMgr.XorShiftRandom(card.IsPlayer).IsActive && BattleMgr.IsMulliganEnd) + { + AddToDeckCardList.Add(card); + } + } + + public void AddDeckSkillCard(BattleCardBase card) + { + DeckSkillCardList.Add(card); + DeckSkillCardList = DeckSkillCardList.OrderBy((BattleCardBase c) => c.Index).ToList(); + } + + public void RemoveOriginalAndAddDeckSkillCard(BattleCardBase card) + { + DeckSkillCardList.RemoveAll((BattleCardBase c) => c.Index == card.Index); + AddDeckSkillCard(card); + } + + private void AddToDeckCardIndexChange() + { + if (AddToDeckCardList.Count == 0 && _opponentBattlePlayer.AddToDeckCardList.Count == 0) + { + return; + } + if (AddToDeckCardList.Count > 0 && BattleMgr.XorShiftRandom(AddToDeckCardList.First().IsPlayer) != null && BattleMgr.XorShiftRandom(AddToDeckCardList.First().IsPlayer).IsActive && BattleMgr.IsMulliganEnd) + { + for (int i = 0; i < AddToDeckCardList.Count; i++) + { + if (AddToDeckCardList[i].IsInDeck) + { + int changeInt = BattleMgr.XorShiftRandom(AddToDeckCardList[i].IsPlayer).GetChangeInt(DeckCardList.Count()); + BattleCardBase battleCardBase = DeckCardList[changeInt]; + int index = AddToDeckCardList[i].Index; + AddToDeckCardList[i].SetIndex(battleCardBase.Index); + this.OnIndexChange.Call(index, battleCardBase.Index, IsPlayer); + battleCardBase.SetIndex(index); + DeckCardList.Sort((BattleCardBase a, BattleCardBase b) => a.Index - b.Index); + } + } + } + AddToDeckCardList.Clear(); + if (_opponentBattlePlayer.AddToDeckCardList.Count > 0) + { + _opponentBattlePlayer.AddToDeckCardIndexChange(); + } + } + + public VfxBase ReplaceInPlay(BattleCardBase originalCard, BattleCardBase newCard, SkillProcessor skillProcessor, bool isMetamorphose = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + ClassAndInPlayCardList.Insert(ClassAndInPlayCardList.IndexOf(originalCard), newCard); + ClassAndInPlayCardList.Remove(originalCard); + sequentialVfxPlayer.Register(originalCard.RemoveFromInPlay()); + sequentialVfxPlayer.Register(originalCard.RemoveFromInPlayAfter(skillProcessor)); + sequentialVfxPlayer.Register(StartSkillWhenChangeInplay(null, new List { newCard }, skillProcessor, !isMetamorphose, null, null, isReplace: true)); + if (isMetamorphose) + { + this.OnMetamorphoseAfterEvent.Call(originalCard, newCard); + } + return sequentialVfxPlayer; + } + + public VfxBase ReplaceInHand(BattleCardBase originalCard, BattleCardBase newCard, SkillProcessor skillProcessor) + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + HandCardList.Insert(HandCardList.IndexOf(originalCard), newCard); + HandCardList.Remove(originalCard); + StartSkillWhenChangeInplaySelfHand(new List { newCard }, skillProcessor); + return result; + } + + public void RegisterSkill(IBattlePlayerSkill battlePlayerSkill) + { + _skillList.Add(battlePlayerSkill); + } + + public void UnregisterSkill(IBattlePlayerSkill battlePlayerSkill) + { + _skillList.Remove(battlePlayerSkill); + } + + private void CallSkill(Func> getFunc, BattleCardBase targetCard) + { + foreach (IBattlePlayerSkill skill in _skillList) + { + getFunc(skill)(targetCard); + } + } + + public virtual VfxBase UsePp(int pp, bool isNewReplayMoveTurn = false) + { + Pp -= pp; + AddGameUsedPp(pp); + return NullVfx.GetInstance(); + } + + public void AddGameUsedPp(int pp) + { + GameUsedPpCount += pp; + } + + public VfxBase UseBp(int bp, bool isVariableCost, bool isSelf) + { + Bp -= bp; + int bp2 = Bp; + return m_vfxCreator.CreateUseBp(bp2, bp, () => BattleView.GetBPLabelPosition(), isVariableCost, isSelf); + } + + public virtual VfxBase MoveToHand(List cardsToMoveToHand) + { + return NullVfx.GetInstance(); + } + + public virtual VfxBase MoveToDeck(List cardsToMoveToDeck) + { + return new MoveToDeckVfx(cardsToMoveToDeck, IsPlayer); + } + + protected virtual VfxWith> LotteryRandomDrawCard(int drawCount, SkillProcessor skillProcessor) + { + List list = new List(); + if (CheckShortageDeck(drawCount, skillProcessor, out var _)) + { + return new VfxWith>(SendShortageDeck(), list); + } + if (BattleManagerBase.IsRandomDraw) + { + list = SkillRandomSelectFilter.Filtering(drawCount, DeckCardList, BattleMgr).ToList(); + } + else + { + int num = Math.Min(drawCount, DeckCardList.Count); + for (int i = 0; i < num; i++) + { + list.Add(DeckCardList[i]); + } + } + return new VfxWith>(NullVfx.GetInstance(), list); + } + + public VfxWith> RandomCardDraw(int drawCount, SkillProcessor skillProcessor) + { + VfxWith> vfxWith = LotteryRandomDrawCard(drawCount, skillProcessor); + VfxWith> vfxWith2 = DrawCards(vfxWith.Value, skillProcessor); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(vfxWith2.Vfx); + sequentialVfxPlayer.Register(vfxWith.Vfx); + return new VfxWith>(sequentialVfxPlayer, vfxWith2.Value); + } + + public VfxWith> DrawManagement(List drawCards, SkillProcessor skillProcessor, bool isVisible, bool shortageDeck, SkillBase.SkillResultInfo resultInfo, SkillBase skill) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + VfxWith> vfxWith = DrawCards(drawCards, skillProcessor, isVisible, isMulligan: false, isToken: false, skill != null, skill, isReservation: false, resultInfo); + if (vfxWith.Value.Count() <= 0 && !shortageDeck) + { + resultInfo.drawCards = new List(); + return new VfxWith>(NullVfxWithLoading.GetInstance(), new List()); + } + if (resultInfo != null) + { + resultInfo.drawCards = ConvertToSkillInfoCollection(vfxWith.Value); + } + if (IsPlayer || GameMgr.GetIns().IsAdminWatch || isVisible || BattleMgr is SingleBattleMgr) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + foreach (BattleCardBase card in drawCards) + { + int cost = card.Cost; + List costList = card.BattleCardView.GetUseCostList(card.Cost); + bool isInHand = card.IsInHand; + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + if (card.BaseCost != cost) + { + card.BattleCardView.UpdateCost(costList, isGenerateInHand: true, playEffect: true, isInHand); + } + })); + } + sequentialVfxPlayer.Register(parallelVfxPlayer); + } + if (IsPlayer) + { + sequentialVfxPlayer.Register(new PlayerDrawCardVfx(drawCards, isVisible)); + sequentialVfxPlayer.Register(new PlayerEndDrawVfx(drawCards)); + } + else + { + if (!(GameMgr.GetIns().IsAdminWatch && isVisible)) + { + sequentialVfxPlayer.Register(new OpponentDrawCardVfx(drawCards, isVisible)); + } + sequentialVfxPlayer.Register(new OpponentDrawCardToHandVfx(drawCards, 0.4f, isVisible)); + } + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + vfxWithLoadingSequential.RegisterToMainVfx(InstantVfx.Create(delegate + { + foreach (BattleCardBase drawCard in drawCards) + { + drawCard.BattleCardView.HideCanPlayEffect(); + } + })); + vfxWithLoadingSequential.RegisterToMainVfx(vfxWith.Vfx); + vfxWithLoadingSequential.RegisterToMainVfx(sequentialVfxPlayer); + if (shortageDeck) + { + vfxWithLoadingSequential.RegisterToMainVfx(SendShortageDeck()); + } + vfxWithLoadingSequential.RegisterToMainVfx(InstantVfx.Create(delegate + { + UpdateHandCardsPlayability(); + })); + return new VfxWith>(vfxWithLoadingSequential, vfxWith.Value); + } + + public VfxWith> DrawCards(IEnumerable drawList, SkillProcessor skillProcessor, bool isOpen = false, bool isMulligan = false, bool isToken = false, bool isSkillDraw = false, SkillBase skill = null, bool isReservation = false, SkillBase.SkillResultInfo skillResultInfo = null, int tokenDrawSkillId = -1) + { + if (skillResultInfo != null) + { + skillResultInfo.drewOverHandLimitCards = new List(); + } + if (!drawList.Any()) + { + return new VfxWith>(NullVfx.GetInstance(), drawList); + } + int count = DeckCardList.Count; + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + ParallelVfxPlayer parallelVfxPlayer2 = ParallelVfxPlayer.Create(); + foreach (BattleCardBase card in drawList) + { + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + List list = new List(); + list.Add(card); + bool num = HandCardList.Count >= 9; + if (num) + { + list.RemoveAt(0); + this.OnAddCemeteryEvent.Call(card, CEMETERY_TYPE.DECK_DRAW_HAND_OVER, isOpen, skill); + CemeteryList.Add(card); + skillConditionCheckerOption.DrewOverHandLimitCards.Add(card); + skillResultInfo?.drewOverHandLimitCards.Add(card); + BattleMgr.VfxMgr.RegisterImmediateVfx(this.OnAddCemeteryAfterEvent.GetAllFuncVfxResults()); + int cost = card.Cost; + List costList = card.BattleCardView.GetUseCostList(card.Cost); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + if (card.BaseCost != cost) + { + card.BattleCardView.UpdateCost(costList, isGenerateInHand: true, playEffect: true, isForceUpdate: true); + } + })); + } + skillConditionCheckerOption.InHandCard = ConvertToSkillInfoCollection(list); + parallelVfxPlayer.Register(DrawCard(card, skill, isOpen, isToken, isReservation)); + parallelVfxPlayer2.Register(card.StartHandEffect()); + if (!isMulligan) + { + StartSkillWhenChangeInplaySelfHand(new List { card }, skillProcessor); + } + if (!num) + { + StartSkillWhenAddToHand(skillProcessor, skillConditionCheckerOption); + } + } + if (!isToken) + { + CallOnChangeDeckAfterEvent(count, skillProcessor, new List()); + } + sequentialVfxPlayer.Register(SequentialVfxPlayer.Create(parallelVfxPlayer, parallelVfxPlayer2)); + if (!isMulligan) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + SkillConditionCheckerOption skillConditionCheckerOption2 = new SkillConditionCheckerOption(); + if (skill != null) + { + DrewSkillCard = skill.SkillPrm.ownerCard; + } + List list2 = new List(); + List list3 = new List(); + if (isToken) + { + list2.AddRange(drawList); + skillConditionCheckerOption2.TokenDrewCards.AddRange(list2); + } + else + { + list3.AddRange(drawList); + skillConditionCheckerOption2.DeckDrewCards.AddRange(list3); + } + foreach (BattleCardBase item in drawList.Where((BattleCardBase c) => c.IsInHand)) + { + skillProcessor.Register(item.Skills.CreateWhenDraw(skillProcessor, playerInfoPair, skillConditionCheckerOption2)); + item.DrawTurn = ((item.SelfBattlePlayer.IsSelfTurn && !BattleMgr.IsTurnEnd) ? item.SelfBattlePlayer.Turn : (item.SelfBattlePlayer.Turn + 1)); + } + if (!IsPlayer) + { + IEnumerable enumerable = drawList.Where((BattleCardBase c) => c.Skills.Any((SkillBase s) => s.OnWhenDraw != 0 && s.PreprocessList.Any((SkillPreprocessBase p) => p is SkillPreprocessOpenCard))); + foreach (BattleCardBase item2 in enumerable) + { + item2.LastDrawOpenCard = enumerable.LastOrDefault(); + } + } + List list4 = new List(HandCardList); + list4.AddRange(ClassAndInPlayCardList); + foreach (BattleCardBase item3 in list4.Where((BattleCardBase c) => !drawList.Contains(c))) + { + SkillProcessor.ProcessInfo info = item3.Skills.CreateWhenDrawOther(list3, list2, skillProcessor, new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer), isSkillDraw); + skillProcessor.Register(info); + } + if (!isToken) + { + int count2 = TurnDrawCards.Count; + TurnDrawCards.AddRange(drawList); + GameDrawCards.AddRange(drawList); + this.OnDrawCards.Call(count2, TurnDrawCards.Count, drawList.ToList(), this, isOpen); + } + else + { + GameDrawTokenCards.AddRange(drawList); + if (tokenDrawSkillId != -1) + { + for (int num2 = 0; num2 < drawList.Count(); num2++) + { + TurnDrawTokenCardsWithId.Add(new CardAndId(drawList.ElementAt(num2), tokenDrawSkillId)); + } + } + } + } + VfxWithLoadingSequential vfxWithLoadingSequential = VfxWithLoadingSequential.Create(); + vfxWithLoadingSequential.RegisterVfxWithLoading(VfxWithLoading.Create(BattleMgr.LoadCardResources(drawList.ToList()))); + vfxWithLoadingSequential.RegisterToMainVfx(sequentialVfxPlayer); + return new VfxWith>(vfxWithLoadingSequential, drawList); + } + + public bool CheckShortageDeck(int drawNum, SkillProcessor skillProcessor, out bool isActiveChangeShortageDeck) + { + bool flag = drawNum > DeckCardList.Count; + isActiveChangeShortageDeck = false; + if (!IsChangeShortageDeck) + { + IsShortageDeck = flag; + return IsShortageDeck; + } + if (IsChangeShortageDeck && flag) + { + StartSkillWhenShortageDeck(skillProcessor); + isActiveChangeShortageDeck = true; + } + return false; + } + + public void CallRecordingMulliganStart(List cards) + { + this.OnMulliganStart.Call(this, cards); + } + + public virtual VfxBase CallRecordingMulligan(IList abandonCards, IList completeCards) + { + this.OnMulliganEnd.Call(abandonCards, completeCards); + return NullVfx.GetInstance(); + } + + protected virtual void PlayerActive() + { + } + + public virtual void UpdateHandCardsPlayability(bool areArrowsForcedOff = false) + { + } + + public VfxBase UpdateHandCardsCost(bool playEffect = true, bool isOnlyFixedUseCost = false) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + int i = 0; + for (int count = HandCardList.Count; i < count; i++) + { + parallelVfxPlayer.Register(HandCardList[i].CalcHandCost(playEffect, isOnlyFixedUseCost)); + } + return parallelVfxPlayer; + } + + public void ApplyFixedUseCostInfo() + { + HandParameter.IconLayout currentIconLayout = BattleCardView.GetCurrentIconLayout(); + HandControl.ArrangeType type = (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.FIXEDUSE_COST_INFO) ? HandControl.ArrangeType.Flat : HandControl.ArrangeType.Fan); + NetworkBattleManagerBase networkBattleMgr = BattleManagerBase.GetIns() as NetworkBattleManagerBase; + UpdateHandCostViewStrategy(); + InitHandParameterIconPos(currentIconLayout); + BattleView.HandView.ChangeArrangeType(type); + if (networkBattleMgr != null && networkBattleMgr.IsSkillSelectTiming) + { + BattleMgr.VfxMgr.RegisterImmediateVfx(SequentialVfxPlayer.Create(UpdateHandCardsCost(playEffect: false, isOnlyFixedUseCost: true), WaitEventVfx.Create(() => !networkBattleMgr.IsSkillSelectTiming), UpdateHandCardsCost(playEffect: false))); + } + else + { + BattleMgr.VfxMgr.RegisterImmediateVfx(UpdateHandCardsCost(playEffect: false)); + } + } + + private void UpdateHandCostViewStrategy() + { + int i = 0; + for (int count = HandCardList.Count; i < count; i++) + { + HandCardList[i].UpdateCostViewStrategy(); + } + } + + public void InitHandParameterIconPos(HandParameter.IconLayout layout) + { + int i = 0; + for (int count = HandCardList.Count; i < count; i++) + { + HandCardList[i].InitHandParameterIconPos(layout); + } + } + + public VfxWithLoadingSequential AddSpellChargeCountVfx(List targetCardList, List addCountList) + { + List list = new List(); + List list2 = new List(); + List list3 = new List(); + for (int i = 0; i < targetCardList.Count; i++) + { + BattleCardBase battleCardBase = targetCardList[i]; + int num = addCountList[i]; + battleCardBase.AddSpellChargeCount(num); + if ((!battleCardBase.IsPlayer && !GameMgr.GetIns().IsAdminWatch) || battleCardBase.IsInDeck) + { + continue; + } + for (int j = 0; j < num; j++) + { + list.Add(battleCardBase); + if (num >= Skill_spell_charge.SPELL_CHARGE_SUMMARY_COUNT) + { + list2.Add(num); + list3.Add(Skill_spell_charge.SPELL_CHARGE_SUMMARY_INTERVAL); + break; + } + list2.Add(1); + list3.Add(Skill_spell_charge.SPELL_CHARGE_INTERVAL); + } + } + return new SpellChargeSkillActivationVfx(list, list2, list3); + } + + public abstract EffectBattle GetSkillEffect(string skillEffectPath); + + public abstract Vector3 GetFieldCenterPosition(); + + public void StartSkillWhenChangeInplaySelfHand(List inHandCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + cardsOrderBySkillActivation[i].Skills.CreateAndRegisterWhenChangeInplaySelfhandInfo(inHandCards, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2); + } + } + + public VfxBase StartSkillWhenChangeInplay(List inHandCards, List inPlayCards, SkillProcessor skillProcessor, bool isSummonCheck = true, Func inplayCheckFunc = null, SkillConditionCheckerOption option = null, bool isReplace = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + if (inPlayCards != null && !isReplace && isSummonCheck) + { + sequentialVfxPlayer.Register(this.OnAfterSummonCardEvent.GetAllFuncVfxResults(skillProcessor, inPlayCards)); + } + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true); + List cardsOrderBySkillActivation2 = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: true, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation2.Count; i++) + { + sequentialVfxPlayer.Register(cardsOrderBySkillActivation2[i].Skills.RegisterAndProcessWhenChangeInplayImmediateInfo((cardsOrderBySkillActivation2[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2)); + } + for (int j = 0; j < cardsOrderBySkillActivation.Count; j++) + { + cardsOrderBySkillActivation[j].Skills.CreateAndRegisterWhenChangeInplaySelfhandInfo(inHandCards, skillProcessor, (cardsOrderBySkillActivation[j].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2); + } + for (int k = 0; k < cardsOrderBySkillActivation2.Count; k++) + { + cardsOrderBySkillActivation2[k].Skills.CreateAndRegisterWhenChangeInplayInfo(inPlayCards, skillProcessor, (cardsOrderBySkillActivation2[k].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2, isSummonCheck, inplayCheckFunc, option); + } + return sequentialVfxPlayer; + } + + public VfxBase StartSkillWhenChangeClassLife(SkillProcessor skillProcessor) + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true); + List cardsOrderBySkillActivation2 = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: false, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + cardsOrderBySkillActivation[i].Skills.CreateAndRegisterWhenChangeClassLifeSelfHandInfo(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2); + } + for (int j = 0; j < cardsOrderBySkillActivation2.Count; j++) + { + cardsOrderBySkillActivation2[j].Skills.CreateAndRegisterWhenChangeClassLifeInplayInfo(skillProcessor, (cardsOrderBySkillActivation2[j].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2); + } + return result; + } + + public VfxBase StartSkillWhenChangePPTotal(SkillProcessor skillProcessor) + { + SequentialVfxPlayer result = SequentialVfxPlayer.Create(); + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: false, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + cardsOrderBySkillActivation[i].Skills.CreateAndRegisterWhenChangePPTotalInfo(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2); + } + return result; + } + + public void StartSkillWhenAddToHand(SkillProcessor skillProcessor, SkillConditionCheckerOption option) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, BattleMgr is SingleBattleMgr, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + cardsOrderBySkillActivation[i].Skills.CreateAndRegisterWhenAddToHandInfo(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, option); + } + } + + public void StartSkillWhenDestroyOther(BattleCardBase destroyCard, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: true, containsHand: false, containsClass: false, containsInplay: false, containsDeck: false, (BattleCardBase card) => card != destroyCard); + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenDestroyOtherInfo(destroyCard, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + } + + public void StartSkillWhenReturnOther(BattleCardBase returnedCard, SkillProcessor skillProcessor, List cantAttackAllReturnCards) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: false, (BattleCardBase card) => card != returnedCard); + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenReturnOtherInfo(returnedCard, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, cantAttackAllReturnCards)); + } + } + + public void StartSkillWhenReturnSkillActivate(List returnedCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenReturnSkillActivateInfo(returnedCards, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + } + + public VfxBase StartSkillWhenPlayOtherEnhanceAndAccelerateAndCrystallize(BattleCardBase playedCard, bool isEnhance, SkillProcessor skillProcessor) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + if (playedCard.IsChoiceBraveSkillCard) + { + return parallelVfxPlayer; + } + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + foreach (BattleCardBase item in SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: true, containsHand: false, containsClass: false, containsInplay: false, containsDeck: false, (BattleCardBase card) => card != playedCard)) + { + foreach (SkillBase skill in item.Skills) + { + VfxWith vfxWith = item.Skills.CreateWhenPlayOtherEnhanceAndAccelerateAndCrystallizeInfo(skill, playedCard, isEnhance ? playedCard : null, skillProcessor, (item.SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2); + skillProcessor.Register(vfxWith.Value); + parallelVfxPlayer.Register(vfxWith.Vfx); + } + } + return parallelVfxPlayer; + } + + public VfxBase StartSkillWhenSummonOther(BattleCardBase summonedCard, SkillProcessor skillProcessor, bool isReanimate = false, List ignoreCheckCard = null) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: false, (BattleCardBase card) => ignoreCheckCard == null || ignoreCheckCard.Count == 0 || !ignoreCheckCard.Contains(card)); + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + if (cardsOrderBySkillActivation[num] != summonedCard) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenSummonOtherInfo(summonedCard, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, isReanimate)); + } + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenSummonSelfAndOtherInfo(summonedCard, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, isReanimate)); + } + return NullVfx.GetInstance(); + } + + public void StartSkillWhenFusionOther(List fusionIngredientCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = new List(); + list.AddRange(ClassAndInPlayCardList); + foreach (BattleCardBase item in list) + { + skillProcessor.Register(item.Skills.CreateWhenFusionOtherInfo(skillProcessor, playerInfoPair, fusionIngredientCards)); + } + } + + public void StartSkillWhenUseEpSelfAndOther(SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenUseEpSelfAndOtherInfo(skillProcessor, playerInfoPair)); + } + } + + public VfxBase StartSkillWhenHealingSelfAndOther(List healingCards, SkillProcessor skillProcessor, List healAmountList) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true); + if (cardsOrderBySkillActivation.Any()) + { + TurnAndIntValue turnAndIntValue = TurnWhenHealingCount.FirstOrDefault((TurnAndIntValue t) => t.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && t.Turn == Turn); + if (turnAndIntValue != null) + { + turnAndIntValue.Increment(); + } + else + { + TurnWhenHealingCount.Add(new TurnAndIntValue(1, Turn, BattleMgr.BattlePlayer.IsSelfTurn)); + } + } + for (int num = 0; num < cardsOrderBySkillActivation.Count; num++) + { + skillProcessor.Register(cardsOrderBySkillActivation[num].Skills.CreateWhenHealingSelfAndOtherInfo(healingCards, skillProcessor, (cardsOrderBySkillActivation[num].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, healAmountList)); + } + return NullVfx.GetInstance(); + } + + public VfxBase StartSkillWhenDamageSelfAndOther(SkillBase skill, List damageCards, SkillProcessor skillProcessor, int defDamage, int fixedDamage) + { + if (damageCards != null) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true, containsDeck: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenDamageSelfAndOtherInfo(skill, damageCards, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, defDamage, fixedDamage)); + } + } + return NullVfx.GetInstance(); + } + + public void StartSkillWhenBurialRiteOther(BattleCardBase burialRiteCard, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: true, containsInplay: true, containsDeck: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenBurialRiteOther(burialRiteCard, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2)); + } + } + + public void StartSkillWhenBanishOther(BattleCardBase banishedCard, SkillProcessor skillProcessor, bool isInplay) + { + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + BattlePlayerReadOnlyInfoPair battlePlayerReadOnlyInfoPair2 = new BattlePlayerReadOnlyInfoPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: true, containsClass: true, containsInplay: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenBanishOther(banishedCard, skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerReadOnlyInfoPair : battlePlayerReadOnlyInfoPair2, isInplay)); + } + } + + public void StartSkillWhenUseWhiteRitualStack(SkillProcessor skillProcessor, SkillConditionCheckerOption checkerOption) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = HandCardList.ToList(); + list.AddRange(ClassAndInPlayCardList); + list.AddRange(DeckSkillCardList); + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenUseWhiteRitualStackInfo(skillProcessor, playerInfoPair, checkerOption)); + } + } + + public void StartSkillWhenResonanceStart(SkillProcessor skillProcessor, List SummonCardList) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = HandCardList.ToList(); + list.AddRange(ClassAndInPlayCardList); + list.AddRange(DeckSkillCardList); + for (int i = 0; i < list.Count; i++) + { + BattleCardBase card = list[i]; + if (!SummonCardList.Any((BattleCardBase s) => s == card)) + { + skillProcessor.Register(card.Skills.CreateWhenResonanceStart(skillProcessor, playerInfoPair)); + } + } + } + + public VfxBase StartSkillWhenPpHealing(SkillProcessor skillProcessor) + { + List list = ClassAndInPlayCardList.ToList(); + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenPpHealingInfo(skillProcessor, playerInfoPair)); + } + return NullVfx.GetInstance(); + } + + public void StartSkillWhenBuffDebuffSelfAndOther(IEnumerable targetCards, IEnumerable inplayTargetCards, SkillProcessor skillProcessor) + { + if (targetCards.Count() != 0) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = ClassAndInPlayCardList.ToList(); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + List inplayDebuffingCards = (skillConditionCheckerOption.InplayBuffingCards = ConvertToSkillInfoCollection(inplayTargetCards)); + skillConditionCheckerOption.InplayDebuffingCards = inplayDebuffingCards; + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenBuffDebuffSelfAndOtherInfo(skillProcessor, playerInfoPair, skillConditionCheckerOption)); + } + } + } + + public void StartSkillWhenBuffSelfAndOther(IEnumerable buffingCards, IEnumerable inplayBuffingCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = ClassAndInPlayCardList.ToList(); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.InplayBuffingCards = ConvertToSkillInfoCollection(inplayBuffingCards); + if (buffingCards.Count() > 0) + { + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenBuffSelfAndOtherInfo(skillProcessor, playerInfoPair, skillConditionCheckerOption)); + } + } + } + + public void StartSkillWhenDebuffSelfAndOther(IEnumerable debuffingCards, IEnumerable inplayDebuffingCards, SkillProcessor skillProcessor) + { + if (debuffingCards.Count() != 0) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + List list = ClassAndInPlayCardList.ToList(); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.InplayDebuffingCards = ConvertToSkillInfoCollection(inplayDebuffingCards); + for (int i = 0; i < list.Count; i++) + { + skillProcessor.Register(list[i].Skills.CreateWhenDebuffSelfAndOtherInfo(skillProcessor, playerInfoPair, skillConditionCheckerOption)); + } + } + } + + public void StartSkillWhenDebuffIncludeSetMaxLife(BattleCardBase debuffingCard, IEnumerable inplayDebuffingCards, SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.InplayDebuffingCards = ConvertToSkillInfoCollection(inplayDebuffingCards); + skillProcessor.Register(debuffingCard.Skills.CreateWhenDebuffIncludeSetMaxLifeInfo(skillProcessor, playerInfoPair, skillConditionCheckerOption)); + } + + public void StartSkillWhenShortageDeck(SkillProcessor skillProcessor) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(this, _opponentBattlePlayer); + skillProcessor.Register(Class.Skills.CreateWhenShortageDeck(skillProcessor, playerInfoPair)); + } + + public void StartSkillWhenShortageDeckWinSkillActivate(List shortageDeckWinCards, SkillProcessor skillProcessor) + { + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.ShortageDeckWinCards = ConvertToSkillInfoCollection(shortageDeckWinCards); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenShortageDeckWinSkillActivate(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2, skillConditionCheckerOption)); + } + } + + public VfxBase StartSkillWhenBattleStart(SkillProcessor skillProcessor) + { + BattlePlayerPair battlePlayerPair = new BattlePlayerPair(this, _opponentBattlePlayer); + BattlePlayerPair battlePlayerPair2 = new BattlePlayerPair(_opponentBattlePlayer, this); + List cardsOrderBySkillActivation = SkillCollectionBase.GetCardsOrderBySkillActivation(this, _opponentBattlePlayer, isAll: false, containsHand: false, containsClass: true); + for (int i = 0; i < cardsOrderBySkillActivation.Count; i++) + { + skillProcessor.Register(cardsOrderBySkillActivation[i].Skills.CreateWhenBattleStartInfo(skillProcessor, (cardsOrderBySkillActivation[i].SelfBattlePlayer == this) ? battlePlayerPair : battlePlayerPair2)); + } + return skillProcessor.Process(battlePlayerPair); + } + + public static List ConvertToSkillInfoCollection(IEnumerable cards) + { + if (cards == null) + { + return new List(); + } + List list = new List(); + foreach (BattleCardBase card in cards) + { + list.Add(card); + } + return list; + } + + public static List> ConvertToSkillInfoCollectionList(List> cardsList) + { + if (cardsList == null) + { + return new List>(); + } + List> list = new List>(); + foreach (List cards in cardsList) + { + List item = cards.ToList().ConvertAll(ConvertIReadOnlyBattleCardInfo); + list.Add(item); + } + return list; + } + + public static IReadOnlyBattleCardInfo ConvertIReadOnlyBattleCardInfo(BattleCardBase card) + { + return card; + } + + public void AddLastTargetCardsList(BattleCardBase addCard) + { + if (LastTargetCardsList.Count > 0) + { + LastTargetCardsList.First().Add(addCard); + return; + } + List list = new List(); + List item = new List(); + list.Add(addCard); + LastTargetCardsList.Add(list); + _opponentBattlePlayer.LastTargetCardsList.Add(item); + } + + public List GetLastTargetCardsList(int index) + { + if (0 <= index && index < LastTargetCardsList.Count) + { + return LastTargetCardsList[index]; + } + return new List(); + } + + public void SkillsEndProcess() + { + ReturnList.Clear(); + LastTargetCardsList.Clear(); + InHandCards.Clear(); + HealingCards.Clear(); + SkillSummonedCards.Clear(); + SummonedCards.Clear(); + SkillDiscards.Clear(); + SkillBanishCards.Clear(); + DrewSkillCard = null; + OkSkillInProcess.Clear(); + LastInplayWhiteRitualStack = 0; + Class.SkillApplyInformation.ReservationAllDepriveRepeatSkill(); + } + + public void OnCallOneSkillProcess() + { + if (OnEndOneSkillProcess != null) + { + OnEndOneSkillProcess(); + OnEndOneSkillProcess = null; + } + } + + public VfxBase SendShortageDeck() + { + return this.OnShortageDeck.GetAllFuncVfxResults(); + } + + public void CopyToVirtualBase(BattlePlayerBase target, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags) + { + target._opponentBattlePlayer = virtualOpponentBattlePlayer; + target._skillList = _skillList.ToList(); + target.Pp = Pp; + target._ppTotal = _ppTotal; + target.SetCurrentEpCount(CurrentEpCount); + target.EvolveWaitTurnCount = EvolveWaitTurnCount; + target.NowTurnEvol = NowTurnEvol; + target._gameUsedEpCount = _gameUsedEpCount; + target._turnUsedEpCount = _turnUsedEpCount; + target.HandCardList = CloneCardList(HandCardList, target, virtualOpponentBattlePlayer, cloneFlags.Hand); + target.DeckCardList = CloneCardList(DeckCardList, target, virtualOpponentBattlePlayer, cloneFlags.Deck); + target.BattleStartDeckCardList = CloneCardList(BattleStartDeckCardList, target, virtualOpponentBattlePlayer, cloneFlags.Deck); + target.ClassAndInPlayCardList = CloneCardList(ClassAndInPlayCardList, target, virtualOpponentBattlePlayer, cloneFlags.InPlay); + target.CemeteryList = CloneCardList(CemeteryList, target, virtualOpponentBattlePlayer, cloneFlags.Cemetery); + if (target.ClassAndInPlayCardList.Count > 0 && target.ClassAndInPlayCardList[0] is ClassBattleCardBase) + { + target._class = target.ClassAndInPlayCardList[0]; + } + else + { + BattleCardBase battleCardBase = target.CemeteryList.FirstOrDefault((BattleCardBase c) => c is ClassBattleCardBase); + if (battleCardBase != null) + { + target._class = battleCardBase; + } + else + { + target._class = _class.VirtualClone(target, virtualOpponentBattlePlayer); + } + } + target.BanishList = CloneCardList(BanishList, target, virtualOpponentBattlePlayer, cloneFlags.Banish); + target.FusionIngredientList = CloneCardList(FusionIngredientList, target, virtualOpponentBattlePlayer, cloneFlags.FusionMaterial); + target.NecromanceZoneList = CloneCardList(NecromanceZoneList, target, virtualOpponentBattlePlayer, cloneFlags.NecromanceZone); + target.UniteList = CloneCardList(UniteList, target, virtualOpponentBattlePlayer, cloneFlags.Unite); + target.GetOnList = CloneCardList(GetOnList, target, virtualOpponentBattlePlayer, cloneFlags.GetOn); + target.SummonedCards = CloneCardList(SummonedCards, target, virtualOpponentBattlePlayer, isActualClone: true); + target.IsSelfTurn = IsSelfTurn; + target.DrewSkillCard = DrewSkillCard; + List list = new List(); + list.AddRange(target.HandCardList); + list.AddRange(target.ClassAndInPlayCardList); + list.AddRange(target.DeckCardList); + list.AddRange(target.CemeteryList); + list.AddRange(target.BanishList); + list.AddRange(target.NecromanceZoneList); + list.AddRange(target.FusionIngredientList); + list.AddRange(target.UniteList); + list.AddRange(target.GetOnList); + target.ReturnList = FindClonedIdCards(list, ReturnList); + List> list2 = new List>(); + foreach (List lastTargetCards in LastTargetCardsList) + { + list2.Add(FindClonedIdCards(list, lastTargetCards)); + } + target.LastTargetCardsList = list2; + target.InHandCards = FindClonedIdCards(list, InHandCards); + target.SkillDiscards = FindClonedIdCards(list, SkillDiscards); + target.SkillBanishCards = FindClonedIdCards(list, SkillBanishCards); + target.TurnPlayCards = FindClonedIdCards(list, TurnPlayCards); + target.TurnDrawCards = FindClonedIdCards(list, TurnDrawCards); + target.TurnDrawTokenCardsWithId = new List(); + int i; + for (i = 0; i < TurnDrawTokenCardsWithId.Count; i++) + { + target.TurnDrawTokenCardsWithId.Add(new CardAndId(list.FirstOrDefault((BattleCardBase c) => c.EquelsID(TurnDrawTokenCardsWithId[i].Card)), TurnDrawTokenCardsWithId[i].Id)); + } + target.GamePlayCards = FindClonedIdCards(list, GamePlayCards); + target.GameCrystallizedPlayCards = FindClonedIdCards(list, GameCrystallizedPlayCards); + target.OkSkillInProcess = OkSkillInProcess.ToList(); + target.GameInplayMetamorphoseCards = FindClonedIdCards(list, GameInplayMetamorphoseCards); + target.GameBurialRiteCards = FindClonedIdCards(list, GameBurialRiteCards); + target.TurnBurialRiteCards = FindClonedIdCards(list, TurnBurialRiteCards); + target.EvolvedCards = FindClonedIdCards(AllCards, EvolvedCards); + target.GameDrawCards = FindClonedIdCards(list, GameDrawCards); + target.GameDrawTokenCards = FindClonedIdCards(list, GameDrawTokenCards); + target.GameAddUpdateDeckCards = FindClonedIdCards(list, GameAddUpdateDeckCards); + target.GameLeftCards = FindClonedIdCards(list, GameLeftCards); + target.GameSuperSkyboundArtCards = FindClonedIdCards(list, GameSuperSkyboundArtCards); + List list3 = FindClonedIdCards(list, GameTurnLeftCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num = 0; num < list3.Count; num++) + { + target.GameTurnLeftCards.Add(new TurnAndCard(GameTurnLeftCards[num].Turn, GameTurnLeftCards[num].IsSelfTurn, list3[num], GameTurnLeftCards[num].IsTurnEnd)); + } + List list4 = FindClonedIdCards(list, GameSummonCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num2 = 0; num2 < list4.Count; num2++) + { + target.GameSummonCards.Add(new TurnAndCard(GameSummonCards[num2].Turn, GameSummonCards[num2].IsSelfTurn, list4[num2], GameSummonCards[num2].IsTurnEnd)); + } + for (int num3 = 0; num3 < GameSummonMomentTribe.Count; num3++) + { + target.GameSummonMomentTribe.Add(new CardAndTribe(GameSummonMomentTribe[num3].Card, GameSummonMomentTribe[num3].Tribes)); + } + for (int num4 = 0; num4 < GamePlayMomentTribe.Count; num4++) + { + target.GamePlayMomentTribe.Add(new CardAndTribe(GamePlayMomentTribe[num4].Card, GamePlayMomentTribe[num4].Tribes)); + } + for (int num5 = 0; num5 < GamePlayMomentSpellChargeCards.Count; num5++) + { + target.GamePlayMomentSpellChargeCards.Add(GamePlayMomentSpellChargeCards[num5].Card); + } + for (int num6 = 0; num6 < GameUpdateDeckMomentTribe.Count; num6++) + { + target.GameUpdateDeckMomentTribe.Add(new CardAndTribe(GameUpdateDeckMomentTribe[num6].Card, GameUpdateDeckMomentTribe[num6].Tribes)); + } + List list5 = FindClonedIdCards(list, GameReanimatedCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num7 = 0; num7 < list5.Count; num7++) + { + target.GameReanimatedCards.Add(new TurnAndCard(GameReanimatedCards[num7].Turn, GameReanimatedCards[num7].IsSelfTurn, list5[num7], GameReanimatedCards[num7].IsTurnEnd)); + } + List list6 = FindClonedIdCards(list, GameReturnedCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num8 = 0; num8 < list6.Count; num8++) + { + target.GameReturnedCards.Add(new TurnAndCard(GameReturnedCards[num8].Turn, GameReturnedCards[num8].IsSelfTurn, list6[num8], GameReturnedCards[num8].IsTurnEnd)); + } + List list7 = FindClonedIdCards(list, GameTurnPlayCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num9 = 0; num9 < list7.Count; num9++) + { + target.GameTurnPlayCards.Add(new TurnAndCard(GameTurnPlayCards[num9].Turn, GameTurnPlayCards[num9].IsSelfTurn, list7[num9], GameTurnPlayCards[num9].IsTurnEnd)); + } + List list8 = FindClonedIdCards(list, GameEnhancePlayCards.Select((TurnAndCard c) => c.Card as BattleCardBase)); + for (int num10 = 0; num10 < list8.Count; num10++) + { + target.GameEnhancePlayCards.Add(new TurnAndCard(GameEnhancePlayCards[num10].Turn, GameEnhancePlayCards[num10].IsSelfTurn, list8[num10], GameEnhancePlayCards[num10].IsTurnEnd)); + } + for (int num11 = 0; num11 < TurnPlayCardCountInfo.Count; num11++) + { + TurnAndIntValue turnAndIntValue = TurnPlayCardCountInfo[num11]; + target.TurnPlayCardCountInfo.Add(new TurnAndIntValue(turnAndIntValue.Value, turnAndIntValue.Turn, turnAndIntValue.IsSelfTurn)); + } + for (int num12 = 0; num12 < TurnFusionCountInfo.Count; num12++) + { + TurnAndIntValue turnAndIntValue2 = TurnFusionCountInfo[num12]; + target.TurnFusionCountInfo.Add(new TurnAndIntValue(turnAndIntValue2.Value, turnAndIntValue2.Turn, turnAndIntValue2.IsSelfTurn)); + } + target.extraTurnCount = extraTurnCount; + target.cardTotalNum = cardTotalNum; + for (int num13 = 0; num13 < TurnEvolveCardCountInfo.Count; num13++) + { + TurnAndIntValue turnAndIntValue3 = TurnEvolveCardCountInfo[num13]; + target.TurnEvolveCardCountInfo.Add(new TurnAndIntValue(turnAndIntValue3.Value, turnAndIntValue3.Turn, turnAndIntValue3.IsSelfTurn)); + } + target.IsShortageDeck = IsShortageDeck; + target.RallyCount = RallyCount; + target.DeckBanishCount = DeckBanishCount; + target.GameResonanceStartCount = GameResonanceStartCount; + target.TurnResonanceStartCount = TurnResonanceStartCount; + target.GameNecromanceCount = GameNecromanceCount; + target.GameUsedPpCount = GameUsedPpCount; + target.GameUsedWhiteRitualCount = GameUsedWhiteRitualCount; + target.LastInplayWhiteRitualStack = LastInplayWhiteRitualStack; + for (int num14 = 0; num14 < GameSkillReturnCardCountList.Count; num14++) + { + TurnAndIntValue turnAndIntValue4 = GameSkillReturnCardCountList[num14]; + target.GameSkillReturnCardCountList.Add(new TurnAndIntValue(turnAndIntValue4.Value, turnAndIntValue4.Turn, turnAndIntValue4.IsSelfTurn)); + } + for (int num15 = 0; num15 < GameSkillDiscardCountList.Count; num15++) + { + TurnAndIntValue turnAndIntValue5 = GameSkillDiscardCountList[num15]; + target.GameSkillDiscardCountList.Add(new TurnAndIntValue(turnAndIntValue5.Value, turnAndIntValue5.Turn, turnAndIntValue5.IsSelfTurn)); + } + for (int num16 = 0; num16 < GameSkillBuffCountList.Count; num16++) + { + TurnAndIntValue turnAndIntValue6 = GameSkillBuffCountList[num16]; + target.GameSkillBuffCountList.Add(new TurnAndIntValue(turnAndIntValue6.Value, turnAndIntValue6.Turn, turnAndIntValue6.IsSelfTurn)); + } + for (int num17 = 0; num17 < GameSkillMetamorphoseCountList.Count; num17++) + { + TurnAndIntValue turnAndIntValue7 = GameSkillMetamorphoseCountList[num17]; + target.GameSkillMetamorphoseCountList.Add(new TurnAndIntValue(turnAndIntValue7.Value, turnAndIntValue7.Turn, turnAndIntValue7.IsSelfTurn)); + } + target.GameSkillDiscardCount = GameSkillDiscardCount; + } + + private List CloneCardList(ICollection sourceCards, BattlePlayerBase virtualSelfBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, bool isActualClone) + { + if (isActualClone) + { + List list = new List(sourceCards.Count); + for (int i = 0; i < sourceCards.Count; i++) + { + list.Add(sourceCards.ElementAt(i).VirtualClone(virtualSelfBattlePlayer, virtualOpponentBattlePlayer)); + } + return list; + } + List list2 = new List(sourceCards.Count); + for (int j = 0; j < sourceCards.Count; j++) + { + list2.Add(CardCreatorBase.CreateDummyInstance()); + } + return list2; + } + + private List FindClonedIdCards(IEnumerable clonedCardList, IEnumerable findIdCardList) + { + List list = new List(); + if (findIdCardList == null) + { + return list; + } + foreach (BattleCardBase uniqId in findIdCardList) + { + if (uniqId != null) + { + BattleCardBase battleCardBase = clonedCardList.SingleOrDefault((BattleCardBase c) => c.EquelsID(uniqId)); + if (battleCardBase != null) + { + list.Add(battleCardBase); + } + } + } + return list; + } + + public bool CheckPlayableCards() + { + List handCardList = HandCardList; + for (int i = 0; i < handCardList.Count; i++) + { + if (handCardList[i].Movable(isCheckOnDraw: false, isSkipSelecting: true)) + { + return true; + } + } + return false; + } + + public bool CheckAttackableCards() + { + List inPlayCardList = InPlayCards.ToList(); + int i = 0; + while (i < inPlayCardList.Count) + { + if (inPlayCardList[i].Attackable) + { + IEnumerable source = _opponentBattlePlayer.InPlayCards.Where((BattleCardBase c) => c.IsUnit && !c.CantBeFocusedAttack(inPlayCardList[i])); + if (!inPlayCardList[i].IsCantAttackClass || source.Any()) + { + IEnumerable source2 = source.Where((BattleCardBase c) => c.SkillApplyInformation.IsGuard); + if ((!inPlayCardList[i].SkillApplyInformation.IsSkillCantAtkUnitNotHasGuard || source2.Any() || !inPlayCardList[i].IsCantAttackClass) && (!inPlayCardList[i].SkillApplyInformation.IsSkillCantAtkUnit || !source2.Any() || inPlayCardList[i].SkillApplyInformation.IsIgnoreGuard) && (!inPlayCardList[i].SkillApplyInformation.IsSkillCantAtkUnitBaseCardId || ((!source2.Any() || !source2.All((BattleCardBase c) => inPlayCardList[i].SkillApplyInformation.CantAtkUnitBaseCardIdList.Contains(c.BaseParameter.BaseCardId)) || inPlayCardList[i].SkillApplyInformation.IsIgnoreGuard) && (!source.Any() || !source.All((BattleCardBase c) => inPlayCardList[i].SkillApplyInformation.CantAtkUnitBaseCardIdList.Contains(c.BaseParameter.BaseCardId)) || !inPlayCardList[i].IsCantAttackClass)))) + { + return true; + } + } + } + int num = i + 1; + i = num; + } + return false; + } + + public bool CheckNotConsumeEpCard(BattleCardBase card) + { + foreach (BattleCardBase inPlayCard in InPlayCards) + { + if (inPlayCard.SkillApplyInformation.CheckNotConsumeEpCard(card)) + { + return true; + } + } + return false; + } + + public IEnumerable GetSpecificTurnDestroyCards(TurnPlayerInfo turnPlayerInfo) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer; + int turn = (isCheckSelf ? ins.BattlePlayer.Turn : ins.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return from c in TurnDestroyCards + where c.IsSelfTurn == isCheckSelf && c.Turn == turn + select c.Card; + } + + public VfxBase UpdateInPlayBattleCardIconLabel() + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + for (int i = 1; i < ClassAndInPlayCardList.Count; i++) + { + if (!(ClassAndInPlayCardList[i].BattleCardView.BattleCardIconAnimations == null) && ClassAndInPlayCardList[i].BattleCardView.BattleCardIconAnimations.HasInductionNumberSkill()) + { + sequentialVfxPlayer.Register(ClassAndInPlayCardList[i].BattleCardView.UpdateBattleCardIconLabelNumber(ClassAndInPlayCardList[i], ClassAndInPlayCardList[i].Skills)); + } + } + return sequentialVfxPlayer; + } + + public int GetSpecificTurnWhenHealingCount(TurnPlayerInfo turnPlayerInfo, bool isTextKeyword) + { + bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer; + if (isTextKeyword && isCheckSelf == IsPlayer && !IsSelfTurn) + { + return 0; + } + int turn = (isCheckSelf ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return TurnWhenHealingCount.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public int GetSpecificTurnSkillReturnCardCount(TurnPlayerInfo turnPlayerInfo) + { + bool isCheckSelf = turnPlayerInfo.IsSelfPlayer; + int turn = ((IsPlayer == isCheckSelf) ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return GameSkillReturnCardCountList.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public int GetSpecificTurnSkillDiscardCount(TurnPlayerInfo turnPlayerInfo) + { + bool isCheckSelf = turnPlayerInfo.IsSelfPlayer; + int turn = ((IsPlayer == isCheckSelf) ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return GameSkillDiscardCountList.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public int GetSpecificTurnEnhanceCardCount(TurnPlayerInfo turnPlayerInfo) + { + bool isSelfPlayer = turnPlayerInfo.IsSelfPlayer; + int num = ((IsPlayer == isSelfPlayer) ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + num -= turnPlayerInfo.TurnOffset; + List list = new List(); + for (int i = 0; i < GameEnhancePlayCards.Count; i++) + { + if (GameEnhancePlayCards[i].Turn == num && GameEnhancePlayCards[i].IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn) + { + list.Add(GameEnhancePlayCards[i].Card); + } + } + return list.Count; + } + + public int GetCurrentTurnPlayCount() + { + return TurnPlayCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn)?.Value ?? 0; + } + + public void AddCurrentTrunPlayCount(int count) + { + TurnAndIntValue turnAndIntValue = TurnPlayCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn); + if (turnAndIntValue != null) + { + turnAndIntValue.AddValue(count); + } + else + { + TurnPlayCardCountInfo.Add(new TurnAndIntValue(count, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + } + } + + public int GetSpecificTurnPlayCount(TurnPlayerInfo turnPlayerInfo) + { + bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer; + int turn = (isCheckSelf ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return TurnPlayCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public void AddCurrentTurnFusionCount(int count) + { + TurnAndIntValue turnAndIntValue = TurnFusionCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn); + if (turnAndIntValue != null) + { + turnAndIntValue.AddValue(count); + } + else + { + TurnFusionCountInfo.Add(new TurnAndIntValue(count, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + } + } + + public void AddCurrentEvolvePlayCount(int count) + { + TurnAndIntValue turnAndIntValue = TurnEvolveCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn); + if (turnAndIntValue != null) + { + turnAndIntValue.AddValue(count); + } + else + { + TurnEvolveCardCountInfo.Add(new TurnAndIntValue(count, BattleMgr.CurrentTurn, BattleMgr.BattlePlayer.IsSelfTurn)); + } + } + + public int GetCurrentTurnEvolveCount() + { + return TurnEvolveCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == BattleMgr.BattlePlayer.IsSelfTurn && c.Turn == BattleMgr.CurrentTurn)?.Value ?? 0; + } + + public int GetSpecificTurnEvolveCount(TurnPlayerInfo turnPlayerInfo) + { + bool isCheckSelf = IsPlayer == turnPlayerInfo.IsSelfPlayer; + int turn = (isCheckSelf ? BattleMgr.BattlePlayer.Turn : BattleMgr.BattleEnemy.Turn); + turn -= turnPlayerInfo.TurnOffset; + return TurnEvolveCardCountInfo.FirstOrDefault((TurnAndIntValue c) => c.IsSelfTurn == isCheckSelf && c.Turn == turn)?.Value ?? 0; + } + + public int GetAttachTurnBySkillId(string id) + { + for (int i = 0; i < Class.Skills.Count(); i++) + { + if (Class.Skills.ElementAt(i).GetAttachSkill is Skill_attach_skill skill_attach_skill && skill_attach_skill.SaveTurnSkillId == id) + { + return skill_attach_skill.AttachedTurn; + } + } + return 0; + } + + public VfxWithLoading CreateTokenSpawnVfx(BattleCardBase firstToken) + { + Color color; + switch (firstToken.Clan) + { + case CardBasePrm.ClanType.MIN: + color = Global.EFFECT_COLOR_ELF; + break; + case CardBasePrm.ClanType.ROYAL: + color = Global.EFFECT_COLOR_ROYAL; + break; + case CardBasePrm.ClanType.WITCH: + color = Global.EFFECT_COLOR_WITCH_1; + break; + case CardBasePrm.ClanType.DRAGON: + color = Global.EFFECT_COLOR_DRAGON; + break; + case CardBasePrm.ClanType.NECRO: + color = Global.EFFECT_COLOR_NECROMANCER; + break; + case CardBasePrm.ClanType.VAMPIRE: + color = Global.EFFECT_COLOR_VANPIRE; + break; + case CardBasePrm.ClanType.BISHOP: + color = Global.EFFECT_COLOR_BISHOP; + break; + case CardBasePrm.ClanType.NEMESIS: + color = Global.EFFECT_COLOR_NEMESIS; + break; + default: + color = Color.clear; + break; + } + Func getEffectSpawnPoint = () => firstToken.BattleCardView.GameObject.transform.position; + EffectBattle effectBattle = null; + SkillBase.WaitEffectLoadVfx loadingVfx = new SkillBase.WaitEffectLoadVfx("cmn_token_draw_1", EffectMgr.EngineType.SHURIKEN, "se_cmn_token_draw_1", BattleMgr.BattleResourceMgr, delegate(EffectBattle eb) + { + effectBattle = eb; + }); + DelaySetupVfx mainVfx = new DelaySetupVfx(() => new SkillEffectBattleVfx(effectBattle, firstToken.BattleCardView, BattleMgr.BattleResourceMgr, getEffectSpawnPoint, getEffectSpawnPoint, 0f, 0f, EffectMgr.MoveType.DIRECT, IsPlayer, color)); + return VfxWithLoading.Create(loadingVfx, mainVfx); + } + + public void CallOnTokenDraw(BattleCardBase owner, List drawList, List targets, bool isPlayer, bool isOpen, bool isReserved) + { + this.OnTokenDrawCards.Call(owner, drawList, targets, isPlayer, isOpen, isReserved); + } + + public void CallOnCreateReservedCards(BattleCardBase owner, List drawList, bool isPlayer) + { + this.OnCreateReservedCards.Call(owner, drawList, isPlayer); + } + + public void CallOnCostChange(BattleCardBase card, List targets, List addList, List setList, List isCostUpList, bool isHalf, bool isSpellCharge, bool isOpenCard) + { + this.OnCostChange.Call(card, targets, addList, setList, isCostUpList, isHalf, isSpellCharge, isOpenCard); + } + + public void CallOnRemoveCostChange(List targetList, bool isSpellCharge, bool isAdd) + { + this.OnRemoveCostChange.Call(targetList, isSpellCharge, isAdd); + } + + public void CallOnPowerUp(BattleCardBase card, List cards, int offense, int life, int multiplyOffense, int multiplyLife, int maxLife) + { + this.OnPowerUp.Call(card, cards, offense, life, multiplyOffense, multiplyLife, maxLife); + } + + public void CallOnPowerDownStart() + { + this.OnPowerDownStart.Call(); + } + + public void CallOnPowerDown(BattleCardBase card, List cards, int offense, int life, int maxLife, bool isSet) + { + this.OnPowerDown.Call(card, cards, offense, life, maxLife, isSet); + } + + public void CallOnDeprivePowerUp(List targetList) + { + this.OnDeprivePowerUp.Call(targetList); + } + + public void CallOnDeprivePowerDown(List targetList) + { + this.OnDeprivePowerDown.Call(targetList); + } + + public void CallOnSpellCharge(BattleCardBase card, List targets, List addList) + { + this.OnSpellCharge.Call(card, targets, addList); + } + + public void CallOnDrain(int heal) + { + this.OnDrain.Call(heal); + } + + public void CallOnSkillDamageStart(BattleCardBase card) + { + this.OnSkillDamageStart.Call(card); + } + + public void CallOnDamage(List cards, List effectTargets, List damageList) + { + this.OnDamage.Call(cards, effectTargets, damageList); + } + + public void CallOnHeal(BattleCardBase ownerCard, List cards, List healList) + { + this.OnHeal.Call(ownerCard, cards, healList); + } + + public void CallOnDiscard(List targets) + { + this.OnDiscard.Call(targets); + } + + public void CallOnSkillDestroyOrBanish(BattleCardBase card, bool isBurialRite = false, bool isOpen = false) + { + this.OnSkillDestroyOrBanish.Call(card, isBurialRite, isOpen); + } + + public void CallOnPlayVoiceOnDeath(BattleCardBase card) + { + this.OnPlayVoiceOnDeath.Call(card); + } + + public void CallOnSkillReturn() + { + this.OnSkillReturn.Call(); + } + + public void CallOnAddPp(int addPpCount, BattleCardBase card) + { + this.OnAddPp.Call(addPpCount, IsPlayer, card); + } + + public void CallOnAddBp(int addBpCount, BattleCardBase card) + { + this.OnAddBp.Call(addBpCount, IsPlayer, card); + } + + public void CallOnEpModifier(BattleCardBase card, int epCount, bool isAdd) + { + this.OnEpModifier.Call(card, epCount, IsPlayer, isAdd); + } + + public void CallOnBeforeSkillEvolve(BattleCardBase card, List targets) + { + this.OnBeforeSkillEvolve.Call(card, targets); + } + + public void CallOnEvolveMeWhenAttack(BattleCardBase card) + { + this.OnEvolveMeWhenAttack.Call(card); + } + + public void CallOnAfterSkillEvolve(List targets) + { + this.OnAfterSkillEvolve.Call(targets); + } + + public void CallOnPlayCard(BattleCardBase originalCard, BattleCardBase playCard, bool isChoiceBrave) + { + this.OnPlayCard.Call(originalCard, playCard, isChoiceBrave); + } + + public void CallOnWhenPlayEffect(SkillCollectionBase.WhenPlayEffectType whenPlayEffectType, BattleCardBase target, bool isInvoked) + { + this.OnWhenPlayEffect.Call(whenPlayEffectType, target, isInvoked); + } + + public void CallOnChantCountChange(BattleCardBase card, List targets, int changeCount) + { + this.OnChantCountChange.Call(card, targets, changeCount); + } + + public void CallOnChangeWhiteRitualStack(BattleCardBase target, int changeCount, bool isDestroy = false) + { + this.OnChangeWhiteRitualStack.Call(target, changeCount, isDestroy); + } + + public void CallOnChangeMaxAttackableCount(BattleCardBase card, List targets, int changeCount) + { + this.OnChangeMaxAttackableCount.Call(card, targets, changeCount); + } + + public void CallOnMetamorphose(BattleCardBase card, List targets, int cardId) + { + this.OnMetamorphose.Call(card, targets, cardId); + } + + public void CallOnFusionMetamorphose(int fusionMetamorphoseCardId) + { + this.OnFusionMetamorphose.Call(fusionMetamorphoseCardId); + } + + public void CallOnOpenCard(BattleCardBase card) + { + this.OnOpenCard.Call(card); + } + + public void CallOnUnite(BattleCardBase ownerCard, List targets, BattleCardBase uniteCard) + { + this.OnUnite.Call(ownerCard, targets, uniteCard); + } + + public void CallOnRemoveLatestOperationJsonData(NetworkBattleReceiver.ReplayOperationType type) + { + this.OnRemoveLatestOperationJsonData.Call(type); + } + + public void CallOnEmotion(ClassCharaPrm.EmotionType emotionType) + { + this.OnEmotion.Call(emotionType, IsPlayer); + } + + public void CallOnClearDestroyedCardList(bool isPlayer) + { + this.OnClearDestroyedCardList.Call(isPlayer); + } +} diff --git a/SVSim.BattleEngine/Engine/SkillCreator.cs b/SVSim.BattleEngine/Engine/SkillCreator.cs new file mode 100644 index 0000000..0ac1761 --- /dev/null +++ b/SVSim.BattleEngine/Engine/SkillCreator.cs @@ -0,0 +1,2227 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Wizard; +using Wizard.Battle.Resource; +using Wizard.Battle.View; + +public class SkillCreator +{ + public class SkillBuildInfo + { + public readonly string _type = ""; + + public readonly string _timing = ""; + + public readonly string _condition = ""; + + public readonly List _parsedConditionOld; + + public readonly List _parsedConditionNew; + + public readonly string _target = ""; + + public readonly List _parsedTargetOld; + + public readonly List _parsedTargetNew; + + public readonly SkillFilterCreator.ContentInfo[] _parsedOption; + + public readonly string _option = ""; + + public readonly string _preprocess = ""; + + public readonly SkillFilterCreator.ContentInfo[] _parsedPreprocess; + + public readonly HandCardFrameEffectType _handCardFrameEffectType = HandCardFrameEffectType.NULL; + + public readonly string _icon = ""; + + public readonly string _effectPath = ""; + + public readonly EffectMgr.EngineType _engineType; + + public readonly string _sePath = ""; + + public readonly float _effectTime; + + public readonly EffectMgr.MoveType _effectMoveType; + + public readonly EffectMgr.TargetType _effectTargetType; + + public BattleCardBase _previousSkillOwner; + + public readonly string _voice = string.Empty; + + public readonly List _checkTargetKeywords = new List(); + + public SkillBuildInfo(string type, string timing, string condition, string target, string option, string preprocess, HandCardFrameEffectType frameEffectType = HandCardFrameEffectType.NONE, string icon = "", int[] tokenID = null, string effectPath = "", EffectMgr.EngineType engineType = EffectMgr.EngineType.NONE, string sePath = "", float effectTime = 0f, EffectMgr.MoveType effectMoveType = EffectMgr.MoveType.NONE, EffectMgr.TargetType effectTargetType = EffectMgr.TargetType.NONE, string voice = "") + { + _type = type; + _timing = timing; + _condition = condition; + _target = target; + _option = option; + _preprocess = preprocess; + _handCardFrameEffectType = frameEffectType; + _icon = icon; + _effectPath = effectPath; + _engineType = engineType; + _sePath = sePath; + _effectTime = effectTime; + _effectMoveType = effectMoveType; + _effectTargetType = effectTargetType; + _voice = voice; + ParseOption(option, ref _parsedOption); + ParseCondition(condition, ref _parsedConditionOld, ref _parsedConditionNew); + ParseTarget(target, ref _parsedTargetOld, ref _parsedTargetNew, ref _checkTargetKeywords); + ParsePreprocess(preprocess, ref _parsedPreprocess); + } + + public bool IsSameSkill(SkillBuildInfo info) + { + if (_type == info._type && _timing == info._timing && _condition == info._condition && _target == info._target && _option == info._option) + { + return _preprocess == info._preprocess; + } + return false; + } + } + + public class CardSkillsBuildInfo + { + public List normalSkillBuildInfos; + + public List evolveSkillBuildInfos; + } + + public static string[] NEWSTYLE_HEAD_TEXT = new string[13] + { + SkillFilterCreator.ContentKeyword.me.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.op.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.both.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.self.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.attacker.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.be_attacked.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.summoned_card.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.played_card.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.skill_drew_card.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.skill_update_deck_card.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.last_target.ToStringCustom() + ".", + SkillFilterCreator.ContentKeyword.in_hand.ToStringCustom() + ".", + "{" + }; + + protected readonly BattleCardBase _ownerCard; + + protected readonly BattlePlayerBase _selfBattlPlayer; + + protected readonly BattlePlayerBase _opponentBattlePlayer; + + protected readonly IBattleResourceMgr _battleResourceMgr; + + private const string PARSE_CONTENTINFO_PATTERN = "\\(.+?\\)"; + + public SkillCreator(BattleCardBase ownerCard, BattlePlayerBase selfBattlePlayer, BattlePlayerBase opponentBattlePlayer, IBattleResourceMgr battleResourceMgr) + { + _ownerCard = ownerCard; + _selfBattlPlayer = selfBattlePlayer; + _opponentBattlePlayer = opponentBattlePlayer; + _battleResourceMgr = battleResourceMgr; + } + + private SkillBase CreateSkillFactory(string skillName, SkillBuildInfo buildInfo, SkillParameter skillParam) + { + SkillKeywordInfo.SkillKeyword keyword = SkillKeywordInfo.GetKeyword(skillName); + bool flag = skillParam.ownerCard.SelfBattlePlayer.BattleMgr is NetworkBattleManagerBase && !GameMgr.GetIns().IsAINetwork; + switch (keyword) + { + case SkillKeywordInfo.SkillKeyword.damage_modifier: + if (!flag) + { + return new Skill_damage_modifier(skillParam, buildInfo._option); + } + return new NetworkSkill_damage_modifier(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.attach_skill: + if (!flag) + { + return new SingleSkill_attach_skill(skillParam, buildInfo._option); + } + return new NetworkSkill_attach_skill(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.attack_by_life: + if (!flag) + { + return new Skill_attack_by_life(skillParam, buildInfo._option); + } + return new NetworkSkill_attack_by_life(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.attack_count: + if (!flag) + { + return new Skill_attack_count(skillParam, buildInfo._option); + } + return new NetworkSkill_attack_count(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.banish: + if (!flag) + { + return new Skill_banish(skillParam, buildInfo._option); + } + return new NetworkSkill_banish(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.cant_activate_fanfare: + if (!flag) + { + return new Skill_cant_activate_fanfare(skillParam, buildInfo._option); + } + return new NetworkSkill_cant_activate_fanfare(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.cant_activate_shortage_deck_win: + return new Skill_cant_activate_shortage_deck_win(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.cant_attack: + if (!flag) + { + return new Skill_cant_attack(skillParam, buildInfo._option); + } + return new NetworkSkill_cant_attack(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.cant_summon: + return new Skill_cant_summon(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.cant_play: + if (!flag) + { + return new Skill_cant_play(skillParam, buildInfo._option); + } + return new NetworkSkill_cant_play(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.change_affiliation: + if (!flag) + { + return new Skill_change_affiliation(skillParam, buildInfo._option); + } + return new NetworkSkill_change_affiliation(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.change_cemetery: + if (!flag) + { + return new Skill_change_cemetery(skillParam, buildInfo._option); + } + return new NetworkSkill_change_cemetery(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.change_rally_count: + return new Skill_change_rally_count(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.update_deck: + if (!flag) + { + return new Skill_update_deck(skillParam, buildInfo._option); + } + return new NetworkSkill_update_deck(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.chant_count_change: + if (!flag) + { + return new Skill_chant_count_change(skillParam, buildInfo._option); + } + return new NetworkSkill_chant_count_change(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.consume_ep_modifier: + if (!flag) + { + return new Skill_consume_ep_modifier(skillParam, buildInfo._option); + } + return new NetworkSkill_consume_ep_modifier(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.cost_change: + if (!flag) + { + return new Skill_cost_change(skillParam, buildInfo._option); + } + return new NetworkSkill_cost_change(skillParam.ownerCard.SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase, skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.damage: + if (!flag) + { + return new Skill_damage(skillParam, buildInfo._option); + } + return new NetworkSkill_damage(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.damage_cut: + if (!flag) + { + return new Skill_damage_cut(skillParam, buildInfo._option); + } + return new NetworkSkill_damage_cut(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.destroy: + if (!flag) + { + return new Skill_destroy(skillParam, buildInfo._option); + } + return new NetworkSkill_destroy(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.discard: + if (!flag) + { + return new Skill_discard(skillParam, buildInfo._option); + } + return new NetworkSkill_discard(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.drain: + if (!flag) + { + return new Skill_drain(skillParam, buildInfo._option); + } + return new NetworkSkill_drain(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.draw: + return new Skill_draw(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.evolve: + if (!flag) + { + return new Skill_evolve(skillParam, buildInfo._option); + } + return new NetworkSkill_evolve(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.extra_turn: + if (!flag) + { + return new Skill_extra_turn(skillParam, buildInfo._option); + } + return new NetworkSkill_extra_turn(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.force_berserk: + if (!flag) + { + return new Skill_force_berserk(skillParam, buildInfo._option); + } + return new NetworkSkill_force_berserk(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.force_skill_target: + if (!flag) + { + return new Skill_force_skill_target(skillParam, buildInfo._option); + } + return new NetworkSkill_force_skill_target(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.attract_skill_target: + if (!flag) + { + return new Skill_attract_skill_target(skillParam, buildInfo._option); + } + return new NetworkSkill_attract_skill_target(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.force_avarice: + if (!flag) + { + return new Skill_force_avarice(skillParam, buildInfo._option); + } + return new NetworkSkill_force_avarice(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.force_wrath: + if (!flag) + { + return new Skill_force_wrath(skillParam, buildInfo._option); + } + return new NetworkSkill_force_wrath(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.guard: + if (!flag) + { + return new Skill_guard(skillParam, buildInfo._option); + } + return new NetworkSkill_guard(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.heal: + if (!flag) + { + return new Skill_heal(skillParam, buildInfo._option); + } + return new NetworkSkill_heal(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.ignore_guard: + if (!flag) + { + return new Skill_ignore_guard(skillParam, buildInfo._option); + } + return new NetworkSkill_ignore_guard(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.independent: + if (!flag) + { + return new Skill_independent(skillParam, buildInfo._option); + } + return new NetworkSkill_independent(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.not_be_debuffed: + return new Skill_not_be_debuffed(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.indestructible: + if (!flag) + { + return new Skill_indestructible(skillParam, buildInfo._option); + } + return new NetworkSkill_indestructible(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.killer: + if (!flag) + { + return new Skill_killer(skillParam, buildInfo._option); + } + return new NetworkSkill_killer(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.lose: + if (!flag) + { + return new Skill_lose(skillParam, buildInfo._option); + } + return new NetworkSkill_lose(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.metamorphose: + if (!flag) + { + return new Skill_metamorphose(skillParam, buildInfo._option); + } + return new NetworkSkill_metamorphose(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.fusion_metamorphose: + if (!flag) + { + return new Skill_fusion_metamorphose(skillParam, buildInfo._option); + } + return new NetworkSkill_fusion_metamorphose(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.transform: + return new Skill_transform(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.none: + return new Skill_none(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.not_be_attacked: + if (!flag) + { + return new Skill_not_be_attacked(skillParam, buildInfo._option); + } + return new NetworkSkill_not_be_attacked(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.play_count_change: + if (!flag) + { + return new Skill_play_count_change(skillParam, buildInfo._option); + } + return new NetworkSkill_play_count_change(skillParam.ownerCard.SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase, skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.possess_ep_modifier: + if (!flag) + { + return new Skill_possess_ep_modifier(skillParam, buildInfo._option); + } + return new NetworkSkill_possess_ep_modifier(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.power_down: + if (!flag) + { + return new Skill_power_down(skillParam, buildInfo._option); + } + return new NetworkSkill_power_down(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.powerup: + if (!flag) + { + return new Skill_powerup(skillParam, buildInfo._option); + } + return new NetworkSkill_powerup(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.power_modifier: + if (!flag) + { + return new Skill_power_modifier(skillParam, buildInfo._option); + } + return new NetworkSkill_power_modifier(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.pp_fixeduse: + return new Skill_pp_fixeduse(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.pp_modifier: + if (!flag) + { + return new Skill_pp_modifier(skillParam, buildInfo._option); + } + return new NetworkSkill_pp_modifier(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.bp_modifier: + if (!flag) + { + return new Skill_bp_modifier(skillParam, buildInfo._option); + } + return new NetworkSkill_bp_modifier(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.quick: + if (!flag) + { + return new Skill_quick(skillParam, buildInfo._option); + } + return new NetworkSkill_quick(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.reflection: + if (!flag) + { + return new Skill_reflection(skillParam, buildInfo._option); + } + return new NetworkSkill_reflection(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.remove_by_banish: + if (!flag) + { + return new Skill_remove_by_banish(skillParam, buildInfo._option); + } + return new NetworkSkill_remove_by_banish(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.remove_by_destroy: + if (!flag) + { + return new Skill_remove_by_destroy(skillParam, buildInfo._option); + } + return new NetworkSkill_remove_by_destroy(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.return_card: + if (!flag) + { + return new Skill_return_card(skillParam, buildInfo._option); + } + return new NetworkSkill_return_card(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.rush: + if (!flag) + { + return new Skill_rush(skillParam, buildInfo._option); + } + return new NetworkSkill_rush(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.select: + if (!flag) + { + return new Skill_select(skillParam, buildInfo._option); + } + return new NetworkSkill_select(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.shield: + if (!flag) + { + return new Skill_shield(skillParam, buildInfo._option); + } + return new NetworkSkill_shield(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.sneak: + if (!flag) + { + return new Skill_sneak(skillParam, buildInfo._option); + } + return new NetworkSkill_sneak(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.special_win: + if (!flag) + { + return new Skill_special_win(skillParam, buildInfo._option); + } + return new NetworkSkill_special_win(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.special_lose: + if (!flag) + { + return new Skill_special_lose(skillParam, buildInfo._option); + } + return new NetworkSkill_special_lose(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.spell_charge: + if (!flag) + { + return new Skill_spell_charge(skillParam, buildInfo._option); + } + return new NetworkSkill_spell_charge(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.summon_card: + if (!flag) + { + return new Skill_summon_card(skillParam, buildInfo._option); + } + return new NetworkSkill_summon_card(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.summon_token: + if (!flag) + { + return new Skill_summon_token(skillParam, buildInfo._option); + } + return new NetworkSkill_summon_token(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.token_draw: + if (!flag) + { + return new Skill_token_draw(skillParam, buildInfo._option); + } + return new NetworkSkill_token_draw(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.special_token_draw: + return new Skill_special_token_draw(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.trigger: + if (!flag) + { + return new Skill_trigger(skillParam, buildInfo._option); + } + return new NetworkSkill_trigger(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.turn_start_fixed_pp: + return new Skill_turn_start_fixed_pp(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.unite: + if (!flag) + { + return new Skill_unite(skillParam, buildInfo._option); + } + return new NetworkSkill_unite(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.untouchable: + if (!flag) + { + return new Skill_untouchable(skillParam, buildInfo._option); + } + return new NetworkSkill_untouchable(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.repeat_skill: + if (!flag) + { + return new Skill_repeat_skill(skillParam, buildInfo._option); + } + return new NetworkSkill_repeat_skill(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.choice: + return new Skill_choice(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.shortage_deck_win: + if (!flag) + { + return new Skill_shortage_deck_win(skillParam, buildInfo._option); + } + return new NetworkSkill_shortage_deck_win(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.generic_value_modifier: + if (!flag) + { + return new Skill_generic_value_modifier(skillParam, buildInfo._option); + } + return new NetworkSkill_generic_value_modifier(skillParam.ownerCard.SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase, skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.change_union_burst_count: + if (!flag) + { + return new Skill_change_union_burst_count(skillParam, buildInfo._option); + } + return new NetworkSkill_change_union_burst_count(skillParam.ownerCard.SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase, skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.change_skybound_art_count: + return new Skill_change_skybound_art_count(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.change_super_skybound_art_count: + if (!flag) + { + return new Skill_change_super_skybound_art_count(skillParam, buildInfo._option); + } + return new NetworkSkill_change_super_skybound_art_count(skillParam.ownerCard.SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase, skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.change_white_ritual_stack: + if (!flag) + { + return new Skill_change_white_ritual_stack(skillParam, buildInfo._option); + } + return new NetworkSkill_change_white_ritual_stack(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.stack_white_ritual: + if (!flag) + { + return new Skill_stack_white_ritual(skillParam, buildInfo._option); + } + return new NetworkSkill_stack_white_ritual(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.rob_skill: + if (!flag) + { + return new Skill_rob_skill(skillParam, buildInfo._option); + } + return new NetworkSkill_rob_skill(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.random_array: + if (!flag) + { + return new Skill_random_array(skillParam, buildInfo._option); + } + return new NetworkSkill_random_array(skillParam.ownerCard.SelfBattlePlayer.BattleMgr as NetworkBattleManagerBase, skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.no_duplication_random_array: + return new Skill_no_duplication_random_array(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.cant_evolution: + if (!flag) + { + return new Skill_cant_evolution(skillParam, buildInfo._option); + } + return new NetworkSkill_cant_evolution(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.invoke_skill: + if (!flag) + { + return new Skill_invoke_skill(skillParam, buildInfo._option); + } + return new NetworkSkill_invoke_skill(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.token_draw_modifier: + return new Skill_token_draw_modifier(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.fusion: + return new Skill_fusion(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.random_attack: + return new Skill_random_attack(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.clear_destroyed_and_discarded_card_list: + if (!flag) + { + return new Skill_clear_destroyed_and_discarded_card_list(skillParam, buildInfo._option); + } + return new NetworkSkill_clear_destroyed_and_discarded_card_list(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.clear_summoned_card_list: + return new Skill_clear_summoned_card_list(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.geton: + return new Skill_geton(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.getoff: + return new Skill_getoff(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.not_decrease_pp: + return new Skill_not_decrease_pp(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.heal_modifier: + return new Skill_heal_modifier(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.life_zero_activate_leon_skill: + return new Skill_life_zero_activate_leon_skill(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.copy_skill: + if (!flag) + { + return new Skill_copy_skill(skillParam, buildInfo._option); + } + return new NetworkSkill_copy_skill(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.loop_skill: + return new Skill_loop_skill(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.evolve_to_other: + return new Skill_evolve_to_other(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.not_attached_resident_chant_count_change: + return new Skill_not_attached_resident_chant_count_change(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.invoke_emote: + return new Skill_invoke_emote(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.invoke_voice: + return new Skill_invoke_voice(skillParam, buildInfo._option); + case SkillKeywordInfo.SkillKeyword.can_play_self: + return new Skill_can_play_self(skillParam, buildInfo._option); + default: + return new Skill_none(skillParam, buildInfo._option); + } + } + + public SkillBase Create(SkillBuildInfo buildInfo, IEnumerable lastSkillPreprocessCollection = null, bool isAttachSkill = false, SkillBase attachSkill = null) + { + string skillName = buildInfo._type; + string text = "1"; + int num = buildInfo._type.IndexOf('@'); + if (num >= 0) + { + skillName = buildInfo._type.Substring(0, num); + text = buildInfo._type.Substring(num + 1); + } + SkillParameter skillParameter = new SkillParameter(); + skillParameter.selfBattlePlayer = _selfBattlPlayer; + skillParameter.opponentBattlePlayer = _opponentBattlePlayer; + skillParameter.ownerCard = _ownerCard; + skillParameter.buildInfo = buildInfo; + skillParameter.afterFallPos = () => _ownerCard.BattleCardView.CardWrapObject.transform.position; + skillParameter.resourceMgr = _battleResourceMgr; + SkillBase skillBase = CreateSkillFactory(skillName, buildInfo, skillParameter); + if (attachSkill != null) + { + Skill_attach_skill.GiveIndividualId(attachSkill, skillBase); + } + skillBase.CallCountTextValue = text; + skillBase.SetCallCountText(text); + SetupSkillTiming(skillBase, buildInfo._timing); + skillBase.SetIsOnceCallTiming(); + SetupSkillConditionOld(skillBase.ConditionFilterCollection, buildInfo._parsedConditionOld, _ownerCard, skillBase); + SetupSkillConditionNew(skillBase, _ownerCard, buildInfo._parsedConditionNew); + SetupSkillTargetNew(skillBase, _ownerCard, buildInfo._parsedTargetNew); + SetupSkillTargetOld(skillBase.ApplyFilterCollection, _ownerCard, buildInfo._parsedTargetOld, skillBase); + SetupSkillPreprocess(skillBase, buildInfo._parsedPreprocess, lastSkillPreprocessCollection); + skillBase.SetIsAttachSkill(isAttachSkill, _ownerCard.IsInplay); + skillBase.SkillCreateEnd(); + return skillBase; + } + + private static void SetupSkillTiming(SkillBase skill, string timing) + { + skill.SkillTimingText = timing; + if (timing != null) + { + switch (timing) + { + case "none": + break; + case "when_play": + skill.OnWhenPlayStart |= CreateStartMethod(); + break; + case "when_hand_to_not_play": + skill.OnWhenHandToNotPlayStart |= CreateStartMethod(); + break; + case "when_destroy": + skill.OnWhenDestroyStart |= CreateStartMethod(); + break; + case "when_destroy_other": + skill.OnWhenDestroyOtherStart |= CreateStartMethod(); + break; + case "when_discard": + skill.OnDisCardStart |= CreateStartMethod(); + break; + case "when_discard_other": + skill.OnDisCardOtherStart |= CreateStartMethod(); + break; + case "when_necromance": + skill.OnWhenNecromance |= CreateStartMethod(); + break; + case "when_use_white_ritual_stack": + skill.OnWhenUseWhiteRitualStack |= CreateStartMethod(); + break; + case "when_summon": + skill.OnWhenSummonStart |= CreateStartMethod(); + break; + case "self_turn_start": + skill.OnSelfTurnStartStart |= CreateStartMethod(); + break; + case "turn_start": + skill.OnSelfTurnStartStart |= CreateStartMethod(); + break; + case "when_turn_start_immediate": + skill.OnWhenTurnStartStartImmediate |= CreateStartMethod(); + break; + case "self_turn_end": + skill.OnSelfTurnEndStart |= CreateStartMethod(); + break; + case "op_turn_start": + skill.OnOpponentTurnStartStart |= CreateStartMethod(); + break; + case "op_turn_end": + skill.OnOpponentTurnEndStart |= CreateStartMethod(); + break; + case "when_attack": + skill.OnBeforeAttackStart |= CreateStartMethod(); + break; + case "when_attack_self_and_other": + skill.OnBeforeAttackSelfAndOtherStart |= CreateStartMethod(); + break; + case "when_attack_after": + skill.OnAfterAttackStart |= CreateStartMethod(); + break; + case "when_attack_self_and_other_after": + skill.OnAfterAttackSelfAndOtherStart |= CreateStartMethod(); + break; + case "when_use_ep_self_and_other": + skill.OnWhenUseEpSelfAndOtherStart |= CreateStartMethod(); + break; + case "when_evolve": + skill.OnWhenEvolveStart |= CreateStartMethod(); + break; + case "when_evolve_other": + skill.OnWhenEvolveOtherStart |= CreateStartMethod(); + break; + case "when_evolve_self_and_other": + skill.OnWhenEvolveSelfAndOtherStart |= CreateStartMethod(); + break; + case "when_evolve_before": + skill.OnWhenEvolveBeforeStart |= CreateStartMethod(); + break; + case "when_play_other": + skill.OnWhenPlayOtherStart |= CreateStartMethod(); + break; + case "when_summon_other": + skill.OnWhenSummonOtherStart |= CreateStartMethod(); + break; + case "when_summon_self_and_other": + skill.OnWhenSummonSelfAndOtherStart |= CreateStartMethod(); + break; + case "when_spell_charge": + skill.OnWhenSpellChargeStart |= CreateStartMethod(); + break; + case "when_skill_chant_count_gain": + skill.OnWhenChantCountChangeStart |= CreateStartMethod(); + break; + case "when_chant_count_gain": + skill.OnWhenChantCountGain |= CreateStartMethod(); + break; + case "when_chant_count_gain_self_and_other": + skill.OnWhenChantCountGainSelfAndOther |= CreateStartMethod(); + break; + case "when_healing_self_and_other": + skill.OnWhenHealingSelfAndOtherStart |= CreateStartMethod(); + break; + case "when_healing_other": + skill.OnWhenHealOtherStart |= CreateStartMethod(); + break; + case "when_damage": + skill.OnWhenDamageStart |= CreateStartMethod(); + break; + case "when_damage_self_and_other": + skill.OnWhenDamageSelfAndOtherStart |= CreateStartMethod(); + break; + case "when_fight": + skill.OnWhenFightStart |= CreateStartMethod(); + break; + case "when_buff": + skill.OnWhenBuffStart |= CreateStartMethod(); + break; + case "when_return": + skill.OnWhenReturnStart |= CreateStartMethod(); + break; + case "when_return_other": + skill.OnWhenReturnOtherStart |= CreateStartMethod(); + break; + case "when_return_skill_activate": + skill.OnWhenReturnSkillActivateStart |= CreateStartMethod(); + break; + case "when_add_to_deck": + skill.OnWhenAddToDeckStart |= CreateStartMethod(); + break; + case "when_enhance": + skill.OnWhenEnhanceStart |= CreateStartMethod(); + break; + case "when_accelerate_other": + skill.OnWhenAccelerateStart |= CreateStartMethod(); + break; + case "when_crystallize_other": + skill.OnWhenCrystallizeStart |= CreateStartMethod(); + break; + case "when_burial_rite_other": + skill.OnWhenBurialRiteOther |= CreateStartMethod(); + break; + case "when_choice_play": + skill.OnWhenChoicePlayStart |= CreateStartMethod(); + break; + case "when_choice_evolve": + skill.OnWhenChoiceEvolveStart |= CreateStartMethod(); + break; + case "when_choice_brave": + skill.OnWhenChoiceBrave |= CreateStartMethod(); + break; + case "when_banish": + skill.OnWhenBanish |= CreateStartMethod(); + break; + case "when_banish_other": + skill.OnWhenBanishOther |= CreateStartMethod(); + break; + case "when_resonance_start": + skill.OnWhenResonanceStart |= CreateStartMethod(); + break; + case "when_accelerate": + skill.OnWhenAccelerate |= CreateStartMethod(); + break; + case "when_crystallize": + skill.OnWhenCrystallize |= CreateStartMethod(); + break; + case "when_leave": + skill.OnWhenLeave |= CreateStartMethod(); + break; + case "when_draw": + skill.OnWhenDraw |= CreateStartMethod(); + break; + case "when_draw_other": + skill.OnWhenDrawOtherStart |= CreateStartMethod(); + break; + case "when_pp_healing": + skill.OnWhenPpHealStart |= CreateStartMethod(); + break; + case "when_fusion": + skill.OnWhenFusion |= CreateStartMethod(); + break; + case "when_fusioned": + skill.OnWhenFusioned |= CreateStartMethod(); + break; + case "when_fusion_metamorphose": + skill.OnWhenFusionMetamorphose |= CreateStartMethod(); + break; + case "when_fight_after": + skill.OnAfterFightStart |= CreateStartMethod(); + break; + case "when_fusion_other": + skill.OnWhenFusionOtherStart |= CreateStartMethod(); + break; + case "when_geton": + skill.OnWhenGetOnStart |= CreateStartMethod(); + break; + case "when_getoff": + skill.OnWhenGetOff |= CreateStartMethod(); + break; + case "when_leave_other": + skill.OnWhenLeaveOther |= CreateStartMethod(); + break; + case "when_attach_ability": + skill.OnWhenAttachAbility |= CreateStartMethod(); + break; + case "when_buff_self_and_other": + skill.OnWhenBuffSelfAndOther |= CreateStartMethod(); + break; + case "when_debuff_self_and_other": + skill.OnWhenDebuffSelfAndOther |= CreateStartMethod(); + break; + case "when_debuff_include_set_max_life": + skill.OnWhenDebuffIncludeSetMaxLife |= CreateStartMethod(); + break; + case "when_healing": + skill.OnWhenHealing |= CreateStartMethod(); + break; + case "when_shortage_deck": + skill.OnWhenShortageDeck |= CreateStartMethod(); + break; + case "when_shortage_deck_win_skill_activate": + skill.OnWhenShortageDeckWinSkillActivate |= CreateStartMethod(); + break; + case "when_special_lose": + skill.OnWhenSpecialLose |= CreateStartMethod(); + break; + case "when_change_inplay_immediate": + skill.OnWhenChangeInPlayImmediate |= CreateStartMethod(); + skill.PreprocessList.Add(new SkillResidentPreprocessReturnHandActiveReset(skill)); + break; + case "when_change_inplay_selfhand": + skill.OnWhenChangeInplaySelfhand |= CreateStartMethod(); + skill.PreprocessList.Add(new SkillResidentPreprocessReturnHandActiveReset(skill)); + break; + case "when_change_inplay": + skill.OnWhenChangeInPlay |= CreateStartMethod(); + skill.PreprocessList.Add(new SkillResidentPreprocessReturnHandActiveReset(skill)); + break; + case "when_change_class_life_inplay": + skill.OnWhenChangeClassLifeInplay |= CreateStartMethod(); + skill.PreprocessList.Add(new SkillResidentPreprocessReturnHandActiveReset(skill)); + break; + case "when_change_pptotal": + skill.OnWhenChangePPTotal |= CreateStartMethod(); + skill.PreprocessList.Add(new SkillResidentPreprocessReturnHandActiveReset(skill)); + break; + case "when_change_class_life_selfhand": + skill.OnWhenChangeClassLifeSelfhand |= CreateStartMethod(); + skill.PreprocessList.Add(new SkillResidentPreprocessReturnHandActiveReset(skill)); + break; + case "when_add_to_hand": + skill.OnWhenAddToHand |= CreateStartMethod(); + skill.PreprocessList.Add(new SkillResidentPreprocessReturnHandActiveReset(skill)); + break; + case "when_battle_start": + skill.OnWhenBattleStart |= CreateStartMethod(); + break; + } + } + } + + private static uint CreateStartMethod() + { + return 1u; + } + + public static bool IsNewStyle(string text) + { + return NEWSTYLE_HEAD_TEXT.Any(text.StartsWith); + } + + private static string[] DivideContents(string content) + { + List list = new List(); + int num = 0; + int num2 = 0; + int num3 = 0; + for (int i = 0; i < content.Length; i++) + { + if (content[i] == '{') + { + num++; + } + if (content[i] == '}') + { + num2++; + } + if (content[i] == '&' && num == num2) + { + list.Add(content.Substring(num3, i - num3)); + num3 = i + 1; + } + } + list.Add(content.Substring(num3, content.Length - num3)); + return list.ToArray(); + } + + private static void ParsePreprocess(string preprocess, ref SkillFilterCreator.ContentInfo[] retInfos) + { + retInfos = ParseContentInfos(preprocess); + } + + private static void ParseOption(string option, ref SkillFilterCreator.ContentInfo[] retInfos) + { + retInfos = ParseContentInfos(option); + } + + public static void ParseCondition(string condition, ref List retOldInfos, ref List retNewInfos) + { + string[] array = DivideContents(condition); + retNewInfos = new List(); + retOldInfos = new List(); + int i = 0; + for (int num = array.Length; i < num; i++) + { + if (IsNewStyle(array[i])) + { + retNewInfos.Add(array[i]); + continue; + } + SkillFilterCreator.ParseContentInfo(array[i], out var retParsedInfo); + retOldInfos.Add(retParsedInfo); + } + } + + public static void ParseTarget(string target, ref List retOldInfos, ref List retNewInfos, ref List checkKeywords) + { + string[] array = DivideContents(target); + retNewInfos = new List(); + retOldInfos = new List(); + int i = 0; + for (int num = array.Length; i < num; i++) + { + if (IsNewStyle(array[i])) + { + retNewInfos.Add(array[i]); + checkKeywords.AddRange(GetCheckKeywords(array[i])); + continue; + } + SkillFilterCreator.ParseContentInfo(array[i], out var retParsedInfo); + retOldInfos.Add(retParsedInfo); + if (retParsedInfo.Name != SkillFilterCreator.ContentKeyword.exclution) + { + checkKeywords.AddRange(GetCheckKeywords(retParsedInfo.Value.ToString())); + checkKeywords.AddRange(GetCheckKeywords(retParsedInfo.ValueStr)); + } + } + } + + private static string[] GetCheckKeywords(string str) + { + return str.Replace("{", string.Empty).Replace("}", string.Empty).Split('.'); + } + + private static void SetupSkillConditionNew(SkillBase skill, BattleCardBase ownerCard, List parsedInfos) + { + if (parsedInfos != null) + { + int i = 0; + for (int count = parsedInfos.Count; i < count; i++) + { + SkillFilterCreator.SetupCondition(skill.ConditionFilterCollection, parsedInfos[i], ownerCard, skill); + } + } + } + + public static void SetupSkillConditionOld(ConditionSkillFilterCollection conditionFilterCollection, List parsedInfos, BattleCardBase ownerCard, SkillBase skill) + { + if (parsedInfos == null) + { + return; + } + bool flag = true; + int i = 0; + for (int count = parsedInfos.Count; i < count; i++) + { + SkillFilterCreator.ContentInfo info = parsedInfos[i]; + switch (info.Name) + { + case SkillFilterCreator.ContentKeyword.character: + conditionFilterCollection.BattlePlayerFilter = SkillFilterCreator.CreateBattlePlayerFilter(info.Value); + break; + case SkillFilterCreator.ContentKeyword.target: + conditionFilterCollection.TargetFilter = CreateTargetFilterOld(info, info.Value, ownerCard, skill); + break; + case SkillFilterCreator.ContentKeyword.card_type: + conditionFilterCollection.CardFilterList.Add(SkillFilterCreator.CreateCardTypeFilter(info.Value)); + flag = false; + break; + case SkillFilterCreator.ContentKeyword.tribe: + conditionFilterCollection.CardFilterList.Add(SkillFilterCreator.CreateTribeFilter(info)); + break; + case SkillFilterCreator.ContentKeyword.summon_moment_tribe: + conditionFilterCollection.CardFilterList.Add(new SkillSummonMomentTribeFilter(SkillFilterCreator.ParseEnum(info.ValueStr, CardBasePrm.TribeType.MAX), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.play_moment_tribe: + conditionFilterCollection.CardFilterList.Add(new SkillPlayMomentTribeFilter(SkillFilterCreator.ParseEnum(info.ValueStr, CardBasePrm.TribeType.MAX), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.play_moment_spell_charge: + conditionFilterCollection.CardFilterList.Add(new SkillPlayMomentSpellChargeFilter()); + break; + case SkillFilterCreator.ContentKeyword.update_deck_moment_tribe: + conditionFilterCollection.CardFilterList.Add(new SkillUpdateDeckMomentTribeFilter(SkillFilterCreator.ParseEnum(info.ValueStr, CardBasePrm.TribeType.MAX), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.clan: + conditionFilterCollection.CardFilterList.Add(SkillFilterCreator.CreateClanFilter(info, ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.ability: + conditionFilterCollection.CardFilterList.Add(SkillFilterCreator.CreateAbilityFilter(info.Value, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.evolution: + conditionFilterCollection.CardFilterList.Add(new SkillEvolutionCardFilter(SkillFilterCreator.ParseBoolean(info.ValueStr))); + break; + case SkillFilterCreator.ContentKeyword.chant_count: + conditionFilterCollection.CardFilterList.Add(new SkillParameterChantCountFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.buff_count: + conditionFilterCollection.CardFilterList.Add(new SkillParameterBuffCountFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.buff_life_count: + conditionFilterCollection.CardFilterList.Add(new SkillParameterBuffLifeCountFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.status_cost: + conditionFilterCollection.CardFilterList.Add(new SkillParameterCostFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.status_offense: + conditionFilterCollection.CardFilterList.Add(new SkillParameterOffenseFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.status_life: + conditionFilterCollection.CardFilterList.Add(new SkillParameterLifeFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.id: + conditionFilterCollection.CardFilterList.Add(new SkillParameterIdFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.base_card_id: + conditionFilterCollection.CardFilterList.Add(new SkillParameterBaseCardIdFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.destroy: + conditionFilterCollection.CardFilterList.Add(new SkillParameterDestroyFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.previous_turn_attacked: + conditionFilterCollection.CardFilterList.Add(new SkillParameterPreviousTurnAttackedFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.has_skill: + conditionFilterCollection.CardFilterList.Add(new SkillParameterHasSkillFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.destroyed_by: + conditionFilterCollection.CardFilterList.Add(new SkillParameterDestroyedByFilter(info.Value)); + break; + case SkillFilterCreator.ContentKeyword.returned_by: + conditionFilterCollection.CardFilterList.Add(new SkillParameterReturnedByFilter(ownerCard, info.Value)); + break; + case SkillFilterCreator.ContentKeyword.destroyed_by_ability: + conditionFilterCollection.CardFilterList.Add(new SkillParameterDestroyedByAbilityFilter(info.Value)); + break; + case SkillFilterCreator.ContentKeyword.destroyed_by_card_id: + conditionFilterCollection.CardFilterList.Add(new SkillParameterDestroyedByCardIdFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.destroyed_by_card_id_and_ability: + conditionFilterCollection.CardFilterList.Add(new SkillParameterDestroyedByCardIdAndAbilityFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.attack_count: + conditionFilterCollection.CardFilterList.Add(new SkillParameterAttackCountFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.max_attack_count: + conditionFilterCollection.CardFilterList.Add(new SkillParameterMaxAttackCountFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.berserk: + { + SkillConditionHalfLife item10 = new SkillConditionHalfLife(info.ValueStr); + conditionFilterCollection.ConditionCheckerFilterList.Add(item10); + break; + } + case SkillFilterCreator.ContentKeyword.avarice: + { + SkillConditionAvarice item9 = new SkillConditionAvarice(info.ValueStr); + conditionFilterCollection.ConditionCheckerFilterList.Add(item9); + break; + } + case SkillFilterCreator.ContentKeyword.wrath: + { + SkillConditionWrath item8 = new SkillConditionWrath(info.ValueStr); + conditionFilterCollection.ConditionCheckerFilterList.Add(item8); + break; + } + case SkillFilterCreator.ContentKeyword.awake: + { + SkillConditionAwake item7 = new SkillConditionAwake(info.ValueStr); + conditionFilterCollection.ConditionCheckerFilterList.Add(item7); + break; + } + case SkillFilterCreator.ContentKeyword.evolvable_turn: + { + SkillConditionEvolvableTurn item6 = new SkillConditionEvolvableTurn(info.ValueStr); + conditionFilterCollection.ConditionCheckerFilterList.Add(item6); + break; + } + case SkillFilterCreator.ContentKeyword.resonance: + { + SkillConditionResonance item5 = new SkillConditionResonance(info.ValueStr); + conditionFilterCollection.ConditionCheckerFilterList.Add(item5); + break; + } + case SkillFilterCreator.ContentKeyword.burial_rite: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionBurialRite(ownerCard, info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.pp_count: + { + SkillConditionPP item4 = new SkillConditionPP(ownerCard, int.Parse(info.ValueStr), info.Operator); + conditionFilterCollection.ConditionCheckerFilterList.Add(item4); + break; + } + case SkillFilterCreator.ContentKeyword.trigger: + { + SkillConditionTrigger item3 = new SkillConditionTrigger(ownerCard, info.ValueStr); + conditionFilterCollection.ConditionCheckerFilterList.Add(item3); + break; + } + case SkillFilterCreator.ContentKeyword.play_count: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionPlayCount(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.cemetery_count: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillCemeteryFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.attacker: + conditionFilterCollection.ConditionCheckerFilterList.Add(CreateAttackerChecker(info.Value, ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.be_attacked: + conditionFilterCollection.ConditionCheckerFilterList.Add(CreateBeAttackedChecker(info.Value, ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.in_hand: + conditionFilterCollection.ConditionCheckerFilterList.Add(CreateInHandChecker(info.Value, ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.necromance: + conditionFilterCollection.ConditionCheckerFilterList.Add(CreateNecromanceChecker(info.Value, ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.turn: + { + SkillConditionTurn item2 = new SkillConditionTurn(info.ValueStr, ownerCard); + conditionFilterCollection.ConditionCheckerFilterList.Add(item2); + break; + } + case SkillFilterCreator.ContentKeyword.last_life: + conditionFilterCollection.CardFilterList.Add(new SkillParameterLastLifeFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.game_changed_max_life_count: + conditionFilterCollection.CardFilterList.Add(new SkillParameterChangeMaxLifeCountFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.base_offense: + conditionFilterCollection.CardFilterList.Add(new SkillParameterBaseOffenseFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.base_life: + conditionFilterCollection.CardFilterList.Add(new SkillParameterBaseLifeFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.shortage_deck_win: + { + SkillConditionShortageDeckWin item = new SkillConditionShortageDeckWin(info.ValueStr); + conditionFilterCollection.ConditionCheckerFilterList.Add(item); + break; + } + case SkillFilterCreator.ContentKeyword.reanimated_card: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionReanimatedSelf(ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.deck_summoned_card: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionDeckSelfSummonedSelf(ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.attaching_ability: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionAttachingAbility(info.Value)); + break; + case SkillFilterCreator.ContentKeyword.is_odd_spell_charge: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionOddEvenSpellCharge(ownerCard, info.ValueStr, isOdd: true)); + break; + case SkillFilterCreator.ContentKeyword.is_even_spell_charge: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionOddEvenSpellCharge(ownerCard, info.ValueStr, isOdd: false)); + break; + case SkillFilterCreator.ContentKeyword.is_odd_offense: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionOddEvenOffense(ownerCard, info.ValueStr, isOdd: true)); + break; + case SkillFilterCreator.ContentKeyword.is_even_offense: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionOddEvenOffense(ownerCard, info.ValueStr, isOdd: false)); + break; + case SkillFilterCreator.ContentKeyword.display_other_users_message: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionDisplayOtherUsersMessage(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.me_language: + conditionFilterCollection.ConditionCheckerFilterList.Add(new SkillConditionMeLanguage(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.charge_count: + conditionFilterCollection.CardFilterList.Add(new SkillParameterChargeCountFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.is_inplay: + conditionFilterCollection.CardFilterList.Add(new SkillConditionIsInplayCardFilter(SkillFilterCreator.ParseBoolean(info.ValueStr))); + break; + case SkillFilterCreator.ContentKeyword.select_cardlist: + conditionFilterCollection.CardFilterList.Add(new SkillOnlyOneCardFilter(int.Parse(info.ValueStr))); + break; + case SkillFilterCreator.ContentKeyword.load_target: + conditionFilterCollection.CardFilterList.Add(new SkillLoadTargetFilter(ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.not_unique_base_card_id_card: + conditionFilterCollection.CardFilterList.Add(new SkillTargetNotUniqueBaseCardIdFilter()); + break; + case SkillFilterCreator.ContentKeyword.attacked: + if (BattleManagerBase.GetIns() is SingleBattleMgr) + { + conditionFilterCollection.CardFilterList.Add(new SkillAttackedCardFilter(info.ValueStr)); + } + break; + } + } + conditionFilterCollection.BattlePlayerFilter = conditionFilterCollection.BattlePlayerFilter ?? new SelfBattlePlayerFilter(); + conditionFilterCollection.TargetFilter = conditionFilterCollection.TargetFilter ?? new SkillTargetSelfFilter(ownerCard); + if (flag) + { + if (ownerCard.IsUnit) + { + conditionFilterCollection.CardFilterList.Add(new SkillUnitFilter()); + } + else if (ownerCard.IsSpell) + { + conditionFilterCollection.CardFilterList.Add(new SkillSpellFilter()); + } + else if (ownerCard.IsChantField) + { + conditionFilterCollection.CardFilterList.Add(new SkillChantFieldFilter()); + } + else if (ownerCard.IsField) + { + conditionFilterCollection.CardFilterList.Add(new SkillFieldFilter()); + } + else if (ownerCard.IsClass) + { + conditionFilterCollection.CardFilterList.Add(new SkillClassFilter()); + } + } + conditionFilterCollection.CardFilterList.TrimExcess(); + conditionFilterCollection.ConditionCheckerFilterList.TrimExcess(); + } + + private static ISkillCustomSelectFilter CreateCustomSelectFilter(SkillFilterCreator.ContentInfo info, SkillFilterCreator.ContentKeyword keyword, BattleCardBase ownerCard) + { + return keyword switch + { + SkillFilterCreator.ContentKeyword.over_cost_from_last_target => new SkillTargetOverCostFromLastTargetFilter(), + SkillFilterCreator.ContentKeyword.equal_or_less_cost_from_last_target => new SkillTargetEqualOrLessCostFromLastTarget(info.CusomValue), + SkillFilterCreator.ContentKeyword.in_order_from_oldest => new SkillInOrderFromOldestFilter(), + _ => null, + }; + } + + private static void SetupSkillTargetNew(SkillBase skill, BattleCardBase ownerCard, List parsedInfos) + { + if (parsedInfos != null) + { + int i = 0; + for (int count = parsedInfos.Count; i < count; i++) + { + SkillFilterCreator.SetupTarget(skill.ApplyFilterCollection, parsedInfos[i], ownerCard, skill); + } + } + } + + private static ISkillTargetFilter CreateTargetFilterOld(SkillFilterCreator.ContentInfo info, SkillFilterCreator.ContentKeyword keyword, BattleCardBase ownerCard, SkillBase skill) + { + bool flag = BattleManagerBase.GetIns() is NetworkBattleManagerBase && !GameMgr.GetIns().IsAINetwork; + switch (keyword) + { + case SkillFilterCreator.ContentKeyword.inplay: + return new SkillTargetInPlayFilter(); + case SkillFilterCreator.ContentKeyword.deck: + return new SkillTargetDeckFilter(); + case SkillFilterCreator.ContentKeyword.battle_start_deck: + return new SkillTargetBattleStartDeckFilter(); + case SkillFilterCreator.ContentKeyword.cemetery: + return new SkillTargetCemeteryFilter(); + case SkillFilterCreator.ContentKeyword.hand: + return new SkillTargetHandFilter(); + case SkillFilterCreator.ContentKeyword.hand_self: + return new SkillTargetHandSelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.hand_other_self: + return new SkillTargetHandOtherSelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.hand_other_oldest: + return new SkillTargetHandOtherOldestFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.return_card: + return new SkillTargetReturnCardFilter(); + case SkillFilterCreator.ContentKeyword.cant_attack_all_return_card: + return new SkillTargetCantAttackAllReturnCardFilter(); + case SkillFilterCreator.ContentKeyword.self: + return new SkillTargetSelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.deck_self: + return new SkillTargetDeckSelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.inplay_self: + return new SkillTargetInPlaySelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.inplay_other_self: + return new SkillTargetInPlayOtherSelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.newer_inplay_other_self: + return new SkillTargetNewerInPlayOtherSelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.attacker: + return new SkillTargetAttackerFilter(); + case SkillFilterCreator.ContentKeyword.be_attacked: + return new SkillTargetBeAttackedFilter(); + case SkillFilterCreator.ContentKeyword.other_than_be_attacked: + return new SkillTargetOtherThanBeAttackedFilter(); + case SkillFilterCreator.ContentKeyword.necromance: + return new SkillTargetNecromanceFilter(); + case SkillFilterCreator.ContentKeyword.played_card: + return new SkillTargetPlayedCardFilter(); + case SkillFilterCreator.ContentKeyword.enhance_card: + return new SkillTargetEnhanceCardfilter(); + case SkillFilterCreator.ContentKeyword.accelerated_card: + return new SkillTargetAcceleratedCardfilter(); + case SkillFilterCreator.ContentKeyword.crystallized_card: + return new SkillTargetCrystallizedCardfilter(); + case SkillFilterCreator.ContentKeyword.summoned_card: + return new SkillTargetSummonedCardFilter(); + case SkillFilterCreator.ContentKeyword.burial_rite_card: + return new SkillTargetBurialRiteCardFilter(); + case SkillFilterCreator.ContentKeyword.burial_rite_card_list: + return new SkillTargetBurialRiteCardListFilter(); + case SkillFilterCreator.ContentKeyword.burial_rite_this_turn_card_list: + return new SkillTargetBurialRiteThisTurnCardListFilter(); + case SkillFilterCreator.ContentKeyword.reanimated_this_turn_card_list: + return new SkillTargetReanimatedThisTurnCardListFilter(); + case SkillFilterCreator.ContentKeyword.banished_card: + return new SkillTargetBanishedCardFilter(); + case SkillFilterCreator.ContentKeyword.inplay_banished_card: + return new SkillTargetInplayBanishedCardFilter(); + case SkillFilterCreator.ContentKeyword.hand_banished_card: + return new SkillTargetHandBanishedCardFilter(); + case SkillFilterCreator.ContentKeyword.inplay_banished_this_turn_card_list: + return new SkillTargetInplayBanishedThisTurnCardListFilter(); + case SkillFilterCreator.ContentKeyword.hand_banished_this_turn_card_list: + return new SkillTargetHandBanishedThisTurnCardListFilter(); + case SkillFilterCreator.ContentKeyword.inplay_banished_card_list: + return new SkillTargetInplayBanishedCardListFilter(); + case SkillFilterCreator.ContentKeyword.return_this_turn_card_list: + return new SkillTargetReturnThisTurnCardListFilter(); + case SkillFilterCreator.ContentKeyword.destroyed_card: + return new SkillTargetDestroyedCardFilter(); + case SkillFilterCreator.ContentKeyword.destroyed_card_list: + return new SkillTargetDestroyedCardListFilter(); + case SkillFilterCreator.ContentKeyword.turn_destroyed_cards: + return new SkillTurnDestroyedFilter(info.ValueStr); + case SkillFilterCreator.ContentKeyword.lastword_card_list: + return new SkillTargetDestroyedWhenDestroyCardListFilter(); + case SkillFilterCreator.ContentKeyword.destroyed_this_turn_card_list: + return new SkillTargetDestroyedThisTurnCardListFilter(); + case SkillFilterCreator.ContentKeyword.discard_this_turn_card_list: + return new SkillTargetDiscardThisTurnCardListFilter(); + case SkillFilterCreator.ContentKeyword.discarded_card: + return new SkillTargetDiscardedCardFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.damaged_card: + return new SkillTargetDamagedCardFilter(); + case SkillFilterCreator.ContentKeyword.not_damaged_card: + return new SkillTargetNotDamagedCardFilter(); + case SkillFilterCreator.ContentKeyword.skill_drew_card: + return new SkillTargetSkillDrewCardFilter(); + case SkillFilterCreator.ContentKeyword.skill_update_deck_card: + return new SkillTargetSkillUpdateDeckCardFilter(); + case SkillFilterCreator.ContentKeyword.last_target: + if (!flag) + { + return new SkillTargetLastTargetFilter(info.CusomValue); + } + return new NetworkSkillTargetLastTargetFilter(info.CusomValue, skill); + case SkillFilterCreator.ContentKeyword.inplay_last_target: + return new SkillTargetInplayLastTargetFilter(info.CusomValue); + case SkillFilterCreator.ContentKeyword.destroyed_last_target: + return new SkillTargetDestroyedLastTargetFilter(info.CusomValue); + case SkillFilterCreator.ContentKeyword.banished_last_target: + return new SkillTargetBanishedLastTargetFilter(info.CusomValue); + case SkillFilterCreator.ContentKeyword.cant_attack_all_last_target: + return new SkillTargetCantAttackAllLastTargetFilter(info.CusomValue); + case SkillFilterCreator.ContentKeyword.in_hand: + return new SkillTargetInHandCardFilter(); + case SkillFilterCreator.ContentKeyword.skill_summoned_card: + return new SkillTargetSkillSummonedCardFilter(); + case SkillFilterCreator.ContentKeyword.healing_card: + return new SkillTargetHealingCardFilter(); + case SkillFilterCreator.ContentKeyword.received_damage_card: + return new SkillTargetReceivedDamageCardFilter(); + case SkillFilterCreator.ContentKeyword.give_damage_card: + return new SkillTargetGiveDamageCardFilter(); + case SkillFilterCreator.ContentKeyword.evolution_card: + return new SkillTargetEvolutionCardFilter(); + case SkillFilterCreator.ContentKeyword.fusion_ingrediented_card: + return new SkillTargetFusionIngredientCardsFilter(); + case SkillFilterCreator.ContentKeyword.through_fusion_ingrediented_card: + return new SkillTargetThroughFusionIngredientedCardFilter(ownerCard, info.ValueStr); + case SkillFilterCreator.ContentKeyword.fusion_ingrediented_card_list_include_this_fusion: + return new SkillTargetFusionIngredientedCardListIncludeThisFusion(ownerCard); + case SkillFilterCreator.ContentKeyword.game_fusion_ingrediented_cards: + return new SkillTargetGameFusionIngredientedCards(); + case SkillFilterCreator.ContentKeyword.game_fusion_ingrediented_and_discard_cards: + return new SkillTargetGameFusionIngredientedAndDiscardCards(); + case SkillFilterCreator.ContentKeyword.evolved_card_list: + return new SkillTargetEvolvedCardListFilter(); + case SkillFilterCreator.ContentKeyword.discard: + return new SkillTargetDiscardFilter(); + case SkillFilterCreator.ContentKeyword.unique_base_card_id_card: + return new SkillTargetUniqueBaseCardIDCardFilter(); + case SkillFilterCreator.ContentKeyword.fight_target: + return new SkillTargetFightTargetFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.selected_cards: + return new SkillTargetSelectedCardsFilter(); + case SkillFilterCreator.ContentKeyword.chosen_cards: + return new SkillTargetChosenCardsFilter(); + case SkillFilterCreator.ContentKeyword.turn_play_cards: + return new SkillTargetTurnPlayCardsFilter(); + case SkillFilterCreator.ContentKeyword.turn_draw_cards: + return new SkillTargetTurnDrawCardsFilter(); + case SkillFilterCreator.ContentKeyword.turn_token_draw_skill_id: + return new SkillTargetTurnTokenDrawSkillIdFilter(info.ValueStr); + case SkillFilterCreator.ContentKeyword.turn_summon_cards: + return new SkillTargetTurnSummonCardsFilter(); + case SkillFilterCreator.ContentKeyword.past_summon_cards: + return new SkillTargetPastSummonCardsFilter(ownerCard, info.ValueStr); + case SkillFilterCreator.ContentKeyword.turn_play_cards_other_self: + return new SkillTargetTurnPlayCardsOtherSelfFilter(ownerCard, info.ValueStr); + case SkillFilterCreator.ContentKeyword.game_play_cards_other_self: + return new SkillTargetGamePlayCardsOtherSelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.game_play_cards: + return new SkillTargetGamePlayCardsFilter(); + case SkillFilterCreator.ContentKeyword.game_summon_cards: + return new SkillTargetGameSummonCardsFilter(); + case SkillFilterCreator.ContentKeyword.game_summon_cards_other: + return new SkillTargetGameSummonCardsOtherFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.inplay_self_and_class: + return new SkillTargetInplaySelfAndClassFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.token_draw_card: + return new SkillTargetTokenDrawCardFilter(); + case SkillFilterCreator.ContentKeyword.inplay_and_hand: + return new SkillTargetInplayAndHandFilter(); + case SkillFilterCreator.ContentKeyword.reanimated_card: + return new SkillTargetReanimatedCardFilter(); + case SkillFilterCreator.ContentKeyword.game_accelerated_cards: + return new SkillTargetGameAcceleratedCardsFilter(); + case SkillFilterCreator.ContentKeyword.game_accelerated_cards_other_self: + return new SkillTargetGameAcceleratedCardsOtherSelfFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.game_crystallized_cards: + return new SkillTargetGameCrystallizedCardsFilter(); + case SkillFilterCreator.ContentKeyword.game_skill_activated: + return new SkillTargetGameSkillActivatedFilter(); + case SkillFilterCreator.ContentKeyword.deck_draw_card: + return new SkillTargetDeckDrawCardFilter(); + case SkillFilterCreator.ContentKeyword.drew_over_hand_limit: + return new SkillTargetDrewOverHandLimitFilter(); + case SkillFilterCreator.ContentKeyword.left_cards: + return new SkillTargetLeftCardsFilter(); + case SkillFilterCreator.ContentKeyword.inplay_buffing_cards: + return new SkillTargetInplayBuffingCardsFilter(); + case SkillFilterCreator.ContentKeyword.inplay_debuffing_cards: + return new SkillTargetInplayDebuffingCardsFilter(); + case SkillFilterCreator.ContentKeyword.game_deck_draw_cards: + return new SkillTargetGameDeckDrawCardsFilter(); + case SkillFilterCreator.ContentKeyword.game_draw_cards: + return new SkillTargetGameDrawCardsFilter(); + case SkillFilterCreator.ContentKeyword.game_add_update_deck_cards: + return new SkillTargetGameAddUpdateDeckCardsFilter(); + case SkillFilterCreator.ContentKeyword.game_left_cards: + return new SkillTargetGameLeftCardsFilter(); + case SkillFilterCreator.ContentKeyword.left_this_turn_card_list: + return new SkillTargetLeftThisTurnCardListFilter(); + case SkillFilterCreator.ContentKeyword.before_transform_card: + return new SkillTargetBeforeTransformCardFilter(ownerCard); + case SkillFilterCreator.ContentKeyword.discard_card_list: + return new SkillTargetDiscardCardListFilter(); + case SkillFilterCreator.ContentKeyword.chant_count_change_cards: + return new SkillTargetChantCountChangeCardsFilter(); + case SkillFilterCreator.ContentKeyword.shortage_deck_win_cards: + return new SkillTargetShortageDeckWinCards(); + case SkillFilterCreator.ContentKeyword.load_target: + return new SkillTargetLoadTargetFilter(ownerCard); + default: + return null; + } + } + + private static ISkillConditionChecker CreateAttackerChecker(SkillFilterCreator.ContentKeyword keyword, BattleCardBase ownerCard) + { + return keyword switch + { + SkillFilterCreator.ContentKeyword.self => new SkillConditionAttackerIsSelf(ownerCard), + SkillFilterCreator.ContentKeyword.other => new SkillConditionAttackerIsOther(ownerCard), + _ => null, + }; + } + + private static ISkillConditionChecker CreateBeAttackedChecker(SkillFilterCreator.ContentKeyword keyword, BattleCardBase ownerCard) + { + return keyword switch + { + SkillFilterCreator.ContentKeyword.self => new SkillConditionBeAttackedIsSelf(ownerCard), + SkillFilterCreator.ContentKeyword.other => new SkillConditionBeAttackedIsOther(ownerCard), + SkillFilterCreator.ContentKeyword.destroy => new SkillConditionBeAttackedIsDestroy(), + _ => null, + }; + } + + private static ISkillConditionChecker CreateHealingCardChecker(SkillFilterCreator.ContentKeyword keyword, BattleCardBase ownerCard) + { + return keyword switch + { + SkillFilterCreator.ContentKeyword.self_class => new SkillConditionHealingCardIsClass(ownerCard, isSelf: true), + SkillFilterCreator.ContentKeyword.opp_class => new SkillConditionHealingCardIsClass(ownerCard, isSelf: false), + _ => null, + }; + } + + private static ISkillConditionChecker CreateInHandChecker(SkillFilterCreator.ContentKeyword keyword, BattleCardBase ownerCard) + { + return keyword switch + { + SkillFilterCreator.ContentKeyword.self => new SkillConditionInHandIsSelf(ownerCard), + SkillFilterCreator.ContentKeyword.other => new SkillConditionInHandIsOther(ownerCard), + _ => null, + }; + } + + private static ISkillConditionChecker CreateNecromanceChecker(SkillFilterCreator.ContentKeyword keyword, BattleCardBase ownerCard) + { + return keyword switch + { + SkillFilterCreator.ContentKeyword.self => new SkillConditionBeAttackedIsSelf(ownerCard), + SkillFilterCreator.ContentKeyword.other => new SkillConditionBeAttackedIsOther(ownerCard), + _ => null, + }; + } + + public void SetupSkillTargetOld(ApplySkillTargetFilterCollection filterCollection, BattleCardBase ownerCard, List parsedInfo, SkillBase skill) + { + bool flag = true; + int i = 0; + for (int count = parsedInfo.Count; i < count; i++) + { + SkillFilterCreator.ContentInfo info = parsedInfo[i]; + switch (info.Name) + { + case SkillFilterCreator.ContentKeyword.character: + filterCollection.BattlePlayerFilter = SkillFilterCreator.CreateBattlePlayerFilter(info.Value); + break; + case SkillFilterCreator.ContentKeyword.target: + filterCollection.TargetFilter = CreateTargetFilterOld(info, info.Value, ownerCard, skill); + break; + case SkillFilterCreator.ContentKeyword.turn_destroyed_cards: + filterCollection.CardFilterList.Add(new SkillCardTurnDestroyedFilter(ownerCard, info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.custom_select: + filterCollection.ApplyCustomSelectFilterList.Add(CreateCustomSelectFilter(info, info.Value, ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.card_type: + filterCollection.CardFilterList.Add(SkillFilterCreator.CreateCardTypeFilter(info.Value)); + flag = false; + break; + case SkillFilterCreator.ContentKeyword.tribe: + filterCollection.CardFilterList.Add(SkillFilterCreator.CreateTribeFilter(info)); + break; + case SkillFilterCreator.ContentKeyword.summon_moment_tribe: + filterCollection.CardFilterList.Add(new SkillSummonMomentTribeFilter(SkillFilterCreator.ParseEnum(info.ValueStr, CardBasePrm.TribeType.MAX), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.play_moment_tribe: + filterCollection.CardFilterList.Add(new SkillPlayMomentTribeFilter(SkillFilterCreator.ParseEnum(info.ValueStr, CardBasePrm.TribeType.MAX), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.play_moment_spell_charge: + filterCollection.CardFilterList.Add(new SkillPlayMomentSpellChargeFilter()); + break; + case SkillFilterCreator.ContentKeyword.update_deck_moment_tribe: + filterCollection.CardFilterList.Add(new SkillUpdateDeckMomentTribeFilter(SkillFilterCreator.ParseEnum(info.ValueStr, CardBasePrm.TribeType.MAX), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.clan: + filterCollection.CardFilterList.Add(SkillFilterCreator.CreateClanFilter(info, ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.ability: + filterCollection.CardFilterList.Add(SkillFilterCreator.CreateAbilityFilter(info.Value, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.evolution: + filterCollection.CardFilterList.Add(new SkillEvolutionCardFilter(SkillFilterCreator.ParseBoolean(info.ValueStr))); + break; + case SkillFilterCreator.ContentKeyword.is_inplay: + filterCollection.CardFilterList.Add(new SkillConditionIsInplayCardFilter(SkillFilterCreator.ParseBoolean(info.ValueStr))); + break; + case SkillFilterCreator.ContentKeyword.random_count: + filterCollection.ApplySelectFilter = CreateRandomSelectFilter(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.random_count_until: + filterCollection.ApplySelectFilter = CreateRandomSelectUntilFilter(info.ValueStr, ownerCard.SelfBattlePlayer, skill); + break; + case SkillFilterCreator.ContentKeyword.id_no_duplication_random_count: + filterCollection.ApplySelectFilter = CreateIdNoDuplicationRandomSelectFilter(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.no_duplication_random_count_in_order: + filterCollection.ApplySelectFilter = CreateNoDuplicationRandomSelectInOrderFilter(info.ValueStr, skill); + break; + case SkillFilterCreator.ContentKeyword.cost_no_duplication_random_count: + filterCollection.ApplySelectFilter = CreateCostNoDuplicationRandomSelectFilter(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.select_count: + filterCollection.ApplySelectFilter = new SkillUserSelectFilter(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.choice_count: + filterCollection.ApplySelectFilter = new SkillChoiceSelectFilter(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.each_same_base_card_id_count_until: + filterCollection.ApplySelectFilter = CreateSkillRandomEachSameBaseCardIdFilter(int.Parse(info.ValueStr), ownerCard.SelfBattlePlayer, skill); + break; + case SkillFilterCreator.ContentKeyword.chant_count: + filterCollection.CardFilterList.Add(new SkillParameterChantCountFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.buff_count: + filterCollection.CardFilterList.Add(new SkillParameterBuffCountFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.buff_life_count: + filterCollection.CardFilterList.Add(new SkillParameterBuffLifeCountFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.status_cost: + filterCollection.CardFilterList.Add(new SkillParameterCostFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.base_cost: + filterCollection.CardFilterList.Add(new SkillParameterBaseCostFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.status_offense: + filterCollection.CardFilterList.Add(new SkillParameterOffenseFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.status_life: + filterCollection.CardFilterList.Add(new SkillParameterLifeFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.base_offense: + filterCollection.CardFilterList.Add(new SkillParameterBaseOffenseFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.base_life: + filterCollection.CardFilterList.Add(new SkillParameterBaseLifeFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.id: + filterCollection.CardFilterList.Add(new SkillParameterIdFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.base_card_id: + filterCollection.CardFilterList.Add(new SkillParameterBaseCardIdFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.destroy: + filterCollection.CardFilterList.Add(new SkillParameterDestroyFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.previous_turn_attacked: + filterCollection.CardFilterList.Add(new SkillParameterPreviousTurnAttackedFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.has_skill: + filterCollection.CardFilterList.Add(new SkillParameterHasSkillFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.destroyed_by: + filterCollection.CardFilterList.Add(new SkillParameterDestroyedByFilter(info.Value)); + break; + case SkillFilterCreator.ContentKeyword.returned_by: + filterCollection.CardFilterList.Add(new SkillParameterReturnedByFilter(ownerCard, info.Value)); + break; + case SkillFilterCreator.ContentKeyword.destroyed_by_ability: + filterCollection.CardFilterList.Add(new SkillParameterDestroyedByAbilityFilter(info.Value)); + break; + case SkillFilterCreator.ContentKeyword.destroyed_by_card_id: + filterCollection.CardFilterList.Add(new SkillParameterDestroyedByCardIdFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.destroyed_by_card_id_and_ability: + filterCollection.CardFilterList.Add(new SkillParameterDestroyedByCardIdAndAbilityFilter(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.exclution: + filterCollection.ApplyExclutionFilterList.Add(CreateExclutionFilter(info.ValueStr, skill)); + break; + case SkillFilterCreator.ContentKeyword.attack_count: + filterCollection.CardFilterList.Add(new SkillParameterAttackCountFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.max_attack_count: + filterCollection.CardFilterList.Add(new SkillParameterMaxAttackCountFilter(info.ValueStr, info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.none: + filterCollection.BattlePlayerFilter = filterCollection.BattlePlayerFilter ?? new NullBattlePlayerFilter(); + filterCollection.TargetFilter = filterCollection.TargetFilter ?? new SkillTargetNullFilter(); + filterCollection.CardFilterList.Add(new SkillNullFilter()); + filterCollection.ApplyExclutionFilterList.Add(new SkillExclutionNoneFilter()); + filterCollection.ApplySelectFilter = filterCollection.ApplySelectFilter ?? new SkillSelectNullFilter(); + flag = false; + break; + case SkillFilterCreator.ContentKeyword.last_life: + filterCollection.CardFilterList.Add(new SkillParameterLastLifeFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.game_changed_max_life_count: + filterCollection.CardFilterList.Add(new SkillParameterChangeMaxLifeCountFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.select_index: + filterCollection.ApplySelectFilter = new SkillSelectIndexFilter(int.Parse(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.select_cardlist: + filterCollection.ApplySelectFilter = new SkillOnlyOneFilter(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.limit_upper_count_from_oldest: + filterCollection.ApplySelectFilter = new SkillLimitUpperCountFromOldestFilter(int.Parse(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.limit_upper_count_from_newest: + filterCollection.ApplySelectFilter = new SkillLimitUpperCountFromNewestFilter(int.Parse(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.charge_count: + filterCollection.CardFilterList.Add(new SkillParameterChargeCountFilter(int.Parse(info.ValueStr), info.Operator)); + break; + case SkillFilterCreator.ContentKeyword.life_is_larger: + filterCollection.CardFilterList.Add(new SkillLifeIsLarger()); + break; + case SkillFilterCreator.ContentKeyword.attack_is_larger: + filterCollection.CardFilterList.Add(new SkillAttackIsLarger()); + break; + case SkillFilterCreator.ContentKeyword.load_target: + filterCollection.CardFilterList.Add(new SkillLoadTargetFilter(ownerCard)); + break; + case SkillFilterCreator.ContentKeyword.not_unique_base_card_id_card: + filterCollection.CardFilterList.Add(new SkillTargetNotUniqueBaseCardIdFilter()); + break; + case SkillFilterCreator.ContentKeyword.attacked: + if (BattleManagerBase.GetIns() is SingleBattleMgr) + { + filterCollection.CardFilterList.Add(new SkillAttackedCardFilter(info.ValueStr)); + } + break; + } + } + filterCollection.BattlePlayerFilter = filterCollection.BattlePlayerFilter ?? new SelfBattlePlayerFilter(); + filterCollection.TargetFilter = filterCollection.TargetFilter ?? new SkillTargetSelfFilter(ownerCard); + if (flag) + { + filterCollection.CardFilterList.Add(new SkillUnitFilter()); + } + filterCollection.ApplySelectFilter = filterCollection.ApplySelectFilter ?? new SkillSelectAllFilter(); + } + + protected virtual ISkillSelectFilter CreateRandomSelectFilter(string count) + { + return new SkillRandomSelectFilter(count); + } + + protected virtual ISkillSelectFilter CreateRandomSelectUntilFilter(string count, BattlePlayerBase player, SkillBase skill) + { + if (!(BattleManagerBase.GetIns() is NetworkBattleManagerBase) || GameMgr.GetIns().IsAINetwork) + { + return new SkillRandomSelectUntilFilter(count, player); + } + return new NetworkSkillRandomSelectUntilFilter(count, player, skill); + } + + protected virtual ISkillSelectFilter CreateIdNoDuplicationRandomSelectFilter(string count) + { + return new SkillIdNoDuplicationRandomSelectFilter(count); + } + + protected virtual ISkillSelectFilter CreateNoDuplicationRandomSelectInOrderFilter(string option, SkillBase skill) + { + return new SkillNoDuplicationRandomSelectInOrderFilter(option, skill); + } + + protected virtual ISkillSelectFilter CreateCostNoDuplicationRandomSelectFilter(string count) + { + return new SkillCostNoDuplicationRandomSelectFilter(count); + } + + protected virtual ISkillSelectFilter CreateSkillRandomEachSameBaseCardIdFilter(int count, BattlePlayerBase player, SkillBase skill) + { + if (!(BattleManagerBase.GetIns() is NetworkBattleManagerBase) || GameMgr.GetIns().IsAINetwork) + { + return new SkillRandomEachSameBaseCardIdFilter(count, player); + } + return new NetworkSkillRandomEachSameBaseCardIdFilter(count, player, skill); + } + + protected virtual ISkillExclutionFilter CreateExclutionFilter(string text, SkillBase skill) + { + if (text.First() == '{') + { + return new SkillExclutionApplyFilter(_ownerCard, text, skill); + } + return new SkillExclutionNoneFilter(); + } + + private static SkillPreprocessBase MakeSkillPreprocess(SkillBase skill, SkillFilterCreator.ContentInfo info, ref bool isExecutionCheck, ref bool isReferencePreviousPreprocess) + { + bool flag = BattleManagerBase.GetIns() is NetworkBattleManagerBase && !GameMgr.GetIns().IsAINetwork; + SkillPreprocessBase skillPreprocessBase = null; + switch (info.Name) + { + case SkillFilterCreator.ContentKeyword.use_pp: + skillPreprocessBase = new SkillPreprocessUsePp(int.Parse(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.necromance: + skillPreprocessBase = new SkillPreprocessNecromance(skill, info.ValueStr, info.Operator); + break; + case SkillFilterCreator.ContentKeyword.burial_rite: + skillPreprocessBase = new SkillPreprocessBurialRite(skill, skill.SkillPrm.ownerCard); + break; + case SkillFilterCreator.ContentKeyword.skill_random_count: + skillPreprocessBase = new SkillPreprocessRandomCount(skill.SkillPrm.ownerCard, int.Parse(info.ValueStr)); + isExecutionCheck = true; + break; + case SkillFilterCreator.ContentKeyword.fixed_generic_value: + case SkillFilterCreator.ContentKeyword.fixed_generic_value_initial: + skillPreprocessBase = new SkillPreprocessFixedGenericValue(skill.SkillPrm.ownerCard, info.Operator, int.Parse(info.ValueStr)); + isExecutionCheck = true; + break; + case SkillFilterCreator.ContentKeyword.destroy_tribe: + skillPreprocessBase = new SkillPreprocessDestroyTribe(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_start_skill: + skillPreprocessBase = new SkillPreprocessTurnStartSkill(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_start_stop: + skillPreprocessBase = new SkillPreprocessTurnStartStop(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_start_skill_after_stop: + skillPreprocessBase = new SkillPreprocessTurnStartSkillAfterStop(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_end_skill_after_stop: + skillPreprocessBase = new SkillPreprocessTurnEndSkillAfterStop(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_end_stop: + skillPreprocessBase = new SkillPreprocessTurnEndStop(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_end_remove: + skillPreprocessBase = new SkillPreprocessTurnEndRemove(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.self_turn_end_remove: + skillPreprocessBase = new SkillPreprocessSelfTurnEndRemove(skill, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.remove_from_inplay_stop: + skillPreprocessBase = new SkillPreprocessRemoveFromInPlayStop(); + break; + case SkillFilterCreator.ContentKeyword.evolution_end_stop: + skillPreprocessBase = new SkillPreprocessEvolutionEndStop(skill.SkillPrm.ownerCard); + break; + case SkillFilterCreator.ContentKeyword.damage_after_stop: + skillPreprocessBase = new SkillPreprocessDamageAfterStop(); + break; + case SkillFilterCreator.ContentKeyword.damage_give_stop: + skillPreprocessBase = new SkillPreprocessDamageGiveStop(); + break; + case SkillFilterCreator.ContentKeyword.reflection_after_stop: + skillPreprocessBase = new SkillPreprocessReflectionAfterStop(); + break; + case SkillFilterCreator.ContentKeyword.remove_after_action: + skillPreprocessBase = new SkillPreprocessRemoveAfterAction(info.ValueStr, skill); + break; + case SkillFilterCreator.ContentKeyword.evolution_end_remove: + skillPreprocessBase = new SkillPreprocessWhenEvolveEndRemove(skill); + break; + case SkillFilterCreator.ContentKeyword.unit_attack_stop: + skillPreprocessBase = new SkillPreprocessUnitAttackStop(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.dont_select_start: + skillPreprocessBase = new SkillPreprocessDontSelectStart(); + break; + case SkillFilterCreator.ContentKeyword.inplay_period_of_time: + skillPreprocessBase = new SkillPreprocessInPlayPeriodOfTime(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_end_period_of_stop_time: + skillPreprocessBase = new SkillPreprocessTurnEndPeriodOfStopTime(skill, skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_start_skill_after_period_of_stop_time: + skillPreprocessBase = new SkillPreprocessTurnStartSkillAfterPeriodOfStopTime(skill, skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.turn_end_stop_and_remove: + skillPreprocessBase = new SkillPreprocessTurnEndStopAndRemove(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword._ref_prev: + skillPreprocessBase = new SkillPreprocessReferencePrevious(); + isReferencePreviousPreprocess = true; + break; + case SkillFilterCreator.ContentKeyword.per_turn: + skillPreprocessBase = new SkillPreprocessTimesPerTurn(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.per_game: + skillPreprocessBase = new SkillPreprocessTimesPerGame(int.Parse(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.any_condition: + { + List list = new List(); + string preprocess = info.ValueStr.Substring(1, info.ValueStr.Length - 2); + SkillFilterCreator.ContentInfo[] retInfos = null; + ParsePreprocess(preprocess, ref retInfos); + bool isExecutionCheck2 = false; + bool isReferencePreviousPreprocess2 = false; + SkillFilterCreator.ContentInfo[] array = retInfos; + foreach (SkillFilterCreator.ContentInfo info2 in array) + { + SkillPreprocessBase skillPreprocessBase2 = MakeSkillPreprocess(skill, info2, ref isExecutionCheck2, ref isReferencePreviousPreprocess2); + if (skillPreprocessBase2 != null) + { + list.Add(skillPreprocessBase2); + if (isExecutionCheck2) + { + isExecutionCheck = true; + } + if (isReferencePreviousPreprocess2) + { + isReferencePreviousPreprocess2 = true; + } + } + } + skillPreprocessBase = new SkillPreprocessAnyCondition(list); + break; + } + case SkillFilterCreator.ContentKeyword.none: + return null; + case SkillFilterCreator.ContentKeyword.use_ep: + skillPreprocessBase = new SkillPreprocessUseEvolutionPoint(int.Parse(info.ValueStr), skill.SkillPrm.ownerCard); + break; + case SkillFilterCreator.ContentKeyword.once_per_action: + skillPreprocessBase = new SkillPreprocessOncePerAction(skill); + break; + case SkillFilterCreator.ContentKeyword.open_card: + skillPreprocessBase = new SkillPreprocessOpenCard(skill.SkillPrm.ownerCard); + break; + case SkillFilterCreator.ContentKeyword.only_random_index: + skillPreprocessBase = new SkillPreprocessRandomArrayIndex(skill.SkillPrm.ownerCard, info.ValueStr.Split(':').Select(int.Parse).ToArray()); + isExecutionCheck = true; + break; + case SkillFilterCreator.ContentKeyword.preprocess_condition: + skillPreprocessBase = (flag ? new NetworkSkillPreprocessConditionCheck(skill, info.ValueStr) : new SkillPreprocessConditionCheck(skill, info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.dont_activate: + skillPreprocessBase = new SkillPreprocessDontActivate(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.wrapping_and_adding_skill_activated_count: + skillPreprocessBase = new SkillPreprocessWrappingAndAddingSkillActivatedCount(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.skill_activate_count_by_simultaneous_destroyed_card_list: + skillPreprocessBase = new SkillPreprocessSkillActivateCountBySimultaneousDestroyedCardList(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.skill_activate_count_by_simultaneous_buffing_cards: + skillPreprocessBase = new SkillPreprocessSkillActivateCountBySimultaneousBuffingCards(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.skill_activate_count_by_simultaneous_summoned_card: + skillPreprocessBase = new SkillPreprocessSkillActivateCountBySimultaneousSummonedCard(skill.SkillPrm.ownerCard, info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.skill_id: + skillPreprocessBase = new SkillPreprocessSkillId(long.Parse(info.ValueStr)); + break; + case SkillFilterCreator.ContentKeyword.skill_stop_and_remove_by_when_summon_other: + skillPreprocessBase = new SkillPreprocessSkillStopAndRemoveByWhenSummonOther(info.ValueStr); + break; + case SkillFilterCreator.ContentKeyword.is_activate_summon_card: + skillPreprocessBase = new SkillPreprocessIsActivateSummonCard(skill, info.ValueStr); + break; + default: + return null; + } + return skillPreprocessBase; + } + + private static void SetupSkillPreprocess(SkillBase skill, SkillFilterCreator.ContentInfo[] parsedInfo, IEnumerable lastSkillPreprocessCollection) + { + try + { + int i = 0; + for (int num = parsedInfo.Length; i < num; i++) + { + SkillFilterCreator.ContentInfo info = parsedInfo[i]; + bool isReferencePreviousPreprocess = false; + bool isExecutionCheck = false; + SkillPreprocessBase skillPreprocessBase = MakeSkillPreprocess(skill, info, ref isExecutionCheck, ref isReferencePreviousPreprocess); + if (skillPreprocessBase == null) + { + continue; + } + if (isReferencePreviousPreprocess) + { + foreach (SkillPreprocessBase item in lastSkillPreprocessCollection) + { + if (!(item is SkillPreprocessReferencePrevious)) + { + skill.ConditionCheckerList.Add(item); + } + } + } + else if (!isExecutionCheck) + { + skill.ConditionCheckerList.Add(skillPreprocessBase); + } + skill.PreprocessList.Add(skillPreprocessBase); + } + } + catch (Exception ex) + { + Debug.LogError("Preprocessのマスター記述にエラーがあります。" + ex); + } + } + + public static SkillFilterCreator.ContentInfo[] ParseContentInfos(string text) + { + if (Regex.Match(text, "\\(.+?\\)").Value == "") + { + string[] array = null; + array = ((!text.Contains(SkillFilterCreator.ContentKeyword.preprocess_condition.ToString())) ? text.Split('&') : ParenthesisParseContentInfos(text)); + SkillFilterCreator.ContentInfo[] array2 = new SkillFilterCreator.ContentInfo[array.Count()]; + int i = 0; + for (int num = array.Length; i < num; i++) + { + SkillFilterCreator.ParseContentInfo(array[i], out array2[i]); + } + return array2; + } + string[] array3 = ParenthesisParseContentInfos(text); + SkillFilterCreator.ContentInfo[] array4 = new SkillFilterCreator.ContentInfo[array3.Count()]; + int j = 0; + for (int num2 = array3.Length; j < num2; j++) + { + SkillFilterCreator.ParseContentInfo(array3[j], out array4[j]); + } + return array4; + } + + public static string[] ParenthesisParseContentInfos(string text) + { + int num = 0; + int num2 = 0; + List list = new List(); + int i; + for (i = 0; i < text.Length; i++) + { + if (num == 0 && text[i] == '&') + { + list.Add(text.Substring((num2 == 0) ? num2 : (num2 + 1), i - ((num2 == 0) ? num2 : (num2 + 1)))); + num2 = i; + } + if (text[i] == '(') + { + num++; + } + if (text[i] == ')') + { + num--; + } + } + if (text[num2] == '&') + { + list.Add(text.Substring(num2 + 1, i - (num2 + 1))); + } + else + { + list.Add(text.Substring(num2, i)); + } + return list.ToArray(); + } + + public static CardSkillsBuildInfo CreateBuildInfo(CardParameter cardParameter) + { + string[] array = SplitBothSkillText(cardParameter.Skill); + string[] array2 = SplitBothSkillText(cardParameter.SkillTiming); + string[] array3 = SplitBothSkillText(cardParameter.SkillCondition); + string[] array4 = SplitBothSkillText(cardParameter.SkillTarget); + string[] array5 = SplitBothSkillText(cardParameter.SkillOption); + string[] array6 = SplitBothSkillText(cardParameter.SkillPreprocess); + string[] array7 = CardIconControl.SplitAndCompleteIconStr(cardParameter.SkillIcon, array); + CardSkillsBuildInfo cardSkillsBuildInfo = new CardSkillsBuildInfo(); + cardSkillsBuildInfo.normalSkillBuildInfos = CreateOneCardSkillBuildInfo(array[0], array2[0], array3[0], array4[0], array5[0], array6[0], cardParameter.SkillHandCardFrameEffectType, array7[0], cardParameter.SkillEffectPath, cardParameter.SkillEffectEnginType, cardParameter.SkillSe, cardParameter.SkillEffectTime, cardParameter.SkillMoveType, cardParameter.SkillEffectTargetType); + if (array.Length >= 2) + { + cardSkillsBuildInfo.evolveSkillBuildInfos = CreateOneCardSkillBuildInfo(array[1], array2[1], array3[1], array4[1], array5[1], array6[1], new HandCardFrameEffectType[1], array7[1], cardParameter.EvoSkillEffectPath, cardParameter.EvoSkillEffectEnginType, cardParameter.EvoSkillSe, cardParameter.EvoSkillEffectTime, cardParameter.EvoSkillMoveType, cardParameter.EvoSkillEffectTargetType); + } + else + { + cardSkillsBuildInfo.evolveSkillBuildInfos = new List(); + } + return cardSkillsBuildInfo; + } + + public static string[] SplitBothSkillText(string text) + { + if (text == null) + { + return new string[1] { "none" }; + } + text = text.Replace(" ", ""); + if (string.IsNullOrEmpty(text)) + { + return new string[1] { "none" }; + } + return text.Split(new string[1] { "//" }, StringSplitOptions.RemoveEmptyEntries); + } + + private static List CreateOneCardSkillBuildInfo(string type, string timing, string condition, string target, string option, string preprocess, HandCardFrameEffectType[] frameEffectType, string icon, string[] effectPath, EffectMgr.EngineType[] engineType, string[] sePath, string[] effectTime, EffectMgr.MoveType[] effectMoveType, EffectMgr.TargetType[] effectTargetType) + { + string[] array = type.Split(','); + string[] array2 = timing.Split(','); + string[] array3 = condition.Split(','); + string[] array4 = target.Split(','); + string[] array5 = option.Split(','); + string[] array6 = preprocess.Split(','); + string[] array7 = icon.Split(','); + List list = new List(array.Length); + for (int i = 0; i < array.Length; i++) + { + list.Add(new SkillBuildInfo(GetElementAtString(array, i), GetElementAtString(array2, i), GetElementAtString(array3, i), GetElementAtString(array4, i), GetElementAtString(array5, i), GetElementAtString(array6, i), GetElementAt(frameEffectType, i, HandCardFrameEffectType.NONE), GetElementAtString(array7, i), null, GetElementAtString(effectPath, i), GetElementAt(engineType, i, EffectMgr.EngineType.NONE), GetElementAtString(sePath, i), GetElementAtFloat(effectTime, i), GetElementAt(effectMoveType, i, EffectMgr.MoveType.NONE), GetElementAt(effectTargetType, i, EffectMgr.TargetType.NONE))); + } + return list; + } + + public static float GetElementAtFloat(string[] array, int index) + { + float elementAt = GetElementAt(array, index, float.Parse, float.NegativeInfinity); + if (elementAt < 0f) + { + elementAt = GetElementAt(array, 0, float.Parse, 0f); + } + return elementAt; + } + + public static string GetElementAtString(string[] array, int index) + { + return GetElementAt(array, index, (string s) => s, ""); + } + + public static T GetElementAt(string[] array, int index, Func converter, T defaultValue) + { + if (array == null) + { + return defaultValue; + } + if (array.Length <= index) + { + return defaultValue; + } + try + { + return converter(array[index]); + } + catch (Exception) + { + return defaultValue; + } + } + + public static T GetElementAt(T[] array, int index, T defaultValue) + { + if (array == null) + { + return defaultValue; + } + if (array.Length <= index) + { + return defaultValue; + } + return array[index]; + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Battle/ActionProcessor.cs b/SVSim.BattleEngine/Engine/Wizard.Battle/ActionProcessor.cs new file mode 100644 index 0000000..29bdbdf --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Battle/ActionProcessor.cs @@ -0,0 +1,897 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard.Battle.Resource; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +namespace Wizard.Battle; + +public class ActionProcessor +{ + private readonly BattlePlayerPair _pair; + + public Action OnPlayComplete; + + public Action OnEvolutionComplete; + + public Action OnAttackComplete; + + public Action OnFusionComplete; + + public Action OnAttackDamageComplete; + + public Action OnAttackProcessComplete; + + public Action OnAttackStart; + + private const float ADMIN_WATCH_CARD_ROTATION_Y = 180f; + + public const float ACCELERATE_WAITTIME = 0.4f; + + public const float CRYSTALLIZE_WAITTIME_BEFORE = 0.2f; + + public const float CRYSTALLIZE_WAITTIME_AFTER = 0.3f; + + public static readonly Vector3 ACCELERATE_POSITION_OFFSET = new Vector3(0f, 0f, -0.03f); + + public event Action> OnBeforePlayCard; + + public event Action> OnBeforeChosenPlayCard; + + public event Action, bool> OnBeforeBurialRitePlayCard; + + public event Func OnAfterPlayCard; + + public event Func OnBeforeAttack; + + public event Func OnBeforeAttackSkillComplete; + + public event Func OnAfterAttack; + + public event Action> OnBeforeEvolution; + + public event Action> OnBeforeChosenEvolution; + + public event Action OnJustBeforeEvolution; + + public event Action OnRightAfterEvolution; + + public event Func OnAfterEvolution; + + public event Action> OnBeforeFusion; + + public event Func OnAfterFusion; + + public event Action OnTransform; + + public event Action OnSpecialAccelerate; + + public ActionProcessor(BattlePlayerPair pair) + { + _pair = pair; + } + + private void GetSelectTargetBySelectList(SkillBase selectSkill, List selectList, List selectTargets, ref int skillIndex) + { + BattlePlayerPair playerInfoPair = new BattlePlayerPair(selectSkill.SkillPrm.ownerCard.SelfBattlePlayer, selectSkill.SkillPrm.ownerCard.OpponentBattlePlayer); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + int skillSelectCount = selectSkill.GetSkillSelectCount(); + int num = 1; + if (skillSelectCount >= 2) + { + NetworkBattleManagerBase networkBattleManagerBase = selectSkill.SkillPrm.selfBattlePlayer.BattleMgr as NetworkBattleManagerBase; + num = ((selectSkill.SkillPrm.selfBattlePlayer.IsPlayer || networkBattleManagerBase == null || GameMgr.GetIns().IsAdminWatch || !RegisterValidate.IsValidateCard(selectSkill)) ? Math.Min(skillSelectCount, selectSkill.GetSelectableCards(playerInfoPair, option, isSkipForceSelect: true).Count()) : (from n in networkBattleManagerBase.GetValidateTargetSkillIndexList() + where n == NetworkBattleGenericTool.GetSkillIndex(selectSkill) + select n).Count()); + } + for (int num2 = 0; num2 < num; num2++) + { + if (skillIndex >= selectList.Count) + { + break; + } + selectTargets.Add(new SkillConditionCheckerOption.SkillAndSelectTarget(selectList[skillIndex], selectSkill)); + skillIndex++; + } + } + + private VfxBase SetSkillConditionCheckeroptionSelectCards(BattleCardBase card, SkillConditionCheckerOption option, IEnumerable cards, bool isEvolve, List selectChoiceCardIdList, bool isFusion = false, bool isChoiceBrave = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + SkillCollectionBase skillCollectionBase = (isEvolve ? card.EvolutionSkills : card.Skills); + bool isChoiceTransform = false; + List list = null; + if (cards != null) + { + list = cards.ToList(); + } + if (!isFusion && skillCollectionBase.Any((SkillBase s) => s is Skill_transform)) + { + BattlePlayerReadOnlyInfoPair playerInfoPair = new BattlePlayerReadOnlyInfoPair(card.SelfBattlePlayer, card.OpponentBattlePlayer); + CardMaster instanceForBattle = CardMaster.GetInstanceForBattle(); + for (int num = 1; num < skillCollectionBase.Count(); num++) + { + if (skillCollectionBase.Get(num) is Skill_transform skill_transform) + { + Skill_pp_fixeduse skill_pp_fixeduse = skillCollectionBase.Get(num - 1) as Skill_pp_fixeduse; + if (false || (skill_transform.TransformId != -1 && skill_pp_fixeduse != null && skill_pp_fixeduse.IsMutationFixedUseCost && skill_pp_fixeduse.CheckCondition(playerInfoPair, option, isPrePlay: true) && card.GetAccelerateOrCrystallizeTransformSkill() != null)) + { + BattleCardBase.TransformType transformType = ((skill_transform.OnWhenAccelerate != 0) ? BattleCardBase.TransformType.Accelerate : BattleCardBase.TransformType.Crystallize); + sequentialVfxPlayer.Register(SwapTransformCard(card, card.BaseParameter.IsFoil ? instanceForBattle.GetCardParameterFromId(skill_transform.TransformId).FoilCardId : skill_transform.TransformId, option, transformType, selectChoiceCardIdList, list)); + this.OnSpecialAccelerate.Call(skill_pp_fixeduse); + this.OnSpecialAccelerate.Call(skill_transform); + } + if (skillCollectionBase.Get(num - 1) is Skill_choice skill_choice && skill_choice.CheckCondition(playerInfoPair, option, isPrePlay: true)) + { + isChoiceTransform = true; + } + } + } + } + if (cards == null && selectChoiceCardIdList == null) + { + return sequentialVfxPlayer; + } + SkillBase skillBase = card.GetSelectTypeSkill(isEvolve, isFusion: false, isRegister: false, isEvolutionSimpleProcessor: false, isChoiceCheck: true).FirstOrDefault((SkillBase s) => s is Skill_choice); + int num2 = 1; + if (skillBase != null) + { + num2 = SetupChoiceCard(card, option, selectChoiceCardIdList, skillBase, list, isChoiceTransform, sequentialVfxPlayer, isChoiceBrave); + } + if (list != null && list.Count > 0) + { + BattleCardBase battleCardBase = card; + if (option.PlayedCard != null && card != option.PlayedCard) + { + battleCardBase = option.PlayedCard; + } + IEnumerable selectTypeSkill = battleCardBase.GetSelectTypeSkill(isEvolve, isFusion: false, isRegister: true); + int num3 = selectTypeSkill.Where((SkillBase s) => s.IsBurialRite).Count(); + List list2 = selectTypeSkill.Where((SkillBase s) => !(s is Skill_none)).ToList(); + int skillIndex = num3; + for (int num4 = 0; num4 < list2.Count; num4++) + { + if (list2[num4].IsChoiceType) + { + num4 += num2 - 1; + } + else if (list2[num4].IsBurialRite) + { + if (list2[num4].IsUserSelectType) + { + GetSelectTargetBySelectList(list2[num4], list, option.SelectedCards, ref skillIndex); + } + } + else + { + GetSelectTargetBySelectList(list2[num4], list, option.SelectedCards, ref skillIndex); + } + } + for (int num5 = 0; num5 < num3; num5++) + { + option.BurialRiteCards.Add(list[num5]); + } + if (num3 > 0) + { + card.SkillApplyInformation.ClearLastBurialRiteCardList(); + card.SkillApplyInformation.AddLastBurialRiteCardList(list); + } + } + return sequentialVfxPlayer; + } + + private int SetupChoiceCard(BattleCardBase card, SkillConditionCheckerOption option, List selectChoiceCardIdList, SkillBase selectChoiceSkill, List selectList, bool isChoiceTransform, SequentialVfxPlayer vfx, bool isChoiceBrave) + { + int num = 1; + if (option.PlayedCard == null) + { + option.PlayedCard = card; + } + int num2 = -1; + if (selectChoiceSkill.ApplySelectFilter is SkillChoiceSelectFilter) + { + num = ((SkillChoiceSelectFilter)selectChoiceSkill.ApplySelectFilter).CalcCount(selectChoiceSkill.OptionValue); + } + if (selectChoiceCardIdList != null && selectChoiceCardIdList.Count >= 1) + { + foreach (int selectChoiceCardId in selectChoiceCardIdList) + { + num2 = selectChoiceCardId; + option.ChosenCards.Add(num2); + } + } + else if (selectList != null && selectList.Count > 0) + { + for (int i = 0; i < num; i++) + { + BattleCardBase battleCardBase = selectList[i]; + num2 = battleCardBase.BaseParameter.CardId; + option.ChosenCards.Add(num2); + if (isChoiceTransform || isChoiceBrave) + { + selectList.Remove(battleCardBase); + } + } + } + if (num2 >= 0 && isChoiceTransform) + { + vfx.Register(SwapTransformCard(card, num2, option, BattleCardBase.TransformType.Choice, selectChoiceCardIdList, selectList)); + } + return num; + } + + private VfxBase SwapTransformCard(BattleCardBase originalCard, int transformCardID, SkillConditionCheckerOption option, BattleCardBase.TransformType transformType, List selectChoiceCardIdList, List selectList) + { + bool isMutation = transformType == BattleCardBase.TransformType.Accelerate || transformType == BattleCardBase.TransformType.Crystallize; + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + SequentialVfxPlayer sequentialVfxPlayer2 = SequentialVfxPlayer.Create(); + BattleCardBase transformCard = originalCard.SelfBattlePlayer.CreateCard(transformCardID, originalCard.Index); + transformCard.SelfBattlePlayer.BattleMgr.VfxMgr.RegisterImmediateVfx(InstantVfx.Create(delegate + { + transformCard.BattleCardView.GameObject.SetActive(value: false); + })); + sequentialVfxPlayer2.Register(InstantVfx.Create(delegate + { + if (!BattleManagerBase.GetIns().IsRecovery) + { + Transform transform = transformCard.BattleCardView.Transform; + Transform transform2 = originalCard.BattleCardView.Transform; + transform.position = transform2.position; + transform.rotation = transform2.rotation; + if (GameMgr.GetIns().IsWatchBattle || GameMgr.GetIns().IsReplayBattle) + { + transform.parent = originalCard.SelfBattlePlayer.BattleView.HandDeck.transform; + } + else + { + transform.parent = transform2.parent; + } + transform.localScale = transform2.localScale; + transform.SetSiblingIndex(transform2.GetSiblingIndex()); + if (!isMutation) + { + transformCard.BattleCardView.CardTemplate.DynamicSetupMaterials(transformCard, BattleManagerBase.GetIns().BattleResourceMgr); + originalCard.BattleCardView.GameObject.SetActive(value: false); + transformCard.BattleCardView.GameObject.SetActive(value: true); + } + } + })); + if (isMutation) + { + sequentialVfxPlayer.Register(sequentialVfxPlayer2); + } + else + { + transformCard.SelfBattlePlayer.BattleMgr.VfxMgr.RegisterImmediateVfx(sequentialVfxPlayer2); + } + transformCard.SetOnDraw(draw: false); + originalCard.MetamorphoseCard = transformCard; + transformCard.TransformInfo = new BattleCardBase.TransformInformation(transformType, originalCard); + option.PlayedCard = transformCard; + option.SummonedCard = transformCard; + SkillBase skillBase = transformCard.GetSelectTypeSkill().FirstOrDefault((SkillBase s) => s is Skill_choice); + if (skillBase != null) + { + SetupChoiceCard(transformCard, option, selectChoiceCardIdList, skillBase, selectList, isChoiceTransform: false, sequentialVfxPlayer, isChoiceBrave: false); + } + this.OnTransform.Call(originalCard, transformCardID, !isMutation); + return sequentialVfxPlayer; + } + + private VfxBase SetupPlayCard(BattleCardBase originalCard, BattleCardBase playCard, SkillProcessor skillProcessor, bool isChoiceBrave) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + bool isMutation = originalCard.CheckConditionFixedUseCost(isPrePlay: true) && originalCard.CalcFixedUseCost(originalCard.SelfBattlePlayer.Pp) < originalCard.Cost; + GameMgr gameMgr = GameMgr.GetIns(); + bool isAdminWatch = gameMgr.IsAdminWatch; + BattleManagerBase battleMgr = BattleManagerBase.GetIns(); + if (!isChoiceBrave) + { + sequentialVfxPlayer.Register(playCard.SelfBattlePlayer.ReplaceInHand(originalCard, playCard, skillProcessor)); + } + if (isMutation) + { + sequentialVfxPlayer.Register(battleMgr.LoadCardResources(new List { playCard })); + } + if (!battleMgr.IsRecovery) + { + playCard.SelfBattlePlayer.BattleMgr.VfxMgr.RegisterImmediateVfx(InstantVfx.Create(delegate + { + originalCard.SelfBattlePlayer.BattleView.HandView.RemoveCardFromView(originalCard.BattleCardView, 0.3f); + })); + } + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + if (!battleMgr.IsRecovery) + { + playCard.SelfBattlePlayer.BattleView.PlayQueueView.RemoveCardFromView(originalCard.BattleCardView, (isAdminWatch && isMutation) || isChoiceBrave); + if (isMutation) + { + playCard.BattleCardView.CardTemplate.DynamicSetupMaterials(playCard, battleMgr.BattleResourceMgr); + } + } + })); + if (!isMutation) + { + sequentialVfxPlayer.Register(battleMgr.OperateMgr.InitSetCard(playCard, playCard.SelfBattlePlayer.IsPlayer, isSelect: false, isRecovery: false, isChoiceSelect: true, isAccelerateSelect: false, registerDirectlyToVfxManager: true, isFusionWait: false, isChoiceBrave)); + } + else + { + bool isChoice = playCard.GetSelectTypeSkill().Any((SkillBase s) => s is Skill_choice); + sequentialVfxPlayer.Register(playCard.SelfBattlePlayer.BattleView.PlayQueueView.InstantAddCardToViewVfx(playCard.BattleCardView, forceCardIntoPlayQueue: false, isChoice)); + if (isMutation) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + Vector3 position = originalCard.BattleCardView.GameObject.transform.position; + position += ACCELERATE_POSITION_OFFSET; + Quaternion rot = originalCard.BattleCardView.GameObject.transform.rotation; + if (!playCard.IsSpell && playCard.SelfBattlePlayer.BattleView.PlayQueueView.IsCardInQueue(playCard.BattleCardView)) + { + Vector3 localEulerAngles = originalCard.BattleCardView.GameObject.transform.localEulerAngles; + rot = Quaternion.Euler(localEulerAngles.x, 0f, localEulerAngles.z); + } + gameMgr.GetEffectMgr().Start(playCard.IsSpell ? EffectMgr.EffectType.CMN_CARD_ACCELERATE_1 : EffectMgr.EffectType.CMN_CARD_CRYSTALLIZE_1, playCard.IsSpell ? position : originalCard.BattleCardView.GameObject.transform.position, rot, 31); + })); + sequentialVfxPlayer.Register(WaitVfx.Create(playCard.IsSpell ? 0.2f : 0.2f)); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + CardTemplate cardTemplate = originalCard.BattleCardView.CardTemplate; + cardTemplate.SetEffectStyle(UILabel.Effect.None); + if (originalCard is UnitBattleCard) + { + cardTemplate.NormalAtkLabelTemp.effectStyle = UILabel.Effect.None; + cardTemplate.NormalLifeLabelTemp.effectStyle = UILabel.Effect.None; + } + })); + sequentialVfxPlayer.Register(WaitVfx.Create(playCard.IsSpell ? 0.2f : 0f)); + } + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + if (!battleMgr.IsRecovery && isMutation) + { + Transform transform = playCard.BattleCardView.Transform; + Transform transform2 = originalCard.BattleCardView.Transform; + if (playCard.IsSpell || playCard.SelfBattlePlayer.BattleView.PlayQueueView.IsCardInQueue(playCard.BattleCardView)) + { + MotionUtils.SetLayerAll(playCard.BattleCardView.CardWrapObject, 31); + playCard.BattleCardView.Transform.SetParent(battleMgr.CutInContainer.transform, worldPositionStays: false); + } + if (playCard.IsSpell) + { + transform.position = transform2.position; + transform.localScale = transform2.localScale; + originalCard.BattleCardView.Transform.SetParent(originalCard.SelfBattlePlayer.BattleView.BanishParent.transform); + originalCard.BattleCardView.GameObject.SetActive(value: false); + playCard.BattleCardView.GameObject.SetActive(value: true); + playCard.BattleCardView.ShowInHandFrameEffect(enable: true, HandCardFrameEffectType.LIGHT_BLUE); + originalCard.BattleCardView.CardTemplate.SetEffectStyle(UILabel.Effect.None); + } + else + { + transform.position = transform2.position; + transform.localScale = transform2.localScale; + originalCard.BattleCardView.Transform.SetParent(originalCard.SelfBattlePlayer.BattleView.BanishParent.transform); + originalCard.BattleCardView.GameObject.SetActive(value: false); + playCard.BattleCardView.GameObject.SetActive(value: true); + originalCard.BattleCardView.Transform.SetParent(originalCard.SelfBattlePlayer.BattleView.BanishParent.transform); + } + } + })); + if (isMutation) + { + sequentialVfxPlayer.Register(WaitVfx.Create(playCard.IsSpell ? 0.2f : 0.3f)); + if (!playCard.IsSpell) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + originalCard.BattleCardView.GameObject.SetActive(value: false); + MotionUtils.SetLayerAll(playCard.BattleCardView.CardWrapObject, 10); + })); + } + } + } + return sequentialVfxPlayer; + } + + public VfxBase PlayCard(BattleCardBase card, IEnumerable selectedCards, List selectChoiceId = null, bool isChoiceBrave = false) + { + if (selectedCards != null) + { + foreach (BattleCardBase selectedCard in selectedCards) + { + selectedCard.SelfBattlePlayer.AddLastTargetCardsList(selectedCard); + } + } + SetIndividualId(card.NormalSkills); + if (card.NormalSkills.Any((SkillBase s) => s.HasIndividualId)) + { + card.SelfBattlePlayer.BattleMgr.IncrementIndividualId(); + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + SkillProcessor skillProcessor = new SkillProcessor(); + BattleCardBase battleCardBase = card; + SkillConditionCheckerOption skillConditionCheckerOption = new SkillConditionCheckerOption(); + skillConditionCheckerOption.PlayedCard = card; + skillConditionCheckerOption.SummonedCard = card; + if (isChoiceBrave) + { + card.SelfBattlePlayer.IsAlreadyChoiceBraveInThisTurn = true; + card.SelfBattlePlayer.BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + card.SelfBattlePlayer.BattleView.UpdateChoiceBraveActivatingEffect(isActivating: false); + int cardId = ((selectChoiceId != null && selectChoiceId.Count > 0) ? selectChoiceId[0] : selectedCards.First().CardId); + BattleCardBase selectSkillCard = (CardMaster.IsChoiceBraveCardCheck(card.CardId) ? card : ((selectedCards != null && selectedCards.Count() > 1 && (card.IsPlayer || GameMgr.GetIns().IsAdminWatch)) ? selectedCards.First() : null)); + skillConditionCheckerOption.PlayedCard = card.SelfBattlePlayer.BattleMgr.ReplaceChoiceBraveCard(card, cardId, selectSkillCard); + } + sequentialVfxPlayer.Register(SetSkillConditionCheckeroptionSelectCards(card, skillConditionCheckerOption, selectedCards, isEvolve: false, selectChoiceId, isFusion: false, isChoiceBrave)); + if (battleCardBase != skillConditionCheckerOption.PlayedCard) + { + if (battleCardBase.SkillApplyInformation.SkillRandomArray == null) + { + skillConditionCheckerOption.PlayedCard.SkillApplyInformation.GiveSkillRandomArray(battleCardBase.SkillApplyInformation.SkillRandomArray); + } + battleCardBase = skillConditionCheckerOption.PlayedCard; + sequentialVfxPlayer.Register(SetupPlayCard(card, battleCardBase, skillProcessor, isChoiceBrave)); + BattleManagerBase.GetIns().PSideLogControl.RemoveAllLog(); + } + battleCardBase.SetPlayedTurnNow(); + int count = skillConditionCheckerOption.ChosenCards.Count; + int num = selectedCards?.Count() ?? 0; + if (count > 0 && num - count < 0) + { + List list = ((selectedCards != null) ? selectedCards.ToList() : new List()); + foreach (int chosenCard in skillConditionCheckerOption.ChosenCards) + { + BattleCardBase item = BattleManagerBase.GetIns().CreateTransformCardRegisterVfx(skillConditionCheckerOption.PlayedCard, chosenCard, skillConditionCheckerOption.PlayedCard.IsPlayer); + list.Insert(0, item); + } + selectedCards = list; + } + this.OnBeforePlayCard.Call(card, battleCardBase, selectedCards); + this.OnBeforeChosenPlayCard.Call(card, battleCardBase, skillConditionCheckerOption.ChosenCards); + if (skillConditionCheckerOption.BurialRiteCards != null && skillConditionCheckerOption.BurialRiteCards.Count > 0) + { + this.OnBeforeBurialRitePlayCard.Call(battleCardBase, selectedCards, arg3: false); + } + bool isEnhance = battleCardBase.CheckConditionFixedUseCost(isPrePlay: true); + VfxWith vfxWith = card.PlayChoiceCard(skillProcessor, skillConditionCheckerOption); + VfxWith vfxWith2 = battleCardBase.PlayCard(skillProcessor, skillConditionCheckerOption, isInplayGeneration: false, card); + VfxBase vfx = battleCardBase.SelfBattlePlayer.StartSkillWhenChangeInplay(null, new List { battleCardBase }, skillProcessor); + skillProcessor.Register(vfxWith.Value); + skillProcessor.Register(vfxWith2.Value); + VfxBase vfx2 = _pair.Self.StartSkillWhenPlayOtherEnhanceAndAccelerateAndCrystallize(battleCardBase, isEnhance, skillProcessor); + VfxBase vfx3 = _pair.Self.StartSkillWhenSummonOther(battleCardBase, skillProcessor); + VfxBase vfx4 = skillProcessor.Process(_pair); + if (card != battleCardBase && card.Skills.HaveBeforeChoiceSkill()) + { + BattleLogManager.GetInstance().AddLogPlayAsChoiceTransform(battleCardBase); + } + VfxBase vfxBase = battleCardBase.FinishWhenPlaySkill(); + VfxBase allFuncVfxResults = this.OnAfterPlayCard.GetAllFuncVfxResults(battleCardBase); + BattleUIContainer battleUIContainer = BattleManagerBase.GetIns().BattleUIContainer; + bool isSelfTurn = BattleManagerBase.GetIns().BattlePlayer.IsSelfTurn; + if (isSelfTurn) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + battleUIContainer.PlayerCardPlaying = true; + if (battleUIContainer.IsEnableMenu()) + { + battleUIContainer.DisableMenu(); + } + })); + } + sequentialVfxPlayer.Register(vfxWith2.Vfx); + sequentialVfxPlayer.Register(vfx); + sequentialVfxPlayer.Register(battleCardBase.StopSpellCharge()); + sequentialVfxPlayer.Register(vfx2); + sequentialVfxPlayer.Register(vfx3); + sequentialVfxPlayer.Register(vfx4); + if (vfxBase != null) + { + sequentialVfxPlayer.Register(vfxBase); + } + if (allFuncVfxResults.IsVfxNonEmpty()) + { + sequentialVfxPlayer.Register(allFuncVfxResults); + } + Action handleBattleMenu = delegate + { + }; + if (isSelfTurn) + { + handleBattleMenu = delegate + { + battleUIContainer.PlayerCardPlaying = false; + if (BattleManagerBase.GetIns().BattlePlayer.BattleView.PlayQueueView.QueueCount() == 0 && !battleUIContainer.IsEnableMenu()) + { + battleUIContainer.RequestEnableMenuWhenTouchable(); + } + }; + } + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + BattlePlayer battlePlayer = BattleManagerBase.GetIns().BattlePlayer; + handleBattleMenu(); + int num2 = battlePlayer.BattleView.PlayQueueView.QueueCount(); + bool isSelecting = battlePlayer.BattleView.IsSelecting; + if (num2 == 0 && !isSelecting && !battlePlayer.IsDuringChoiceBrave) + { + battlePlayer.BattleView.ClearSelectCardList(); + } + })); + OnPlayComplete.Call(); + return sequentialVfxPlayer; + } + + private void SetIndividualId(SkillCollectionBase skills) + { + for (int i = 0; i < skills.Count(); i++) + { + skills.ElementAt(i).InitSetIndividualId(); + } + } + + public VfxBase Attack(IBattleCardUniqueID attackCardId, IBattleCardUniqueID targetCardId) + { + BattleCardBase attackCard = _pair.Self.InPlayCards.SingleOrDefault((BattleCardBase c) => c.EquelsID(attackCardId)); + IfNullCardThenException(attackCard, attackCardId, "場"); + if (attackCard.SkillApplyInformation.IsQuick) + { + attackCard.SelfBattlePlayer.GameQuickAttackCards.Add(attackCard); + } + BattleCardBase battleCardBase = ((targetCardId.IsPlayer == _pair.Self.IsPlayer) ? _pair.Self.ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c.EquelsID(targetCardId)) : _pair.Opponent.ClassAndInPlayCardList.SingleOrDefault((BattleCardBase c) => c.EquelsID(targetCardId))); + IfNullCardThenException(battleCardBase, targetCardId, "場"); + attackCard.BattleCardView._inPlayFrameEffect.HideFrameEffect(); + OnAttackStart.Call(attackCard, battleCardBase); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + SkillProcessor skillProcessor = new SkillProcessor(); + SkillCollectionBase skills = attackCard.Skills; + foreach (SkillBase item in skills) + { + if (item.IsBeforAttackSkill) + { + VfxWith vfxWith = skills.CreateBeforeAttackInfo(item, attackCard, battleCardBase, skillProcessor, new BattlePlayerPair(attackCard.SelfBattlePlayer, attackCard.OpponentBattlePlayer)); + skillProcessor.Register(vfxWith.Value); + sequentialVfxPlayer.Register(vfxWith.Vfx); + if (vfxWith.Value != null) + { + attackCard.SelfBattlePlayer.PredictionWarningCards.Add(attackCard); + } + } + if (item.IsWhenFightSkill) + { + VfxWith vfxWith2 = skills.CreateBeforeFightInfo(item, attackCard, battleCardBase, skillProcessor, new BattlePlayerPair(attackCard.SelfBattlePlayer, attackCard.OpponentBattlePlayer)); + skillProcessor.Register(vfxWith2.Value); + sequentialVfxPlayer.Register(vfxWith2.Vfx); + if (vfxWith2.Value != null) + { + attackCard.SelfBattlePlayer.PredictionWarningCards.Add(attackCard); + } + } + } + SkillCollectionBase skills2 = battleCardBase.Skills; + foreach (SkillBase item2 in skills2) + { + if (item2.IsWhenFightSkill) + { + VfxWith vfxWith3 = skills2.CreateBeforeFightInfo(item2, attackCard, battleCardBase, skillProcessor, new BattlePlayerPair(battleCardBase.SelfBattlePlayer, battleCardBase.OpponentBattlePlayer)); + skillProcessor.Register(vfxWith3.Value); + sequentialVfxPlayer.Register(vfxWith3.Vfx); + if (vfxWith3.Value != null) + { + attackCard.SelfBattlePlayer.PredictionWarningCards.Add(attackCard); + } + } + } + foreach (BattleCardBase item3 in from c in _pair.Self.ClassAndInPlayCardList.Concat(_pair.Opponent.ClassAndInPlayCardList) + where c.Skills._skillTimingInfo.IsBeforeAttackSelfAndOther + select c) + { + SkillCollectionBase skills3 = item3.Skills; + foreach (SkillBase item4 in skills3) + { + if (item4.IsBeforeAttackSelfAndOtherSkill) + { + VfxWith vfxWith4 = skills3.CreateBeforeAttackSelfAndOtherInfo(item4, attackCard, battleCardBase, skillProcessor, new BattlePlayerPair(item3.SelfBattlePlayer, item3.OpponentBattlePlayer)); + skillProcessor.Register(vfxWith4.Value); + sequentialVfxPlayer.Register(vfxWith4.Vfx); + if (vfxWith4.Value != null) + { + item3.SelfBattlePlayer.PredictionWarningCards.Add(item3); + } + } + } + } + VfxBase allFuncVfxResults = this.OnBeforeAttack.GetAllFuncVfxResults(); + sequentialVfxPlayer.Register(allFuncVfxResults); + sequentialVfxPlayer.Register(attackCard.SelfBattlePlayer.BattleView.PrepareCardsForAttackSequenceVfx(attackCard.BattleCardView, battleCardBase.BattleCardView)); + VfxBase vfx = skillProcessor.Process(_pair); + sequentialVfxPlayer.Register(vfx); + VfxBase allFuncVfxResults2 = this.OnBeforeAttackSkillComplete.GetAllFuncVfxResults(); + sequentialVfxPlayer.Register(allFuncVfxResults2); + BattleCardBase battleCardBase2 = (attackCard.IsDead ? null : attackCard.GetDamageReflectionTarget(isSkillDamage: false)); + int damage = battleCardBase.DamageCalculationAtkTypeBeAttacked.Damage; + int num = attackCard.CalculateFinalDamageAmount(damage); + BattleCardBase battleCardBase3 = (battleCardBase.IsDead ? null : battleCardBase.GetDamageReflectionTarget(isSkillDamage: false)); + int damage2 = attackCard.DamageCalculationAtkTypeAttack.Damage; + int num2 = battleCardBase.CalculateFinalDamageAmount(damage2); + OnAttackDamageComplete.Call(attackCard, battleCardBase, num2, num); + bool flag = !attackCard.IsDead && !battleCardBase.IsDead && !attackCard.SelfBattlePlayer.Class.IsDead && !battleCardBase.SelfBattlePlayer.Class.IsDead && attackCard.IsInplay && battleCardBase.IsInplay; + if (flag) + { + VfxBase vfx2 = attackCard.StartAttack(battleCardBase, _pair); + sequentialVfxPlayer.Register(vfx2); + } + else + { + if (attackCard.SkillApplyInformation.IsSneak) + { + sequentialVfxPlayer.Register(attackCard.SkillApplyInformation.FourceDepriveSneak()); + } + attackCard.AttackableCount--; + if (!attackCard.Attackable) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + attackCard.BattleCardView._inPlayFrameEffect.HideFrameEffect(); + })); + } + AttackSelectControl attackSelectControl = attackCard.SelfBattlePlayer.BattleView.AttackSelectControl; + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + if (!attackCard.IsDead && attackCard.IsInplay) + { + IBattleCardView battleCardView = attackCard.BattleCardView; + parallelVfxPlayer.Register(attackSelectControl.ResetCardAfterAttack(battleCardView)); + } + if (!battleCardBase.IsDead && battleCardBase.IsInplay) + { + IBattleCardView battleCardView2 = battleCardBase.BattleCardView; + parallelVfxPlayer.Register(attackSelectControl.ResetCardAfterAttack(battleCardView2)); + } + sequentialVfxPlayer.Register(parallelVfxPlayer); + } + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + attackCard.BattleCardView._inPlayFrameEffect.UpdateCanAttackEffect(); + })); + if (GameMgr.GetIns().IsWatchBattle || GameMgr.GetIns().IsReplayBattle) + { + bool num3 = attackCard.SelfBattlePlayer.BattleMgr.DetailMgr.DetailPanelControl.IsShow && attackCard.SelfBattlePlayer.BattleMgr.DetailMgr.DetailPanelControl._card == attackCard; + bool flag2 = attackCard.SelfBattlePlayer.IsSelfTurn && attackCard.IsPlayer && attackCard.IsInplay && attackCard.AttackableCount <= 0; + if (num3 && flag2) + { + sequentialVfxPlayer.Register(attackCard.BattleCardView.ShowAttackFinished()); + } + } + OnAttackProcessComplete.Call(attackCard); + if (flag) + { + SkillProcessor skillProcessor2 = new SkillProcessor(); + attackCard.SelfBattlePlayer.StartSkillWhenDamageSelfAndOther(null, (battleCardBase3 != null) ? new List { battleCardBase3 } : null, skillProcessor2, damage2, num2); + if (battleCardBase is UnitBattleCard) + { + attackCard.SelfBattlePlayer.StartSkillWhenDamageSelfAndOther(null, (battleCardBase2 != null) ? new List { battleCardBase2 } : null, skillProcessor2, damage, num); + } + for (int num4 = 0; num4 < attackCard.Skills.Count(); num4++) + { + SkillBase skillBase = attackCard.Skills.ElementAt(num4); + if (skillBase.OnAfterAttackStart != 0) + { + SkillProcessor.ProcessInfo info = attackCard.Skills.CreateAfterAttackInfo(skillBase, attackCard, battleCardBase, skillProcessor2, new BattlePlayerPair(attackCard.SelfBattlePlayer, attackCard.OpponentBattlePlayer)); + skillProcessor2.Register(info); + } + if (skillBase.OnAfterFightStart != 0) + { + SkillProcessor.ProcessInfo info2 = attackCard.Skills.CreateAfterFightInfo(skillBase, attackCard, battleCardBase, skillProcessor2, new BattlePlayerPair(attackCard.SelfBattlePlayer, attackCard.OpponentBattlePlayer)); + skillProcessor2.Register(info2); + } + } + for (int num5 = 0; num5 < battleCardBase.Skills.Count(); num5++) + { + SkillBase skillBase2 = battleCardBase.Skills.ElementAt(num5); + if (skillBase2.OnAfterFightStart != 0) + { + SkillProcessor.ProcessInfo info3 = battleCardBase.Skills.CreateAfterFightInfo(skillBase2, attackCard, battleCardBase, skillProcessor2, new BattlePlayerPair(battleCardBase.SelfBattlePlayer, battleCardBase.OpponentBattlePlayer)); + skillProcessor2.Register(info3); + } + } + foreach (BattleCardBase item5 in from c in _pair.Self.ClassAndInPlayCardList.Concat(_pair.Opponent.ClassAndInPlayCardList) + where c.Skills._skillTimingInfo.IsAfterAttackSelfAndOther + select c) + { + SkillCollectionBase skills4 = item5.Skills; + foreach (SkillBase item6 in skills4) + { + if (item6.IsAfterAttackSelfAndOtherSkill) + { + VfxWith vfxWith5 = skills4.CreateAfterAttackSelfAndOtherInfo(item6, attackCard, battleCardBase, skillProcessor2, new BattlePlayerPair(item5.SelfBattlePlayer, item5.OpponentBattlePlayer)); + skillProcessor2.Register(vfxWith5.Value); + sequentialVfxPlayer.Register(vfxWith5.Vfx); + if (vfxWith5.Value != null) + { + item5.SelfBattlePlayer.PredictionWarningCards.Add(item5); + } + } + } + } + VfxBase vfx3 = skillProcessor2.Process(_pair); + sequentialVfxPlayer.Register(vfx3); + } + VfxBase allFuncVfxResults3 = this.OnAfterAttack.GetAllFuncVfxResults(attackCard, battleCardBase, flag); + sequentialVfxPlayer.Register(allFuncVfxResults3); + OnAttackComplete.Call(); + return sequentialVfxPlayer; + } + + public VfxBase Evolve(IBattleCardUniqueID cardId, Func, SkillBase, Func, VfxBase>, VfxBase> selectSkillTargetCards) + { + BattleCardBase card = _pair.Self.InPlayCards.SingleOrDefault((BattleCardBase c) => c.EquelsID(cardId)); + IfNullCardThenException(card, cardId, "場"); + return CallCardSkill(card.EvolutionSkills, (IEnumerable selectedCards) => Evolution(card, selectedCards), selectSkillTargetCards); + } + + public VfxBase Evolution(BattleCardBase card, IEnumerable selectedCards, List selectChoiceId = null) + { + BattleCardBase battleCardBase = card; + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (BattleManagerBase.GetIns().BattlePlayer.Class.IsDead || BattleManagerBase.GetIns().BattleEnemy.Class.IsDead || card.IsEvolution || !card.SelfBattlePlayer.IsSelfTurn) + { + return NullVfx.GetInstance(); + } + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + sequentialVfxPlayer.Register(SetSkillConditionCheckeroptionSelectCards(card, option, selectedCards, isEvolve: true, selectChoiceId)); + SkillProcessor skillProcessor = new SkillProcessor(); + if (option.PlayedCard != null && card.EvolutionSkills.Any((SkillBase s) => s is Skill_transform)) + { + battleCardBase = option.PlayedCard; + sequentialVfxPlayer.Register(battleCardBase.SelfBattlePlayer.ReplaceInPlay(card, battleCardBase, skillProcessor)); + sequentialVfxPlayer.Register(battleCardBase.SetUpInplay()); + BattlePlayerPair playerInfoPair = new BattlePlayerPair(battleCardBase.SelfBattlePlayer, battleCardBase.OpponentBattlePlayer); + sequentialVfxPlayer.Register(battleCardBase.Skills.RegisterAndProcessWhenChangeInplayImmediateInfo(playerInfoPair)); + battleCardBase.Skills.CreateAndRegisterWhenChangeInplayInfo(new List { battleCardBase }, skillProcessor, playerInfoPair); + sequentialVfxPlayer.Register(card.RemoveFromInPlay()); + } + BattlePlayerReadOnlyInfoPair pair = new BattlePlayerReadOnlyInfoPair(card.SelfBattlePlayer, card.OpponentBattlePlayer); + SkillBase skillBase = card.EvolutionSkills.FirstOrDefault((SkillBase s) => s.OnWhenEvolveBeforeStart != 0 && s is Skill_evolve_to_other && s.CheckCondition(pair, option, isPrePlay: true)); + if (skillBase != null) + { + IBattleResourceMgr battleResourceMgr = card.SelfBattlePlayer.BattleMgr.BattleResourceMgr; + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + UnitBattleCardView unitBattleCardView = card.BattleCardView as UnitBattleCardView; + parallelVfxPlayer.Register(battleResourceMgr.DecrementEffectBattleRefCount(card.BaseParameter.AtkEffectParameter.GetEffectPath(isEvolve: false))); + parallelVfxPlayer.Register(battleResourceMgr.DecrementEffectBattleRefCount(card.BaseParameter.AtkEffectParameter.GetEffectPath(isEvolve: true))); + if (option.ChosenCards.Count > 0) + { + card.UpdateBuildInfoAndSkillCollection(option.ChosenCards[0], isFoil: false); + } + else + { + card.UpdateBuildInfoAndSkillCollection(skillBase.OptionValue.GetInt(SkillFilterCreator.ContentKeyword.card_id, -1), card.BaseParameter.IsFoil); + } + card.BattleCardView.InitializeVoiceInfo(card.CardId); + for (int num = 0; num < card.NormalSkills.Count(); num++) + { + card.NormalSkills.ElementAt(num).SetInductionVoiceIndex(); + } + for (int num2 = 0; num2 < card.EvolutionSkills.Count(); num2++) + { + card.EvolutionSkills.ElementAt(num2).SetInductionVoiceIndex(); + } + if (unitBattleCardView != null) + { + parallelVfxPlayer.Register(unitBattleCardView.LoadAttackEffect(card.BaseParameter.AtkEffectParameter, isEvolve: false)); + parallelVfxPlayer.Register(unitBattleCardView.LoadAttackEffect(card.BaseParameter.AtkEffectParameter, isEvolve: true)); + } + sequentialVfxPlayer.Register(parallelVfxPlayer); + } + if (option.ChosenCards.Count > 0 && selectedCards.Count() <= 0) + { + List list = selectedCards.ToList(); + foreach (int chosenCard in option.ChosenCards) + { + BattleCardBase item = BattleManagerBase.GetIns().CreateTransformCardRegisterVfx(card, chosenCard, option.PlayedCard.IsPlayer); + list.Add(item); + } + selectedCards = list; + } + SetIndividualId(card.EvolutionSkills); + if (card.EvolutionSkills.Any((SkillBase s) => s.HasIndividualId)) + { + card.SelfBattlePlayer.BattleMgr.IncrementIndividualId(); + } + this.OnBeforeEvolution.Call(card, battleCardBase, selectedCards); + this.OnBeforeChosenEvolution.Call(card, battleCardBase, option.ChosenCards); + if (option.BurialRiteCards != null && option.BurialRiteCards.Count > 0) + { + this.OnBeforeBurialRitePlayCard.Call(battleCardBase, selectedCards, arg3: true); + } + this.OnJustBeforeEvolution.Call(battleCardBase); + VfxBase vfx = battleCardBase.Evolution(isSkill: false, skillProcessor, option); + sequentialVfxPlayer.Register(vfx); + this.OnRightAfterEvolution.Call(battleCardBase); + VfxBase vfx2 = skillProcessor.Process(_pair); + sequentialVfxPlayer.Register(vfx2); + VfxBase allFuncVfxResults = this.OnAfterEvolution.GetAllFuncVfxResults(battleCardBase); + sequentialVfxPlayer.Register(allFuncVfxResults); + OnEvolutionComplete.Call(); + return sequentialVfxPlayer; + } + + public VfxBase Fusion(BattleCardBase fusionCard, List selectedCards) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + if (ins.BattlePlayer.Class.IsDead || ins.BattleEnemy.Class.IsDead || fusionCard.IsEvolution || !fusionCard.SelfBattlePlayer.IsSelfTurn) + { + return NullVfx.GetInstance(); + } + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + SkillConditionCheckerOption option = new SkillConditionCheckerOption(); + this.OnBeforeFusion.Call(fusionCard, selectedCards); + sequentialVfxPlayer.Register(SetSkillConditionCheckeroptionSelectCards(fusionCard, option, selectedCards, isEvolve: false, new List(), isFusion: true)); + sequentialVfxPlayer.Register(fusionCard.SelfBattlePlayer.CardManagement(fusionCard, new SkillProcessor(), BattlePlayerBase.CARD_MANAGEMENT.FUSION_MATERIAL, isRandom: false, selectedCards)); + VfxBase allFuncVfxResults = this.OnAfterFusion.GetAllFuncVfxResults(fusionCard); + sequentialVfxPlayer.Register(allFuncVfxResults); + OnFusionComplete.Call(); + return sequentialVfxPlayer; + } + + private VfxBase CallCardSkill(SkillCollectionBase skills, Func, VfxBase> standardCall, Func, SkillBase, Func, VfxBase>, VfxBase> selectSkillTargetCards, bool isNotSelect = false) + { + SkillBase actSkill = null; + IEnumerable skillUserSelectableTargets = GetSkillUserSelectableTargets(skills, _pair, ref actSkill); + if (isNotSelect || skillUserSelectableTargets == null) + { + return standardCall(null); + } + return selectSkillTargetCards(skillUserSelectableTargets, actSkill, standardCall); + } + + private static void IfNullCardThenException(BattleCardBase card, IBattleCardUniqueID cardId, string positionName) + { + if (card == null) + { + throw new ArgumentException("カード " + cardId.GetName() + " は" + positionName + "に見つかりませんでした"); + } + } + + public static IEnumerable GetSkillUserSelectableTargets(SkillBase skill, BattlePlayerReadOnlyInfoPair playerInfoPair, SkillConditionCheckerOption option = null, List selectedCards = null) + { + if (skill == null || !skill.DoesSkillFulfillActivationConditions(playerInfoPair, ignoreHandSkill: true, isPrePlay: true)) + { + return null; + } + if (option == null) + { + option = new SkillConditionCheckerOption(); + } + IEnumerable selectableCards = skill.GetSelectableCards(playerInfoPair, option, isSkipForceSelect: false, selectedCards); + if (!selectableCards.Any()) + { + selectableCards = skill.GetSelectableCards(playerInfoPair, option, isSkipForceSelect: true, selectedCards); + } + if (!selectableCards.Any()) + { + return null; + } + return selectableCards; + } + + public static IEnumerable GetSkillUserSelectableTargets(SkillCollectionBase skills, BattlePlayerReadOnlyInfoPair playerInfoPair, ref SkillBase actSkill) + { + IEnumerable source = skills.Where(delegate(SkillBase s) + { + BattlePlayerReadOnlyInfoPair playerInfoPair2 = new BattlePlayerReadOnlyInfoPair(s.SkillPrm.ownerCard.SelfBattlePlayer, s.SkillPrm.ownerCard.OpponentBattlePlayer); + return s.IsUserSelectType && s.CheckCondition(playerInfoPair2, new SkillConditionCheckerOption(), isPrePlay: true); + }); + if (source.Count() > 0) + { + actSkill = ((source.Count() > 1) ? source.ToList().Last() : source.ToList().First()); + } + return GetSkillUserSelectableTargets(actSkill, playerInfoPair); + } +} diff --git a/SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs b/SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs new file mode 100644 index 0000000..8479fbc --- /dev/null +++ b/SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs @@ -0,0 +1,35 @@ +// AUTHORED SHIM (not copied). Minimal no-op UnityEngine surface. Grows via the +// Task 4 compile loop -- add only members the compiler actually demands. +namespace UnityEngine +{ + public struct Vector2 { public float x, y; public Vector2(float x, float y){ this.x=x; this.y=y; } } + public struct Vector3 + { + public float x, y, z; + public Vector3(float x, float y, float z){ this.x=x; this.y=y; this.z=z; } + public static Vector3 zero => new Vector3(0,0,0); + public static Vector3 operator +(Vector3 a, Vector3 b) => new Vector3(a.x+b.x, a.y+b.y, a.z+b.z); + } + public struct Quaternion + { + public float x, y, z, w; + public static Quaternion identity => new Quaternion(); + public static Quaternion Euler(float x, float y, float z) => new Quaternion(); + } + public struct Color { public float r, g, b, a; public Color(float r,float g,float b,float a){ this.r=r; this.g=g; this.b=b; this.a=a; } } + public static class Mathf + { + public const float PI = 3.14159265f; + public static float Floor(float f) => (float)System.Math.Floor(f); + public static int FloorToInt(float f) => (int)System.Math.Floor(f); + public static float Max(float a, float b) => System.Math.Max(a, b); + public static float Min(float a, float b) => System.Math.Min(a, b); + public static float Clamp(float v, float lo, float hi) => System.Math.Max(lo, System.Math.Min(hi, v)); + } + public static class Debug + { + public static void Log(object m) { } + public static void LogWarning(object m) { } + public static void LogError(object m) { } + } +} From 23a65965587cb13dd00f8e1768cda4ebca671b4f Mon Sep 17 00:00:00 2001 From: gamer147 Date: Fri, 5 Jun 2026 16:49:02 -0400 Subject: [PATCH 003/129] fix(battle-engine): Quaternion.identity w=1 to match Unity semantics --- SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs b/SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs index 8479fbc..127aa1d 100644 --- a/SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs +++ b/SVSim.BattleEngine/Shim/UnityEngine/Primitives.cs @@ -13,7 +13,7 @@ namespace UnityEngine public struct Quaternion { public float x, y, z, w; - public static Quaternion identity => new Quaternion(); + public static Quaternion identity => new Quaternion { x=0, y=0, z=0, w=1 }; public static Quaternion Euler(float x, float y, float z) => new Quaternion(); } public struct Color { public float r, g, b, a; public Color(float r,float g,float b,float a){ this.r=r; this.g=g; this.b=b; this.a=a; } } From 0d9d8acae07b5499ef3802a7f199fcebd66b0709 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Fri, 5 Jun 2026 16:57:20 -0400 Subject: [PATCH 004/129] feat(battle-engine): M1 auto-copy closure (782 battle-logic files) Compile-driven bulk-copy loop (tools/engine-port/m1_copy_loop.py) pulled the precise reference closure of the battle-core roots, stopping at the classify god-object/View-VFX-UI boundary. 782 files; no re-explosion (M0 had estimated ~order 1000). Residual frontier = 52 shim-classified + 80 external (Unity/BCL) types to author next. --- SVSim.BattleEngine/COPIED.manifest.tsv | 777 +++ SVSim.BattleEngine/Engine/AchievedInfo.cs | 166 + SVSim.BattleEngine/Engine/AddTargetInfo.cs | 106 + SVSim.BattleEngine/Engine/ApiType.cs | 2651 ++++++++++ .../ApplySkillTargetFilterCollection.cs | 90 + SVSim.BattleEngine/Engine/ArrowControl.cs | 117 + .../Engine/AttachedSkillInformation.cs | 74 + .../Engine/AttachingAbilityInfo.cs | 15 + SVSim.BattleEngine/Engine/BMFont.cs | 154 + SVSim.BattleEngine/Engine/BMGlyph.cs | 88 + SVSim.BattleEngine/Engine/BMSymbol.cs | 93 + SVSim.BattleEngine/Engine/BackGroundBase.cs | 272 + SVSim.BattleEngine/Engine/BattleCamera.cs | 79 + SVSim.BattleEngine/Engine/BattleControl.cs | 124 + SVSim.BattleEngine/Engine/BattleEnemy.cs | 246 + .../Engine/BattleFinishParam.cs | 25 + .../Engine/BattleLifeTimeSharedObject.cs | 29 + SVSim.BattleEngine/Engine/BattleMenuMgr.cs | 609 +++ SVSim.BattleEngine/Engine/BattlePlayer.cs | 346 ++ .../Engine/BattleResultUIController.cs | 916 ++++ .../Engine/BattleStartControl.cs | 584 +++ .../Engine/BattleUIContainer.cs | 220 + SVSim.BattleEngine/Engine/Bgm.cs | 219 + SVSim.BattleEngine/Engine/BuffCountInfo.cs | 7 + SVSim.BattleEngine/Engine/BuffDetailInfoUI.cs | 395 ++ SVSim.BattleEngine/Engine/BuffInfo.cs | 119 + .../Engine/CantPlayCardFilterInfo.cs | 95 + SVSim.BattleEngine/Engine/CardBasePrm.cs | 317 ++ SVSim.BattleEngine/Engine/CardDataModel.cs | 104 + SVSim.BattleEngine/Engine/CardDetailBase.cs | 188 + .../Engine/CardDetailFilterCategory.cs | 39 + .../Engine/CardDetailFilterDialog.cs | 193 + .../Engine/CardDetailFilterKeyWord.cs | 51 + .../Engine/CardDetailFilterOffButton.cs | 36 + SVSim.BattleEngine/Engine/CardDetailUI.cs | 2620 ++++++++++ .../Engine/CardFilterKeyWordMaster.cs | 30 + SVSim.BattleEngine/Engine/CardKeyWordCache.cs | 68 + SVSim.BattleEngine/Engine/CardPack.cs | 22 + SVSim.BattleEngine/Engine/CardPackManager.cs | 1179 +++++ SVSim.BattleEngine/Engine/CardTemplate.cs | 319 ++ .../CausedDamageCardParameterModifier.cs | 9 + SVSim.BattleEngine/Engine/ClassCharaPrm.cs | 332 ++ .../Engine/ClassInformationUIController.cs | 226 + .../Engine/ConditionSkillFilterCollection.cs | 63 + SVSim.BattleEngine/Engine/ConventionInfo.cs | 41 + .../Engine/Cute/AssetErrorState.cs | 93 + SVSim.BattleEngine/Engine/Cute/AssetHandle.cs | 1231 +++++ .../Engine/Cute/AssetRequestContext.cs | 22 + .../Engine/Cute/Certification.cs | 375 ++ SVSim.BattleEngine/Engine/Cute/INetworkUI.cs | 54 + .../Engine/Cute/NetworkManager.cs | 406 ++ SVSim.BattleEngine/Engine/Cute/NetworkTask.cs | 570 +++ SVSim.BattleEngine/Engine/Cute/PostParams.cs | 10 + .../Engine/Cute/ResourcesManager.cs | 1707 +++++++ .../Engine/Cute/SkipCuteCheckResultCodes.cs | 40 + SVSim.BattleEngine/Engine/Cute/Utility.cs | 731 +++ .../Engine/DamageCardParameterModifier.cs | 23 + .../Engine/DamageClippingInfo.cs | 105 + SVSim.BattleEngine/Engine/DamageCutInfo.cs | 24 + SVSim.BattleEngine/Engine/DamageInfo.cs | 44 + SVSim.BattleEngine/Engine/DamageModifier.cs | 38 + SVSim.BattleEngine/Engine/DataMgr.cs | 1381 +++++ SVSim.BattleEngine/Engine/DeckData.cs | 577 +++ SVSim.BattleEngine/Engine/DetailMgr.cs | 105 + .../Engine/DetailPanelControl.cs | 2261 +++++++++ SVSim.BattleEngine/Engine/DialogBase.cs | 1689 +++++++ .../Engine/DisconnectToDispChecker.cs | 48 + .../Engine/DisconnectToLoseChecker.cs | 114 + SVSim.BattleEngine/Engine/EffectBattle.cs | 34 + SVSim.BattleEngine/Engine/EffectIdx.cs | 5 + SVSim.BattleEngine/Engine/EventDelegate.cs | 688 +++ .../Engine/ExecutionInfoCreatorBase.cs | 182 + SVSim.BattleEngine/Engine/FilterController.cs | 1201 +++++ SVSim.BattleEngine/Engine/FinishTaskBase.cs | 65 + SVSim.BattleEngine/Engine/FlexibleGrid.cs | 148 + .../Engine/FusionIngredientInfo.cs | 17 + SVSim.BattleEngine/Engine/GachaUI.cs | 1509 ++++++ SVSim.BattleEngine/Engine/Global.cs | 797 +++ SVSim.BattleEngine/Engine/GuardInfo.cs | 12 + SVSim.BattleEngine/Engine/HandControl.cs | 139 + .../Engine/HandTRSCalculatorBase.cs | 22 + SVSim.BattleEngine/Engine/HeaderData.cs | 16 + .../Engine/HealCardParameterModifier.cs | 23 + SVSim.BattleEngine/Engine/HealModifier.cs | 8 + .../Engine/IBattlePlayerReadOnlyInfo.cs | 161 + .../Engine/IBattlePlayerSkill.cs | 8 + .../Engine/IBattlePlayerVfxCreator.cs | 15 + .../Engine/IBattleResultReporter.cs | 31 + .../Engine/ICardChantCountModifier.cs | 8 + .../Engine/ICardCostModifier.cs | 12 + SVSim.BattleEngine/Engine/ICardEpModifier.cs | 6 + .../Engine/ICardLifeModifier.cs | 10 + .../Engine/ICardOffenseModifier.cs | 6 + .../Engine/ICardSkyboundArtCountModifier.cs | 8 + .../ICardSuperSkyboundArtCountModifier.cs | 8 + .../Engine/ICardUnionBurstCountModifier.cs | 8 + .../Engine/IDetailPanelControl.cs | 58 + .../Engine/INextSceneSelector.cs | 8 + SVSim.BattleEngine/Engine/IPpModifier.cs | 3 + .../Engine/IResultAnimationHandler.cs | 6 + .../Engine/ISkillApplyInformation.cs | 765 +++ .../Engine/ISkillBattlePlayerFilter.cs | 7 + SVSim.BattleEngine/Engine/ISkillCalcFilter.cs | 8 + .../Engine/ISkillCardCountExtensionsFilter.cs | 4 + SVSim.BattleEngine/Engine/ISkillCardFilter.cs | 7 + .../Engine/ISkillConditionChecker.cs | 8 + .../Engine/ISkillCustomSelectFilter.cs | 7 + .../Engine/ISkillEnvironmentalFilter.cs | 6 + .../Engine/ISkillExclutionFilter.cs | 7 + SVSim.BattleEngine/Engine/ISkillOrFilter.cs | 4 + .../Engine/ISkillParameterSelectFilter.cs | 7 + .../Engine/ISkillSelectFilter.cs | 8 + .../Engine/ISkillTargetFilter.cs | 7 + .../Engine/IStatusPanelControl.cs | 45 + SVSim.BattleEngine/Engine/ITurnEndButtonUI.cs | 38 + .../Engine/ITurnPanelControl.cs | 13 + .../Engine/InPlayCardReflection.cs | 172 + SVSim.BattleEngine/Engine/InputDialog.cs | 129 + SVSim.BattleEngine/Engine/InputMgr.cs | 801 +++ .../Engine/JudgeResultFailedToRetryChecker.cs | 24 + .../Engine/MasterLocalizeSetting.cs | 37 + SVSim.BattleEngine/Engine/Matching.cs | 905 ++++ SVSim.BattleEngine/Engine/MatchingBase.cs | 10 + .../Engine/MatchingIntervalActionBase.cs | 31 + .../Engine/MatchingNetworkConnectChecker.cs | 165 + .../Engine/MatchingRetryDomatching.cs | 48 + .../Engine/MatchingRetryLoaded.cs | 18 + .../Engine/MatchingTimeChecker.cs | 26 + SVSim.BattleEngine/Engine/NGUIText.cs | 2108 ++++++++ .../Engine/NetworkBattleData.cs | 101 + .../Engine/NetworkBattleDefine.cs | 199 + .../NetworkBattleIntervalCheckerBase.cs | 99 + .../Engine/NetworkBattleManagerBase.cs | 2158 ++++++++ .../Engine/NetworkBattleReceiver.cs | 2532 ++++++++++ .../Engine/NetworkBattleSender.cs | 470 ++ .../NetworkBattleSetupBurialRitePlay.cs | 50 + .../Engine/NetworkBattleSetupCardEvent.cs | 1228 +++++ .../Engine/NetworkBattleSetupValidateEvent.cs | 70 + .../Engine/NetworkConsistency.cs | 98 + .../Engine/NetworkExecutionInfoCreator.cs | 365 ++ .../Engine/NetworkOperationCollectionBase.cs | 190 + .../Engine/NetworkReplayBattleMgr.cs | 205 + .../Engine/NetworkTouchControl.cs | 81 + .../Engine/NetworkWatchBattleMgr.cs | 601 +++ .../Engine/NewReplayBattleMgr.cs | 3896 +++++++++++++++ SVSim.BattleEngine/Engine/NguiObjs.cs | 45 + .../Engine/NotBeAttackedInfo.cs | 69 + .../Engine/NotConsumeEpModifierInfo.cs | 63 + .../Engine/NotMulliganEndToJudgeChecker.cs | 32 + .../Engine/NotTurnEndToLoseChecker.cs | 35 + .../Engine/NotTurnStartToLoseChecker.cs | 28 + SVSim.BattleEngine/Engine/OperateMgr.cs | 840 ++++ SVSim.BattleEngine/Engine/OperateReceive.cs | 177 + .../Engine/OperateReceiveChecker.cs | 223 + .../Engine/OpponentNotTurnEndToWinChecker.cs | 43 + .../OpponentNotTurnStartToWinChecker.cs | 53 + .../Engine/OpponentRecoveryToDispChecker.cs | 26 + SVSim.BattleEngine/Engine/PackOpenDetail.cs | 14 + SVSim.BattleEngine/Engine/PanelMgr.cs | 487 ++ .../Engine/PlayHandCardReflection.cs | 316 ++ SVSim.BattleEngine/Engine/PpAddModifier.cs | 7 + SVSim.BattleEngine/Engine/Prediction.cs | 522 ++ .../Engine/QuestFinishDetail.cs | 114 + .../Engine/QuestSpecialBattleResult.cs | 731 +++ SVSim.BattleEngine/Engine/RankInfo.cs | 31 + .../Engine/RankMatchBattleResult.cs | 778 +++ .../Engine/ReceiveIntervalTrigger.cs | 104 + .../ReceivePlayActionsReflectionBase.cs | 604 +++ SVSim.BattleEngine/Engine/ReceivedReward.cs | 123 + .../Engine/RecoveryToDispChecker.cs | 26 + SVSim.BattleEngine/Engine/ReflectionInfo.cs | 39 + .../Engine/RegisterActionBase.cs | 170 + .../Engine/RegisterActionManager.cs | 122 + .../Engine/RegisterChoiceAdd.cs | 80 + .../Engine/RegisterLotCardBase.cs | 120 + .../Engine/RegisterTargetBase.cs | 621 +++ SVSim.BattleEngine/Engine/RegisterToken.cs | 70 + .../Engine/RegisterUnapproved.cs | 143 + SVSim.BattleEngine/Engine/RepeatSkillInfo.cs | 30 + SVSim.BattleEngine/Engine/RepeatTimer.cs | 32 + .../Engine/ReplaceReceivedCard.cs | 734 +++ SVSim.BattleEngine/Engine/ReplayDetailInfo.cs | 338 ++ .../Engine/ReplayMoveTurnButton.cs | 31 + SVSim.BattleEngine/Engine/ResourceHandler.cs | 53 + .../Engine/ResultAnimationAgent.cs | 347 ++ SVSim.BattleEngine/Engine/RewardObjectInfo.cs | 14 + SVSim.BattleEngine/Engine/RushInfo.cs | 12 + SVSim.BattleEngine/Engine/SBattleLoad.cs | 1385 +++++ SVSim.BattleEngine/Engine/Se.cs | 415 ++ .../Engine/SendCardDataMaker.cs | 513 ++ .../Engine/SendIntervalTrigger.cs | 33 + .../Engine/SendKeyActionDataManager.cs | 208 + .../Engine/SetShaderGlobalColorBG.cs | 52 + SVSim.BattleEngine/Engine/ShieldInfo.cs | 31 + SVSim.BattleEngine/Engine/SideLogControl.cs | 315 ++ .../Engine/SkillAnyConditionFilter.cs | 72 + .../Engine/SkillApplyInformation.cs | 3216 ++++++++++++ SVSim.BattleEngine/Engine/SkillBase.cs | 2054 ++++++++ SVSim.BattleEngine/Engine/SkillBaseCopy.cs | 295 ++ SVSim.BattleEngine/Engine/SkillBaseSummon.cs | 215 + .../Engine/SkillCardCountFilter.cs | 11 + .../Engine/SkillCardLimitUpperCountFilter.cs | 16 + .../Engine/SkillCollectionBase.cs | 1383 +++++ .../Engine/SkillConditionCheckerOption.cs | 220 + .../Engine/SkillFilterCollectionBase.cs | 104 + .../Engine/SkillFilterCreator.cs | 1935 +++++++ .../Engine/SkillFilterVariable.cs | 31 + SVSim.BattleEngine/Engine/SkillOptionValue.cs | 509 ++ SVSim.BattleEngine/Engine/SkillOrFilter.cs | 14 + SVSim.BattleEngine/Engine/SkillParameter.cs | 24 + .../Engine/SkillPreprocessBase.cs | 91 + SVSim.BattleEngine/Engine/SkillProcessor.cs | 441 ++ SVSim.BattleEngine/Engine/SkillTimingInfo.cs | 54 + .../Engine/SkillVariableComareFilter.cs | 32 + .../Engine/Skill_attach_skill.cs | 609 +++ .../Engine/Skill_attack_count.cs | 128 + .../Engine/Skill_cant_summon.cs | 85 + .../Engine/Skill_fusion_metamorphose.cs | 143 + .../Engine/Skill_metamorphose.cs | 267 + SVSim.BattleEngine/Engine/Skill_powerup.cs | 466 ++ .../Engine/Skill_pp_fixeduse.cs | 55 + SVSim.BattleEngine/Engine/Skill_transform.cs | 19 + .../Engine/SlideObjectReceiveControl.cs | 120 + SVSim.BattleEngine/Engine/SoundMgr.cs | 730 +++ SVSim.BattleEngine/Engine/SpringPanel.cs | 78 + SVSim.BattleEngine/Engine/StockReceiveMgr.cs | 145 + SVSim.BattleEngine/Engine/StockSequenceMgr.cs | 101 + SVSim.BattleEngine/Engine/Timer.cs | 50 + SVSim.BattleEngine/Engine/TimerMgr.cs | 44 + .../Engine/TokenDrawModifier.cs | 25 + SVSim.BattleEngine/Engine/TopBar.cs | 312 ++ SVSim.BattleEngine/Engine/TouchControl.cs | 1324 +++++ SVSim.BattleEngine/Engine/TurnAndIntValue.cs | 37 + SVSim.BattleEngine/Engine/TurnEndButtonUI.cs | 241 + .../Engine/TurnEndTimeController.cs | 320 ++ SVSim.BattleEngine/Engine/TurnPlayerInfo.cs | 43 + SVSim.BattleEngine/Engine/TweenAlpha.cs | 127 + SVSim.BattleEngine/Engine/TweenPosition.cs | 134 + SVSim.BattleEngine/Engine/TweenScale.cs | 109 + SVSim.BattleEngine/Engine/UI2DSprite.cs | 317 ++ SVSim.BattleEngine/Engine/UIAnchor.cs | 227 + SVSim.BattleEngine/Engine/UIAtlas.cs | 526 ++ SVSim.BattleEngine/Engine/UIBase.cs | 184 + .../Engine/UIBase_CardManager.cs | 1871 +++++++ SVSim.BattleEngine/Engine/UIBasicSprite.cs | 900 ++++ SVSim.BattleEngine/Engine/UIButton.cs | 276 + SVSim.BattleEngine/Engine/UIButtonColor.cs | 305 ++ SVSim.BattleEngine/Engine/UICamera.cs | 2222 ++++++++ SVSim.BattleEngine/Engine/UICenterOnChild.cs | 274 + SVSim.BattleEngine/Engine/UIDragScrollView.cs | 98 + SVSim.BattleEngine/Engine/UIDrawCall.cs | 814 +++ SVSim.BattleEngine/Engine/UIEventListener.cs | 217 + SVSim.BattleEngine/Engine/UIFont.cs | 742 +++ SVSim.BattleEngine/Engine/UIGeometry.cs | 87 + SVSim.BattleEngine/Engine/UIGrid.cs | 321 ++ SVSim.BattleEngine/Engine/UIInput.cs | 1363 +++++ SVSim.BattleEngine/Engine/UIInputOnGUI.cs | 30 + SVSim.BattleEngine/Engine/UIInputWizard.cs | 31 + SVSim.BattleEngine/Engine/UILabel.cs | 1941 +++++++ SVSim.BattleEngine/Engine/UIPanel.cs | 1529 ++++++ SVSim.BattleEngine/Engine/UIProgressBar.cs | 482 ++ SVSim.BattleEngine/Engine/UIRect.cs | 621 +++ SVSim.BattleEngine/Engine/UIRoot.cs | 265 + SVSim.BattleEngine/Engine/UIScrollBar.cs | 165 + .../Engine/UIScrollBarWrapContent.cs | 37 + SVSim.BattleEngine/Engine/UIScrollView.cs | 946 ++++ SVSim.BattleEngine/Engine/UISlider.cs | 162 + SVSim.BattleEngine/Engine/UISprite.cs | 398 ++ SVSim.BattleEngine/Engine/UISpriteData.cs | 84 + SVSim.BattleEngine/Engine/UITable.cs | 251 + SVSim.BattleEngine/Engine/UITexture.cs | 341 ++ SVSim.BattleEngine/Engine/UIToggle.cs | 305 ++ SVSim.BattleEngine/Engine/UITweener.cs | 377 ++ SVSim.BattleEngine/Engine/UIWidget.cs | 1187 +++++ .../Engine/UIWidgetContainer.cs | 6 + SVSim.BattleEngine/Engine/UIWrapContent.cs | 299 ++ SVSim.BattleEngine/Engine/UnityEventAgent.cs | 88 + SVSim.BattleEngine/Engine/UserAchievement.cs | 55 + SVSim.BattleEngine/Engine/UserMission.cs | 73 + .../Engine/ValueWithOperator.cs | 12 + .../Engine/VariableSkillFilterCollection.cs | 104 + SVSim.BattleEngine/Engine/Voice.cs | 182 + SVSim.BattleEngine/Engine/VoiceAndWaitTime.cs | 14 + SVSim.BattleEngine/Engine/VoiceDictionary.cs | 585 +++ .../Engine/WatcherDisconnectChecker.cs | 39 + .../Engine/WatcherLeaveChecker.cs | 46 + .../CardInnerOptionsBase.cs | 16 + .../Wizard.Battle.Mulligan/IMulliganMgr.cs | 31 + .../Wizard.Battle.Mulligan/MulliganCtrl.cs | 259 + .../MulliganInfoControl.cs | 778 +++ .../MulliganViewBase.cs | 135 + .../OpponentMulliganCtrl.cs | 53 + .../PlayerMulliganCtrl.cs | 93 + .../PlayerMulliganView.cs | 125 + .../IOperationCommand.cs | 6 + .../SimulationSelection.cs | 8 + .../Engine/Wizard.Battle.Phase/IPhase.cs | 14 + .../Wizard.Battle.Phase/IPhaseCreator.cs | 14 + .../Wizard.Battle.Phase/IResultPhase.cs | 8 + .../IClassCharacter.cs | 49 + .../EmotionBase.cs | 162 + .../Wizard.Battle.Player.Emotion/IEmotion.cs | 20 + .../IPlayerEmotion.cs | 36 + .../PlayerEmotion.cs | 343 ++ .../BattleConditionEnemyInfo.cs | 33 + .../BattleConditionInfo.cs | 16 + .../BattleConditionPlayerInfo.cs | 50 + .../Wizard.Battle.Recovery/CardInfoBase.cs | 23 + .../CemeteryCardInfo.cs | 11 + .../Wizard.Battle.Recovery/DeckCardInfo.cs | 11 + .../Wizard.Battle.Recovery/HandCardInfo.cs | 22 + .../IRecoveryManager.cs | 43 + .../IRecoveryRecordManager.cs | 12 + .../Wizard.Battle.Recovery/InPlayCardInfo.cs | 41 + .../RecoveryController.cs | 392 ++ .../RecoveryDataHandler.cs | 1167 +++++ .../RecoveryOperationInfo.cs | 59 + .../ResultConditionInfo.cs | 11 + .../SetupConditionInfo.cs | 147 + .../IBattleResourceMgr.cs | 53 + .../Wizard.Battle/IBattleCardUniqueID.cs | 8 + .../Wizard.Battle/IInnerOptionsBuilder.cs | 14 + .../Wizard.Battle/IReadOnlyBattleCardInfo.cs | 160 + .../IBattleMgrContentsCreator.cs | 24 + .../Wizard.DeckCardEdit/CachingCardBundle.cs | 150 + .../Engine/Wizard.DeckCardEdit/CardBundle.cs | 620 +++ .../CardBundleController.cs | 443 ++ .../CardBundleControllerBase.cs | 501 ++ .../Engine/Wizard.DeckCardEdit/CardCreator.cs | 89 + .../Engine/Wizard.DeckCardEdit/CardObject.cs | 736 +++ .../FilteringCardBundle.cs | 98 + .../Engine/Wizard.Lottery/LotteryApplyData.cs | 54 + .../QuestAssetManager.cs | 151 + .../Engine/Wizard/AIAccelerateInformation.cs | 26 + .../Wizard/AIActivateCountTagArgument.cs | 55 + .../Engine/Wizard/AIActivateCounter.cs | 151 + .../Wizard/AIAfterDamageStopCollection.cs | 64 + .../Wizard/AIAfterDamageStopInformation.cs | 23 + .../AIAttachOperateMgrBattleEventCache.cs | 24 + .../Wizard/AIAttachPlayerBattleEventCache.cs | 18 + .../Engine/Wizard/AIAttachedTagCollection.cs | 124 + .../Engine/Wizard/AIAttachedTagInformation.cs | 49 + .../Wizard/AIAttackPreCheckInformation.cs | 42 + .../Engine/Wizard/AIBarrierInfoBase.cs | 103 + .../Engine/Wizard/AIBarrierInfoCollection.cs | 224 + .../Wizard/AIBarrierPseudoSimulationInfo.cs | 43 + .../Engine/Wizard/AIBarrierStopTiming.cs | 12 + .../Engine/Wizard/AIBarrierType.cs | 10 + .../Engine/Wizard/AIBattleInfoReceivedData.cs | 16 + .../Engine/Wizard/AIBuffExecutingInfo_old.cs | 56 + .../Engine/Wizard/AIBuffRecorderCollection.cs | 115 + .../Wizard/AIBuffWithTargetsInformation.cs | 83 + .../Wizard/AICannotAttackInformation.cs | 52 + .../Engine/Wizard/AICannotPlayInformation.cs | 53 + .../Engine/Wizard/AICardData.cs | 70 + .../Engine/Wizard/AICardDataAsset.cs | 58 + .../Engine/Wizard/AICardDataAssetSet.cs | 88 + .../Engine/Wizard/AICategory.cs | 14 + .../AIChoiceTransformCostInformation.cs | 24 + .../Engine/Wizard/AIConditionExpressions.cs | 43 + .../Engine/Wizard/AICrystalizeInformation.cs | 8 + .../Engine/Wizard/AICsvLoadingInfo.cs | 17 + .../Wizard/AIDamageModifierCollection.cs | 65 + .../Engine/Wizard/AIDamageModifierInfo.cs | 73 + .../Engine/Wizard/AIDamageType.cs | 9 + .../Engine/Wizard/AIDataLibrary.cs | 184 + .../Engine/Wizard/AIDeckAcccessor.cs | 41 + .../Engine/Wizard/AIDeckData.cs | 52 + .../Engine/Wizard/AIDeckFileNameList.cs | 33 + .../Engine/Wizard/AIDiscardInfo.cs | 39 + .../Engine/Wizard/AIDummyDeckContainer.cs | 50 + .../Engine/Wizard/AIEmoteCmd.cs | 55 + .../Engine/Wizard/AIEmoteCmdType.cs | 22 + .../Engine/Wizard/AIEmoteCtrl.cs | 507 ++ .../Engine/Wizard/AIEmoteDataAsset.cs | 36 + .../Engine/Wizard/AIEmoteFileNameList.cs | 37 + .../Engine/Wizard/AIEmoteMng.cs | 417 ++ .../Engine/Wizard/AIEmoteQuery.cs | 214 + .../Engine/Wizard/AIEmoteSet.cs | 19 + .../Wizard/AIFunctionResultContainer.cs | 49 + .../Engine/Wizard/AIFusionSituationInfo.cs | 48 + .../Engine/Wizard/AIGenerateTagOwnerTable.cs | 126 + .../Engine/Wizard/AIHandPlayEstimator.cs | 52 + .../Engine/Wizard/AIHealRecorderCollection.cs | 74 + .../Engine/Wizard/AILeaveStopCollection.cs | 82 + .../Engine/Wizard/AILeaveStopInformation.cs | 53 + .../Engine/Wizard/AILethalPlan.cs | 29 + .../Engine/Wizard/AIOperationProcessor.cs | 295 ++ .../Wizard/AIOperationSimulatorAccessor.cs | 122 + .../Engine/Wizard/AIOperationType.cs | 12 + .../Engine/Wizard/AIOwnSkillProcessRecord.cs | 64 + .../Engine/Wizard/AIParamQuery.cs | 420 ++ .../Engine/Wizard/AIPlayOutAction.cs | 30 + SVSim.BattleEngine/Engine/Wizard/AIPlayTag.cs | 960 ++++ .../Engine/Wizard/AIPlayTagAsset.cs | 10 + .../Engine/Wizard/AIPlayTagType.cs | 478 ++ .../Engine/Wizard/AIPlayedCardContainer.cs | 192 + .../Engine/Wizard/AIPlayptnRecorder.cs | 433 ++ .../Engine/Wizard/AIPolicyCollection.cs | 42 + .../Wizard/AIPolicyCollectionContainer.cs | 113 + .../Engine/Wizard/AIPolicyData.cs | 145 + .../Engine/Wizard/AIPolicyDataAsset.cs | 37 + .../Engine/Wizard/AIPolicyType.cs | 26 + .../Wizard/AIPolishConvertedExpression.cs | 324 ++ .../Engine/Wizard/AIRealActionInformation.cs | 208 + .../Engine/Wizard/AIRemovalType.cs | 11 + .../Engine/Wizard/AIRemovedTagCollection.cs | 55 + .../Engine/Wizard/AIRemovedTagInformation.cs | 17 + .../Wizard/AIScriptArgumentExpressions.cs | 269 + .../Engine/Wizard/AIScriptCalculationToken.cs | 121 + .../Engine/Wizard/AIScriptTokenArgType.cs | 198 + .../Engine/Wizard/AIScriptTokenBase.cs | 48 + .../Engine/Wizard/AIScriptTokenFuncType.cs | 119 + .../Engine/Wizard/AIScriptTokenType.cs | 27 + .../Wizard/AIScriptTokenVariableType.cs | 118 + .../Engine/Wizard/AISelectedTargetInfo.cs | 150 + .../Engine/Wizard/AISelectedTargetInfoSet.cs | 232 + .../Engine/Wizard/AISetUpData.cs | 37 + .../Engine/Wizard/AISimulationBuffInfo.cs | 25 + .../Wizard/AISimulationBuffInfoCollection.cs | 96 + .../Wizard/AISimulationPreprocessRecorder.cs | 50 + .../Engine/Wizard/AISinglePlayptnRecord.cs | 246 + .../Engine/Wizard/AISinglePreprocessRecord.cs | 92 + .../Engine/Wizard/AISituationInfo.cs | 333 ++ .../Wizard/AISituationTriggerInformation.cs | 49 + .../Wizard/AISkillProcessInfoCollection.cs | 65 + .../Wizard/AISkillProcessInformation.cs | 37 + .../Engine/Wizard/AIStyleData.cs | 99 + .../Engine/Wizard/AIStyleFileNameList.cs | 37 + .../Engine/Wizard/AIStyleKey.cs | 38 + .../Engine/Wizard/AIStyleQuery.cs | 248 + .../Engine/Wizard/AISummonedCardContainer.cs | 115 + .../Engine/Wizard/AITagCollectionContainer.cs | 665 +++ .../Wizard/AITagPreprocessCollectionBase.cs | 32 + .../AITagPreprocessCollectionContainer.cs | 204 + .../AITagPreprocessCreationOptionBase.cs | 14 + .../Engine/Wizard/AITagPreprocessInfoType.cs | 10 + .../Wizard/AITagPreprocessInformationBase.cs | 40 + .../Engine/Wizard/AITokenIdCollection.cs | 147 + .../Engine/Wizard/AITokenInformation.cs | 16 + .../Engine/Wizard/AITokenManager.cs | 165 + .../Engine/Wizard/AITokenPool.cs | 50 + .../Engine/Wizard/AITokenType.cs | 9 + .../Engine/Wizard/AITurnEndStopCollection.cs | 80 + .../Engine/Wizard/AITurnEndStopInformation.cs | 27 + .../Wizard/AITurnStartStopCollection.cs | 65 + .../Wizard/AITurnStartStopInformation.cs | 13 + .../Engine/Wizard/AIUseMinTagCollection.cs | 80 + .../Wizard/AIVariableResultContainer.cs | 64 + .../Engine/Wizard/AIVirtualActionInfo.cs | 37 + .../Engine/Wizard/AIVirtualAttackInfo.cs | 130 + .../Engine/Wizard/AIVirtualCard.cs | 2653 ++++++++++ ...VirtualCardBuildParameterCollectionBase.cs | 16 + .../Engine/Wizard/AIVirtualCardParameter.cs | 159 + .../AIVirtualCardRealTargetInformation.cs | 16 + .../Engine/Wizard/AIVirtualCemetery.cs | 91 + .../Engine/Wizard/AIVirtualField.cs | 2695 ++++++++++ .../AIVirtualFieldBuildParameterCollction.cs | 171 + .../AIVirtualFieldRollBackBasicProcessor.cs | 39 + .../Wizard/AIVirtualFieldRollBackRecord.cs | 88 + .../AIVirtualFieldRollBackStackProcessor.cs | 40 + .../Wizard/AIVirtualFusionIngredientsInfo.cs | 124 + .../Wizard/AIVirtualTargetSelectAction.cs | 53 + .../Wizard/AIVirtualTargetSelectInfo.cs | 96 + .../Engine/Wizard/AIVirtualTurnEndInfo.cs | 39 + .../Engine/Wizard/AIVirtualTurnStartInfo.cs | 14 + .../Engine/Wizard/AI_LOGIC_LV.cs | 8 + .../Wizard/ActivateCountTagCollection.cs | 249 + .../AddCardToPlayoutPlayPtnTagCollection.cs | 48 + .../Engine/Wizard/AfterAttackTagCollection.cs | 104 + .../Engine/Wizard/AfterClashTagCollection.cs | 77 + .../Wizard/AfterDiscardTagCollection.cs | 96 + .../Wizard/AllyPlayBonusTagCollection.cs | 60 + .../Wizard/AttachedSkillInfoReceiveData.cs | 60 + .../AttachedSkillInfoReceiveDataCollection.cs | 37 + .../Engine/Wizard/AttackBonusTagCollection.cs | 40 + .../Wizard/AttackByLifeTagCollection.cs | 49 + .../Engine/Wizard/AttackTagCollection.cs | 539 ++ .../Wizard/AttackableClassTagCollection.cs | 36 + .../Engine/Wizard/AvatarBattleInfo.cs | 54 + .../Engine/Wizard/BanishBonusTagCollection.cs | 40 + .../Engine/Wizard/BanishTagCollection.cs | 56 + .../Engine/Wizard/BannerDialog.cs | 200 + SVSim.BattleEngine/Engine/Wizard/BaseParam.cs | 7 + .../Engine/Wizard/BaseSeriesData.cs | 14 + SVSim.BattleEngine/Engine/Wizard/BaseTask.cs | 52 + .../Wizard/BattleBonusRateTagCollection.cs | 40 + .../Engine/Wizard/BattleBonusTagCollection.cs | 41 + .../Engine/Wizard/BattleButtonControl.cs | 330 ++ .../Wizard/BattleCardRealTargetInformation.cs | 153 + .../Engine/Wizard/BattleInformation.cs | 45 + .../Engine/Wizard/BattleParameter.cs | 192 + .../Engine/Wizard/BattlePlayerPair.cs | 26 + .../Wizard/BattlePlayerReadOnlyInfoPair.cs | 14 + .../Engine/Wizard/BattleRecoveryInfo.cs | 150 + .../Wizard/BeforeTransformVirtualCard.cs | 45 + .../Engine/Wizard/BossRushBattleData.cs | 83 + .../Engine/Wizard/BossRushInfo.cs | 54 + .../BossRushLobbyAbilityCandidateData.cs | 22 + .../Engine/Wizard/BossRushLobbyAbilityData.cs | 27 + .../Engine/Wizard/BossRushLobbyBossData.cs | 72 + .../Engine/Wizard/BossRushLobbyData.cs | 120 + .../Engine/Wizard/BossRushSpecialSkill.cs | 40 + .../Engine/Wizard/BounceBonusTagCollection.cs | 36 + .../Engine/Wizard/BounceTagCollection.cs | 76 + .../Wizard/BreakBeforePlayTagCollection.cs | 38 + .../Engine/Wizard/BreakBonusTagCollection.cs | 40 + .../Engine/Wizard/BreakFirstTagCollection.cs | 38 + .../Engine/Wizard/BreakLastTagCollection.cs | 38 + .../Engine/Wizard/BreakTagCollection.cs | 81 + .../Engine/Wizard/BuffBonusTagCollection.cs | 40 + .../Engine/Wizard/BuffTriggerTagCollection.cs | 90 + .../Engine/Wizard/BuildDeckCard.cs | 21 + .../Engine/Wizard/BuildDeckSeries.cs | 20 + .../Wizard/CantBeAttackedTagCollection.cs | 75 + .../Engine/Wizard/CardCSVData.cs | 308 ++ .../Engine/Wizard/CardCraftPanel.cs | 119 + .../Engine/Wizard/CardImageHelpder.cs | 117 + .../Engine/Wizard/CardKeyWordCommonCache.cs | 42 + .../Engine/Wizard/CardListTemplate.cs | 543 ++ .../Engine/Wizard/CardListsForReference.cs | 949 ++++ .../Engine/Wizard/CardMaster.cs | 269 + .../Engine/Wizard/CardParameter.cs | 841 ++++ SVSim.BattleEngine/Engine/Wizard/CardPrm.cs | 32 + .../Engine/Wizard/CardSetName.cs | 17 + .../Engine/Wizard/CardSetNameMgr.cs | 105 + .../Engine/Wizard/CenteringUIWidget.cs | 89 + .../Wizard/ChangeInplayTagCollection.cs | 260 + .../Engine/Wizard/ChoiceTagCollection.cs | 154 + .../Engine/Wizard/ClashBonusTagCollection.cs | 35 + .../Engine/Wizard/ClassCharacterMasterData.cs | 132 + .../Engine/Wizard/ClassInfoParts.cs | 210 + SVSim.BattleEngine/Engine/Wizard/ClassSet.cs | 32 + SVSim.BattleEngine/Engine/Wizard/ClassType.cs | 8 + .../Engine/Wizard/CloneActualFlags.cs | 47 + .../Engine/Wizard/CondChoiceTagCollection.cs | 83 + .../Engine/Wizard/ConventionDeckList.cs | 89 + .../Engine/Wizard/CostBonusTagCollection.cs | 40 + SVSim.BattleEngine/Engine/Wizard/Country.cs | 18 + .../Engine/Wizard/DamagedTagCollection.cs | 152 + .../Engine/Wizard/DeckAttributeType.cs | 13 + SVSim.BattleEngine/Engine/Wizard/DeckGroup.cs | 37 + .../Engine/Wizard/DeckGroupListData.cs | 125 + SVSim.BattleEngine/Engine/Wizard/DeckUI.cs | 457 ++ .../Engine/Wizard/DeckVirtualCard.cs | 36 + SVSim.BattleEngine/Engine/Wizard/Degree.cs | 105 + .../Engine/Wizard/DegreeCategory.cs | 20 + SVSim.BattleEngine/Engine/Wizard/DegreeMgr.cs | 74 + .../Wizard/DiscardedBonusTagCollection.cs | 41 + .../Engine/Wizard/DiscardedTagCollection.cs | 123 + .../Engine/Wizard/DrumrollScrollManager.cs | 167 + .../Engine/Wizard/EarthRiteRecordContainer.cs | 14 + .../Engine/Wizard/Effect2dCreateParam.cs | 32 + SVSim.BattleEngine/Engine/Wizard/Emblem.cs | 85 + .../Engine/Wizard/EmblemCategory.cs | 20 + SVSim.BattleEngine/Engine/Wizard/EmblemMgr.cs | 69 + .../Engine/Wizard/EmoteTagCollection.cs | 235 + SVSim.BattleEngine/Engine/Wizard/EmoteUI.cs | 54 + SVSim.BattleEngine/Engine/Wizard/Emotion.cs | 58 + SVSim.BattleEngine/Engine/Wizard/EnemyAI.cs | 1700 +++++++ .../Engine/Wizard/EnemyAIFusion.cs | 34 + .../Engine/Wizard/EnemyAI_Attack.cs | 355 ++ .../Engine/Wizard/EnemyAI_Play.cs | 641 +++ .../Engine/Wizard/EnemyAI_Skill.cs | 552 ++ .../Engine/Wizard/EnemyAI_WeakLogic.cs | 456 ++ .../EnemyBattleBonusRateTagCollection.cs | 42 + .../Wizard/EnemyBattleBonusTagCollection.cs | 40 + .../Wizard/EnemyEvoBonusTagCollection.cs | 44 + .../Wizard/EnemyPlayBonusTagCollection.cs | 44 + .../Wizard/EvalInstantAttackInformation.cs | 43 + .../Engine/Wizard/EventStoryQuestInfo.cs | 38 + .../Engine/Wizard/EvoBonusTagCollection.cs | 40 + .../Engine/Wizard/EvoHandPlusTagCollection.cs | 39 + .../Engine/Wizard/EvoTagCollection.cs | 304 ++ .../Wizard/EvolveToOtherTagCollection.cs | 38 + .../Wizard/EvolvedResidentTagCollection.cs | 107 + .../Wizard/FanfareBonusTagCollection.cs | 44 + .../Engine/Wizard/FanfareTagCollection.cs | 127 + .../Engine/Wizard/FavoriteTask.cs | 49 + .../Engine/Wizard/FilteringImageSelection.cs | 1041 ++++ .../Wizard/FilteringImageSelectionItem.cs | 146 + .../Engine/Wizard/FirstEvoTagCollection.cs | 43 + .../Engine/Wizard/FixedCostTagCollection.cs | 80 + SVSim.BattleEngine/Engine/Wizard/Font.cs | 29 + .../Wizard/ForceBerserkTagCollection.cs | 38 + .../ForceImmediateAttackTagCollection.cs | 35 + SVSim.BattleEngine/Engine/Wizard/Format.cs | 18 + .../Engine/Wizard/FusionBonusTagCollection.cs | 40 + .../Engine/Wizard/FusionDrawTagCollection.cs | 39 + .../Wizard/FusionMetamorphoseTagCollection.cs | 43 + .../Engine/Wizard/FusionTagCollection.cs | 89 + .../Engine/Wizard/GachaLayoutEffect.cs | 95 + .../Wizard/GachaLayoutPurchaseButton.cs | 264 + .../Engine/Wizard/GachaPackAreaLayout.cs | 881 ++++ .../Engine/Wizard/GachaPackPointLayout.cs | 68 + .../Engine/Wizard/GachaPointData.cs | 25 + .../Engine/Wizard/GachaPointExchange.cs | 382 ++ .../Engine/Wizard/GachaPointExchangeDialog.cs | 35 + .../Engine/Wizard/GachaPointExchangeInfo.cs | 42 + .../Engine/Wizard/GachaResultBuyCardPack.cs | 552 ++ .../Wizard/GachaResultBuyCardPackDialog.cs | 103 + .../Engine/Wizard/GachaSelectBuyNumPopup.cs | 109 + .../Engine/Wizard/GenerateDeckCodeTask.cs | 101 + .../Engine/Wizard/GenerateTagCollection.cs | 19 + .../Engine/Wizard/GetOnTagCollection.cs | 39 + .../Wizard/GetOnTriggerTagCollection.cs | 71 + .../Engine/Wizard/GiftTransition.cs | 39 + .../Engine/Wizard/GiveSkillTagCollection.cs | 86 + .../Engine/Wizard/HandBonusTagCollection.cs | 43 + .../Engine/Wizard/HandPlusTagCollection.cs | 40 + .../Engine/Wizard/HealTagCollection.cs | 151 + .../Engine/Wizard/HighRankEffectInfo.cs | 32 + .../Engine/Wizard/IAIEmoteCtrl.cs | 22 + .../Wizard/IAITargetSelectTagCollection.cs | 10 + .../Engine/Wizard/IBattleSimulationAI.cs | 19 + SVSim.BattleEngine/Engine/Wizard/IEnemyAI.cs | 41 + .../IEnemyAIBattleInfoRecieveDataAccessor.cs | 8 + .../Engine/Wizard/IFormatBehavior.cs | 74 + .../Engine/Wizard/IgnoreBreakTagCollection.cs | 38 + .../Wizard/IgnoreFanfareBonusTagCollection.cs | 38 + .../Wizard/IgnoreTargetTagCollection.cs | 56 + SVSim.BattleEngine/Engine/Wizard/Item.cs | 134 + .../Engine/Wizard/LastwordTagCollection.cs | 219 + .../Engine/Wizard/LeaderSkinSeries.cs | 26 + .../Engine/Wizard/LeaveBonusTagCollection.cs | 40 + .../Engine/Wizard/LeaveTagCollection.cs | 133 + .../Engine/Wizard/LifeRecord.cs | 8 + SVSim.BattleEngine/Engine/Wizard/Master.cs | 1943 +++++++ .../MemberBattleBonusRateTagCollection.cs | 42 + .../Wizard/MemberBattleBonusTagCollection.cs | 40 + .../Wizard/MemberEvoBonusTagCollection.cs | 44 + .../Engine/Wizard/ModifyHealTagCollection.cs | 41 + .../Engine/Wizard/MyPageCustomBGMasterData.cs | 59 + .../Engine/Wizard/MyPageHomeDialogData.cs | 63 + .../Engine/Wizard/MyRotationInfo.cs | 227 + .../Engine/Wizard/MyRotationParts.cs | 57 + .../Engine/Wizard/MyRotationRePrintInfo.cs | 24 + .../Engine/Wizard/NetworkDefine.cs | 179 + .../Wizard/NoInstantAttackTagCollection.cs | 37 + .../Engine/Wizard/NoNormalEvoTagCollection.cs | 35 + .../Wizard/NoSkipAttackTagCollection.cs | 36 + ...ableVirtualCardBuildParameterCollection.cs | 15 + .../Engine/Wizard/NotificatonAnimation.cs | 135 + .../Wizard/OneMoreLastwordTagCollection.cs | 64 + .../Engine/Wizard/OtherAttackTagCollection.cs | 238 + .../Wizard/OtherBanishBonusTagCollection.cs | 40 + .../Engine/Wizard/OtherBanishTagCollection.cs | 113 + .../Wizard/OtherBreakBonusTagCollection.cs | 40 + .../Wizard/OtherDamagedTagCollection.cs | 82 + .../Engine/Wizard/OtherEvoTagCollection.cs | 134 + .../Wizard/OtherLeaveBonusTagCollection.cs | 40 + .../Engine/Wizard/OtherLeaveTagCollection.cs | 73 + .../Engine/Wizard/OtherPlayTagCollection.cs | 306 ++ .../Wizard/OtherPlayoutBonusTagCollection.cs | 40 + .../Engine/Wizard/OtherSummonTagCollection.cs | 159 + .../Engine/Wizard/PackBannerData.cs | 8 + .../Engine/Wizard/PackCategory.cs | 13 + .../Engine/Wizard/PackChildGachaInfo.cs | 82 + .../Engine/Wizard/PackConfig.cs | 248 + .../Engine/Wizard/PackInfoTask.cs | 179 + .../Engine/Wizard/ParameterOverwriterBase.cs | 76 + .../Engine/Wizard/PlagueCityTagCollection.cs | 37 + .../Wizard/PlayBonusRateTagCollection.cs | 40 + .../Engine/Wizard/PlayBonusTagCollection.cs | 40 + .../Engine/Wizard/PlayDrawTagCollection.cs | 40 + .../Engine/Wizard/PlayLimitTagCollection.cs | 40 + .../Engine/Wizard/PlayPlusTagCollection.cs | 40 + .../Wizard/PlayPtnBonusTagCollection.cs | 40 + .../Engine/Wizard/PlayPtnWithToken.cs | 19 + .../Engine/Wizard/PlaySimulationType.cs | 11 + .../Engine/Wizard/PlaySkipInformation.cs | 23 + .../Engine/Wizard/PlaySkipTagCollection.cs | 68 + .../Engine/Wizard/PlayTagCollection.cs | 111 + .../Engine/Wizard/PlayedCardInfo.cs | 136 + .../Wizard/PlayoutBonusTagCollection.cs | 141 + .../Wizard/PlayoutNextTurnTagCollection.cs | 19 + .../Engine/Wizard/PlayptnBaseStatsRateInfo.cs | 16 + .../PlayptnBaseStatsRateTagCollection.cs | 51 + .../Wizard/PolicyCollectionWithTypeBase.cs | 14 + .../Engine/Wizard/PracticeAISettingData.cs | 30 + .../Engine/Wizard/PracticeAISettingDataSet.cs | 32 + .../PremiumCardConversionDialogParts.cs | 75 + .../Engine/Wizard/PreprocessTagCollection.cs | 156 + .../Engine/Wizard/PrereleasePurchaseInfo.cs | 74 + .../Engine/Wizard/PriorityTagCollection.cs | 42 + .../Engine/Wizard/PuppetAttackParam.cs | 17 + .../Wizard/PuppetAttackTagCollection.cs | 100 + .../Engine/Wizard/PurchaseConfirm.cs | 579 +++ .../Engine/Wizard/PurchaseRewardInfo.cs | 12 + .../Engine/Wizard/PuzzleBattleMasterData.cs | 103 + .../Engine/Wizard/PuzzleQuestData.cs | 86 + .../Engine/Wizard/PuzzleQuestInfo.cs | 61 + .../Engine/Wizard/PuzzleQuestSelectDialog.cs | 170 + .../Engine/Wizard/PuzzleQuestStatus.cs | 8 + .../Engine/Wizard/QuestAllConfirmDialog.cs | 73 + .../Engine/Wizard/QuestBattleData.cs | 68 + .../Engine/Wizard/QuestBossData.cs | 49 + .../Engine/Wizard/QuestGaugeItem.cs | 24 + .../Engine/Wizard/QuestInfoTask.cs | 70 + SVSim.BattleEngine/Engine/Wizard/QuestItem.cs | 5 + .../Engine/Wizard/QuestItemBase.cs | 26 + .../Engine/Wizard/QuestItemTitle.cs | 32 + .../Engine/Wizard/QuestMissionData.cs | 47 + .../Engine/Wizard/QuestMissionDetail.cs | 37 + .../Wizard/QuestOpenPuzzleDialogTask.cs | 28 + .../Engine/Wizard/QuestOpponentData.cs | 79 + .../Engine/Wizard/QuestPointConfirmDialog.cs | 143 + .../Engine/Wizard/QuestRewardInfo.cs | 35 + .../Engine/Wizard/QuestSelectionButtonBase.cs | 48 + .../Engine/Wizard/QuestSelectionButtonData.cs | 130 + .../Engine/Wizard/QuestSelectionPage.cs | 875 ++++ .../Wizard/RallyCountPlusTagCollection.cs | 38 + SVSim.BattleEngine/Engine/Wizard/Rank.cs | 19 + .../Engine/Wizard/RankMatchAISettingData.cs | 21 + .../Wizard/RankMatchAISettingDataSet.cs | 27 + .../Wizard/ReanimateBonusTagCollection.cs | 40 + .../Wizard/ReanimateEvoTagCollection.cs | 38 + .../Wizard/ReceiveTurnEndToJudgeResult.cs | 22 + ...ableVirtualCardBuildParameterCollection.cs | 41 + .../ReincarnationSimulationTagCollection.cs | 57 + .../Engine/Wizard/RemainTime.cs | 69 + .../Wizard/RemoveByDestroyTagCollection.cs | 38 + .../Engine/Wizard/RemoveSkillTagCollection.cs | 46 + .../Engine/Wizard/ReplaySkipAnimation.cs | 111 + .../Engine/Wizard/ResonanceTagCollection.cs | 66 + .../Engine/Wizard/RewardBase.cs | 525 ++ .../Engine/Wizard/SceneTransition.cs | 439 ++ .../Engine/Wizard/SecretBossInfo.cs | 27 + .../Engine/Wizard/SelectBuyNumPopupBase.cs | 251 + .../Engine/Wizard/SelectSkinCardInfo.cs | 36 + .../Wizard/SelfAndOtherEvoTagCollection.cs | 88 + .../Engine/Wizard/SetAITribeTagCollection.cs | 38 + .../Engine/Wizard/ShopCommonRewardInfo.cs | 12 + .../Wizard/ShopDrumrollScrollManager.cs | 53 + .../Engine/Wizard/ShopExpirtyInfo.cs | 53 + .../Engine/Wizard/SimpleScrollViewUI.cs | 267 + .../SimulationAdditionalActionInfoSet.cs | 24 + .../Engine/Wizard/SimulationResult.cs | 40 + SVSim.BattleEngine/Engine/Wizard/Sleeve.cs | 87 + .../Engine/Wizard/SleeveCategory.cs | 20 + SVSim.BattleEngine/Engine/Wizard/SleeveMgr.cs | 74 + .../Engine/Wizard/SleeveSeries.cs | 20 + .../Engine/Wizard/SpotCardData.cs | 67 + .../Engine/Wizard/StoryAISettingData.cs | 27 + .../Engine/Wizard/StoryAISettingDataSet.cs | 32 + .../Engine/Wizard/SummonTagCollection.cs | 113 + .../Engine/Wizard/SystemText.cs | 163 + .../Engine/Wizard/TagCollection.cs | 136 + .../Engine/Wizard/TagCollectionType.cs | 120 + .../Wizard/TagCollectionWithTypeBase.cs | 59 + .../Engine/Wizard/TargetSelectType.cs | 9 + .../Engine/Wizard/TargetTagCollection.cs | 50 + .../Engine/Wizard/TextLineCreater.cs | 46 + .../Engine/Wizard/TokenPlayPattern.cs | 19 + .../Engine/Wizard/TreasureBoxCpResultInfo.cs | 40 + .../Engine/Wizard/TurnEndTagCollection.cs | 319 ++ .../Engine/Wizard/TurnStartTagCollection.cs | 63 + .../Engine/Wizard/TutorialAreaSelect.cs | 28 + .../Engine/Wizard/TutorialData.cs | 50 + .../Engine/Wizard/TwoPickFormat.cs | 12 + .../Engine/Wizard/TypeFilterDialog.cs | 110 + .../Engine/Wizard/TypeFilterSingle.cs | 62 + SVSim.BattleEngine/Engine/Wizard/UIGauge.cs | 52 + .../Engine/Wizard/UILabelEffectOverwriter.cs | 113 + .../Wizard/UILabelGradientOverwriter.cs | 116 + .../Engine/Wizard/UIParticleEffectGroup.cs | 167 + .../Engine/Wizard/UIShaderSprite.cs | 72 + .../Engine/Wizard/UISpriteAtlasOverwriter.cs | 166 + .../Engine/Wizard/UnlimitedRestrictedCard.cs | 14 + SVSim.BattleEngine/Engine/Wizard/UserGoods.cs | 185 + .../Engine/Wizard/WhenGetOffTagCollection.cs | 85 + .../Wizard/WhenNecromanceTagCollection.cs | 82 + .../Engine/Wizard/WhenPlayTagCollection.cs | 536 ++ .../Engine/Wizard/WizardUIButton.cs | 50 + .../Engine/Wizard/_3dCardFrameManager.cs | 203 + .../Engine/Wizard/eColorCodeId.cs | 102 + .../Engine/WrapContentsScrollBarSize.cs | 30 + SVSim.BattleEngine/Engine/iTween.cs | 4447 +++++++++++++++++ 778 files changed, 165107 insertions(+) create mode 100644 SVSim.BattleEngine/Engine/AchievedInfo.cs create mode 100644 SVSim.BattleEngine/Engine/AddTargetInfo.cs create mode 100644 SVSim.BattleEngine/Engine/ApiType.cs create mode 100644 SVSim.BattleEngine/Engine/ApplySkillTargetFilterCollection.cs create mode 100644 SVSim.BattleEngine/Engine/ArrowControl.cs create mode 100644 SVSim.BattleEngine/Engine/AttachedSkillInformation.cs create mode 100644 SVSim.BattleEngine/Engine/AttachingAbilityInfo.cs create mode 100644 SVSim.BattleEngine/Engine/BMFont.cs create mode 100644 SVSim.BattleEngine/Engine/BMGlyph.cs create mode 100644 SVSim.BattleEngine/Engine/BMSymbol.cs create mode 100644 SVSim.BattleEngine/Engine/BackGroundBase.cs create mode 100644 SVSim.BattleEngine/Engine/BattleCamera.cs create mode 100644 SVSim.BattleEngine/Engine/BattleControl.cs create mode 100644 SVSim.BattleEngine/Engine/BattleEnemy.cs create mode 100644 SVSim.BattleEngine/Engine/BattleFinishParam.cs create mode 100644 SVSim.BattleEngine/Engine/BattleLifeTimeSharedObject.cs create mode 100644 SVSim.BattleEngine/Engine/BattleMenuMgr.cs create mode 100644 SVSim.BattleEngine/Engine/BattlePlayer.cs create mode 100644 SVSim.BattleEngine/Engine/BattleResultUIController.cs create mode 100644 SVSim.BattleEngine/Engine/BattleStartControl.cs create mode 100644 SVSim.BattleEngine/Engine/BattleUIContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Bgm.cs create mode 100644 SVSim.BattleEngine/Engine/BuffCountInfo.cs create mode 100644 SVSim.BattleEngine/Engine/BuffDetailInfoUI.cs create mode 100644 SVSim.BattleEngine/Engine/BuffInfo.cs create mode 100644 SVSim.BattleEngine/Engine/CantPlayCardFilterInfo.cs create mode 100644 SVSim.BattleEngine/Engine/CardBasePrm.cs create mode 100644 SVSim.BattleEngine/Engine/CardDataModel.cs create mode 100644 SVSim.BattleEngine/Engine/CardDetailBase.cs create mode 100644 SVSim.BattleEngine/Engine/CardDetailFilterCategory.cs create mode 100644 SVSim.BattleEngine/Engine/CardDetailFilterDialog.cs create mode 100644 SVSim.BattleEngine/Engine/CardDetailFilterKeyWord.cs create mode 100644 SVSim.BattleEngine/Engine/CardDetailFilterOffButton.cs create mode 100644 SVSim.BattleEngine/Engine/CardDetailUI.cs create mode 100644 SVSim.BattleEngine/Engine/CardFilterKeyWordMaster.cs create mode 100644 SVSim.BattleEngine/Engine/CardKeyWordCache.cs create mode 100644 SVSim.BattleEngine/Engine/CardPack.cs create mode 100644 SVSim.BattleEngine/Engine/CardPackManager.cs create mode 100644 SVSim.BattleEngine/Engine/CardTemplate.cs create mode 100644 SVSim.BattleEngine/Engine/CausedDamageCardParameterModifier.cs create mode 100644 SVSim.BattleEngine/Engine/ClassCharaPrm.cs create mode 100644 SVSim.BattleEngine/Engine/ClassInformationUIController.cs create mode 100644 SVSim.BattleEngine/Engine/ConditionSkillFilterCollection.cs create mode 100644 SVSim.BattleEngine/Engine/ConventionInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/AssetErrorState.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/AssetHandle.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/AssetRequestContext.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/Certification.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/INetworkUI.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/NetworkManager.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/NetworkTask.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/PostParams.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/ResourcesManager.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/SkipCuteCheckResultCodes.cs create mode 100644 SVSim.BattleEngine/Engine/Cute/Utility.cs create mode 100644 SVSim.BattleEngine/Engine/DamageCardParameterModifier.cs create mode 100644 SVSim.BattleEngine/Engine/DamageClippingInfo.cs create mode 100644 SVSim.BattleEngine/Engine/DamageCutInfo.cs create mode 100644 SVSim.BattleEngine/Engine/DamageInfo.cs create mode 100644 SVSim.BattleEngine/Engine/DamageModifier.cs create mode 100644 SVSim.BattleEngine/Engine/DataMgr.cs create mode 100644 SVSim.BattleEngine/Engine/DeckData.cs create mode 100644 SVSim.BattleEngine/Engine/DetailMgr.cs create mode 100644 SVSim.BattleEngine/Engine/DetailPanelControl.cs create mode 100644 SVSim.BattleEngine/Engine/DialogBase.cs create mode 100644 SVSim.BattleEngine/Engine/DisconnectToDispChecker.cs create mode 100644 SVSim.BattleEngine/Engine/DisconnectToLoseChecker.cs create mode 100644 SVSim.BattleEngine/Engine/EffectBattle.cs create mode 100644 SVSim.BattleEngine/Engine/EffectIdx.cs create mode 100644 SVSim.BattleEngine/Engine/EventDelegate.cs create mode 100644 SVSim.BattleEngine/Engine/ExecutionInfoCreatorBase.cs create mode 100644 SVSim.BattleEngine/Engine/FilterController.cs create mode 100644 SVSim.BattleEngine/Engine/FinishTaskBase.cs create mode 100644 SVSim.BattleEngine/Engine/FlexibleGrid.cs create mode 100644 SVSim.BattleEngine/Engine/FusionIngredientInfo.cs create mode 100644 SVSim.BattleEngine/Engine/GachaUI.cs create mode 100644 SVSim.BattleEngine/Engine/Global.cs create mode 100644 SVSim.BattleEngine/Engine/GuardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/HandControl.cs create mode 100644 SVSim.BattleEngine/Engine/HandTRSCalculatorBase.cs create mode 100644 SVSim.BattleEngine/Engine/HeaderData.cs create mode 100644 SVSim.BattleEngine/Engine/HealCardParameterModifier.cs create mode 100644 SVSim.BattleEngine/Engine/HealModifier.cs create mode 100644 SVSim.BattleEngine/Engine/IBattlePlayerReadOnlyInfo.cs create mode 100644 SVSim.BattleEngine/Engine/IBattlePlayerSkill.cs create mode 100644 SVSim.BattleEngine/Engine/IBattlePlayerVfxCreator.cs create mode 100644 SVSim.BattleEngine/Engine/IBattleResultReporter.cs create mode 100644 SVSim.BattleEngine/Engine/ICardChantCountModifier.cs create mode 100644 SVSim.BattleEngine/Engine/ICardCostModifier.cs create mode 100644 SVSim.BattleEngine/Engine/ICardEpModifier.cs create mode 100644 SVSim.BattleEngine/Engine/ICardLifeModifier.cs create mode 100644 SVSim.BattleEngine/Engine/ICardOffenseModifier.cs create mode 100644 SVSim.BattleEngine/Engine/ICardSkyboundArtCountModifier.cs create mode 100644 SVSim.BattleEngine/Engine/ICardSuperSkyboundArtCountModifier.cs create mode 100644 SVSim.BattleEngine/Engine/ICardUnionBurstCountModifier.cs create mode 100644 SVSim.BattleEngine/Engine/IDetailPanelControl.cs create mode 100644 SVSim.BattleEngine/Engine/INextSceneSelector.cs create mode 100644 SVSim.BattleEngine/Engine/IPpModifier.cs create mode 100644 SVSim.BattleEngine/Engine/IResultAnimationHandler.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillApplyInformation.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillBattlePlayerFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillCalcFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillCardCountExtensionsFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillCardFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillConditionChecker.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillCustomSelectFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillEnvironmentalFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillExclutionFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillOrFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillParameterSelectFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillSelectFilter.cs create mode 100644 SVSim.BattleEngine/Engine/ISkillTargetFilter.cs create mode 100644 SVSim.BattleEngine/Engine/IStatusPanelControl.cs create mode 100644 SVSim.BattleEngine/Engine/ITurnEndButtonUI.cs create mode 100644 SVSim.BattleEngine/Engine/ITurnPanelControl.cs create mode 100644 SVSim.BattleEngine/Engine/InPlayCardReflection.cs create mode 100644 SVSim.BattleEngine/Engine/InputDialog.cs create mode 100644 SVSim.BattleEngine/Engine/InputMgr.cs create mode 100644 SVSim.BattleEngine/Engine/JudgeResultFailedToRetryChecker.cs create mode 100644 SVSim.BattleEngine/Engine/MasterLocalizeSetting.cs create mode 100644 SVSim.BattleEngine/Engine/Matching.cs create mode 100644 SVSim.BattleEngine/Engine/MatchingBase.cs create mode 100644 SVSim.BattleEngine/Engine/MatchingIntervalActionBase.cs create mode 100644 SVSim.BattleEngine/Engine/MatchingNetworkConnectChecker.cs create mode 100644 SVSim.BattleEngine/Engine/MatchingRetryDomatching.cs create mode 100644 SVSim.BattleEngine/Engine/MatchingRetryLoaded.cs create mode 100644 SVSim.BattleEngine/Engine/MatchingTimeChecker.cs create mode 100644 SVSim.BattleEngine/Engine/NGUIText.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleData.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleDefine.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleIntervalCheckerBase.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleManagerBase.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleReceiver.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleSender.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleSetupBurialRitePlay.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleSetupCardEvent.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkBattleSetupValidateEvent.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkConsistency.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkExecutionInfoCreator.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkOperationCollectionBase.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkReplayBattleMgr.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkTouchControl.cs create mode 100644 SVSim.BattleEngine/Engine/NetworkWatchBattleMgr.cs create mode 100644 SVSim.BattleEngine/Engine/NewReplayBattleMgr.cs create mode 100644 SVSim.BattleEngine/Engine/NguiObjs.cs create mode 100644 SVSim.BattleEngine/Engine/NotBeAttackedInfo.cs create mode 100644 SVSim.BattleEngine/Engine/NotConsumeEpModifierInfo.cs create mode 100644 SVSim.BattleEngine/Engine/NotMulliganEndToJudgeChecker.cs create mode 100644 SVSim.BattleEngine/Engine/NotTurnEndToLoseChecker.cs create mode 100644 SVSim.BattleEngine/Engine/NotTurnStartToLoseChecker.cs create mode 100644 SVSim.BattleEngine/Engine/OperateMgr.cs create mode 100644 SVSim.BattleEngine/Engine/OperateReceive.cs create mode 100644 SVSim.BattleEngine/Engine/OperateReceiveChecker.cs create mode 100644 SVSim.BattleEngine/Engine/OpponentNotTurnEndToWinChecker.cs create mode 100644 SVSim.BattleEngine/Engine/OpponentNotTurnStartToWinChecker.cs create mode 100644 SVSim.BattleEngine/Engine/OpponentRecoveryToDispChecker.cs create mode 100644 SVSim.BattleEngine/Engine/PackOpenDetail.cs create mode 100644 SVSim.BattleEngine/Engine/PanelMgr.cs create mode 100644 SVSim.BattleEngine/Engine/PlayHandCardReflection.cs create mode 100644 SVSim.BattleEngine/Engine/PpAddModifier.cs create mode 100644 SVSim.BattleEngine/Engine/Prediction.cs create mode 100644 SVSim.BattleEngine/Engine/QuestFinishDetail.cs create mode 100644 SVSim.BattleEngine/Engine/QuestSpecialBattleResult.cs create mode 100644 SVSim.BattleEngine/Engine/RankInfo.cs create mode 100644 SVSim.BattleEngine/Engine/RankMatchBattleResult.cs create mode 100644 SVSim.BattleEngine/Engine/ReceiveIntervalTrigger.cs create mode 100644 SVSim.BattleEngine/Engine/ReceivePlayActionsReflectionBase.cs create mode 100644 SVSim.BattleEngine/Engine/ReceivedReward.cs create mode 100644 SVSim.BattleEngine/Engine/RecoveryToDispChecker.cs create mode 100644 SVSim.BattleEngine/Engine/ReflectionInfo.cs create mode 100644 SVSim.BattleEngine/Engine/RegisterActionBase.cs create mode 100644 SVSim.BattleEngine/Engine/RegisterActionManager.cs create mode 100644 SVSim.BattleEngine/Engine/RegisterChoiceAdd.cs create mode 100644 SVSim.BattleEngine/Engine/RegisterLotCardBase.cs create mode 100644 SVSim.BattleEngine/Engine/RegisterTargetBase.cs create mode 100644 SVSim.BattleEngine/Engine/RegisterToken.cs create mode 100644 SVSim.BattleEngine/Engine/RegisterUnapproved.cs create mode 100644 SVSim.BattleEngine/Engine/RepeatSkillInfo.cs create mode 100644 SVSim.BattleEngine/Engine/RepeatTimer.cs create mode 100644 SVSim.BattleEngine/Engine/ReplaceReceivedCard.cs create mode 100644 SVSim.BattleEngine/Engine/ReplayDetailInfo.cs create mode 100644 SVSim.BattleEngine/Engine/ReplayMoveTurnButton.cs create mode 100644 SVSim.BattleEngine/Engine/ResourceHandler.cs create mode 100644 SVSim.BattleEngine/Engine/ResultAnimationAgent.cs create mode 100644 SVSim.BattleEngine/Engine/RewardObjectInfo.cs create mode 100644 SVSim.BattleEngine/Engine/RushInfo.cs create mode 100644 SVSim.BattleEngine/Engine/SBattleLoad.cs create mode 100644 SVSim.BattleEngine/Engine/Se.cs create mode 100644 SVSim.BattleEngine/Engine/SendCardDataMaker.cs create mode 100644 SVSim.BattleEngine/Engine/SendIntervalTrigger.cs create mode 100644 SVSim.BattleEngine/Engine/SendKeyActionDataManager.cs create mode 100644 SVSim.BattleEngine/Engine/SetShaderGlobalColorBG.cs create mode 100644 SVSim.BattleEngine/Engine/ShieldInfo.cs create mode 100644 SVSim.BattleEngine/Engine/SideLogControl.cs create mode 100644 SVSim.BattleEngine/Engine/SkillAnyConditionFilter.cs create mode 100644 SVSim.BattleEngine/Engine/SkillApplyInformation.cs create mode 100644 SVSim.BattleEngine/Engine/SkillBase.cs create mode 100644 SVSim.BattleEngine/Engine/SkillBaseCopy.cs create mode 100644 SVSim.BattleEngine/Engine/SkillBaseSummon.cs create mode 100644 SVSim.BattleEngine/Engine/SkillCardCountFilter.cs create mode 100644 SVSim.BattleEngine/Engine/SkillCardLimitUpperCountFilter.cs create mode 100644 SVSim.BattleEngine/Engine/SkillCollectionBase.cs create mode 100644 SVSim.BattleEngine/Engine/SkillConditionCheckerOption.cs create mode 100644 SVSim.BattleEngine/Engine/SkillFilterCollectionBase.cs create mode 100644 SVSim.BattleEngine/Engine/SkillFilterCreator.cs create mode 100644 SVSim.BattleEngine/Engine/SkillFilterVariable.cs create mode 100644 SVSim.BattleEngine/Engine/SkillOptionValue.cs create mode 100644 SVSim.BattleEngine/Engine/SkillOrFilter.cs create mode 100644 SVSim.BattleEngine/Engine/SkillParameter.cs create mode 100644 SVSim.BattleEngine/Engine/SkillPreprocessBase.cs create mode 100644 SVSim.BattleEngine/Engine/SkillProcessor.cs create mode 100644 SVSim.BattleEngine/Engine/SkillTimingInfo.cs create mode 100644 SVSim.BattleEngine/Engine/SkillVariableComareFilter.cs create mode 100644 SVSim.BattleEngine/Engine/Skill_attach_skill.cs create mode 100644 SVSim.BattleEngine/Engine/Skill_attack_count.cs create mode 100644 SVSim.BattleEngine/Engine/Skill_cant_summon.cs create mode 100644 SVSim.BattleEngine/Engine/Skill_fusion_metamorphose.cs create mode 100644 SVSim.BattleEngine/Engine/Skill_metamorphose.cs create mode 100644 SVSim.BattleEngine/Engine/Skill_powerup.cs create mode 100644 SVSim.BattleEngine/Engine/Skill_pp_fixeduse.cs create mode 100644 SVSim.BattleEngine/Engine/Skill_transform.cs create mode 100644 SVSim.BattleEngine/Engine/SlideObjectReceiveControl.cs create mode 100644 SVSim.BattleEngine/Engine/SoundMgr.cs create mode 100644 SVSim.BattleEngine/Engine/SpringPanel.cs create mode 100644 SVSim.BattleEngine/Engine/StockReceiveMgr.cs create mode 100644 SVSim.BattleEngine/Engine/StockSequenceMgr.cs create mode 100644 SVSim.BattleEngine/Engine/Timer.cs create mode 100644 SVSim.BattleEngine/Engine/TimerMgr.cs create mode 100644 SVSim.BattleEngine/Engine/TokenDrawModifier.cs create mode 100644 SVSim.BattleEngine/Engine/TopBar.cs create mode 100644 SVSim.BattleEngine/Engine/TouchControl.cs create mode 100644 SVSim.BattleEngine/Engine/TurnAndIntValue.cs create mode 100644 SVSim.BattleEngine/Engine/TurnEndButtonUI.cs create mode 100644 SVSim.BattleEngine/Engine/TurnEndTimeController.cs create mode 100644 SVSim.BattleEngine/Engine/TurnPlayerInfo.cs create mode 100644 SVSim.BattleEngine/Engine/TweenAlpha.cs create mode 100644 SVSim.BattleEngine/Engine/TweenPosition.cs create mode 100644 SVSim.BattleEngine/Engine/TweenScale.cs create mode 100644 SVSim.BattleEngine/Engine/UI2DSprite.cs create mode 100644 SVSim.BattleEngine/Engine/UIAnchor.cs create mode 100644 SVSim.BattleEngine/Engine/UIAtlas.cs create mode 100644 SVSim.BattleEngine/Engine/UIBase.cs create mode 100644 SVSim.BattleEngine/Engine/UIBase_CardManager.cs create mode 100644 SVSim.BattleEngine/Engine/UIBasicSprite.cs create mode 100644 SVSim.BattleEngine/Engine/UIButton.cs create mode 100644 SVSim.BattleEngine/Engine/UIButtonColor.cs create mode 100644 SVSim.BattleEngine/Engine/UICamera.cs create mode 100644 SVSim.BattleEngine/Engine/UICenterOnChild.cs create mode 100644 SVSim.BattleEngine/Engine/UIDragScrollView.cs create mode 100644 SVSim.BattleEngine/Engine/UIDrawCall.cs create mode 100644 SVSim.BattleEngine/Engine/UIEventListener.cs create mode 100644 SVSim.BattleEngine/Engine/UIFont.cs create mode 100644 SVSim.BattleEngine/Engine/UIGeometry.cs create mode 100644 SVSim.BattleEngine/Engine/UIGrid.cs create mode 100644 SVSim.BattleEngine/Engine/UIInput.cs create mode 100644 SVSim.BattleEngine/Engine/UIInputOnGUI.cs create mode 100644 SVSim.BattleEngine/Engine/UIInputWizard.cs create mode 100644 SVSim.BattleEngine/Engine/UILabel.cs create mode 100644 SVSim.BattleEngine/Engine/UIPanel.cs create mode 100644 SVSim.BattleEngine/Engine/UIProgressBar.cs create mode 100644 SVSim.BattleEngine/Engine/UIRect.cs create mode 100644 SVSim.BattleEngine/Engine/UIRoot.cs create mode 100644 SVSim.BattleEngine/Engine/UIScrollBar.cs create mode 100644 SVSim.BattleEngine/Engine/UIScrollBarWrapContent.cs create mode 100644 SVSim.BattleEngine/Engine/UIScrollView.cs create mode 100644 SVSim.BattleEngine/Engine/UISlider.cs create mode 100644 SVSim.BattleEngine/Engine/UISprite.cs create mode 100644 SVSim.BattleEngine/Engine/UISpriteData.cs create mode 100644 SVSim.BattleEngine/Engine/UITable.cs create mode 100644 SVSim.BattleEngine/Engine/UITexture.cs create mode 100644 SVSim.BattleEngine/Engine/UIToggle.cs create mode 100644 SVSim.BattleEngine/Engine/UITweener.cs create mode 100644 SVSim.BattleEngine/Engine/UIWidget.cs create mode 100644 SVSim.BattleEngine/Engine/UIWidgetContainer.cs create mode 100644 SVSim.BattleEngine/Engine/UIWrapContent.cs create mode 100644 SVSim.BattleEngine/Engine/UnityEventAgent.cs create mode 100644 SVSim.BattleEngine/Engine/UserAchievement.cs create mode 100644 SVSim.BattleEngine/Engine/UserMission.cs create mode 100644 SVSim.BattleEngine/Engine/ValueWithOperator.cs create mode 100644 SVSim.BattleEngine/Engine/VariableSkillFilterCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Voice.cs create mode 100644 SVSim.BattleEngine/Engine/VoiceAndWaitTime.cs create mode 100644 SVSim.BattleEngine/Engine/VoiceDictionary.cs create mode 100644 SVSim.BattleEngine/Engine/WatcherDisconnectChecker.cs create mode 100644 SVSim.BattleEngine/Engine/WatcherLeaveChecker.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Card.InnerOptions/CardInnerOptionsBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Mulligan/IMulliganMgr.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Mulligan/MulliganCtrl.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Mulligan/MulliganInfoControl.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Mulligan/MulliganViewBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Mulligan/OpponentMulliganCtrl.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Mulligan/PlayerMulliganCtrl.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Mulligan/PlayerMulliganView.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Operation/IOperationCommand.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Operation/SimulationSelection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Phase/IPhase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Phase/IPhaseCreator.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Phase/IResultPhase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Player.ClassCharacter/IClassCharacter.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Player.Emotion/EmotionBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Player.Emotion/IEmotion.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Player.Emotion/IPlayerEmotion.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Player.Emotion/PlayerEmotion.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/BattleConditionEnemyInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/BattleConditionInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/BattleConditionPlayerInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/CardInfoBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/CemeteryCardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/DeckCardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/HandCardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/IRecoveryManager.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/IRecoveryRecordManager.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/InPlayCardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/RecoveryController.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/RecoveryDataHandler.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/RecoveryOperationInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/ResultConditionInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Recovery/SetupConditionInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle.Resource/IBattleResourceMgr.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle/IBattleCardUniqueID.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle/IInnerOptionsBuilder.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Battle/IReadOnlyBattleCardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.BattleMgr/IBattleMgrContentsCreator.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.DeckCardEdit/CachingCardBundle.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.DeckCardEdit/CardBundle.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.DeckCardEdit/CardBundleController.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.DeckCardEdit/CardBundleControllerBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.DeckCardEdit/CardCreator.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.DeckCardEdit/CardObject.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.DeckCardEdit/FilteringCardBundle.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Lottery/LotteryApplyData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.QuestSpecialResult/QuestAssetManager.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIAccelerateInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIActivateCountTagArgument.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIActivateCounter.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIAfterDamageStopCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIAfterDamageStopInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIAttachOperateMgrBattleEventCache.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIAttachPlayerBattleEventCache.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIAttachedTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIAttachedTagInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIAttackPreCheckInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBarrierInfoBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBarrierInfoCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBarrierPseudoSimulationInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBarrierStopTiming.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBarrierType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBattleInfoReceivedData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBuffExecutingInfo_old.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBuffRecorderCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIBuffWithTargetsInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AICannotAttackInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AICannotPlayInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AICardData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AICardDataAsset.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AICardDataAssetSet.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AICategory.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIChoiceTransformCostInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIConditionExpressions.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AICrystalizeInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AICsvLoadingInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDamageModifierCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDamageModifierInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDamageType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDataLibrary.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDeckAcccessor.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDeckData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDeckFileNameList.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDiscardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIDummyDeckContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIEmoteCmd.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIEmoteCmdType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIEmoteCtrl.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIEmoteDataAsset.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIEmoteFileNameList.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIEmoteMng.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIEmoteQuery.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIEmoteSet.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIFunctionResultContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIFusionSituationInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIGenerateTagOwnerTable.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIHandPlayEstimator.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIHealRecorderCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AILeaveStopCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AILeaveStopInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AILethalPlan.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIOperationProcessor.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIOperationSimulatorAccessor.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIOperationType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIOwnSkillProcessRecord.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIParamQuery.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPlayOutAction.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPlayTag.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPlayTagAsset.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPlayTagType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPlayedCardContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPlayptnRecorder.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPolicyCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPolicyCollectionContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPolicyData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPolicyDataAsset.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPolicyType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIPolishConvertedExpression.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIRealActionInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIRemovalType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIRemovedTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIRemovedTagInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIScriptArgumentExpressions.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIScriptCalculationToken.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIScriptTokenArgType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIScriptTokenBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIScriptTokenFuncType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIScriptTokenType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIScriptTokenVariableType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISelectedTargetInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISelectedTargetInfoSet.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISetUpData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISimulationBuffInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISimulationBuffInfoCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISimulationPreprocessRecorder.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISinglePlayptnRecord.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISinglePreprocessRecord.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISituationInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISituationTriggerInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISkillProcessInfoCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISkillProcessInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIStyleData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIStyleFileNameList.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIStyleKey.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIStyleQuery.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AISummonedCardContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITagCollectionContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITagPreprocessCollectionBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITagPreprocessCollectionContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITagPreprocessCreationOptionBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITagPreprocessInfoType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITagPreprocessInformationBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITokenIdCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITokenInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITokenManager.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITokenPool.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITokenType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITurnEndStopCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITurnEndStopInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITurnStartStopCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AITurnStartStopInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIUseMinTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVariableResultContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualActionInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualAttackInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualCard.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualCardBuildParameterCollectionBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualCardParameter.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualCardRealTargetInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualCemetery.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualField.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualFieldBuildParameterCollction.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualFieldRollBackBasicProcessor.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualFieldRollBackRecord.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualFieldRollBackStackProcessor.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualFusionIngredientsInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualTargetSelectAction.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualTargetSelectInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualTurnEndInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AIVirtualTurnStartInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AI_LOGIC_LV.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ActivateCountTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AddCardToPlayoutPlayPtnTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AfterAttackTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AfterClashTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AfterDiscardTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AllyPlayBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AttachedSkillInfoReceiveData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AttachedSkillInfoReceiveDataCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AttackBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AttackByLifeTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AttackTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AttackableClassTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/AvatarBattleInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BanishBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BanishTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BannerDialog.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BaseParam.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BaseSeriesData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BaseTask.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattleBonusRateTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattleBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattleButtonControl.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattleCardRealTargetInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattleInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattleParameter.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattlePlayerPair.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattlePlayerReadOnlyInfoPair.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BattleRecoveryInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BeforeTransformVirtualCard.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BossRushBattleData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BossRushInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BossRushLobbyAbilityCandidateData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BossRushLobbyAbilityData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BossRushLobbyBossData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BossRushLobbyData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BossRushSpecialSkill.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BounceBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BounceTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BreakBeforePlayTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BreakBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BreakFirstTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BreakLastTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BreakTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BuffBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BuffTriggerTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BuildDeckCard.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/BuildDeckSeries.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CantBeAttackedTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardCSVData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardCraftPanel.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardImageHelpder.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardKeyWordCommonCache.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardListTemplate.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardListsForReference.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardMaster.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardParameter.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardPrm.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardSetName.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CardSetNameMgr.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CenteringUIWidget.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ChangeInplayTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ChoiceTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ClashBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ClassCharacterMasterData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ClassInfoParts.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ClassSet.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ClassType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CloneActualFlags.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CondChoiceTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ConventionDeckList.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/CostBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Country.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DamagedTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DeckAttributeType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DeckGroup.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DeckGroupListData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DeckUI.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DeckVirtualCard.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Degree.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DegreeCategory.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DegreeMgr.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DiscardedBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DiscardedTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/DrumrollScrollManager.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EarthRiteRecordContainer.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Effect2dCreateParam.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Emblem.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EmblemCategory.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EmblemMgr.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EmoteTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EmoteUI.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Emotion.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyAI.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyAIFusion.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyAI_Attack.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyAI_Play.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyAI_Skill.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyAI_WeakLogic.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyBattleBonusRateTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyBattleBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyEvoBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EnemyPlayBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EvalInstantAttackInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EventStoryQuestInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EvoBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EvoHandPlusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EvoTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EvolveToOtherTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/EvolvedResidentTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FanfareBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FanfareTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FavoriteTask.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FilteringImageSelection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FilteringImageSelectionItem.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FirstEvoTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FixedCostTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Font.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ForceBerserkTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ForceImmediateAttackTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Format.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FusionBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FusionDrawTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FusionMetamorphoseTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/FusionTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaLayoutEffect.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaLayoutPurchaseButton.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaPackAreaLayout.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaPackPointLayout.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaPointData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaPointExchange.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaPointExchangeDialog.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaPointExchangeInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaResultBuyCardPack.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaResultBuyCardPackDialog.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GachaSelectBuyNumPopup.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GenerateDeckCodeTask.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GenerateTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GetOnTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GetOnTriggerTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GiftTransition.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/GiveSkillTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/HandBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/HandPlusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/HealTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/HighRankEffectInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IAIEmoteCtrl.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IAITargetSelectTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IBattleSimulationAI.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IEnemyAI.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IEnemyAIBattleInfoRecieveDataAccessor.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IFormatBehavior.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IgnoreBreakTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IgnoreFanfareBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/IgnoreTargetTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Item.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/LastwordTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/LeaderSkinSeries.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/LeaveBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/LeaveTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/LifeRecord.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Master.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/MemberBattleBonusRateTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/MemberBattleBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/MemberEvoBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ModifyHealTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/MyPageCustomBGMasterData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/MyPageHomeDialogData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/MyRotationInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/MyRotationParts.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/MyRotationRePrintInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/NetworkDefine.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/NoInstantAttackTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/NoNormalEvoTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/NoSkipAttackTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/NonReferableVirtualCardBuildParameterCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/NotificatonAnimation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OneMoreLastwordTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherAttackTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherBanishBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherBanishTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherBreakBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherDamagedTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherEvoTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherLeaveBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherLeaveTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherPlayTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherPlayoutBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/OtherSummonTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PackBannerData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PackCategory.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PackChildGachaInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PackConfig.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PackInfoTask.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ParameterOverwriterBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlagueCityTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayBonusRateTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayDrawTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayLimitTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayPlusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayPtnBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayPtnWithToken.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlaySimulationType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlaySkipInformation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlaySkipTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayedCardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayoutBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayoutNextTurnTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayptnBaseStatsRateInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PlayptnBaseStatsRateTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PolicyCollectionWithTypeBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PracticeAISettingData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PracticeAISettingDataSet.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PremiumCardConversionDialogParts.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PreprocessTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PrereleasePurchaseInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PriorityTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PuppetAttackParam.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PuppetAttackTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PurchaseConfirm.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PurchaseRewardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PuzzleBattleMasterData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PuzzleQuestData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PuzzleQuestInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PuzzleQuestSelectDialog.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/PuzzleQuestStatus.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestAllConfirmDialog.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestBattleData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestBossData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestGaugeItem.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestInfoTask.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestItem.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestItemBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestItemTitle.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestMissionData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestMissionDetail.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestOpenPuzzleDialogTask.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestOpponentData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestPointConfirmDialog.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestRewardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestSelectionButtonBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestSelectionButtonData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/QuestSelectionPage.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/RallyCountPlusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Rank.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/RankMatchAISettingData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/RankMatchAISettingDataSet.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ReanimateBonusTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ReanimateEvoTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ReceiveTurnEndToJudgeResult.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ReferableVirtualCardBuildParameterCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ReincarnationSimulationTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/RemainTime.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/RemoveByDestroyTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/RemoveSkillTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ReplaySkipAnimation.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ResonanceTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/RewardBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SceneTransition.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SecretBossInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SelectBuyNumPopupBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SelectSkinCardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SelfAndOtherEvoTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SetAITribeTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ShopCommonRewardInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ShopDrumrollScrollManager.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/ShopExpirtyInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SimpleScrollViewUI.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SimulationAdditionalActionInfoSet.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SimulationResult.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/Sleeve.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SleeveCategory.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SleeveMgr.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SleeveSeries.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SpotCardData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/StoryAISettingData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/StoryAISettingDataSet.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SummonTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/SystemText.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TagCollectionType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TagCollectionWithTypeBase.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TargetSelectType.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TargetTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TextLineCreater.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TokenPlayPattern.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TreasureBoxCpResultInfo.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TurnEndTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TurnStartTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TutorialAreaSelect.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TutorialData.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TwoPickFormat.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TypeFilterDialog.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/TypeFilterSingle.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/UIGauge.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/UILabelEffectOverwriter.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/UILabelGradientOverwriter.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/UIParticleEffectGroup.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/UIShaderSprite.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/UISpriteAtlasOverwriter.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/UnlimitedRestrictedCard.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/UserGoods.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/WhenGetOffTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/WhenNecromanceTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/WhenPlayTagCollection.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/WizardUIButton.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/_3dCardFrameManager.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard/eColorCodeId.cs create mode 100644 SVSim.BattleEngine/Engine/WrapContentsScrollBarSize.cs create mode 100644 SVSim.BattleEngine/Engine/iTween.cs diff --git a/SVSim.BattleEngine/COPIED.manifest.tsv b/SVSim.BattleEngine/COPIED.manifest.tsv index a9bf525..2e4ba63 100644 --- a/SVSim.BattleEngine/COPIED.manifest.tsv +++ b/SVSim.BattleEngine/COPIED.manifest.tsv @@ -1,6 +1,783 @@ # engine-relpath source-relpath sha256 patched(0|1) +AchievedInfo.cs AchievedInfo.cs ea4a48fc79056999864843575ad2158855147d67f610cf0da6bce7ac2fc8ec3a 0 +AddTargetInfo.cs AddTargetInfo.cs 622c5cdc7421909489a00b7017670cadce81b74d0860dedbc662ab4faf6fd82a 0 +ApiType.cs ApiType.cs 36dd6f7ae87a7caa985eebb0de02f709f7276c48068b1db2f28dcfd1fdc826be 0 +ApplySkillTargetFilterCollection.cs ApplySkillTargetFilterCollection.cs 286c92d6dee5ffb49b9d62e5064bdd303fa5dc523e7e29b3ef8ec03f2e185b8b 0 +ArrowControl.cs ArrowControl.cs 884ed3b803390467ba85ed67ae9edb7c6ce13e9fb46dc4221f87f086bad6ef0d 0 +AttachedSkillInformation.cs AttachedSkillInformation.cs 4596525861f9328a006ae767cb5687d37742ca4296f04446a715859705117435 0 +AttachingAbilityInfo.cs AttachingAbilityInfo.cs dc7a858f5db686f046ffb9b7d004c3d513d2f6bd87e62737db7af3dc97429ce5 0 +BMFont.cs BMFont.cs 1228c62e3a837d18284ce8047861a1f90cc7702df5b008fb4ce0b812f299b69a 0 +BMGlyph.cs BMGlyph.cs 24ed29cc0a20d8b9bc91f2cd5607efd7f992b7f64d2dd885e58b5bf21ff5cb46 0 +BMSymbol.cs BMSymbol.cs 0252903edf4666d2456e20c524783bf1647ce6ef559ac631ac287abc1ef4178d 0 +BackGroundBase.cs BackGroundBase.cs b45dfcd6593e604dfc630dbd09ed09003fbc03ce5d5ca3d9c10f021331647f7f 0 +BattleCamera.cs BattleCamera.cs 35cd1b3cfb6d5c9932a5b9777983b01fede0c8638a4ade7637a18318048ff2d7 0 BattleCardBase.cs BattleCardBase.cs b105aec032149ab0a1730c6e06e25530699851707150ad4b72e24fe6d17fd50f 0 +BattleControl.cs BattleControl.cs 1638d42a0eb5e0291da90b24a62db923c6ed66eca5a114010f39ba265b2e7bb2 0 +BattleEnemy.cs BattleEnemy.cs e2c1e600cfa860ec5472508d52313db65b1bf8abfa1c28716e75e52a206c1a0c 0 +BattleFinishParam.cs BattleFinishParam.cs 46ebca81cf025b911875d261bd9ab664392b66bbe0fcc86a48be93c80ed92d11 0 +BattleLifeTimeSharedObject.cs BattleLifeTimeSharedObject.cs ab8bc3703d268752a1de56ab5d3e9ebd276980c20076eb0ca300838b3db13d5f 0 BattleManagerBase.cs BattleManagerBase.cs b4181eac7af0ed578835ea75b7003e1b3466331006a35cd84b40139825680eb7 0 +BattleMenuMgr.cs BattleMenuMgr.cs 7418699063e01641d0df1ed16773a9ac9418f418cc047fc18c5892eb7971d361 0 +BattlePlayer.cs BattlePlayer.cs 001409844b46ddaf0a5edbce4e015749ece61053adf725a978987d7063a02632 0 BattlePlayerBase.cs BattlePlayerBase.cs 9d3a665158706460a52900008dcfcdf575dbe08cb6d3cc05e63e718b2885b51b 0 +BattleResultUIController.cs BattleResultUIController.cs d127088f56f60a0f3c3b5803e7254ecc3f966ad600aafad9cbd23683c45f4adb 0 +BattleStartControl.cs BattleStartControl.cs 3a790ddfdc9a1e9e3852ad4dab830074e4bc09925d54d53955ad838a42729a81 0 +BattleUIContainer.cs BattleUIContainer.cs 3e6933c0efae7f1ea44f18faef01f77f187fa8af03ece36ccfc6dab3bb0d4b81 0 +Bgm.cs Bgm.cs 0563a3cfd7d3496978c1e8118976e8e176010f260a09a6d5021d6fb2cd7fd424 0 +BuffCountInfo.cs BuffCountInfo.cs a8ca34862f1d83c9c99a702eb5c4bd02e799ad2b9127f4c380b940029e884214 0 +BuffDetailInfoUI.cs BuffDetailInfoUI.cs bef5b52e085808e650d013187963b8a8bcfe6c6623a253cb9707d6fac740cab4 0 +BuffInfo.cs BuffInfo.cs 820575948ba2de316270e52a8009838b00ed7c6a834e37883372be24f6b07fdd 0 +CantPlayCardFilterInfo.cs CantPlayCardFilterInfo.cs d83ea7282348ee3cf8b391748ec6720fa8a928ddb27020f8ee0191ea242d073d 0 +CardBasePrm.cs CardBasePrm.cs e34d9f9bbf52dfe2a0b30cd56d5e900e711ac1423cd26d23dde627e6066c08c4 0 +CardDataModel.cs CardDataModel.cs 5414f42ee02aa9fe5ed6ad2d88352a13f95f8127b81445a97dbadcde4110263e 0 +CardDetailBase.cs CardDetailBase.cs 4759ffd1c1bf7dca9caa832224a498180d4c76366ff4a10866215eb748e5839c 0 +CardDetailFilterCategory.cs CardDetailFilterCategory.cs b1285bd337493dc31ed03fb32b4fff63470235fd90dcd57ca677f253bd47d0d5 0 +CardDetailFilterDialog.cs CardDetailFilterDialog.cs 05f30e4ef3e15cea7a90ff45345b92a69a68bb3eb0542fb551817bf46439c813 0 +CardDetailFilterKeyWord.cs CardDetailFilterKeyWord.cs 8acd5dcf468dd4929f652af1c387adc9ac7e9948375e775eea5f9fc826820449 0 +CardDetailFilterOffButton.cs CardDetailFilterOffButton.cs bbafe2b972e7fa916913011585a3e72adfc8dabb1c8e7590b19fa0b84c310198 0 +CardDetailUI.cs CardDetailUI.cs db47e28623ffe64d90d49efefee8067ca6ce6653aed7882b7dc609cbb4c99e44 0 +CardFilterKeyWordMaster.cs CardFilterKeyWordMaster.cs 2cb03086fa87e8135697828f96f8d839ce41f0a6b33d6028f8a985368c0e7b37 0 +CardKeyWordCache.cs CardKeyWordCache.cs 27a1609fe451c9544ba050cd5d475be4ed9d5a065bef7bae1665213e177dbf09 0 +CardPack.cs CardPack.cs 193e08432c2dfb038c6eaff0b85f4dd50d39a8cb98d4f80583954b71a6919652 0 +CardPackManager.cs CardPackManager.cs 08e789fd9a2c673d1947a4681804177f53a02ec0402390df630ea57395974514 0 +CardTemplate.cs CardTemplate.cs 65399570d29ca06364b36aa0dece7591db03f01b6093a25c1e37eaa58a26a515 0 +CausedDamageCardParameterModifier.cs CausedDamageCardParameterModifier.cs 0376e7579b73800801bc049d121018a3575950737c35f871b485714921bf0a94 0 +ClassCharaPrm.cs ClassCharaPrm.cs 39f8c6b747beeb52b55996623c1ed36eee3c3bc27ea9955be9b257b845e0b2c6 0 +ClassInformationUIController.cs ClassInformationUIController.cs dd8ae4d1a449c6ee5c03ebdca8e609bd3201299f2d145f87e0886bd7ba47ac39 0 +ConditionSkillFilterCollection.cs ConditionSkillFilterCollection.cs b8fc3d9621a1f8ae7aaffbaac618bdaba36b63b036a37b611d9a798e2e68a8aa 0 +ConventionInfo.cs ConventionInfo.cs f4199507123b62b5da1633608e877cf0d9ed4ecf26a1671d520dfa2c8ee3026a 0 +Cute\AssetErrorState.cs Cute\AssetErrorState.cs b33ad3fb7e2ef3fe360dd4bfb4fa165c6545fea387978a19954be38534aafc5f 0 +Cute\AssetHandle.cs Cute\AssetHandle.cs 1d8a2e86416732f74946f33dcc83668475124040ac512495fb78581a21c6e504 0 +Cute\AssetRequestContext.cs Cute\AssetRequestContext.cs 6b2494166728d2c202cb050c3ce0a06b635295895e48f03c6fd9397ea07177b5 0 +Cute\Certification.cs Cute\Certification.cs 8c143ee5f98e99332bbd1d6ec091d7590004b3b7215f1dc234d39bb5402f8531 0 +Cute\INetworkUI.cs Cute\INetworkUI.cs f9c167ca8b2919b6a9a31518e9517a032aa67f6444239aa070e884c397c3b70b 0 +Cute\NetworkManager.cs Cute\NetworkManager.cs 0045133deabae1d9d7323c1496d1e373c5fe4a1b731a81ed01ecac3500826ae1 0 +Cute\NetworkTask.cs Cute\NetworkTask.cs dddf8a492571b5d0ae698a7e472c86f75a746d5ca0e7b34b08184cc820459acd 0 +Cute\PostParams.cs Cute\PostParams.cs 075f4ac38426adb7885083dd0638d902737d83d34c4b36befd8cef000ff4f2b1 0 +Cute\ResourcesManager.cs Cute\ResourcesManager.cs 71d3f4d1e0d685fcc86ecb163a7c0509fc8455329c16cdb6d2a8a6044207f924 0 +Cute\SkipCuteCheckResultCodes.cs Cute\SkipCuteCheckResultCodes.cs 9e61d6dca2c37a5cb99be5f4657fcd1789504cea08a9f234e35cfe5bc0c9b346 0 +Cute\Utility.cs Cute\Utility.cs b81416aeee0d4e21d0793bf97ee0f88ab47d366f5cbd10207e402fe56fbb3554 0 +DamageCardParameterModifier.cs DamageCardParameterModifier.cs 18471abb1ceed9dadd836b4692b4e0ce1e0a5f1d89e66819de2b763b4d460fb9 0 +DamageClippingInfo.cs DamageClippingInfo.cs d13af6e8d482d4bd5d25e4f3cb66ab8dc03706e12dcd05576957c243cc9cefe8 0 +DamageCutInfo.cs DamageCutInfo.cs badd6bab1f1419beb65cb033261c7e6b6ff1b0fdb8b5cfbeaa5690de3d26d8c8 0 +DamageInfo.cs DamageInfo.cs 5c8ace7ed08f5a2b17b94041d029976515795a6521c62fae4c1017761ec1c256 0 +DamageModifier.cs DamageModifier.cs 3e5115d7fc848170b4a12b9e83e7b29d4eea9f8ad99dd1922d8fd548ec39d547 0 +DataMgr.cs DataMgr.cs e26d86f920c1c4fa975100bca4e120da223aa00fdf2c7afe55555685039de048 0 +DeckData.cs DeckData.cs 6e55b1b948e5e0b023b2bcfda8ba3ba3349137ce7902bc954f448ea150ad8dff 0 +DetailMgr.cs DetailMgr.cs b9c05d782358a88ff7efe57f4d75c24bd9e8c11fb661f368c038e30a44293ba7 0 +DetailPanelControl.cs DetailPanelControl.cs f14d798412cb1e071966ed715d863c42a24b34993de3cc2235bc9780daedc0c5 0 +DialogBase.cs DialogBase.cs 29b1a74e1b413b9c7a6026a95855be50e17c9c9d9ded48fd29e50f1dddbe2bbf 0 +DisconnectToDispChecker.cs DisconnectToDispChecker.cs eff0b9cffe1f860c52f1541d859903e7c04b0b9533e8e9fb17db419c111b20af 0 +DisconnectToLoseChecker.cs DisconnectToLoseChecker.cs 62eb9d5ba9924579904be303dd687dc472a7846abcf897eaa9d71dd8cf3c564e 0 +EffectBattle.cs EffectBattle.cs 948c157c1c662f13946de84a8d82a9e791eedc9d0e4033e260aa960b001ddbe6 0 +EffectIdx.cs EffectIdx.cs 5a1bb1179ec2ae8c4e552ab9dfb859718b54c683382bec84518f1ad437c9dfe1 0 +EventDelegate.cs EventDelegate.cs 46aac74b8f69ad3bbff976d609890b06d39bdcaac8d750dbc08edb7350fe20bd 0 +ExecutionInfoCreatorBase.cs ExecutionInfoCreatorBase.cs 66231c001020d1bd54233645c2462edefd3af69adb166a4230e738915687a4d3 0 +FilterController.cs FilterController.cs 383faac09c95684862201a8ee7cb0384bd00bad97e17b967a2e2a0e4babe3969 0 +FinishTaskBase.cs FinishTaskBase.cs bcce8f5f8457978804ac2b8142a5c038e8113a67c6ba081226355bb2b4aeb93c 0 +FlexibleGrid.cs FlexibleGrid.cs 5ae686e596cc48092f7c71a8d4dde5963b777c406372cf8a68d4b274ad7332a6 0 +FusionIngredientInfo.cs FusionIngredientInfo.cs f27ea653c65be64dbf872e64dfca4ac1da361eb347a96b2d05836b79452c8510 0 +GachaUI.cs GachaUI.cs 9a2717c4c7488d1ac985e3f297efc5a0d2b1f11154257f120db4716b9562a280 0 +Global.cs Global.cs 176c8351aa9f1c5529fa0ed3ae8514fef117d4274034ec358ac1b7ee4fafb782 0 +GuardInfo.cs GuardInfo.cs f90debeff49492f32e54241fe88120353c9e640c63e40e5368e37aca46cbe4d7 0 +HandControl.cs HandControl.cs 9aeab0b0a03df8cacdf83ad032bac91bf6ded7add818ab8df390b2204de9bb32 0 +HandTRSCalculatorBase.cs HandTRSCalculatorBase.cs 3bed5bc4be8df4ae6e175ea80edee9dddba777cf3e60a98beb3c330f3b276591 0 +HeaderData.cs HeaderData.cs a5698b093069f218b38ae292b57bf7f322b1130e4d6c8bb2b48d652833834a5f 0 +HealCardParameterModifier.cs HealCardParameterModifier.cs cebc61aded873da74065beee795a016e0c4eb41535457ab363a01ab7fbe7f491 0 +HealModifier.cs HealModifier.cs 688d22e29bfba314775da3a007292f615d7f1285ad65af67925189310755d7f2 0 +IBattlePlayerReadOnlyInfo.cs IBattlePlayerReadOnlyInfo.cs 92458acdee05e34f03501eb096f4f9a62e046bb23beab303feeda08a65b16a96 0 +IBattlePlayerSkill.cs IBattlePlayerSkill.cs 0f6483b6c68d14b3df16714d80e7a699fe77dd8364fd9a526ca4d71ea938ca93 0 +IBattlePlayerVfxCreator.cs IBattlePlayerVfxCreator.cs ede7ac5540d0302302ff09323aa610a7f0465de170696134fd9cda3b88625873 0 +IBattleResultReporter.cs IBattleResultReporter.cs 5738a394332b823ef418da707c61c13cbb479cdbe2b800af27f6ba5437fda887 0 +ICardChantCountModifier.cs ICardChantCountModifier.cs b5eafdd395d738c281ca7bc680a755ee2b011d24342cedf80687bcb7e29b3190 0 +ICardCostModifier.cs ICardCostModifier.cs 3d31fcd151290d609159adcd781c77eaa7309aed87369dd5fc5dd0651265d198 0 +ICardEpModifier.cs ICardEpModifier.cs 1e9f05e89b4df909a3a157bb50ec86b68ce33a3751da1cc7b9ee9bcd85b90ff8 0 +ICardLifeModifier.cs ICardLifeModifier.cs 18266d3d9a1705ebf40f4b88ed245d5b2c12cca0f3bc18deaa8968c81510129a 0 +ICardOffenseModifier.cs ICardOffenseModifier.cs d96faf26fcb1ae05e2625f1b20c69a920027ceb58aa95e94675b60d955caa56a 0 +ICardSkyboundArtCountModifier.cs ICardSkyboundArtCountModifier.cs 0b8d0621f791bb61046d66cdfdda2abd7a672e2fdc1d83732b715965746d4997 0 +ICardSuperSkyboundArtCountModifier.cs ICardSuperSkyboundArtCountModifier.cs 7e68ca567e78d46a21d036b965cde68182fe1070ea9d4f750e1eb236efd06556 0 +ICardUnionBurstCountModifier.cs ICardUnionBurstCountModifier.cs ba967c6dc5d5a202fc6ded3b788b4fbd14d2a840fb2ce0858c6dc9f332a4fbfc 0 +IDetailPanelControl.cs IDetailPanelControl.cs f705759bfd1ee67cb2fd89727c9c5bc3fa339e1a45ecdba0f1deffa5d7464e71 0 +INextSceneSelector.cs INextSceneSelector.cs 52d188563368337f2653d41f54ed6ba915911929134b6bef628f6cd72c820c95 0 +IPpModifier.cs IPpModifier.cs 95a83890b06528d37c73dea24b75a3dcd23dfd532508bcb90463e34a5811d19e 0 +IResultAnimationHandler.cs IResultAnimationHandler.cs 0106c5eb9c8d912d47c5cc46336bffce1284cf5935088850fc0dc6c7ccfe3351 0 +ISkillApplyInformation.cs ISkillApplyInformation.cs 1082061304ea9099b2e144ac28aef691d138e0f8e09f4bac8109c8c359277fa1 0 +ISkillBattlePlayerFilter.cs ISkillBattlePlayerFilter.cs 1a1760e036b1ac60eb9fd837446c3b45daa03e9d5a80cce77a1ee601e6c7fed8 0 +ISkillCalcFilter.cs ISkillCalcFilter.cs aacc91c8f393db7296400160698e4ffa5e229170c1ebbc898abd1ee5b96e44a4 0 +ISkillCardCountExtensionsFilter.cs ISkillCardCountExtensionsFilter.cs dd3bae7e099bfd5ffef7a58cfc446c11cbd0c6b70c1a8633506f0a0762a1c0a9 0 +ISkillCardFilter.cs ISkillCardFilter.cs aa7d9a12ffa40988e4a2f9c0cbceb51dc41deb350490ffb29c20a027c04f7377 0 +ISkillConditionChecker.cs ISkillConditionChecker.cs d1e64e217456ace7bfd55bc226863af269d3a42a3b8bbae8eeb75e535de7931c 0 +ISkillCustomSelectFilter.cs ISkillCustomSelectFilter.cs 472aee97b778f66a3883ae49ef4a25dab079ec0471ef61212151a02edf0733da 0 +ISkillEnvironmentalFilter.cs ISkillEnvironmentalFilter.cs 4e35f3009689157bfc56a2a5beea40964bc1848294947b2f7b31206aa94acc0d 0 +ISkillExclutionFilter.cs ISkillExclutionFilter.cs b2c4a6db5438cf628a7f4e65e8f39e0859f90694ebfe31ae199c70e00fd97ae3 0 +ISkillOrFilter.cs ISkillOrFilter.cs 225154c7e77f5e83d2afd3d7b52e11588c722220eb795b7f0a54b9f609f42163 0 +ISkillParameterSelectFilter.cs ISkillParameterSelectFilter.cs 11451ea5bfbc1d4b7ef1a3229eb4e4ecf7bb5f7243abc769824f171ecbaa1e8b 0 +ISkillSelectFilter.cs ISkillSelectFilter.cs b3a88c0e99f60103a913c7de8f01798fc01036b950bf72cbb18e6aa7faab7f88 0 +ISkillTargetFilter.cs ISkillTargetFilter.cs 83e6544879ae037b683c722ef64a84eb11c5c25eec2d5f91ee3c305c35365875 0 +IStatusPanelControl.cs IStatusPanelControl.cs 0b3209f41c2c553a04ea57d686fa023ec1cccdbaebbc87a27796e5757f1820dd 0 +ITurnEndButtonUI.cs ITurnEndButtonUI.cs f56729cec651078c6ad204c92a465359206ec4099cc2089ab5075adcd130a401 0 +ITurnPanelControl.cs ITurnPanelControl.cs 92439feb3a6faf563e1d2673a4bf20c671be1300731d5594d1fb9d9947016036 0 +InPlayCardReflection.cs InPlayCardReflection.cs 230a498f9a9239da76fd43e1356c2420606b53ba4dc7fd74eee475d44ab2b39c 0 +InputDialog.cs InputDialog.cs cdca35d6b09423bd6995c573d775d05a5548b5fa5e9d29329f5e1883226e840d 0 +InputMgr.cs InputMgr.cs 581fa15080fb3a88827b415e1da7b27624df5b6990bc3901ab73fab64a2c22ba 0 +JudgeResultFailedToRetryChecker.cs JudgeResultFailedToRetryChecker.cs de1009153f15895bec6f0540db81859a4f57812ca5c44f5db9c2b3bd6d907f2d 0 +MasterLocalizeSetting.cs MasterLocalizeSetting.cs 99ee729dbe167dcd0435d6d30cbe2c19f52c6537900f83c822e32279dc93d9f0 0 +Matching.cs Matching.cs 29098aea9c23bd2902e2a8d873d17f28c10b8035d68958386737a8f74b46f278 0 +MatchingBase.cs MatchingBase.cs a7ab09602771607df180013c0b564aa561d0e71e6bbe06c294bd72163ccf290f 0 +MatchingIntervalActionBase.cs MatchingIntervalActionBase.cs 59e27d024cdf6fceac658a8610925f92df34622b5f9a3c1506185dabc6ead1bd 0 +MatchingNetworkConnectChecker.cs MatchingNetworkConnectChecker.cs 883ea96d00d6ce260920709ce14ccf3df66872a3718b318012291330c1188881 0 +MatchingRetryDomatching.cs MatchingRetryDomatching.cs 462d1f6cb226ab558be7a30f4e656ed50bbbc5db2b12768396d7a081020dbecf 0 +MatchingRetryLoaded.cs MatchingRetryLoaded.cs 25bded3bbbb7524ae5bdd4c8037bb5fb3bc6a9ddf940629e51b51147e1a9c77c 0 +MatchingTimeChecker.cs MatchingTimeChecker.cs 3c3d0428a3314139818552cbd6ced313fdf2de9fa326887cfe85a7213f3ebc34 0 +NGUIText.cs NGUIText.cs 559ef7a20fcde5f9598f3711079ec82573652e26f52d674cfc4ab375eafe78d1 0 +NetworkBattleData.cs NetworkBattleData.cs 73c823febb4d40b508b72cc946fcc47211d89e93c4906cbeca43beab971d69d3 0 +NetworkBattleDefine.cs NetworkBattleDefine.cs 4d0a39b09dd5ad11786645dc4365148d945ea11e690f735d3eb541ebb7ce604a 0 +NetworkBattleIntervalCheckerBase.cs NetworkBattleIntervalCheckerBase.cs c0e67a2a6b7476342c4dd71eff51b8dfef322c719fd8b1ac6300223d71949170 0 +NetworkBattleManagerBase.cs NetworkBattleManagerBase.cs e0fd242d61995e9a667928f7c868fbe29abdfa7b57349229077b7f75a8607a97 0 +NetworkBattleReceiver.cs NetworkBattleReceiver.cs 9ef6c34fa7bae735988c7adcb455c0245b5d37bbee58a6b29f4484bad9cec3eb 0 +NetworkBattleSender.cs NetworkBattleSender.cs d0f2db29f75fd594abf47bb4c784754b27f128ee079dd962be42a0732d8f6ac8 0 +NetworkBattleSetupBurialRitePlay.cs NetworkBattleSetupBurialRitePlay.cs 9bf090ee9a93e60cc2768b747144550296348e3bde55cf2fd492c74414adb664 0 +NetworkBattleSetupCardEvent.cs NetworkBattleSetupCardEvent.cs e3dbe93577757850ccd51596efff3df669fa2be43c7db86970fdd2f1aac1fad0 0 +NetworkBattleSetupValidateEvent.cs NetworkBattleSetupValidateEvent.cs 9bf2ecfd29a963530c88f58f6002e73154b80571438629cbf367e7a7a142928e 0 +NetworkConsistency.cs NetworkConsistency.cs 46c2b57e8b0a5bdb71b4a7020d729e528a4f02dca4bd039929df0ce8896d4795 0 +NetworkExecutionInfoCreator.cs NetworkExecutionInfoCreator.cs 89e65032a5504837b829716759802d32359100db4f5390b66a36bddc2f6010c9 0 +NetworkOperationCollectionBase.cs NetworkOperationCollectionBase.cs a360f399fb1d35b94e70b3578b446b373c1e465f9e12e05fac075c8643d7a305 0 +NetworkReplayBattleMgr.cs NetworkReplayBattleMgr.cs 7d9c0df07f3e2f87c9206cefcff5d4a241241fdd466d335ff9daaf6dd3d1d93b 0 +NetworkTouchControl.cs NetworkTouchControl.cs fa433ec9d3570dc5916fa848f1f43a29da1a123a9dfe732b28ae8693938fc729 0 +NetworkWatchBattleMgr.cs NetworkWatchBattleMgr.cs 9bebf4e2efd881d958b9ff30ef5a058f92843dce25adff104eb3186376216062 0 +NewReplayBattleMgr.cs NewReplayBattleMgr.cs d4feb1e6bea904b6e4f67228555b41b20f4b49d0a6117ed6b47071091d043844 0 +NguiObjs.cs NguiObjs.cs efcf4f0ef3e881ef8a9a4c760c9b9e990ff5747f3c5450565ac7b08af2c7fe67 0 +NotBeAttackedInfo.cs NotBeAttackedInfo.cs cf27c240017e3c5276d3b065dca43373d346bb29043a203115f9c5f33fe41ed7 0 +NotConsumeEpModifierInfo.cs NotConsumeEpModifierInfo.cs 00aef49ba7e742cd19278a692954a92c8a5e872d0fb41bc54ed831242a86c745 0 +NotMulliganEndToJudgeChecker.cs NotMulliganEndToJudgeChecker.cs 80febf55e54e431a6cf8c3264baa180f1a48d57bbf4d97c020aa23d37dbaa90d 0 +NotTurnEndToLoseChecker.cs NotTurnEndToLoseChecker.cs a8874bbac8694e89090b0b13eb7ddaee90ff8f1d6e873873ac1e492b18a09814 0 +NotTurnStartToLoseChecker.cs NotTurnStartToLoseChecker.cs 346d048a258240b0943432ad93d305d26418debdc57e17c95ed6b2062f8eeecf 0 +OperateMgr.cs OperateMgr.cs e850a929de25ffac21dc85de267235a530e4671ad5edf8652cca9c5be8418028 0 +OperateReceive.cs OperateReceive.cs cd94427cdfe2b43ccd2bb815dcf7373e2a3caa3f7dc23901b0abf2c6e312f742 0 +OperateReceiveChecker.cs OperateReceiveChecker.cs 990b8d1af1e29c852c7b3b8edabc5aa10be41f95ac8b9288a125918c1875a6ed 0 +OpponentNotTurnEndToWinChecker.cs OpponentNotTurnEndToWinChecker.cs 002da6bb2303a75d863ad19c5a5bb6380abffcf4f7293f47200220f0fa703917 0 +OpponentNotTurnStartToWinChecker.cs OpponentNotTurnStartToWinChecker.cs 6413b3b356d23a1f3a39eca87e786c70c66b6c8483c058fba5e44756cb5d2905 0 +OpponentRecoveryToDispChecker.cs OpponentRecoveryToDispChecker.cs 6e8de98a40a364b5bc06b7bd0ee1c3a2202a1c7dc730e9afba4215770d096920 0 +PackOpenDetail.cs PackOpenDetail.cs 59540a83a0f103a8113e416485c1f2fe5495f0ab5d80899da778069a6ac26743 0 +PanelMgr.cs PanelMgr.cs 5b0d5fd19f49134ad0a708e7263f8d68ef636a33a0212776191602c4b9074dae 0 +PlayHandCardReflection.cs PlayHandCardReflection.cs 934c893708573d24787ba3ad9b678ea465b749715f68cbda53ca00d427fe70e0 0 +PpAddModifier.cs PpAddModifier.cs d7c541e03d3a6b6b4427c9156b4139d759ab3a6e8e5b896adf11acf854468735 0 +Prediction.cs Prediction.cs 536228a52cfca4db3c40d419472dc575278a0785a280040a33203c62691c7976 0 +QuestFinishDetail.cs QuestFinishDetail.cs 488d190e160ff8dd616403fbf006ded58d40bd7e02a6d77b4df443283dfb11cb 0 +QuestSpecialBattleResult.cs QuestSpecialBattleResult.cs 44e08cfe0fd128f5e1bafe8a0a819a71225dbe3645bafd7f329f43c56a1acaf1 0 +RankInfo.cs RankInfo.cs 1f79848feee9570d337bdd7a7779a716cbd05141ca901d1ef8667e44ecea672d 0 +RankMatchBattleResult.cs RankMatchBattleResult.cs f6c59a1c10cded1b4465bcb9a4ca3b26eb6de8c60db0b9437210001666cd5703 0 +ReceiveIntervalTrigger.cs ReceiveIntervalTrigger.cs 7a5b285c9acf441c4a97e08243228c9a55e3a81657911fe59d775db0956205a7 0 +ReceivePlayActionsReflectionBase.cs ReceivePlayActionsReflectionBase.cs 6ffcef690e2a73d946b9af88612c18a819ff02013333d940ec958144b34e445d 0 +ReceivedReward.cs ReceivedReward.cs 790befcadc8b35b0067eb88a127210a625dbf639ba1b5d5829d5e434569e9c1f 0 +RecoveryToDispChecker.cs RecoveryToDispChecker.cs e5f6b0b7a4ed72ae2fb7466083109da654797f0a53b0d956e7bcebc20de47423 0 +ReflectionInfo.cs ReflectionInfo.cs 6c52f52fa1003907d7f37ac9cac83be02069791e91f47ce500dc686716c2600f 0 +RegisterActionBase.cs RegisterActionBase.cs 9e101ce8eeaed30cb02f8263d3b43f07bd57c40e868c291ca3dd8e5d6b9652a3 0 +RegisterActionManager.cs RegisterActionManager.cs dafa07d8b8beea14456ada306ffb47898391089361a04a7e56d9c01f6736a978 0 +RegisterChoiceAdd.cs RegisterChoiceAdd.cs ebd7a55f46204db08be667eb3eb5716a88ea723e0515a63c5a9678513d584f81 0 +RegisterLotCardBase.cs RegisterLotCardBase.cs 0eaa82c60bc5c3a4cda5f11e43b2046258be409435659981f9e28076585d4953 0 +RegisterTargetBase.cs RegisterTargetBase.cs 8203159714f9b6739c4fe81aa59ad7989ec5e200495253e3f6303ad06a9069ea 0 +RegisterToken.cs RegisterToken.cs db7b950af0ed7b687763ac8b31df8e6ba8cd4a412a81166123a72652373b8e15 0 +RegisterUnapproved.cs RegisterUnapproved.cs 892dbaa7aa6b42439ba26596ffaf627ccce24a2c0607e288083ea03e6eec8d2c 0 +RepeatSkillInfo.cs RepeatSkillInfo.cs 77144681a151c5f93934b0fc16cca2265a30d4d36e955c6fd369b32aefb1bf07 0 +RepeatTimer.cs RepeatTimer.cs 43f45ef4bd6b0b0bc7e2e1a02029631bda78a932b62f71f151864596086c6253 0 +ReplaceReceivedCard.cs ReplaceReceivedCard.cs 99a47b992de88d1d9433c31d10a9bc438a06cf25d618fb36d37c2efe827b62e5 0 +ReplayDetailInfo.cs ReplayDetailInfo.cs 49705ba9302bd646d306eb153ae870102b6a45cf51bc989d6ce7c65e77b5b816 0 +ReplayMoveTurnButton.cs ReplayMoveTurnButton.cs a4eff325fcfbbdedd9b6c3bbc6416190ee72a13ccf18e33eba417c3937ad8547 0 +ResourceHandler.cs ResourceHandler.cs 4aee3875b0074af62154f817dd7042fe873830923e9b0d9a2099085641441e62 0 +ResultAnimationAgent.cs ResultAnimationAgent.cs b0cd2cae790fa1427c69e96cfcf164f38d4a58aff8fcd60f08d1a9a8273a9c15 0 +RewardObjectInfo.cs RewardObjectInfo.cs 7f8065f9dd3062ee8c31a3cdbde05ad4ae8880df2992263a316e7bee833211fe 0 +RushInfo.cs RushInfo.cs f1e143f55de9f46018d4b81e24cce86885019ea8a2777ca90a36573ee95645cd 0 +SBattleLoad.cs SBattleLoad.cs 8338806083822a3cb30f4f98c5906601ff2b9456ad11181468f529e3e3c289df 0 +Se.cs Se.cs 1e701d14d8c51f1522870ada9a2109a8f5e98d27de5ddfeb51f57241589356fb 0 +SendCardDataMaker.cs SendCardDataMaker.cs 074a19f77a59be5859a486c9731f3f6df4e4960ff12245e8e3a9f92c071c30de 0 +SendIntervalTrigger.cs SendIntervalTrigger.cs ac92d11f73c9cd58a08b07f2d852028a646ee049df17439d023f05ba627878b5 0 +SendKeyActionDataManager.cs SendKeyActionDataManager.cs b74f41da4e4f704e0300026d9af6e27a1374370214a6f77694db5dd01c726fd6 0 +SetShaderGlobalColorBG.cs SetShaderGlobalColorBG.cs 605e1b276a8dc8cc0bdb083470de6fd462e168a827200f932aac8d5b67245934 0 +ShieldInfo.cs ShieldInfo.cs c7ca21d0fd446587d0e2ce1e80b29055ea4ef2f6c154a18eaa279543aba8eb1e 0 +SideLogControl.cs SideLogControl.cs fc18a896a557607eef7a5c103ef0baf6c61ddc52a099b905dc7ea1cd48896108 0 +SkillAnyConditionFilter.cs SkillAnyConditionFilter.cs 3fc4096e72dbbc726a9cc29c35d862f044fe2e71ced1f29a1828f0865f5cbf11 0 +SkillApplyInformation.cs SkillApplyInformation.cs 26e8eaaf3ae8e7580ff1f4e2f4a483fd31e916434bc3d73b6bf4f0fd7aaaa0eb 0 +SkillBase.cs SkillBase.cs bad47547ef24dd88e1c9144ff9de058ed614c639b4f2fa8ff32e6c901ae877f4 0 +SkillBaseCopy.cs SkillBaseCopy.cs 8fdedd8c85095d7179de8bba365e25c7603bd7ed126627b9e56a167d90c36636 0 +SkillBaseSummon.cs SkillBaseSummon.cs 0f8e928872f7faa449c2ca044ef344e930b32eae563a02eac46dd784dd238320 0 +SkillCardCountFilter.cs SkillCardCountFilter.cs 051f8cef087213aafd73d68eb30ab8e2537cecae22f67f858ac8b6ff855135f1 0 +SkillCardLimitUpperCountFilter.cs SkillCardLimitUpperCountFilter.cs a93e29158387ac9c2bf136aad4adfd53ff5f8f11c9fe3fa4befb1bd64c913c99 0 +SkillCollectionBase.cs SkillCollectionBase.cs 3d20acf096e5f879635a17005897b250eff32785e0c0abbca06353fe6c8318d4 0 +SkillConditionCheckerOption.cs SkillConditionCheckerOption.cs 6bb1f2c1abf0be55acda4c52272039d3d88e8af6c916517ae2218741a3b1ca36 0 SkillCreator.cs SkillCreator.cs 6b90cd32dea619058e1cf942bdd288981495f7711a76bff8ccc9e2787e3f6439 0 +SkillFilterCollectionBase.cs SkillFilterCollectionBase.cs 3f89c34a04e4690ab3bbbdd14fd444c1d56787e6c806ac23e6725377e066db43 0 +SkillFilterCreator.cs SkillFilterCreator.cs c632b38c3d58fc93226ba2e2c331af3f193dbbb252073186ae3fd0940acc554b 0 +SkillFilterVariable.cs SkillFilterVariable.cs 8afc7dcc5b2bf19e9030a470c4f1cc02b900fa7300994460f473f82136359202 0 +SkillOptionValue.cs SkillOptionValue.cs 3cc7356d400b83acf6b5e8b26e752d52a9500607ede2e0ca46144f981b67b08b 0 +SkillOrFilter.cs SkillOrFilter.cs a7ae3aa228e461e2a961fdbc2abd98f7e733638eac38a11675394063002b8e8e 0 +SkillParameter.cs SkillParameter.cs 4f76863bf2f9e3beb45821fc02a8871ac818cc82b7893466a7e5ce45fde7cd53 0 +SkillPreprocessBase.cs SkillPreprocessBase.cs a91852ca6857a209f0784f092cf3ae86f1daf55f9f70b4fab6e89712811f4497 0 +SkillProcessor.cs SkillProcessor.cs 902564f33d55b95dbe4774ffade51622403936e89d3cf1dffd5febe637ef8de1 0 +SkillTimingInfo.cs SkillTimingInfo.cs f3cb1e1f05af1a40dff198233cddaa9f60d90913e71a3f58909ab971f04fdb20 0 +SkillVariableComareFilter.cs SkillVariableComareFilter.cs 6a30683c7d15d3124bb12fae13f7a9b786f22fc18e7edbf3306cdcdc13b6bbda 0 +Skill_attach_skill.cs Skill_attach_skill.cs d7795060c18e8f2a66571446b56f1a0b4243d96b6bf4dc96db9f9f828c93f237 0 +Skill_attack_count.cs Skill_attack_count.cs 85897dfd651df0b538f2a9a46d92f210d59718533168417b6a0b36626986617c 0 +Skill_cant_summon.cs Skill_cant_summon.cs d5dc8b71ef1fe16c01e4fab59925db48d505eec343c341cc66258acf24132779 0 +Skill_fusion_metamorphose.cs Skill_fusion_metamorphose.cs 9ac83f3d5fd462e1c60516b01833032b29f92aea8397623b7402f92ecd176d05 0 +Skill_metamorphose.cs Skill_metamorphose.cs 024a630261359a534f60ede3ea2a345409689558dbe9d9b4923fbf9502c241c0 0 +Skill_powerup.cs Skill_powerup.cs d5d0d9afbc2832159c07bacff5151e876294fc700f22114e0560de4aed085b6c 0 +Skill_pp_fixeduse.cs Skill_pp_fixeduse.cs f44836e39a2ca74374a5a6a8b5a3a77c149fc9342dda3317f012431241406b4a 0 +Skill_transform.cs Skill_transform.cs 3e2a56875f4ed9a892845d33a356c61ab1ea1a34a3c32ef10eb74ff12a8f87c6 0 +SlideObjectReceiveControl.cs SlideObjectReceiveControl.cs 25066b5bbcee488a0ae0d634e595354d194715895dd8f197c57740dc9a65d654 0 +SoundMgr.cs SoundMgr.cs 6446b13929ddfef0f1e421498e7e007e5f047fb0b9af01ad4cb155f10abb98c3 0 +SpringPanel.cs SpringPanel.cs a017e4bda72cd7cf6f5afd49033ac1d7bc1e1723f7c9a2c47ed03275ab680470 0 +StockReceiveMgr.cs StockReceiveMgr.cs ca15f8d8c7a532558071dd010fcecff5e05ef69891f8f364db4537ddf8f08fdc 0 +StockSequenceMgr.cs StockSequenceMgr.cs ff64a78a351e6ed010b0bf9ef00e84d6540109fe578cdbf2772e17d6d66ada38 0 +Timer.cs Timer.cs 0ac4b1fc273798a587d38987cc7a353d8c071a81c4b7ba293fdc59a9c2e1c804 0 +TimerMgr.cs TimerMgr.cs cfe8eb9a3405153f46ae962772d23934c39daaa34336cf6b309484c511509d1e 0 +TokenDrawModifier.cs TokenDrawModifier.cs ee94b1a849c7779f1c0fcaf0951c06cadcdfd0fe7c61182de4e1cc468af494cb 0 +TopBar.cs TopBar.cs e3365819277393c8892627127c124e72917b3c50e15a9bf549b44cf2e2fa8350 0 +TouchControl.cs TouchControl.cs 999089722cce89697ebef6b2da6cb20a4d33e10826160e6487f25282cc5713eb 0 +TurnAndIntValue.cs TurnAndIntValue.cs 1b08f6c6e7950738ea1be3b7910e62aa800eb945a1c5f17e910de63e040cabe9 0 +TurnEndButtonUI.cs TurnEndButtonUI.cs fd5682499e7764933d3d3d24c8b75e1bf6a863fc29fd7b75bdaf0f4df4efa8e3 0 +TurnEndTimeController.cs TurnEndTimeController.cs 3b516431616bcaac105e1c19c199fde08a74a4414ac2eb7264ecbf7aee4dc062 0 +TurnPlayerInfo.cs TurnPlayerInfo.cs 57656b4a000e98f9d9a75bcfcf13b1703c33a1c64f8f36f78afb0771f3caf43b 0 +TweenAlpha.cs TweenAlpha.cs d1f530a59b492a34140f88c0fecb88406289cc37817e822d3a36cd141ec03e7e 0 +TweenPosition.cs TweenPosition.cs 1426cfaf028ac956d7e1e286ad67189723116ca2dc4926a101ca1784c90ec22a 0 +TweenScale.cs TweenScale.cs dd50401e8ffca06da1d2ccaa9d21cccfef2007d8f786f0690b79880d13b5007d 0 +UI2DSprite.cs UI2DSprite.cs c0c50a2c03e76ab7ee5fc7b0bb6ede7462ca98cb338a3ac93d3310d6016e660c 0 +UIAnchor.cs UIAnchor.cs ed46145415d1c7a0fef11d38de99b4b851e92044455ab3297d3e487c09e5f9b2 0 +UIAtlas.cs UIAtlas.cs 7b4a3539816d0568b2175af231466e58b30e60596b5f0ff095e6781c37b6b6e6 0 +UIBase.cs UIBase.cs dbb46aa38d676f4c4a63adc182a0002a1a5fd74d5d72002a4e1771bfa7b30830 0 +UIBase_CardManager.cs UIBase_CardManager.cs 5ef52362dda6c063389cc681f0ee48212ab113973807c4f062eae207c3658153 0 +UIBasicSprite.cs UIBasicSprite.cs 82e6d31f92cdccf975a2113546968dd72737df67c94cb55015e8e808749b3446 0 +UIButton.cs UIButton.cs 6daadb36b071d0759d354c0368383bbc8fc7c7a419be5236a0a576e666b47ca8 0 +UIButtonColor.cs UIButtonColor.cs 527c1e1d9db0da61cdc0348e893b3df2bef7fadd046b9079abeb5641483da7b0 0 +UICamera.cs UICamera.cs 500eb9bb8f8bf4e7ed1f0073de80c5ccefe85273db00fc887295153d533c6525 0 +UICenterOnChild.cs UICenterOnChild.cs 474da8b0e6bab01a59538a47351a71f3a3564f9242c37a9adb29419dcaf91ee1 0 +UIDragScrollView.cs UIDragScrollView.cs e5acfb873e2c58489438689c35fb49f9bc6a626e42b8210d99131027c5c614b4 0 +UIDrawCall.cs UIDrawCall.cs 9450bbb24af68f5949415fdaf4d172e87f3666f50d04cc349a63317ba3ce16c0 0 +UIEventListener.cs UIEventListener.cs 2e8420b6be9c0a4432e84df935bcd72a3d59ae68eb9cbcb7fbf7c37d22fa08d4 0 +UIFont.cs UIFont.cs 18e19978b3c278ab7231cb284df3cf82cebfeaea893297d5114d1c9302396599 0 +UIGeometry.cs UIGeometry.cs c21d252b5f58d70ab94150caf931f94be10e7298d1972cdcd00e55fa7f8f07a3 0 +UIGrid.cs UIGrid.cs be8a6c35e77ba46793e07ff442fc18296acae8ec35dd265269b55a594abd3c93 0 +UIInput.cs UIInput.cs 416afc67f7ccb2ce5013e0aa16a6f88e56835addc4f44119d20d6902e9a2f63d 0 +UIInputOnGUI.cs UIInputOnGUI.cs b2580c5f417880c2439ecc10cf2be990ce36cb5c5cdd31106206160432bb07e3 0 +UIInputWizard.cs UIInputWizard.cs 2cb970f67fca7f6b87ab2549c2afbc49641a15d2ae105d621a60a7c43246f3e9 0 +UILabel.cs UILabel.cs caf2353d46a4a538b696f1cc11ca0d987d99905db8789a507df4fc726a29cb47 0 +UIPanel.cs UIPanel.cs da0a82c5db60138e81e2fabbf0ed39adbe43f0d98a52ce5e7204e90c6378b8e6 0 +UIProgressBar.cs UIProgressBar.cs c528c65a6c4c5f0b99f16ee5d956ea45b0b2b50d5f99c82590ca11b39b1681dd 0 +UIRect.cs UIRect.cs 26b0ed3873a80eccb7b3e110fa54f7ad732cfaae698aa5cbd7aec4c0f7b01d7a 0 +UIRoot.cs UIRoot.cs 457040148de9a4cd8e2e4c8dec76da7db4f19fc424100b5bb93897a5ede815a0 0 +UIScrollBar.cs UIScrollBar.cs f978224bdadcc33681a2a7010ff3bb18076353cbdbab34e72c813ac4c3bd7f5b 0 +UIScrollBarWrapContent.cs UIScrollBarWrapContent.cs 993320b7ab1a3db9f19803086af1c63b933e260aea2b2f5d55d77476a9155cfc 0 +UIScrollView.cs UIScrollView.cs 3934d12e088d3908a2b563ed2f74c7890dff5b29c8619b9a3400232515b78626 0 +UISlider.cs UISlider.cs 1bb12ff32ade8946f153cab1a17dacc463744a210bbef560515f597e2f437c5e 0 +UISprite.cs UISprite.cs b810fda0ad0f38c06b5777913c404c4a1a4b669273c13c0466cca967157f8d34 0 +UISpriteData.cs UISpriteData.cs 5ef69b73779d7935627e4ce8e9875ef6ba8695dc872453f547301748a82c6c96 0 +UITable.cs UITable.cs 7996e4ad3d48b3a05295671af25c135fdcb650cf7461e49a0d9e45ac2218771c 0 +UITexture.cs UITexture.cs 4a620309b4b36a2d217bd365427011fa40fbd3572105312c5e67cfd9cf52f811 0 +UIToggle.cs UIToggle.cs 4877e1f3dd9151b5dde182f2109999899d5ceaa3f390a8e0211424b77d8109dd 0 +UITweener.cs UITweener.cs 639742c82b7b38d98215bb9852df84c92819b28dbb9dcf43d834ed615897cbb5 0 +UIWidget.cs UIWidget.cs bcc292adf33c73b6e1091e74df776dee7808b10f1e8a5b6296f3efe5eee1ac03 0 +UIWidgetContainer.cs UIWidgetContainer.cs 86cb92fd2fe067189987d823f21f7492355d99490a37d03d0ca4b98ef6b2d014 0 +UIWrapContent.cs UIWrapContent.cs 59a7ac9b3b6a8774ff69869ccf8d0a013efc3999ac636ec43ed5d2a90cf5c301 0 +UnityEventAgent.cs UnityEventAgent.cs 0712c1fa51f3a6ac91d26d42972c3b4c0bef81431ac7e4424ca222c18746f46c 0 +UserAchievement.cs UserAchievement.cs 06f9a530d683c21c4c3697b0ae6b8c79e33197e504de7479d0ddfeb5b9c54014 0 +UserMission.cs UserMission.cs 2516293322a85ea704c66c79789c5b026a41024802aa464f943c019822424c06 0 +ValueWithOperator.cs ValueWithOperator.cs 8f7f0a6779b0acef60616d8b11397e9287a2fda5aabb5633931fe054d0488a95 0 +VariableSkillFilterCollection.cs VariableSkillFilterCollection.cs 81a4181b82be933b517204d193716c7b76af98f9c499635a1cded597b62dad30 0 +Voice.cs Voice.cs bb5adff9c75fb04af122f784aabce3238626eca7ecf63b34e3f1de41eb54f4f2 0 +VoiceAndWaitTime.cs VoiceAndWaitTime.cs e2ae6dec5f198e44489e2f13a4149d0f6081da625f72d0e0f0d50a9740b0a156 0 +VoiceDictionary.cs VoiceDictionary.cs 314e23ce11985b7f0b5e6a5753b4ba48813c4414972441cccc4c8efe15e81d21 0 +WatcherDisconnectChecker.cs WatcherDisconnectChecker.cs b2ec9803c3ed9e473233cfd4e2f805195df1f607936f7dde9ae1b7a7028dd847 0 +WatcherLeaveChecker.cs WatcherLeaveChecker.cs 7b969aacc9670f319bd45d344528524a3001b0152cc96e99631e89fa69354466 0 +Wizard.Battle.Card.InnerOptions\CardInnerOptionsBase.cs Wizard.Battle.Card.InnerOptions\CardInnerOptionsBase.cs e0c9e0e503c55e536924b17f7b2948423a79b85bafaf0ffa0d02b053667d69f2 0 +Wizard.Battle.Mulligan\IMulliganMgr.cs Wizard.Battle.Mulligan\IMulliganMgr.cs d49640f1076af798e9114ff9058b7fdfe5d5a194ed2420a6ef95122fa10d8c0f 0 +Wizard.Battle.Mulligan\MulliganCtrl.cs Wizard.Battle.Mulligan\MulliganCtrl.cs dbb991240686c69313e36a6e7773acbf2e877eefb1153a7ee985379755ca36c7 0 +Wizard.Battle.Mulligan\MulliganInfoControl.cs Wizard.Battle.Mulligan\MulliganInfoControl.cs 96b05ee5e79977b06a9f8d3e2f027b350baf06cbb49dc5d569b0cd4ca8030fda 0 +Wizard.Battle.Mulligan\MulliganViewBase.cs Wizard.Battle.Mulligan\MulliganViewBase.cs 641fd480d2682454e5eee8bf149498ad23811752900dcc43de5b994c77b76b58 0 +Wizard.Battle.Mulligan\OpponentMulliganCtrl.cs Wizard.Battle.Mulligan\OpponentMulliganCtrl.cs 68ad23dde55aaecf68521d861b4d61a5569caeb8b524058f2fafead7a79f727e 0 +Wizard.Battle.Mulligan\PlayerMulliganCtrl.cs Wizard.Battle.Mulligan\PlayerMulliganCtrl.cs 19da0c8f4d906a0151537e458feba897f497e0e58e98cc073af8ca17a46e992b 0 +Wizard.Battle.Mulligan\PlayerMulliganView.cs Wizard.Battle.Mulligan\PlayerMulliganView.cs 9ec7621e20fb7b26e60f532612dc2598bb6b19b8d5f6d10f9616a42ad203832a 0 +Wizard.Battle.Operation\IOperationCommand.cs Wizard.Battle.Operation\IOperationCommand.cs 71d184f986afd2d5160a6f7121ef8f80e50c018b48c21d5e3b6c14086df8c494 0 +Wizard.Battle.Operation\SimulationSelection.cs Wizard.Battle.Operation\SimulationSelection.cs efe3abe803236d55e3594f15b65dafd9fff41a526e291a217ce63d1b89ecb475 0 +Wizard.Battle.Phase\IPhase.cs Wizard.Battle.Phase\IPhase.cs dacb64f72e43ea5c900c2fba5abcae616e9243f2c80bd2129af54263636f5ad7 0 +Wizard.Battle.Phase\IPhaseCreator.cs Wizard.Battle.Phase\IPhaseCreator.cs 14fceafb7bfc643cc5022d38744b03926cda07bb67d1178b36a7ea614432259e 0 +Wizard.Battle.Phase\IResultPhase.cs Wizard.Battle.Phase\IResultPhase.cs ba6732b9a31dad0a47b298cc85e5ee8b067875189f0225b8abed93e3f059c442 0 +Wizard.Battle.Player.ClassCharacter\IClassCharacter.cs Wizard.Battle.Player.ClassCharacter\IClassCharacter.cs c1a985539e3b304260d87f4af6ec249d939dc0385e7cd902634296c4127d991f 0 +Wizard.Battle.Player.Emotion\EmotionBase.cs Wizard.Battle.Player.Emotion\EmotionBase.cs 8a8edb24dbf845b07acf74e70658335d8fe23f67105e1e70e814153b836d4fad 0 +Wizard.Battle.Player.Emotion\IEmotion.cs Wizard.Battle.Player.Emotion\IEmotion.cs 289e34823e07e0fa97f0259e3eeeeb1e0475f5c78aff8f6515f4208c7ad2f2e5 0 +Wizard.Battle.Player.Emotion\IPlayerEmotion.cs Wizard.Battle.Player.Emotion\IPlayerEmotion.cs fe56394e17ad9a097aa1ef3da9df965c05e62c9850c21601b49b6eb87841d1d8 0 +Wizard.Battle.Player.Emotion\PlayerEmotion.cs Wizard.Battle.Player.Emotion\PlayerEmotion.cs f5c02d38012cea684c668d7db6b07cdeaecd31072a6d2bc727fc2ddbbb5689ca 0 +Wizard.Battle.Recovery\BattleConditionEnemyInfo.cs Wizard.Battle.Recovery\BattleConditionEnemyInfo.cs 35f6c55a91314ee7cda4d1c93658aaafa972118ef0363c736dcd752bcaaaaaf0 0 +Wizard.Battle.Recovery\BattleConditionInfo.cs Wizard.Battle.Recovery\BattleConditionInfo.cs d24a150006f866efadf537fd45c760cfed23d3373be6c7fcf39438827e00226f 0 +Wizard.Battle.Recovery\BattleConditionPlayerInfo.cs Wizard.Battle.Recovery\BattleConditionPlayerInfo.cs 82270e49e674a227d787fca1094c22e7a658b20defb16c97aede6277b37687c6 0 +Wizard.Battle.Recovery\CardInfoBase.cs Wizard.Battle.Recovery\CardInfoBase.cs 3f0fae0f3f349df4971545fd110ca59e54f61fba2b12561e5bc2c7b7cbe480a7 0 +Wizard.Battle.Recovery\CemeteryCardInfo.cs Wizard.Battle.Recovery\CemeteryCardInfo.cs 46ce6f2b9545c53125d01c675a73b68d3bd15657043ade82d12faf4d164879ef 0 +Wizard.Battle.Recovery\DeckCardInfo.cs Wizard.Battle.Recovery\DeckCardInfo.cs 39d2175e71f975b31bd61541a1fdfc71ed23bc1d65c8975d144af84c36afefd5 0 +Wizard.Battle.Recovery\HandCardInfo.cs Wizard.Battle.Recovery\HandCardInfo.cs b0415ca48e21a5a7d9c5d71b0540155bddf640512bedfb61ce76b23eb6b3c477 0 +Wizard.Battle.Recovery\IRecoveryManager.cs Wizard.Battle.Recovery\IRecoveryManager.cs 183fafee041522a2c67f6e3c0b50751e4591e507f8f2950658fbc29ad3cbc78d 0 +Wizard.Battle.Recovery\IRecoveryRecordManager.cs Wizard.Battle.Recovery\IRecoveryRecordManager.cs f8f95b3c268918fd18b849616a576e763819bf3d376dbbdb4a60393370a2d4e7 0 +Wizard.Battle.Recovery\InPlayCardInfo.cs Wizard.Battle.Recovery\InPlayCardInfo.cs 63491906ad4c2e18fd2e7eadec2ee92d15eda18b8f726ec38f969da79e30155c 0 +Wizard.Battle.Recovery\RecoveryController.cs Wizard.Battle.Recovery\RecoveryController.cs b433838072979be22767455344a4529b74ec0cc4261c4606ec2100897b7e8889 0 +Wizard.Battle.Recovery\RecoveryDataHandler.cs Wizard.Battle.Recovery\RecoveryDataHandler.cs 972832014b77ce9a1f5fff1df87a2222b8c62aedc2057bb931646e85bee24c08 0 +Wizard.Battle.Recovery\RecoveryOperationInfo.cs Wizard.Battle.Recovery\RecoveryOperationInfo.cs 37787cc77b98e18d1d4b9727d6bb640c04f47adf15ac463aab7b609e80a756ac 0 +Wizard.Battle.Recovery\ResultConditionInfo.cs Wizard.Battle.Recovery\ResultConditionInfo.cs 52d21760da08ba7b0e6e067cb7dc7a3890638ed6949305d3ad42a1fdf04e4743 0 +Wizard.Battle.Recovery\SetupConditionInfo.cs Wizard.Battle.Recovery\SetupConditionInfo.cs a5b78784312eb08496ef6db3b2c61a53957cf288c93c53714674972f5f4d2b9e 0 +Wizard.Battle.Resource\IBattleResourceMgr.cs Wizard.Battle.Resource\IBattleResourceMgr.cs 59e39c39afa8186f237fa879f5cdb043aa2dc99e5117eb0e1204df77b563d607 0 Wizard.Battle/ActionProcessor.cs Wizard.Battle/ActionProcessor.cs 7c8b40454a4948dd48a58c0efc240703eab9a77aea0add64e542f6b06c7323af 0 +Wizard.BattleMgr\IBattleMgrContentsCreator.cs Wizard.BattleMgr\IBattleMgrContentsCreator.cs 7f1410027b146fe028bfadf5940599f1e576063dfa764e0be2754dfd7d19e30f 0 +Wizard.Battle\IBattleCardUniqueID.cs Wizard.Battle\IBattleCardUniqueID.cs 0b1559e61bfd02f584b4830ad53aa6ce521665c00ff44ee89dda2953c9c3d781 0 +Wizard.Battle\IInnerOptionsBuilder.cs Wizard.Battle\IInnerOptionsBuilder.cs 38160d48e9b01d686c0fd51a5743ee97afb742c97c1fda347460047a7d17b928 0 +Wizard.Battle\IReadOnlyBattleCardInfo.cs Wizard.Battle\IReadOnlyBattleCardInfo.cs 1b3456595cf0664d7b1e3324268f84cf913c3e2778ecbacc63b0c0ba72ab2e8c 0 +Wizard.DeckCardEdit\CachingCardBundle.cs Wizard.DeckCardEdit\CachingCardBundle.cs 3efcb163e9be8d023e12394684c83745081c500cf13a84b91674aab0eeace113 0 +Wizard.DeckCardEdit\CardBundle.cs Wizard.DeckCardEdit\CardBundle.cs ae56efeea60e2288b595d57f6b48bc83661ff8f22b0607746a39b080714e439e 0 +Wizard.DeckCardEdit\CardBundleController.cs Wizard.DeckCardEdit\CardBundleController.cs fa0cf42cf3d42e56dbcf0702ba21f15ccf4f4f38a7318472cbf8f473f7d97a61 0 +Wizard.DeckCardEdit\CardBundleControllerBase.cs Wizard.DeckCardEdit\CardBundleControllerBase.cs 2b782fafb3043b1c67799228bf41ce3997bfa7c0a23492e090512c3677c62820 0 +Wizard.DeckCardEdit\CardCreator.cs Wizard.DeckCardEdit\CardCreator.cs e0c36db83ca43934ae4220f914a5da027cf8cf8d7a81e593bc6782ae5fa7dde1 0 +Wizard.DeckCardEdit\CardObject.cs Wizard.DeckCardEdit\CardObject.cs 602634f96d9c4c897465a2d3cebca885c7696135cfd4ebe9881bdd70fb97bf88 0 +Wizard.DeckCardEdit\FilteringCardBundle.cs Wizard.DeckCardEdit\FilteringCardBundle.cs 920e6cb5399277f6f2e2825e6cd5610b5d4dffb50d4c87b540a1d4b53b5d97ca 0 +Wizard.Lottery\LotteryApplyData.cs Wizard.Lottery\LotteryApplyData.cs a1f736b119c42db936962ef4b57821e5f0aaf4ab1458b6c2f92f25c727e4efcc 0 +Wizard.QuestSpecialResult\QuestAssetManager.cs Wizard.QuestSpecialResult\QuestAssetManager.cs 13ae6dae3eb9d98368e13a0435e061fa70f0b8a5965c591e3bd41ff16d452947 0 +Wizard\AIAccelerateInformation.cs Wizard\AIAccelerateInformation.cs 0b2558c3d4b87221a849f6e5a6622b517c9fad31e500f2f1f04ac1b20545fadc 0 +Wizard\AIActivateCountTagArgument.cs Wizard\AIActivateCountTagArgument.cs e834197ddb81a1369cbd4f7ed3e3e5cd265809d0afe7a7e8f5e6313d9c7824d2 0 +Wizard\AIActivateCounter.cs Wizard\AIActivateCounter.cs 8cb3ed5c7d1d9ca266ce52425be67168a742605f949c7e60f68b4e728b1fa43c 0 +Wizard\AIAfterDamageStopCollection.cs Wizard\AIAfterDamageStopCollection.cs b98d31ef1308d6261f4c783fabf0a9a5b01e22b034986559c155c0fb81a2b247 0 +Wizard\AIAfterDamageStopInformation.cs Wizard\AIAfterDamageStopInformation.cs fb0e9d053208527fcda7d2b11e8e1488a3ce970519c2b132d0579011c57a7fe1 0 +Wizard\AIAttachOperateMgrBattleEventCache.cs Wizard\AIAttachOperateMgrBattleEventCache.cs 53f76574938d64f03f0adc0964cb8de4a133a37276c2643f81bec99ca932d27c 0 +Wizard\AIAttachPlayerBattleEventCache.cs Wizard\AIAttachPlayerBattleEventCache.cs 787f446c803ef676c8c4a7532228a57f65077d515c7e90eb787de3d3db728662 0 +Wizard\AIAttachedTagCollection.cs Wizard\AIAttachedTagCollection.cs 6a93e39cf4f6135437938199c00a4c5a6824b7a874d4a1b4f520a74978890dde 0 +Wizard\AIAttachedTagInformation.cs Wizard\AIAttachedTagInformation.cs 28169a7a9572155b3cf4da0238c4f9cdc00f07f0bbced0d310b7c1fdb6429846 0 +Wizard\AIAttackPreCheckInformation.cs Wizard\AIAttackPreCheckInformation.cs 763002d0cbfa6c60fdaabe638adebd991b731619cb317f038301519c55881b12 0 +Wizard\AIBarrierInfoBase.cs Wizard\AIBarrierInfoBase.cs ba0998c9b29c1e158df7e649c52c4611fa820905840a89afc79e6a966f7290c9 0 +Wizard\AIBarrierInfoCollection.cs Wizard\AIBarrierInfoCollection.cs 373046001ab854a988dd8e6e18b0d7727650bf5fa334ae83de77322265ef7e5c 0 +Wizard\AIBarrierPseudoSimulationInfo.cs Wizard\AIBarrierPseudoSimulationInfo.cs cb2f36694001eda21a03ca2292914d8c75c43ed2cf50b950c46d9409599c3866 0 +Wizard\AIBarrierStopTiming.cs Wizard\AIBarrierStopTiming.cs e0f3f5691214baa3bfa42b7d2333d05cbeaa43b962f6e58ba94e347173fec931 0 +Wizard\AIBarrierType.cs Wizard\AIBarrierType.cs 7e0ddaa801358ddeea09c87eb884102628547554b021d3e8bf307de506e0211b 0 +Wizard\AIBattleInfoReceivedData.cs Wizard\AIBattleInfoReceivedData.cs 48ba9398d89504579620ab39ac385ccda44e78d0b2b224a0ba76302cc5630b0c 0 +Wizard\AIBuffExecutingInfo_old.cs Wizard\AIBuffExecutingInfo_old.cs 402c325b09513f06789bd7ef919604d6e8274bbaf5b79693ab2c00962faff18e 0 +Wizard\AIBuffRecorderCollection.cs Wizard\AIBuffRecorderCollection.cs 6c61fc8962bef66dc3002e46fe7eeccabdb0e05a5cc3866ed548380da1e1f784 0 +Wizard\AIBuffWithTargetsInformation.cs Wizard\AIBuffWithTargetsInformation.cs 8badcf2dafc38e5b49cec01b5dfd253c04477e313844a624ddff26168a195bc9 0 +Wizard\AICannotAttackInformation.cs Wizard\AICannotAttackInformation.cs 338fdbc7e7a727c3c0ebfda141698d0bc19c3958d303f21bf92d188925c4b1ba 0 +Wizard\AICannotPlayInformation.cs Wizard\AICannotPlayInformation.cs 640571c76dd20a995018041244934a9f71d33e766bb4f6067f49a327028b4f9a 0 +Wizard\AICardData.cs Wizard\AICardData.cs 7ef51bfa266263adb76e3b8e75ca6de4f607cb669ea29c778a2482cac8cc1e93 0 +Wizard\AICardDataAsset.cs Wizard\AICardDataAsset.cs 39d4e3ac7e97b8b32b337eb696c8fca45a04a9cfcfbd0239a86d0a3dbd41b1c9 0 +Wizard\AICardDataAssetSet.cs Wizard\AICardDataAssetSet.cs 49bccb382d26f636277f90f5e0d638ff4c3a0a784c327885f5d5c9930098bbfc 0 +Wizard\AICategory.cs Wizard\AICategory.cs b4da86a28aac7ddb1151eb23521329e068b48274a6c4ca657975be7eb3e1be97 0 +Wizard\AIChoiceTransformCostInformation.cs Wizard\AIChoiceTransformCostInformation.cs 1e2066a8f30d209f4bb9c3902346130fc52125acca52ace2f56f5cad02bca05c 0 +Wizard\AIConditionExpressions.cs Wizard\AIConditionExpressions.cs da8d0450cbe4022236a9d2ca429812bed7f595d357d70564c53a69b0dec9b600 0 +Wizard\AICrystalizeInformation.cs Wizard\AICrystalizeInformation.cs 6375ba72325ef0be913a9f10efa7f67ede4ec67d01f1df5d44e2f4f05a12d959 0 +Wizard\AICsvLoadingInfo.cs Wizard\AICsvLoadingInfo.cs 0800e6d793b8c2c9d157d67a31aef7e4df2e954e46c07afbbe2f5e481c521f20 0 +Wizard\AIDamageModifierCollection.cs Wizard\AIDamageModifierCollection.cs 37e1407dd6350d13fc1ace8f1c7a447603d5d2c1ead2241a945ff91cebfd7622 0 +Wizard\AIDamageModifierInfo.cs Wizard\AIDamageModifierInfo.cs db83f7ebc48e6b921c7124f5a01b8ac3b94fef4576f4ca05a1c8c9bf4fb0908a 0 +Wizard\AIDamageType.cs Wizard\AIDamageType.cs 53e9b9bb6ff6f24b08e3a417f891d03e03c4d410a00593aea5cdc61e43d65508 0 +Wizard\AIDataLibrary.cs Wizard\AIDataLibrary.cs 6d7575b5f6fb9598ad0756fa07fab30804d846a8efc0a6290f7156f2b0f2aac7 0 +Wizard\AIDeckAcccessor.cs Wizard\AIDeckAcccessor.cs cb0ec83c0cea9f3fe95f8f6cdd3cd5bb5e52338dd3e095dc89685782c7b34ef1 0 +Wizard\AIDeckData.cs Wizard\AIDeckData.cs 6b07e0390a656f1e9d4cdf8127f5ab1a68fa1b99633b60ec8c6ea416b84a597a 0 +Wizard\AIDeckFileNameList.cs Wizard\AIDeckFileNameList.cs e04bd8c0739e473ed6cc8d6ed7d5058ced48647f143b46fe7b8fbcd98335485d 0 +Wizard\AIDiscardInfo.cs Wizard\AIDiscardInfo.cs 8d26fd1c9bb13f6684bf7be6e44ca974728a6c8b072fbc731c5068727a533c83 0 +Wizard\AIDummyDeckContainer.cs Wizard\AIDummyDeckContainer.cs 4dce0c7e7933f388a5c3c60d2a03c6df318f0c60c9fa5a49007decd5dde63e0e 0 +Wizard\AIEmoteCmd.cs Wizard\AIEmoteCmd.cs d71aa0e4310ad191cad59c02944644559e215e9bf5294fe58664484e6b9301cb 0 +Wizard\AIEmoteCmdType.cs Wizard\AIEmoteCmdType.cs b756e835578b5964ae2bc82abdb0271223d91864199ba2bce00d3bf5d35ac7db 0 +Wizard\AIEmoteCtrl.cs Wizard\AIEmoteCtrl.cs a98c88d9fc68bea88b332865348091d6b1b9afa489316dca836f091952d93d24 0 +Wizard\AIEmoteDataAsset.cs Wizard\AIEmoteDataAsset.cs 2019e29004374a2cfc31de144e218b219e2b4463fcbf212c83fc3f1c23ed4359 0 +Wizard\AIEmoteFileNameList.cs Wizard\AIEmoteFileNameList.cs de751646c462492238ec484d68e12e9fdf3445ca5d7891c6c13e5f5ccbfef6c2 0 +Wizard\AIEmoteMng.cs Wizard\AIEmoteMng.cs 9903c0649369f0ce0868056982734601c85d807c1b967b2450f964c5de8d3c76 0 +Wizard\AIEmoteQuery.cs Wizard\AIEmoteQuery.cs 07980237bee820ce3f47d46ae92ccecee4c9dc322e6633be878f5f611e41a720 0 +Wizard\AIEmoteSet.cs Wizard\AIEmoteSet.cs 45a051f97c432fa36e6f9fc545c59a086e9e5537fb040c62da8418870eeeb967 0 +Wizard\AIFunctionResultContainer.cs Wizard\AIFunctionResultContainer.cs 32c12c6a5326f256b7e50d83c7d1f2709b4e208b9a932255476f71e297dfa5a4 0 +Wizard\AIFusionSituationInfo.cs Wizard\AIFusionSituationInfo.cs abf01be029bd5fe69ec109d3541d452c92c21ebe849eea4ce5127165bc790360 0 +Wizard\AIGenerateTagOwnerTable.cs Wizard\AIGenerateTagOwnerTable.cs 5ef0628f2c7f6ba87e5ad684a92e79f2e29c8a9415bcc581890fca4efced4343 0 +Wizard\AIHandPlayEstimator.cs Wizard\AIHandPlayEstimator.cs a784c18d6db69769630084960b90572613ec6f35b20fa322bb5e77375f915639 0 +Wizard\AIHealRecorderCollection.cs Wizard\AIHealRecorderCollection.cs 87ceb977aa25f08c175da7c59d74f7f5fb9911402f10bdf4cafc783e7184f9a9 0 +Wizard\AILeaveStopCollection.cs Wizard\AILeaveStopCollection.cs aa64e33458c0ba01c24f82fb26f8fe830456dd17e1c62ca194526331bd2f45ec 0 +Wizard\AILeaveStopInformation.cs Wizard\AILeaveStopInformation.cs 4cfdbf2de116f487cfdb8c7922db6ffd753e424004de18d7393ede500b945f80 0 +Wizard\AILethalPlan.cs Wizard\AILethalPlan.cs 248a596eb9e5af3c8df3d3c71676fd69409b231771b72bf004ccf4def7d11ca1 0 +Wizard\AIOperationProcessor.cs Wizard\AIOperationProcessor.cs 987a69fce793dded4c54d03f52dfe9be47eddc6695b7d99ed6447ec632a13eb3 0 +Wizard\AIOperationSimulatorAccessor.cs Wizard\AIOperationSimulatorAccessor.cs 7b129b65a6fead48a9ab950b3bfe7cc0dc80559a6022b2f2a51a6ed9bfefa501 0 +Wizard\AIOperationType.cs Wizard\AIOperationType.cs 2e26a9ca0d4c3a57710ec8d19f6f1481ae54c0e3f7a5510080e6bb2bdcfcea81 0 +Wizard\AIOwnSkillProcessRecord.cs Wizard\AIOwnSkillProcessRecord.cs 6dfc068e5c01160fec9067d925c28fca631593303a37eb01a73f572826127110 0 +Wizard\AIParamQuery.cs Wizard\AIParamQuery.cs f72f4e7957b25eaf73fd016678ff0a359cf290570c43307d4d557e4c0848cbf2 0 +Wizard\AIPlayOutAction.cs Wizard\AIPlayOutAction.cs d92398f58ff03224c5a3b4d3c11bb8a3e271c29f940801ca0fa2635897d52c57 0 +Wizard\AIPlayTag.cs Wizard\AIPlayTag.cs 2dba08af840cde17384636259c1a8736220d48ca61a94716db6d0ee5e6ed5e25 0 +Wizard\AIPlayTagAsset.cs Wizard\AIPlayTagAsset.cs 1b87a0193f4cf8653bafd6daaddddf662c91a7c956e2d98955b9d2c252aa2a93 0 +Wizard\AIPlayTagType.cs Wizard\AIPlayTagType.cs 98a5f5b22a3f7efe66cd9bfc9314bb71cd25d28d06a660a0dba542cbd62dd62d 0 +Wizard\AIPlayedCardContainer.cs Wizard\AIPlayedCardContainer.cs bfa459b95817c77dfdc3b14d445ed256c17b3f4fcdf902ed19ce08b408c8673c 0 +Wizard\AIPlayptnRecorder.cs Wizard\AIPlayptnRecorder.cs 12efcd9a633f4d916a07b032e457c371a34e62e624d6d65a44ec11b24b6a652c 0 +Wizard\AIPolicyCollection.cs Wizard\AIPolicyCollection.cs b5971a463a61c052b287a24e544367117555d0572989de2dbeaf5f27bd845384 0 +Wizard\AIPolicyCollectionContainer.cs Wizard\AIPolicyCollectionContainer.cs cb2fb55f80cfef1254b5d7fa9587b9b80f3f46d7106146b62039bb5dfa19607d 0 +Wizard\AIPolicyData.cs Wizard\AIPolicyData.cs d121c5671ed8921f300da67ff87ce400673848c8884998b558c87622d474b12d 0 +Wizard\AIPolicyDataAsset.cs Wizard\AIPolicyDataAsset.cs 9eb4a2b26aaa831c0c24845ab2484f7647172bb1cd7d9619e67b235a5cdf03d9 0 +Wizard\AIPolicyType.cs Wizard\AIPolicyType.cs 139ba46866994d03e271e10351bae6960a724f4e14e2efe7ca7567bf0ff96567 0 +Wizard\AIPolishConvertedExpression.cs Wizard\AIPolishConvertedExpression.cs 2c37d1665811937b1103d742d6154a88d9d6549e926c842bc4461456ea63efb4 0 +Wizard\AIRealActionInformation.cs Wizard\AIRealActionInformation.cs bace0d857b7345017e6d76cd2485d5d12bde4c7357046e04b483d19f4a37e502 0 +Wizard\AIRemovalType.cs Wizard\AIRemovalType.cs a21dcef29cd2a5b50cac7ddc4e6dc046049a94cf0b607985fd211216c0f46ec4 0 +Wizard\AIRemovedTagCollection.cs Wizard\AIRemovedTagCollection.cs 9131b82dd4626aacbc8b85fe09e1c93049e2fe4f1dc0d748e6dc99965731de66 0 +Wizard\AIRemovedTagInformation.cs Wizard\AIRemovedTagInformation.cs 02359747ab3ef0417f6d9a57b675e1cc76f0d7739acf37c81c1fa0d4f4d9675d 0 +Wizard\AIScriptArgumentExpressions.cs Wizard\AIScriptArgumentExpressions.cs f84b6e5cd8c7ace4cca42f83ef307ce9ec20b98b7518aecec372f4eb36d2cd0d 0 +Wizard\AIScriptCalculationToken.cs Wizard\AIScriptCalculationToken.cs 6ab1018faf72d60041c56cc77c4d0bf5aa656a014f82223df64280660e6d963d 0 +Wizard\AIScriptTokenArgType.cs Wizard\AIScriptTokenArgType.cs dac60cafacf16e8be5d4152f77e601c78380fc45ee18ea50a5249141fcd7a26d 0 +Wizard\AIScriptTokenBase.cs Wizard\AIScriptTokenBase.cs 1e170b08af4926101bb84e7a907b25b95315d30c391e3f90578ad6d649f015ce 0 +Wizard\AIScriptTokenFuncType.cs Wizard\AIScriptTokenFuncType.cs 2a67c3c917fc92479a1d0d65407bbe9cde91517d70d149bf97133095af3c5dc6 0 +Wizard\AIScriptTokenType.cs Wizard\AIScriptTokenType.cs 25fa54f16c1a614e75888da9b01bf82c48484f221e34135f54ed45f2f594c128 0 +Wizard\AIScriptTokenVariableType.cs Wizard\AIScriptTokenVariableType.cs 31a17a1a1892b28d1836475adb5f5fb6d8371579c4e117b8e934d1520394734f 0 +Wizard\AISelectedTargetInfo.cs Wizard\AISelectedTargetInfo.cs e5bd0b74bb61210fb74c7e32ea756c210b11606ff3ee8fd50db2eb3410b594b6 0 +Wizard\AISelectedTargetInfoSet.cs Wizard\AISelectedTargetInfoSet.cs 7ce8704230b0e3845ab6fca518d57fed7014bc865be3d0068e6e1b6e0dfbf3cd 0 +Wizard\AISetUpData.cs Wizard\AISetUpData.cs 40fd759ff03db75b0ce7037a189ea5f5a9b41ebde0e7a534f7af001765922f2a 0 +Wizard\AISimulationBuffInfo.cs Wizard\AISimulationBuffInfo.cs a1220a11d4f07b0136353ee043781445021ecc4a2c20280010c063202eade9d8 0 +Wizard\AISimulationBuffInfoCollection.cs Wizard\AISimulationBuffInfoCollection.cs 5566d56d5ddfec6b112435eb625be7182bb2c8c7c5cd749f482034df6aff84c9 0 +Wizard\AISimulationPreprocessRecorder.cs Wizard\AISimulationPreprocessRecorder.cs 488c557427ce2e33b752cdf7dd4df6fedbc6b84f18009deddccd653f95211cdf 0 +Wizard\AISinglePlayptnRecord.cs Wizard\AISinglePlayptnRecord.cs c627b1e1f8f0bff9d872b97ceecb111bc827346fae29517ca4a52fc96c3a78b5 0 +Wizard\AISinglePreprocessRecord.cs Wizard\AISinglePreprocessRecord.cs 665cdff4396f8628d7a4c237bf68060376bb95f3b8497efc0dadcfce5e4ccd1e 0 +Wizard\AISituationInfo.cs Wizard\AISituationInfo.cs a2c623dcb04b510aa1040a03c881a2653f1c8daf03965e605f72936eb1326e00 0 +Wizard\AISituationTriggerInformation.cs Wizard\AISituationTriggerInformation.cs d555644f8f6aeaadf504f8cb75790d39e5cc767a17d0b570d78428e13cc6487a 0 +Wizard\AISkillProcessInfoCollection.cs Wizard\AISkillProcessInfoCollection.cs e879231368bfccdddd19c35581434aa64bb098c54568f26badde1e7eb63af762 0 +Wizard\AISkillProcessInformation.cs Wizard\AISkillProcessInformation.cs 363a1cde610924a277d4fd8fe2f3bec987092303f925ddd15b9aefc0da3fcc23 0 +Wizard\AIStyleData.cs Wizard\AIStyleData.cs b75cc3deb327eae14e96b093b08f66eab487dec8b59a30c64cee250bf7529f28 0 +Wizard\AIStyleFileNameList.cs Wizard\AIStyleFileNameList.cs 1a15d2ba07c655c979cbf8834db7bafda84903e6acc1b26f5bedcce4237f8154 0 +Wizard\AIStyleKey.cs Wizard\AIStyleKey.cs 6de01f9b6e4e7facd907e2d36e12a8a2313645438595bf25f36dc7fc67276470 0 +Wizard\AIStyleQuery.cs Wizard\AIStyleQuery.cs 6169604f23901d24f1bf2781c25d17284e52b21a1cf85795e3ea89b5fe017031 0 +Wizard\AISummonedCardContainer.cs Wizard\AISummonedCardContainer.cs d0bfb2ed4b33f3945b9e04fdf8c55695164c4c16612c1e488794afce79f7601c 0 +Wizard\AITagCollectionContainer.cs Wizard\AITagCollectionContainer.cs 27d58c22dca581c88747a8638279d60ab08d3171ba99e2e090e9633299c0196d 0 +Wizard\AITagPreprocessCollectionBase.cs Wizard\AITagPreprocessCollectionBase.cs e34637b6e62216a23657c91a3f1ee73e97e59da9d9bd081efd4ca6d4e34f1e1d 0 +Wizard\AITagPreprocessCollectionContainer.cs Wizard\AITagPreprocessCollectionContainer.cs 00084fc071bdfb48b7e631456f962be85c8118c6e5bef2a45b9c93593a1e8f74 0 +Wizard\AITagPreprocessCreationOptionBase.cs Wizard\AITagPreprocessCreationOptionBase.cs eb9315ebfb1987f84580adca2a88e8dc15133aa04db4d561621246deb65ac87e 0 +Wizard\AITagPreprocessInfoType.cs Wizard\AITagPreprocessInfoType.cs 665eae10681ddf1d887f7a74238f34547fc03e16525b423b420a29e994059611 0 +Wizard\AITagPreprocessInformationBase.cs Wizard\AITagPreprocessInformationBase.cs e18a087047b3036f679ae974be8b2a50a5ddf88203ff29d6b626c9ae25db0002 0 +Wizard\AITokenIdCollection.cs Wizard\AITokenIdCollection.cs dbf0f2fd026e6d20846c02ffec5fa32f1c659fb4f00b3a1c6e1f30638499b74e 0 +Wizard\AITokenInformation.cs Wizard\AITokenInformation.cs 911f946fad7fb683cd339c1d3582cc13e81e96c17eb241f260aebf584c8a8914 0 +Wizard\AITokenManager.cs Wizard\AITokenManager.cs f0ce94639584c1b363526168b4fd389f53a55736dd6638eeafa03d2d5d7aa670 0 +Wizard\AITokenPool.cs Wizard\AITokenPool.cs 7168cc127e6d2d3f8fb71f084ec127d1df61ed7c146aa7180702b7056c747320 0 +Wizard\AITokenType.cs Wizard\AITokenType.cs ce54ae877e3ca2b888bcf80ff8b8494165fec70e7a4f13feea2e8fe03dfd09ee 0 +Wizard\AITurnEndStopCollection.cs Wizard\AITurnEndStopCollection.cs 136f36ed4e72e510181ac0402fcf399bb5f535fd7d31561be7f518b50e8f51f0 0 +Wizard\AITurnEndStopInformation.cs Wizard\AITurnEndStopInformation.cs 281335cf192a4366bd3199b0da5efaec06580652e644dd6b7c2c268cc51aa37c 0 +Wizard\AITurnStartStopCollection.cs Wizard\AITurnStartStopCollection.cs 7dd089da37cc3d173715402a51a39f48f0292d8e203c027901f87f23fe4311ba 0 +Wizard\AITurnStartStopInformation.cs Wizard\AITurnStartStopInformation.cs 76e8db6a6a26c267e5b8e07d9160ad9dad0576f0e79450829a709ae388dd231c 0 +Wizard\AIUseMinTagCollection.cs Wizard\AIUseMinTagCollection.cs 49be88a6eed6e2dfbf241579edcc26289cc55b2c44b69c20741a4331a1378318 0 +Wizard\AIVariableResultContainer.cs Wizard\AIVariableResultContainer.cs 56033f00c8e3140cbd10eb664754c95023508f39bea9feea9d23304207494ff6 0 +Wizard\AIVirtualActionInfo.cs Wizard\AIVirtualActionInfo.cs 801c6b5e247be407dcdeec45bc9a2f5f2410f3a29e011a17cb8d07ebf9ed62ba 0 +Wizard\AIVirtualAttackInfo.cs Wizard\AIVirtualAttackInfo.cs 16138524d2911ef07eae4739930e82dc39ea7a9602b9e52799ff1e8ea1fc3b94 0 +Wizard\AIVirtualCard.cs Wizard\AIVirtualCard.cs f37b7687359543b67e6934292a0d187326ed1ac3dd097e3e124f938832fa675e 0 +Wizard\AIVirtualCardBuildParameterCollectionBase.cs Wizard\AIVirtualCardBuildParameterCollectionBase.cs 14896f9714593475b4d33269f56967d442796011b453f667db13d97178ca33c9 0 +Wizard\AIVirtualCardParameter.cs Wizard\AIVirtualCardParameter.cs 0efb3001f156f1c6361b6794f06dd87bea04cc38c7b745d8df5f0b9d36c59ec6 0 +Wizard\AIVirtualCardRealTargetInformation.cs Wizard\AIVirtualCardRealTargetInformation.cs 4a234fd97705c34f3dda6849640115395632aaff4d354696cd8c35afa07be181 0 +Wizard\AIVirtualCemetery.cs Wizard\AIVirtualCemetery.cs c2707eeca2eb4d065b4b056abf85843509bd3dbb82b91d4747437f2887e89df2 0 +Wizard\AIVirtualField.cs Wizard\AIVirtualField.cs 0219d29471a281bbbfa4f60c07749a9e7d34077cff8221880fb96ec5b4977fae 0 +Wizard\AIVirtualFieldBuildParameterCollction.cs Wizard\AIVirtualFieldBuildParameterCollction.cs b3254b56ce4ee183df65a293880648998f8d909ca753d1f9db9acaba57c9256c 0 +Wizard\AIVirtualFieldRollBackBasicProcessor.cs Wizard\AIVirtualFieldRollBackBasicProcessor.cs 81541ea41b43625a1a7a52eebed6ebb76a8557fcdba4e3ca77849a5139ae4057 0 +Wizard\AIVirtualFieldRollBackRecord.cs Wizard\AIVirtualFieldRollBackRecord.cs e4be2b685c75a93716faae94ab5a6ad2577436bcd9296490fc1ccc396ae57d60 0 +Wizard\AIVirtualFieldRollBackStackProcessor.cs Wizard\AIVirtualFieldRollBackStackProcessor.cs 91c7aa2ad8aa81b00a9546775e5c877c7fd952050363b4d04ff236c401b8d6db 0 +Wizard\AIVirtualFusionIngredientsInfo.cs Wizard\AIVirtualFusionIngredientsInfo.cs 2139b7abc3dda0c64b9ef32312249e699f7420d46192a1213552c04bdf015497 0 +Wizard\AIVirtualTargetSelectAction.cs Wizard\AIVirtualTargetSelectAction.cs 23df015a493f920e8f0eaf3e88aafb0f8397fac75d7b17d131ac30f2b5404733 0 +Wizard\AIVirtualTargetSelectInfo.cs Wizard\AIVirtualTargetSelectInfo.cs c579901ee72ff4da84d5cdbc379897060ef0a7d2dbf6d03cafbf75585d47adb6 0 +Wizard\AIVirtualTurnEndInfo.cs Wizard\AIVirtualTurnEndInfo.cs 57004c97cdbcd0a560ef3e3053a28391e92e99ace0ccd2ff631f27a1180950dc 0 +Wizard\AIVirtualTurnStartInfo.cs Wizard\AIVirtualTurnStartInfo.cs c5bab0e979a9a11eedcdd3178b608f22f0db55ab9dd0d3b46532a64028945eef 0 +Wizard\AI_LOGIC_LV.cs Wizard\AI_LOGIC_LV.cs e6a97a7f33f421973293eff0f046a0a8422ddc4103f3fb7b77a114c0f6b7b9d6 0 +Wizard\ActivateCountTagCollection.cs Wizard\ActivateCountTagCollection.cs fb0b8de915750511da274995871c184582f447c1b1d5a6569960db243bf1f482 0 +Wizard\AddCardToPlayoutPlayPtnTagCollection.cs Wizard\AddCardToPlayoutPlayPtnTagCollection.cs be590b8fc0998c928f0130913b0aa923eaff662f21368401ab13ea2d763f349b 0 +Wizard\AfterAttackTagCollection.cs Wizard\AfterAttackTagCollection.cs 399655aabb4fb431693df63b42794178c30765b5e3e708214bc55a7a1a6b9236 0 +Wizard\AfterClashTagCollection.cs Wizard\AfterClashTagCollection.cs 7e4c59ef671559d3a1be6e9b7745fd67ff19afcdf2b37c8eb3eaa042596ef1ea 0 +Wizard\AfterDiscardTagCollection.cs Wizard\AfterDiscardTagCollection.cs 076f64ad48ce2473fe5aacbe16790488872c5c1992577ba9cfb7d1472ade0d27 0 +Wizard\AllyPlayBonusTagCollection.cs Wizard\AllyPlayBonusTagCollection.cs 04260820f1240296416afe9d579b64e16c953293375bd26d7b956a0f37341d16 0 +Wizard\AttachedSkillInfoReceiveData.cs Wizard\AttachedSkillInfoReceiveData.cs 40db29bd9eeb41d3a0e15aab0a91ddee7a24709d5742d05584b8a76100522aaa 0 +Wizard\AttachedSkillInfoReceiveDataCollection.cs Wizard\AttachedSkillInfoReceiveDataCollection.cs 9fccf7143e59065644b7cb96f1bb56f52ef4a5353eae76c1a161846544222c6a 0 +Wizard\AttackBonusTagCollection.cs Wizard\AttackBonusTagCollection.cs ead7de323b51ab6321e12b5ce37616db9d75cb4ba1c8b5887fd929383cd16586 0 +Wizard\AttackByLifeTagCollection.cs Wizard\AttackByLifeTagCollection.cs a67f23b492a670013588dee1fd854d9bcb9ae3c3a62a9b8020a57e40e2578a5c 0 +Wizard\AttackTagCollection.cs Wizard\AttackTagCollection.cs dfd6643aae0b0677bdd31fd52845c995bf14d4a78b4818d272f20f39e7c6340e 0 +Wizard\AttackableClassTagCollection.cs Wizard\AttackableClassTagCollection.cs 87f2a7fc4a2cca3d35ad802fbf745b621c94eb9b19e4f4414b763902064303cc 0 +Wizard\AvatarBattleInfo.cs Wizard\AvatarBattleInfo.cs d3417046e0acea3e6806fee941f30ee543f122d34956412ba61f5822e42c6a95 0 +Wizard\BanishBonusTagCollection.cs Wizard\BanishBonusTagCollection.cs 02d6a7110fe4433971e2499430f5bb929d665c70805a9c148f4b4108324bcb9c 0 +Wizard\BanishTagCollection.cs Wizard\BanishTagCollection.cs 9e9bfded276a6d2cdd2f21775da1d55d1b744b5a950d52ad369a0fac152f68b4 0 +Wizard\BannerDialog.cs Wizard\BannerDialog.cs 4c2e9f967bb9166bb2891bc9f01e16be05bad5a4734da3dcac094ec9419dcc9b 0 +Wizard\BaseParam.cs Wizard\BaseParam.cs aafba52c5b868cb4b3c9736c6706113d8d521c754bdc9b955c8b9deda221c722 0 +Wizard\BaseSeriesData.cs Wizard\BaseSeriesData.cs b5f6431a7d175f16784a36d07707c81d6f4ad0942135a0ee636de3de5caac758 0 +Wizard\BaseTask.cs Wizard\BaseTask.cs f6e3ff4403c4ec32bf1d37807c1f8b51e419caa7feb6fd81887ae09c6d7e1348 0 +Wizard\BattleBonusRateTagCollection.cs Wizard\BattleBonusRateTagCollection.cs cb619934e00027224da854ecdaae8e8c28757db722bfa2047f4cae761eb251db 0 +Wizard\BattleBonusTagCollection.cs Wizard\BattleBonusTagCollection.cs eef79191a777a20d78afb363f8e18cc4f3a82767b7aff749ef1322e9041a4842 0 +Wizard\BattleButtonControl.cs Wizard\BattleButtonControl.cs c01b03426b6150426c112d89cd9f21153dcf4bd7b587b6e6ff2dcbd954e9ddfc 0 +Wizard\BattleCardRealTargetInformation.cs Wizard\BattleCardRealTargetInformation.cs c42a18e1aa2e252cca98136dca1350cf4a6a3c0314e7362691ceceb4a2375c23 0 +Wizard\BattleInformation.cs Wizard\BattleInformation.cs 85808cdf3afae2207317b68833c14d5e65c10de6b630e7f5ed436ce4bfbe55cb 0 +Wizard\BattleParameter.cs Wizard\BattleParameter.cs a034f5db7cd37a8d8fc3e4b14a0e575694e236dbd6ca307d9ab1f827b99258c7 0 +Wizard\BattlePlayerPair.cs Wizard\BattlePlayerPair.cs ff8d3eb14f7bb8386d29f2891a1c5665ea857171bdae23493033729180b21bec 0 +Wizard\BattlePlayerReadOnlyInfoPair.cs Wizard\BattlePlayerReadOnlyInfoPair.cs da9aacfc922101e0b5d741b0233dc3f8597fd07d339a5366d037745b8c2a0a09 0 +Wizard\BattleRecoveryInfo.cs Wizard\BattleRecoveryInfo.cs 0a148f60eb5689ef33f58d98f43ea7f437702750dce77d9fbd7dc261118d44f4 0 +Wizard\BeforeTransformVirtualCard.cs Wizard\BeforeTransformVirtualCard.cs 96c43888d9a72d8bc8b4dcb86439e635fd5919f9b9499e4ba92035ca0bebd4bd 0 +Wizard\BossRushBattleData.cs Wizard\BossRushBattleData.cs 5b9afe850670e86c4721cb59e61d3bba4cf78d99e66c328ef778d183c4c06084 0 +Wizard\BossRushInfo.cs Wizard\BossRushInfo.cs 5e0c725f4d19e75b060bc8545f857c0f91dab77e994dcf1fbdbc67b2554a627f 0 +Wizard\BossRushLobbyAbilityCandidateData.cs Wizard\BossRushLobbyAbilityCandidateData.cs eeae65a4867ad4514df39f64edb586c9c3b5fe31ea9b58ac1f86e7b9baf66e7a 0 +Wizard\BossRushLobbyAbilityData.cs Wizard\BossRushLobbyAbilityData.cs 3a508f41271c634e404f7e84dfcb817d670ed03d919a551af7b79da062726ef8 0 +Wizard\BossRushLobbyBossData.cs Wizard\BossRushLobbyBossData.cs 9d6a1803f125be2c656e260e12634a466f074527daca5ef74c6130e24bbf6463 0 +Wizard\BossRushLobbyData.cs Wizard\BossRushLobbyData.cs c146839c5aec76d23cc93048a16b4f14e918611567810d669b7e1be840d582d1 0 +Wizard\BossRushSpecialSkill.cs Wizard\BossRushSpecialSkill.cs 13a0cc8b52ad626bbbb230cc07ffdda3c9ce695110c06a99c7e1e96006eaed88 0 +Wizard\BounceBonusTagCollection.cs Wizard\BounceBonusTagCollection.cs 8435ca19e8c937f1ad5c432048c453274e04bbb6dcf10bc0212787a78757cb91 0 +Wizard\BounceTagCollection.cs Wizard\BounceTagCollection.cs 39c3e32cf78aa1b7bf3679c40c7b1ce6f1d5b4f5775bfde82f35c14a94771f00 0 +Wizard\BreakBeforePlayTagCollection.cs Wizard\BreakBeforePlayTagCollection.cs ae0b615a06fb58b1b042669ee413e009fe00e22ed26e6a60fd7c08f4173e4631 0 +Wizard\BreakBonusTagCollection.cs Wizard\BreakBonusTagCollection.cs 45a5349698ea333a002e57bc55224cd6b418573ba64daa15443e42c811fe9250 0 +Wizard\BreakFirstTagCollection.cs Wizard\BreakFirstTagCollection.cs 96ba8fc479d7660a14317152215ec7c0580751851cc31fdf0eac439ee7f6dab8 0 +Wizard\BreakLastTagCollection.cs Wizard\BreakLastTagCollection.cs d60299bc656680461cbb2281b6c67f06bc988c6383ffcad6d91ff3e4c504d39f 0 +Wizard\BreakTagCollection.cs Wizard\BreakTagCollection.cs 5e6cdeacf56abe9077830a5baa5e0771c9df0286699365589fb097df4fa8e65a 0 +Wizard\BuffBonusTagCollection.cs Wizard\BuffBonusTagCollection.cs 1ba4e258a1b6c2aa9c823d8ff70bdc0712fc407d9e831272a81f9244271eae16 0 +Wizard\BuffTriggerTagCollection.cs Wizard\BuffTriggerTagCollection.cs 99d3a0179a6b33a85efaca75a7e2632fa0c0fc0073be168c83d7116e1b37602a 0 +Wizard\BuildDeckCard.cs Wizard\BuildDeckCard.cs 2f49148b8472e0a45edf5d4360902605658057db7c34abe6d3e8e46f7f299367 0 +Wizard\BuildDeckSeries.cs Wizard\BuildDeckSeries.cs 8f6144e6cb43e2a4924b3a5ebc06795d67461ea029bbc76126e97300532ba159 0 +Wizard\CantBeAttackedTagCollection.cs Wizard\CantBeAttackedTagCollection.cs f7460a54faa7c37f3ba07645ac6d65995eee549127907ca1e77d5aecef4ea6b0 0 +Wizard\CardCSVData.cs Wizard\CardCSVData.cs 228543612535910f39c39c273c6b55ab65214e2545bd77f97b38a6926ebc1ae4 0 +Wizard\CardCraftPanel.cs Wizard\CardCraftPanel.cs ae136c5d1bfae1ea48d57669c114d0aa03f248a0bf7cef70c35e6371f9a44123 0 +Wizard\CardImageHelpder.cs Wizard\CardImageHelpder.cs d7145108a61a669a9377af5eb021afeb0eb6a8e76a8311c6e7140abec0fe9725 0 +Wizard\CardKeyWordCommonCache.cs Wizard\CardKeyWordCommonCache.cs a729b53da036c709d41b0dfc6a3c242ca336cda412ec538bb8296305c5123a9f 0 +Wizard\CardListTemplate.cs Wizard\CardListTemplate.cs b41f32001b001470ac9aff768b4be92c3579999fe24f5de7646af80f31185fd1 0 +Wizard\CardListsForReference.cs Wizard\CardListsForReference.cs 71df5335307ff56a2db97fe44bddd70d1e33425314de3ea15e35a74a8a48cfd7 0 +Wizard\CardMaster.cs Wizard\CardMaster.cs 12b77985327a1e117d6af30c02a617c8de06203e73c77d1e16b86bdc2b312011 0 +Wizard\CardParameter.cs Wizard\CardParameter.cs a7ea3ce6d2efad06697ea5e9ea2ce0b38280139b2e55a55f0c48aca2c99109fc 0 +Wizard\CardPrm.cs Wizard\CardPrm.cs 41697c1ed692386772dfed98690e9a3471cbc295460b8fef2c7b5cbdfd223247 0 +Wizard\CardSetName.cs Wizard\CardSetName.cs 943b0083d367048c7cdebcfdc2780aee27f6d9f1adfafec7cb720830bb614f6f 0 +Wizard\CardSetNameMgr.cs Wizard\CardSetNameMgr.cs 146a4a804055f9c3341301c3823bda3cf3f560e8032b5df46e1b7fca87009649 0 +Wizard\CenteringUIWidget.cs Wizard\CenteringUIWidget.cs 1ddc0ddbbfcd6638010dc6889706b3a5944ac5b122103cf24f9c0d7adde66efc 0 +Wizard\ChangeInplayTagCollection.cs Wizard\ChangeInplayTagCollection.cs 0e52c7c354104e962110f89f72971455b6d1835ee41c01e07886fee28491dcd0 0 +Wizard\ChoiceTagCollection.cs Wizard\ChoiceTagCollection.cs ee83f8d599d0592e679c11c5c208841c1d044088b38e12604016e5f673f77cf9 0 +Wizard\ClashBonusTagCollection.cs Wizard\ClashBonusTagCollection.cs 2290a26a5cf6378f6dbaaa730edc33893fe4b3a19257f6f0a69e297ff3f07a71 0 +Wizard\ClassCharacterMasterData.cs Wizard\ClassCharacterMasterData.cs ccf929714e0900b6f422d46da6de8cb3c0702258ceb314509b6d7beac112fa93 0 +Wizard\ClassInfoParts.cs Wizard\ClassInfoParts.cs 75b6923688f22d49ddc97db55ecb6daae2c8c4d444ccfaae66625d85ce35e208 0 +Wizard\ClassSet.cs Wizard\ClassSet.cs 37d444f7109e8637da98bc721c35286d6f0c45c49dbcf552603e26e453908e32 0 +Wizard\ClassType.cs Wizard\ClassType.cs c0be0ce00bb64ad28a85f1f1edfafa0216b67a47fa8d744a1b69c19b78c786ce 0 +Wizard\CloneActualFlags.cs Wizard\CloneActualFlags.cs feadf48e251d85e8d9b76ce2a973f56102a2c753d788ad21055e577d1788f8dd 0 +Wizard\CondChoiceTagCollection.cs Wizard\CondChoiceTagCollection.cs e2cbd37890595adbf142aebaca58885a87788ad81dc9a78c7f9d6628d2147169 0 +Wizard\ConventionDeckList.cs Wizard\ConventionDeckList.cs 8653b2d3cfd9d69413b0483bf384e05e18e0ca3b52f6239a212c5e5f01f2aceb 0 +Wizard\CostBonusTagCollection.cs Wizard\CostBonusTagCollection.cs 8c6d5e7a4b886334eecb7e70ef787bc39de32eb5c5f0c2715f4eefd209ea71a9 0 +Wizard\Country.cs Wizard\Country.cs 833d76a4fa24fe50248cad54e6aa5eb6f4f20cf42afd17326638827e0380f133 0 +Wizard\DamagedTagCollection.cs Wizard\DamagedTagCollection.cs 8e6ecf677b4da8e16a68d3336959cd6d08af4830a0214297d65e96243f777c3f 0 +Wizard\DeckAttributeType.cs Wizard\DeckAttributeType.cs 006bb4c04d8a60c9caf04873dde6c962366348db03ec40a8bbc0071392f656dd 0 +Wizard\DeckGroup.cs Wizard\DeckGroup.cs c5334b68f875f193b100950fba847271ae5fe12e94c79aabd4a8220551066964 0 +Wizard\DeckGroupListData.cs Wizard\DeckGroupListData.cs d107ef3fc0cae879fe755256b94e8cc7ddcaa64d3cffa1143246dfe68a185150 0 +Wizard\DeckUI.cs Wizard\DeckUI.cs f99d5d852a206e73ee5c25406ae03380225bfea8c68ce24b69de8347e220af59 0 +Wizard\DeckVirtualCard.cs Wizard\DeckVirtualCard.cs 00c7e8d2ebae0dac6af30eb018cd1390a3ceba87b1348c93fe0c7c99eebf275d 0 +Wizard\Degree.cs Wizard\Degree.cs 0f3cf092884c7d4c5a4479ce9f887c3b93e77c2c1fd205379c785b4ec095dd22 0 +Wizard\DegreeCategory.cs Wizard\DegreeCategory.cs f68c21dc08c6bf0b20af52a33792e14d680c5dab5abb1f2d78eba08e418f7806 0 +Wizard\DegreeMgr.cs Wizard\DegreeMgr.cs 556894217a0903686b0c2c1b4895d0585a3b85863617e5f97dfe49edb02b2c73 0 +Wizard\DiscardedBonusTagCollection.cs Wizard\DiscardedBonusTagCollection.cs ca8a302ba3e3d8a55b1608812514a733458db7b819237308953fd33856178c72 0 +Wizard\DiscardedTagCollection.cs Wizard\DiscardedTagCollection.cs a69512ecef80fb292401593bb6d84436806d82d1e291283bfa239fc986fe070d 0 +Wizard\DrumrollScrollManager.cs Wizard\DrumrollScrollManager.cs e6737ba53a22d1ad16fb5b37d9dca3c550b4be58c442d5f0b1a628bed6c6fbbb 0 +Wizard\EarthRiteRecordContainer.cs Wizard\EarthRiteRecordContainer.cs 24174a54eaff51ffe79ac07b9093c7f4c60a17d5553cb35ad079e2f0b6544c38 0 +Wizard\Effect2dCreateParam.cs Wizard\Effect2dCreateParam.cs 99b02a3cf6255dcb255104d2a59a65d806fff8676e372dbc430066850cd77fc8 0 +Wizard\Emblem.cs Wizard\Emblem.cs 40fa3d4362ff82c882153f1974a24109c15843b7b293e3568c71dfe11c6647b6 0 +Wizard\EmblemCategory.cs Wizard\EmblemCategory.cs 983147bf89405c54d6270ed65d619138b8d86dbfc85080a2488d62497768ccdb 0 +Wizard\EmblemMgr.cs Wizard\EmblemMgr.cs 87285534a13166dca261b1bfb4bed260a7aedad0bb0bc544e10a157db47d3473 0 +Wizard\EmoteTagCollection.cs Wizard\EmoteTagCollection.cs ea18ac5bcf19f541d6feda09f7eb299a00c48c3b70081fbacc67ed8da7226ac6 0 +Wizard\EmoteUI.cs Wizard\EmoteUI.cs c312c9110380793bd972cd6641177b21ac99b356ce3e06862f278f13f10d1586 0 +Wizard\Emotion.cs Wizard\Emotion.cs 0cffcacfe1eb54bd02b66fb4ad54a3a146722e89b824ebb4c126904c87dfca8d 0 +Wizard\EnemyAI.cs Wizard\EnemyAI.cs d264983ee917e4b6268e30f01e49b5cfc278cd5c5d91e085f8bbeb148cbdd3af 0 +Wizard\EnemyAIFusion.cs Wizard\EnemyAIFusion.cs d3dd6db16807beb214c1c42481567a3bff6f729c3b793c8017771d23c6628f98 0 +Wizard\EnemyAI_Attack.cs Wizard\EnemyAI_Attack.cs 95b484d3ae841051e1ebbb83273c566ba52016c44158ee1b41c43b22acf7fdb2 0 +Wizard\EnemyAI_Play.cs Wizard\EnemyAI_Play.cs 26a62d83a770858b8b5dfb9f1bdf33917ecea9b456cbc2b43d59daa64ad5fd13 0 +Wizard\EnemyAI_Skill.cs Wizard\EnemyAI_Skill.cs d3eb3694c301a0b3ababf1561a9da1279fb1c97c01f9113a51095dc4c647a555 0 +Wizard\EnemyAI_WeakLogic.cs Wizard\EnemyAI_WeakLogic.cs ffcb5020b4387b6ef560e0f7564dd4c7565699b3a219e6f74d886319b0eceaf6 0 +Wizard\EnemyBattleBonusRateTagCollection.cs Wizard\EnemyBattleBonusRateTagCollection.cs ea09eb8f465a35b65cc89809aba3093ecbc1c51abaa1129eba5f1a68d2cf810c 0 +Wizard\EnemyBattleBonusTagCollection.cs Wizard\EnemyBattleBonusTagCollection.cs 071b163d0f713514ca6ce70a88a89fa36d7b53178d38ab1b31c3ef20150d1f2e 0 +Wizard\EnemyEvoBonusTagCollection.cs Wizard\EnemyEvoBonusTagCollection.cs 9e7770cc32c64ac0e598b675d30cb68783e204ee4961bdd2e791f0b78327b155 0 +Wizard\EnemyPlayBonusTagCollection.cs Wizard\EnemyPlayBonusTagCollection.cs e14aba377958be3a1481118f94da0486a522f3c5ab0db196a9b2b6c2ec8faca9 0 +Wizard\EvalInstantAttackInformation.cs Wizard\EvalInstantAttackInformation.cs 9d2898f1e88381cd29e39cafa4de5e4d6a7ee85b806158f368871726ae742bb7 0 +Wizard\EventStoryQuestInfo.cs Wizard\EventStoryQuestInfo.cs 1b664258a746d028f14816b3cd186d6fd1d4041ebf6e78b8e80ab1c0c72a3dfa 0 +Wizard\EvoBonusTagCollection.cs Wizard\EvoBonusTagCollection.cs f77e10af5d6d59cbc8d36b38916ea507278ab139ca869a22a3274d8e91cdb134 0 +Wizard\EvoHandPlusTagCollection.cs Wizard\EvoHandPlusTagCollection.cs 8d91fd61550cfd87d92885fe34ca5b1399400f8c0eb3f7f446494804e5179a6b 0 +Wizard\EvoTagCollection.cs Wizard\EvoTagCollection.cs f5d4674174526797f1ca154ea7d6b2975514e11de24d919593f7397b2810fd41 0 +Wizard\EvolveToOtherTagCollection.cs Wizard\EvolveToOtherTagCollection.cs 51a978c4aca7c80e6d03f5e1602516c48e4c5361fc38a95d598128c058f17a8c 0 +Wizard\EvolvedResidentTagCollection.cs Wizard\EvolvedResidentTagCollection.cs 357f1718ee170049c6e86488bc0ec4ca9fb659a3e68195e8b70c2ea538c96584 0 +Wizard\FanfareBonusTagCollection.cs Wizard\FanfareBonusTagCollection.cs d21e2af67aeca95420438f140aaec1445a9dc0be829231c4d50771f4ae807c64 0 +Wizard\FanfareTagCollection.cs Wizard\FanfareTagCollection.cs c5c99a0437a507b360bf6247fa823bb9f56a2f39746b3a251f918e0f85e5a945 0 +Wizard\FavoriteTask.cs Wizard\FavoriteTask.cs e7e846e293142749f1d30a88b83506ab04a17df3c3d182dd59af49fedefde445 0 +Wizard\FilteringImageSelection.cs Wizard\FilteringImageSelection.cs 6b8cab1cf1cac1d724a28e5b5fdedd08c9ae1131565cf709c49c0d65e072a3f8 0 +Wizard\FilteringImageSelectionItem.cs Wizard\FilteringImageSelectionItem.cs 42da761519d7ea0b58f684ffc3382a7c912a08db2dbaa04b89f10103ef43b62a 0 +Wizard\FirstEvoTagCollection.cs Wizard\FirstEvoTagCollection.cs 86154576e6fa624f9d379ca20bf760683b2b274d908e3ebbe99ea70666c68482 0 +Wizard\FixedCostTagCollection.cs Wizard\FixedCostTagCollection.cs ac1393292c3c1abc3af3d2668b13c51f9cf01e0315117f1e5dcd341fd45c7856 0 +Wizard\Font.cs Wizard\Font.cs c84085ad2ce2a33ed50ad8183c9a635970a3067a109feae6227ad76c85c7de84 0 +Wizard\ForceBerserkTagCollection.cs Wizard\ForceBerserkTagCollection.cs 386d3f9150076989b6a3ad3b8ed6ecd2ca4ba475be4c4dffae9cacdb8cb89b43 0 +Wizard\ForceImmediateAttackTagCollection.cs Wizard\ForceImmediateAttackTagCollection.cs 6d8c4aae8881f2395ac57450bcd0364b8bd0c1ed28700c3d65c0a44f6bbf5555 0 +Wizard\Format.cs Wizard\Format.cs da3bc270aeb1fce63610b6bd1857ef6e07019c7840ba3a549f607170a957b3ce 0 +Wizard\FusionBonusTagCollection.cs Wizard\FusionBonusTagCollection.cs 4903288da869da61c7a10520fd0815a168c5a1b1f00dc1fb011e509e88f69464 0 +Wizard\FusionDrawTagCollection.cs Wizard\FusionDrawTagCollection.cs fc333ea01f0840ce80d000384f65285513185a37eafe3c5b3999fb5fcb37c3ae 0 +Wizard\FusionMetamorphoseTagCollection.cs Wizard\FusionMetamorphoseTagCollection.cs adb96cf8a406a435815e619005cc27635dae060ebff295455ddb9a7a61223b39 0 +Wizard\FusionTagCollection.cs Wizard\FusionTagCollection.cs 82b1a33c1a0e089d9ee1ae621b5d16475d2634652d30138cd80decd193dd6d0e 0 +Wizard\GachaLayoutEffect.cs Wizard\GachaLayoutEffect.cs 35aa3a10942d329af9e9dadc2413879dd350541642778983efc5ae7ec2eaa1d2 0 +Wizard\GachaLayoutPurchaseButton.cs Wizard\GachaLayoutPurchaseButton.cs 9ea3aea8236729c9b3b762d6cd68bd0c67e78ce79c63e7aa6988998e690227ba 0 +Wizard\GachaPackAreaLayout.cs Wizard\GachaPackAreaLayout.cs 5cdd7fbab58cb0f95427544ac405ada5616d718931f457dcae29e5d3a70a72a7 0 +Wizard\GachaPackPointLayout.cs Wizard\GachaPackPointLayout.cs 9f87bbf8c8952ecbe27115ceacd731dba694e112b9d130b988f0a96235c57132 0 +Wizard\GachaPointData.cs Wizard\GachaPointData.cs 26bae09ef1c6707cd1135a6ccdcb9a26b3f5f39bddcb4c411710851ecc47b91e 0 +Wizard\GachaPointExchange.cs Wizard\GachaPointExchange.cs a6f8e1822b4c2d76ebc3ce173365b6e930ec2b41f820eaa46230f8d83a1521ef 0 +Wizard\GachaPointExchangeDialog.cs Wizard\GachaPointExchangeDialog.cs aa0b1cbd3e4e677be1af91558c774ea0366219bc067db8c56e83d7dc45b40fab 0 +Wizard\GachaPointExchangeInfo.cs Wizard\GachaPointExchangeInfo.cs 604786e3888b9898415f0aa27b9fec2f0e22bb0e925829ae9749fea03aa26f65 0 +Wizard\GachaResultBuyCardPack.cs Wizard\GachaResultBuyCardPack.cs c38ca1737830907080640a6144de5e67e5bfce8880c51b73a7fb829775c47c0e 0 +Wizard\GachaResultBuyCardPackDialog.cs Wizard\GachaResultBuyCardPackDialog.cs e0b7d915f4c8c7e1b20cf88c44dd01a6325d58afc1e7df9be45cb0fb19c75d55 0 +Wizard\GachaSelectBuyNumPopup.cs Wizard\GachaSelectBuyNumPopup.cs 2aa4ee4381bd6ffda29d4c4c8ee8ce7899722d361089037ebeb8c626c4091c13 0 +Wizard\GenerateDeckCodeTask.cs Wizard\GenerateDeckCodeTask.cs 9f32c9513ec63d8b19e36d402c1adfec123b7f5774b86369391ce5fcb3996e1b 0 +Wizard\GenerateTagCollection.cs Wizard\GenerateTagCollection.cs c8a76fe65207f3e3ce6c06bfeb0317ea98796bf8f093dfa710b05547e8b8cfad 0 +Wizard\GetOnTagCollection.cs Wizard\GetOnTagCollection.cs 53dd75747aca1d11c8dde8703971ca327b36076ac25d7a4980cf21255835148f 0 +Wizard\GetOnTriggerTagCollection.cs Wizard\GetOnTriggerTagCollection.cs 2b7b7621f4483bd52ca49e2c3294a56ff25e29ff7bf32baa1ff76d86111f2fb3 0 +Wizard\GiftTransition.cs Wizard\GiftTransition.cs 6fa6e6166dbfff9e8eb6abc43f26f011e8f681a0f3a443fd82aa78d2832b9d96 0 +Wizard\GiveSkillTagCollection.cs Wizard\GiveSkillTagCollection.cs fc0b094247ed98cee05d1e781c3e0f2d0f56db4f4b89affd2b805859dc040ed4 0 +Wizard\HandBonusTagCollection.cs Wizard\HandBonusTagCollection.cs 254828268b50bd500739de4715e07548f94d8e315e298cf83d123b9704575721 0 +Wizard\HandPlusTagCollection.cs Wizard\HandPlusTagCollection.cs 6e7c69ade97cea12534f1308a8a1b47170ac1078b3efe5e0613c38a742d9eca9 0 +Wizard\HealTagCollection.cs Wizard\HealTagCollection.cs 913557e82f49d9beb64a02bbae3555ace4b4ab633580411e14dd6ded61f46ef5 0 +Wizard\HighRankEffectInfo.cs Wizard\HighRankEffectInfo.cs d902f77261b58377e093cc7305827c087b4af6fda9d39c0470afe75ae1e7e1f7 0 +Wizard\IAIEmoteCtrl.cs Wizard\IAIEmoteCtrl.cs 7a10392831ba1389e0d690d49fd563b9de356e8199e9cb2c252edb5d7b2442a3 0 +Wizard\IAITargetSelectTagCollection.cs Wizard\IAITargetSelectTagCollection.cs 9f5213399c3590ccf5519da98308384c07a960c6c8e79721169a854218ad3416 0 +Wizard\IBattleSimulationAI.cs Wizard\IBattleSimulationAI.cs 4ae9b2993be434a5b76d822de8d56977d7c15d0108e7446a19dcabc785976470 0 +Wizard\IEnemyAI.cs Wizard\IEnemyAI.cs e4fc8be7e4dfb93145e0dda9a6c8935813b54ca7f46b156a784e1c24e0b07c41 0 +Wizard\IEnemyAIBattleInfoRecieveDataAccessor.cs Wizard\IEnemyAIBattleInfoRecieveDataAccessor.cs 0f24830f9f5c99068d1eaded636815b8010c1056883b3ce7fc2fac1867e66574 0 +Wizard\IFormatBehavior.cs Wizard\IFormatBehavior.cs b11e696685f19dcd75be555aaab5121b54b2c70fe1af72caa468ec5e80c6947e 0 +Wizard\IgnoreBreakTagCollection.cs Wizard\IgnoreBreakTagCollection.cs 95fa4a8aea7a980dd225d37f80c8ebeed3d2984507ce6a83c8411a70398fe816 0 +Wizard\IgnoreFanfareBonusTagCollection.cs Wizard\IgnoreFanfareBonusTagCollection.cs cf22a06695c7b33920b0ee6caa9ab62a8f541306167074860bc105fb3f713126 0 +Wizard\IgnoreTargetTagCollection.cs Wizard\IgnoreTargetTagCollection.cs 792b1c640a8978a7f69d9d295480780e18c250ea874a655ab55dc1c99d535542 0 +Wizard\Item.cs Wizard\Item.cs 1f08b86cf607be02d6083243247d28fb89bfae5ba9595f1cf74562680caa9025 0 +Wizard\LastwordTagCollection.cs Wizard\LastwordTagCollection.cs 35a8bf05a748f8cc1811bf419a5e19cbe8058bc76e3f54d9f2160c584436a59f 0 +Wizard\LeaderSkinSeries.cs Wizard\LeaderSkinSeries.cs 8273cd6831408f1e74e7e2f7b3db3074d41b102e557941ee3c1f0afecaed71e5 0 +Wizard\LeaveBonusTagCollection.cs Wizard\LeaveBonusTagCollection.cs 30e0c56bbe6b1418a166762a88660ce41b13facd173f1b00e500066e84e699fd 0 +Wizard\LeaveTagCollection.cs Wizard\LeaveTagCollection.cs 11d8c7a49a83ae6032f77183b7e2e32d38ac4a9def2413cf64558a00fe53750e 0 +Wizard\LifeRecord.cs Wizard\LifeRecord.cs dbb7e7c6532bf24174d3d958147309b1eb87faac12c57754e7282cf8ac5d8b50 0 +Wizard\Master.cs Wizard\Master.cs dc58e2aacb78cd813aa7c7e8db2ba18268b3ca62188e0ef36d9f8445a58486ce 0 +Wizard\MemberBattleBonusRateTagCollection.cs Wizard\MemberBattleBonusRateTagCollection.cs af0f9eb215dfdba042be2663c3485e0330a2da5cf1c64b001fbeb958f9c40f77 0 +Wizard\MemberBattleBonusTagCollection.cs Wizard\MemberBattleBonusTagCollection.cs 7d5c866fa706411b0eef538feb6b10551066b0e552d757a081c9a2b1bf5a5107 0 +Wizard\MemberEvoBonusTagCollection.cs Wizard\MemberEvoBonusTagCollection.cs 94fa4f95290b222605bc4c01b68d38d8f3bd64568887f0764034bd1a1ab429e5 0 +Wizard\ModifyHealTagCollection.cs Wizard\ModifyHealTagCollection.cs b8451ec819776ddfec09c4027fad85ee2d2e9d7c77970aef414949841b8a034d 0 +Wizard\MyPageCustomBGMasterData.cs Wizard\MyPageCustomBGMasterData.cs f804b67196ba049ab2bca36abbcb98246d603c7e9035901c75b40a3eda954326 0 +Wizard\MyPageHomeDialogData.cs Wizard\MyPageHomeDialogData.cs 8a340ba114a70c5546bba0d727cb9a9257efea3ae656417566882f3101a3578f 0 +Wizard\MyRotationInfo.cs Wizard\MyRotationInfo.cs 4d9090e0e4b81cbd5c0e2ad5542da9577a5dade1a6a5211ebeb9dfd1ce91961b 0 +Wizard\MyRotationParts.cs Wizard\MyRotationParts.cs 2469f8b192fe03cec39e4519002031872790662048e61305a63802a48f1cd6df 0 +Wizard\MyRotationRePrintInfo.cs Wizard\MyRotationRePrintInfo.cs 2bb1fdfcc60af40afcf6fdd11b36edeca0ced9c4765b226c6f62cca1ed5f0da1 0 +Wizard\NetworkDefine.cs Wizard\NetworkDefine.cs 44050f0b6eb56b29d05ddf9834a10b05553de9659dc4eb3619cd1a50660f7ef3 0 +Wizard\NoInstantAttackTagCollection.cs Wizard\NoInstantAttackTagCollection.cs db3d8479c9e03b4fd7d6d58d9ff763564a7ff4b9e2ce1c8b7b2f5219f245bcd4 0 +Wizard\NoNormalEvoTagCollection.cs Wizard\NoNormalEvoTagCollection.cs 92c16f64f48fc8d643dcc29addd4c77adbc8a92bd9ccee830560190344e789ef 0 +Wizard\NoSkipAttackTagCollection.cs Wizard\NoSkipAttackTagCollection.cs 107152d8cb5b57a6c8e2682d6ba73cb90662fbbd7ac749def7e841101b5462e8 0 +Wizard\NonReferableVirtualCardBuildParameterCollection.cs Wizard\NonReferableVirtualCardBuildParameterCollection.cs 23251af778a55d3bd995d72adf74616b1d9679a6178c35e19e0466f748fb3210 0 +Wizard\NotificatonAnimation.cs Wizard\NotificatonAnimation.cs 86079fa67434ccd594837728872c521648a01111dc6917ecc9b100b892556c99 0 +Wizard\OneMoreLastwordTagCollection.cs Wizard\OneMoreLastwordTagCollection.cs 43ded6b3ecf0cea6d0880bb9e6a0294fecf17eacca1f27bdfdbf4073a9f36661 0 +Wizard\OtherAttackTagCollection.cs Wizard\OtherAttackTagCollection.cs 01abdfb334ad2c7a75244ce40aa76963123120b1311b55d9f72b30eb602dcf45 0 +Wizard\OtherBanishBonusTagCollection.cs Wizard\OtherBanishBonusTagCollection.cs 9cc66ef3cb7e38fb9c393c8a827942003083062f1a704374c9adc600317c445d 0 +Wizard\OtherBanishTagCollection.cs Wizard\OtherBanishTagCollection.cs b0b834a06e5e3c202233667ea591c26fb8ddfcc1d3f04a05cf5530cbb6629aab 0 +Wizard\OtherBreakBonusTagCollection.cs Wizard\OtherBreakBonusTagCollection.cs 93136af3cbcbc5fbe886e01b61d73655e62c22af25a6ae3012d3bb68f2c895b1 0 +Wizard\OtherDamagedTagCollection.cs Wizard\OtherDamagedTagCollection.cs 1322687c298d19356e9c0bdb2a0412f0b1998d19d079627918623a5345e93085 0 +Wizard\OtherEvoTagCollection.cs Wizard\OtherEvoTagCollection.cs 155202d2b626c307690f8379be26c103d40d1b27cc4a5fed9e57ac9a26f5d912 0 +Wizard\OtherLeaveBonusTagCollection.cs Wizard\OtherLeaveBonusTagCollection.cs 32117e946ec6180cf917781cafa0ed64a9b08e504d52972da88cc878151752ae 0 +Wizard\OtherLeaveTagCollection.cs Wizard\OtherLeaveTagCollection.cs 42cfe082336baf4944c28824a67beba13a3550114f78151b06fa394c17275efb 0 +Wizard\OtherPlayTagCollection.cs Wizard\OtherPlayTagCollection.cs 48e0ada3fca7ac1e7ab4fa3fc253649df81c3d5599d63805883d6168b123044a 0 +Wizard\OtherPlayoutBonusTagCollection.cs Wizard\OtherPlayoutBonusTagCollection.cs 8e7dab4a4a8d31ddea357e269f0e25f43f7bb52f094d2c3db1ee98a0d5c990de 0 +Wizard\OtherSummonTagCollection.cs Wizard\OtherSummonTagCollection.cs 08bd5692d0fce51fe7087136fb302c1b0ce17c7b6b18ab25b90fee52e2dbef05 0 +Wizard\PackBannerData.cs Wizard\PackBannerData.cs 19a49488cc25566d51d172cdaaf5ea6194a0c6121ab2c78eaea5f6b2ca71de09 0 +Wizard\PackCategory.cs Wizard\PackCategory.cs 9335bf51da46cc25f51040bd04c543bad6686858802d3ded1c9ab857bef69995 0 +Wizard\PackChildGachaInfo.cs Wizard\PackChildGachaInfo.cs 40d10fdd911009cd6dfb780e2111a16cb7914cb7f1e8680130f9ab255a5a0801 0 +Wizard\PackConfig.cs Wizard\PackConfig.cs 01a5fcd6c5d39e3c08d6b820f8a062f16d65105e6f1a3fbe085f752b389cc45b 0 +Wizard\PackInfoTask.cs Wizard\PackInfoTask.cs 361bde0ab56dfe307c887d472f2187971583a7bc9f706e70c9557fd8cd1b8039 0 +Wizard\ParameterOverwriterBase.cs Wizard\ParameterOverwriterBase.cs 0966e18f7e514ddaff7567c3d845b6cc98d10d7ee49f6130156ed46eace56cf0 0 +Wizard\PlagueCityTagCollection.cs Wizard\PlagueCityTagCollection.cs 3213ddc7ae26058dc28be578bd19b4342914324bdf761ebbc5f74e640e5155d6 0 +Wizard\PlayBonusRateTagCollection.cs Wizard\PlayBonusRateTagCollection.cs 32b5ae7c6fe5998aa1dfac3fac64bc08c36cc127408b983667e85d98bcca76af 0 +Wizard\PlayBonusTagCollection.cs Wizard\PlayBonusTagCollection.cs aae0f75c19388e975da4abf671c5082fd5e8d9bb0efc81cba0723a37d164dbf4 0 +Wizard\PlayDrawTagCollection.cs Wizard\PlayDrawTagCollection.cs 26c9c14e820f24b7c42e7aa0945863875eb8340962537d041188f36c45082aa0 0 +Wizard\PlayLimitTagCollection.cs Wizard\PlayLimitTagCollection.cs 54dcdce8c2df53f4ed802b106411bafab77fdd3880676c3e36dfe3920fa67698 0 +Wizard\PlayPlusTagCollection.cs Wizard\PlayPlusTagCollection.cs b83296a9abf6a081036c9230b335e6c3380ee9018386faa72dc9cb65cde47933 0 +Wizard\PlayPtnBonusTagCollection.cs Wizard\PlayPtnBonusTagCollection.cs e77524431abd386597302bac81a6e6996a36b685ceef89804d66de9c313ea8be 0 +Wizard\PlayPtnWithToken.cs Wizard\PlayPtnWithToken.cs 080747dd4f88ceaceb395817efa0db08360b9d59924525452e967d3d1edefecf 0 +Wizard\PlaySimulationType.cs Wizard\PlaySimulationType.cs 004b802fea1bc338f85fb2cde43544d13257f25238454bb4906e872c14b7c233 0 +Wizard\PlaySkipInformation.cs Wizard\PlaySkipInformation.cs 991da0ec87aeb9d1d4283ccb7f315db875d14aa63c494a05ea97df452c14ae9d 0 +Wizard\PlaySkipTagCollection.cs Wizard\PlaySkipTagCollection.cs b5a8ef396806b07493e98d47000f4519868355ff37432aa94d59ecec87306cb8 0 +Wizard\PlayTagCollection.cs Wizard\PlayTagCollection.cs 68c84ed4598bdef107d093b7662ddd4a51cfcdeecc73c72cb40db08fd6d01fa3 0 +Wizard\PlayedCardInfo.cs Wizard\PlayedCardInfo.cs 4f5236fb71867c8607bc4f3aacee3e5355080a4d5a4a79bc6521f564b7994e6e 0 +Wizard\PlayoutBonusTagCollection.cs Wizard\PlayoutBonusTagCollection.cs e09f770ddfeb7644d0d836a9d9747944a76a1ca464e4301b7469c52433d69051 0 +Wizard\PlayoutNextTurnTagCollection.cs Wizard\PlayoutNextTurnTagCollection.cs 6f5c85cc3a8d3b12c68a8b70769025783e6058bf518eb6467053d986ad2b0200 0 +Wizard\PlayptnBaseStatsRateInfo.cs Wizard\PlayptnBaseStatsRateInfo.cs 43d28ea1977f721d3b106f12bcfb601fd69816fe8fcfd0717a8fa8691ec95fa2 0 +Wizard\PlayptnBaseStatsRateTagCollection.cs Wizard\PlayptnBaseStatsRateTagCollection.cs 4ed539fff8051a4474c1114bcd0c6892cf1b255d1ce5c60129657081c2cc0d60 0 +Wizard\PolicyCollectionWithTypeBase.cs Wizard\PolicyCollectionWithTypeBase.cs d6e70cd2c96ad62d6dfadff5a3c6fc8318c31e8661f0a1abce61165156136aa4 0 +Wizard\PracticeAISettingData.cs Wizard\PracticeAISettingData.cs 59f4b1180f859de742f31f4af61dd7997d9f5d0e09d0f15c605586a9d6d732f0 0 +Wizard\PracticeAISettingDataSet.cs Wizard\PracticeAISettingDataSet.cs d718d5d948ff6fb0a57614b84d7f11a04c99bfcf099c6f3916e56522017f22fc 0 +Wizard\PremiumCardConversionDialogParts.cs Wizard\PremiumCardConversionDialogParts.cs ef813540d655bcf33bcdf994acfdae8185dc8dcf85976520da2f394c6125733a 0 +Wizard\PreprocessTagCollection.cs Wizard\PreprocessTagCollection.cs 2f22016f344bf7a05815f0d60d7721a9ecaa1094dced3c3007c77b4372cb2368 0 +Wizard\PrereleasePurchaseInfo.cs Wizard\PrereleasePurchaseInfo.cs 8876aa1902f358c9eda8c46c5911a45e8d9a836a900d9a4b0d437149112dcf37 0 +Wizard\PriorityTagCollection.cs Wizard\PriorityTagCollection.cs 1c9656863a2740157fd0737e77528180d66e246cd672a820d6a94c2d38429693 0 +Wizard\PuppetAttackParam.cs Wizard\PuppetAttackParam.cs dbfa38756de17fa26e09165c070c91640812540465c66dac3592aa0582594127 0 +Wizard\PuppetAttackTagCollection.cs Wizard\PuppetAttackTagCollection.cs e284ebdeb61706237dbf83d8b7fb0145f703aa375cd170e5f39b7af2d43db446 0 +Wizard\PurchaseConfirm.cs Wizard\PurchaseConfirm.cs 91ab7d0a239b6ddf305b5395e8cb058c5714a0b6a5d4e1534990e912ec2af0d2 0 +Wizard\PurchaseRewardInfo.cs Wizard\PurchaseRewardInfo.cs 68266e03484b149bbe1ec5d0d26ca99f5377e33cf6194af6c332ae021d96c925 0 +Wizard\PuzzleBattleMasterData.cs Wizard\PuzzleBattleMasterData.cs d1724a7755e6ffd48ced04db5853dbfec787b6190c235471eb96b8ababf766c0 0 +Wizard\PuzzleQuestData.cs Wizard\PuzzleQuestData.cs da6724883671e227cfd3b5b8eb64af071bed3ffec7ecb95e84710b18db96b901 0 +Wizard\PuzzleQuestInfo.cs Wizard\PuzzleQuestInfo.cs 17e215c00ac4d2ec648d5a3c7a70393fea406889685c88434b6d526571811f7b 0 +Wizard\PuzzleQuestSelectDialog.cs Wizard\PuzzleQuestSelectDialog.cs 2f297d0ea4730615c2657a05777994e224732fe8003c9e231b307d5eb8b500ba 0 +Wizard\PuzzleQuestStatus.cs Wizard\PuzzleQuestStatus.cs 080f93e95b6fb21f06ca4e7874ef9050bd4bcb62338f5c0e12b05de722cecca9 0 +Wizard\QuestAllConfirmDialog.cs Wizard\QuestAllConfirmDialog.cs 797160bab5654b592f9bd5e9390e42008336c0ba9e0aeea1aabdab7a0e435bed 0 +Wizard\QuestBattleData.cs Wizard\QuestBattleData.cs 2c7b710d636f9f2112f6216b78f6516f17e573803db9277c03e2d04200b2e23a 0 +Wizard\QuestBossData.cs Wizard\QuestBossData.cs 54bea11a04848ecbba06458cc3fb23ee38eb80ffe096871a490c3c3e10730f7a 0 +Wizard\QuestGaugeItem.cs Wizard\QuestGaugeItem.cs dd1dc88a5b96dcf53a47bfead6786c42c20b7b422547f9946b5213d534309b7f 0 +Wizard\QuestInfoTask.cs Wizard\QuestInfoTask.cs b6da4bc6326ab5b8a11367cd77cc00a563847486bd62528ec1badcd71451e271 0 +Wizard\QuestItem.cs Wizard\QuestItem.cs 6f873d6290ba0122b8c6789fb23e5ba9ec1a602bbe11e8fe50dad5eff8b712cd 0 +Wizard\QuestItemBase.cs Wizard\QuestItemBase.cs 8f6330477afc45f7c23044fb7fb0aa5309a26cac11e74c3c70c76cdffcc7c664 0 +Wizard\QuestItemTitle.cs Wizard\QuestItemTitle.cs d0f78fd42450feff168cc3777d1fbb4009d4ca135884099df42b4ebacb86d9b0 0 +Wizard\QuestMissionData.cs Wizard\QuestMissionData.cs 66851df2ee770b75efee5a16e28a3e0dc23fda420f4c5888746af055c258a2e9 0 +Wizard\QuestMissionDetail.cs Wizard\QuestMissionDetail.cs cb9bca006c7b2cf01d8b52f79bb8309cf2df03b52b0fd9ba989e811343cf3938 0 +Wizard\QuestOpenPuzzleDialogTask.cs Wizard\QuestOpenPuzzleDialogTask.cs 3aed83f56b6aeebb345d6836cdc86fac3ae19cae47223f3ae8c7bd9e91d9c740 0 +Wizard\QuestOpponentData.cs Wizard\QuestOpponentData.cs 85b29720e35ba0937b5bbd8bfc28dee787a7945bb0aa1cc829c668069f633daf 0 +Wizard\QuestPointConfirmDialog.cs Wizard\QuestPointConfirmDialog.cs c5c4b1e31fe40f7de6fa17f9d16ef66074d1fdcd6ddfc4128a57dc6e8d274f38 0 +Wizard\QuestRewardInfo.cs Wizard\QuestRewardInfo.cs c0d8c01dd78824d62c5f145bea4141a576db63d39ca2230e35eb41fe48342e97 0 +Wizard\QuestSelectionButtonBase.cs Wizard\QuestSelectionButtonBase.cs a6376f737ad9c5e89199eb572562d3e85f8537bf4b0e349df1d95462cb8f2230 0 +Wizard\QuestSelectionButtonData.cs Wizard\QuestSelectionButtonData.cs 63f83ab58371f7a90664d831e88932b1c6ef39b5e93b99308aecd0d87fe381ab 0 +Wizard\QuestSelectionPage.cs Wizard\QuestSelectionPage.cs 4a4a0e23ca749a3e634e45fd0edab5c1a4902651f56b982a057136a705940685 0 +Wizard\RallyCountPlusTagCollection.cs Wizard\RallyCountPlusTagCollection.cs 4925407e467310dbb38e525aa9a90f4dede317572f982adf5d8fc273bb6ade51 0 +Wizard\Rank.cs Wizard\Rank.cs 1bbdd3efaf38a8a9e587ae8094b0db792cb81d1df7cf63252f739347b1803cba 0 +Wizard\RankMatchAISettingData.cs Wizard\RankMatchAISettingData.cs 210b88babcc6daff656bdc2fe24edcd0a9556351f2b147d5f04a37f52a770f42 0 +Wizard\RankMatchAISettingDataSet.cs Wizard\RankMatchAISettingDataSet.cs a0dd289c49ede4aac584291fdeeb060cc0c9b70c4e1a123cad6cab216ea2de55 0 +Wizard\ReanimateBonusTagCollection.cs Wizard\ReanimateBonusTagCollection.cs 6ac7d8043c9a315e74aa1533f36f00468f432fb4043367c6c7f6881ca06b9e34 0 +Wizard\ReanimateEvoTagCollection.cs Wizard\ReanimateEvoTagCollection.cs a266712e3ded29167a94fd881ee344b35eaf3eaad8f1359736d2c76ee0e02881 0 +Wizard\ReceiveTurnEndToJudgeResult.cs Wizard\ReceiveTurnEndToJudgeResult.cs ef2f76201ccef6b81ce3b2ff37016bc839e7126f5772524f74d114d3d826e6b9 0 +Wizard\ReferableVirtualCardBuildParameterCollection.cs Wizard\ReferableVirtualCardBuildParameterCollection.cs b04760995eddf63a9f8f7dcc1ca3064092bc880a67eb1ba7f808e77dfd7cf829 0 +Wizard\ReincarnationSimulationTagCollection.cs Wizard\ReincarnationSimulationTagCollection.cs 863e9c6fd3b131c9564048419b2af5967689b9389fb803c8bc4b079185a578b0 0 +Wizard\RemainTime.cs Wizard\RemainTime.cs cad4a6d7241987deccf91cab20b07146a393262888f556743b959d015c58c7cb 0 +Wizard\RemoveByDestroyTagCollection.cs Wizard\RemoveByDestroyTagCollection.cs 6bb0f29c81a74b7bab7c062244773c4a7c366ea76836db7ca5abe860d097c38b 0 +Wizard\RemoveSkillTagCollection.cs Wizard\RemoveSkillTagCollection.cs 4b31000c33a964929a361f964499aeddd2e884862600c4488c86d49e8a21120f 0 +Wizard\ReplaySkipAnimation.cs Wizard\ReplaySkipAnimation.cs 028d4fbc5d2ac366f5a90c86245482b36f37990c22eedd1f9b1109b5e673d346 0 +Wizard\ResonanceTagCollection.cs Wizard\ResonanceTagCollection.cs 18e5ba29b08bf24bdf9b6f2078c6180099c9d468b1ab5c1fa05a0452199169ad 0 +Wizard\RewardBase.cs Wizard\RewardBase.cs ea35849169b3987c450abbaece54578234821d644bf3289fc0307fd8ca14fe23 0 +Wizard\SceneTransition.cs Wizard\SceneTransition.cs 3858aa170b79fe0d46824439ee34bd85865732bc0c96dfa9bc8b37f5a28a0670 0 +Wizard\SecretBossInfo.cs Wizard\SecretBossInfo.cs 5ee84152be88797d9d5147965973aad8011e7ad23e07bf2c2a4df512012f99b9 0 +Wizard\SelectBuyNumPopupBase.cs Wizard\SelectBuyNumPopupBase.cs ecea78a81f059d7e3d7bf18e05ef61bfa39a85e0b72b0f53991e8edbf498c90e 0 +Wizard\SelectSkinCardInfo.cs Wizard\SelectSkinCardInfo.cs 6011046eb19f8a1d354683c144f769a09f56ff42f43a4d4245aeb1beaac72fa2 0 +Wizard\SelfAndOtherEvoTagCollection.cs Wizard\SelfAndOtherEvoTagCollection.cs dcd522c9567e370f36d467501d30d5f7e8f0e570f6ba60272c95b014705198de 0 +Wizard\SetAITribeTagCollection.cs Wizard\SetAITribeTagCollection.cs 69b942da626b35c3f41096f752dc2456adf3315ed15777644baea2fe80f87f7a 0 +Wizard\ShopCommonRewardInfo.cs Wizard\ShopCommonRewardInfo.cs 1362db5cce7666eec06fa52b47a631df8de00dfaf4c89a8b329f4c5d081f3b75 0 +Wizard\ShopDrumrollScrollManager.cs Wizard\ShopDrumrollScrollManager.cs 74fb76307264f57d77e4d68ae067a6c94e544c1a36f799649be1871f61ec51de 0 +Wizard\ShopExpirtyInfo.cs Wizard\ShopExpirtyInfo.cs 93d265032ad665bb5b1752f8891e40cf0b2b7380def77a83298c9d7ef344ffd9 0 +Wizard\SimpleScrollViewUI.cs Wizard\SimpleScrollViewUI.cs c09d0cd5935fa0157c07d98226df86270f51d94cccc6e66d0fca4a901f868899 0 +Wizard\SimulationAdditionalActionInfoSet.cs Wizard\SimulationAdditionalActionInfoSet.cs c20debde6f1f635e218fc5027f7b2939a6160e86a13c2166efac15732e1bee81 0 +Wizard\SimulationResult.cs Wizard\SimulationResult.cs e7664bfdf29cce647808d1fa5989de992affa051e552a2fbe4c627ccc37c55f4 0 +Wizard\Sleeve.cs Wizard\Sleeve.cs 7f871310a61810e786bb5daeb65e994c5deb2f1c2f6269065892a4d325553e80 0 +Wizard\SleeveCategory.cs Wizard\SleeveCategory.cs d636241391f0421028aec23fa83b44af32beb01a3af5bc14469fe076b8016a38 0 +Wizard\SleeveMgr.cs Wizard\SleeveMgr.cs 65624ba278a3238a02189445cf03fdf423d1e8985338d938a389c002e5bbf497 0 +Wizard\SleeveSeries.cs Wizard\SleeveSeries.cs 9a3658f9b77625a36c9ce51c8797c3fec4f8a9d48b541e828a372b71490b45ba 0 +Wizard\SpotCardData.cs Wizard\SpotCardData.cs ac20fd44447242b9ecc761f3b4acf3bb407f3ea542f48fb56926d2385cd3e814 0 +Wizard\StoryAISettingData.cs Wizard\StoryAISettingData.cs 14402dc36fa4ae13f154c8110141087145efb387c94292f7a5102dd3b671151d 0 +Wizard\StoryAISettingDataSet.cs Wizard\StoryAISettingDataSet.cs 76693a53b4022593dd67cd8d08b41c2ab7647d8b3663176b13909ca0e6c11900 0 +Wizard\SummonTagCollection.cs Wizard\SummonTagCollection.cs 584ee636f3d8826973893728e77f5a72cc4c4b608357b6bccb993f17abf46976 0 +Wizard\SystemText.cs Wizard\SystemText.cs 1450cdaf4d2f61346fb8743ca0be089647c64f328b825d2e1f9d9ce667655dc3 0 +Wizard\TagCollection.cs Wizard\TagCollection.cs 16016406df9b7e9287ba64d32b57297059ee1a1fe2f3b57845ec7ad4588630ea 0 +Wizard\TagCollectionType.cs Wizard\TagCollectionType.cs 6723cd1be89e3669a02e640d2b4528d8908b0322f25fef413e8b147e3aea3101 0 +Wizard\TagCollectionWithTypeBase.cs Wizard\TagCollectionWithTypeBase.cs 9ba0688d57518d19a3ed80819ae1501bd59c911e7749388aff097dfae8f46aee 0 +Wizard\TargetSelectType.cs Wizard\TargetSelectType.cs 91ab18f9c069784e1140a187eabd8248761618a577811296f36db07f9b87265b 0 +Wizard\TargetTagCollection.cs Wizard\TargetTagCollection.cs 1bd2fb66e58c9fae3d23fbce351972577da664c2b959ee92e0547e2396c82eb9 0 +Wizard\TextLineCreater.cs Wizard\TextLineCreater.cs fdb7f0a918c2f5b92268954b3980724f29cb16a8098ea67c2d99633ae5bd1e92 0 +Wizard\TokenPlayPattern.cs Wizard\TokenPlayPattern.cs c14d846afb81b876291013c077cbd503bebd27b651b5b78708e93d68758e2e7b 0 +Wizard\TreasureBoxCpResultInfo.cs Wizard\TreasureBoxCpResultInfo.cs 77141091f1b85fdfa04005a5551b5d9ae29322c1446c70411e410daec2fe4bc5 0 +Wizard\TurnEndTagCollection.cs Wizard\TurnEndTagCollection.cs 176accc9ed7bbafa5b36a25cbd85caa6bad54acabdbe1f786160ba11737cbdf2 0 +Wizard\TurnStartTagCollection.cs Wizard\TurnStartTagCollection.cs a6190321dd648393cb52de200be2bdd7dadeca06f602fd13c9803fd3d84e2849 0 +Wizard\TutorialAreaSelect.cs Wizard\TutorialAreaSelect.cs fd8c11bbe4a98a5407fc1bdae75f3fae5fab2a996cde2a54a7fcbd5a73115352 0 +Wizard\TutorialData.cs Wizard\TutorialData.cs 2fc9577f9c08b7803e3673d18eee530d3a61d95d0d8b8d5c166e97ab4dc557ed 0 +Wizard\TwoPickFormat.cs Wizard\TwoPickFormat.cs 7f09731756f955d49fd610f3383ad697786e37c4d09d78bf577b03767bd40177 0 +Wizard\TypeFilterDialog.cs Wizard\TypeFilterDialog.cs 4c764fe4b79a18bc267d0775575b85f7bedb28a645935f2474dfebc292ba3cf8 0 +Wizard\TypeFilterSingle.cs Wizard\TypeFilterSingle.cs d59034d2a145657e5d06d6db841d13f3ea71a00ddb586f5e8994d8e14ad9de2b 0 +Wizard\UIGauge.cs Wizard\UIGauge.cs 0118ff5fbb35e3386abbda434cac738fc420ecbac5dcba1e532483f4ac9b0d40 0 +Wizard\UILabelEffectOverwriter.cs Wizard\UILabelEffectOverwriter.cs d91ad280e420b0b04a1e1fda0b58c993d0523b2dce9f58e40bf2fd98aaf9943b 0 +Wizard\UILabelGradientOverwriter.cs Wizard\UILabelGradientOverwriter.cs 61d81c1710dbdcfdd5f2ecc07bfaf1aea701f80c45b46c4556705782c43a4eec 0 +Wizard\UIParticleEffectGroup.cs Wizard\UIParticleEffectGroup.cs dcc425e476a98214ce77ae6c41500e8a082e3c4ecdea1b06455ffc80da4f85ff 0 +Wizard\UIShaderSprite.cs Wizard\UIShaderSprite.cs 26f4dc6be5c3fa99f59e54582797b045ad343fb40fb1338a187f723ee0c75251 0 +Wizard\UISpriteAtlasOverwriter.cs Wizard\UISpriteAtlasOverwriter.cs 0f3455b58b740cab260d97bf28d1b8e73ba0ba6938f62d4b81021b3329e07bd7 0 +Wizard\UnlimitedRestrictedCard.cs Wizard\UnlimitedRestrictedCard.cs 295618ea53573f498923f63bfabd0b3543552761811830b83e2a18980edfc311 0 +Wizard\UserGoods.cs Wizard\UserGoods.cs c21dd8bc5521e705da0994f68771149a54d461f49d00fbd54f9d8673bb047eb3 0 +Wizard\WhenGetOffTagCollection.cs Wizard\WhenGetOffTagCollection.cs 56009d6b9acb7df9d376670526228b9b51d19fadd14325cc60166a0a0d82d7d1 0 +Wizard\WhenNecromanceTagCollection.cs Wizard\WhenNecromanceTagCollection.cs 2576488749e9fa264bac47d56edcca8f30e7b0eaa08459f85ea0286f39453925 0 +Wizard\WhenPlayTagCollection.cs Wizard\WhenPlayTagCollection.cs 4b4ee7e60d9fc7d6ac23ce8b3cec928d542ea6bb55d3637ad66093f0cba30141 0 +Wizard\WizardUIButton.cs Wizard\WizardUIButton.cs e078cf8215ad02ac1c0fd4a7fe66ab7151dcf704fc230c199a12caab67719d5b 0 +Wizard\_3dCardFrameManager.cs Wizard\_3dCardFrameManager.cs d23f7bd3cc2ddbb86f9a40d1dea6941796cf7562f9dd0f804b6acccd9a345396 0 +Wizard\eColorCodeId.cs Wizard\eColorCodeId.cs 4c853d61f36776bc6a652c11a6eabdb4dbde7ff8ff5fbc410fb4b878a17edcb1 0 +WrapContentsScrollBarSize.cs WrapContentsScrollBarSize.cs 90b8b14191d5016037bc1b907ef9408f9aecc63e8a2562cd58db8991345a538e 0 +iTween.cs iTween.cs 8da77cd885d8fb1e8727e91681ab5ac00a889d0fcc9b973a4162f15a0b642a54 0 diff --git a/SVSim.BattleEngine/Engine/AchievedInfo.cs b/SVSim.BattleEngine/Engine/AchievedInfo.cs new file mode 100644 index 0000000..c828ac8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AchievedInfo.cs @@ -0,0 +1,166 @@ +using System.Collections.Generic; +using LitJson; +using Wizard; +using Wizard.Lottery; + +public class AchievedInfo +{ + private const string ACHIEVEMENT = "achieved_achievement_list"; + + private const string MISSION = "achieved_mission_list"; + + private const string REWARD = "achieved_mission_reward_list"; + + private const string VICTORY_REWARD = "win_reward_list"; + + private const string GRAND_MASTER_REWARD = "grand_master_reward_list"; + + private const string MISSION_START = "mission_start_data"; + + private const string BEGINNER_MISSION_REWARD = "achieved_beginner_mission_reward_list"; + + private const string BEGINNER_MISSION_REWARD_MESSAGE = "achieved_beginner_mission_list"; + + private const string BATTLE_PASS_REWARD_LIST = "battle_pass_reward_list"; + + private const string BATTLE_PASS_MESSAGE_LIST = "battle_pass_message_list"; + + private const long DONT_NOTIFY_IF_SMALLER_THAN_SECONDS = 10L; + + public List _missions; + + public List _achievements; + + public List _rewards; + + public List _victoryRewards; + + public LotteryApplyData _lotteryData = LotteryApplyData.EmptyData(); + + public AchievedInfo() + { + _missions = new List(); + _achievements = new List(); + _rewards = new List(); + _victoryRewards = new List(); + } + + public AchievedInfo(JsonData data) + : this() + { + Read(data); + } + + public void Read(JsonData data) + { + if (data.Count == 0) + { + return; + } + if (data.Keys.Contains("achieved_mission_list")) + { + JsonData jsonData = data["achieved_mission_list"]; + if (jsonData != null) + { + for (int i = 0; i < jsonData.Count; i++) + { + _missions.Add(UserMission.CreateAchievedMission(jsonData[i])); + } + } + } + if (data.Keys.Contains("achieved_achievement_list")) + { + JsonData jsonData2 = data["achieved_achievement_list"]; + if (jsonData2 != null) + { + for (int j = 0; j < jsonData2.Count; j++) + { + UserAchievement userAchievement = UserAchievement.CreateCompletedAchievement(jsonData2[j]); + if (!string.IsNullOrEmpty(userAchievement.OsId)) + { + AchievementImpl.instance.ReleaseAchievement(userAchievement.OsId); + } + _achievements.Add(userAchievement); + } + } + } + if (data.Keys.Contains("grand_master_reward_list")) + { + JsonData jsonData3 = data["grand_master_reward_list"]; + if (jsonData3 != null) + { + for (int k = 0; k < jsonData3.Count; k++) + { + _rewards.Add(ReceivedReward.CreateFromBattleResultGrandMaster(jsonData3[k])); + } + } + } + if (data.Keys.Contains("achieved_mission_reward_list")) + { + JsonData jsonData4 = data["achieved_mission_reward_list"]; + if (jsonData4 != null) + { + for (int l = 0; l < jsonData4.Count; l++) + { + _rewards.Add(ReceivedReward.CreateFromBattleResult(jsonData4[l])); + } + } + } + if (data.Keys.Contains("win_reward_list")) + { + JsonData jsonData5 = data["win_reward_list"]; + if (jsonData5 != null) + { + for (int m = 0; m < jsonData5.Count; m++) + { + _victoryRewards.Add(ReceivedReward.CreateVictoryReward(jsonData5[m])); + } + } + } + if (data.Keys.Contains("achieved_beginner_mission_reward_list")) + { + JsonData jsonData6 = data["achieved_beginner_mission_reward_list"]; + if (jsonData6 != null) + { + for (int n = 0; n < jsonData6.Count; n++) + { + _rewards.Add(ReceivedReward.CreateFromBeginnerMissionReward(jsonData6[n])); + } + } + } + if (data.Keys.Contains("achieved_beginner_mission_list")) + { + JsonData jsonData7 = data["achieved_beginner_mission_list"]; + if (jsonData7 != null) + { + for (int num = 0; num < jsonData7.Count; num++) + { + _missions.Add(UserMission.CreateAchievedMission(jsonData7[num])); + } + } + } + if (data.Keys.Contains("battle_pass_reward_list")) + { + JsonData jsonData8 = data["battle_pass_reward_list"]; + if (jsonData8 != null) + { + for (int num2 = 0; num2 < jsonData8.Count; num2++) + { + _rewards.Add(ReceivedReward.CreateFromBattlePassReward(jsonData8[num2])); + } + } + } + if (data.Keys.Contains("battle_pass_message_list")) + { + JsonData jsonData9 = data["battle_pass_message_list"]; + if (jsonData9 != null) + { + for (int num3 = 0; num3 < jsonData9.Count; num3++) + { + _missions.Add(UserMission.CreateAchievedMission(jsonData9[num3])); + } + } + } + _lotteryData = LotteryApplyData.Parse(data); + } +} diff --git a/SVSim.BattleEngine/Engine/AddTargetInfo.cs b/SVSim.BattleEngine/Engine/AddTargetInfo.cs new file mode 100644 index 0000000..5b46fc8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AddTargetInfo.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Wizard; + +public class AddTargetInfo +{ + private BattleCardBase _ownerCard; + + private ConditionSkillFilterCollection _conditionFilter; + + private ApplySkillTargetFilterCollection _targetFilter; + + private Func typeCheck; + + private string _conditionFilterText; + + private string _targetFilterText; + + private string _skillTypeText; + + private string _ownerCardtype; + + private SkillCreator _skillCreator; + + public AddTargetInfo(BattleCardBase ownerCard, string conditionFilterText, string targetFilterText, string skillTypeText, string ownerCardType, SkillBase skill) + { + _ownerCard = ownerCard; + _conditionFilterText = conditionFilterText; + _targetFilterText = targetFilterText; + _skillTypeText = skillTypeText; + _ownerCardtype = ownerCardType; + _conditionFilter = new ConditionSkillFilterCollection(); + _targetFilter = new ApplySkillTargetFilterCollection(); + typeCheck = SetTypeCheck(_skillTypeText, _ownerCardtype); + _skillCreator = _ownerCard.CreateSkillCreator(_ownerCard.SelfBattlePlayer, _ownerCard.OpponentBattlePlayer, _ownerCard.ResourceMgr); + string[] array = _conditionFilterText.Split('&'); + List list = new List(); + for (int i = 0; i < array.Length; i++) + { + SkillFilterCreator.ParseContentInfo(array[i], out var retParsedInfo); + list.Add(retParsedInfo); + } + SkillCreator.SetupSkillConditionOld(_conditionFilter, list, _ownerCard, skill); + string[] array2 = _targetFilterText.Split('&'); + List list2 = new List(); + for (int j = 0; j < array2.Length; j++) + { + SkillFilterCreator.ParseContentInfo(array2[j], out var retParsedInfo2); + list2.Add(retParsedInfo2); + } + _skillCreator.SetupSkillTargetOld(_targetFilter, _ownerCard, list2, skill); + } + + public List GetAddTargetCard(SkillBase skill, BattlePlayerReadOnlyInfoPair pair, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue) + { + if (typeCheck(skill) && FilterComparison(skill.ApplyFilterCollection)) + { + return _targetFilter.Filtering(pair, checkerOption, optionValue).Cast().ToList(); + } + return null; + } + + private Func SetTypeCheck(string skillType, string ownerCardType) + { + if (skillType != null && skillType == "damage") + { + return (SkillBase skill) => CardTypeCheck(skill.SkillPrm.ownerCard, ownerCardType) && skill is Skill_damage; + } + return (SkillBase skill) => CardTypeCheck(skill.SkillPrm.ownerCard, ownerCardType) && skill is Skill_none; + } + + private bool CardTypeCheck(BattleCardBase card, string ownerCardType) + { + return ownerCardType switch + { + "all" => true, + "unit" => card.IsUnit, + "spell" => card.IsSpell, + "field" => card.IsField, + "chant_field" => card.IsChantField, + _ => false, + }; + } + + private bool FilterComparison(ApplySkillTargetFilterCollection ownerSkillFilter) + { + if (_conditionFilter.BattlePlayerFilter.GetType() == ownerSkillFilter.BattlePlayerFilter.GetType() && _conditionFilter.TargetFilter.GetType() == ownerSkillFilter.TargetFilter.GetType()) + { + foreach (ISkillCardFilter cardType in _conditionFilter.CardFilterList) + { + if (!ownerSkillFilter.CardFilterList.Any((ISkillCardFilter s) => s.GetType() == cardType.GetType())) + { + return false; + } + } + return true; + } + return false; + } + + public AddTargetInfo Clone(BattleCardBase ownerCard) + { + return new AddTargetInfo(ownerCard, _conditionFilterText, _targetFilterText, _skillTypeText, _ownerCardtype, null); + } +} diff --git a/SVSim.BattleEngine/Engine/ApiType.cs b/SVSim.BattleEngine/Engine/ApiType.cs new file mode 100644 index 0000000..5bb6bfe --- /dev/null +++ b/SVSim.BattleEngine/Engine/ApiType.cs @@ -0,0 +1,2651 @@ +using System.Collections.Generic; + +public class ApiType +{ + public enum Type + { + SignUp, + Load, + GetCardMaster, + Mypage, + MypageFinishBattle, + MypageRefresh, + MyPageCodeInput, + MyPageSettingUpdate, + SpecialCrystalInfo, + Profile, + TutorialUpdate, + TutorialUpdateAction, + DownloadStart, + DownloadFinish, + CardDestruct, + CardCreate, + PremiumCardConversion, + CardProtect, + DeckInfo, + OpenRoomDeckInfo, + DeckMyList, + DeckUpdate, + DeckNameUpdate, + DeckSet, + EmptyDeckInfo, + DeckOrder, + DeckUpdateSleeve, + DeckLeaderSkinUpdate, + DeckRandomLeaderSkinUpdate, + DeckIntroduction, + IntroduceDeckSeries, + DeckDelete, + ConventionDeckDelete, + PracticeDeckInfo, + DeckAutoCreate, + DeckUpdateConvention, + DeckNameUpdateConvention, + DeckUpdateSleeveConvention, + DeckLeaderSkinUpdateConvention, + DeckRandomLeaderSkinUpdateConvention, + ConventionDeckOrder, + ConventionDoWatch, + ConventionInfo, + ConventionRoomGetHistory, + DeckInfoConvention, + MainStoryInfo, + MainStoryStart, + MainStoryAllFinish, + MainStoryFinish, + MainStorySection, + MainStoryLeaderSelect, + MainStoryGetDeckList, + LimitedStoryInfo, + LimitedStoryStart, + LimitedStoryAllFinish, + LimitedStoryFinish, + LimitedStorySection, + LimitedStoryLeaderSelect, + LimitedStoryGetDeckList, + EventStorySection, + EventStoryLeaderSelect, + EventStoryInfo, + EventStoryGetDeckList, + EventStoryStart, + EventStoryFinish, + EventStoryAllFinish, + AllStorySection, + QuestInfo, + QuestMission, + QuestPoint, + QuestStart, + QuestFinish, + QuestRewardReceive, + QuestRewardReceiveAll, + QuestGetDeckList, + QuestPuzzleStart, + QuestPuzzleFinish, + QuestOpenPuzzleDialog, + QuestTweet, + FriendInfo, + SendFriendApplyInfo, + ReceiveFriendApplyInfo, + FriendApplySend, + FriendApplyApprove, + FriendApplyCancel, + FriendApplyCancelAll, + FriendApplyReject, + FriendApplyRejectAll, + FriendReject, + FriendUserSearch, + PlayedTogetherInfo, + GuildInfo, + GuildCreate, + GuildUpdate, + GuildUpdateDescription, + GuildEmblemList, + GuildEmblemUpdate, + GuildSearch, + GuildOthersInfo, + GuildJoin, + GuildJoinRequestCancel, + GuildJoinRequestList, + GuildJoinRequestAccept, + GuildJoinRequestReject, + GuildInvite, + GuildCancelInvite, + GuildInviteUserList, + GuildFriendList, + GuildInvitedList, + GuildRejectInvite, + GuildChangeRole, + GuildLeave, + GuildBreakup, + GuildRemove, + GuildChatPost, + GuildChatAddDeck, + GuildChatAddReplay, + GuildChatMessages, + GuildChatDeckLog, + GuildChatDeleteDeck, + GuildChatReplayDetail, + InformationTop, + InformationDetail, + MailTop, + MailTopTutorial, + MailRead, + MailReadTutorial, + RankMatchFinishRotation, + RankMatchFinishUnlimited, + RankMatchFinishCrossover, + FreeMatchSetParam, + FreeMatchFinishRotation, + FreeMatchFinishUnlimited, + FreeMatchFinishPreRotation, + FreeMatchFinishCrossover, + FreeMatchFinishMyRotation, + FreeMatchFinishAvatar, + RankBattleDoMatchingRotation, + RankBattleDoMatchingUnlimited, + RankBattleDoMatchingCrossover, + RankBattleFinishLoadRotation, + RankBattleFinishLoadUnlimited, + RankBattleForceFinish, + FreeBattleDoMatchingRotation, + FreeBattleDoMatchingUnlimited, + FreeBattleDoMatchingPreRotation, + FreeBattleDoMatchingCrossover, + FreeBattleDoMatchingMyRotation, + FreeBattleDoMatchingAvatar, + FreeBattleFinishLoadRotation, + FreeBattleFinishLoadUnlimited, + FreeBattleFinishLoadAvatar, + FreeBattleForceFinish, + OpenRoomMatchFinish, + OpenRoomBattleBattleDoMatching, + OpenRoomBattleFinishLoad, + OpenRoomBattleForceFinish, + OpenRoom2PickMatchFinish, + OpenRoomBattle2PickBattleDoMatching, + EventRoomBattleBattleDoMatching, + EventRoomBattleFinishLoad, + BattleRecovery, + BattleAbortRecovery, + AbortSoloPlayRecovery, + EventRoomMatchFinish, + AIRotationRankBattleStart, + AIRotationRankBattleFinish, + AIUnlimitedRankBattleStart, + AIUnlimitedRankBattleFinish, + OpenRoomBattleCreateRoom, + OpenRoomBattleCloseRoom, + OpenRoomBattleKickRoom, + OpenRoomBattleForceKickRoom, + OpenRoomBattleSetDeck, + OpenRoomBattleEnterRoom, + OpenRoomBattleLeaveRoom, + OpenRoomBattleWatch, + OpenRoomInitializeRoomBattle, + OpenRoomInitializeOwnerRoomRelations, + OpenRoomDoWatch, + OpenRoomForceClose, + EventRoomBattleCreateRoom, + EventRoomBattleEnterRoom, + EventRoomBattleSetDeck, + EventRoomInitializeRoomBattle, + EventRoomBattleLeaveRoom, + EventRoomBattleCloseRoom, + EventRoomBattleKickRoom, + EventRoomBattleForceKickRoom, + EventRoomForceClose, + EventRoomBattleWatch, + OpenRoomGetRecoverParam, + OpenRoomBattleBattleDoMatchingHOF, + RoomAbortRecovery, + RoomGetHashTag, + OpenRoom2PickBattleDeckReset, + OpenRoom2PickBattleBeginCreateDeck, + OpenRoom2PickBattleSelectClass, + OpenRoom2PickBattleSelectCard, + OpenRoom2PickMultiBattleDeckReset, + OpenRoom2PickMultiBattleBeginCreateDeck, + OpenRoom2PickMultiBattleSelectClass, + OpenRoom2PickMultiBattleSelectCard, + OpenRoomBattle2PickMultiBattleDoMatching, + OpenRoom2PickMultiBattleMatchFinish, + OpenRoom2PickMultiBattleDeckList, + OpenRoom2PickDraftBattleDeckReset, + OpenRoom2PickDraftBattleBeginCreateDeck, + OpenRoom2PickDraftBattleSelectClass, + OpenRoom2PickDraftBattleSelectCard, + OpenRoomBattle2PickDraftBattleDoMatching, + OpenRoom2PickDraftMatchFinish, + OpenRoomBattle2PickDraftFinishLoad, + OpenRoom2PickCubeBattleDoMatching, + OpenRoom2PickCubeBattleFinish, + OpenRoom2PickCubeBattleResetDeck, + OpenRoom2PickCubeBattleBeginCreateDeck, + OpenRoom2PickCubeBattleSelectClass, + OpenRoom2PickCubeBattleSelectCardSet, + OpenRoom2PickCubeMultiBattleDoMatching, + OpenRoom2PickCubeMultiBattleFinish, + OpenRoom2PickCubeMultiBattleResetDeck, + OpenRoom2PickCubeMultiBattleBeginCreateDeck, + OpenRoom2PickCubeMultiBattleSelectClass, + OpenRoom2PickCubeMultiBattleSelectCardSet, + OpenRoom2PickCubeDraftBattleDeckReset, + OpenRoom2PickCubeDraftBattleBeginCreateDeck, + OpenRoom2PickCubeDraftBattleSelectClass, + OpenRoom2PickCubeDraftBattleSelectCard, + OpenRoomBattle2PickCubeDraftBattleDoMatching, + OpenRoom2PickCubeDraftMatchFinish, + OpenRoomBattle2PickCubeDraftFinishLoad, + OpenRoom2PickChaosBattleDoMatching, + OpenRoom2PickChaosBattleFinish, + OpenRoom2PickChaosBattleResetDeck, + OpenRoom2PickChaosBattleBeginCreateDeck, + OpenRoom2PickChaosBattleSelectClass, + OpenRoom2PickChaosBattleSelectCardSet, + OpenRoom2PickChaosMultiBattleDoMatching, + OpenRoom2PickChaosMultiBattleFinish, + OpenRoom2PickChaosMultiBattleResetDeck, + OpenRoom2PickChaosMultiBattleBeginCreateDeck, + OpenRoom2PickChaosMultiBattleSelectClass, + OpenRoom2PickChaosMultiBattleSelectCardSet, + OpenRoom2PickChaosDraftBattleDeckReset, + OpenRoom2PickChaosDraftBattleBeginCreateDeck, + OpenRoom2PickChaosDraftBattleSelectClass, + OpenRoom2PickChaosDraftBattleSelectCard, + OpenRoomBattle2PickChaosDraftBattleDoMatching, + OpenRoom2PickChaosDraftMatchFinish, + OpenRoomBattle2PickChaosDraftFinishLoad, + OpenRoomMultiDeckSet, + OpenRoomMultiResetHistory, + OpenRoomMultiGetHistory, + EventRoomMultiDeckSet, + EventRoomMultiResetHistory, + EventRoomRetire, + OpenRoomMultiDeckBanDecideBan, + OpenRoomGetDeckHof, + OpenRoomSetDeckHof, + OpenRoomMatchFinishHof, + OpenRoomGetDeckAvatar, + OpenRoomSetDeckAvatar, + OpenRoomMatchFinishAvatar, + OpenRoomBattleDoMatchingAvatar, + GatheringRoomBattleSetDeck, + GatheringRoomBattleDoMatching, + GatheringRoomBattleFinish, + GatheringRoomCreateRoom, + GatheringRoomEnterRoom, + GatheringRoomLeaveRoom, + GatheringRoomLeaveRoomForTournament, + GatheringRoomCloseRoom, + GatheringRoomEnterVacancyRoom, + GatheringRoomEnterRoomForTournament, + GatheringRoomInitializeRoomBattle, + GatheringRoomInitializeRoomBattleHistory, + GatheringRoomKickRoom, + GatheringRoomForceKickRoom, + GatheringRoomForceKickRoomForTournament, + GatheringRoomForceCloseRoom, + GatheringRoomGetHistory, + GatheringRoomDoWatch, + GatheringRoomWatchRoom, + GatheringRoomDeckEntry, + ArenaTwoPickTop, + ArenaTwoPickEntry, + ArenaTwoPickClassCharaChoose, + ArenaTwoPickCardChoose, + ArenaTwoPickFinish, + ArenaTwoPickRewardInfo, + ArenaTwoPickRetire, + ArenaTwoPickDoMatching, + ArenaTwoPickFinishLoad, + ArenaTwoPickFinishBattle, + ArenaTwoPickChaosDoMatching, + ArenaTwoPickChaosFinishBattle, + ArenaTwoPickCubeDoMatching, + ArenaTwoPickCubeFinishBattle, + ArenaSealedTop, + ArenaSealedEntry, + ArenaSealedSelectClass, + ArenaSealedGetCardPackInfo, + ArenaSealedGetCardInfo, + ArenaSealedUpdateDeck, + ArenaSealedGetMaintCardList, + ArenaSealedRetire, + ArenaSealedFinish, + ArenaSealedSelectPhantomCard, + ArenaSealedBattleDoMatching, + ArenaSealedBattleFinish, + ChallangeHistory, + ChallangeRankingHistory, + ColosseumTop, + ColosseumEntry, + ColosseumEntryInfo, + ColosseumDeckEntry, + ColosseumDetail, + ColosseumRetireNormalRound, + ColosseumFinishAttachedReward, + ColosseumTwoPickClassInit, + ColosseumTwoPickClassSet, + ColosseumTwoPickCardGet, + ColosseumTwoPickCardSet, + ColosseumHOFDeckInfo, + ColosseumHOFDeckEntry, + ColosseumWindFallDeckInfo, + ColosseumWindFallDeckEntry, + ColosseumAvatarDeckInfo, + ColosseumAvatarDeckEntry, + ColosseumDoMatching, + ColosseumBattleFinishLoad, + ColosseumBattleFinish, + ColosseumDoMatchingRankMatch, + ColosseumBattleFinishLoadRankMatch, + ColosseumBattleFinishRankMatch, + PackInfo, + PackInfoTutorial, + PackOpen, + PackOpenTutorial, + GetSelectSkinOwnedStatus, + PackSetRotationStarterClass, + GachaPointInfo, + GachaPointExchange, + BuildDeckInfo, + BuildDeckBuy, + BuildDeckGetPurchaseCount, + SkinInfo, + SkinBuySingle, + SkinBuyMulti, + SkinBuyMultiReward, + SleeveInfo, + SleeveBuy, + SleeveList, + SleeveFavorite, + ItemPurchaseInfo, + ItemPurchaseBuy, + SpotCardInfo, + SpotCardExchange, + MissionInfo, + MissionReceiveReward, + MissionRetire, + MissionBuyAdditionalRight, + MissionChangeReceiveSetting, + BeginnerMissionInfo, + BeginnerMissionSendApply, + AchievementReceiveReward, + NameUpdate, + RegionCodeUpdate, + OfficialMarkDisplay, + ConfigUpdate, + ArenaConfigUpdate, + ConfigUpdateFoilPreferred, + ConfigUpdatePrizePreferred, + DebugCacheClear, + DebugPlusRupy, + DebugPlusFrupy, + DebugResetRupy, + DebugResetFrupy, + DebugUpdateCard, + DebugUpdateCard1, + DebugUpdateCard2, + DebugResetCard, + DebugResetSleeve, + DebugReleaseClassChara, + DebugAddBattlePoint, + DebugTutorialUpdate, + PaymentItemList, + PaymentStart, + PaymentCancel, + PaymentFinish, + BirthUpdate, + EmblemInfo, + EmblemUpdate, + EmblemFavorite, + DegreeInfo, + DegreeUpdate, + DegreeFavorite, + LeaderSkinInfo, + LeaderSkinUpdate, + RankingPeriodList, + RankingRankMatchClassInfoRotation, + RankingRankMatchClassInfoUnlimited, + RankingRankMatchClassInfoCrossover, + RankingMasterInfoRotation, + RankingMasterInfoUnlimited, + RankingMasterInfoCrossover, + RankingTwoPickInfo, + RankingSealedInfo, + RankingMasterMyHistories, + ItemAcquireHistoryInfo, + PracticeInfo, + PracticeStart, + PracticeFinish, + PracticePuzzleList, + PracticePuzzleInfo, + PracticePuzzleBattleStart, + PracticePuzzleBattleFinish, + PracticePuzzleMissionList, + CountryCodeSet, + SendAllTraceLog, + SendTraceLog, + SendLastTraceLog, + GenerateDeckCode, + GetDeckInfoFromDeckCode, + GenerateDeckImage, + GenerateDeckImageMaintenance, + InviteGetFriendList, + InviteFriend, + InviteGetList, + InviteCancel, + InviteAccept, + InviteConfigUpdate, + ReplayInfo, + ReplayDetail, + GrandMaster, + MasterResetMonth, + BattleReport, + Vote, + VoteData, + AcceptAgreement, + CheckSpecialTitle, + ClientCacheClear, + DeleteUserData, + LotteryInfo, + LotteryReceive, + LotteryReceiveDoubleChance, + LotteryReceiveBigChance, + LotteryReceiveTweetData, + GatheringCreate, + GatheringGetInfo, + GatheringSelfInfo, + GatheringEntry, + GatheringLeave, + GatheringInvite, + GatheringInviteCancel, + GatheringInviteReject, + GatheringFriendList, + GatheringInviteUserList, + GatheringConfirmDeckList, + GatheringDeckList, + GatheringUpdateDeckName, + GatheringUpdateDeckSleeve, + GatheringUpdateDeckLeaderSkin, + GatheringUpdateDeckRandomLeaderSkin, + GatheringInterrupt, + GatheringGetReceiveInvite, + GatheringRanking, + GatheringKick, + GatheringUpdateDescription, + GatheringInfoDependJoin, + GatheringTournamentInfo, + GatheringChatPost, + GatheringChatMessages, + GatheringChatAddDeck, + GatheringChatAddReplay, + GatheringChatReplayDetail, + GatheringChatDeckLog, + GatheringChatDeleteDeck, + BattlePassInfo, + BattlePassItemList, + BattlePassBuy, + AdjustSettingUpdate, + OpenRoomGetDeckWindFall, + OpenRoomSetDeckWindFall, + OpenRoomMatchFinishWindFall, + OpenRoomBattleBattleDoMatchingWindFall, + CompetitionLobbyInfo, + CompetitionRetire, + CompetitionFinish, + CompetitionBattleDoMatching, + CompetitionBattleDoMatchingRankMatch, + CompetitionBattleFinish, + CompetitionBattleFinishRankMatch, + CompetitionEntry, + CompetitionRegisterDeck, + CompetitionCheckPeriod, + CompetitionJoin, + CompetitionPermanentEntry, + CompetitionClassChoose, + CompetitionCardChoose, + CompetitionSetCurrentDeck, + BingoInfo, + BingoDraw, + BingoReceiveTweetData, + CrossoverInfo, + CrossoverReceiveRankReward, + CrossoverReceiveAllRankRewards, + CrossoverRankingMasterMyHistories, + CrossoverGrandMaster, + NeutralPopularityVoteInfo, + NeutralPopularityVoteExecute, + LeaderPopularityVoteInfo, + LeaderPopularityVoteExecute, + AccountDeleteReserve, + AccountDeleteCancel, + BossRushLobbyInfo, + BossRushRegisterDeck, + BossRushSetAbility, + BossRushReceiveReward, + BossRushRetire, + BossRushStart, + BossRushHiddenBattleStart, + BossRushFinish, + BossRushHiddenBattleFinish, + BossRushLoseFinish, + BossRushClearDeckList, + ReceiveUpgradeTreasureBox, + TreasureOpenSpecialTreasureBox, + FreeCardPackBoxFinish, + RedEtherCampaignLobby, + TransitionInfo, + TransitionPublish, + TransitionDelete, + CheckTimeSlipRotationPeriod + } + + public static Dictionary ApiList = new Dictionary + { + { + Type.Load, + "load/index" + }, + { + Type.GetCardMaster, + "immutable_data/card_master" + }, + { + Type.Mypage, + "mypage/index" + }, + { + Type.MypageFinishBattle, + "mypage/finish_battle" + }, + { + Type.MypageRefresh, + "mypage/refresh" + }, + { + Type.MyPageCodeInput, + "campaign/regist_serial_code" + }, + { + Type.MyPageSettingUpdate, + "user_mypage/update" + }, + { + Type.SpecialCrystalInfo, + "mypage/get_special_crystal_info" + }, + { + Type.Profile, + "profile/index" + }, + { + Type.TutorialUpdate, + "tutorial/update" + }, + { + Type.TutorialUpdateAction, + "tutorial/update_action" + }, + { + Type.DownloadStart, + "download_time/start" + }, + { + Type.DownloadFinish, + "download_time/end" + }, + { + Type.CardDestruct, + "card/destruct" + }, + { + Type.CardCreate, + "card/create" + }, + { + Type.PremiumCardConversion, + "card/create_foil_card" + }, + { + Type.CardProtect, + "card/protect" + }, + { + Type.DeckInfo, + "deck/info" + }, + { + Type.OpenRoomDeckInfo, + "open_room/deck_list" + }, + { + Type.DeckMyList, + "deck/my_list" + }, + { + Type.DeckUpdate, + "deck/update" + }, + { + Type.DeckNameUpdate, + "deck/update_name" + }, + { + Type.DeckSet, + "deck/set_deck_redis" + }, + { + Type.EmptyDeckInfo, + "deck/get_empty_deck_number" + }, + { + Type.DeckOrder, + "deck/update_order" + }, + { + Type.DeckUpdateSleeve, + "deck/update_sleeve" + }, + { + Type.DeckLeaderSkinUpdate, + "deck/update_leader_skin" + }, + { + Type.DeckRandomLeaderSkinUpdate, + "deck/update_random_leader_skin" + }, + { + Type.DeckIntroduction, + "introduce_deck/info" + }, + { + Type.IntroduceDeckSeries, + "introduce_deck/series_list" + }, + { + Type.DeckDelete, + "deck/delete_deck_list" + }, + { + Type.PracticeDeckInfo, + "practice/deck_list" + }, + { + Type.DeckAutoCreate, + "auto_deck/create" + }, + { + Type.DeckInfoConvention, + "offline_event/deck_info" + }, + { + Type.DeckUpdateConvention, + "offline_event/deck_update" + }, + { + Type.DeckNameUpdateConvention, + "offline_event/update_deck_name" + }, + { + Type.DeckUpdateSleeveConvention, + "offline_event/update_sleeve" + }, + { + Type.DeckLeaderSkinUpdateConvention, + "offline_event/update_leader_skin" + }, + { + Type.DeckRandomLeaderSkinUpdateConvention, + "offline_event/update_random_leader_skin" + }, + { + Type.ConventionInfo, + "offline_event/info" + }, + { + Type.ConventionRoomGetHistory, + "open_room_offline_event/get_score" + }, + { + Type.ConventionDeckOrder, + "offline_event/update_order" + }, + { + Type.ConventionDeckDelete, + "offline_event/delete_deck_list" + }, + { + Type.ConventionDoWatch, + "open_room_offline_event/do_watch" + }, + { + Type.MainStoryInfo, + "main_story/info" + }, + { + Type.MainStoryStart, + "main_story/start" + }, + { + Type.MainStoryFinish, + "main_story/finish" + }, + { + Type.MainStoryAllFinish, + "main_story/all_finish" + }, + { + Type.MainStorySection, + "main_story/section" + }, + { + Type.MainStoryLeaderSelect, + "main_story/leader_select" + }, + { + Type.MainStoryGetDeckList, + "main_story/get_deck_list" + }, + { + Type.LimitedStoryInfo, + "limited_story/info" + }, + { + Type.LimitedStoryStart, + "limited_story/start" + }, + { + Type.LimitedStoryFinish, + "limited_story/finish" + }, + { + Type.LimitedStoryAllFinish, + "limited_story/all_finish" + }, + { + Type.LimitedStorySection, + "limited_story/section" + }, + { + Type.LimitedStoryLeaderSelect, + "limited_story/leader_select" + }, + { + Type.EventStorySection, + "event_story/section" + }, + { + Type.EventStoryLeaderSelect, + "event_story/leader_select" + }, + { + Type.EventStoryInfo, + "event_story/info" + }, + { + Type.EventStoryGetDeckList, + "event_story/get_deck_list" + }, + { + Type.EventStoryStart, + "event_story/start" + }, + { + Type.EventStoryFinish, + "event_story/finish" + }, + { + Type.EventStoryAllFinish, + "event_story/all_finish" + }, + { + Type.AllStorySection, + "story/section" + }, + { + Type.QuestInfo, + "quest/info" + }, + { + Type.QuestMission, + "quest/mission" + }, + { + Type.QuestPoint, + "quest/point" + }, + { + Type.QuestStart, + "quest/start" + }, + { + Type.QuestFinish, + "quest/finish" + }, + { + Type.QuestRewardReceive, + "quest/receive_reward" + }, + { + Type.QuestRewardReceiveAll, + "quest/receive_reward_all" + }, + { + Type.QuestGetDeckList, + "quest/get_deck_list" + }, + { + Type.QuestPuzzleStart, + "quest/puzzle_start" + }, + { + Type.QuestPuzzleFinish, + "quest/puzzle_finish" + }, + { + Type.QuestOpenPuzzleDialog, + "quest/open_puzzle_dialog" + }, + { + Type.QuestTweet, + "quest/receive_tweet_reward" + }, + { + Type.FriendInfo, + "friend/info" + }, + { + Type.SendFriendApplyInfo, + "friend/send_apply_info" + }, + { + Type.ReceiveFriendApplyInfo, + "friend/receive_apply_info" + }, + { + Type.FriendApplySend, + "friend/send_apply" + }, + { + Type.FriendApplyApprove, + "friend/approve_apply" + }, + { + Type.FriendApplyCancel, + "friend/cancel_apply" + }, + { + Type.FriendApplyCancelAll, + "friend/cancel_apply_all" + }, + { + Type.FriendApplyReject, + "friend/reject_apply" + }, + { + Type.FriendApplyRejectAll, + "friend/reject_apply_all" + }, + { + Type.FriendReject, + "friend/reject_friend" + }, + { + Type.FriendUserSearch, + "friend/search_user" + }, + { + Type.PlayedTogetherInfo, + "friend/played_together_info" + }, + { + Type.GuildInfo, + "guild/info" + }, + { + Type.GuildCreate, + "guild/create" + }, + { + Type.GuildUpdate, + "guild/update" + }, + { + Type.GuildUpdateDescription, + "guild/update_description" + }, + { + Type.GuildEmblemList, + "guild/emblem_list" + }, + { + Type.GuildEmblemUpdate, + "guild/update_emblem" + }, + { + Type.GuildSearch, + "guild/search_guild" + }, + { + Type.GuildOthersInfo, + "guild/others_info" + }, + { + Type.GuildJoin, + "guild/join" + }, + { + Type.GuildJoinRequestCancel, + "guild/cancel_join_request" + }, + { + Type.GuildJoinRequestList, + "guild/join_request_list" + }, + { + Type.GuildJoinRequestAccept, + "guild/join_request_accept" + }, + { + Type.GuildJoinRequestReject, + "guild/reject_join_request" + }, + { + Type.GuildInvite, + "guild/invite" + }, + { + Type.GuildCancelInvite, + "guild/cancel_invite" + }, + { + Type.GuildInviteUserList, + "guild/invite_user_list" + }, + { + Type.GuildFriendList, + "guild/friend_list" + }, + { + Type.GuildInvitedList, + "guild/invited_guild_list" + }, + { + Type.GuildRejectInvite, + "guild/reject_invite" + }, + { + Type.GuildChangeRole, + "guild/change_role" + }, + { + Type.GuildLeave, + "guild/leave" + }, + { + Type.GuildBreakup, + "guild/breakup" + }, + { + Type.GuildRemove, + "guild/remove" + }, + { + Type.GuildChatPost, + "guild_chat/post" + }, + { + Type.GuildChatAddDeck, + "guild_chat/add_deck" + }, + { + Type.GuildChatAddReplay, + "guild_chat/add_replay" + }, + { + Type.GuildChatMessages, + "guild_chat/messages" + }, + { + Type.GuildChatDeckLog, + "guild_chat/deck_log" + }, + { + Type.GuildChatDeleteDeck, + "guild_chat/delete_deck" + }, + { + Type.GuildChatReplayDetail, + "guild_chat/replay_detail" + }, + { + Type.InformationTop, + "information/top" + }, + { + Type.InformationDetail, + "information/detail/1" + }, + { + Type.MailTop, + "gift/top" + }, + { + Type.MailTopTutorial, + "tutorial/gift_top" + }, + { + Type.MailRead, + "gift/receive_gift" + }, + { + Type.MailReadTutorial, + "tutorial/gift_receive" + }, + { + Type.BattleRecovery, + "battle/get_recovery_params" + }, + { + Type.BattleAbortRecovery, + "battle/abort_recovery" + }, + { + Type.AbortSoloPlayRecovery, + "npc_battle/abort_solo_play_recovery" + }, + { + Type.RankMatchFinishRotation, + "rotation_rank_battle/finish" + }, + { + Type.RankMatchFinishUnlimited, + "unlimited_rank_battle/finish" + }, + { + Type.RankMatchFinishCrossover, + "crossover_rank_battle/finish" + }, + { + Type.RankBattleDoMatchingRotation, + "rotation_rank_battle/do_matching" + }, + { + Type.RankBattleDoMatchingUnlimited, + "unlimited_rank_battle/do_matching" + }, + { + Type.RankBattleDoMatchingCrossover, + "crossover_rank_battle/do_matching" + }, + { + Type.RankBattleFinishLoadRotation, + "rotation_rank_battle/finish_load" + }, + { + Type.RankBattleFinishLoadUnlimited, + "unlimited_rank_battle/finish_load" + }, + { + Type.RankBattleForceFinish, + "rank_battle/force_finish" + }, + { + Type.FreeBattleDoMatchingRotation, + "rotation_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingUnlimited, + "unlimited_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingPreRotation, + "pre_rotation_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingCrossover, + "crossover_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingMyRotation, + "my_rotation_free_battle/do_matching" + }, + { + Type.FreeBattleDoMatchingAvatar, + "avatar_free_battle/do_matching" + }, + { + Type.FreeBattleFinishLoadRotation, + "rotation_free_battle/finish_load" + }, + { + Type.FreeBattleFinishLoadUnlimited, + "unlimited_free_battle/finish_load" + }, + { + Type.FreeBattleFinishLoadAvatar, + "avatar_free_battle/finish_load" + }, + { + Type.FreeMatchFinishRotation, + "rotation_free_battle/finish" + }, + { + Type.FreeMatchFinishCrossover, + "crossover_free_battle/finish" + }, + { + Type.FreeMatchFinishMyRotation, + "my_rotation_free_battle/finish" + }, + { + Type.FreeMatchFinishAvatar, + "avatar_free_battle/finish" + }, + { + Type.FreeMatchFinishUnlimited, + "unlimited_free_battle/finish" + }, + { + Type.FreeMatchFinishPreRotation, + "pre_rotation_free_battle/finish" + }, + { + Type.FreeBattleForceFinish, + "free_battle/force_finish" + }, + { + Type.OpenRoomBattleBattleDoMatching, + "open_room_battle/do_matching" + }, + { + Type.OpenRoomBattleBattleDoMatchingHOF, + "open_room_hof_battle/do_matching" + }, + { + Type.OpenRoomBattleFinishLoad, + "open_room_battle/finish_load" + }, + { + Type.OpenRoomMatchFinish, + "open_room_battle/finish" + }, + { + Type.OpenRoomBattleForceFinish, + "open_room_battle/force_finish" + }, + { + Type.EventRoomMatchFinish, + "open_room_offline_event_battle/finish" + }, + { + Type.OpenRoomBattle2PickBattleDoMatching, + "open_room_two_pick_battle/do_matching" + }, + { + Type.OpenRoom2PickMatchFinish, + "open_room_two_pick_battle/finish" + }, + { + Type.EventRoomBattleBattleDoMatching, + "open_room_offline_event_battle/do_matching" + }, + { + Type.EventRoomBattleFinishLoad, + "open_room_offline_event_battle/finish_load" + }, + { + Type.AIRotationRankBattleStart, + "ai_rotation_rank_battle/start" + }, + { + Type.AIRotationRankBattleFinish, + "ai_rotation_rank_battle/finish" + }, + { + Type.AIUnlimitedRankBattleStart, + "ai_unlimited_rank_battle/start" + }, + { + Type.AIUnlimitedRankBattleFinish, + "ai_unlimited_rank_battle/finish" + }, + { + Type.OpenRoomBattleCreateRoom, + "open_room/create_room" + }, + { + Type.OpenRoomBattleCloseRoom, + "open_room/close_room" + }, + { + Type.OpenRoomBattleKickRoom, + "open_room/kick_room" + }, + { + Type.OpenRoomBattleForceKickRoom, + "open_room/force_kick_room" + }, + { + Type.OpenRoomBattleSetDeck, + "open_room_battle/set_deck" + }, + { + Type.OpenRoomBattleEnterRoom, + "open_room/enter_room" + }, + { + Type.OpenRoomBattleLeaveRoom, + "open_room/leave_room" + }, + { + Type.OpenRoomBattleWatch, + "open_room/watch_room" + }, + { + Type.OpenRoomInitializeRoomBattle, + "open_room/initialize_room_battle" + }, + { + Type.OpenRoomDoWatch, + "open_room/do_watch" + }, + { + Type.OpenRoomForceClose, + "open_room/force_release_room" + }, + { + Type.OpenRoomGetRecoverParam, + "open_room/get_recovery_params" + }, + { + Type.RoomAbortRecovery, + "open_room/abort_recovery" + }, + { + Type.RoomGetHashTag, + "open_room/get_hash_tags" + }, + { + Type.EventRoomBattleCreateRoom, + "open_room_offline_event/create_room" + }, + { + Type.EventRoomBattleEnterRoom, + "open_room_offline_event/enter_room" + }, + { + Type.EventRoomBattleSetDeck, + "open_room_offline_event_battle/set_deck" + }, + { + Type.EventRoomInitializeRoomBattle, + "open_room_offline_event/initialize_room_battle" + }, + { + Type.EventRoomBattleLeaveRoom, + "open_room_offline_event/leave_room" + }, + { + Type.EventRoomBattleCloseRoom, + "open_room_offline_event/close_room" + }, + { + Type.EventRoomBattleKickRoom, + "open_room_offline_event/kick_room" + }, + { + Type.EventRoomBattleForceKickRoom, + "open_room_offline_event/force_kick_room" + }, + { + Type.EventRoomForceClose, + "open_room_offline_event/force_release_room" + }, + { + Type.EventRoomBattleWatch, + "open_room_offline_event/watch_room" + }, + { + Type.OpenRoom2PickBattleDeckReset, + "open_room_two_pick_battle/reset_deck" + }, + { + Type.OpenRoom2PickBattleBeginCreateDeck, + "open_room_two_pick_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickBattleSelectClass, + "open_room_two_pick_battle/select_class" + }, + { + Type.OpenRoom2PickBattleSelectCard, + "open_room_two_pick_battle/select_card_set" + }, + { + Type.OpenRoom2PickMultiBattleDeckReset, + "open_room_two_pick_multiple_battle/reset_deck" + }, + { + Type.OpenRoom2PickMultiBattleBeginCreateDeck, + "open_room_two_pick_multiple_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickMultiBattleSelectClass, + "open_room_two_pick_multiple_battle/select_class" + }, + { + Type.OpenRoom2PickMultiBattleSelectCard, + "open_room_two_pick_multiple_battle/select_card_set" + }, + { + Type.OpenRoomBattle2PickMultiBattleDoMatching, + "open_room_two_pick_multiple_battle/do_matching" + }, + { + Type.OpenRoom2PickMultiBattleMatchFinish, + "open_room_two_pick_multiple_battle/finish" + }, + { + Type.OpenRoom2PickMultiBattleDeckList, + "open_room_two_pick_multiple_battle/battle_result_list" + }, + { + Type.OpenRoomInitializeOwnerRoomRelations, + "open_room/initialize_owner_room_relations" + }, + { + Type.OpenRoom2PickDraftBattleDeckReset, + "open_room_two_pick_backdraft_battle/reset_deck" + }, + { + Type.OpenRoom2PickDraftBattleBeginCreateDeck, + "open_room_two_pick_backdraft_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickDraftBattleSelectClass, + "open_room_two_pick_backdraft_battle/select_class" + }, + { + Type.OpenRoom2PickDraftBattleSelectCard, + "open_room_two_pick_backdraft_battle/select_card_set" + }, + { + Type.OpenRoomBattle2PickDraftBattleDoMatching, + "open_room_two_pick_backdraft_battle/do_matching" + }, + { + Type.OpenRoomBattle2PickDraftFinishLoad, + "open_room_two_pick_backdraft_battle/finish_load" + }, + { + Type.OpenRoom2PickDraftMatchFinish, + "open_room_two_pick_backdraft_battle/finish" + }, + { + Type.OpenRoom2PickCubeBattleDoMatching, + "open_room_two_pick_cube_battle/do_matching" + }, + { + Type.OpenRoom2PickCubeBattleFinish, + "open_room_two_pick_cube_battle/finish" + }, + { + Type.OpenRoom2PickCubeBattleResetDeck, + "open_room_two_pick_cube_battle/reset_deck" + }, + { + Type.OpenRoom2PickCubeBattleBeginCreateDeck, + "open_room_two_pick_cube_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickCubeBattleSelectClass, + "open_room_two_pick_cube_battle/select_class" + }, + { + Type.OpenRoom2PickCubeBattleSelectCardSet, + "open_room_two_pick_cube_battle/select_card_set" + }, + { + Type.OpenRoom2PickCubeMultiBattleDoMatching, + "open_room_two_pick_cube_multiple_battle/do_matching" + }, + { + Type.OpenRoom2PickCubeMultiBattleFinish, + "open_room_two_pick_cube_multiple_battle/finish" + }, + { + Type.OpenRoom2PickCubeMultiBattleResetDeck, + "open_room_two_pick_cube_multiple_battle/reset_deck" + }, + { + Type.OpenRoom2PickCubeMultiBattleBeginCreateDeck, + "open_room_two_pick_cube_multiple_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickCubeMultiBattleSelectClass, + "open_room_two_pick_cube_multiple_battle/select_class" + }, + { + Type.OpenRoom2PickCubeMultiBattleSelectCardSet, + "open_room_two_pick_cube_multiple_battle/select_card_set" + }, + { + Type.OpenRoom2PickCubeDraftBattleDeckReset, + "open_room_two_pick_cube_backdraft_battle/reset_deck" + }, + { + Type.OpenRoom2PickCubeDraftBattleBeginCreateDeck, + "open_room_two_pick_cube_backdraft_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickCubeDraftBattleSelectClass, + "open_room_two_pick_cube_backdraft_battle/select_class" + }, + { + Type.OpenRoom2PickCubeDraftBattleSelectCard, + "open_room_two_pick_cube_backdraft_battle/select_card_set" + }, + { + Type.OpenRoomBattle2PickCubeDraftBattleDoMatching, + "open_room_two_pick_cube_backdraft_battle/do_matching" + }, + { + Type.OpenRoomBattle2PickCubeDraftFinishLoad, + "open_room_two_pick_cube_backdraft_battle/finish_load" + }, + { + Type.OpenRoom2PickCubeDraftMatchFinish, + "open_room_two_pick_cube_backdraft_battle/finish" + }, + { + Type.OpenRoom2PickChaosBattleDoMatching, + "open_room_two_pick_chaos_battle/do_matching" + }, + { + Type.OpenRoom2PickChaosBattleFinish, + "open_room_two_pick_chaos_battle/finish" + }, + { + Type.OpenRoom2PickChaosBattleResetDeck, + "open_room_two_pick_chaos_battle/reset_deck" + }, + { + Type.OpenRoom2PickChaosBattleBeginCreateDeck, + "open_room_two_pick_chaos_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickChaosBattleSelectClass, + "open_room_two_pick_chaos_battle/select_class" + }, + { + Type.OpenRoom2PickChaosBattleSelectCardSet, + "open_room_two_pick_chaos_battle/select_card_set" + }, + { + Type.OpenRoom2PickChaosMultiBattleDoMatching, + "open_room_two_pick_chaos_multiple_battle/do_matching" + }, + { + Type.OpenRoom2PickChaosMultiBattleFinish, + "open_room_two_pick_chaos_multiple_battle/finish" + }, + { + Type.OpenRoom2PickChaosMultiBattleResetDeck, + "open_room_two_pick_chaos_multiple_battle/reset_deck" + }, + { + Type.OpenRoom2PickChaosMultiBattleBeginCreateDeck, + "open_room_two_pick_chaos_multiple_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickChaosMultiBattleSelectClass, + "open_room_two_pick_chaos_multiple_battle/select_class" + }, + { + Type.OpenRoom2PickChaosMultiBattleSelectCardSet, + "open_room_two_pick_chaos_multiple_battle/select_card_set" + }, + { + Type.OpenRoom2PickChaosDraftBattleDeckReset, + "open_room_two_pick_chaos_backdraft_battle/reset_deck" + }, + { + Type.OpenRoom2PickChaosDraftBattleBeginCreateDeck, + "open_room_two_pick_chaos_backdraft_battle/begin_create_deck" + }, + { + Type.OpenRoom2PickChaosDraftBattleSelectClass, + "open_room_two_pick_chaos_backdraft_battle/select_class" + }, + { + Type.OpenRoom2PickChaosDraftBattleSelectCard, + "open_room_two_pick_chaos_backdraft_battle/select_card_set" + }, + { + Type.OpenRoomBattle2PickChaosDraftBattleDoMatching, + "open_room_two_pick_chaos_backdraft_battle/do_matching" + }, + { + Type.OpenRoomBattle2PickChaosDraftFinishLoad, + "open_room_two_pick_chaos_backdraft_battle/finish_load" + }, + { + Type.OpenRoom2PickChaosDraftMatchFinish, + "open_room_two_pick_chaos_backdraft_battle/finish" + }, + { + Type.OpenRoomMultiDeckSet, + "deck/deck_entry" + }, + { + Type.OpenRoomMultiResetHistory, + "open_room/initialize_room_battle_history" + }, + { + Type.OpenRoomMultiGetHistory, + "open_room/get_score" + }, + { + Type.EventRoomMultiDeckSet, + "offline_event/deck_entry" + }, + { + Type.EventRoomMultiResetHistory, + "open_room_offline_event/initialize_room_battle_history" + }, + { + Type.OpenRoomMultiDeckBanDecideBan, + "open_room/ban_deck" + }, + { + Type.OpenRoomGetDeckHof, + "open_room_hof_battle/get_hof_deck_list" + }, + { + Type.OpenRoomSetDeckHof, + "open_room_hof_battle/set_deck" + }, + { + Type.OpenRoomMatchFinishHof, + "open_room_hof_battle/finish" + }, + { + Type.OpenRoomGetDeckWindFall, + "open_room_windfall_battle/get_windfall_deck_list" + }, + { + Type.OpenRoomSetDeckWindFall, + "open_room_windfall_battle/set_deck" + }, + { + Type.OpenRoomMatchFinishWindFall, + "open_room_windfall_battle/finish" + }, + { + Type.OpenRoomBattleBattleDoMatchingWindFall, + "open_room_windfall_battle/do_matching" + }, + { + Type.OpenRoomGetDeckAvatar, + "open_room_avatar_battle/get_avatar_deck_list" + }, + { + Type.OpenRoomSetDeckAvatar, + "open_room_avatar_battle/set_deck" + }, + { + Type.OpenRoomMatchFinishAvatar, + "open_room_avatar_battle/finish" + }, + { + Type.OpenRoomBattleDoMatchingAvatar, + "open_room_avatar_battle/do_matching" + }, + { + Type.GatheringRoomBattleSetDeck, + "gathering_room_battle/set_deck" + }, + { + Type.GatheringRoomBattleDoMatching, + "gathering_room_battle/do_matching" + }, + { + Type.GatheringRoomBattleFinish, + "gathering_room_battle/finish" + }, + { + Type.GatheringRoomCreateRoom, + "gathering_room/create_room" + }, + { + Type.GatheringRoomEnterRoom, + "gathering_room/enter_room" + }, + { + Type.GatheringRoomLeaveRoom, + "gathering_room/leave_room" + }, + { + Type.GatheringRoomLeaveRoomForTournament, + "gathering_room/leave_room_for_tournament" + }, + { + Type.GatheringRoomCloseRoom, + "gathering_room/close_room" + }, + { + Type.GatheringRoomEnterVacancyRoom, + "gathering_room/enter_vacancy_room" + }, + { + Type.GatheringRoomEnterRoomForTournament, + "gathering_room/enter_room_for_tournament" + }, + { + Type.GatheringRoomInitializeRoomBattle, + "gathering_room/initialize_room_battle" + }, + { + Type.GatheringRoomInitializeRoomBattleHistory, + "gathering_room/initialize_room_battle_history" + }, + { + Type.GatheringRoomKickRoom, + "gathering_room/kick_room" + }, + { + Type.GatheringRoomForceKickRoom, + "gathering_room/force_kick_room" + }, + { + Type.GatheringRoomForceKickRoomForTournament, + "gathering_room/force_kick_room_for_tournament" + }, + { + Type.GatheringRoomForceCloseRoom, + "gathering_room/force_release_room" + }, + { + Type.GatheringRoomGetHistory, + "gathering_room/get_score" + }, + { + Type.GatheringRoomDoWatch, + "gathering_room/do_watch" + }, + { + Type.GatheringRoomWatchRoom, + "gathering_room/watch_room" + }, + { + Type.GatheringRoomDeckEntry, + "gathering_room/deck_entry" + }, + { + Type.ArenaTwoPickTop, + "arena_two_pick/top" + }, + { + Type.ArenaTwoPickEntry, + "arena_two_pick/entry" + }, + { + Type.ArenaTwoPickClassCharaChoose, + "arena_two_pick/class_choose" + }, + { + Type.ArenaTwoPickCardChoose, + "arena_two_pick/card_choose" + }, + { + Type.ArenaTwoPickFinish, + "arena_two_pick/finish" + }, + { + Type.ArenaTwoPickRewardInfo, + "arena_two_pick/reward_info" + }, + { + Type.ArenaTwoPickRetire, + "arena_two_pick/retire" + }, + { + Type.ArenaTwoPickDoMatching, + "arena_two_pick_battle/do_matching" + }, + { + Type.ArenaTwoPickFinishLoad, + "arena_two_pick_battle/finish_load" + }, + { + Type.ArenaTwoPickFinishBattle, + "arena_two_pick_battle/finish" + }, + { + Type.ArenaTwoPickChaosDoMatching, + "arena_two_pick_chaos_battle/do_matching" + }, + { + Type.ArenaTwoPickChaosFinishBattle, + "arena_two_pick_chaos_battle/finish" + }, + { + Type.ArenaTwoPickCubeDoMatching, + "arena_two_pick_cube_battle/do_matching" + }, + { + Type.ArenaTwoPickCubeFinishBattle, + "arena_two_pick_cube_battle/finish" + }, + { + Type.ArenaSealedTop, + "arena_sealed/top" + }, + { + Type.ArenaSealedEntry, + "arena_sealed/entry" + }, + { + Type.ArenaSealedSelectClass, + "arena_sealed/select_class" + }, + { + Type.ArenaSealedGetCardPackInfo, + "arena_sealed/pack_info" + }, + { + Type.ArenaSealedGetCardInfo, + "arena_sealed/get_card_list" + }, + { + Type.ArenaSealedUpdateDeck, + "arena_sealed/update_deck" + }, + { + Type.ArenaSealedGetMaintCardList, + "arena_sealed/get_card_maintenance_list" + }, + { + Type.ArenaSealedRetire, + "arena_sealed/retire" + }, + { + Type.ArenaSealedFinish, + "arena_sealed/finish" + }, + { + Type.ArenaSealedSelectPhantomCard, + "arena_sealed/select_phantom_card" + }, + { + Type.ArenaSealedBattleDoMatching, + "arena_sealed_battle/do_matching" + }, + { + Type.ArenaSealedBattleFinish, + "arena_sealed_battle/finish" + }, + { + Type.ChallangeHistory, + "arena/get_challenge_info" + }, + { + Type.ChallangeRankingHistory, + "arena/get_challenge_ranking_history" + }, + { + Type.ColosseumTop, + "arena_colosseum/top" + }, + { + Type.ColosseumEntry, + "arena_colosseum/entry" + }, + { + Type.ColosseumEntryInfo, + "arena_colosseum/get_fee_info" + }, + { + Type.ColosseumDeckEntry, + "arena_colosseum/register_deck" + }, + { + Type.ColosseumDetail, + "arena_colosseum/event_info" + }, + { + Type.ColosseumRetireNormalRound, + "arena_colosseum/retire" + }, + { + Type.ColosseumFinishAttachedReward, + "arena_colosseum/finish" + }, + { + Type.ColosseumTwoPickClassInit, + "arena_colosseum/get_candidate_classes" + }, + { + Type.ColosseumTwoPickClassSet, + "arena_colosseum/class_choose" + }, + { + Type.ColosseumTwoPickCardGet, + "arena_colosseum/get_candidate_cards" + }, + { + Type.ColosseumTwoPickCardSet, + "arena_colosseum/card_choose" + }, + { + Type.ColosseumHOFDeckInfo, + "arena_colosseum/get_hof_deck_list" + }, + { + Type.ColosseumHOFDeckEntry, + "arena_colosseum/register_hof_deck" + }, + { + Type.ColosseumWindFallDeckInfo, + "arena_colosseum/get_windfall_deck_list" + }, + { + Type.ColosseumWindFallDeckEntry, + "arena_colosseum/register_windfall_deck" + }, + { + Type.ColosseumAvatarDeckInfo, + "arena_colosseum/get_avatar_deck_list" + }, + { + Type.ColosseumAvatarDeckEntry, + "arena_colosseum/register_avatar_deck" + }, + { + Type.ColosseumDoMatching, + "colosseum_battle/do_matching" + }, + { + Type.ColosseumBattleFinishLoad, + "colosseum_battle/finish_load" + }, + { + Type.ColosseumBattleFinish, + "colosseum_battle/finish" + }, + { + Type.ColosseumDoMatchingRankMatch, + "colosseum_rank_battle/do_matching" + }, + { + Type.ColosseumBattleFinishLoadRankMatch, + "colosseum_rank_battle/finish_load" + }, + { + Type.ColosseumBattleFinishRankMatch, + "colosseum_rank_battle/finish" + }, + { + Type.PackInfo, + "pack/info" + }, + { + Type.PackInfoTutorial, + "tutorial/pack_info" + }, + { + Type.PackOpen, + "pack/open" + }, + { + Type.PackOpenTutorial, + "tutorial/pack_open" + }, + { + Type.GetSelectSkinOwnedStatus, + "pack/get_leader_skin_owned_status" + }, + { + Type.PackSetRotationStarterClass, + "pack/set_rotation_starter_class" + }, + { + Type.GachaPointInfo, + "pack/get_gacha_point_rewards" + }, + { + Type.GachaPointExchange, + "pack/exchange_gacha_point" + }, + { + Type.BuildDeckInfo, + "build_deck/info" + }, + { + Type.BuildDeckBuy, + "build_deck/buy" + }, + { + Type.BuildDeckGetPurchaseCount, + "build_deck/get_purchase_count" + }, + { + Type.SkinInfo, + "leader_skin/products" + }, + { + Type.SkinBuySingle, + "leader_skin/buy" + }, + { + Type.SkinBuyMulti, + "leader_skin/buy_set" + }, + { + Type.SkinBuyMultiReward, + "leader_skin/buy_set_item" + }, + { + Type.SleeveInfo, + "sleeve/info" + }, + { + Type.SleeveBuy, + "sleeve/buy" + }, + { + Type.SleeveList, + "sleeve/sleeve_list" + }, + { + Type.SleeveFavorite, + "sleeve/favorite" + }, + { + Type.ItemPurchaseInfo, + "item_purchase/info" + }, + { + Type.ItemPurchaseBuy, + "item_purchase/purchase" + }, + { + Type.SpotCardInfo, + "spot_card_exchange/top" + }, + { + Type.SpotCardExchange, + "spot_card_exchange/exchange" + }, + { + Type.MissionInfo, + "mission/info" + }, + { + Type.MissionReceiveReward, + "mission/receive_reward" + }, + { + Type.MissionRetire, + "mission/retire" + }, + { + Type.MissionBuyAdditionalRight, + "mission/buy_additional_right" + }, + { + Type.MissionChangeReceiveSetting, + "mission/change_receive_setting" + }, + { + Type.BeginnerMissionInfo, + "beginner_mission/info" + }, + { + Type.BeginnerMissionSendApply, + "beginner_mission/send_apply" + }, + { + Type.AchievementReceiveReward, + "achievement/receive_reward" + }, + { + Type.NameUpdate, + "account/update_name" + }, + { + Type.RegionCodeUpdate, + "account/update_region_code" + }, + { + Type.OfficialMarkDisplay, + "profile/update_official_mark_display" + }, + { + Type.ConfigUpdate, + "config/update" + }, + { + Type.ArenaConfigUpdate, + "config/update_challenge_config" + }, + { + Type.ConfigUpdateFoilPreferred, + "config/update_foil_preferred" + }, + { + Type.ConfigUpdatePrizePreferred, + "config/update_prize_preferred" + }, + { + Type.DebugCacheClear, + "debug/memcache_flush" + }, + { + Type.DebugPlusRupy, + "debug/plus_rupy" + }, + { + Type.DebugPlusFrupy, + "debug/plus_frupy" + }, + { + Type.DebugResetRupy, + "debug/reset_rupy" + }, + { + Type.DebugResetFrupy, + "debug/reset_frupy" + }, + { + Type.DebugUpdateCard, + "debug/update_card" + }, + { + Type.DebugUpdateCard1, + "debug/update_card_1" + }, + { + Type.DebugUpdateCard2, + "debug/update_card_2" + }, + { + Type.DebugResetCard, + "debug/reset_card" + }, + { + Type.DebugResetSleeve, + "debug/reset_sleeve" + }, + { + Type.DebugReleaseClassChara, + "debug/release_class_chara" + }, + { + Type.DebugAddBattlePoint, + "rank_match/add_battle_point" + }, + { + Type.DebugTutorialUpdate, + "tutorial/debug_update" + }, + { + Type.EmblemInfo, + "emblem/emblem_list" + }, + { + Type.EmblemUpdate, + "emblem/update_emblem" + }, + { + Type.EmblemFavorite, + "emblem/favorite" + }, + { + Type.DegreeInfo, + "degree/degree_list" + }, + { + Type.DegreeUpdate, + "degree/update_degree" + }, + { + Type.DegreeFavorite, + "degree/favorite" + }, + { + Type.LeaderSkinInfo, + "leader_skin/ids" + }, + { + Type.LeaderSkinUpdate, + "leader_skin/set" + }, + { + Type.RankingPeriodList, + "ranking/get_viewable_ranking_period_list" + }, + { + Type.RankingRankMatchClassInfoRotation, + "ranking/rank_match_class_win_rotation_info" + }, + { + Type.RankingRankMatchClassInfoUnlimited, + "ranking/rank_match_class_win_unlimited_info" + }, + { + Type.RankingRankMatchClassInfoCrossover, + "ranking/rank_match_class_win_crossover_info" + }, + { + Type.RankingMasterInfoRotation, + "ranking/master_point_rotation_info" + }, + { + Type.RankingMasterInfoUnlimited, + "ranking/master_point_unlimited_info" + }, + { + Type.RankingMasterInfoCrossover, + "ranking/master_point_crossover_info" + }, + { + Type.RankingTwoPickInfo, + "ranking/two_pick_win_info" + }, + { + Type.RankingSealedInfo, + "ranking/sealed_all_win_info" + }, + { + Type.RankingMasterMyHistories, + "ranking/my_master_point_histories" + }, + { + Type.ItemAcquireHistoryInfo, + "item_acquire_history/info" + }, + { + Type.PracticeInfo, + "practice/info" + }, + { + Type.PracticeStart, + "practice/start" + }, + { + Type.PracticeFinish, + "practice/finish" + }, + { + Type.PracticePuzzleList, + "basic_puzzle/open_puzzle_dialog" + }, + { + Type.PracticePuzzleInfo, + "basic_puzzle/info" + }, + { + Type.PracticePuzzleBattleStart, + "basic_puzzle/start" + }, + { + Type.PracticePuzzleBattleFinish, + "basic_puzzle/finish" + }, + { + Type.PracticePuzzleMissionList, + "basic_puzzle/mission" + }, + { + Type.CountryCodeSet, + "config/update_country_code" + }, + { + Type.SendAllTraceLog, + "rank_battle/add_all_client_log" + }, + { + Type.SendTraceLog, + "rank_battle/add_client_log" + }, + { + Type.SendLastTraceLog, + "rank_battle/add_last_turn_log" + }, + { + Type.GetDeckInfoFromDeckCode, + "deck?format=msgpack" + }, + { + Type.GenerateDeckCode, + "deck_code?format=msgpack" + }, + { + Type.GenerateDeckImage, + "deck_image?lang={0}&format=msgpack" + }, + { + Type.GenerateDeckImageMaintenance, + "deck/image" + }, + { + Type.InviteGetFriendList, + "friend_battle/friend_list" + }, + { + Type.InviteFriend, + "friend_battle/invite" + }, + { + Type.InviteGetList, + "friend_battle/invitation_list" + }, + { + Type.InviteCancel, + "friend_battle/cancel" + }, + { + Type.InviteAccept, + "friend_battle/accept" + }, + { + Type.InviteConfigUpdate, + "config/update_config" + }, + { + Type.ReplayInfo, + "replay/info" + }, + { + Type.ReplayDetail, + "replay/detail" + }, + { + Type.GrandMaster, + "profile/get_grand_master_data" + }, + { + Type.MasterResetMonth, + "rank_battle/get_latest_master_point" + }, + { + Type.BattleReport, + "report/battle_report" + }, + { + Type.Vote, + "vote/execute" + }, + { + Type.VoteData, + "vote/info" + }, + { + Type.AcceptAgreement, + "check/accept_agreement" + }, + { + Type.CheckSpecialTitle, + "check/special_title" + }, + { + Type.ClientCacheClear, + "npc_battle/client_cache_clear" + }, + { + Type.DeleteUserData, + "account/delete_user_data" + }, + { + Type.LotteryInfo, + "lottery/info" + }, + { + Type.LotteryReceive, + "lottery/Receive" + }, + { + Type.LotteryReceiveDoubleChance, + "lottery/receive_double_chance" + }, + { + Type.LotteryReceiveBigChance, + "lottery/receive_big_chance" + }, + { + Type.LotteryReceiveTweetData, + "lottery/receive_tweet_reward" + }, + { + Type.GatheringCreate, + "gathering/create" + }, + { + Type.GatheringGetInfo, + "gathering/search" + }, + { + Type.GatheringEntry, + "gathering/join" + }, + { + Type.GatheringLeave, + "gathering/leave" + }, + { + Type.GatheringSelfInfo, + "gathering/info" + }, + { + Type.GatheringInvite, + "gathering/send_invite" + }, + { + Type.GatheringInviteCancel, + "gathering/cancel_invite" + }, + { + Type.GatheringInviteReject, + "gathering/reject_invite" + }, + { + Type.GatheringFriendList, + "gathering/friend_list" + }, + { + Type.GatheringInviteUserList, + "gathering/send_invite_list" + }, + { + Type.GatheringConfirmDeckList, + "gathering/confirm_deck_list" + }, + { + Type.GatheringDeckList, + "gathering/deck_list" + }, + { + Type.GatheringUpdateDeckName, + "gathering/update_deck_name" + }, + { + Type.GatheringUpdateDeckSleeve, + "gathering/update_deck_sleeve" + }, + { + Type.GatheringUpdateDeckLeaderSkin, + "gathering/update_deck_leader_skin" + }, + { + Type.GatheringUpdateDeckRandomLeaderSkin, + "gathering/update_deck_random_leader_skin" + }, + { + Type.GatheringInterrupt, + "gathering/interrupt" + }, + { + Type.GatheringGetReceiveInvite, + "gathering/receive_invite_list" + }, + { + Type.GatheringRanking, + "gathering/ranking" + }, + { + Type.GatheringKick, + "gathering/kick_member" + }, + { + Type.GatheringUpdateDescription, + "gathering/update_description" + }, + { + Type.GatheringInfoDependJoin, + "gathering/refresh" + }, + { + Type.GatheringTournamentInfo, + "gathering/tournament_info" + }, + { + Type.GatheringChatPost, + "gathering_chat/post" + }, + { + Type.GatheringChatMessages, + "gathering_chat/messages" + }, + { + Type.GatheringChatAddDeck, + "gathering_chat/add_deck" + }, + { + Type.GatheringChatAddReplay, + "gathering_chat/add_replay" + }, + { + Type.GatheringChatReplayDetail, + "gathering_chat/replay_detail" + }, + { + Type.GatheringChatDeckLog, + "gathering_chat/deck_log" + }, + { + Type.GatheringChatDeleteDeck, + "gathering_chat/delete_deck" + }, + { + Type.BattlePassInfo, + "battle_pass/info" + }, + { + Type.BattlePassItemList, + "battle_pass/item_list" + }, + { + Type.BattlePassBuy, + "battle_pass/buy" + }, + { + Type.AdjustSettingUpdate, + "adjust/update_adjust_config" + }, + { + Type.CompetitionLobbyInfo, + "arena_competition/top" + }, + { + Type.CompetitionRetire, + "arena_competition/retire" + }, + { + Type.CompetitionFinish, + "arena_competition/finish" + }, + { + Type.CompetitionBattleDoMatching, + "competition_battle/do_matching" + }, + { + Type.CompetitionBattleDoMatchingRankMatch, + "competition_rank_battle/do_matching" + }, + { + Type.CompetitionBattleFinish, + "competition_battle/finish" + }, + { + Type.CompetitionBattleFinishRankMatch, + "competition_rank_battle/finish" + }, + { + Type.CompetitionEntry, + "arena_competition/entry" + }, + { + Type.CompetitionRegisterDeck, + "arena_competition/register_deck" + }, + { + Type.CompetitionCheckPeriod, + "arena_competition/check_schedule" + }, + { + Type.CompetitionJoin, + "arena_competition/join" + }, + { + Type.CompetitionPermanentEntry, + "arena_competition/permanent_entry" + }, + { + Type.CompetitionClassChoose, + "arena_competition/class_choose" + }, + { + Type.CompetitionCardChoose, + "arena_competition/card_choose" + }, + { + Type.CompetitionSetCurrentDeck, + "arena_competition/set_current_deck_no" + }, + { + Type.BingoInfo, + "bingo/info" + }, + { + Type.BingoDraw, + "bingo/draw" + }, + { + Type.BingoReceiveTweetData, + "bingo/receive_tweet_reward" + }, + { + Type.CrossoverInfo, + "crossover/info" + }, + { + Type.CrossoverReceiveRankReward, + "crossover/receive_rank_reward" + }, + { + Type.CrossoverReceiveAllRankRewards, + "crossover/receive_all_rank_rewards" + }, + { + Type.CrossoverRankingMasterMyHistories, + "crossover/my_master_point_histories" + }, + { + Type.CrossoverGrandMaster, + "crossover/get_grand_master_data" + }, + { + Type.NeutralPopularityVoteInfo, + "card_vote/info" + }, + { + Type.NeutralPopularityVoteExecute, + "card_vote/vote" + }, + { + Type.LeaderPopularityVoteInfo, + "leader_skin_vote/info" + }, + { + Type.LeaderPopularityVoteExecute, + "leader_skin_vote/vote" + }, + { + Type.AccountDeleteReserve, + "account_delete_reservation/reserve" + }, + { + Type.AccountDeleteCancel, + "account_delete_reservation/cancel" + }, + { + Type.BossRushLobbyInfo, + "bossrush/base" + }, + { + Type.BossRushRegisterDeck, + "bossrush/register_deck" + }, + { + Type.BossRushSetAbility, + "bossrush/set_ability" + }, + { + Type.BossRushReceiveReward, + "bossrush/receive_reward" + }, + { + Type.BossRushRetire, + "bossrush/retire" + }, + { + Type.BossRushStart, + "bossrush/start" + }, + { + Type.BossRushHiddenBattleStart, + "bossrush/start_hidden_boss_battle" + }, + { + Type.BossRushFinish, + "bossrush/finish" + }, + { + Type.BossRushHiddenBattleFinish, + "bossrush/finish_hidden_boss_battle" + }, + { + Type.BossRushLoseFinish, + "bossrush/lose_finish_challange" + }, + { + Type.BossRushClearDeckList, + "bossrush/clear_deck_info" + }, + { + Type.ReceiveUpgradeTreasureBox, + "upgrade_treasure_box_campaign/receive_upgrade_treasure_box" + }, + { + Type.TreasureOpenSpecialTreasureBox, + "treasure/open_special_treasure" + }, + { + Type.FreeCardPackBoxFinish, + "free_card_pack_box_campaign/finish" + }, + { + Type.RedEtherCampaignLobby, + "red_ether_campaign/info" + }, + { + Type.TransitionInfo, + "account/get_account_transition_status_with_two" + }, + { + Type.TransitionPublish, + "account/publish_account_transition_code_with_two" + }, + { + Type.TransitionDelete, + "account/delete_account_transition_code_with_two" + }, + { + Type.CheckTimeSlipRotationPeriod, + "check/check_time_slip_card_master_hash" + } + }; +} diff --git a/SVSim.BattleEngine/Engine/ApplySkillTargetFilterCollection.cs b/SVSim.BattleEngine/Engine/ApplySkillTargetFilterCollection.cs new file mode 100644 index 0000000..481d5a4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ApplySkillTargetFilterCollection.cs @@ -0,0 +1,90 @@ +using System.Collections.Generic; +using System.Linq; +using Wizard; +using Wizard.Battle; + +public class ApplySkillTargetFilterCollection : SkillFilterCollectionBase +{ + public List ApplyCustomSelectFilterList { get; set; } + + public List ApplyExclutionFilterList { get; private set; } + + public ISkillSelectFilter ApplySelectFilter { get; set; } + + public List ApplyAndFilter { get; set; } + + public ApplySkillTargetFilterCollection() + { + ApplyCustomSelectFilterList = new List(); + ApplyExclutionFilterList = new List(); + ApplyAndFilter = new List(); + } + + public List Filtering(BattlePlayerReadOnlyInfoPair pair, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue) + { + List list = new List(); + List AndFilterTargets = new List(); + IEnumerable battlePlayerInfos = null; + if (ApplyAndFilter.Count <= 0) + { + if (base.BattlePlayerFilter != null) + { + battlePlayerInfos = base.BattlePlayerFilter.Filtering(pair); + } + if (base.TargetFilter != null) + { + list = base.TargetFilter.Filtering(battlePlayerInfos, checkerOption).ToList(); + if (BattleManagerBase.GetIns().XorShiftRandom(isSelf: true) != null && BattleManagerBase.GetIns().XorShiftRandom(isSelf: false) == null && !pair.ReadOnlySelf.IsPlayer && (base.TargetFilter is SkillTargetInHandCardFilter || base.TargetFilter is SkillTargetReturnCardFilter || base.TargetFilter is SkillTargetTokenDrawCardFilter)) + { + return list; + } + } + foreach (ISkillCardFilter cardFilter in base.CardFilterList) + { + list = cardFilter.Filtering(list, optionValue).ToList(); + } + int i = 0; + for (int count = ApplyCustomSelectFilterList.Count; i < count; i++) + { + list = ApplyCustomSelectFilterList[i].Filtering(list, battlePlayerInfos, checkerOption).ToList(); + } + for (int j = 0; j < ApplyExclutionFilterList.Count; j++) + { + list = ApplyExclutionFilterList[j].Filtering(list, battlePlayerInfos, checkerOption, optionValue).ToList(); + } + } + else + { + for (int k = 0; k < ApplyAndFilter.Count; k++) + { + List cards = ApplyAndFilter[k].Filtering(pair, checkerOption, optionValue).Cast().ToList(); + List collection = (from IReadOnlyBattleCardInfo x in ApplyAndFilter[k].SelectFilter.Filtering(cards, optionValue, checkerOption) + where !AndFilterTargets.Contains(x) + select x).ToList(); + AndFilterTargets.AddRange(collection); + } + } + List list2 = list.ToList(); + list2.AddRange(AndFilterTargets); + return list2; + } + + public bool SimpleFiltering(IReadOnlyBattleCardInfo targetCard, BattlePlayerReadOnlyInfoPair pair, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue) + { + List list = new List { targetCard }; + IEnumerable battlePlayerInfos = base.BattlePlayerFilter.Filtering(pair); + for (int i = 0; i < base.CardFilterList.Count; i++) + { + list = base.CardFilterList[i].Filtering(list, optionValue).ToList(); + } + for (int j = 0; j < ApplyCustomSelectFilterList.Count; j++) + { + list = ApplyCustomSelectFilterList[j].Filtering(list, battlePlayerInfos, checkerOption).ToList(); + } + for (int k = 0; k < ApplyExclutionFilterList.Count; k++) + { + list = ApplyExclutionFilterList[k].Filtering(list, battlePlayerInfos, checkerOption, optionValue).ToList(); + } + return list.Count() > 0; + } +} diff --git a/SVSim.BattleEngine/Engine/ArrowControl.cs b/SVSim.BattleEngine/Engine/ArrowControl.cs new file mode 100644 index 0000000..3eed528 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ArrowControl.cs @@ -0,0 +1,117 @@ +using System.Collections.Generic; +using UnityEngine; + +public class ArrowControl : MonoBehaviour +{ + [SerializeField] + private GameObject ArrowHead; + + [SerializeField] + private GameObject ArrowEfc; + + [SerializeField] + private int DivideCnt = 10; + + [SerializeField] + private bool isEvo; + + private IList ArrowEfcList; + + private GameObject FromObj; + + private GameObject ToObj; + + private bool isOn; + + private bool _isTargettingEnemy; + + private float ChangeTime; + + private IList ArrowTarList; + + private void Start() + { + ArrowEfcList = new List(); + ArrowEfcList.Add(ArrowEfc); + for (int i = 1; i < DivideCnt; i++) + { + GameObject gameObject = Object.Instantiate(ArrowEfc); + if (!(null == gameObject)) + { + gameObject.transform.parent = base.transform; + ArrowEfcList.Add(gameObject); + } + } + ArrowTarList = new List(); + for (int j = 0; j < DivideCnt; j++) + { + ArrowTarList.Add(j); + } + HideArrow(); + } + + private void Update() + { + if (isOn) + { + SetArrowLine(); + } + } + + public void ShowArrow(GameObject fromObj, GameObject toObj, bool isTargettingEnemy) + { + FromObj = fromObj; + ToObj = toObj; + _isTargettingEnemy = isTargettingEnemy; + isOn = true; + base.gameObject.SetActive(value: true); + } + + public void HideArrow() + { + isOn = false; + for (int i = 0; i < DivideCnt; i++) + { + ArrowEfcList[i].SetActive(value: false); + } + base.gameObject.SetActive(value: false); + } + + private void SetArrowLine() + { + if (isEvo) + { + ChangeTime -= Time.deltaTime * 5f; + } + else + { + ChangeTime -= Time.deltaTime; + } + if (ChangeTime <= 0f) + { + ChangeTime = 1f; + ArrowTarList.Add(ArrowTarList[0]); + ArrowTarList.RemoveAt(0); + } + ArrowHead.transform.position = ToObj.transform.position; + Vector3 position = FromObj.transform.position; + Vector3 position2 = ToObj.transform.position; + Vector3 p = (_isTargettingEnemy ? position : position2) + Vector3.back * Vector3.Distance(position, position2) + Vector3.down * Vector3.Distance(position, position2) * -0.5f; + Vector3[] array = new Vector3[DivideCnt]; + array = MotionUtils.GetBezierQuad(position, p, position2, DivideCnt); + for (int i = 0; i < array.Length; i++) + { + float num = 1f - ChangeTime; + if (ArrowTarList[i] != 0) + { + ArrowEfcList[i].SetActive(value: true); + ArrowEfcList[i].transform.position = (array[ArrowTarList[i]] - array[ArrowTarList[i] - 1]) * num + array[ArrowTarList[i] - 1]; + } + else + { + ArrowEfcList[i].SetActive(value: false); + ArrowEfcList[i].transform.position = array[0]; + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/AttachedSkillInformation.cs b/SVSim.BattleEngine/Engine/AttachedSkillInformation.cs new file mode 100644 index 0000000..8e75468 --- /dev/null +++ b/SVSim.BattleEngine/Engine/AttachedSkillInformation.cs @@ -0,0 +1,74 @@ +using System.Collections.Generic; +using Wizard.Battle; + +public class AttachedSkillInformation +{ + public SkillCollectionBase AttachedSkills { get; protected set; } + + public List OwnerCardNameList { get; protected set; } + + public List OwnerCardIdList { get; protected set; } + + public List DuplicateBanNum { get; protected set; } + + public List CreatorSkillList { get; protected set; } + + public List CreatorSkillIndexList { get; protected set; } + + public AttachedSkillInformation(BattleCardBase card) + { + AttachedSkills = new SkillCollectionBase(card); + OwnerCardNameList = new List(); + OwnerCardIdList = new List(); + DuplicateBanNum = new List(); + CreatorSkillList = new List(); + CreatorSkillIndexList = new List(); + } + + public AttachedSkillInformation(BattleCardBase card, SkillCollectionBase skills, List nameList, List idList, List duplicateBanNum, List createrList, List creatorSkillIndexList) + { + AttachedSkills = skills.Clone(card); + OwnerCardNameList = new List(nameList); + OwnerCardIdList = new List(idList); + DuplicateBanNum = new List(duplicateBanNum); + CreatorSkillList = new List(createrList); + CreatorSkillIndexList = new List(creatorSkillIndexList); + } + + public void Add(SkillBase skill, string ownerCardName, int ownerCardID, long duplicateBanNum, SkillBase creatorSkill, int index) + { + AttachedSkills.Add(skill); + OwnerCardNameList.Add(ownerCardName); + OwnerCardIdList.Add(ownerCardID); + DuplicateBanNum.Add(duplicateBanNum); + CreatorSkillList.Add(creatorSkill); + CreatorSkillIndexList.Add(index); + } + + public void Remove(SkillBase skill, BattleCardBase owner, long duplicateBanNum, SkillBase creatorSkill, int index) + { + string name = owner.GetName(); + int cardId = owner.CardId; + Remove(skill, name, cardId, duplicateBanNum, creatorSkill, index); + } + + public void Remove(SkillBase skill, string ownerCardName, int ownerCardID, long duplicateBanNum, SkillBase creatorSkill, int index) + { + AttachedSkills.Remove(skill); + OwnerCardNameList.Remove(ownerCardName); + OwnerCardIdList.Remove(ownerCardID); + DuplicateBanNum.Remove(duplicateBanNum); + CreatorSkillList.Remove(creatorSkill); + CreatorSkillIndexList.Remove(index); + } + + public void Clear() + { + AttachedSkills.Clear(); + OwnerCardNameList.Clear(); + OwnerCardIdList.Clear(); + DuplicateBanNum.Clear(); + CreatorSkillList.Clear(); + CreatorSkillIndexList.Clear(); + } +} diff --git a/SVSim.BattleEngine/Engine/AttachingAbilityInfo.cs b/SVSim.BattleEngine/Engine/AttachingAbilityInfo.cs new file mode 100644 index 0000000..6d9019c --- /dev/null +++ b/SVSim.BattleEngine/Engine/AttachingAbilityInfo.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using Wizard.Battle; + +public class AttachingAbilityInfo +{ + public SkillBase Skill { get; private set; } + + public List TargetCards { get; private set; } + + public AttachingAbilityInfo(SkillBase skill, List targetCards) + { + Skill = skill; + TargetCards = targetCards; + } +} diff --git a/SVSim.BattleEngine/Engine/BMFont.cs b/SVSim.BattleEngine/Engine/BMFont.cs new file mode 100644 index 0000000..3e20ab7 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BMFont.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +[Serializable] +public class BMFont +{ + [HideInInspector] + [SerializeField] + private int mSize = 16; + + [HideInInspector] + [SerializeField] + private int mBase; + + [HideInInspector] + [SerializeField] + private int mWidth; + + [HideInInspector] + [SerializeField] + private int mHeight; + + [HideInInspector] + [SerializeField] + private string mSpriteName; + + [HideInInspector] + [SerializeField] + private List mSaved = new List(); + + private Dictionary mDict = new Dictionary(); + + public bool isValid => mSaved.Count > 0; + + public int charSize + { + get + { + return mSize; + } + set + { + mSize = value; + } + } + + public int baseOffset + { + get + { + return mBase; + } + set + { + mBase = value; + } + } + + public int texWidth + { + get + { + return mWidth; + } + set + { + mWidth = value; + } + } + + public int texHeight + { + get + { + return mHeight; + } + set + { + mHeight = value; + } + } + + public int glyphCount + { + get + { + if (!isValid) + { + return 0; + } + return mSaved.Count; + } + } + + public string spriteName + { + get + { + return mSpriteName; + } + set + { + mSpriteName = value; + } + } + + public List glyphs => mSaved; + + public BMGlyph GetGlyph(int index, bool createIfMissing) + { + BMGlyph value = null; + if (mDict.Count == 0) + { + int i = 0; + for (int count = mSaved.Count; i < count; i++) + { + BMGlyph bMGlyph = mSaved[i]; + mDict.Add(bMGlyph.index, bMGlyph); + } + } + if (!mDict.TryGetValue(index, out value) && createIfMissing) + { + value = new BMGlyph(); + value.index = index; + mSaved.Add(value); + mDict.Add(index, value); + } + return value; + } + + public BMGlyph GetGlyph(int index) + { + return GetGlyph(index, createIfMissing: false); + } + + public void Clear() + { + mDict.Clear(); + mSaved.Clear(); + } + + public void Trim(int xMin, int yMin, int xMax, int yMax) + { + if (isValid) + { + int i = 0; + for (int count = mSaved.Count; i < count; i++) + { + mSaved[i]?.Trim(xMin, yMin, xMax, yMax); + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/BMGlyph.cs b/SVSim.BattleEngine/Engine/BMGlyph.cs new file mode 100644 index 0000000..dcd9b70 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BMGlyph.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; + +[Serializable] +public class BMGlyph +{ + public int index; + + public int x; + + public int y; + + public int width; + + public int height; + + public int offsetX; + + public int offsetY; + + public int advance; + + public int channel; + + public List kerning; + + public int GetKerning(int previousChar) + { + if (kerning != null && previousChar != 0) + { + int i = 0; + for (int count = kerning.Count; i < count; i += 2) + { + if (kerning[i] == previousChar) + { + return kerning[i + 1]; + } + } + } + return 0; + } + + public void SetKerning(int previousChar, int amount) + { + if (kerning == null) + { + kerning = new List(); + } + for (int i = 0; i < kerning.Count; i += 2) + { + if (kerning[i] == previousChar) + { + kerning[i + 1] = amount; + return; + } + } + kerning.Add(previousChar); + kerning.Add(amount); + } + + public void Trim(int xMin, int yMin, int xMax, int yMax) + { + int num = x + width; + int num2 = y + height; + if (x < xMin) + { + int num3 = xMin - x; + x += num3; + width -= num3; + offsetX += num3; + } + if (y < yMin) + { + int num4 = yMin - y; + y += num4; + height -= num4; + offsetY += num4; + } + if (num > xMax) + { + width -= num - xMax; + } + if (num2 > yMax) + { + height -= num2 - yMax; + } + } +} diff --git a/SVSim.BattleEngine/Engine/BMSymbol.cs b/SVSim.BattleEngine/Engine/BMSymbol.cs new file mode 100644 index 0000000..585c738 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BMSymbol.cs @@ -0,0 +1,93 @@ +using System; +using UnityEngine; + +[Serializable] +public class BMSymbol +{ + public string sequence; + + public string spriteName; + + private UISpriteData mSprite; + + private bool mIsValid; + + private int mLength; + + private int mOffsetX; + + private int mOffsetY; + + private int mWidth; + + private int mHeight; + + private int mAdvance; + + private Rect mUV; + + public int length + { + get + { + if (mLength == 0) + { + mLength = sequence.Length; + } + return mLength; + } + } + + public int offsetX => mOffsetX; + + public int offsetY => mOffsetY; + + public int width => mWidth; + + public int height => mHeight; + + public int advance => mAdvance; + + public Rect uvRect => mUV; + + public void MarkAsChanged() + { + mIsValid = false; + } + + public bool Validate(UIAtlas atlas) + { + if (atlas == null) + { + return false; + } + if (!mIsValid) + { + if (string.IsNullOrEmpty(spriteName)) + { + return false; + } + mSprite = ((atlas != null) ? atlas.GetSprite(spriteName) : null); + if (mSprite != null) + { + Texture texture = atlas.texture; + if (texture == null) + { + mSprite = null; + } + else + { + mUV = new Rect(mSprite.x, mSprite.y, mSprite.width, mSprite.height); + mUV = NGUIMath.ConvertToTexCoords(mUV, texture.width, texture.height); + mOffsetX = mSprite.paddingLeft; + mOffsetY = mSprite.paddingTop; + mWidth = mSprite.width; + mHeight = mSprite.height; + mAdvance = mSprite.width + (mSprite.paddingLeft + mSprite.paddingRight); + mIsValid = true; + } + } + } + return mSprite != null; + } +} diff --git a/SVSim.BattleEngine/Engine/BackGroundBase.cs b/SVSim.BattleEngine/Engine/BackGroundBase.cs new file mode 100644 index 0000000..eaef9db --- /dev/null +++ b/SVSim.BattleEngine/Engine/BackGroundBase.cs @@ -0,0 +1,272 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard.Battle.View.Vfx; + +public class BackGroundBase +{ + protected string _bgmId; + + protected BattleCamera _battleCamera; + + protected GameObject _fieldModel; + + protected GameObject _fieldParticles; + + protected IDictionary m_FieldAnimationDictionary; + + protected IDictionary _fieldObjDictionary; + + protected IDictionary m_FieldAnimatorDictionary; + + protected IDictionary _fieldParticleSystemDictionary; + + protected IDictionary _gimicCntDictionary; + + public string[] GimicAudioList; + + protected string _str3DFieldNo; + + protected string _str3DFieldPath; + + protected BattleManagerBase m_BtlMgrIns; + + protected string m_FieldAssetPath; + + protected List m_SoundAssetPathList; + + protected float m_RandomActionTime; + + protected bool IsFieldRandom; + + private Coroutine battleLoadCoroutine; + + public virtual int FieldId => 1; + + public virtual int FieldEffectId => FieldId; + + public GameObject Field { get; protected set; } + + public GameObject m_Battle3DContainer { get; protected set; } + + public GameObject m_BattleCutInContainer { get; protected set; } + + public SetShaderGlobalColorBG SetShaderGlobalColorBG { get; protected set; } + + public bool IsLoadDone { get; protected set; } + + public BackGroundBase(string bgmId = "NONE") + { + _battleCamera = null; + m_Battle3DContainer = null; + m_BattleCutInContainer = null; + m_BtlMgrIns = BattleManagerBase.GetIns(); + IsLoadDone = false; + _str3DFieldNo = ""; + _str3DFieldPath = ""; + m_FieldAssetPath = ""; + Field = null; + _fieldModel = null; + _fieldParticles = null; + _bgmId = bgmId; + m_RandomActionTime = 0f; + IsFieldRandom = false; + m_SoundAssetPathList = new List(); + _fieldObjDictionary = new Dictionary(); + m_FieldAnimationDictionary = new Dictionary(); + m_FieldAnimatorDictionary = new Dictionary(); + _fieldParticleSystemDictionary = new Dictionary(); + _gimicCntDictionary = new Dictionary(); + SetShaderGlobalColorBG = null; + Physics.gravity = new Vector3(0f, 0f, 9.8f); + _str3DFieldNo = GetFieldIdString(FieldId); + _gimicCntDictionary.Add("FieldGimic1", 0); + _gimicCntDictionary.Add("FieldGimic2", 0); + _gimicCntDictionary.Add("FieldGimic3", 0); + } + + public void Dispose() + { + UnityEngine.Object.DestroyImmediate(Field); + Field = null; + _fieldModel = null; + _fieldParticles = null; + _fieldObjDictionary.Clear(); + m_FieldAnimationDictionary.Clear(); + m_FieldAnimatorDictionary.Clear(); + _fieldParticleSystemDictionary.Clear(); + m_SoundAssetPathList.Clear(); + _gimicCntDictionary.Clear(); + SetShaderGlobalColorBG = null; + BattleCoroutine.GetInstance().StopCoroutine(battleLoadCoroutine); + } + + public void CreateField(BattleCamera battleCamera, GameObject battle3DContainer, GameObject cutInContainer) + { + _battleCamera = battleCamera; + m_Battle3DContainer = battle3DContainer; + m_BattleCutInContainer = cutInContainer; + Camera componentInChildren = m_Battle3DContainer.GetComponentInChildren(); + Camera component = componentInChildren.transform.Find("Camera 3DGround").GetComponent(); + _battleCamera.SetUp(componentInChildren, m_BattleCutInContainer.transform.Find("Camera").GetComponent(), component); + LoadField(); + } + + protected void LoadField() + { + IsLoadDone = false; + m_BtlMgrIns = BattleManagerBase.GetIns(); + _str3DFieldNo = GetFieldIdString(FieldEffectId); + _str3DFieldPath = "3DField" + GetFieldIdString(FieldId); + m_SoundAssetPathList.Add($"s/se_field_{_str3DFieldNo}.acb"); + m_SoundAssetPathList.Add(string.Format("b/bgm_field_{0}.acb", (_bgmId != "NONE") ? GetFieldIdString(_bgmId) : _str3DFieldNo)); + m_SoundAssetPathList.Add(string.Format("b/bgm_field_{0}.awb", (_bgmId != "NONE") ? GetFieldIdString(_bgmId) : _str3DFieldNo)); + m_FieldAssetPath = Toolbox.ResourcesManager.GetAssetTypePath(_str3DFieldPath, ResourcesManager.AssetLoadPathType.Field3D); + List additionalAssetList = CollectAdditionalAssets(); + GameMgr.GetIns().GetEffectMgr().InitCommonEffect(string.Format("Json/FIeld" + _str3DFieldNo + "EffectData", _str3DFieldNo), isBattle: true); + battleLoadCoroutine = BattleCoroutine.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(m_SoundAssetPathList, delegate + { + BattleCoroutine.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(m_FieldAssetPath, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.AddRange(m_SoundAssetPathList); + Toolbox.ResourcesManager.BattleListAssetPathList.Add(m_FieldAssetPath); + (UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(_str3DFieldPath, ResourcesManager.AssetLoadPathType.Field3D, isfetch: true))) as GameObject).name = _str3DFieldPath; + if (additionalAssetList.IsNotNullOrEmpty()) + { + BattleCoroutine.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(additionalAssetList, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.AddRange(additionalAssetList); + BattleFieldBuild(); + })); + } + else + { + BattleFieldBuild(); + } + })); + })); + } + + private string GetFieldIdString(int fieldId) + { + return fieldId.ToString((fieldId < 100) ? "00" : "0000"); + } + + private string GetFieldIdString(string fileldId) + { + if (int.TryParse(fileldId, out var result)) + { + return result.ToString((result < 100) ? "00" : "0000"); + } + return fileldId; + } + + protected virtual void BattleFieldBuild() + { + } + + protected virtual List CollectAdditionalAssets() + { + return null; + } + + public virtual void StartFieldSetEffect(Vector3 pos) + { + } + + public virtual void StartFieldTapEffect(int areaId, Vector3 pos) + { + BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.IsTouchable(); + } + + public void StartFieldOpening() + { + PlayBgm(); + OpeningVfx.OpenningLogStep = "StartFieldOpening"; + IsFieldRandom = true; + BattleCoroutine.GetInstance().StartCoroutine(RunFieldOpening()); + } + + public void PlayBgm() + { + GameMgr.GetIns().GetSoundMgr().PlayBGM(string.Format("bgm_field_{0}", (_bgmId != "NONE") ? GetFieldIdString(_bgmId) : _str3DFieldNo), 0f, 0L); + } + + protected virtual IEnumerator RunFieldOpening() + { + yield return new WaitForSeconds(0f); + } + + public static IEnumerator ObjectChecker(float fWaitSecs, string strObjectFind, Action callback) + { + while (GameObject.Find(strObjectFind) == null || !GameMgr.GetIns().GetEffectMgr().IsFieldEffectReady || !GameMgr.GetIns().GetEffectMgr().IsBattleUIEffectReady) + { + yield return null; + } + callback(); + } + + public void StartFieldGimic(GameObject obj) + { + if (!GameMgr.GetIns().IsReplayBattle && BattleManagerBase.GetIns().BattlePlayer.PlayerBattleView.IsTouchable()) + { + BattleCoroutine.GetInstance().StartCoroutine(RunFieldGimic(obj)); + } + } + + protected virtual IEnumerator RunFieldGimic(GameObject obj) + { + yield return new WaitForSeconds(0f); + } + + public void StartFieldShake() + { + BattleCoroutine.GetInstance().StartCoroutine(RunFieldShake()); + } + + protected virtual IEnumerator RunFieldShake() + { + yield return new WaitForSeconds(0f); + } + + public virtual void UpdateFieldRandom() + { + } + + public void AddParticleToFieldObjDictionary(string targetPath) + { + string[] array = targetPath.Split('/'); + List list = new List(); + list.Add(_fieldParticles.transform); + List list2 = new List(); + for (int i = 0; i < array.Length; i++) + { + list2 = new List(); + for (int j = 0; j < list.Count; j++) + { + list2.AddRange(FindAllChildByName(list[j], array[i])); + } + list = new List(list2); + } + for (int k = 0; k < list2.Count; k++) + { + _fieldObjDictionary.Add(targetPath + "_" + k, list2[k].gameObject); + } + } + + public List FindAllChildByName(Transform parent, string name) + { + List list = new List(); + for (int i = 0; i < parent.childCount; i++) + { + Transform child = parent.GetChild(i); + if (child.name == name) + { + list.Add(child); + } + } + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleCamera.cs b/SVSim.BattleEngine/Engine/BattleCamera.cs new file mode 100644 index 0000000..b422d83 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleCamera.cs @@ -0,0 +1,79 @@ +using UnityEngine; +using Wizard.Battle.View.Vfx; + +public class BattleCamera +{ + public UICamera m_CutInCamera; + + public Camera Camera; + + public Camera _backgroundCamera; + + public Vector3 BattleCameraPos { get; private set; } + + public Vector3 BattleCameraRot { get; private set; } + + public BattleCamera() + { + Camera = null; + } + + public void SetUp(Camera camera, UICamera cutInCamera, Camera backgroundCamera) + { + Camera = camera; + m_CutInCamera = cutInCamera; + _backgroundCamera = backgroundCamera; + BattleCameraPos = Camera.transform.localPosition; + BattleCameraRot = Camera.transform.eulerAngles; + } + + public VfxBase ShakeCamera(Vector3 amount, float time, float delay) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + iTween.ShakePosition(Camera.gameObject, iTween.Hash("amount", amount, "time", time, "delay", delay)); + })); + return parallelVfxPlayer; + } + + public static VfxBase ShakeCameraGameObject(GameObject obj, Vector3 amount, float time, float delay) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + parallelVfxPlayer.Register(InstantVfx.Create(delegate + { + iTween.ShakePosition(obj, iTween.Hash("amount", amount, "time", time, "delay", delay)); + })); + return parallelVfxPlayer; + } + + public VfxBase ShakeComplete() + { + return InstantVfx.Create(delegate + { + Camera.transform.localPosition = BattleCameraPos; + Camera.transform.eulerAngles = BattleCameraRot; + iTween.Stop(Camera.gameObject); + }); + } + + public static VfxBase ShakeCompleteGameObject(GameObject obj, Vector3 position, Vector3 euler) + { + return InstantVfx.Create(delegate + { + obj.transform.localPosition = position; + obj.transform.eulerAngles = euler; + iTween.Stop(obj); + }); + } + + public Camera Get3DCamera() + { + return Camera; + } + + public void Dispose() + { + Camera = null; + } +} diff --git a/SVSim.BattleEngine/Engine/BattleControl.cs b/SVSim.BattleEngine/Engine/BattleControl.cs new file mode 100644 index 0000000..e2bfb18 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleControl.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.UI; +using Wizard.Battle.View.Vfx; + +public class BattleControl : MonoBehaviour +{ + private BattleManagerBase m_BtlMgrIns; + + private int FirstAttack; + + public void Init() + { + m_BtlMgrIns = BattleManagerBase.GetIns(); + GameMgr.GetIns().GetInputMgr().SetLayerMask(512); + LocalLog.AccumulateLastTraceLog("StartBattleCoroutine "); + StartCoroutine(WaitLoadOpponentObjectToBattleStart(m_BtlMgrIns.LoadOpponentObjects())); + } + + private IEnumerator WaitLoadOpponentObjectToBattleStart(VfxBase vfx) + { + if (GameMgr.GetIns().IsNetworkBattle) + { + FirstAttack = ToolboxGame.RealTimeNetworkAgent.GetIsFirstPlayer(); + } + while (!vfx.IsEnd) + { + yield return null; + } + LocalLog.AccumulateLastTraceLog("DecideFirstUser End "); + m_BtlMgrIns.StartOpening(FirstAttack); + } + + public void BattleEnd(UIManager.ViewScene MoveTo, Action callback = null, Action paramCustomize = null, object sceneParam = null) + { + ToolboxGame.UIManager.gameObject.SetActive(value: true); + UIManager.ChangeViewSceneParam changeViewSceneParam = new UIManager.ChangeViewSceneParam(); + changeViewSceneParam.OnBeforeChange = delegate + { + BattleManagerBase.GetIns().DisposeBattleGameObj(); + }; + changeViewSceneParam.OnChange = delegate + { + GameMgr.GetIns().GetEffectMgr().DestroyBattleEffectContainer(); + GameMgr.GetIns().GetDataMgr().ResetEnemyData(); + GameMgr.GetIns().DestroyBattleManagements(); + GameMgr.GetIns().GetGameObjMgr().GetUIContainer() + .SetActive(value: false); + if (callback != null) + { + callback(); + } + }; + paramCustomize.Call(changeViewSceneParam); + StartCoroutine(UnloadAllResources(MoveTo, changeViewSceneParam, null, sceneParam)); + } + + private IEnumerator UnloadAllResources(UIManager.ViewScene MoveTo = UIManager.ViewScene.None, UIManager.ChangeViewSceneParam param = null, Action callback = null, object sceneParam = null) + { + BattleLogManager.GetInstance().Clear(); + GameMgr.GetIns().GetEffectMgr().ClearLastCacheEffect(); + StopAllTweens(); + yield return Resources.UnloadUnusedAssets(); + GC.Collect(); + callback?.Invoke(); + if (MoveTo != UIManager.ViewScene.None) + { + UIManager.GetInstance().ChangeViewScene(MoveTo, param, sceneParam); + } + } + + public IEnumerator BattleEnd(Action callback = null) + { + BattleRelease(); + yield return Resources.UnloadUnusedAssets(); + GC.Collect(); + callback?.Invoke(); + } + + public void BattleRelease() + { + ToolboxGame.UIManager.gameObject.SetActive(value: true); + GameMgr.GetIns().GetEffectMgr().DestroyBattleEffectContainer(); + GameMgr.GetIns().GetDataMgr().ResetEnemyData(); + if (BattleManagerBase.GetIns() != null) + { + BattleManagerBase.GetIns().DisposeBattleGameObj(); + } + GameMgr.GetIns().DestroyBattleManagements(); + GameMgr.GetIns().GetGameObjMgr().GetUIContainer() + .SetActive(value: false); + BattleLogManager.GetInstance().Clear(); + GameMgr.GetIns().GetEffectMgr().ClearLastCacheEffect(); + StopAllTweens(); + } + + private void StopAllTweens() + { + HashSet hashSet = new HashSet(); + for (int i = 0; i < iTween.tweens.Count; i++) + { + if (iTween.tweens[i] != null) + { + GameObject gameObject = (GameObject)iTween.tweens[i]["target"]; + if (gameObject != null) + { + hashSet.Add(gameObject); + } + } + } + foreach (GameObject item in hashSet) + { + if (item != null) + { + iTween.Stop(item); + } + } + iTween.tweens.Clear(); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleEnemy.cs b/SVSim.BattleEngine/Engine/BattleEnemy.cs new file mode 100644 index 0000000..e0f8eee --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleEnemy.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Player.Emotion; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class BattleEnemy : BattlePlayerBase +{ + private readonly Vector3 OFFSET_THINK_ICON_FROM_CLASSVIEW = new Vector3(0.62f, 0.15f, 0f); + + private IEmotion _emotion; + + private readonly Vector3 FIELD_CENTER_POSITION = new Vector3(0f, 0.25f, 0f); + + public override bool IsGameFirst => !base.BattleMgr.IsFirst; + + public override bool IsPlayer => false; + + public override IBattlePlayerView BattleView => BattleEnemyView; + + public override IEmotion Emotion => _emotion; + + public virtual IBattlePlayerView BattleEnemyView { get; protected set; } + + public bool EnableEnemyAI { get; set; } + + public override int Turn + { + get + { + if (!base.BattleMgr.IsFirst) + { + return base.BattleMgr.FirstTurn; + } + return base.BattleMgr.SecondTurn; + } + set + { + if (base.BattleMgr.IsFirst) + { + base.BattleMgr.SecondTurn = value; + } + else + { + base.BattleMgr.FirstTurn = value; + } + } + } + + public event Action> OnMulliganEndForReplay; + + public BattleEnemy(BattleManagerBase battleMgr, BattleCamera battleCamera, BackGroundBase backGround, IInnerOptionsBuilder innerOptionsBuilder) + : base(battleMgr, battleCamera, backGround, innerOptionsBuilder) + { + } + + protected override void Initialize() + { + BattleEnemyView = new BattleEnemyView(this); + } + + protected override void CreateSelfBattleCard() + { + EnemyClassBattleCard item = new EnemyClassBattleCard(new ClassBattleCardBase.ClassBuildInfo(_isPlayer: false, 20, this, base.BattleMgr.BattlePlayer, base.BattleMgr, base.BattleMgr.BattleResourceMgr)); + base.ClassAndInPlayCardList.Add(item); + } + + public override void Setup(BattlePlayerBase opponentBattlePlayer) + { + _emotion = _innerOptionsBuilder.CreateEnemyEmotion((IClassBattleCardView)base.Class.BattleCardView); + base.Setup(opponentBattlePlayer); + } + + public override void SetupClone(BattlePlayerBase sourceBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags) + { + sourceBattlePlayer.CopyToVirtualBase(this, virtualOpponentBattlePlayer, cloneFlags); + } + + public override VfxBase StartTurnControl(string log = "") + { + if (GameMgr.GetIns().IsAdminWatch) + { + UpdateHandCardsPlayability(); + } + Turn++; + SequentialVfxPlayer sequentialVfxPlayer = TurnEvolveControl(BattleView.EpIcon); + VfxBase vfx = TurnStart(); + sequentialVfxPlayer.Register(vfx); + VfxBase vfx2 = BattleManagerBase.GetIns().JudgeBattleResult(); + sequentialVfxPlayer.Register(vfx2); + sequentialVfxPlayer.Register(CreateThinkingVfx(base.BattleMgr)); + return sequentialVfxPlayer; + } + + public VfxBase CreateThinkingVfx(BattleManagerBase battleMgr) + { + if (GameMgr.GetIns().IsAdminWatch) + { + return NullVfx.GetInstance(); + } + return new DelaySetupVfx(() => new ThinkIconShowVfx(delegate + { + Vector3 position = base.BattleCamera.Get3DCamera().WorldToScreenPoint(base.Class.BattleCardView.Transform.position + OFFSET_THINK_ICON_FROM_CLASSVIEW); + return UIManager.GetInstance().getCamera().ScreenToWorldPoint(position); + }, battleMgr.BattleResourceMgr)); + } + + public override VfxBase UsePp(int pp, bool isNewReplayMoveTurn = false) + { + base.UsePp(pp); + int usedPp = base.Pp; + int maxPp = base.PpTotal; + Vector3 labelPosition = default(Vector3); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + Vector3 position = base.BattleCamera.Get3DCamera().WorldToScreenPoint(StatusPanelControl.GetPPPanel().transform.Find("PPIcon/PPLabel").transform.position); + labelPosition = UIManager.GetInstance().getCamera().ScreenToWorldPoint(position); + })); + sequentialVfxPlayer.Register(new DelaySetupVfx(() => m_vfxCreator.CreateUsePp(usedPp, maxPp, labelPosition, isNewReplayMoveTurn))); + return sequentialVfxPlayer; + } + + protected override VfxBase TurnStartDrawCard(SkillProcessor skillProcessor) + { + NullVfx.GetInstance(); + int drawCount = ((IsGameFirst || Turn != 1) ? 1 : 2); + VfxWith> vfxWith = RandomCardDraw(drawCount, skillProcessor); + VfxBase vfxBase = CardDrawVfx(vfxWith.Value); + SequentialVfxPlayer result = SequentialVfxPlayer.Create(vfxWith.Vfx, vfxBase); + if (!base.Class.IsDead && EnableEnemyAI) + { + base.BattleMgr.EnemyAI.ExecuteEnemyAI(useWait: true); + } + _ = base.Class.IsDead; + return result; + } + + public override VfxBase CardDrawVfx(IEnumerable DrawList, bool skipShuffle = false, bool isOpenDrawSkill = false) + { + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + if (GameMgr.GetIns().IsAdminWatch) + { + foreach (BattleCardBase card in DrawList) + { + if (card.BaseCost != card.Cost) + { + List costList = card.BattleCardView.GetUseCostList(card.Cost); + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + card.BattleCardView.UpdateCost(costList); + })); + } + } + } + sequentialVfxPlayer.Register(new OpponentDrawCardVfx(DrawList, isOpenDrawSkill)); + sequentialVfxPlayer.Register(new OpponentDrawCardToHandVfx(DrawList.ToList(), 0.4f, isOpenDrawSkill, skipShuffle)); + return sequentialVfxPlayer; + } + + public override VfxBase TurnEnd() + { + ParallelVfxPlayer result = ParallelVfxPlayer.Create(base.TurnEnd(), new ThinkIconHideVfx(base.BattleMgr.BattleResourceMgr)); + if (GameMgr.GetIns().IsAdminWatch) + { + foreach (BattleCardBase handCard in base.HandCardList) + { + handCard.BattleCardView.HideCanPlayEffect(); + } + } + return result; + } + + protected override void SetActive() + { + if (GameMgr.GetIns().IsAdminWatch) + { + UpdateHandCardsPlayability(); + } + if (!IsGameFirst || Turn != 1) + { + base.IsChoiceBraveEffectTiming = true; + BattleEnemyView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + } + + public override BattlePlayerBase CreateVirtualPlayer() + { + return new VirtualBattleEnemy(base.BattleMgr, base.BattleCamera, base.BackGround); + } + + public override void UpdateHandCardsPlayability(bool areArrowsForcedOff = false) + { + foreach (BattleCardBase handCard in _opponentBattlePlayer.HandCardList) + { + handCard.BattleCardView.areArrowsForcedOff = areArrowsForcedOff; + handCard.BattleCardView.UpdateMovability(); + } + if (!GameMgr.GetIns().IsAdmin) + { + return; + } + foreach (BattleCardBase handCard2 in base.HandCardList) + { + handCard2.BattleCardView.areArrowsForcedOff = areArrowsForcedOff; + handCard2.BattleCardView.UpdateMovability(); + } + if (base.IsSelfTurn) + { + BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + } + + public override VfxBase MoveToHand(List cardsToMoveToHand) + { + return SequentialVfxPlayer.Create(new OpponentDrawCardToHandVfx(cardsToMoveToHand.ToList(), 0.3f), InstantVfx.Create(delegate + { + UpdateHandCardsPlayability(); + })); + } + + public override EffectBattle GetSkillEffect(string skillEffectPath) + { + return GameMgr.GetIns().GetEffectMgr().GetEnemyEffectBattle(skillEffectPath); + } + + public override Vector3 GetFieldCenterPosition() + { + return FIELD_CENTER_POSITION; + } + + public override VfxBase TurnStartDraw(SkillProcessor skillProcessor) + { + return base.TurnStartDraw(skillProcessor); + } + + public void CallRecordingMulliganEnd(List cardIndexList) + { + this.OnMulliganEndForReplay.Call(cardIndexList); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleFinishParam.cs b/SVSim.BattleEngine/Engine/BattleFinishParam.cs new file mode 100644 index 0000000..a114cd3 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleFinishParam.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using Wizard; + +public class BattleFinishParam : BaseParam +{ + public int class_id; + + public int total_turn; + + public int evolve_count; + + public int enemy_evolve_count; + + public int battle_result; + + public int is_retire; + + public Dictionary mission; + + public string recovery_data; + + public int SDTRB; + + public string[] prosessing_time_data; +} diff --git a/SVSim.BattleEngine/Engine/BattleLifeTimeSharedObject.cs b/SVSim.BattleEngine/Engine/BattleLifeTimeSharedObject.cs new file mode 100644 index 0000000..68877ee --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleLifeTimeSharedObject.cs @@ -0,0 +1,29 @@ +using System.Collections.Generic; + +public class BattleLifeTimeSharedObject +{ + private Dictionary _skillBuildInfoSharedObject; + + public BattleLifeTimeSharedObject() + { + _skillBuildInfoSharedObject = new Dictionary(); + } + + ~BattleLifeTimeSharedObject() + { + _skillBuildInfoSharedObject.Clear(); + } + + public void SetSkillBuildInfo(string key, SkillCreator.SkillBuildInfo value) + { + if (!_skillBuildInfoSharedObject.ContainsKey(key)) + { + _skillBuildInfoSharedObject.Add(key, value); + } + } + + public SkillCreator.SkillBuildInfo GetSkillBuildInfo(string key) + { + return _skillBuildInfoSharedObject.GetValueOrDefault(key, null); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleMenuMgr.cs b/SVSim.BattleEngine/Engine/BattleMenuMgr.cs new file mode 100644 index 0000000..7e35d07 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleMenuMgr.cs @@ -0,0 +1,609 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.View; +using Wizard.RoomMatch; + +public class BattleMenuMgr : NonDialogPopup +{ + [SerializeField] + private GameObject UserPanel; + + [SerializeField] + private NguiObjs UserPanelP; + + [SerializeField] + private NguiObjs UserPanelE; + + [SerializeField] + private GameObject CharPanelP; + + [SerializeField] + private GameObject CharPanelE; + + [SerializeField] + private UITexture CharTextureP; + + [SerializeField] + private UITexture CharTextureE; + + [SerializeField] + private GameObject _roomIDRoot; + + [SerializeField] + private UILabel _roomIDLabel; + + [SerializeField] + private GameObject _winnerRewardRoot; + + [SerializeField] + private UISprite _winnerRewardBox; + + [SerializeField] + private UILabel _winnerRewardNameLabel; + + [SerializeField] + private GameObject _vsRoot; + + [SerializeField] + private GameObject _ratingRoot; + + [SerializeField] + private GameObject _backSpriteRoot; + + [SerializeField] + private UIButton _backSpriteButton; + + [SerializeField] + private GameObject _defaultMenuRoot; + + [SerializeField] + private GameObject _titleLine; + + [SerializeField] + private GameObject _titleLineWithFormat; + + [SerializeField] + private UILabel _formatLabel; + + [SerializeField] + private UISprite _formatIcon; + + [SerializeField] + private UILabel _tsRotaionFormatLabel; + + [SerializeField] + private UIButton _retireButton; + + [SerializeField] + private UILabel _retireButtonLabel; + + [SerializeField] + private UIButton _settingButton; + + [SerializeField] + private UILabel _settingButtonLabel; + + [SerializeField] + private UIButton _backButton; + + [SerializeField] + private UILabel _backButtonLabel; + + [SerializeField] + private GameObject _questMenuRoot; + + [SerializeField] + private UIButton _questRetireButton; + + [SerializeField] + private UILabel _questRetireButtonLabel; + + [SerializeField] + private UIButton _questSettingButton; + + [SerializeField] + private UILabel _questSettingButtonLabel; + + [SerializeField] + private UIButton _questBackButton; + + [SerializeField] + private UILabel _questBackButtonLabel; + + [SerializeField] + private UIButton _questMissionButton; + + [SerializeField] + private UILabel _questMissionButtonLabel; + + [SerializeField] + private GameObject _questMissionDialogPrefab; + + [SerializeField] + private ClassInfoParts _classInfoP; + + [SerializeField] + private ClassInfoParts _classInfoE; + + [SerializeField] + private ClassInfoParts _classInfoWithSubClassP; + + [SerializeField] + private ClassInfoParts _classInfoWithSubClassE; + + [SerializeField] + private FlexibleGrid _subClassGridP; + + [SerializeField] + private FlexibleGrid _subClassGridE; + + [SerializeField] + private MyRotationParts _myRotationInfoP; + + [SerializeField] + private MyRotationParts _myRotationInfoE; + + private Dictionary defPosDict = new Dictionary(); + + public const float OPEN_DURATION_TIME = 0.3f; + + private bool IsQuestBattle => GameMgr.GetIns().GetDataMgr().IsQuestBattleType(); + + public GameObject QuestMissionDialogPrefab => _questMissionDialogPrefab; + + public void DisplayBattleMenu(Action retireAction, Action settingAction, Action backAction, Action questMissionAction) + { + InitializeBattleMenu(); + iTween.MoveTo(UserPanel, iTween.Hash("position", defPosDict["UserPanel"], "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CharPanelP, iTween.Hash("position", defPosDict["CharPanelP"], "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CharPanelE, iTween.Hash("position", defPosDict["CharPanelE"], "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(UserPanel, 0f, 0f); + TweenAlpha.Begin(UserPanel, 0.3f, 1f); + if (IsQuestBattle && !BattleManagerBase.GetIns().IsPuzzleMgr && GameMgr.GetIns().GetDataMgr().m_BattleType != DataMgr.BattleType.BossRushQuest && GameMgr.GetIns().GetDataMgr().m_BattleType != DataMgr.BattleType.SecretBossQuest) + { + SetupQuestButtonMenu(retireAction, settingAction, backAction, questMissionAction); + } + else + { + SetupDefaultButtonMenu(retireAction, settingAction, backAction); + } + TweenAlpha.Begin(base.gameObject, 0f, 0f); + TweenAlpha.Begin(base.gameObject, 0.3f, 1f); + TweenAlpha.Begin(_backSpriteRoot.gameObject, 0f, 0f); + TweenAlpha.Begin(_backSpriteRoot.gameObject, 0.3f, 1f); + } + + private void InitializeBattleMenu() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + NetworkUserInfoData networkUserInfoData = GameMgr.GetIns().GetNetworkUserInfoData(); + PuzzleQuestData puzzleQuestData = null; + bool isPuzzleMgr = BattleManagerBase.GetIns().IsPuzzleMgr; + if (isPuzzleMgr) + { + puzzleQuestData = Data.Master.PuzzleQuestDataList.First((PuzzleQuestData data) => data.Id == GameMgr.GetIns().GetDataMgr().PuzzleQuestId); + } + string text = PlayerStaticData.UserName.ToString(); + if (GameMgr.GetIns().IsWatchBattle) + { + text = networkUserInfoData.GetSelfName(); + } + UserPanelP.labels[0].text = text; + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.labels[0].text = VideoHostingUtil.GetUserNameHidden(networkUserInfoData.GetOpponentName().ToString()); + } + else + { + UserPanelE.labels[0].text = dataMgr.GetEnemyCharaData().chara_name; + } + if (dataMgr.m_BattleType == DataMgr.BattleType.RankBattle) + { + if (PlayerStaticData.IsMasterRankCurrentFormat()) + { + UserPanelP.labels[1].text = PlayerStaticData.UserMasterPointCurrentFormat().ToString(); + } + else + { + int num = PlayerStaticData.UserBattlePointCurrentFormat(); + if (GameMgr.GetIns().IsWatchBattle) + { + num = networkUserInfoData.GetSelfBattlePoint(); + } + UserPanelP.labels[1].text = num.ToString(); + } + if (networkUserInfoData.GetOpponentIsMasterRank()) + { + UserPanelE.labels[1].text = networkUserInfoData.GetOpponentMasterPoint().ToString(); + } + else + { + UserPanelE.labels[1].text = networkUserInfoData.GetOpponentBattlePoint().ToString(); + } + } + else + { + UserPanelP.labels[1].gameObject.SetActive(value: false); + UserPanelE.labels[1].gameObject.SetActive(value: false); + } + if (GameMgr.GetIns().IsWatchBattle) + { + UserPanelP.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (isPuzzleMgr) + { + UserPanelP.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(puzzleQuestData.PlayerEmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + PlayerStaticData.AttachUserEmblemTexture(UserPanelP.textures[0], PlayerStaticData.EmblemTexSize.M); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + int num2 = 100000000; + if (isPuzzleMgr) + { + num2 = puzzleQuestData.EnemyEmblemId; + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.Quest) + { + num2 = dataMgr.QuestBattleData.EmblemId; + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.BossRushQuest || dataMgr.m_BattleType == DataMgr.BattleType.SecretBossQuest) + { + num2 = dataMgr.BossRushBattleData.EmblemId; + } + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(num2.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M); + if (Toolbox.ResourcesManager.IsLoadedAssetBundle(assetTypePath)) + { + UserPanelE.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(num2.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + UserPanelE.textures[0].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(num2.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + } + if (GameMgr.GetIns().IsWatchBattle) + { + DegreeHelper.InitializeDegree(UserPanelP.textures[1], networkUserInfoData.GetSelfDegreeId(), DegreeHelper.DegreeType.SMALL); + } + else if (isPuzzleMgr) + { + DegreeHelper.InitializeDegree(UserPanelP.textures[1], puzzleQuestData.PlayerDegreeId, DegreeHelper.DegreeType.MIDDLE); + } + else + { + DegreeHelper.InitializeDegree(UserPanelP.textures[1], PlayerStaticData.UserDegreeID, DegreeHelper.DegreeType.SMALL); + } + int num3 = (GameMgr.GetIns().IsNetworkBattle ? networkUserInfoData.GetOpponentDegreeId() : (isPuzzleMgr ? puzzleQuestData.EnemyDegreeId : ((dataMgr.m_BattleType == DataMgr.BattleType.Quest) ? dataMgr.QuestBattleData.DegreeId : ((dataMgr.m_BattleType != DataMgr.BattleType.BossRushQuest && dataMgr.m_BattleType != DataMgr.BattleType.SecretBossQuest) ? dataMgr.PracticeDifficultyDegreeId : dataMgr.BossRushBattleData.DegreeId)))); + if ((dataMgr.m_BattleType != DataMgr.BattleType.Practice || dataMgr.PracticeDifficultyDegreeId != -1 || isPuzzleMgr) && (!dataMgr.IsQuestBattleType() || num3 != -1) && dataMgr.m_BattleType != DataMgr.BattleType.Story) + { + DegreeHelper.InitializeDegree(UserPanelE.textures[1], num3, DegreeHelper.DegreeType.SMALL); + } + UserPanelE.textures[1].gameObject.SetActive(value: true); + if (dataMgr.m_BattleType != DataMgr.BattleType.Practice && dataMgr.m_BattleType != DataMgr.BattleType.Story && dataMgr.m_BattleType != DataMgr.BattleType.Quest && dataMgr.m_BattleType != DataMgr.BattleType.BossRushQuest && dataMgr.m_BattleType != DataMgr.BattleType.SecretBossQuest) + { + if (GameMgr.GetIns().IsWatchBattle || UserPanelP.textures[2].mainTexture == null) + { + UserPanelP.textures[2].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfRank().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + else + { + PlayerStaticData.AttachUserRankTexture(UserPanelP.textures[2], PlayerStaticData.RankTexSize.S); + } + UserPanelE.textures[2].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentRank().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + else + { + UserPanelP.textures[2].gameObject.SetActive(value: false); + UserPanelE.textures[2].gameObject.SetActive(value: false); + } + if (GameMgr.GetIns().IsWatchBattle) + { + UIUtil.SetCountryTexture(UserPanelP.textures[3], networkUserInfoData.GetSelfCountryCode()); + } + else + { + bool flag = !string.IsNullOrEmpty(PlayerStaticData.UserCountryCode); + UserPanelP.textures[3].gameObject.SetActive(flag); + if (flag) + { + PlayerStaticData.AttachUserCountryTexture(UserPanelP.textures[3], PlayerStaticData.CountryTexSize.M); + } + else + { + UserPanelP.textures[3].mainTexture = null; + } + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UIUtil.SetCountryTexture(UserPanelE.textures[3], networkUserInfoData.GetOpponentCountryCode()); + } + else + { + UserPanelE.textures[3].gameObject.SetActive(value: false); + UserPanelE.textures[3].mainTexture = null; + } + _myRotationInfoP.gameObject.SetActive(value: false); + if (dataMgr.TryGetPlayerSubClassId(out var subClassId)) + { + SetClassInfoWithSubClass(dataMgr.GetPlayerCharaData(), networkUserInfoData.GetSelfChaosId(), subClassId, _classInfoP, _classInfoWithSubClassP, _subClassGridP); + } + else + { + if (dataMgr.TryGetPlayerMyRotationInfo(out var myRotationInfo)) + { + _myRotationInfoP.gameObject.SetActive(value: true); + _myRotationInfoP.SetMyRotationInfo(myRotationInfo); + _myRotationInfoP.Reposition(); + } + _classInfoP.InitByCharaPrm(dataMgr.GetPlayerCharaData(), networkUserInfoData.GetSelfChaosId()); + _classInfoWithSubClassP.gameObject.SetActive(value: false); + } + _myRotationInfoE.gameObject.SetActive(value: false); + if (dataMgr.TryGetEnemySubClassId(out var subClassId2)) + { + SetClassInfoWithSubClass(dataMgr.GetEnemyCharaData(), networkUserInfoData.GetOpponentChaosId(), subClassId2, _classInfoE, _classInfoWithSubClassE, _subClassGridE); + } + else + { + if (dataMgr.TryGetEnemyMyRotationInfo(out var myRotationInfo2)) + { + _myRotationInfoE.gameObject.SetActive(value: true); + _myRotationInfoE.SetMyRotationInfo(myRotationInfo2); + _myRotationInfoE.Reposition(); + } + _classInfoE.InitByCharaPrm(dataMgr.GetEnemyCharaData(), networkUserInfoData.GetOpponentChaosId()); + _classInfoWithSubClassE.gameObject.SetActive(value: false); + } + BattleManagerBase ins = BattleManagerBase.GetIns(); + string playerSkinId = dataMgr.GetPlayerSkinId().ToString("00"); + ResourcesManager.AssetLoadPathType assetTypePlayer = (ins.BattlePlayer.IsSkinEvolved ? ResourcesManager.AssetLoadPathType.ClassCharaEvolve : ResourcesManager.AssetLoadPathType.ClassCharaBase); + string playerClassAssetName = Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId, assetTypePlayer); + if (Toolbox.ResourcesManager.IsLoadedAssetBundle(playerClassAssetName)) + { + CharTextureP.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId, assetTypePlayer, isfetch: true)); + } + else + { + StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(playerClassAssetName, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(playerClassAssetName); + CharTextureP.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId, assetTypePlayer, isfetch: true)); + })); + } + string enemySkinId = dataMgr.GetEnemySkinId().ToString("00"); + ResourcesManager.AssetLoadPathType assetTypeEnemy = (ins.BattleEnemy.IsSkinEvolved ? ResourcesManager.AssetLoadPathType.ClassCharaEvolve : ResourcesManager.AssetLoadPathType.ClassCharaBase); + string enemyClassAssetName = Toolbox.ResourcesManager.GetAssetTypePath(enemySkinId, assetTypeEnemy); + if (Toolbox.ResourcesManager.IsLoadedAssetBundle(enemyClassAssetName)) + { + CharTextureE.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(enemySkinId, assetTypeEnemy, isfetch: true)); + } + else + { + StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(enemyClassAssetName, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(enemyClassAssetName); + CharTextureE.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(enemySkinId, assetTypeEnemy, isfetch: true)); + })); + } + bool activeOfficialUserIconSprite = (GameMgr.GetIns().IsWatchBattle ? networkUserInfoData.GetSelfIsOfficialUser() : PlayerStaticData.IsOfficialUserDisplay); + bool activeOfficialUserIconSprite2 = GameMgr.GetIns().IsNetworkBattle && networkUserInfoData.GetOpponentIsOfficialUser(); + UserPanelP.gameObject.GetComponent().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite); + UserPanelE.gameObject.GetComponent().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite2); + defPosDict["UserPanel"] = UserPanel.transform.localPosition + (IsQuestBattle ? new Vector3(0f, -7f, 0f) : Vector3.zero); + defPosDict["CharPanelP"] = CharPanelP.transform.localPosition; + defPosDict["CharPanelE"] = CharPanelE.transform.localPosition; + UserPanel.transform.localPosition = defPosDict["UserPanel"] + Vector3.down * 50f; + CharPanelP.transform.localPosition = defPosDict["CharPanelP"] + Vector3.left * 300f; + CharPanelE.transform.localPosition = defPosDict["CharPanelE"] + Vector3.right * 300f; + TweenAlpha.Begin(UserPanel, 0f, 0f); + if (dataMgr.GetEnemyBattleSkillReverse() == 0) + { + CharTextureE.uvRect = new Rect(1f, 0f, -1f, 1f); + } + _SetupRoomIDObj(); + SetupRankWinnerReward(); + if (CustomPreference.GetTextLanguage() == Global.LANG_TYPE.Kor.ToString()) + { + _ratingRoot.SetActive(value: true); + } + else + { + _ratingRoot.SetActive(value: false); + } + } + + private static void SetClassInfoWithSubClass(ClassCharacterMasterData charaData, int chaosId, int subClassId, ClassInfoParts defaultClassInfoParts, ClassInfoParts classInfoParts, FlexibleGrid grid) + { + classInfoParts.gameObject.SetActive(value: true); + defaultClassInfoParts.ClassNameLabel.text = string.Empty; + classInfoParts.InitByCharaPrm(charaData, chaosId); + classInfoParts.SetSubClass((CardBasePrm.ClanType)subClassId); + UIUtil.AdjustClassInfoPartsSize(classInfoParts, grid, defaultClassInfoParts.ClassNameLabel.width); + } + + private void _SetupRoomIDObj() + { + _roomIDRoot.SetActive(value: false); + if (GameMgr.GetIns().IsReplayBattle || !GameMgr.GetIns().GetDataMgr().IsRoomBattleType()) + { + return; + } + if (RoomBase.IsConnectControllerActive()) + { + if (!RoomBase.ConnectController.IsGathering) + { + _roomIDRoot.SetActive(value: true); + _roomIDLabel.text = $"{RoomBase.ConnectController.DisplayRoomID:00000}"; + } + } + else if (Data.BattleRecoveryInfo != null && !Data.BattleRecoveryInfo.IsGatheringRoom) + { + _roomIDRoot.SetActive(value: true); + _roomIDLabel.text = $"{PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.ROOM_MATCH_DISPLAY_ID):00000}"; + } + } + + private void SetupRankWinnerReward() + { + if (GameMgr.GetIns().GetDataMgr().m_BattleType != DataMgr.BattleType.RankBattle && GameMgr.GetIns().GetDataMgr().m_BattleType != DataMgr.BattleType.TwoPick) + { + return; + } + RankWinnerReward rankWinnerReward = GameMgr.GetIns()._rankWinnerReward; + if (rankWinnerReward == null) + { + int value = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_GRADE); + string value2 = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.BATTLE_WINNER_REWARD_STRING); + if (value != 0 && value2 != "") + { + GameMgr.GetIns()._rankWinnerReward = UIManager.GetInstance().createRankWinnerReward(); + GameMgr.GetIns()._rankWinnerReward.SetInfomation(value, value2); + GameMgr.GetIns()._rankWinnerReward.gameObject.SetActive(value: false); + rankWinnerReward = GameMgr.GetIns()._rankWinnerReward; + } + else + { + _winnerRewardRoot.SetActive(value: false); + } + } + if (rankWinnerReward != null) + { + UIManager.GetInstance().AttachAtlas(_winnerRewardRoot); + _winnerRewardNameLabel.text = rankWinnerReward.RewardString; + _winnerRewardBox.spriteName = rankWinnerReward.GetBoxSpriteName(); + _winnerRewardBox.transform.localPosition = rankWinnerReward.GetBattleMenuBoxPosition(); + _winnerRewardRoot.SetActive(value: true); + _vsRoot.SetActive(value: false); + } + } + + private void SetupDefaultButtonMenu(Action retireAction, Action settingAction, Action backAction) + { + _defaultMenuRoot.SetActive(value: true); + _questMenuRoot.SetActive(value: false); + if (Data.CurrentFormat != Format.Max && DataMgr.IsEnableFormatIconBattleType(GameMgr.GetIns().GetDataMgr().m_BattleType)) + { + _titleLine.SetActive(value: false); + _titleLineWithFormat.SetActive(value: true); + if (Data.CurrentFormat != Format.Rotation || CustomPreference.GetTextLanguage() != Global.LANG_TYPE.Jpn.ToString()) + { + _formatLabel.gameObject.SetActive(value: true); + _formatIcon.gameObject.SetActive(value: true); + _tsRotaionFormatLabel.gameObject.SetActive(value: false); + _formatLabel.text = UIUtil.GetFormatName(Data.CurrentFormat); + _formatIcon.spriteName = UIUtil.GetFormatSmallSpriteName(Data.CurrentFormat); + } + else + { + _formatLabel.gameObject.SetActive(value: false); + _formatIcon.gameObject.SetActive(value: false); + _tsRotaionFormatLabel.gameObject.SetActive(value: true); + _tsRotaionFormatLabel.text = UIUtil.GetFormatName(Data.CurrentFormat); + } + UIUtil.AddPositionY(_retireButton.transform, -5f); + } + else + { + _titleLine.SetActive(value: true); + _titleLineWithFormat.SetActive(value: false); + _formatLabel.gameObject.SetActive(value: false); + _formatIcon.gameObject.SetActive(value: false); + _tsRotaionFormatLabel.gameObject.SetActive(value: false); + } + SetButton(_retireButton, _retireButtonLabel, GetRetireButtonText(), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + retireAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + SetButton(_settingButton, _settingButtonLabel, Data.SystemText.Get("Common_0209"), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + settingAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + SetButton(_backButton, _backButtonLabel, Data.SystemText.Get("Battle_0406"), delegate + { + backAction(); + UnityEngine.Object.Destroy(base.gameObject); + }, Se.TYPE.SYS_BTN_CANCEL); + _backSpriteButton.onClick.Add(new EventDelegate(Close)); + } + + private void SetupQuestButtonMenu(Action retireAction, Action settingAction, Action backAction, Action questMissionAction) + { + _defaultMenuRoot.SetActive(value: false); + _questMenuRoot.SetActive(value: true); + SetButton(_questRetireButton, _questRetireButtonLabel, GetRetireButtonText(), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + retireAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + SetButton(_questSettingButton, _questSettingButtonLabel, Data.SystemText.Get("Common_0209"), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + settingAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + SetButton(_questBackButton, _questBackButtonLabel, Data.SystemText.Get("Battle_0406"), delegate + { + backAction(); + UnityEngine.Object.Destroy(base.gameObject); + }, Se.TYPE.SYS_BTN_CANCEL); + SetButton(_questMissionButton, _questMissionButtonLabel, Data.SystemText.Get("Quest_0013"), delegate + { + UnityEngine.Object.Destroy(base.gameObject); + questMissionAction(); + }, Se.TYPE.SYS_BTN_DECIDE); + _backSpriteButton.onClick.Add(new EventDelegate(Close)); + } + + private string GetRetireButtonText() + { + string result = Data.SystemText.Get("Common_0051"); + if (GameMgr.GetIns().IsReplayBattle) + { + result = Data.SystemText.Get("Common_0149"); + } + else if (GameMgr.GetIns().IsWatchBattle) + { + result = Data.SystemText.Get("Common_0147"); + } + return result; + } + + private void SetButton(UIButton button, UILabel label, string text, Action action, Se.TYPE se) + { + label.text = text; + button.onClick.Add(new EventDelegate(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(se); + action(); + })); + } + + public void SetSettingButtonDisable() + { + UIManager.SetObjectToGrey(_settingButton.gameObject, b: true); + UIManager.SetObjectToGrey(_questSettingButton.gameObject, b: true); + } + + public override void Close() + { + if (_defaultMenuRoot.activeSelf) + { + EventDelegate.Execute(_backButton.onClick); + } + else if (_questMenuRoot.activeSelf) + { + EventDelegate.Execute(_questBackButton.onClick); + } + } +} diff --git a/SVSim.BattleEngine/Engine/BattlePlayer.cs b/SVSim.BattleEngine/Engine/BattlePlayer.cs new file mode 100644 index 0000000..309ad2e --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattlePlayer.cs @@ -0,0 +1,346 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Player.Emotion; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class BattlePlayer : BattlePlayerBase +{ + private readonly Vector3 FIELD_CENTER_POSITION = new Vector3(0f, -0.3f, 0f); + + private BattleUIContainer _battleUIContainer; + + protected CanNotTouchCardVfx _canNotTouchCardVfx; + + public bool _isPlayerActive; + + public int PlayCardTouchCount; + + public bool IsTimeOverTurnEndProcessing; + + public bool IsDuringChoiceBrave; + + public override bool IsGameFirst => base.BattleMgr.IsFirst; + + public override bool IsPlayer => true; + + public override IBattlePlayerView BattleView => PlayerBattleView; + + public virtual IPlayerView PlayerBattleView { get; protected set; } + + public override IEmotion Emotion => PlayerEmotion; + + public IPlayerEmotion PlayerEmotion { get; protected set; } + + public bool IsTurnStartEffectNotFinished { get; set; } + + public override bool CanChoiceBraveThisTurn + { + get + { + if (!base.IsAlreadyChoiceBraveInThisTurn && !IsTimeOverTurnEndProcessing) + { + return base.IsChoiceBraveEffectTiming; + } + return false; + } + } + + public override bool CanChoiceBrave + { + get + { + if (CanChoiceBraveThisTurn && base.CanPlayAnyChoiceBraveCard && BattleView.IsTouchable() && !BattleView.IsSelecting && !CantPlayChoiceBrave) + { + return !PlayerBattleView.IsMoving(); + } + return false; + } + } + + public event Func OnAfterPlayerTurnStart; + + public event Action OnPlayerActive; + + public event Action> OnMulliganEndForReplay; + + public BattlePlayer(BattleManagerBase battleMgr, BattleCamera battleCamera, BackGroundBase backGround, IInnerOptionsBuilder innerOptionsBuilder) + : base(battleMgr, battleCamera, backGround, innerOptionsBuilder) + { + } + + protected override void Initialize() + { + PlayerBattleView = new BattlePlayerView(this); + } + + protected override void CreateSelfBattleCard() + { + PlayerClassBattleCard item = new PlayerClassBattleCard(new ClassBattleCardBase.ClassBuildInfo(_isPlayer: true, 20, this, base.BattleMgr.BattleEnemy, base.BattleMgr, base.BattleMgr.BattleResourceMgr)); + base.ClassAndInPlayCardList.Add(item); + } + + public override void Setup(BattlePlayerBase opponentBattlePlayer) + { + if (_battleUIContainer == null && !(this is VirtualBattlePlayer) && (base.IsSelfTurn || IsTurnStartEffectNotFinished)) + { + _battleUIContainer = base.BattleMgr.BattleUIContainer; + _battleUIContainer.DisableMenu(); + } + PlayerEmotion = _innerOptionsBuilder.CreatePlayerEmotion((IClassBattleCardView)base.Class.BattleCardView); + base.OnTurnEnd += (SkillProcessor skill) => InstantVfx.Create(delegate + { + if (!GameMgr.GetIns().IsWatchBattle) + { + PlayerBattleView.TurnEndButtonUI.ChangeButtonView(base.IsSelfTurn); + } + }); + opponentBattlePlayer.OnTurnStartAfterDraw += () => InstantVfx.Create(delegate + { + EnableBattleMenu(); + ITurnEndButtonUI turnEndButtonUI = PlayerBattleView.TurnEndButtonUI; + if (!turnEndButtonUI.GameObject.activeSelf) + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_UI_TURN_1, turnEndButtonUI.GetBtnPosition()); + } + turnEndButtonUI.GameObject.SetActive(value: true); + turnEndButtonUI.EnableButton(); + turnEndButtonUI.HideBtn(); + turnEndButtonUI.ChangeButtonView(base.IsSelfTurn); + }); + base.Setup(opponentBattlePlayer); + } + + public override void SetupClone(BattlePlayerBase sourceBattlePlayer, BattlePlayerBase virtualOpponentBattlePlayer, CloneActualFlags cloneFlags) + { + sourceBattlePlayer.CopyToVirtualBase(this, virtualOpponentBattlePlayer, cloneFlags); + } + + public override void SetupCardEvent(BattleCardBase card) + { + base.SetupCardEvent(card); + card.OnPlay += delegate + { + foreach (BattleCardBase item in base.HandCardList.Where((BattleCardBase c) => c != card)) + { + item.BattleCardView.UpdateMovability(); + } + BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + return NullVfx.GetInstance(); + }; + } + + public override VfxBase TurnStart() + { + VfxBase vfxBase = base.TurnStart(); + if (base.BattleMgr.IsRecovery) + { + EnableBattleMenu(); + if (base.IsSelfTurn) + { + _isPlayerActive = true; + } + } + return SequentialVfxPlayer.Create(vfxBase, InstantVfx.Create(PlayerBattleView.UpdateTurnEndPulseEffect)); + } + + public void TurnStartEffectEnd() + { + IsTurnStartEffectNotFinished = false; + } + + private void EnableBattleMenu() + { + if (_battleUIContainer != null) + { + _battleUIContainer.EnableMenu(); + } + } + + public override VfxBase StartTurnControl(string log = "") + { + if (_canNotTouchCardVfx == null) + { + _canNotTouchCardVfx = new CanNotTouchCardVfx(); + BattleManagerBase.GetIns().VfxMgr.RegisterImmediateVfx(_canNotTouchCardVfx); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + NetworkBattleManagerBase networkBattleManagerBase = BattleManagerBase.GetIns() as NetworkBattleManagerBase; + if (networkBattleManagerBase.turnEndTimeController != null) + { + networkBattleManagerBase.turnEndTimeController.AddTurnEndTimerLog("TurnStart" + log); + } + } + PlayerEmotion.ResetPlayCount(); + Turn++; + SequentialVfxPlayer sequentialVfxPlayer = TurnEvolveControl(PlayerBattleView.EpIcon); + VfxBase vfx = TurnStart(); + sequentialVfxPlayer.Register(vfx); + VfxBase allFuncVfxResults = this.OnAfterPlayerTurnStart.GetAllFuncVfxResults(); + this.OnAfterPlayerTurnStart = null; + sequentialVfxPlayer.Register(allFuncVfxResults); + VfxBase vfx2 = base.BattleMgr.JudgeBattleResult(); + sequentialVfxPlayer.Register(vfx2); + return sequentialVfxPlayer; + } + + public override VfxBase UsePp(int pp, bool isNewReplayMoveTurn = false) + { + base.UsePp(pp); + if (BattleManagerBase.IsForecast) + { + return NullVfx.GetInstance(); + } + int pp2 = base.Pp; + Vector3 zero = Vector3.zero; + zero = BattleView.GetPPLabelPosition(); + return m_vfxCreator.CreateUsePp(pp2, base.PpTotal, zero, isNewReplayMoveTurn); + } + + protected override VfxBase TurnStartDrawCard(SkillProcessor skillProcessor) + { + int drawCount = ((IsGameFirst || Turn != 1) ? 1 : 2); + VfxWith> vfxWith = RandomCardDraw(drawCount, skillProcessor); + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(); + sequentialVfxPlayer.Register(vfxWith.Vfx); + sequentialVfxPlayer.Register(CardDrawVfx(vfxWith.Value)); + BattleLogManager.GetInstance().AddLogOverDrawCards(vfxWith.Value.Where((BattleCardBase s) => !s.IsInHand).ToList()); + return sequentialVfxPlayer; + } + + public override VfxBase TurnEnd() + { + bool flag = false; + if (BattleManagerBase.GetIns().VfxMgr.IsEnd && IsTimeOverTurnEndProcessing) + { + base.HandControl.RearrangeHand(0.4f, base.HandCardList.ConvertToViewList()); + flag = true; + } + _isPlayerActive = false; + SequentialVfxPlayer sequentialVfxPlayer = SequentialVfxPlayer.Create(base.TurnEnd()); + foreach (BattleCardBase handCard in base.HandCardList) + { + handCard.BattleCardView.HideCanPlayEffect(); + } + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + base.NowTurnEvol = true; + })); + if (IsTimeOverTurnEndProcessing && !flag) + { + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + base.HandControl.RearrangeHand(0.4f, base.HandCardList.ConvertToViewList()); + })); + } + sequentialVfxPlayer.Register(InstantVfx.Create(delegate + { + IsTimeOverTurnEndProcessing = false; + })); + return sequentialVfxPlayer; + } + + public override void HandCardToField(BattleCardBase targetCard, SkillBase skill = null) + { + base.HandCardToField(targetCard, skill); + if (base.HandCardList.Count <= 0) + { + base.BattleMgr.VfxMgr.RegisterImmediateVfx(BattleView.HandUnfocus()); + } + } + + protected override void SetActive() + { + PlayerActive(); + this.OnPlayerActive.Call(); + _isPlayerActive = true; + } + + protected override void PlayerActive() + { + TurnStartEffectEnd(); + EnableBattleMenu(); + if (!GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle) + { + ITurnEndButtonUI turnEndButtonUI = PlayerBattleView.TurnEndButtonUI; + turnEndButtonUI.StartTurnEndCountdown(); + turnEndButtonUI.ChangeButtonView(base.IsSelfTurn); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_UI_TURN_1, turnEndButtonUI.GetBtnPosition()); + } + _canNotTouchCardVfx.End(); + _canNotTouchCardVfx = null; + if (!IsGameFirst || Turn != 1) + { + base.IsChoiceBraveEffectTiming = true; + PlayerBattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + } + + public override BattlePlayerBase CreateVirtualPlayer() + { + return new VirtualBattlePlayer(base.BattleMgr, base.BattleCamera, base.BackGround); + } + + public override void UpdateHandCardsPlayability(bool areArrowsForcedOff = false) + { + foreach (BattleCardBase handCard in base.HandCardList) + { + handCard.BattleCardView.areArrowsForcedOff = areArrowsForcedOff; + handCard.BattleCardView.UpdateMovability(); + } + if (base.IsSelfTurn && !GameMgr.GetIns().IsNewReplayBattle) + { + CantPlayChoiceBrave = areArrowsForcedOff; + BattleView.UpdateChoiceBraveButtonPulsateEffectAndSprite(); + } + } + + private bool IsDrawing() + { + if (base.HandCardList.Count != 0) + { + return base.HandCardList[0].IsOnDraw; + } + return false; + } + + public override VfxBase MoveToHand(List cardsToMoveToHand) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + foreach (BattleCardBase item in cardsToMoveToHand) + { + parallelVfxPlayer.Register(item.CreateMoveToHandVfx()); + } + return SequentialVfxPlayer.Create(parallelVfxPlayer, InstantVfx.Create(delegate + { + UpdateHandCardsPlayability(); + })); + } + + public override VfxBase CardDrawVfx(IEnumerable cards, bool skipShuffle = false, bool isOpenDrawSkill = false) + { + return m_vfxCreator.CreateCardDraw(cards, isOpenDrawSkill); + } + + public override EffectBattle GetSkillEffect(string skillEffectPath) + { + return GameMgr.GetIns().GetEffectMgr().GetEffectBattle(skillEffectPath); + } + + public override Vector3 GetFieldCenterPosition() + { + return FIELD_CENTER_POSITION; + } + + public void CallRecordingMulliganEnd(List cards) + { + this.OnMulliganEndForReplay.Call(cards); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleResultUIController.cs b/SVSim.BattleEngine/Engine/BattleResultUIController.cs new file mode 100644 index 0000000..c784542 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleResultUIController.cs @@ -0,0 +1,916 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using Cute; +using LitJson; +using UnityEngine; +using Wizard; +using Wizard.Battle.Recovery; + +public class BattleResultUIController : MonoBehaviour +{ + private enum MenuDialogSelect + { + None = -1, + Button1, + ButtonClose + } + + public const string BattleResultObjectPass = "Prefab/UI/BattleResult/BattleResultUI"; + + public const string RankMatchBattleResultObjectPass = "Prefab/UI/BattleResult/RankMatchBattleResultUI"; + + public const string QuestBattleResultObjectPass = "Prefab/UI/BattleResult/QuestSpecialBattleResultUI"; + + public const string ColosseumBattleResultObjectPass = "Prefab/UI/BattleResult/ColosseumBattleResultUI"; + + public const string PLUS_STRING = "+"; + + public static readonly Color PLUS_START_COLOR = new Color32(byte.MaxValue, 192, 0, 0); + + public static readonly Color PLUS_END_COLOR = new Color32(byte.MaxValue, 192, 0, byte.MaxValue); + + public static readonly Color MINUS_START_COLOR = new Color32(128, 192, byte.MaxValue, 0); + + public const float GAUGEUP_DURATION = 0.5f; + + public const float GAUGEUP_DELAY = 0.5f; + + public const float GAUGEUP_LABEL_DURATION = 0.3f; + + public const float GAUGEUP_LABEL_MOVE_DISTANCE = 10f; + + public const float GAUGEUP_LABEL_DISAPPEAR_DURATION = 0.5f; + + public const float GAUGEUP_LABEL_DISAPPEAR_DELAY = 0.5f; + + [SerializeField] + public RankMatchBattleResult RankMatchBattleResultObject; + + [SerializeField] + public QuestSpecialBattleResult QuestBattleResultObject; + + [SerializeField] + private GameObject _battlePassResultPanel; + + [SerializeField] + private Transform _acncorNoneRoot; + + [SerializeField] + private UISprite _backGroundWithRank; + + [SerializeField] + private UISprite _backGroundNotNeedRank; + + [Header("共通")] + [SerializeField] + public UIPanel MainPanel; + + [SerializeField] + public NguiObjs ClassCharObj; + + [SerializeField] + public UITexture Bg; + + [SerializeField] + public UISprite ArcaneIn; + + [SerializeField] + public UISprite ArcaneOut; + + [SerializeField] + public UISprite ResultTitle; + + [Header("クラス情報")] + [SerializeField] + public GameObject ClassInfo; + + [SerializeField] + private ClassInfoParts _classInfoParts; + + [SerializeField] + private UITexture ClassLvImg; + + [SerializeField] + private UILabel ClassLvLabel; + + [SerializeField] + private UIGauge ClassGaugeBar; + + [SerializeField] + private ParticleSystem ClassGaugeEfc; + + [SerializeField] + public UILabel ClassExpAddLabel; + + [SerializeField] + private UILabel ClassExpNextTitle; + + [SerializeField] + private UILabel ClassExpNextLabel; + + [Header("下部ボタン")] + [SerializeField] + public UIAnchor AnchorBottom; + + [SerializeField] + public UIGrid ButtonGrid; + + [SerializeField] + public NguiObjs MissionBtnObj; + + [SerializeField] + public NguiObjs HomeBtnObj; + + [SerializeField] + public NguiObjs RetryBtnObj; + + [SerializeField] + public NguiObjs ReportBtnObj; + + [Header("タイトル画像")] + [SerializeField] + private GameObject _titleRoot; + + [SerializeField] + public UISprite TitleWin; + + [SerializeField] + public UISprite TitleLose; + + [SerializeField] + public UISprite TitleDraw; + + [SerializeField] + public UISprite TitleMatch; + + [Header("通知表示")] + [SerializeField] + public NguiObjs ResultInfo; + + [SerializeField] + private GameObject _notificationAnimationParent; + + [SerializeField] + private NotificatonAnimation _notificationAnimationPrefab; + + [SerializeField] + private UISprite _battlePassBG; + + private string _resultTypeMsg = ""; + + [SerializeField] + private GameObject m_MissionBase; + + public IDictionary DefaultPosDict = new Dictionary(); + + private int _classLv; + + private int _classLvPrev; + + private int _classLvMax; + + private int _classExp; + + private int _nowClassExp; + + private int _nextClassExp; + + private IList _missionLogList = new List(); + + private int _beforeClassExp; + + private IList _classExpList = new List(); + + private bool _isResultTutorial; + + private bool _isUsingSpecialDeck; + + private int _usingSpecialDeckClassId; + + private List _resultAssetList = new List(); + + private INextSceneSelector _nextSceneSelector; + + [NonSerialized] + public IBattleResultReporter resultReporter; + + private IResultAnimationHandler resultAnimationHandler; + + public const int MISSION_SPRITE_WIDTH = 800; + + private const int MISSION_MARGIN = 24; + + private const string MAINTENANCE_TIME_KEY = "maintenance_time"; + + private int _selectedClassId; + + private NotificatonAnimation _notificationAnimation; + + [SerializeField] + private GameObject _missionSelect; + + [SerializeField] + private GameObject _retrySelect; + + [SerializeField] + private GameObject _homeSelect; + + private const int MISSION_SELECT = 0; + + private const int RETRY_SELECT = 1; + + private const int HOME_SELECT = 2; + + public DialogBase _missionDialog; + + private MenuDialogSelect _menuDialogSelect = MenuDialogSelect.None; + + [NonSerialized] + public bool IsRewardWait; + + public bool ResultMsgWindowFlag { get; private set; } + + public bool ResultMsgReportBtnFlag { get; private set; } + + public bool IsWin { get; set; } + + public int AddClassExp { get; private set; } + + public bool IsDraw { get; private set; } + + public bool IsResultOn { get; private set; } + + public bool AlreadyResultRecovery { get; set; } + + public bool GreySpriteBGVisible + { + set + { + _battlePassBG.gameObject.SetActive(value); + } + } + + public IBattleResultReporter ResultReporter => resultReporter; + + public event Action OnResultFinish; + + private void OnDestroy() + { + VideoHostingUtil.SetHUDScene(VideoHostingUtil.HUDScene.Home); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_RESULT_BACK_1); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_RESULT_BACK_2); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_RESULT_BACK_3); + if (resultAnimationHandler != null) + { + resultAnimationHandler.Destroy(); + } + if (GameMgr.GetIns()._rankWinnerReward != null) + { + GameMgr.GetIns()._rankWinnerReward.RemoveObject(); + GameMgr.GetIns()._rankWinnerReward = null; + } + } + + private void Start() + { + _titleRoot.SetActive(value: true); + IsResultOn = false; + DefaultPosDict["ClassCharObj"] = ClassCharObj.transform.localPosition; + DefaultPosDict["ResultTitle"] = ResultTitle.transform.localPosition; + DefaultPosDict["ClassInfo"] = ClassInfo.transform.localPosition; + DefaultPosDict["ButtonGrid"] = ButtonGrid.transform.localPosition; + MainPanel.alpha = 0f; + TitleMatch.alpha = 0f; + Toolbox.AudioManager.AddCueSheet("bgm_btl_jingle", "bgm_btl_jingle.acb", "b/", "bgm_btl_jingle.awb"); + ButtonGrid.gameObject.SetActive(value: false); + IsDraw = false; + base.gameObject.SetActive(value: false); + if (RankMatchBattleResultObject != null) + { + RankMatchBattleResultObject.Init(); + } + if (QuestBattleResultObject != null) + { + QuestBattleResultObject.Init(); + } + } + + public void StartUI(bool win, BattleCamera battleCamera) + { + base.gameObject.SetActive(value: true); + if (IsResultOn) + { + return; + } + IsResultOn = true; + Toolbox.AudioManager.AddCueSheet("bgm_btl_jingle", "bgm_btl_jingle.acb", "b/", "bgm_btl_jingle.awb"); + VideoHostingUtil.SetHUDScene(VideoHostingUtil.HUDScene.BattleResult); + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + int skinId = dataMgr.GetPlayerSkinId(); + bool isEvolve = BattleManagerBase.GetIns().BattlePlayer.IsSkinEvolved; + if (!BattleManagerBase.IsTutorial) + { + if (win) + { + _resultAssetList.Add(Toolbox.ResourcesManager.GetAssetTypePath(skinId.ToString("00"), isEvolve ? ResourcesManager.AssetLoadPathType.ClassCharaEvolveWin : ResourcesManager.AssetLoadPathType.ClassCharaBaseWin)); + string text = dataMgr.GetPlayerEmotionData()[ClassCharaPrm.EmotionType.WIN].GetVoiceId(isEvolve); + if (BattleManagerBase.GetIns().IsPuzzleMgr) + { + string clearVoiceId = (BattleManagerBase.GetIns() as PuzzleBattleManager).PuzzleQuestData.ClearVoiceId; + if (!string.IsNullOrEmpty(clearVoiceId)) + { + text = clearVoiceId; + } + } + _ = isEvolve; + _resultAssetList.Add("v/vo_" + text + ".acb"); + } + else + { + _resultAssetList.Add(Toolbox.ResourcesManager.GetAssetTypePath(skinId.ToString("00"), isEvolve ? ResourcesManager.AssetLoadPathType.ClassCharaEvolveLose : ResourcesManager.AssetLoadPathType.ClassCharaBaseLose)); + _resultAssetList.Add("v/vo_" + dataMgr.GetPlayerEmotionData()[ClassCharaPrm.EmotionType.LOSE].GetVoiceId(isEvolve) + ".acb"); + } + } + if (dataMgr.IsFormatEnableBattleType()) + { + int num = PlayerStaticData.UserRankCurrentFormat(); + _resultAssetList.Add(Toolbox.ResourcesManager.GetAssetTypePath(num.ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_L)); + } + List list = new List(); + list.Add(ClassGaugeEfc.gameObject); + if (RankMatchBattleResultObject != null) + { + list.Add(RankMatchBattleResultObject.RankGaugeEfc.gameObject); + } + if (QuestBattleResultObject != null) + { + list.Add(QuestBattleResultObject.QuestPointGaugeEffect.gameObject); + } + GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list, delegate + { + GameMgr.GetIns().GetEffectMgr().InitCommonEffect("Json/EffectResultData", isBattle: true, isField: false, isBattleEffect: true, delegate + { + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(_resultAssetList, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.AddRange(_resultAssetList); + IsWin = win; + DataMgr.BattleType battleType = dataMgr.m_BattleType; + if (battleType == DataMgr.BattleType.Story && Data.SelectedStoryInfo.IsTutorialCategory) + { + _isResultTutorial = true; + _nextSceneSelector = new TutorialNextSceneSelector(this); + resultReporter = new TutorialResultReporter(); + resultAnimationHandler = new TutorialResultAnimationHandler(battleCamera); + } + else + { + ResourcesManager.AssetLoadPathType type = ((!isEvolve) ? (IsWin ? ResourcesManager.AssetLoadPathType.ClassCharaBaseWin : ResourcesManager.AssetLoadPathType.ClassCharaBaseLose) : (IsWin ? ResourcesManager.AssetLoadPathType.ClassCharaEvolveWin : ResourcesManager.AssetLoadPathType.ClassCharaEvolveLose)); + Texture mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(skinId.ToString("00"), type, isfetch: true)) as Texture; + ClassCharObj.textures[0].mainTexture = mainTexture; + _classInfoParts.InitByCharaPrm(dataMgr.GetPlayerCharaData()); + ClassLvImg.mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(dataMgr.GetPlayerClassId().ToString("00"), ResourcesManager.AssetLoadPathType.ClassCharaIconLevel, isfetch: true)) as Texture; + if (battleType == DataMgr.BattleType.TwoPick) + { + _isUsingSpecialDeck = true; + if (Data.TwoPickInfo.deckInfo != null) + { + _usingSpecialDeckClassId = Data.TwoPickInfo.deckInfo.classId; + } + else + { + _usingSpecialDeckClassId = Data.BattleRecoveryInfo.chara_id; + } + } + SetResultFunc(battleCamera); + } + ResultSetupEnd(); + }); + }); + }, isBattle: true); + } + + private void SetResultFunc(BattleCamera battleCamera) + { + if (GameMgr.GetIns().IsReplayBattle) + { + _nextSceneSelector = new NullNextSceneSelector(this); + resultReporter = new RoomMatchResultReporter(); + resultAnimationHandler = new RoomMatchResultAnimationHandler(battleCamera); + return; + } + switch (GameMgr.GetIns().GetDataMgr().m_BattleType) + { + case DataMgr.BattleType.FreeBattle: + _nextSceneSelector = new NetworkMatchNextSceneSelector(this); + resultReporter = new FreeMatchResultReporter(); + resultAnimationHandler = new FreeMatchResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.RankBattle: + _nextSceneSelector = new NetworkMatchNextSceneSelector(this); + resultReporter = new RankMatchResultReporter(); + resultAnimationHandler = new RankMatchResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.Practice: + if (GameMgr.GetIns().IsPuzzleQuest) + { + _nextSceneSelector = new PracticePuzzleNextSceneSelector(this); + resultReporter = new PracticePuzzleResultReporter(); + resultAnimationHandler = new PracticeResultAnimationHandler(battleCamera); + } + else + { + _nextSceneSelector = new PracticeNextSceneSelector(this); + resultReporter = new PracticeResultReporter(); + resultAnimationHandler = new PracticeResultAnimationHandler(battleCamera); + } + break; + case DataMgr.BattleType.ColosseumNormal: + case DataMgr.BattleType.ColosseumTwoPick: + case DataMgr.BattleType.ColosseumHof: + case DataMgr.BattleType.ColosseumWindFall: + case DataMgr.BattleType.ColosseumAvatar: + _nextSceneSelector = new ArenaNextSceneSelector(this); + resultReporter = new ColosseumResultReporter(); + resultAnimationHandler = new ColosseumResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.CompetitionNormal: + case DataMgr.BattleType.CompetitionTwoPick: + _nextSceneSelector = new ArenaNextSceneSelector(this); + resultReporter = new CompetitionResultReporter(); + resultAnimationHandler = new CompetitionResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.TwoPick: + case DataMgr.BattleType.Sealed: + _nextSceneSelector = new ArenaNextSceneSelector(this); + resultReporter = new ArenaResultReporter(); + resultAnimationHandler = new ArenaResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.RoomBattle: + case DataMgr.BattleType.RoomTwoPick: + case DataMgr.BattleType.TwoPickBackdraft: + _nextSceneSelector = new NullNextSceneSelector(this); + resultReporter = new RoomMatchResultReporter(); + resultAnimationHandler = new RoomMatchResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.Story: + _nextSceneSelector = new StoryNextSceneSelector(this); + resultReporter = new StoryResultReporter(); + resultAnimationHandler = new StoryResultAnimationHandler(battleCamera); + break; + case DataMgr.BattleType.Quest: + case DataMgr.BattleType.BossRushQuest: + case DataMgr.BattleType.SecretBossQuest: + _nextSceneSelector = new QuestNextSceneSelector(this); + resultReporter = new QuestResultReporter(); + resultAnimationHandler = new QuestSpecialResultAnimationHandler(battleCamera, GetComponent()); + break; + } + if (BattleManagerBase.GetIns().IsPuzzleMgr && !IsWin) + { + _nextSceneSelector = new NullNextSceneSelector(this); + } + } + + private void ResultSetupEnd() + { + _nextSceneSelector.Setup(IsWin, base.gameObject); + ClassCharObj.transform.localPosition = DefaultPosDict["ClassCharObj"] + Vector3.right * 1200f; + ResultTitle.transform.localPosition = DefaultPosDict["ResultTitle"] + Vector3.up * 500f; + ClassInfo.transform.localPosition = DefaultPosDict["ClassInfo"] + Vector3.left * 2000f; + ButtonGrid.transform.localPosition = DefaultPosDict["ButtonGrid"] + Vector3.down * 200f; + for (int i = 0; i < _missionLogList.Count; i++) + { + _missionLogList[i].gameObject.SetActive(value: false); + } + ClassCharObj.gameObject.SetActive(value: true); + ResultTitle.gameObject.SetActive(value: true); + ClassInfo.gameObject.SetActive(value: true); + ButtonGrid.gameObject.SetActive(value: true); + ArcaneIn.transform.localScale = Vector3.one * 0.01f; + ArcaneOut.transform.localScale = Vector3.one * 0.01f; + ArcaneIn.alpha = 0f; + ArcaneOut.alpha = 0f; + ClassExpAddLabel.alpha = 0f; + ResultInfo.labels[0].alpha = 0f; + ResultInfo.sprites[0].alpha = 0f; + ButtonGrid.repositionNow = true; + ClassExpNextTitle.text = Data.SystemText.Get("Battle_0205"); + Format format = Data.CurrentFormat; + if (GameMgr.GetIns().GetDataMgr().IsDipslayHighRankFormat()) + { + format = PlayerStaticData.HighRankFormat(); + } + if (format == Format.PreRotation) + { + format = Format.Rotation; + } + if (GameMgr.GetIns().IsWatchBattle) + { + resultReporter.Destroy(); + StartCoroutine(resultAnimationHandler.m_resultAnimationAgent.RunUI(this, _nextSceneSelector, IsWin)); + } + else + { + StartCoroutine(GetServerData()); + } + if (RankMatchBattleResultObject != null) + { + RankMatchBattleResultObject.ResultSetupEnd(format); + } + if (QuestBattleResultObject != null) + { + QuestBattleResultObject.ResultSetupEnd(format); + } + } + + public void SetBattlePassGauge(Action completeAction) + { + if (_battlePassResultPanel == null || !PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.BATTLE_PASS_SHOW_RESULT) || !resultReporter.IsDataExist) + { + completeAction(); + return; + } + JsonData finishResponseData = resultReporter.GetFinishResponseData(); + if (finishResponseData != null && finishResponseData["data"].Keys.Contains("battle_pass_gauge_info")) + { + BattlePassGaugeInfo battlePassGaugeInfo = new BattlePassGaugeInfo(finishResponseData["data"]["battle_pass_gauge_info"]); + if (battlePassGaugeInfo.IsMaxPoint && battlePassGaugeInfo.IsBeforeMaxPoint) + { + completeAction(); + return; + } + GreySpriteBGVisible = true; + BattlePassResultPanel component = UnityEngine.Object.Instantiate(_battlePassResultPanel, _acncorNoneRoot).GetComponent(); + component.Initialize(battlePassGaugeInfo); + component.SetPointupAnimation(completeAction); + } + else + { + completeAction(); + } + } + + public void CreateMissionList() + { + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(systemText.Get("Mission_0003")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.ScrollView.transform.DestroyChildren(); + dialogBase.ScrollView.panel.leftAnchor.absolute = 24; + dialogBase.ScrollView.panel.rightAnchor.absolute = -24; + GameObject gameObject = new GameObject("table"); + dialogBase.ScrollView.contentPivot = UIWidget.Pivot.Top; + dialogBase.AttachToScrollView(gameObject.transform); + UITable uITable = gameObject.AddComponent(); + uITable.columns = 1; + uITable.keepWithinPanel = true; + uITable.cellAlignment = UIWidget.Pivot.Center; + uITable.pivot = UIWidget.Pivot.Center; + ResourceHandler resourceHandler = base.gameObject.AddMissingComponent(); + int count = Data.MissionInfo.data.user_mission_list.Count; + for (int i = 0; i < Data.MissionInfo.data.user_mission_list.Count; i++) + { + UserMission mission = Data.MissionInfo.data.user_mission_list[i]; + GameObject obj = UnityEngine.Object.Instantiate(m_MissionBase); + obj.transform.parent = uITable.transform; + obj.transform.localPosition = Vector3.zero; + obj.transform.localScale = Vector3.one; + obj.SetActive(value: true); + obj.GetComponent().width = 800; + obj.GetComponent().SetMission(mission, resourceHandler, canChangeMissions: false, i != count - 1, displayChange: false); + } + _missionDialog = dialogBase; + StartCoroutine(ResetMissionScrollPos(dialogBase.ScrollView)); + UIManager.GetInstance().closeInSceneCenterLoading(); + } + + private IEnumerator ResetMissionScrollPos(UIScrollView scroll) + { + yield return new WaitForSeconds(0.1f); + scroll.ResetPosition(); + } + + private IEnumerator GetServerData() + { + LocalLog.AccumulateLastTraceLog("GetServerData "); + LocalLog.SendClientInfoTraceLog(delegate + { + resultReporter.Report(IsWin); + }); + while (!resultReporter.IsEnd) + { + yield return null; + } + LocalLog.AccumulateLastTraceLog("GetServerData ReporterEnd"); + if (!resultReporter.IsDataExist) + { + Toolbox.NetworkManager.NetworkUI.OpenGoToTitleErrorPopUp(Data.SystemText.Get("ErrorHeader_3502"), Data.SystemText.Get("Error_3502"), ""); + yield break; + } + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (RankMatchBattleResultObject != null) + { + RankMatchBattleResultObject.GetServerData(); + } + if (QuestBattleResultObject != null) + { + QuestBattleResultObject.GetServerData(resultReporter); + } + if (dataMgr.IsColosseumBattleType()) + { + SetBackGroundNeedBattlePoint(needBattlePoint: false); + } + GameMgr.GetIns().GetDataMgr().CacheSingleRecovryData(); + RecoveryRecordManagerBase.DeleteRecoveryFile(); + AddClassExp = resultReporter.ClassExp; + resultReporter.Destroy(); + if (!_isResultTutorial) + { + if (_isUsingSpecialDeck) + { + _selectedClassId = ((_usingSpecialDeckClassId != 0) ? _usingSpecialDeckClassId : dataMgr.GetPlayerClassId()); + } + else + { + _selectedClassId = dataMgr.GetPlayerClassId(); + } + _beforeClassExp = dataMgr.GetClassPrm(_selectedClassId).GetClassCharaExp(); + } + _classExpList.Clear(); + for (int num = 0; num < Data.Load.data._classCharaExpList.Count; num++) + { + _classExpList.Add(Data.Load.data._classCharaExpList[num].necessary_exp); + } + _classLvMax = _classExpList.Count; + SetClassExp(0, isLvUpCheck: false); + _classLvPrev = _classLv; + StartCoroutine(resultAnimationHandler.m_resultAnimationAgent.RunUI(this, _nextSceneSelector, IsWin)); + } + + public void PrepareAchievementLog() + { + if (GameMgr.GetIns().IsWatchBattle) + { + return; + } + List list = new List(); + JsonData finishResponseData = resultReporter.GetFinishResponseData(); + if (finishResponseData != null && finishResponseData["data"].Keys.Contains("maintenance_time")) + { + DateTime dateTime = DateTime.Parse(finishResponseData["data"]["maintenance_time"].ToString()); + list.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.MaintenanceOnResult, Data.SystemText.Get("System_0044", ConvertTime.ToLocal(dateTime)))); + } + if (finishResponseData != null && finishResponseData["data"].Keys.Contains("gathering_notification")) + { + string valueOrDefault = finishResponseData["data"]["gathering_notification"].GetValueOrDefault("matching_established_message", string.Empty); + if (!string.IsNullOrEmpty(valueOrDefault)) + { + list.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.GatheringMatching, valueOrDefault)); + } + } + for (int i = 0; i < resultReporter.UserMission.Count; i++) + { + list.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.Result, resultReporter.UserMission[i].achieved_message)); + } + for (int j = 0; j < resultReporter.UserAchievement.Count; j++) + { + list.Add(new NotificatonAnimation.Param(NotificatonAnimation.Param.Type.Result, resultReporter.UserAchievement[j].achieved_message)); + } + StartCoroutine(ShowAchieveLog(list)); + } + + public void RewardCheck() + { + IsRewardWait = false; + } + + public void FinishResult() + { + this.OnResultFinish.Call(); + } + + public void SettingAddClassExpTextAnimation() + { + iTween.ValueTo(base.gameObject, iTween.Hash("from", 0, "to", AddClassExp, "time", 0.5f, "delay", 0.5f, "onstart", "StartClassExp", "onupdate", "UpdateClassExp", "oncomplete", "CompleteClassExp", "easetype", iTween.EaseType.easeOutQuad)); + bool flag = AddClassExp >= 0; + ClassExpAddLabel.text = (flag ? "+" : string.Empty) + AddClassExp; + ClassExpAddLabel.color = (flag ? PLUS_START_COLOR : MINUS_START_COLOR); + TweenAlpha.Begin(ClassExpAddLabel.gameObject, 0.3f, 1f); + iTween.MoveFrom(ClassExpAddLabel.gameObject, iTween.Hash("y", ClassExpAddLabel.transform.localPosition.y - 10f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + } + + private void StartClassExp() + { + ClassGaugeEfc.gameObject.SetActive(value: true); + ClassGaugeEfc.Play(); + } + + private void UpdateClassExp(int num) + { + SetClassExp(num, isLvUpCheck: true); + } + + public void SetClassExp(int num, bool isLvUpCheck) + { + _classExp = _beforeClassExp + num; + _classLv = GetClassLv(_classExp); + _nowClassExp = GetClassExpNow(_classExp); + _nextClassExp = Mathf.Max(0, _classExpList[_classLv - 1] - _nowClassExp); + ClassLvLabel.text = _classLv.ToString(); + ClassExpNextLabel.text = _nextClassExp.ToString(); + if (AddClassExp >= 0) + { + ClassExpAddLabel.text = ((AddClassExp - num >= 0) ? "+" : "") + (AddClassExp - num); + } + else + { + ClassExpAddLabel.text = (AddClassExp - num).ToString(); + } + ClassGaugeBar.Value = (((float)_classExpList[_classLv - 1] >= 0f) ? Mathf.Min((float)_nowClassExp / (float)_classExpList[_classLv - 1], 1f) : 1f); + if (isLvUpCheck && _classLv > _classLvPrev) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RESULT_LEVELUP); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_LVUP_1, ClassLvImg.transform.position); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_GAUGE_1, ClassGaugeBar.GetTransformGaugeStartEdge().position); + _classLvPrev = _classLv; + } + } + + private void CompleteClassExp() + { + ClassGaugeEfc.Stop(); + TweenAlpha.Begin(ClassExpAddLabel.gameObject, 0.5f, 0f).delay = 0.5f; + SetClassLvAndExp(); + } + + public void SetClassLvAndExp() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + switch (dataMgr.m_BattleType) + { + case DataMgr.BattleType.FreeBattle: + _classLv = Data.FreeMatchFinish.data.class_chara_level; + _classExp = Data.FreeMatchFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.RankBattle: + _classLv = Data.RankMatchFinish.data.class_chara_level; + _classExp = Data.RankMatchFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.Story: + _classLv = Data.StoryFinish.data.class_chara_level; + _classExp = Data.StoryFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.Practice: + _classLv = Data.PracticeFinish.data.class_chara_level; + _classExp = Data.PracticeFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.RoomBattle: + _classLv = Data.FreeMatchFinish.data.class_chara_level; + _classExp = Data.FreeMatchFinish.data.class_chara_experience; + break; + case DataMgr.BattleType.Quest: + case DataMgr.BattleType.BossRushQuest: + case DataMgr.BattleType.SecretBossQuest: + _classLv = Data.QuestFinish.data.class_chara_level; + _classExp = Data.QuestFinish.data.class_chara_experience; + break; + } + ClassCharaPrm classPrm = dataMgr.GetClassPrm(_selectedClassId); + classPrm.SetClassCharaLv(_classLv); + classPrm.SetClassCharaExp(_classExp); + } + + private int GetClassLv(int num) + { + int num2 = 1; + int num3 = 0; + for (int i = 0; i < _classExpList.Count; i++) + { + num3 += _classExpList[i]; + if (num < num3) + { + break; + } + num2++; + } + return Mathf.Min(num2, _classLvMax); + } + + private int GetClassExpNow(int num) + { + int num2 = num; + for (int i = 0; i < _classExpList.Count && num2 >= _classExpList[i]; i++) + { + num2 -= _classExpList[i]; + } + return num2; + } + + private IEnumerator ShowAchieveLog(List paramList) + { + if (_notificationAnimation != null) + { + UnityEngine.Object.Destroy(_notificationAnimation.gameObject); + _notificationAnimation = null; + } + _notificationAnimation = NGUITools.AddChild(_notificationAnimationParent, _notificationAnimationPrefab.gameObject).GetComponent(); + yield return StartCoroutine(_notificationAnimation.Exec(paramList)); + } + + public void SetSpecialResultTypeText(string text) + { + _resultTypeMsg = text; + ResultMsgWindowFlag = true; + } + + public void SetBattleFinishConsistency() + { + IsDraw = true; + ResultMsgReportBtnFlag = true; + } + + public IEnumerator ShowSpecialResultInfo() + { + ResultInfo.labels[0].text = _resultTypeMsg; + ResultInfo.labels[0].alpha = 0f; + ResultInfo.sprites[0].alpha = 0f; + ResultInfo.labels[0].transform.localPosition = Vector3.right * 200f; + ResultInfo.sprites[0].transform.localScale = new Vector3(0.01f, 0.1f, 1f); + TweenAlpha.Begin(ResultInfo.sprites[0].gameObject, 0.2f, 1f); + iTween.ScaleTo(ResultInfo.sprites[0].gameObject, iTween.Hash("scale", new Vector3(1f, 0.1f, 1f), "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + iTween.ScaleTo(ResultInfo.sprites[0].gameObject, iTween.Hash("scale", Vector3.one, "time", 0.5f, "delay", 0.2f, "islocal", true, "easetype", iTween.EaseType.easeOutBack)); + yield return new WaitForSeconds(0.5f); + TweenAlpha.Begin(ResultInfo.labels[0].gameObject, 0.2f, 1f); + iTween.MoveTo(ResultInfo.labels[0].gameObject, iTween.Hash("position", Vector3.zero, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + yield return new WaitForSeconds(2f); + TweenAlpha.Begin(ResultInfo.sprites[0].gameObject, 0.1f, 0f).delay = 0.2f; + TweenAlpha.Begin(ResultInfo.labels[0].gameObject, 0.1f, 0f).delay = 0.2f; + iTween.ScaleTo(ResultInfo.sprites[0].gameObject, iTween.Hash("scale", new Vector3(1f, 0.1f, 1f), "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + iTween.MoveTo(ResultInfo.labels[0].gameObject, iTween.Hash("position", Vector3.left * 200f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + } + + public void Recovery() + { + ClassInfo.SetActive(value: false); + ClassInfo.SetActive(value: true); + } + + public IEnumerator RunMatch() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_RANK_UP_MACH_BEGIN); + TweenAlpha.Begin(TitleMatch.gameObject, 0.2f, 1f); + TitleMatch.transform.localScale = Vector3.one * 10f; + iTween.ScaleTo(TitleMatch.gameObject, iTween.Hash("scale", Vector3.one * 0.8f, "time", 0.2f, "easetype", iTween.EaseType.easeInQuad)); + yield return new WaitForSeconds(0.2f); + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_RESULT_MATCH_1, Vector3.back); + TitleMatch.transform.localScale = Vector3.one; + iTween.ScaleTo(TitleMatch.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 3f, "easetype", iTween.EaseType.linear)); + yield return new WaitForSeconds(2.5f); + TweenAlpha.Begin(TitleMatch.gameObject, 0.3f, 0f); + iTween.ScaleTo(TitleMatch.gameObject, iTween.Hash("scale", Vector3.one * 10f, "time", 0.3f, "easetype", iTween.EaseType.easeInExpo)); + yield return new WaitForSeconds(0.3f); + } + + private void Update() + { + if (_missionDialog != null) + { + MenuDialogUpdate(_missionDialog); + } + } + + private void MenuDialogUpdate(DialogBase dialog) + { + InputMgr inputMgr = GameMgr.GetIns().GetInputMgr(); + if (inputMgr.IsKeyboardCancel()) + { + _missionDialog.CloseWithoutSelect(); + _menuDialogSelect = MenuDialogSelect.None; + } + bool flag = false; + if (inputMgr.IsKeyboardLeftArrow() || inputMgr.IsKeyboardRightArrow()) + { + _menuDialogSelect = ((_menuDialogSelect == MenuDialogSelect.Button1) ? MenuDialogSelect.ButtonClose : MenuDialogSelect.Button1); + flag = true; + } + if (flag) + { + dialog.KeyboardSelectButton(DialogBase.KeyboardDialogSelect.Button1, _menuDialogSelect == MenuDialogSelect.Button1); + dialog.KeyboardSelectButton(DialogBase.KeyboardDialogSelect.CloseButton, _menuDialogSelect == MenuDialogSelect.ButtonClose); + } + if (inputMgr.IsKeyboardEnter() && _menuDialogSelect != MenuDialogSelect.None) + { + _missionDialog.CloseWithoutSelect(); + _menuDialogSelect = MenuDialogSelect.None; + } + } + + public void SetBackGroundNeedBattlePoint(bool needBattlePoint) + { + _backGroundWithRank.gameObject.SetActive(needBattlePoint); + _backGroundNotNeedRank.gameObject.SetActive(!needBattlePoint); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleStartControl.cs b/SVSim.BattleEngine/Engine/BattleStartControl.cs new file mode 100644 index 0000000..817926b --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleStartControl.cs @@ -0,0 +1,584 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.View.Vfx; + +public class BattleStartControl : MonoBehaviour +{ + [SerializeField] + private UIPanel MainPanel; + + [SerializeField] + private UISprite BgBlack; + + [SerializeField] + private UITexture CharP; + + [SerializeField] + private UITexture CharE; + + [SerializeField] + private ClassInfoParts ClassInfoP; + + [SerializeField] + private ClassInfoParts ClassInfoE; + + [SerializeField] + private UILabel ClassNameP; + + [SerializeField] + private UILabel ClassNameE; + + [SerializeField] + private UILabel CharaNameP; + + [SerializeField] + private UILabel CharaNameE; + + [SerializeField] + private ClassInfoParts _classInfoWithSubClassP; + + [SerializeField] + private ClassInfoParts _classInfoWithSubClassE; + + [SerializeField] + private FlexibleGrid _subClassGridP; + + [SerializeField] + private FlexibleGrid _subClassGridE; + + [SerializeField] + private MyRotationParts _myRotationInfoP; + + [SerializeField] + private MyRotationParts _myRotationInfoE; + + [SerializeField] + private NguiObjs UserPanelP; + + [SerializeField] + private NguiObjs UserPanelE; + + [SerializeField] + private UISprite VsArcane; + + [SerializeField] + private UISprite VsLine; + + [SerializeField] + private UISprite VsTitle; + + [SerializeField] + private UISprite CardP; + + [SerializeField] + private UISprite CardE; + + [SerializeField] + private UILabel CardLabelP; + + [SerializeField] + private UILabel CardLabelE; + + [SerializeField] + private UILabel TurnLabel; + + private IDictionary DefaultPosDict = new Dictionary(); + + private string CardFrontSpriteName = "battle_card_marigan_00"; + + private string CardBackSpriteName = "battle_card_marigan_03"; + + public bool IsReady { get; private set; } + + public void SetUp(SBattleLoad battleLoad) + { + if (GameMgr.GetIns().IsNetworkBattle && !BattleManagerBase.GetIns().IsRecovery && !GameMgr.GetIns().IsWatchBattle && !GameMgr.GetIns().IsReplayBattle) + { + StartCoroutine(CheckAbleToInitialize(battleLoad)); + } + else + { + Initialize(); + } + } + + private IEnumerator CheckAbleToInitialize(SBattleLoad battleLoad) + { + while (GameMgr.GetIns().GetNetworkUserInfoData().SelfBattleStartInfo == null || GameMgr.GetIns().GetNetworkUserInfoData().OppoBattleStartInfo == null) + { + yield return null; + } + battleLoad.LoadOpponentAssets(delegate + { + Initialize(); + }); + } + + private void Initialize() + { + MainPanel.alpha = 0f; + InitBattleStartControl(); + base.gameObject.SetActive(value: false); + IsReady = true; + } + + private void InitBattleStartControl() + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + NetworkUserInfoData networkUserInfoData = GameMgr.GetIns().GetNetworkUserInfoData(); + PuzzleQuestData puzzleQuestData = null; + bool isPuzzleMgr = BattleManagerBase.GetIns().IsPuzzleMgr; + if (isPuzzleMgr) + { + puzzleQuestData = Data.Master.PuzzleQuestDataList.First((PuzzleQuestData data) => data.Id == GameMgr.GetIns().GetDataMgr().PuzzleQuestId); + } + if (GameMgr.GetIns().IsWatchBattle) + { + DegreeHelper.InitializeDegree(UserPanelP.textures[0], networkUserInfoData.GetSelfDegreeId(), DegreeHelper.DegreeType.MIDDLE); + } + else if (isPuzzleMgr) + { + DegreeHelper.InitializeDegree(UserPanelP.textures[0], puzzleQuestData.PlayerDegreeId, DegreeHelper.DegreeType.MIDDLE); + } + else + { + DegreeHelper.InitializeDegree(UserPanelP.textures[0], PlayerStaticData.UserDegreeID, DegreeHelper.DegreeType.MIDDLE); + } + int num = (GameMgr.GetIns().IsNetworkBattle ? networkUserInfoData.GetOpponentDegreeId() : (isPuzzleMgr ? puzzleQuestData.EnemyDegreeId : ((dataMgr.m_BattleType == DataMgr.BattleType.Quest) ? dataMgr.QuestBattleData.DegreeId : ((dataMgr.m_BattleType != DataMgr.BattleType.BossRushQuest && dataMgr.m_BattleType != DataMgr.BattleType.SecretBossQuest) ? dataMgr.PracticeDifficultyDegreeId : dataMgr.BossRushBattleData.DegreeId)))); + if (GameMgr.GetIns().IsNetworkBattle || (dataMgr.m_BattleType == DataMgr.BattleType.Practice && dataMgr.PracticeDifficultyDegreeId != -1) || (dataMgr.IsQuestBattleType() && num != -1)) + { + DegreeHelper.InitializeDegree(UserPanelE.textures[0], num, DegreeHelper.DegreeType.MIDDLE); + } + if (GameMgr.GetIns().IsWatchBattle) + { + UserPanelP.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (isPuzzleMgr) + { + UserPanelP.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(puzzleQuestData.PlayerEmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + PlayerStaticData.AttachUserEmblemTexture(UserPanelP.textures[1], PlayerStaticData.EmblemTexSize.M); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentEmblemId().ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (isPuzzleMgr) + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(puzzleQuestData.EnemyEmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.Quest) + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(dataMgr.QuestBattleData.EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else if (dataMgr.m_BattleType == DataMgr.BattleType.BossRushQuest || dataMgr.m_BattleType == DataMgr.BattleType.SecretBossQuest) + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(dataMgr.BossRushBattleData.EmblemId.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + else + { + UserPanelE.textures[1].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(100000000.ToString(), ResourcesManager.AssetLoadPathType.Emblem_M, isfetch: true)); + } + if (GameMgr.GetIns().IsWatchBattle) + { + UIUtil.SetCountryTexture(UserPanelP.textures[2], networkUserInfoData.GetSelfCountryCode()); + } + else + { + bool flag = !string.IsNullOrEmpty(PlayerStaticData.UserCountryCode); + UserPanelP.textures[2].gameObject.SetActive(flag); + if (flag) + { + PlayerStaticData.AttachUserCountryTexture(UserPanelP.textures[2], PlayerStaticData.CountryTexSize.M); + } + else + { + UserPanelP.textures[2].mainTexture = null; + } + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UIUtil.SetCountryTexture(UserPanelE.textures[2], networkUserInfoData.GetOpponentCountryCode()); + } + else + { + UserPanelE.textures[2].gameObject.SetActive(value: false); + UserPanelE.textures[2].mainTexture = null; + } + if (GameMgr.GetIns().IsWatchBattle) + { + UserPanelP.textures[3].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetSelfRank().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + else if (dataMgr.IsDipslayHighRankFormat()) + { + PlayerStaticData.LoadUserRankTexture(PlayerStaticData.HighRankFormat()); + PlayerStaticData.AttachUserRankTexture(UserPanelP.textures[3], PlayerStaticData.RankTexSize.S); + } + else + { + UserPanelP.textures[3].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(PlayerStaticData.UserRankCurrentFormat().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.textures[3].mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(networkUserInfoData.GetOpponentRank().ToString("00"), ResourcesManager.AssetLoadPathType.RankIcon_S, isfetch: true)) as Texture; + } + if (GameMgr.GetIns().IsWatchBattle) + { + UserPanelP.labels[0].text = networkUserInfoData.GetSelfName(); + } + else + { + UserPanelP.labels[0].text = PlayerStaticData.UserName.ToString(); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + UserPanelE.labels[0].text = VideoHostingUtil.GetUserNameHidden(networkUserInfoData.GetOpponentName().ToString()); + } + else + { + UserPanelE.labels[0].text = dataMgr.GetEnemyCharaData().chara_name; + } + Format inFormat = Data.CurrentFormat; + if (dataMgr.IsDipslayHighRankFormat()) + { + inFormat = PlayerStaticData.HighRankFormat(); + } + bool flag2 = dataMgr.m_BattleType == DataMgr.BattleType.RankBattle; + UILabel uILabel = UserPanelP.labels[1]; + UILabel uILabel2 = UserPanelE.labels[1]; + uILabel.gameObject.SetActive(flag2); + uILabel2.gameObject.SetActive(flag2); + if (flag2) + { + if (PlayerStaticData.IsMasterRank(inFormat)) + { + uILabel.text = PlayerStaticData.UserMasterPoint(inFormat).ToString(); + } + else + { + uILabel.text = PlayerStaticData.UserBattlePoint(inFormat).ToString(); + } + if (GameMgr.GetIns().IsNetworkBattle) + { + if (networkUserInfoData.GetOpponentIsMasterRank()) + { + uILabel2.text = networkUserInfoData.GetOpponentMasterPoint().ToString(); + } + else + { + uILabel2.text = networkUserInfoData.GetOpponentBattlePoint().ToString(); + } + } + else + { + uILabel2.text = "0"; + } + } + bool activeOfficialUserIconSprite = (GameMgr.GetIns().IsWatchBattle ? networkUserInfoData.GetSelfIsOfficialUser() : PlayerStaticData.IsOfficialUserDisplay); + bool activeOfficialUserIconSprite2 = GameMgr.GetIns().IsNetworkBattle && networkUserInfoData.GetOpponentIsOfficialUser(); + UserPanelP.gameObject.GetComponent().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite); + UserPanelE.gameObject.GetComponent().SetActiveOfficialUserIconSprite(activeOfficialUserIconSprite2); + DefaultPosDict["UserPanelP"] = UserPanelP.transform.localPosition; + DefaultPosDict["UserPanelE"] = UserPanelE.transform.localPosition; + DefaultPosDict["CharP"] = CharP.transform.localPosition; + DefaultPosDict["CharE"] = CharE.transform.localPosition; + DefaultPosDict["ClassNameP"] = ClassNameP.transform.localPosition; + DefaultPosDict["ClassNameE"] = ClassNameE.transform.localPosition; + DefaultPosDict["CharaNameP"] = CharaNameP.transform.localPosition; + DefaultPosDict["CharaNameE"] = CharaNameE.transform.localPosition; + DefaultPosDict["CardP"] = CardP.transform.localPosition; + DefaultPosDict["CardE"] = CardE.transform.localPosition; + DefaultPosDict["TurnLabel"] = TurnLabel.transform.localPosition; + } + + public VfxBase CreateStartVfx(float waitTime) + { + if (BattleManagerBase.GetIns().IsRecovery) + { + return InstantVfx.Create(delegate + { + base.gameObject.SetActive(value: false); + }); + } + base.gameObject.SetActive(value: true); + float rot; + Vector3 p1; + Vector3 p2; + Vector3[] path; + return SequentialVfxPlayer.Create(InstantVfx.Create(delegate + { + int playerSkinId = GameMgr.GetIns().GetDataMgr().GetPlayerSkinId(); + Texture mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(playerSkinId.ToString("00"), ResourcesManager.AssetLoadPathType.ClassCharaBase, isfetch: true)) as Texture; + CharP.mainTexture = mainTexture; + CharP.material = null; + mainTexture = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(GameMgr.GetIns().GetDataMgr().GetEnemySkinId() + .ToString("00"), ResourcesManager.AssetLoadPathType.ClassCharaBase, isfetch: true)) as Texture; + CharE.mainTexture = mainTexture; + CharE.material = null; + NetworkUserInfoData networkUserInfoData = GameMgr.GetIns().GetNetworkUserInfoData(); + _myRotationInfoP.gameObject.SetActive(value: false); + if (GameMgr.GetIns().GetDataMgr().TryGetPlayerSubClassId(out var subClassId)) + { + SetClassInfoWithSubClass(GameMgr.GetIns().GetDataMgr().GetPlayerCharaData(), networkUserInfoData.GetSelfChaosId(), subClassId, ClassInfoP, _classInfoWithSubClassP, _subClassGridP); + } + else + { + if (GameMgr.GetIns().GetDataMgr().TryGetPlayerMyRotationInfo(out var myRotationInfo)) + { + _myRotationInfoP.gameObject.SetActive(value: true); + _myRotationInfoP.SetMyRotationInfo(myRotationInfo); + _myRotationInfoP.Reposition(); + } + ClassInfoP.InitByCharaPrm(GameMgr.GetIns().GetDataMgr().GetPlayerCharaData(), networkUserInfoData.GetSelfChaosId()); + _classInfoWithSubClassP.gameObject.SetActive(value: false); + } + _myRotationInfoE.gameObject.SetActive(value: false); + if (GameMgr.GetIns().GetDataMgr().TryGetEnemySubClassId(out var subClassId2)) + { + SetClassInfoWithSubClass(GameMgr.GetIns().GetDataMgr().GetEnemyCharaData(), networkUserInfoData.GetOpponentChaosId(), subClassId2, ClassInfoE, _classInfoWithSubClassE, _subClassGridE); + } + else + { + if (GameMgr.GetIns().GetDataMgr().TryGetEnemyMyRotationInfo(out var myRotationInfo2)) + { + _myRotationInfoE.gameObject.SetActive(value: true); + _myRotationInfoE.SetMyRotationInfo(myRotationInfo2); + _myRotationInfoE.Reposition(); + } + ClassInfoE.InitByCharaPrm(GameMgr.GetIns().GetDataMgr().GetEnemyCharaData(), networkUserInfoData.GetOpponentChaosId()); + _classInfoWithSubClassE.gameObject.SetActive(value: false); + } + UserPanelP.transform.localPosition = DefaultPosDict["UserPanelP"]; + UserPanelE.transform.localPosition = DefaultPosDict["UserPanelE"]; + CharP.transform.localPosition = DefaultPosDict["CharP"]; + CharE.transform.localPosition = DefaultPosDict["CharE"]; + ClassNameP.transform.localPosition = DefaultPosDict["ClassNameP"]; + ClassNameE.transform.localPosition = DefaultPosDict["ClassNameE"]; + CharaNameP.transform.localPosition = DefaultPosDict["CharaNameP"]; + CharaNameE.transform.localPosition = DefaultPosDict["CharaNameE"]; + CardP.transform.localPosition = DefaultPosDict["CardP"] + Vector3.down * 1000f; + CardE.transform.localPosition = DefaultPosDict["CardE"] + Vector3.down * 1000f; + TurnLabel.transform.localPosition = DefaultPosDict["TurnLabel"]; + BgBlack.alpha = 0f; + CharP.alpha = 0f; + CharE.alpha = 0f; + ClassNameP.alpha = 0f; + ClassNameE.alpha = 0f; + CharaNameP.alpha = 0f; + CharaNameE.alpha = 0f; + VsArcane.alpha = 0f; + VsLine.alpha = 0f; + VsTitle.alpha = 0f; + CardP.color = Color.white; + CardE.color = Color.white; + TurnLabel.alpha = 0f; + TweenAlpha.Begin(UserPanelP.gameObject, 0f, 0f); + TweenAlpha.Begin(UserPanelE.gameObject, 0f, 0f); + VsArcane.transform.localScale = Vector3.one; + CardLabelP.text = Data.SystemText.Get("Battle_0430"); + CardLabelE.text = Data.SystemText.Get("Battle_0431"); + MainPanel.alpha = 1f; + }), InstantVfx.Create(delegate + { + TweenAlpha.Begin(VsTitle.gameObject, 0.3f, 1f); + VsTitle.transform.localScale = Vector3.one * 10f; + iTween.ScaleTo(VsTitle.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInCubic)); + }), WaitVfx.Create(0.3f), InstantVfx.Create(delegate + { + TweenAlpha.Begin(BgBlack.gameObject, 0.3f, 0.5f); + EffectMgr.EffectType type = EffectMgr.EffectType.CMN_START_VS_1; + Se.TYPE setype = Se.TYPE.BATTLE_START_VS; + DataMgr.SpecialBattleSetting specialBattleSettingInfo = GameMgr.GetIns().GetDataMgr().SpecialBattleSettingInfo; + if (specialBattleSettingInfo != null && specialBattleSettingInfo.IsVsEffectOverride) + { + type = EffectMgr.EffectType.CMN_START_VS_ST2; + setype = Se.TYPE.BATTLE_START_VS_ST2; + } + GameMgr.GetIns().GetSoundMgr().PlaySe(setype); + GameMgr.GetIns().GetEffectMgr().Start(type, Vector3.zero); + TweenAlpha.Begin(VsLine.gameObject, 0.3f, 1f); + VsLine.transform.localScale = new Vector3(0.1f, 1f, 1f); + iTween.ScaleTo(VsLine.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + TweenAlpha.Begin(VsArcane.gameObject, 0.3f, 1f); + VsArcane.transform.localRotation = Quaternion.identity; + VsArcane.transform.localScale = Vector3.one * 0.1f; + iTween.ScaleTo(VsArcane.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInOutQuad)); + iTween.RotateAdd(VsArcane.gameObject, iTween.Hash("z", 360f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(CharP.gameObject, 0.3f, 1f); + TweenAlpha.Begin(CharE.gameObject, 0.3f, 1f); + CharP.transform.localPosition = DefaultPosDict["CharP"] + Vector3.right * 500f; + CharE.transform.localPosition = DefaultPosDict["CharE"] + Vector3.left * 500f; + if (GameMgr.GetIns().GetDataMgr().GetEnemyBattleSkillReverse() == 0) + { + CharE.uvRect = new Rect(0f, 0f, 1f, 1f); + } + iTween.MoveTo(CharP.gameObject, iTween.Hash("position", DefaultPosDict["CharP"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CharE.gameObject, iTween.Hash("position", DefaultPosDict["CharE"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(ClassNameP.gameObject, 0.3f, 1f).delay = 0.1f; + TweenAlpha.Begin(ClassNameE.gameObject, 0.3f, 1f).delay = 0.1f; + ClassNameP.transform.localPosition = DefaultPosDict["ClassNameP"] + Vector3.right * 200f; + ClassNameE.transform.localPosition = DefaultPosDict["ClassNameE"] + Vector3.left * 200f; + iTween.MoveTo(ClassNameP.gameObject, iTween.Hash("position", DefaultPosDict["ClassNameP"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(ClassNameE.gameObject, iTween.Hash("position", DefaultPosDict["ClassNameE"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(CharaNameP.gameObject, 0.3f, 1f).delay = 0.1f; + TweenAlpha.Begin(CharaNameE.gameObject, 0.3f, 1f).delay = 0.1f; + CharaNameP.transform.localPosition = DefaultPosDict["CharaNameP"] + Vector3.right * 200f; + CharaNameE.transform.localPosition = DefaultPosDict["CharaNameE"] + Vector3.left * 200f; + iTween.MoveTo(CharaNameP.gameObject, iTween.Hash("position", DefaultPosDict["CharaNameP"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CharaNameE.gameObject, iTween.Hash("position", DefaultPosDict["CharaNameE"], "time", 0.5f, "delay", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenAlpha.Begin(UserPanelP.gameObject, 0.3f, 1f); + TweenAlpha.Begin(UserPanelE.gameObject, 0.3f, 1f); + UserPanelP.transform.localPosition = DefaultPosDict["UserPanelP"] + Vector3.left * 500f; + UserPanelE.transform.localPosition = DefaultPosDict["UserPanelE"] + Vector3.right * 500f; + iTween.MoveTo(UserPanelP.gameObject, iTween.Hash("position", DefaultPosDict["UserPanelP"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(UserPanelE.gameObject, iTween.Hash("position", DefaultPosDict["UserPanelE"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + }), WaitVfx.Create(waitTime), InstantVfx.Create(delegate + { + TweenAlpha.Begin(BgBlack.gameObject, 0.3f, 0.9f); + TweenAlpha.Begin(VsTitle.gameObject, 0.3f, 0f); + iTween.ScaleTo(VsTitle.gameObject, iTween.Hash("scale", Vector3.one * 2f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(VsArcane.gameObject, 0.3f, 0f); + iTween.ScaleTo(VsArcane.gameObject, iTween.Hash("scale", Vector3.one * 5f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(ClassNameP.gameObject, 0.3f, 0f); + iTween.MoveTo(ClassNameP.gameObject, iTween.Hash("x", DefaultPosDict["ClassNameP"].x - 200f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(ClassNameE.gameObject, 0.3f, 0f); + iTween.MoveTo(ClassNameE.gameObject, iTween.Hash("x", DefaultPosDict["ClassNameE"].x + 200f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(CharaNameP.gameObject, 0.3f, 0f); + iTween.MoveTo(CharaNameP.gameObject, iTween.Hash("x", DefaultPosDict["CharaNameP"].x - 200f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(CharaNameE.gameObject, 0.3f, 0f); + iTween.MoveTo(CharaNameE.gameObject, iTween.Hash("x", DefaultPosDict["CharaNameE"].x + 200f, "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(UserPanelP.gameObject, 0.3f, 0f); + iTween.MoveTo(UserPanelP.gameObject, iTween.Hash("x", DefaultPosDict["UserPanelP"].x + 200f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + TweenAlpha.Begin(UserPanelE.gameObject, 0.3f, 0f); + iTween.MoveTo(UserPanelE.gameObject, iTween.Hash("x", DefaultPosDict["UserPanelE"].x - 200f, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + }), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.DRAW); + CardP.spriteName = CardFrontSpriteName; + CardE.spriteName = CardFrontSpriteName; + iTween.MoveTo(CardP.gameObject, iTween.Hash("position", DefaultPosDict["CardP"], "time", 0.4f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CardE.gameObject, iTween.Hash("position", DefaultPosDict["CardE"], "time", 0.4f, "delay", 0.05f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + }), WaitVfx.Create(0.5f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_1); + iTween.MoveTo(CardP.gameObject, iTween.Hash("position", Vector3.zero, "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeInOutCubic)); + iTween.MoveTo(CardE.gameObject, iTween.Hash("position", Vector3.zero, "time", 0.3f, "delay", 0.05f, "islocal", true, "easetype", iTween.EaseType.easeInOutCubic)); + iTween.ScaleTo(CardP.gameObject, iTween.Hash("scale", new Vector3(0.01f, 1.2f, 1f), "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + iTween.ScaleTo(CardE.gameObject, iTween.Hash("scale", new Vector3(0.01f, 1.2f, 1f), "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + CardP.depth = 0; + CardE.depth = 2; + CardLabelP.text = ""; + CardLabelE.text = ""; + CardP.spriteName = CardBackSpriteName; + CardE.spriteName = CardBackSpriteName; + iTween.ScaleTo(CardP.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + iTween.ScaleTo(CardE.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + }), WaitVfx.Create(0.2f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_2); + rot = Random.value * 30f - 15f; + p1 = (Vector3)MotionUtils.GetPositionByAngle(rot) * 400f; + p2 = (Vector3)MotionUtils.GetPositionByAngle(rot + 180f) * 100f; + path = MotionUtils.GetBezierCubic(Vector3.zero, p1, p2, Vector3.zero, 20); + iTween.MoveTo(CardP.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.linear)); + path = MotionUtils.GetBezierCubic(Vector3.zero, p1 * -1f, p2 * -1f, Vector3.zero, 20); + iTween.MoveTo(CardE.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.2f, "islocal", true, "easetype", iTween.EaseType.linear)); + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + CardP.depth = 2; + CardE.depth = 0; + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_2); + rot = Random.value * 30f - 15f + 180f; + p1 = (Vector3)MotionUtils.GetPositionByAngle(rot) * 320f; + p2 = (Vector3)MotionUtils.GetPositionByAngle(rot + 180f) * 80f; + path = MotionUtils.GetBezierCubic(Vector3.zero, p1, p2, Vector3.zero, 20); + iTween.MoveTo(CardP.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.16f, "islocal", true, "easetype", iTween.EaseType.linear)); + path = MotionUtils.GetBezierCubic(Vector3.zero, p1 * -1f, p2 * -1f, Vector3.zero, 20); + iTween.MoveTo(CardE.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.16f, "islocal", true, "easetype", iTween.EaseType.linear)); + }), WaitVfx.Create(0.08f), InstantVfx.Create(delegate + { + CardP.depth = 0; + CardE.depth = 2; + }), WaitVfx.Create(0.08f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_2); + rot = Random.value * 30f - 15f; + p1 = (Vector3)MotionUtils.GetPositionByAngle(rot) * 320f; + p2 = (Vector3)MotionUtils.GetPositionByAngle(rot + 180f) * 80f; + path = MotionUtils.GetBezierCubic(Vector3.zero, p1, p2, Vector3.zero, 20); + iTween.MoveTo(CardP.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.12f, "islocal", true, "easetype", iTween.EaseType.linear)); + path = MotionUtils.GetBezierCubic(Vector3.zero, p1 * -1f, p2 * -1f, Vector3.zero, 20); + iTween.MoveTo(CardE.gameObject, iTween.Hash("path", path, "movetopath", false, "time", 0.12f, "islocal", true, "easetype", iTween.EaseType.linear)); + }), WaitVfx.Create(0.06f), InstantVfx.Create(delegate + { + CardP.depth = 2; + CardE.depth = 0; + }), WaitVfx.Create(0.06f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_1); + iTween.MoveTo(CardP.gameObject, iTween.Hash("position", new Vector3(240f, -160f, 0f), "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(CardE.gameObject, iTween.Hash("position", new Vector3(-240f, 160f, 0f), "time", 0.3f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + }), WaitVfx.Create(0.3f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_MOVE_SINGLE_3); + iTween.ScaleTo(CardP.gameObject, iTween.Hash("scale", new Vector3(0.01f, 1.2f, 1f), "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + iTween.ScaleTo(CardE.gameObject, iTween.Hash("scale", new Vector3(0.01f, 1.2f, 1f), "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeInQuad)); + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_START_CARD_1, CardP.transform.position); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.DRAW_CARD_OPEN); + CardP.spriteName = CardFrontSpriteName; + CardE.spriteName = CardFrontSpriteName; + if (BattleManagerBase.GetIns().IsFirst) + { + CardLabelP.text = Data.SystemText.Get("Battle_0430"); + CardLabelE.text = Data.SystemText.Get("Battle_0431"); + TurnLabel.text = Data.SystemText.Get("Battle_0432"); + } + else + { + CardLabelP.text = Data.SystemText.Get("Battle_0431"); + CardLabelE.text = Data.SystemText.Get("Battle_0430"); + TurnLabel.text = Data.SystemText.Get("Battle_0433"); + } + TweenAlpha.Begin(TurnLabel.gameObject, 0.3f, 1f); + TurnLabel.transform.localPosition = DefaultPosDict["TurnLabel"] + Vector3.right * 50f; + iTween.MoveTo(TurnLabel.gameObject, iTween.Hash("position", DefaultPosDict["TurnLabel"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + TweenColor.Begin(CardE.gameObject, 0.1f, Color.gray); + TweenColor.Begin(CardLabelE.gameObject, 0.1f, Color.gray); + iTween.ScaleTo(CardP.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + iTween.ScaleTo(CardE.gameObject, iTween.Hash("scale", Vector3.one, "time", 0.1f, "islocal", true, "easetype", iTween.EaseType.easeOutQuad)); + }), WaitVfx.Create(1.5f), InstantVfx.Create(delegate + { + TweenAlpha.Begin(BgBlack.gameObject, 0.1f, 0f); + TweenAlpha.Begin(CardP.gameObject, 0.1f, 0f); + TweenAlpha.Begin(CardE.gameObject, 0.1f, 0f); + TweenAlpha.Begin(CharP.gameObject, 0.1f, 0f); + TweenAlpha.Begin(CharE.gameObject, 0.1f, 0f); + TweenAlpha.Begin(VsLine.gameObject, 0.1f, 0f); + TweenAlpha.Begin(TurnLabel.gameObject, 0.1f, 0f); + }), WaitVfx.Create(0.1f), InstantVfx.Create(delegate + { + base.gameObject.SetActive(value: false); + })); + } + + private static void SetClassInfoWithSubClass(ClassCharacterMasterData charaData, int chaosId, int subClassId, ClassInfoParts defaultClassInfoParts, ClassInfoParts classInfoParts, FlexibleGrid grid) + { + classInfoParts.gameObject.SetActive(value: true); + defaultClassInfoParts.ClassNameLabel.text = string.Empty; + classInfoParts.InitByCharaPrm(charaData, chaosId); + classInfoParts.SetSubClass((CardBasePrm.ClanType)subClassId); + UIUtil.AdjustClassInfoPartsSize(classInfoParts, grid, 375); + } +} diff --git a/SVSim.BattleEngine/Engine/BattleUIContainer.cs b/SVSim.BattleEngine/Engine/BattleUIContainer.cs new file mode 100644 index 0000000..cc72aca --- /dev/null +++ b/SVSim.BattleEngine/Engine/BattleUIContainer.cs @@ -0,0 +1,220 @@ +using System; +using UnityEngine; +using Wizard; + +public class BattleUIContainer : MonoBehaviour +{ + [SerializeField] + public BattleButtonControl ButtonControl; + + [SerializeField] + private WizardUIButton BattleMenuBtn; + + [SerializeField] + private UIButton TurnEndBtn; + + [SerializeField] + public Transform EnemyChoiceBraveBtn; + + [SerializeField] + private GameObject _battery; + + private const float LONG_PRESS_TIME = 0.2f; + + private float? _predictionWaitTime; + + public Action ShowPrediction; + + private bool _enableMenuRequest; + + private InputMgr _inputMgr; + + public bool PlayerCardPlaying; + + private bool _forceDisableMenu; + + public GameObject Battery => _battery; + + private void Start() + { + BattleMenuBtn.onPress.Clear(); + BattleMenuBtn.onPress.Add(new EventDelegate(delegate + { + ButtonControl.OnPressMenuBtn(); + })); + if (!GameMgr.GetIns().IsWatchBattle) + { + TurnEndBtn.onClick.Clear(); + TurnEndBtn.onClick.Add(new EventDelegate(delegate + { + ButtonControl.OnPressTurnEnd(); + })); + } + _predictionWaitTime = null; + UIEventListener.Get(TurnEndBtn.gameObject).onPress = delegate(GameObject obj, bool isPress) + { + if (isPress) + { + _predictionWaitTime = Time.realtimeSinceStartup; + } + else + { + _predictionWaitTime = null; + if (ShowPrediction != null) + { + ShowPrediction(obj: false); + } + } + }; + UIEventListener.Get(TurnEndBtn.gameObject).onHover = delegate(GameObject obj, bool isHover) + { + if (BattleManagerBase.UseCustomMouse && UIManager.GetInstance().ApplicationHasFocus) + { + if (isHover) + { + _predictionWaitTime = Time.realtimeSinceStartup; + } + else + { + _predictionWaitTime = null; + if (ShowPrediction != null) + { + ShowPrediction(isHover); + } + } + } + }; + UIEventListener.Get(TurnEndBtn.gameObject).onDragOut = delegate + { + _predictionWaitTime = null; + if (ShowPrediction != null) + { + ShowPrediction(obj: false); + } + }; + _inputMgr = GameMgr.GetIns().GetInputMgr(); + } + + public void EnableMenu() + { + if (!PlayerCardPlaying && !_forceDisableMenu) + { + BattleMenuBtn.isEnabled = true; + SetEnableReset(isEnable: true); + SetEnableHint(isEnable: true); + } + } + + public void RequestEnableMenuWhenTouchable() + { + _enableMenuRequest = true; + } + + private void TryEnableMenu() + { + if (BattleManagerBase.GetIns().GetBattlePlayer(isPlayer: true).BattleView.IsTouchable()) + { + EnableMenu(); + _enableMenuRequest = false; + } + } + + public void ForceEnableMenu() + { + _forceDisableMenu = false; + EnableMenu(); + } + + public void DisableMenu(bool isForceDisable = false) + { + if (isForceDisable || (!BattleManagerBase.GetIns().IsRecovery && !GameMgr.GetIns().IsReplayBattle && !GameMgr.GetIns().IsWatchBattle)) + { + BattleMenuBtn.isEnabled = false; + SetEnableReset(isEnable: false); + SetEnableHint(isEnable: false); + } + } + + public void ForceDisableMenu() + { + _forceDisableMenu = true; + _enableMenuRequest = false; + DisableMenu(); + } + + public void SetEnableReset(bool isEnable) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + if (ins is PuzzleBattleManager) + { + (ins as PuzzleBattleManager).ResetButton.SetState((!isEnable) ? UIButtonColor.State.Disabled : UIButtonColor.State.Normal, immediate: false); + } + } + + public void SetEnableHint(bool isEnable) + { + BattleManagerBase ins = BattleManagerBase.GetIns(); + if (ins is PuzzleBattleManager) + { + (ins as PuzzleBattleManager).HintButton.isEnabled = isEnable; + } + } + + public bool IsEnableMenu() + { + return BattleMenuBtn.isEnabled; + } + + private void Update() + { + UIManager instance = UIManager.GetInstance(); + GameMgr ins = GameMgr.GetIns(); + BattleManagerBase ins2 = BattleManagerBase.GetIns(); + if (_enableMenuRequest) + { + if (BattleMenuBtn.isEnabled) + { + _enableMenuRequest = false; + } + else + { + TryEnableMenu(); + } + } + if (!Input.GetMouseButton(0) && instance != null && instance.IsCurrentScene(UIManager.ViewScene.Battle) && !instance.isOpenLoading() && !instance.isFading() && ins.GetInputMgr().isBackKeyEnable && !BattleManagerBase.IsTutorial) + { + if (BattleMenuBtn.gameObject.activeInHierarchy && BattleMenuBtn.isActiveAndEnabled && !instance.isOpenDialog()) + { + if (Input.GetKeyDown(KeyCode.Escape) && IsEnableMenu()) + { + ButtonControl.OnPressMenuBtn(); + } + if (BattleManagerBase.UseKeyboardTurnEndSpaceShortcut && _inputMgr.IsKeyboardSpace() && ins2.BattlePlayer.PlayerBattleView.TurnEndButtonUI.GameObject.activeInHierarchy && ins2.BattlePlayer.PlayerBattleView.TurnEndButtonUI.GetEnableLabel && ins2.BattlePlayer.IsSelfTurn && _inputMgr.KeyboardEnableControlSpace) + { + ButtonControl.OnPressTurnEnd(); + } + } + else if (instance.isOpenDialog() && !ButtonControl.IsSettingMenuOpen && !ButtonControl.IsRetireMenuOpen && !ButtonControl.IsQuestMissionOpen && Input.GetKeyDown(KeyCode.Escape)) + { + ins2.BattlePlayer.PlayerBattleView.IsMenuCloseEscape = true; + ButtonControl.HideBattleMenu(); + } + } + if (TurnEndBtn.state == UIButtonColor.State.Pressed || BattleManagerBase.UseCustomMouse) + { + if (ShowPrediction != null && _predictionWaitTime.HasValue && _predictionWaitTime.Value + 0.2f < Time.realtimeSinceStartup) + { + ShowPrediction(obj: true); + _predictionWaitTime = null; + } + } + else + { + _predictionWaitTime = null; + } + if (ins.IsWatchBattle && ins2.IsBattleEnd) + { + ButtonControl.HideAllMenu(isWithoutSE: true); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Bgm.cs b/SVSim.BattleEngine/Engine/Bgm.cs new file mode 100644 index 0000000..8c6f484 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Bgm.cs @@ -0,0 +1,219 @@ +using System; +using System.Collections.Generic; +using CriWare; +using Cute; +using Wizard; + +public class Bgm +{ + public enum BGM_TYPE + { + NONE, + TITLE, + TITLE_SPECIAL_1, + TITLE_SPECIAL_2, + HOME, + BATTLE_STANDBY, + BATTLE, + SYS_WIN_LOOP, + SYS_LOSE_LOOP, + COLOSSEUM_FINAL, + GRANDPRIX_SPECIAL, + GRANDPRIX_SPECIAL_FINAL, + SEALED, + QUEST, + COMPETITION_LOBBY, + BINGO, + MAX + } + + private class BgmInfo + { + public string CueName { get; private set; } + + public string CueSheet { get; private set; } + + public BgmInfo(string cueName, string cueSheet) + { + CueName = cueName; + CueSheet = cueSheet; + } + } + + private const string CATEGORY_NAME = "BGM"; + + private Dictionary m_AudioData; + + private string m_PlayBgmCueName; + + private int m_CurrentBgmIdx; + + private int m_MaxBgmCount; + + private float m_volume; + + private bool m_isMuted; + + public Bgm() + { + m_AudioData = new Dictionary(); + m_PlayBgmCueName = null; + m_CurrentBgmIdx = 0; + m_MaxBgmCount = Toolbox.AudioManager.GetBgmMaxCount(); + SetVolume(PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.BGM_VOLUME)); + Mute(PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.SOUND_MUTE)); + } + + public void AddList(BGM_TYPE BgmType, string cueName, string cueSheet = null) + { + if (!m_AudioData.ContainsKey(BgmType)) + { + m_AudioData.Add(BgmType, new BgmInfo(cueName, (cueSheet == null) ? cueName : cueSheet)); + } + } + + public void RemoveList(BGM_TYPE BgmType) + { + if (m_AudioData.ContainsKey(BgmType)) + { + m_AudioData.Remove(BgmType); + } + } + + public virtual void Play(BGM_TYPE BgmType, float FadeTime = 0f, long startTime = 0L) + { + if (BgmType != BGM_TYPE.NONE) + { + BgmInfo bgmInfo = m_AudioData[BgmType]; + string cueSheet = bgmInfo.CueSheet; + m_PlayBgmCueName = bgmInfo.CueName; + Toolbox.AudioManager.PlayBgmFromName(cueSheet, m_PlayBgmCueName, cueSheet, cueSheet, m_CurrentBgmIdx, loop: false, FadeTime, 0f, startTime); + } + } + + public virtual void PlayCrossFade(BGM_TYPE BgmType, float fadeOutTime, float fadeInTime, long startTime) + { + if (BgmType != BGM_TYPE.NONE) + { + BgmInfo bgmInfo = m_AudioData[BgmType]; + string cueSheet = bgmInfo.CueSheet; + m_PlayBgmCueName = bgmInfo.CueName; + Toolbox.AudioManager.StopFadeBgm(m_CurrentBgmIdx, fadeOutTime); + m_CurrentBgmIdx = (m_CurrentBgmIdx + 1) % m_MaxBgmCount; + Toolbox.AudioManager.PlayBgmFromName(cueSheet, m_PlayBgmCueName, cueSheet, cueSheet, m_CurrentBgmIdx, loop: false, fadeInTime, 0f, startTime); + } + } + + public virtual void PlayFadeOut(BGM_TYPE BgmType, float FadeOutTime = 0f, float FadeInTime = 0f) + { + Toolbox.AudioManager.StopFadeBgm(m_CurrentBgmIdx, FadeOutTime); + if (BgmType != BGM_TYPE.NONE) + { + m_CurrentBgmIdx = (m_CurrentBgmIdx + 1) % m_MaxBgmCount; + BgmInfo bgmInfo = m_AudioData[BgmType]; + string cueSheet = bgmInfo.CueSheet; + m_PlayBgmCueName = bgmInfo.CueName; + Toolbox.AudioManager.PlayBgmFromName(cueSheet, m_PlayBgmCueName, cueSheet, cueSheet, m_CurrentBgmIdx, loop: false, FadeInTime, FadeOutTime, 0L); + } + } + + public virtual void Play(string cuename, float fadeInTime, long startTime) + { + if (IsPreInstall(cuename, out var type)) + { + Play(type, fadeInTime, startTime); + return; + } + m_PlayBgmCueName = cuename; + Toolbox.AudioManager.PlayBgmFromName(cuename, cuename, cuename, cuename, m_CurrentBgmIdx, loop: false, fadeInTime, 0f, startTime); + } + + public virtual void PlayCrossFade(string cuename, float fadeOutTime, float fadeInTime, long startTime) + { + if (IsPreInstall(cuename, out var type)) + { + PlayCrossFade(type, fadeOutTime, fadeInTime, startTime); + return; + } + m_PlayBgmCueName = cuename; + Toolbox.AudioManager.StopFadeBgm(m_CurrentBgmIdx, fadeOutTime); + m_CurrentBgmIdx = (m_CurrentBgmIdx + 1) % m_MaxBgmCount; + Toolbox.AudioManager.PlayBgmFromName(cuename, cuename, cuename, cuename, m_CurrentBgmIdx, loop: false, fadeInTime, 0f, startTime); + } + + public virtual void Pause() + { + for (int i = 0; i < m_MaxBgmCount; i++) + { + Toolbox.AudioManager.PauseBgm(isPause: true, i); + } + } + + public virtual void Stop(float FadeTime, Action onStopped) + { + m_PlayBgmCueName = null; + AudioManager audioManager = Toolbox.AudioManager; + audioManager.StopFadeBgm(m_CurrentBgmIdx, FadeTime); + audioManager.StartCoroutine_DelayMethod(FadeTime, onStopped); + } + + public virtual void StopAll(float FadeTime) + { + m_PlayBgmCueName = null; + for (int i = 0; i < m_MaxBgmCount; i++) + { + Toolbox.AudioManager.StopFadeBgm(i, FadeTime); + } + } + + public bool IsPlayBGM(BGM_TYPE bgmType) + { + if (bgmType != BGM_TYPE.NONE) + { + return m_AudioData[bgmType].CueName == m_PlayBgmCueName; + } + return m_PlayBgmCueName != null; + } + + public string GetCueSheet(BGM_TYPE bgmType) + { + return m_AudioData[bgmType].CueSheet; + } + + public bool IsPreInstall(string cuename, out BGM_TYPE type) + { + foreach (KeyValuePair audioDatum in m_AudioData) + { + BgmInfo value = audioDatum.Value; + if (value.CueName == cuename && value.CueSheet == SoundMgr.PREINSTALL_CUESHEET) + { + type = audioDatum.Key; + return true; + } + } + type = BGM_TYPE.NONE; + return false; + } + + public void SetVolume(float Prm) + { + CriAtomExCategory.SetVolume("BGM", Prm); + m_volume = Prm; + } + + public void Mute(bool isMute) + { + CriAtomExCategory.Mute("BGM", isMute); + m_isMuted = isMute; + } + + public float GetVolume() + { + return m_volume; + } + + public bool IsMuted() + { + return m_isMuted; + } +} diff --git a/SVSim.BattleEngine/Engine/BuffCountInfo.cs b/SVSim.BattleEngine/Engine/BuffCountInfo.cs new file mode 100644 index 0000000..7f6f165 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BuffCountInfo.cs @@ -0,0 +1,7 @@ +public class BuffCountInfo : TurnAndIntValue +{ + public BuffCountInfo(int turn, bool isSelfTurn) + : base(-1, turn, isSelfTurn) + { + } +} diff --git a/SVSim.BattleEngine/Engine/BuffDetailInfoUI.cs b/SVSim.BattleEngine/Engine/BuffDetailInfoUI.cs new file mode 100644 index 0000000..0817251 --- /dev/null +++ b/SVSim.BattleEngine/Engine/BuffDetailInfoUI.cs @@ -0,0 +1,395 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Wizard; +using Wizard.Battle.UI; + +public class BuffDetailInfoUI : MonoBehaviour +{ + [SerializeField] + private UILabel _titleLabel; + + [SerializeField] + private UILabel _buffLabel; + + private const float TITLE_HEIGHT = 50f; + + public const string NOT_SHOW_BUFF_DETAIL_STORY_SPECIAL_BATTLE_ID = "42"; + + public float Height => 50f + (float)_buffLabel.height; + + public void Initialize() + { + _titleLabel.text = Data.SystemText.Get("BattleLog_0268"); + } + + public void SetBuffDetailLabel(BattleCardBase cardBase) + { + StringBuilder stringBuilder = new StringBuilder(); + List allBuffSkills = GetAllBuffSkills(cardBase, cardBase.BuffInfoList.Select((BuffInfo b) => b.SkillFrom).ToList()); + if (!cardBase.IsClass) + { + if (cardBase.Cost != cardBase.BaseCost) + { + int num = cardBase.Cost - cardBase.BaseCost; + string text = ((num > 0) ? ("+" + num) : num.ToString()); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0273", text)); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_powerup || s is Skill_power_down)) + { + int currentAtkBuff = cardBase.GetCurrentAtkBuff(); + int currentLifeBuff = cardBase.GetCurrentLifeBuff(); + if (currentAtkBuff != 0 || currentLifeBuff != 0) + { + string retAttack = string.Empty; + string retLife = string.Empty; + BattleLogUtility.GetBuffValueStringFormatted(currentAtkBuff, currentLifeBuff, ref retAttack, ref retLife); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0040", retAttack, retLife)); + } + } + bool flag = allBuffSkills.Any((SkillBase s) => s is Skill_quick && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)); + bool flag2 = allBuffSkills.Any((SkillBase s) => s is Skill_rush && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)); + bool flag3 = allBuffSkills.Any((SkillBase s) => s is Skill_killer && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)); + bool flag4 = allBuffSkills.Any((SkillBase s) => s is Skill_drain && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)); + if (ExistCopiedSkillNeedDetailText(cardBase)) + { + IEnumerable source = cardBase.BuffInfoList.Where((BuffInfo b) => b.IsCopied); + for (int num2 = 0; num2 < source.Count(); num2++) + { + if (source.ElementAt(num2).SkillFrom is SkillBaseCopy skillBaseCopy) + { + switch (skillBaseCopy.SkillType) + { + case "quick": + flag = true; + break; + case "rush": + flag2 = true; + break; + case "killer": + flag3 = true; + break; + case "drain": + flag4 = true; + break; + } + } + } + } + if (flag) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0011")); + } + if (flag2) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0012")); + } + if (flag3) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0009")); + } + if (flag4) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0006")); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_attack_count && (!cardBase.IsInHand || s.OnWhenPlayStart == 0))) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0018", cardBase.MaxAttackableCount.ToString())); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_ignore_guard && (!cardBase.IsInHand || s.OnWhenPlayStart == 0))) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0008")); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_consume_ep_modifier && (!cardBase.IsInHand || s.OnWhenPlayStart == 0)) || NeedNoConsumeEpText(cardBase)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0201")); + } + } + IEnumerable source2 = from s in allBuffSkills + where s is Skill_shield && (!cardBase.IsInHand || s.OnWhenPlayStart == 0) + select (Skill_shield)s; + if (source2.Any()) + { + if (source2.Any((Skill_shield s) => s.IsAllDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0274")); + } + if (source2.Any((Skill_shield s) => s.IsNextDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0275")); + } + if (source2.Any((Skill_shield s) => s.IsSkillDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0276")); + } + if (source2.Any((Skill_shield s) => s.IsSpellDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0277")); + } + } + List source3 = (from s in allBuffSkills + where s is Skill_damage_cut && (!cardBase.IsInHand || s.OnWhenPlayStart == 0) + select (Skill_damage_cut)s).ToList(); + if (source3.Any()) + { + if (source3.Any((Skill_damage_cut s) => s.IsAllDamageCut)) + { + int num3 = -source3.Where((Skill_damage_cut s) => s.IsAllDamageCut).Sum((Skill_damage_cut s) => s.CutAmount); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0278", num3.ToString())); + } + if (source3.Any((Skill_damage_cut s) => s.IsNextDamageCut)) + { + int num4 = -source3.Where((Skill_damage_cut s) => s.IsNextDamageCut).Sum((Skill_damage_cut s) => s.CutAmount); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0279", num4.ToString())); + } + if (source3.Any((Skill_damage_cut s) => s.IsSkillDamageCut)) + { + int num5 = -source3.Where((Skill_damage_cut s) => s.IsSkillDamageCut).Sum((Skill_damage_cut s) => s.CutAmount); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0280", num5.ToString())); + } + if (source3.Any((Skill_damage_cut s) => s.IsDamageClipping)) + { + List list = (from s in source3 + where s.ClippingMax != int.MaxValue + select s.ClippingMax).ToList(); + if (source3.Any((Skill_damage_cut s) => !IsNotShowDamageCutLifeLowerLimitBuffDetail(s))) + { + list.AddRange(from s in source3 + where s.LifeLowerLimit != -1 + select (!(s.SkillPrm.ownerCard is UnitBattleCard)) ? (s.SkillPrm.ownerCard.SelfBattlePlayer.Class.Life - 1) : (s.SkillPrm.ownerCard.Life - 1)); + } + if (list.Any()) + { + int num6 = list.Min(); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0281", (num6 + 1).ToString(), num6.ToString())); + } + } + } + _buffLabel.text = stringBuilder.ToString(); + } + + public void SetBuffDetailLabelInReplay(List buffInfoTextTypeList, BattleCardBase card) + { + StringBuilder stringBuilder = new StringBuilder(); + if (!card.IsClass) + { + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Cost)) + { + int num = card.Cost - card.BaseCost; + string text = ((num > 0) ? ("+" + num) : num.ToString()); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0273", text)); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.StatusBuff)) + { + string retAttack = string.Empty; + string retLife = string.Empty; + BattleLogUtility.GetBuffValueStringFormatted(card.GetCurrentAtkBuff(), card.GetCurrentLifeBuff(), ref retAttack, ref retLife); + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0040", retAttack, retLife)); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Quick)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0011")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Rush)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0012")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Killer)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0009")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.Drain)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0006")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AttackCount)) + { + int value = buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AttackCount).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0018", value.ToString())); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.IgnoreGuard)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0008")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.ConsumeEpModifier)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0201")); + } + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0274")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0275")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0276")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.SpellDamageShield)) + { + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0277")); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageCut)) + { + int num2 = -buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageCut).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0278", num2.ToString())); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageCut)) + { + int num3 = -buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageCut).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0279", num3.ToString())); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageCut)) + { + int num4 = -buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageCut).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0280", num4.ToString())); + } + if (buffInfoTextTypeList.Any((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.DamageClipping)) + { + int value2 = buffInfoTextTypeList.FirstOrDefault((NetworkBattleReceiver.ReplayBuffInfoLabel b) => b.Type == NetworkBattleReceiver.ReplayBuffInfoTextType.DamageClipping).Value; + AppendBuffText(stringBuilder, Data.SystemText.Get("BattleLog_0281", (value2 + 1).ToString(), value2.ToString())); + } + _buffLabel.text = stringBuilder.ToString(); + } + + public static List GetAllBuffSkills(BattleCardBase cardBase, List buffSkills) + { + List list = new List(); + foreach (SkillBase buffSkill in buffSkills) + { + if (buffSkill is Skill_attach_skill) + { + IEnumerable source = from b in buffSkill.GetBuffInfoContainer() + where cardBase == b._targetCard + select b._attachSkill; + list.AddRange(GetAllBuffSkills(cardBase, source.Where((SkillBase s) => !cardBase.IsClass || !ExistClassSkillNeedBuffDetailText(s)).ToList())); + } + else + { + list.Add(buffSkill); + } + } + return list; + } + + public void AppendBuffText(StringBuilder buffTextsStringBuilder, string buffText) + { + if (buffTextsStringBuilder.Length > 0) + { + buffTextsStringBuilder.Append("\r\n"); + } + buffTextsStringBuilder.Append(buffText); + } + + public static bool NeedBuffDetailText(BattleCardBase cardBase) + { + if (cardBase is ClassBattleCardBase) + { + return cardBase.BuffInfoList.Any((BuffInfo s) => ExistClassSkillNeedBuffDetailText(s.SkillFrom)); + } + if (!cardBase.BuffInfoList.Exists((BuffInfo b) => ExistSkillNeedBuffDetailText(cardBase, b.SkillFrom))) + { + return NeedNoConsumeEpText(cardBase); + } + return true; + } + + public static bool IsNotShowDamageCutLifeLowerLimitBuffDetail(SkillBase skill) + { + bool num = skill is Skill_damage_cut { IsDamageClipping: not false } skill_damage_cut && skill_damage_cut.LifeLowerLimit != -1; + DataMgr.SpecialBattleSetting specialBattleSettingInfo = GameMgr.GetIns().GetDataMgr().SpecialBattleSettingInfo; + if (num && specialBattleSettingInfo != null && specialBattleSettingInfo.Id == "42") + { + return skill.SkillPrm.ownerCard is EnemyClassBattleCard; + } + return false; + } + + private static bool ExistSkillNeedBuffDetailText(BattleCardBase cardBase, SkillBase skill) + { + if (cardBase.IsInHand && skill.Option.Contains("(timing:when_play)")) + { + return false; + } + if (!(skill is Skill_quick) && !(skill is Skill_ignore_guard) && !(skill is Skill_attack_count) && !(skill is Skill_shield) && !(skill is Skill_damage_cut) && !(skill is Skill_rush) && !ExistSkillCostChangeNeedDetailText(cardBase, skill) && !(skill is Skill_consume_ep_modifier) && !(skill is Skill_killer) && !(skill is Skill_drain) && !ExistSKillPowerChangeNeedDetailText(cardBase, skill) && !ExistAttachSkillNeedDetailText(cardBase, skill)) + { + return ExistCopiedSkillNeedDetailText(cardBase); + } + return true; + } + + private static bool ExistClassSkillNeedBuffDetailText(SkillBase skill) + { + if (!(skill is Skill_shield)) + { + if (skill is Skill_damage_cut) + { + return !IsNotShowDamageCutLifeLowerLimitBuffDetail(skill); + } + return false; + } + return true; + } + + public static bool NeedNoConsumeEpText(BattleCardBase cardBase) + { + if (cardBase.BuffInfoList.Any((BuffInfo b) => b.SkillFrom is Skill_consume_ep_modifier)) + { + return true; + } + if (DetailPanelControl.IsNeedNoConsumeEp(cardBase)) + { + return true; + } + return false; + } + + private static bool ExistSKillPowerChangeNeedDetailText(BattleCardBase cardBase, SkillBase skill) + { + if (skill is Skill_powerup || skill is Skill_power_down) + { + int currentAtkBuff = cardBase.GetCurrentAtkBuff(); + int currentLifeBuff = cardBase.GetCurrentLifeBuff(); + if (currentAtkBuff == 0) + { + return currentLifeBuff != 0; + } + return true; + } + return false; + } + + private static bool ExistAttachSkillNeedDetailText(BattleCardBase cardBase, SkillBase skill) + { + if (skill is Skill_attach_skill) + { + return skill.GetBuffInfoContainer().Any((SkillBase.BuffInfoContainer b) => cardBase == b._targetCard && ExistSkillNeedBuffDetailText(cardBase, b._attachSkill)); + } + return false; + } + + public static bool ExistCopiedSkillNeedDetailText(BattleCardBase cardBase) + { + return cardBase.BuffInfoList.Any(delegate(BuffInfo b) + { + if (!b.IsCopied) + { + return false; + } + return b.SkillFrom is SkillBaseCopy skillBaseCopy && skillBaseCopy.IsNeedDetail; + }); + } + + private static bool ExistSkillCostChangeNeedDetailText(BattleCardBase cardBase, SkillBase skill) + { + if (skill is Skill_cost_change) + { + return cardBase.Cost != cardBase.BaseCost; + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/BuffInfo.cs b/SVSim.BattleEngine/Engine/BuffInfo.cs new file mode 100644 index 0000000..190ad8c --- /dev/null +++ b/SVSim.BattleEngine/Engine/BuffInfo.cs @@ -0,0 +1,119 @@ +using System.Collections.Generic; +using System.Linq; +using Wizard; + +public class BuffInfo +{ + public List CopiedSkillDescriptionValueList = new List(); + + public List CopiedEvoSkillDescriptionValueList = new List(); + + public int BaseCardIDFrom { get; private set; } + + public int CardIDFrom { get; private set; } + + public SkillBase SkillFrom { get; private set; } + + public BattleCardBase OwnerCard { get; private set; } + + public BattleCardBase PreviousOwner { get; private set; } + + public BattleCardBase TargetCard { get; set; } + + public bool IsCopied { get; set; } + + public bool IsPlayer { get; set; } + + public bool IsCopiedEvolutionSkill { get; set; } + + public bool IsEvolutionSkill { get; set; } + + public bool IsSaveBurialRiteSkill { get; set; } + + public bool IsGetonSkill { get; set; } + + public bool IsHiddenClassLogSkill { get; set; } + + public string DivergenceId { get; set; } + + public bool IsReserveTokenDrawSkill { get; set; } + + public BossRushSpecialSkill SpecialSkillInfo { get; set; } + + public BuffInfo(int fromBaseCardID, int fromCardID, SkillBase fromSkill, BattleCardBase ownerCard = null, bool isPlayer = false, string divergenceId = "") + { + BaseCardIDFrom = fromBaseCardID; + CardIDFrom = fromCardID; + SkillFrom = fromSkill; + PreviousOwner = null; + if (SkillFrom != null) + { + IsPlayer = SkillFrom.SkillPrm.ownerCard.IsPlayer; + IsEvolutionSkill = SkillFrom.SkillPrm.ownerCard.EvolutionSkills != null && SkillFrom.SkillPrm.ownerCard.EvolutionSkills.Any((SkillBase skill) => skill == SkillFrom); + DivergenceId = SkillFrom.OptionValue.GetOption(SkillFilterCreator.ContentKeyword.divergence_id, "_OPT_NULL_"); + OwnerCard = SkillFrom.SkillPrm.ownerCard; + } + else + { + IsPlayer = isPlayer; + DivergenceId = divergenceId; + OwnerCard = ownerCard; + } + } + + public string GetAttachFromCardName() + { + return CardMaster.GetInstanceForBattle().GetCardParameterFromId(BaseCardIDFrom).CardName; + } + + public void SetPreviousOwner(BattleCardBase card) + { + PreviousOwner = card; + } + + private BuffInfo(BuffInfo buff) + { + BaseCardIDFrom = buff.BaseCardIDFrom; + CardIDFrom = buff.CardIDFrom; + SkillFrom = buff.SkillFrom; + OwnerCard = buff.OwnerCard; + PreviousOwner = buff.PreviousOwner; + IsCopied = buff.IsCopied; + IsCopiedEvolutionSkill = buff.IsCopiedEvolutionSkill; + IsPlayer = buff.IsPlayer; + IsEvolutionSkill = buff.IsEvolutionSkill; + IsSaveBurialRiteSkill = buff.IsSaveBurialRiteSkill; + IsGetonSkill = buff.IsGetonSkill; + IsHiddenClassLogSkill = buff.IsHiddenClassLogSkill; + DivergenceId = buff.DivergenceId; + IsReserveTokenDrawSkill = buff.IsReserveTokenDrawSkill; + } + + public BuffInfo Clone() + { + return new BuffInfo(this); + } + + public bool IsBuffGaveSkill(SkillBase skill) + { + if (SkillFrom is SkillBaseCopy skillBaseCopy && skillBaseCopy.CopiedSkillList.Any((SkillBase s) => skill.IsSameSkill(s))) + { + return true; + } + return SkillFrom == skill; + } + + public BattleCardBase GetDisplayCard() + { + BattleCardBase result = OwnerCard; + if (PreviousOwner != null) + { + result = PreviousOwner; + } + if (IsSaveBurialRiteSkill || IsGetonSkill || IsReserveTokenDrawSkill) + { + result = TargetCard; + } + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/CantPlayCardFilterInfo.cs b/SVSim.BattleEngine/Engine/CantPlayCardFilterInfo.cs new file mode 100644 index 0000000..77dc480 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CantPlayCardFilterInfo.cs @@ -0,0 +1,95 @@ +using System.Collections.Generic; +using System.Linq; +using Wizard; +using Wizard.Battle; + +public class CantPlayCardFilterInfo +{ + private BattlePlayerPair _playerPair; + + private SkillOptionValue _optionValue; + + private SkillConditionCheckerOption _checkerOption; + + private ISkillBattlePlayerFilter _playerFilter; + + private ISkillTargetFilter _targetFilter; + + private List _cardFilterList; + + private ValueWithOperator _cardId; + + private bool _hasCardIdFilter; + + public bool IsCantPlaySpell { get; private set; } + + public bool IsCantPlayField { get; private set; } + + public CantPlayCardFilterInfo(BattleCardBase owner, SkillBase skill) + { + _playerFilter = SkillFilterCreator.CreateBattlePlayerFilter(SkillFilterCreator.ContentKeyword.me); + _targetFilter = new SkillTargetHandFilter(); + _cardFilterList = CreateCardFilterList(skill.OptionValue); + _playerPair = new BattlePlayerPair(owner.SelfBattlePlayer, owner.OpponentBattlePlayer); + _optionValue = skill.OptionValue; + _checkerOption = new SkillConditionCheckerOption(); + _hasCardIdFilter = _cardFilterList.Any((ISkillCardFilter c) => c is SkillParameterBaseCardIdFilter); + IsCantPlaySpell = _cardFilterList.Any((ISkillCardFilter c) => c is SkillSpellFilter); + IsCantPlayField = _cardFilterList.Any((ISkillCardFilter c) => c is SkillFieldFilter); + } + + private List CreateCardFilterList(SkillOptionValue option) + { + List list = new List(); + switch (option.GetString(SkillFilterCreator.ContentKeyword.card_type)) + { + case "unit": + list.Add(new SkillUnitFilter()); + break; + case "class": + list.Add(new SkillClassFilter()); + break; + case "spell": + list.Add(new SkillSpellFilter()); + break; + case "field": + list.Add(new SkillFieldFilter()); + break; + case "all": + list.Add(new SkillAllCardFilter()); + break; + } + ValueWithOperator valueWithOperator = option.GetValueWithOperator(SkillFilterCreator.ContentKeyword.base_card_id); + if (valueWithOperator != null) + { + _cardId = new ValueWithOperator(option.ParseInt(valueWithOperator.Value).ToString(), valueWithOperator.Operator); + list.Add(new SkillParameterBaseCardIdFilter(_cardId.Value, _cardId.Operator)); + } + return list; + } + + public bool CheckCantPlay(BattleCardBase targetCard) + { + IEnumerable battlePlayerInfos = _playerFilter.Filtering(_playerPair); + IEnumerable enumerable = _targetFilter.Filtering(battlePlayerInfos, _checkerOption); + for (int i = 0; i < _cardFilterList.Count; i++) + { + enumerable = _cardFilterList[i].Filtering(enumerable, _optionValue); + } + return enumerable.Any((IReadOnlyBattleCardInfo c) => c.IsPlayer == targetCard.IsPlayer && c.Index == targetCard.Index); + } + + public bool CheckCantPlayTransformId(BattleCardBase originalCard) + { + if (!_hasCardIdFilter || _cardId == null) + { + return false; + } + Skill_transform accelerateOrCrystallizeTransformSkill = originalCard.GetAccelerateOrCrystallizeTransformSkill(); + if (accelerateOrCrystallizeTransformSkill == null) + { + return false; + } + return SkillCompareFuncCreator.Create(_cardId.Operator)(_optionValue.ParseInt(_cardId.Value), accelerateOrCrystallizeTransformSkill.TransformId); + } +} diff --git a/SVSim.BattleEngine/Engine/CardBasePrm.cs b/SVSim.BattleEngine/Engine/CardBasePrm.cs new file mode 100644 index 0000000..a20a3cd --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardBasePrm.cs @@ -0,0 +1,317 @@ +using System; +using System.Collections.Generic; +using Wizard; + +public static class CardBasePrm +{ + public enum CharaType + { + CLASS = 0, + NORMAL = 1, + FIELD = 2, + CHANT_FIELD = 3, + SPELL = 4, + EVOLUTION = 5, + MAX = 6, + NONE = 6 + } + + public enum ClanType + { + ALL = 0, + MIN = 1, + ELF = 1, + ROYAL = 2, + WITCH = 3, + DRAGON = 4, + NECRO = 5, + VAMPIRE = 6, + BISHOP = 7, + NEMESIS = 8, + MAX = 9, + NONE = 10, + SHADOW = 99 + } + + public enum TribeType + { + ALL = 0, + LORD = 1, + LEGION = 2, + WHITE_RITUAL = 3, + MANARIA = 4, + ARTIFACT = 5, + LOOTING = 6, + MACHINE = 7, + FOOD = 8, + LEVIN = 9, + NATURE = 10, + BANQUET = 11, + HERO = 12, + ARMED = 13, + CHESS = 14, + HELLBOUND = 15, + SCHOOL = 16, + MAX = 17, + NONE = 17 + } + + public enum TribeChangeType + { + CHANGE, + ADD + } + + public class TribeInfo + { + public List TribeTypeList { get; private set; } + + public TribeChangeType ChangeType { get; private set; } + + public TribeInfo(List tribe, TribeChangeType type) + { + TribeTypeList = tribe; + ChangeType = type; + } + } + + public const int MAX_LIFE = 20; + + public const int BERSERK_COUNT = 10; + + public const int AVARICE_COUNT = 2; + + public const int WRATH_COUNT = 7; + + public const int AWAKE_PP = 7; + + public const int MAX_DRAW_CARD = 8; + + private static List _defaultType; + + public static List DefaultType + { + get + { + if (_defaultType == null) + { + _defaultType = new List { TribeType.ALL }; + } + return _defaultType; + } + } + + public static CharaType ToStrCharaType(string str) + { + CharaType result = CharaType.MAX; + try + { + result = (CharaType)Enum.Parse(typeof(CharaType), str); + } + catch + { + } + return result; + } + + public static bool ToBoolIsFoil(string str) + { + int num = int.Parse(str); + bool result = false; + if (num == 1) + { + result = true; + } + return result; + } + + public static ClanType ToStrClanType(string str) + { + int value = int.Parse(str); + ClanType result = ClanType.NONE; + try + { + result = (ClanType)Enum.ToObject(typeof(ClanType), value); + } + catch + { + } + return result; + } + + public static bool ClanTypeIsUseable(ClanType type) + { + if (type >= ClanType.MIN) + { + return type < ClanType.MAX; + } + return false; + } + + public static TribeType ToStrTribeType(string str) + { + TribeType result = TribeType.MAX; + try + { + result = (TribeType)Enum.Parse(typeof(TribeType), str); + } + catch + { + } + return result; + } + + public static ClanType GetClanType(string clan) + { + using (IEnumerator enumerator = ((IEnumerable)clan.Split('.', '=')).GetEnumerator()) + { + while (enumerator.MoveNext()) + { + switch (enumerator.Current) + { + case "all": + return ClanType.ALL; + case "elf": + return ClanType.MIN; + case "royal": + return ClanType.ROYAL; + case "witch": + return ClanType.WITCH; + case "dragon": + return ClanType.DRAGON; + case "necro": + return ClanType.NECRO; + case "vampire": + return ClanType.VAMPIRE; + case "bishop": + return ClanType.BISHOP; + case "nemesis": + return ClanType.NEMESIS; + } + } + } + return ClanType.NONE; + } + + public static List CreateTribeTypeList(string tribe, bool isTribeCheck = false, bool notEqual = false) + { + string text = ""; + List list = new List(); + if (isTribeCheck) + { + text = (notEqual ? "tribe!=" : "tribe="); + } + if (tribe.Contains(text + "all")) + { + list.Add(TribeType.ALL); + } + if (tribe.Contains(text + "legion")) + { + list.Add(TribeType.LEGION); + } + if (tribe.Contains(text + "lord")) + { + list.Add(TribeType.LORD); + } + if (tribe.Contains(text + "white_ritual")) + { + list.Add(TribeType.WHITE_RITUAL); + } + if (tribe.Contains(text + "manaria")) + { + list.Add(TribeType.MANARIA); + } + if (tribe.Contains(text + "artifact")) + { + list.Add(TribeType.ARTIFACT); + } + if (tribe.Contains(text + "looting")) + { + list.Add(TribeType.LOOTING); + } + if (tribe.Contains(text + "machine")) + { + list.Add(TribeType.MACHINE); + } + if (tribe.Contains(text + "food")) + { + list.Add(TribeType.FOOD); + } + if (tribe.Contains(text + "levin")) + { + list.Add(TribeType.LEVIN); + } + if (tribe.Contains(text + "nature")) + { + list.Add(TribeType.NATURE); + } + if (tribe.Contains(text + "banquet")) + { + list.Add(TribeType.BANQUET); + } + if (tribe.Contains(text + "hero")) + { + list.Add(TribeType.HERO); + } + if (tribe.Contains(text + "armed")) + { + list.Add(TribeType.ARMED); + } + if (tribe.Contains(text + "chess")) + { + list.Add(TribeType.CHESS); + } + if (tribe.Contains(text + "hellbound")) + { + list.Add(TribeType.HELLBOUND); + } + if (tribe.Contains(text + "school")) + { + list.Add(TribeType.SCHOOL); + } + if (list.Count == 0) + { + list.Add(TribeType.MAX); + } + return list; + } + + public static bool IsFollowerCard(CharaType type) + { + return type == CharaType.NORMAL; + } + + public static bool IsSpellCard(CharaType type) + { + return type == CharaType.SPELL; + } + + public static bool IsAmuletCard(CharaType type) + { + if (type != CharaType.FIELD) + { + return type == CharaType.CHANT_FIELD; + } + return true; + } + + public static string GetCardTypeName(CharaType type) + { + string result = string.Empty; + switch (type) + { + case CharaType.NORMAL: + case CharaType.EVOLUTION: + result = Data.SystemText.Get("Card_0044"); + break; + case CharaType.SPELL: + result = Data.SystemText.Get("Card_0045"); + break; + case CharaType.FIELD: + case CharaType.CHANT_FIELD: + result = Data.SystemText.Get("Card_0046"); + break; + } + return result; + } +} diff --git a/SVSim.BattleEngine/Engine/CardDataModel.cs b/SVSim.BattleEngine/Engine/CardDataModel.cs new file mode 100644 index 0000000..fdf8383 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDataModel.cs @@ -0,0 +1,104 @@ +using System.Collections.Generic; + +public class CardDataModel +{ + public int Index { get; set; } + + public int CardId { get; set; } + + public int RedrawCardPosition { get; set; } + + public bool isOpponent { get; set; } + + public NetworkBattleDefine.NetworkCardPlaceState fromState { get; set; } + + public List ToStateList { get; set; } + + public int skillCardIndex { get; set; } + + public int publishedActiveSkillCount { get; set; } + + public int skillMovementNum { get; set; } + + public bool IsAttachSkill { get; set; } + + public int skillAttachCardIndex { get; set; } + + public int skillAttachSkillIndex { get; set; } + + public List skillKeyCardIdxList { get; set; } + + public List SkillKeyCardIdList { get; set; } + + public int playCardCost { get; set; } + + public int? AddLife { get; set; } + + public int? SetLife { get; set; } + + public int? AddAtk { get; set; } + + public int? SetAtk { get; set; } + + public int Clan { get; set; } + + public string Tribe { get; set; } + + public bool IsOpen { get; set; } + + public int Spellboost { get; set; } = -1; + + public int? AddChantCount { get; set; } + + public int? SetChantCount { get; set; } + + public int UnionBurstCount { get; set; } + + public int SkyboundArtCount { get; set; } + + public int SkillIndex { get; set; } + + public string AttachTarget { get; private set; } + + public int RandomTargetIndex { get; set; } = -1; + + public List FusionIngredientList { get; set; } + + public bool IsInvoked { get; set; } + + public bool IsGotUnapproved { get; set; } + + public int SkillCallCount { get; set; } + + public int SkillValueCount { get; set; } + + public int? SkillValueParameter { get; set; } + + public int activate { get; set; } + + public bool IsHighlander { get; set; } + + public CardDataModel() + { + Clan = -1; + Tribe = "NONE"; + playCardCost = -1; + publishedActiveSkillCount = -1; + SkillCallCount = -1; + SkillValueCount = -1; + SkillValueParameter = null; + activate = -1; + SkillIndex = -1; + IsHighlander = false; + ToStateList = new List(); + skillKeyCardIdxList = new List(); + SkillKeyCardIdList = new List(); + UnionBurstCount = -1; + SkyboundArtCount = -1; + } + + public void SetAttachTarget(string attach) + { + AttachTarget = attach; + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailBase.cs b/SVSim.BattleEngine/Engine/CardDetailBase.cs new file mode 100644 index 0000000..1261e57 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailBase.cs @@ -0,0 +1,188 @@ +using System; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.View; + +public class CardDetailBase : MonoBehaviour +{ + [Serializable] + public class BgSizeInfo + { + public int Line; + + public int BgSize; + } + + [Serializable] + public class DetailPanelInfo + { + public GameObject _root; + + public UILabel _nameLabel; + + public UITexture _logImage; + + public UIScrollView _scrollView; + + public UISprite _bg; + + public int _maxLine; + + public UIPanel DiscPanelObject; + + public UILabel DiscLabel; + + public BoxCollider DiscCollider; + + public UIScrollBar DiscScrollBar; + + public int DefaultBgHeight; + + public UILabel _costLabel; + + public UILabel _signLabel; + + public UILabel _zeroCostLabel; + + public UILabel _signedCostLabel; + + public UISprite _costSprite; + + public UILabel _classLabel; + + public UISprite _classBG; + + public GameObject _myRotationInfo; + + public UILabel _myRotationClassLabel; + + public GameObject _myRotationBonusIconOriginal; + + public UIGrid _myRotationBonusIconGrid; + + public FlexibleGrid _myRotationInfoGrid; + + public UIRect RootAnchor; + + public void Initialize() + { + } + } + + private const int EVO_OR_FUSION_BUTTON_OFFSET = 65; + + private const int CLASS_LABEL_HEIGHT = 89; + + private const int PANEL_BOTTOM__ANCHOR = 4; + + private const int PANEL_BOTTOM__ANCHOR_SCROLL = 16; + + [SerializeField] + protected DetailPanelInfo _followerPanel; + + [SerializeField] + protected DetailPanelInfo _followerEvoPanel; + + [SerializeField] + protected DetailPanelInfo _nonFollowerPanel; + + protected void SetFollowerDetailLabel(string skillDisc, string evoSkillDisc, bool needEvolutionOrFusionButton, bool resetScrollPosition = true) + { + _nonFollowerPanel._root.SetActive(value: false); + _followerPanel._root.SetActive(value: true); + _followerEvoPanel._root.SetActive(value: true); + int num = CheckTextLineCount(_followerPanel.DiscLabel, skillDisc); + int num2 = CheckTextLineCount(_followerEvoPanel.DiscLabel, evoSkillDisc); + if (num >= _followerPanel._maxLine && num2 < _followerEvoPanel._maxLine) + { + num = Mathf.Min(9 - num2, num); + } + else if (num < _followerPanel._maxLine && num2 >= _followerEvoPanel._maxLine) + { + num2 = Mathf.Min(9 - num, num2); + } + else if (num >= _followerPanel._maxLine && num2 >= _followerEvoPanel._maxLine) + { + num = _followerPanel._maxLine; + num2 = _followerEvoPanel._maxLine; + } + SetDescLabelText(_followerPanel, skillDisc, num, needEvolutionOrFusionButton: false, resetScrollPosition); + SetDescLabelText(_followerEvoPanel, evoSkillDisc, num2, needEvolutionOrFusionButton, resetScrollPosition); + _followerEvoPanel.RootAnchor.UpdateAnchors(); + } + + protected void SetDescLabelText(DetailPanelInfo panel, string discText, bool needEvolutionOrFusionButton = false, bool resetScrollPosition = true, bool isClass = false) + { + SetDescLabelText(panel, discText, panel._maxLine, needEvolutionOrFusionButton, resetScrollPosition, isClass); + } + + protected void SetDescLabelText(DetailPanelInfo panel, string discText, int maxLine, bool needEvolutionOrFusionButton = false, bool resetScrollPosition = true, bool isClass = false) + { + UILabel discLabel = panel.DiscLabel; + UIScrollView scrollView = panel._scrollView; + UISprite bg = panel._bg; + discLabel.text = Global.GetConvertWrapText(discLabel, discText); + discLabel.ProcessText(); + int textLineCount = Global.GetTextLineCount(discLabel.processedText); + bool flag = textLineCount > maxLine; + if (bg != null) + { + bg.height = panel.DefaultBgHeight + Mathf.Min(textLineCount, maxLine) * (panel.DiscLabel.fontSize + panel.DiscLabel.spacingY); + if (needEvolutionOrFusionButton) + { + bg.height += 65; + } + if (isClass) + { + bg.height = 89; + } + bg.gameObject.SetActive(value: false); + bg.gameObject.SetActive(value: true); + bg.ResetAndUpdateAnchors(); + } + panel.DiscPanelObject.bottomAnchor.absolute = (flag ? 16 : 4) + (needEvolutionOrFusionButton ? 65 : 0); + panel.DiscPanelObject.gameObject.SetActive(value: false); + panel.DiscPanelObject.gameObject.SetActive(value: true); + panel.DiscPanelObject.UpdateAnchors(); + scrollView.enabled = flag; + panel.DiscScrollBar.gameObject.SetActive(flag); + if (resetScrollPosition) + { + scrollView.ResetPosition(); + } + scrollView.UpdateScrollbars(); + } + + private int CheckTextLineCount(UILabel label, string discText) + { + label.text = Global.GetConvertWrapText(label, discText); + label.ProcessText(); + return Global.GetTextLineCount(label.processedText); + } + + protected void SetDetailKeywordEvents(Action onClick, BattleCardBase card, CardParameter baseParameter, DetailPanelControl control) + { + SetDetailKeywordEvent(_followerPanel, onClick, card, baseParameter, control); + SetDetailKeywordEvent(_followerEvoPanel, onClick, card, baseParameter, control); + SetDetailKeywordEvent(_nonFollowerPanel, onClick, card, baseParameter, control); + } + + private void SetDetailKeywordEvent(DetailPanelInfo panelInfo, Action onClick, BattleCardBase card, CardParameter baseParameter, DetailPanelControl control) + { + UILabel label = panelInfo.DiscLabel; + BoxCollider discCollider = panelInfo.DiscCollider; + if (label.text != " ") + { + UIEventListener.Get(discCollider.gameObject).onClick = delegate + { + onClick.Call(card, label.gameObject, baseParameter); + }; + BattlePlayerView.SetKeyWordColor(discCollider.gameObject, label, control); + } + else + { + UIEventListener.Get(discCollider.gameObject).onClick = null; + } + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailFilterCategory.cs b/SVSim.BattleEngine/Engine/CardDetailFilterCategory.cs new file mode 100644 index 0000000..95cb260 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailFilterCategory.cs @@ -0,0 +1,39 @@ +using System.Collections.Generic; +using UnityEngine; + +public class CardDetailFilterCategory : MonoBehaviour +{ + [SerializeField] + private UILabel _categoryName; + + [SerializeField] + private UIGrid _grid; + + public List AllKeyWord { get; private set; } + + private void Awake() + { + AllKeyWord = new List(); + } + + public void Initialize(string name) + { + _categoryName.text = name; + } + + public void Reset() + { + foreach (CardDetailFilterKeyWord item in AllKeyWord) + { + item.Reset(); + } + } + + public void AddChild(CardDetailFilterKeyWord keyword) + { + keyword.transform.parent = _grid.transform; + keyword.transform.localScale = Vector3.one; + _grid.Reposition(); + AllKeyWord.Add(keyword); + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailFilterDialog.cs b/SVSim.BattleEngine/Engine/CardDetailFilterDialog.cs new file mode 100644 index 0000000..e75e69c --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailFilterDialog.cs @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using Cute; +using UnityEngine; +using Wizard; + +public class CardDetailFilterDialog : MonoBehaviour +{ + private const int DIALOG_PANEL_DEPTH = 15; + + [SerializeField] + private CardDetailFilterCategory _categoryOriginal; + + [SerializeField] + private CardDetailFilterKeyWord _keywordOriginal; + + [SerializeField] + private FlexibleGrid _grid; + + [SerializeField] + private UIButton _resetButton; + + private List _allCategory = new List(); + + private List _saveList; + + private bool _initializeFinish; + + private bool _isChanged; + + private Dictionary _existKeyWordDictionary; + + public Action OnChange { get; set; } + + public DialogBase Dialog { get; private set; } + + public static CardDetailFilterDialog Create(GameObject prefab, List saveList, Dictionary existKeyWordDictionary) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(Data.SystemText.Get("Card_0227")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn); + dialogBase.SetPanelDepth(15); + GameObject gameObject = UnityEngine.Object.Instantiate(prefab); + dialogBase.SetObj(gameObject); + CardDetailFilterDialog component = gameObject.GetComponent(); + component.Dialog = dialogBase; + component._saveList = saveList; + component._existKeyWordDictionary = existKeyWordDictionary; + return component; + } + + private bool IsCheckedInSaveList(string keyword) + { + if (_saveList != null) + { + return _saveList.Contains(keyword); + } + return false; + } + + private void Start() + { + _categoryOriginal.gameObject.SetActive(value: false); + _keywordOriginal.gameObject.SetActive(value: false); + foreach (string category in Data.Master.CardFilterKeyWord.CategoryList) + { + AddCategory(Data.SystemText.Get(category), Data.Master.CardFilterKeyWord.GetCategory(category)); + } + _grid.Reposition(); + UIEventListener.Get(_resetButton.gameObject).onClick = delegate + { + OnClickResetButton(); + }; + _initializeFinish = true; + } + + private void AddCategory(string categoryName, List keyList) + { + List list = new List(); + foreach (string key2 in keyList) + { + string key = Data.Master.BattleKeyWordTitleDic[key2]; + if (_existKeyWordDictionary == null || _existKeyWordDictionary.ContainsKey(key)) + { + list.Add(key2); + } + } + if (list.Count == 0) + { + return; + } + CardDetailFilterCategory component = NGUITools.AddChild(_grid.gameObject, _categoryOriginal.gameObject).GetComponent(); + _allCategory.Add(component); + component.name = "category_" + categoryName; + component.gameObject.SetActive(value: true); + component.Initialize(categoryName); + foreach (string item in list) + { + string keyword = Data.Master.BattleKeyWordTitleDic[item]; + CardDetailFilterKeyWord component2 = UnityEngine.Object.Instantiate(_keywordOriginal.gameObject).GetComponent(); + component2.gameObject.SetActive(value: true); + component2.Initialize(keyword); + component2.OnValueChange = delegate + { + if (_initializeFinish) + { + _isChanged = true; + } + }; + component.AddChild(component2); + if (IsCheckedInSaveList(keyword)) + { + component2.SetChecked(); + } + } + } + + private void Update() + { + if (_isChanged) + { + _isChanged = false; + List filterList = GetFilterList(); + if (!IsSameList(_saveList, filterList)) + { + _saveList = filterList; + OnChange.Call(); + } + } + } + + private int GetListCount(List list) + { + return list?.Count ?? 0; + } + + private bool IsSameList(List list1, List list2) + { + if (GetListCount(list1) == 0 && GetListCount(list2) == 0) + { + return true; + } + if (GetListCount(list1) != GetListCount(list2)) + { + return false; + } + foreach (string item in list1) + { + if (!list2.Contains(item)) + { + return false; + } + } + foreach (string item2 in list2) + { + if (!list1.Contains(item2)) + { + return false; + } + } + return true; + } + + private void OnClickResetButton() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + foreach (CardDetailFilterCategory item in _allCategory) + { + item.Reset(); + } + } + + public List GetFilterList() + { + List list = null; + foreach (CardDetailFilterCategory item in _allCategory) + { + foreach (CardDetailFilterKeyWord item2 in item.AllKeyWord) + { + if (item2.IsEnableKeyWord) + { + if (list == null) + { + list = new List(); + } + list.Add(item2.KeyWord); + } + } + } + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailFilterKeyWord.cs b/SVSim.BattleEngine/Engine/CardDetailFilterKeyWord.cs new file mode 100644 index 0000000..f71dcaa --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailFilterKeyWord.cs @@ -0,0 +1,51 @@ +using System; +using Cute; +using UnityEngine; + +public class CardDetailFilterKeyWord : MonoBehaviour +{ + [SerializeField] + private UIToggle _toggle; + + [SerializeField] + private UILabel _label; + + private bool _checkedCache; + + public bool IsEnableKeyWord => _toggle.value; + + public string KeyWord { get; private set; } + + public Action OnValueChange { get; set; } + + private void Start() + { + } + + public void Reset() + { + _checkedCache = false; + _toggle.value = false; + } + + public void SetChecked() + { + _checkedCache = true; + _toggle.value = true; + } + + public void Initialize(string keyword) + { + EventDelegate.Add(_toggle.onChange, delegate + { + if (_toggle.value != _checkedCache) + { + _checkedCache = _toggle.value; + GameMgr.GetIns().GetSoundMgr().PlaySe(_toggle.value ? Se.TYPE.SYS_TOGGLE_ON : Se.TYPE.SYS_TOGGLE_OFF); + } + OnValueChange.Call(); + }); + _label.text = keyword; + KeyWord = keyword; + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailFilterOffButton.cs b/SVSim.BattleEngine/Engine/CardDetailFilterOffButton.cs new file mode 100644 index 0000000..b06d619 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailFilterOffButton.cs @@ -0,0 +1,36 @@ +using System; +using Cute; +using UnityEngine; + +public class CardDetailFilterOffButton : MonoBehaviour +{ + [SerializeField] + private UILabel _label; + + [SerializeField] + private UIButton _button; + + [SerializeField] + private UISprite _backGround; + + private string _keyword; + + public Action OnClick { get; set; } + + private void Start() + { + EventDelegate.Add(_button.onClick, delegate + { + OnClick.Call(_keyword); + }); + } + + public void Initialize(string text) + { + _keyword = text; + _label.text = text; + _label.InitializeFont(); + _label.ProcessText(); + _backGround.ResetAndUpdateAnchors(); + } +} diff --git a/SVSim.BattleEngine/Engine/CardDetailUI.cs b/SVSim.BattleEngine/Engine/CardDetailUI.cs new file mode 100644 index 0000000..a626502 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardDetailUI.cs @@ -0,0 +1,2620 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.View; + +public class CardDetailUI : UIBase +{ + private class CardVoiceData + { + private const string ACC_CARD_ID_GROUP = "ACC_CARD_ID"; + + private const string ACC_CARD_ID_REGEX = "card_id=(?80\\d*)"; + + public readonly string MainVoiceId; + + public readonly List _acceleratedVoiceIdList = new List(); + + public readonly List _voiceListBeforeEvo; + + public readonly List _voiceListAfterEvo; + + private CardMaster.CardMasterId _cardMasterId; + + private List _splitVoiceList; + + public CardVoiceData(CardParameter cardParam, CardMaster.CardMasterId cardMasterId) + { + _cardMasterId = cardMasterId; + VoiceDictionaries voiceDictionaries = new VoiceDictionaries(cardParam.CardId, _cardMasterId); + MainVoiceId = voiceDictionaries.VoiceId; + List list = new List(); + List normalPlayVoices = voiceDictionaries.GetNormalPlayVoices(); + list.AddRange(normalPlayVoices); + list.AddRange(voiceDictionaries.atkVoices.GetAllVoiceList()); + list.AddRange(voiceDictionaries.destroyVoices.GetAllVoiceList()); + AddVoiceList(list, voiceDictionaries.skillVoices); + SkillOptionValue skillOptionValue = new SkillOptionValue(cardParam.SkillOption); + string option = skillOptionValue.GetOption(SkillFilterCreator.ContentKeyword.skill); + if (!string.IsNullOrEmpty(option)) + { + Skill_attach_skill.AttachOptionInfo attachOptionInfo = new Skill_attach_skill.AttachOptionInfo(option); + if (attachOptionInfo.Voice != string.Empty) + { + VoiceDictionary item = new VoiceDictionary(attachOptionInfo.Voice); + voiceDictionaries.attachSkillVoices.Add(item); + } + } + bool flag = skillOptionValue.GetOption(SkillFilterCreator.ContentKeyword.is_evolve, "false") == "true"; + if (voiceDictionaries.attachSkillVoices.Count > 0 && !flag) + { + AddVoiceList(list, voiceDictionaries.attachSkillVoices, list); + } + MatchCollection matchCollection = new Regex("card_id=(?80\\d*)").Matches(cardParam.SkillOption); + _acceleratedVoiceIdList.Clear(); + for (int i = 0; i < matchCollection.Count; i++) + { + VoiceDictionaries voiceDictionaries2 = new VoiceDictionaries(int.Parse(matchCollection[i].Groups["ACC_CARD_ID"].Value), _cardMasterId); + list.AddRange(voiceDictionaries2.playVoices.GetAllVoiceList()); + string voiceId = voiceDictionaries2.VoiceId; + if (!string.IsNullOrEmpty(voiceId)) + { + _acceleratedVoiceIdList.Add(voiceId); + } + } + _voiceListBeforeEvo = GetPlayableVoiceList(list); + List list2 = new List(); + list2.AddRange(voiceDictionaries.evoVoices.GetAllVoiceList()); + list2.AddRange(voiceDictionaries.evoAtkVoices.GetAllVoiceList()); + list2.AddRange(voiceDictionaries.evoDestroyVoices.GetAllVoiceList()); + AddVoiceList(list2, voiceDictionaries.evoSkillVoices, list); + if (voiceDictionaries.attachSkillVoices.Count > 0 && flag) + { + AddVoiceList(list2, voiceDictionaries.attachSkillVoices, list2); + } + _voiceListAfterEvo = GetPlayableVoiceList(list2); + } + + private List GetPlayableVoiceList(List voiceList) + { + List list = new List(); + for (int i = 0; i < voiceList.Count; i++) + { + if (!Data.Master.CardDetailVoiceIgnoreList.Contains(voiceList[i])) + { + list.Add(voiceList[i]); + } + } + return list; + } + + private void AddVoiceList(List tempVoiceList, List voices, List normalVoiceList = null) + { + if (_splitVoiceList != null && normalVoiceList != null) + { + if (voices == null) + { + voices = _splitVoiceList; + } + else + { + for (int num = _splitVoiceList.Count - 1; num >= 0; num--) + { + voices.Insert(0, _splitVoiceList[num]); + } + } + } + if (voices == null || voices.Count <= 0) + { + return; + } + for (int i = 0; i < voices.Count; i++) + { + string[] allVoiceList = voices[i].GetAllVoiceList(); + foreach (string text in allVoiceList) + { + if (text.Contains("none") || tempVoiceList.Contains(text)) + { + continue; + } + if (text.Contains('|')) + { + if (_splitVoiceList == null) + { + _splitVoiceList = new List(); + _splitVoiceList.Add(voices[i]); + } + else if (!_splitVoiceList.Contains(voices[i])) + { + _splitVoiceList.Add(voices[i]); + } + string[] array = text.Split('|'); + if (array.Length == 2) + { + string item = ((normalVoiceList == null) ? array[0] : array[1]); + tempVoiceList.Add(item); + } + } + else if (normalVoiceList == null) + { + tempVoiceList.Add(text); + } + else if (!normalVoiceList.Contains(text)) + { + tempVoiceList.Add(text); + } + } + } + } + } + + private class CardVoiceManager + { + private int _cardId; + + private bool _isPlayEvoVoice; + + private CardVoiceData _voiceData; + + private int _playIndex; + + private List _playVoiceList; + + private List _loadVoiceIdList = new List(); + + private List _unloadVoiceIdList = new List(); + + private List _loadedVoiceIdList = new List(); + + private const string VOICE_DATA_PREFIX = "vo_"; + + public void SequentiallyPlay(CardParameter cardParam, bool isPlayEvoVoice, CardMaster.CardMasterId cardMasterId) + { + int cardId = cardParam.CardId; + if (cardId == _cardId) + { + if (isPlayEvoVoice != _isPlayEvoVoice) + { + _isPlayEvoVoice = isPlayEvoVoice; + _playIndex = 0; + _playVoiceList = (isPlayEvoVoice ? _voiceData._voiceListAfterEvo : _voiceData._voiceListBeforeEvo); + } + else + { + _playIndex = (_playIndex + 1) % _playVoiceList.Count; + } + Stop(); + Play(); + return; + } + _cardId = cardId; + _isPlayEvoVoice = isPlayEvoVoice; + CardVoiceData voiceData = _voiceData; + _voiceData = new CardVoiceData(cardParam, cardMasterId); + _playIndex = 0; + _playVoiceList = (isPlayEvoVoice ? _voiceData._voiceListAfterEvo : _voiceData._voiceListBeforeEvo); + float unloadWaitTime = Stop(); + LoadAndUnload(_voiceData, voiceData, unloadWaitTime, delegate + { + Play(); + }); + } + + private void Play() + { + GameMgr.GetIns().GetSoundMgr().PlayVoiceScenario("vo_" + _playVoiceList[_playIndex]); + } + + public float Stop() + { + return GameMgr.GetIns().GetSoundMgr().StopVoiceAll(); + } + + private void LoadAndUnload(CardVoiceData loadData, CardVoiceData unloadData, float unloadWaitTime = 0f, Action onFinishLoad = null) + { + _loadVoiceIdList.Clear(); + if (loadData != null) + { + _loadVoiceIdList.Add(loadData.MainVoiceId); + _loadVoiceIdList.AddRange(loadData._acceleratedVoiceIdList); + _loadVoiceIdList = _loadVoiceIdList.Distinct().ToList(); + } + _unloadVoiceIdList.Clear(); + if (unloadData != null) + { + _unloadVoiceIdList.Add(unloadData.MainVoiceId); + _unloadVoiceIdList.AddRange(unloadData._acceleratedVoiceIdList); + _unloadVoiceIdList = _unloadVoiceIdList.Distinct().ToList(); + } + List list = _loadVoiceIdList.Intersect(_unloadVoiceIdList).ToList(); + if (list.Count > 0) + { + _loadVoiceIdList = _loadVoiceIdList.Except(list).ToList(); + _unloadVoiceIdList = _unloadVoiceIdList.Except(list).ToList(); + } + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + int loadTargetCount = _loadVoiceIdList.Count; + if (loadTargetCount <= 0) + { + onFinishLoad.Call(); + } + else + { + int loadedCount = 0; + for (int i = 0; i < loadTargetCount; i++) + { + string text = _loadVoiceIdList[i]; + soundMgr.LoadVoice("vo_" + text, delegate + { + if (++loadedCount == loadTargetCount) + { + onFinishLoad.Call(); + } + }); + } + _loadedVoiceIdList.AddRange(_loadVoiceIdList); + } + for (int num = 0; num < _unloadVoiceIdList.Count; num++) + { + string unloadId = _unloadVoiceIdList[num]; + UIManager.GetInstance().StartCoroutine(Timer.DelayMethod(unloadWaitTime, delegate + { + soundMgr.UnloadVoice("vo_" + unloadId); + })); + _loadedVoiceIdList.Remove(unloadId); + } + } + + public void UnloadAll(float unloadWaitTime = 0f) + { + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + for (int i = 0; i < _loadedVoiceIdList.Count; i++) + { + string unloadId = _loadedVoiceIdList[i]; + UIManager.GetInstance().StartCoroutine(Timer.DelayMethod(unloadWaitTime, delegate + { + soundMgr.UnloadVoice("vo_" + unloadId); + })); + } + _loadedVoiceIdList.Clear(); + } + } + + private static readonly string RELATION_CARD_DISABLE_CARD_ID_HEADER = "80"; + + private static readonly int[] RELATION_CARD_BUTTON_DISABLE_CARD_IDS = new int[2] { 810014010, 810034010 }; + + private readonly List RELATION_CARD_SKILLOPTION_EXCLUDED_OPTIONS = new List { "effect_path", "se_path", "skill_voice" }; + + private readonly char[] RELATION_CARD_SKILLOPTION_SEPARATORS = new char[2] { '(', ')' }; + + [SerializeField] + private GameObject DarkPanel; + + [SerializeField] + private GameObject Frame; + + [SerializeField] + private GameObject CardTexture; + + [SerializeField] + private GameObject CardNum; + + [SerializeField] + private GameObject CardText; + + [SerializeField] + private GameObject CardViewBG; + + [SerializeField] + private GameObject CardShadow; + + [SerializeField] + private GameObject UnitCardStatusObj; + + [SerializeField] + private GameObject UnitCardIntroductionObj; + + [SerializeField] + private GameObject SettingCardStatusObj; + + [SerializeField] + private GameObject SettingCardIntroductionObj; + + [SerializeField] + private GameObject SpellCardStatusObj; + + [SerializeField] + private GameObject SpellCardIntroductionObj; + + [SerializeField] + private UIScrollView UnitCardTextScrollView; + + [SerializeField] + private UIScrollView SpellCardTextScrollView; + + [SerializeField] + private UIScrollView SettingCardTextScrollView; + + [SerializeField] + private UILabel UnitCardSkill; + + [SerializeField] + private UILabel UnitCardEvoSkill; + + [SerializeField] + private UILabel UnitCardAtkRight; + + [SerializeField] + private UILabel UnitCardLifeRight; + + [SerializeField] + private UILabel UnitCardEvoAtkRight; + + [SerializeField] + private UILabel UnitCardEvoLifeRight; + + [SerializeField] + private UILabel UnitCardIntroduction; + + [SerializeField] + private UILabel SpellCardSkill; + + [SerializeField] + private UILabel SpellCardIntroduction; + + [SerializeField] + private UILabel SettingCardSkill; + + [SerializeField] + private UILabel SettingCardIntroduction; + + [SerializeField] + private GameObject ReturnButton; + + [SerializeField] + private GameObject CardIntroductionButton; + + [SerializeField] + private UIButton _favoriteButton; + + [SerializeField] + private UIButton _voiceButton; + + [SerializeField] + private GameObject CardEvolButton; + + [SerializeField] + private UIButton _premiumCardConversionButton; + + [SerializeField] + private GameObject RelationWrapperObj; + + [SerializeField] + private GameObject RelationCardButton; + + [SerializeField] + private GameObject RightButton; + + [SerializeField] + private GameObject LeftButton; + + [SerializeField] + private GameObject RelationBackButton; + + [SerializeField] + private UILabel DialogTitleLabel; + + [SerializeField] + private UILabel _cardNumLabel; + + [SerializeField] + private UILabel _nameValueLabel; + + [SerializeField] + private UILabel _classValueLabel; + + [SerializeField] + private UILabel _typeValueLabel; + + [SerializeField] + private UILabel _redEtherHaveValueLabel; + + [SerializeField] + private UILabel _evolutionButtonLabel; + + [SerializeField] + private GameObject _cardVoiceLabelRoot; + + [SerializeField] + private UILabel _cardVoiceValueLabel; + + [SerializeField] + private GameObject _cardSetLabelRoot; + + [SerializeField] + private UILabel _cardSetValueLabel; + + [SerializeField] + private GameObject RedEtherFrame; + + [SerializeField] + private GameObject RedEtherIcon; + + [SerializeField] + private GameObject QuestionMark; + + [SerializeField] + private PurchaseConfirm PurchaseConfirmPrefab; + + [SerializeField] + private PremiumCardConversionDialogParts _premiumCardConversionDialogPrefab; + + [SerializeField] + private CardCraftPanel _craftPanel; + + [SerializeField] + private UIPanel[] _allPanel; + + [SerializeField] + private UIButton _blankColliderButton; + + private GameObject _rotationOnlyIconSpell; + + private GameObject _rotationOnlyIconFollower; + + private GameObject _rotationOnlyIconAmulet; + + private static readonly float kCARD_SCALE = 90f; + + private static readonly float kCARD_POS_Z = -4f; + + private readonly Vector3 CardViewScale = new Vector3(110f, 110f, 1f); + + private const float CARD_ANIMATION_TIME = 0.3f; + + private const float CARD_ROTATION = 0f; + + private static readonly Color CARD_LIQUEFY_PARTICLE_COLOR = new Color(1f, 0.2509804f, 0.2509804f); + + private static readonly Color CARD_CREATE_PARTICLE_COLOR = new Color(1f, 0.2509804f, 0.2509804f); + + private static readonly Color PREMIUM_CARD_CONVERSION_PARTICLE_COLOR = new Color(14f / 85f, 32f / 85f, 0.5568628f); + + private static readonly Vector3 CARD_DESTROY_PARTICLE_OFFSET = new Vector3(0f, 0f, -1f); + + private const string EVO_EFFECT_PATH = "cmn_deckedit_evo_1"; + + private const float EVO_EFFECT_SCALE = 600f; + + private const float FAVORITE_BUTTON_INVALID_TIME = 0.9f; + + private const int PREMIUM_CARD_CONVERSION_PARTICLE_NUM = 4; + + private const int KEYWORD_DIALOG_DEPTH = 120; + + private const int KEYWORD_DIALOG_POSITION_Z = -5; + + private const int KEYWORD_DIALOG_POSITION_Y = 0; + + private static readonly Vector3 KEYWORD_DIALOG_BACK_VIEW_POSITION = new Vector3(0f, 0f, -5f); + + private GameObject UnitCardObject; + + private GameObject SpellCardObject; + + private GameObject FieldCardObject; + + private GameObject ViewCardObject; + + private UILabel UnitCost; + + private UILabel UnitAtk; + + private UILabel UnitLife; + + private UILabel UnitName; + + private UILabel SpellCost; + + private UILabel SpellName; + + private UILabel FieldCost; + + private UILabel FieldName; + + private BoxCollider UnitCardCollider; + + private BoxCollider SpellCardCollider; + + private BoxCollider FieldCardCollider; + + private bool _isFavorite; + + private bool _isFavoriteButtonEnabled; + + private bool _isEvolCard; + + private bool _isShowCardAblityText = true; + + private bool _shouldResetTextScrollView; + + private bool isCardViewMode; + + private bool isAnimation; + + [SerializeField] + private TextLineCreater _cardSkillTextLineCreater; + + [SerializeField] + private TextLineCreater _cardEvoSkillTextLineCreater; + + [SerializeField] + private TextLineCreater _cardSpellTextLineCreater; + + [SerializeField] + private TextLineCreater _cardAmuletTextLineCreater; + + [SerializeField] + private GameObject _evolveInfoObjectRoot; + + [SerializeField] + private UILabel _normalTitleLavel; + + private int _relationIndex; + + private List _relationCardIds = new List(); + + private Dictionary> _relationCardParentDict = new Dictionary>(); + + private GameObject _relationCardBaseGameObject; + + private int LayerDetail = 14; + + private bool isDetailOn; + + private ParticleSystem _evolEffect; + + private bool IsAnimationPlaying; + + private DialogBase _craftDialog; + + private DialogBase _keyWordDialog; + + private List _assetPathList = new List(); + + private List _assetTokenPathList = new List(); + + private CardVoiceManager _cardVoiceManager = new CardVoiceManager(); + + private bool _isAbleTapDialogObject = true; + + private static Shader _normalShader = null; + + private static Shader _premiumShader = null; + + private DialogBase _dialogForClose; + + private Material _cardMaterial; + + private int _originalCardId; + + private CardMaster.CardMasterId _cardMasterId; + + private UIButton[] _enableButtonList; + + private IFormatBehavior _formatBehaviorForCardPoolChange; + + public Action OnCardSellId; + + public Action OnCardBuy; + + public Action OnClose; + + public Action OnDragCard; + + public Action OnLiquefyAllCard; + + public Action OnChangeCardFavoriteState; + + public Action OnConvertedPremiumCard; + + public Action OnCreateFirstCard; + + private bool _isCardTextDialogLayerSet = true; + + private bool _isOwnCardNum; + + public CardParameter CardData { get; private set; } + + public Action OnDetailCardUpdate { get; set; } + + public Action OnCardNumChange { get; set; } + + private bool IsAbleToCraft + { + get + { + if (PlayerStaticData.UserRedEtherCount >= CardData.UseRedEther && !CardData.IsFoil) + { + if (GetPossessionCardNum(isIncludingSpotCard: true) >= 3) + { + return GetPossessionCardNum() == 0; + } + return true; + } + return false; + } + } + + private bool IsAbleToDestruct => GetPossessionCardNum() > 0; + + public bool IsShowFlavorTextButton { get; set; } + + public bool IsShowFavoriteButton { get; set; } + + public bool IsShowVoiceButton { get; set; } + + public bool IsShowEvolutionButton { get; set; } + + public bool IsShowCraftButtons { get; set; } + + public bool IsShowPremiumCardConversionButton { get; set; } + + public bool IsPopularityVote { get; set; } + + public bool IsCardTextDialogLayerSet + { + get + { + return _isCardTextDialogLayerSet; + } + set + { + _isCardTextDialogLayerSet = value; + } + } + + public bool IsOwnCardNum + { + get + { + return _isOwnCardNum; + } + set + { + _isOwnCardNum = value; + } + } + + public bool IsShortageUI { get; set; } + + public bool IsRelationCardViewing => RelationWrapperObj.activeSelf; + + public bool LeftButtonVisible + { + set + { + LeftButton.SetActive(value); + } + } + + public bool RightButtonVisible + { + set + { + RightButton.SetActive(value); + } + } + + public bool IsEvolCard => _isEvolCard; + + public bool IsEnableShowDetail + { + get + { + if (IsAnimationPlaying) + { + return false; + } + return true; + } + } + + private void OnDisable() + { + if (isCardViewMode) + { + RemoveCardViewMode(); + } + isDetailOn = false; + } + + public void Hide() + { + base.gameObject.SetActive(value: false); + if (_keyWordDialog != null) + { + _keyWordDialog.Close(); + } + if (IsAnimationPlaying) + { + iTween.Stop(UnitCardObject); + iTween.Stop(SpellCardObject); + iTween.Stop(FieldCardObject); + OnAnimationOver(); + } + DestroyDialogObject(); + } + + protected override void OnDestroy() + { + Toolbox.ResourcesManager.RemoveAssetGroup(_assetPathList); + _assetPathList.Clear(); + Toolbox.ResourcesManager.RemoveAssetGroup(_assetTokenPathList); + _assetTokenPathList.Clear(); + float unloadWaitTime = _cardVoiceManager.Stop(); + _cardVoiceManager.UnloadAll(unloadWaitTime); + if (_keyWordDialog != null) + { + _keyWordDialog.Close(); + } + if (_cardMaterial != null) + { + UnityEngine.Object.Destroy(_cardMaterial); + } + DestroyDialogObject(); + base.OnDestroy(); + } + + private void DestroyDialogObject() + { + if (_dialogForClose != null) + { + UnityEngine.Object.Destroy(_dialogForClose.gameObject); + _dialogForClose = null; + } + } + + public void Initialize(int DetailLayer, CardMaster.CardMasterId cardMasterId, IFormatBehavior formatBehaviorForCardPoolChange = null) + { + _formatBehaviorForCardPoolChange = formatBehaviorForCardPoolChange; + ChangeCardMaster(cardMasterId); + LayerDetail = DetailLayer; + base.gameObject.layer = LayerDetail; + InitializeCard(); + SetButtonEvent(); + SetDisableArrowButton(); + _enableButtonList = GetComponentsInChildren(includeInactive: true); + } + + public void ChangeCardMaster(CardMaster.CardMasterId cardMasterId) + { + _cardMasterId = cardMasterId; + } + + private void InitializeCard() + { + InitializeCardObject(); + InitializeCardMesh(); + InitializeCardDecoration(); + } + + private void InitializeCardObject() + { + UnitCardObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("Unit", ResourcesManager.AssetLoadPathType.HandCard, isfetch: true)) as GameObject; + SpellCardObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("Spell", ResourcesManager.AssetLoadPathType.HandCard, isfetch: true)) as GameObject; + FieldCardObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("Field", ResourcesManager.AssetLoadPathType.HandCard, isfetch: true)) as GameObject; + UnitCardObject = NGUITools.AddChild(CardTexture, UnitCardObject); + UnitCardObject.SetActive(value: false); + SpellCardObject = NGUITools.AddChild(CardTexture, SpellCardObject); + SpellCardObject.SetActive(value: false); + FieldCardObject = NGUITools.AddChild(CardTexture, FieldCardObject); + FieldCardObject.SetActive(value: false); + Transform obj = SpellCardObject.transform; + Vector3 localPosition = (FieldCardObject.transform.localPosition = new Vector3(0f, 0f, -500f)); + obj.localPosition = localPosition; + UIManager.GetInstance().SetLayerRecursive(UnitCardObject.transform, LayerDetail); + UIManager.GetInstance().SetLayerRecursive(SpellCardObject.transform, LayerDetail); + UIManager.GetInstance().SetLayerRecursive(FieldCardObject.transform, LayerDetail); + UnitCardCollider = UnitCardObject.AddComponent(); + SpellCardCollider = SpellCardObject.AddComponent(); + FieldCardCollider = FieldCardObject.AddComponent(); + BoxCollider unitCardCollider = UnitCardCollider; + BoxCollider spellCardCollider = SpellCardCollider; + Vector3 vector2 = (FieldCardCollider.size = new Vector3(3.6f, 5.5f, 1f)); + localPosition = (spellCardCollider.size = vector2); + unitCardCollider.size = localPosition; + UIWidget uIWidget = UnitCardObject.AddComponent(); + UIWidget uIWidget2 = SpellCardObject.AddComponent(); + UIWidget uIWidget3 = FieldCardObject.AddComponent(); + int num = (uIWidget3.depth = 1); + int depth = (uIWidget2.depth = num); + uIWidget.depth = depth; + GameObject prefab = Resources.Load("Prefab/CardDeco/RotationOnlyIcon") as GameObject; + _rotationOnlyIconSpell = NGUITools.AddChild(SpellCardObject, prefab); + _rotationOnlyIconFollower = NGUITools.AddChild(UnitCardObject, prefab); + _rotationOnlyIconAmulet = NGUITools.AddChild(FieldCardObject, prefab); + } + + private void InitializeCardMesh() + { + MeshFilter[] componentsInChildren = UnitCardObject.GetComponentsInChildren(); + Mesh sharedMesh = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_unit", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + Mesh sharedMesh2 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_unit_low", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + componentsInChildren[0].sharedMesh = sharedMesh; + componentsInChildren[1].sharedMesh = sharedMesh2; + Quaternion quaternion = Quaternion.Euler(0f, componentsInChildren[0].transform.rotation.y + 180f, 0f); + Transform obj = componentsInChildren[0].transform; + Quaternion rotation = (componentsInChildren[1].transform.rotation = quaternion); + obj.rotation = rotation; + MeshFilter[] componentsInChildren2 = SpellCardObject.GetComponentsInChildren(); + Mesh sharedMesh3 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_spell", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + Mesh sharedMesh4 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_spell_low", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + componentsInChildren2[0].sharedMesh = sharedMesh3; + componentsInChildren2[1].sharedMesh = sharedMesh4; + Quaternion quaternion3 = Quaternion.Euler(0f, componentsInChildren2[0].transform.rotation.y + 180f, 0f); + Transform obj2 = componentsInChildren2[0].transform; + rotation = (componentsInChildren2[1].transform.rotation = quaternion3); + obj2.rotation = rotation; + MeshFilter[] componentsInChildren3 = FieldCardObject.GetComponentsInChildren(); + Mesh sharedMesh5 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_field", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + Mesh sharedMesh6 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("md_card_field_low", ResourcesManager.AssetLoadPathType.CardFrameMesh, isfetch: true)); + componentsInChildren3[0].sharedMesh = sharedMesh5; + componentsInChildren3[1].sharedMesh = sharedMesh6; + Quaternion quaternion5 = Quaternion.Euler(0f, componentsInChildren3[0].transform.rotation.y + 180f, 0f); + Transform obj3 = componentsInChildren3[0].transform; + rotation = (componentsInChildren3[1].transform.rotation = quaternion5); + obj3.rotation = rotation; + } + + private void InitializeCardDecoration() + { + GameObject prefab = Resources.Load("Prefab/CardDeco/Cost") as GameObject; + GameObject prefab2 = Resources.Load("Prefab/CardDeco/Atk") as GameObject; + GameObject prefab3 = Resources.Load("Prefab/CardDeco/Life") as GameObject; + GameObject prefab4 = Resources.Load("Prefab/CardDeco/Name") as GameObject; + GameObject gameObject = NGUITools.AddChild(UnitCardObject, prefab); + GameObject gameObject2 = NGUITools.AddChild(UnitCardObject, prefab2); + GameObject gameObject3 = NGUITools.AddChild(UnitCardObject, prefab3); + GameObject gameObject4 = NGUITools.AddChild(UnitCardObject, prefab4); + GameObject gameObject5 = NGUITools.AddChild(SpellCardObject, prefab); + GameObject gameObject6 = NGUITools.AddChild(SpellCardObject, prefab4); + GameObject gameObject7 = NGUITools.AddChild(FieldCardObject, prefab); + GameObject gameObject8 = NGUITools.AddChild(FieldCardObject, prefab4); + Transform obj = gameObject.transform; + Transform obj2 = gameObject5.transform; + Vector3 vector = (gameObject7.transform.localPosition = Global.POSITION_COST_ICON); + Vector3 localPosition = (obj2.localPosition = vector); + obj.localPosition = localPosition; + Transform obj3 = gameObject.transform; + Transform obj4 = gameObject5.transform; + vector = (gameObject7.transform.localScale = Global.SCALE_CARD_ICON); + localPosition = (obj4.localScale = vector); + obj3.localScale = localPosition; + Transform obj5 = gameObject4.transform; + Transform obj6 = gameObject6.transform; + vector = (gameObject8.transform.localPosition = Global.POSITION_NAME_TEXT); + localPosition = (obj6.localPosition = vector); + obj5.localPosition = localPosition; + Transform obj7 = gameObject4.transform; + Transform obj8 = gameObject6.transform; + vector = (gameObject8.transform.localScale = Global.SCALE_NAME_TEXT); + localPosition = (obj8.localScale = vector); + obj7.localScale = localPosition; + gameObject2.transform.localPosition = Global.POSITION_ATK_ICON; + gameObject3.transform.localPosition = Global.POSITION_LIFE_ICON; + Transform obj9 = gameObject2.transform; + localPosition = (gameObject3.transform.localScale = Global.SCALE_CARD_ICON); + obj9.localScale = localPosition; + UnitCost = gameObject.transform.Find("CostLabel").GetComponent(); + UnitAtk = gameObject2.transform.Find("AtkLabel").GetComponent(); + UnitLife = gameObject3.transform.Find("LifeLabel").GetComponent(); + UnitName = gameObject4.transform.Find("NameLabel").GetComponent(); + SpellCost = gameObject5.transform.Find("CostLabel").GetComponent(); + SpellName = gameObject6.transform.Find("NameLabel").GetComponent(); + FieldCost = gameObject7.transform.Find("CostLabel").GetComponent(); + FieldName = gameObject8.transform.Find("NameLabel").GetComponent(); + } + + private void SetButtonEvent() + { + UIEventListener uIEventListener = UIEventListener.Get(ReturnButton); + uIEventListener.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener.onClick, new UIEventListener.VoidDelegate(OnPushCardDetailOn)); + UIEventListener uIEventListener2 = UIEventListener.Get(_blankColliderButton.gameObject); + uIEventListener2.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener2.onClick, new UIEventListener.VoidDelegate(OnPushCardDetailOn)); + UIEventListener uIEventListener3 = UIEventListener.Get(DarkPanel.gameObject); + uIEventListener3.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener3.onClick, new UIEventListener.VoidDelegate(OnPushCardDetailOn)); + UIEventListener uIEventListener4 = UIEventListener.Get(Frame.gameObject); + uIEventListener4.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener4.onClick, new UIEventListener.VoidDelegate(OnPushCardDetailOn)); + UIEventListener uIEventListener5 = UIEventListener.Get(CardIntroductionButton); + uIEventListener5.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener5.onClick, new UIEventListener.VoidDelegate(OnClickChangeCardTextTypeButton)); + UIEventListener uIEventListener6 = UIEventListener.Get(CardViewBG); + uIEventListener6.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener6.onClick, new UIEventListener.VoidDelegate(OnCloseCardViewMode)); + UIEventListener uIEventListener7 = UIEventListener.Get(UnitCardObject); + uIEventListener7.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener7.onClick, new UIEventListener.VoidDelegate(OnOpenCardViewMode)); + UIEventListener uIEventListener8 = UIEventListener.Get(SpellCardObject); + uIEventListener8.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener8.onClick, new UIEventListener.VoidDelegate(OnOpenCardViewMode)); + UIEventListener uIEventListener9 = UIEventListener.Get(FieldCardObject); + uIEventListener9.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener9.onClick, new UIEventListener.VoidDelegate(OnOpenCardViewMode)); + UIEventListener uIEventListener10 = UIEventListener.Get(_favoriteButton.gameObject); + uIEventListener10.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener10.onClick, new UIEventListener.VoidDelegate(OnClickFavoriteButton)); + UIEventListener uIEventListener11 = UIEventListener.Get(_voiceButton.gameObject); + uIEventListener11.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener11.onClick, new UIEventListener.VoidDelegate(OnClickVoiceButton)); + UIEventListener uIEventListener12 = UIEventListener.Get(_premiumCardConversionButton.gameObject); + uIEventListener12.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener12.onClick, new UIEventListener.VoidDelegate(OnClickPremiumCardConversionButton)); + UIEventListener uIEventListener13 = UIEventListener.Get(CardEvolButton); + uIEventListener13.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener13.onClick, new UIEventListener.VoidDelegate(OnClickEvolutionButton)); + UIEventListener uIEventListener14 = UIEventListener.Get(UnitCardObject); + uIEventListener14.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener14.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener15 = UIEventListener.Get(SpellCardObject); + uIEventListener15.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener15.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener16 = UIEventListener.Get(FieldCardObject); + uIEventListener16.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener16.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener17 = UIEventListener.Get(Frame); + uIEventListener17.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener17.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener18 = UIEventListener.Get(CardText); + uIEventListener18.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener18.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener19 = UIEventListener.Get(QuestionMark); + uIEventListener19.onDrag = (UIEventListener.VectorDelegate)Delegate.Combine(uIEventListener19.onDrag, new UIEventListener.VectorDelegate(OnSwipeCard)); + UIEventListener uIEventListener20 = UIEventListener.Get(RelationCardButton); + uIEventListener20.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener20.onClick, new UIEventListener.VoidDelegate(OnPushRelationCardButton)); + UIEventListener uIEventListener21 = UIEventListener.Get(RelationBackButton); + uIEventListener21.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener21.onClick, new UIEventListener.VoidDelegate(OnPushRelationBackButton)); + UIEventListener uIEventListener22 = UIEventListener.Get(RightButton); + uIEventListener22.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener22.onClick, new UIEventListener.VoidDelegate(OnPushRightButton)); + UIEventListener uIEventListener23 = UIEventListener.Get(LeftButton); + uIEventListener23.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener23.onClick, new UIEventListener.VoidDelegate(OnPushLeftButton)); + Action onClickDestructBtn = delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + CreateDialog(StartCardDestruct, buy: false); + }; + Action onClickCreateBtn = delegate + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + CreateDialog(StartCardCraft, buy: true); + }; + _craftPanel.Init(onClickCreateBtn, onClickDestructBtn); + UIEventListener.Get(QuestionMark).onClick = delegate + { + if (_isAbleTapDialogObject) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + UILabel keyWordLabel = GetKeyWordLabel(); + string empty = string.Empty; + empty = ((!CardData.IsEvolveChoiceCard) ? (CardData.ConvertedSkillDescription + CardData.ConvertedEvoSkillDescription) : CardData.ConvertedEvoSkillDescription); + _keyWordDialog = BattlePlayerView.CreateKeyPanel(empty, keyWordLabel, _cardMasterId); + UIManager.ViewScene currentScene = UIManager.GetInstance().GetCurrentScene(); + if ((currentScene == UIManager.ViewScene.Battle || currentScene == UIManager.ViewScene.LoginBonus || currentScene == UIManager.ViewScene.Colosseum || currentScene == UIManager.ViewScene.LotteryPage || currentScene == UIManager.ViewScene.QuestSelectionPage) && IsCardTextDialogLayerSet) + { + _keyWordDialog.SetPanelDepth(120); + Vector3 localPosition = _keyWordDialog.gameObject.transform.localPosition; + localPosition.z = -5f; + localPosition.y = 0f; + _keyWordDialog.gameObject.transform.localPosition = localPosition; + ChangeLayer(_keyWordDialog.gameObject, LayerDetail); + _keyWordDialog.SetBackViewLayer(LayerDetail); + _keyWordDialog.SetBackViewPosition(KEYWORD_DIALOG_BACK_VIEW_POSITION); + UIPanel[] componentsInChildren = _keyWordDialog.InsideObject.GetComponentsInChildren(); + for (int i = 0; i < componentsInChildren.Length; i++) + { + componentsInChildren[i].depth += 120; + } + } + } + }; + UIEventListener uIEventListener24 = UIEventListener.Get(QuestionMark); + uIEventListener24.onPress = (UIEventListener.BoolDelegate)Delegate.Combine(uIEventListener24.onPress, (UIEventListener.BoolDelegate)delegate(GameObject g, bool b) + { + UILabel keyWordLabel = GetKeyWordLabel(); + if (keyWordLabel != null) + { + BattlePlayerView.PressKeyWordColorChange(keyWordLabel, b); + } + }); + UIEventListener uIEventListener25 = UIEventListener.Get(QuestionMark); + uIEventListener25.onDragStart = (UIEventListener.VoidDelegate)Delegate.Combine(uIEventListener25.onDragStart, (UIEventListener.VoidDelegate)delegate + { + if (UnitCardTextScrollView.gameObject.activeInHierarchy) + { + BattlePlayerView.SetKeyWordLabelColor(UnitCardSkill); + BattlePlayerView.SetKeyWordLabelColor(UnitCardEvoSkill); + } + else + { + UILabel keyWordLabel = GetKeyWordLabel(); + if (keyWordLabel != null) + { + BattlePlayerView.SetKeyWordLabelColor(keyWordLabel); + } + } + }); + } + + private void AddAtlasOverrider(DialogBase dialog) + { + UIAtlas component = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("dummy", ResourcesManager.AssetLoadPathType.QuestAtlas, isfetch: true)).GetComponent(); + UISpriteAtlasOverwriter.TargetObject[] targetObjects = new UISpriteAtlasOverwriter.TargetObject[1] + { + new UISpriteAtlasOverwriter.TargetObject(dialog.gameObject, includeChildren: true) + }; + dialog.gameObject.AddMissingComponent().Init(component, targetObjects); + } + + private UILabel GetKeyWordLabel() + { + if (UnitCardTextScrollView.gameObject.activeInHierarchy) + { + Transform parent = UnitCardSkill.transform.parent; + UnitCardSkill.transform.SetParent(base.transform); + Vector3 vector = UnitCardSkill.transform.localPosition - new Vector3(0f, UnitCardSkill.printedSize.y, 0f); + UnitCardSkill.transform.SetParent(parent); + Vector3 vector2 = base.transform.InverseTransformPoint(UICamera.lastHit.point); + if (vector.y < vector2.y) + { + if (!string.IsNullOrEmpty(UnitCardSkill.text) && UnitCardSkill.text != " ") + { + return UnitCardSkill; + } + if (!string.IsNullOrEmpty(UnitCardEvoSkill.text) && UnitCardEvoSkill.text != " ") + { + return UnitCardEvoSkill; + } + } + else + { + if (!string.IsNullOrEmpty(UnitCardEvoSkill.text) && UnitCardEvoSkill.text != " ") + { + return UnitCardEvoSkill; + } + if (!string.IsNullOrEmpty(UnitCardSkill.text) && UnitCardSkill.text != " ") + { + return UnitCardSkill; + } + } + } + else + { + if (SpellCardTextScrollView.gameObject.activeInHierarchy) + { + return SpellCardSkill; + } + if (SettingCardTextScrollView.gameObject.activeInHierarchy) + { + return SettingCardSkill; + } + } + return null; + } + + public void OnPushCardDetailOn(GameObject g) + { + if (_isAbleTapDialogObject && ShowCardDetail(g)) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_INFO); + } + } + + public bool ShowCardDetail(GameObject g) + { + if (isDetailOn) + { + CloseDefault(playSe: true); + return false; + } + if (!IsEnableShowDetail) + { + return false; + } + CharIdx component = g.GetComponent(); + if (!component) + { + return false; + } + isDetailOn = true; + IsAnimationPlaying = true; + base.gameObject.SetActive(value: true); + DarkPanel.SetActive(value: true); + DestroyDialogObject(); + _dialogForClose = UIManager.GetInstance().DialogManager.CreateDialogBaseOpenCardDetail(this); + SetCardDetail(component.GetCardId(), g); + OpenCardAnimation(); + return true; + } + + private void OpenCardAnimation() + { + iTween.Stop(CardNum.gameObject); + if (GetPossessionCardNum(isIncludingSpotCard: true) > 0) + { + CardNum.transform.localScale = new Vector3(0.01f, 0.01f, 1f); + iTween.ScaleTo(CardNum.gameObject, iTween.Hash("scale", new Vector3(1f, 1f, 1f), "time", 0.3f)); + } + else + { + CardNum.transform.localScale = new Vector3(1f, 1f, 1f); + } + GameObject gameObject = null; + CardBasePrm.CharaType charType = CardData.CharType; + gameObject = (CardBasePrm.IsFollowerCard(charType) ? UnitCardObject : ((!CardBasePrm.IsSpellCard(charType)) ? FieldCardObject : SpellCardObject)); + gameObject.transform.localScale = new Vector3(1f, 1f, 1f); + iTween.Stop(gameObject); + iTween.ScaleTo(gameObject, iTween.Hash("islocal", true, "scale", new Vector3(kCARD_SCALE, kCARD_SCALE, 1f), "time", 0.3f, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(gameObject, iTween.Hash("islocal", true, "x", 0f, "y", 0f, "z", kCARD_POS_Z, "time", 0.3f, "oncompletetarget", base.gameObject, "oncomplete", "OnAnimationOver", "easetype", iTween.EaseType.easeOutExpo)); + } + + private void OnAnimationOver() + { + IsAnimationPlaying = false; + BoxCollider unitCardCollider = UnitCardCollider; + BoxCollider spellCardCollider = SpellCardCollider; + Vector3 vector = (FieldCardCollider.size = new Vector3(3.6f, 5.5f, 1f)); + Vector3 size = (spellCardCollider.size = vector); + unitCardCollider.size = size; + } + + public void CloseDefault(bool playSe) + { + if (!isDetailOn || isAnimation || IsAnimationPlaying) + { + return; + } + if (isCardViewMode) + { + OnCloseCardViewMode(); + return; + } + isDetailOn = false; + DarkPanel.SetActive(value: false); + if (base.gameObject.activeSelf && playSe) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL); + } + base.gameObject.SetActive(value: false); + if (_evolEffect != null) + { + UnityEngine.Object.Destroy(_evolEffect.gameObject); + } + Toolbox.ResourcesManager.RemoveAssetGroup(_assetPathList); + Toolbox.ResourcesManager.RemoveAssetGroup(_assetTokenPathList); + _assetTokenPathList.Clear(); + DestroyDialogObject(); + OnClose.Call(); + } + + private void SetCardDetail(int cardId, GameObject card2dObj = null, bool isUpdateRelation = true) + { + CardData = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId); + if (isUpdateRelation) + { + RelationWrapperObj.SetActive(value: false); + } + iTween.Stop(base.gameObject); + _isEvolCard = CardData.IsEvolveChoiceCard; + _isShowCardAblityText = true; + UpdateCardImage(); + SystemText systemText = Data.SystemText; + _nameValueLabel.text = CardData.CardName; + string key = "Common_01" + ((int)(4 + CardData.Clan)).ToString("00"); + _classValueLabel.text = systemText.Get(key); + _typeValueLabel.text = CardData.TribeName; + if (_typeValueLabel.text == "ALL") + { + _typeValueLabel.text = "-"; + } + UpdateCardText(); + _isFavoriteButtonEnabled = true; + UpdateButtonState(); + UpdateCreateLiquefyButton(); + if (isUpdateRelation) + { + UpdateRelation(cardId); + DialogTitleLabel.text = Data.SystemText.Get("Card_0135"); + } + UpdateCardNum(card2dObj); + if (!IsRelationCardViewing) + { + _relationCardBaseGameObject = card2dObj; + OnDetailCardUpdate.Call(); + } + } + + private void UpdateRelation(int cardId) + { + _relationCardIds.Clear(); + _relationCardParentDict.Clear(); + _relationIndex = 0; + _originalCardId = cardId; + if (RELATION_CARD_BUTTON_DISABLE_CARD_IDS.Contains(cardId)) + { + RelationCardButton.SetActive(value: false); + return; + } + CardMaster instance = CardMaster.GetInstance(_cardMasterId); + if (instance != null) + { + List allParams = new List(instance.GetAllParameters()); + ParseIdsFunc(allParams, cardId); + } + IDictionary> relationCardSortDic = Data.Master.RelationCardSortDic; + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardId); + if (relationCardSortDic.ContainsKey(cardParameterFromId.NormalCardId)) + { + _relationCardIds = new List(relationCardSortDic[cardParameterFromId.NormalCardId]); + } + else + { + _relationCardIds = SortRelationCardByKeyWordTextOrder(_relationCardIds); + } + bool flag = false; + foreach (int relationCardId in _relationCardIds) + { + if (relationCardSortDic.ContainsKey(relationCardId)) + { + flag = true; + break; + } + } + if (!relationCardSortDic.ContainsKey(cardParameterFromId.NormalCardId) && flag) + { + _relationCardIds = SortPartOfRelationCard(_relationCardIds, cardParameterFromId.NormalCardId); + } + } + + private static List SortPartOfRelationCard(List originalList, int cardId) + { + List list = new List(); + list.AddRange(originalList); + IDictionary> relationCardSortDic = Data.Master.RelationCardSortDic; + foreach (int original in originalList) + { + if (!relationCardSortDic.TryGetValue(original, out var value)) + { + continue; + } + List list2 = new List(); + for (int i = 0; i < value.Count; i++) + { + int num = value[i]; + for (int j = 0; j < originalList.Count; j++) + { + if (originalList[j] == num) + { + list2.Add(j); + break; + } + } + } + list2.Sort(); + for (int k = 0; k < list2.Count; k++) + { + int index = list2[k]; + list[index] = value[k]; + } + } + return list; + } + + private List SortRelationCardByKeyWordTextOrder(List originalList) + { + if (originalList.Count < 2) + { + return originalList; + } + List sortedCardIdList = new List(); + List keywordListInCard = GetKeywordListInCard(CardData.CardId); + for (int i = 0; i < keywordListInCard.Count; i++) + { + List cardIdsInKeyword = GetCardIdsInKeyword(keywordListInCard[i]); + if (cardIdsInKeyword.Count == 0) + { + continue; + } + int num = cardIdsInKeyword[0]; + if (!originalList.Contains(num)) + { + continue; + } + if (!sortedCardIdList.Contains(num)) + { + sortedCardIdList.Add(num); + } + List keywordListInCard2 = GetKeywordListInCard(num); + for (int j = 0; j < keywordListInCard2.Count; j++) + { + List cardIdsInKeyword2 = GetCardIdsInKeyword(keywordListInCard2[j]); + if (cardIdsInKeyword2.Count == 0) + { + continue; + } + for (int k = 0; k < cardIdsInKeyword2.Count; k++) + { + int num2 = cardIdsInKeyword2[k]; + if (originalList.Contains(num2) && !sortedCardIdList.Contains(num2)) + { + sortedCardIdList.Add(num2); + } + if (k > 0) + { + AddNonAppearedRelationCardId(num2, ref sortedCardIdList); + } + } + AddNonAppearedRelationCardId(cardIdsInKeyword2[0], ref sortedCardIdList); + } + AddNonAppearedRelationCardId(num, ref sortedCardIdList); + } + foreach (int original in originalList) + { + if (!sortedCardIdList.Contains(original)) + { + sortedCardIdList.Add(original); + } + } + return sortedCardIdList; + } + + private void AddNonAppearedRelationCardId(int parentCardId, ref List sortedCardIdList) + { + if (!_relationCardParentDict.TryGetValue(parentCardId, out var value)) + { + return; + } + foreach (int item in value) + { + if (!sortedCardIdList.Contains(item)) + { + sortedCardIdList.Add(item); + } + } + } + + private List GetKeywordListInCard(int cardId) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId); + List list = BattleKeywordInfoListMgr.GetKeywords(cardParameterFromId.ConvertedSkillDescription).ToList(); + if (CardBasePrm.IsFollowerCard(CardData.CharType)) + { + list.AddRange(BattleKeywordInfoListMgr.GetKeywords(cardParameterFromId.ConvertedEvoSkillDescription).ToList()); + } + return list; + } + + private List GetCardIdsInKeyword(string keyword) + { + List list = new List(); + if (Data.Master.BattleKeyWordDic.ContainsKey(keyword)) + { + list.AddRange(BattleKeywordInfoListMgr.GetCardIdsInDesc(Data.Master.BattleKeyWordDic[keyword])); + } + return list; + } + + private void UpdateCardImage() + { + CardMaster instance = CardMaster.GetInstance(_cardMasterId); + int cardId = CardData.CardId; + CardParameter cardParameterFromId = instance.GetCardParameterFromId(cardId); + int resourceCardId = cardParameterFromId.ResourceCardId; + int rarity = CardData.Rarity; + CardBasePrm.CharaType charType = CardData.CharType; + GameObject gameObject = null; + Material material = null; + bool flag = CardBasePrm.IsFollowerCard(charType); + bool flag2 = CardBasePrm.IsSpellCard(charType); + bool flag3 = CardBasePrm.IsAmuletCard(charType); + UnitCardObject.SetActive(flag && !flag2 && !flag3); + SpellCardObject.SetActive(!flag && flag2 && !flag3); + FieldCardObject.SetActive(!flag && !flag2 && flag3); + if (flag2) + { + gameObject = SpellCardObject; + try + { + material = Toolbox.ResourcesManager.FindCardMaterial(resourceCardId, ResourcesManager.AssetLoadPathType.SpellCardMaterial, isEvol: false, CardMaster.IsMutationCardCheck(instance.GetCardParameterFromId(cardId).BaseCardId), instance.GetCardParameterFromId(resourceCardId).CharType); + CardShaderDefine.ReplaceShader(material); + } + catch (Exception ex) + { + Debug.LogError(ex.ToString()); + LocalLog.AccumulateTraceLog(ex.ToString()); + } + _rotationOnlyIconSpell.SetActive(cardParameterFromId.IsResurgentCard); + SpellCost.text = CardData.Cost.ToString(); + SpellName.text = CardData.CardName; + Global.SetRepositionNameLabel(SpellName, CardData.CardName, is2D: false); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(SpellCost, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(SpellName, CardData.IsFoil); + } + else if (flag3) + { + gameObject = FieldCardObject; + try + { + material = Toolbox.ResourcesManager.FindCardMaterial(resourceCardId, ResourcesManager.AssetLoadPathType.SpellCardMaterial, isEvol: false, CardMaster.IsMutationCardCheck(instance.GetCardParameterFromId(cardId).BaseCardId), instance.GetCardParameterFromId(resourceCardId).CharType); + CardShaderDefine.ReplaceShader(material); + } + catch (Exception ex2) + { + Debug.LogError(ex2.ToString()); + LocalLog.AccumulateTraceLog(ex2.ToString()); + } + _rotationOnlyIconAmulet.SetActive(cardParameterFromId.IsResurgentCard); + FieldCost.text = CardData.Cost.ToString(); + FieldName.text = CardData.CardName; + Global.SetRepositionNameLabel(FieldName, CardData.CardName, is2D: false); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(FieldCost, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(FieldName, CardData.IsFoil); + } + else if (flag) + { + gameObject = UnitCardObject; + try + { + material = Toolbox.ResourcesManager.FindCardMaterial(resourceCardId, ResourcesManager.AssetLoadPathType.UnitCardMaterial, _isEvolCard); + CardShaderDefine.ReplaceShader(material); + } + catch (Exception ex3) + { + Debug.LogError(ex3.ToString()); + LocalLog.AccumulateTraceLog(ex3.ToString()); + } + _rotationOnlyIconFollower.SetActive(cardParameterFromId.IsResurgentCard); + UnitCost.text = CardData.Cost.ToString(); + UnitAtk.text = (_isEvolCard ? CardData.EvoAtk.ToString() : CardData.Atk.ToString()); + UnitLife.text = (_isEvolCard ? CardData.EvoLife.ToString() : CardData.Life.ToString()); + UnitName.text = CardData.CardName; + Global.SetRepositionNameLabel(UnitName, CardData.CardName, is2D: false); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(UnitCost, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(UnitAtk, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(UnitLife, CardData.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(UnitName, CardData.IsFoil); + } + if (material != null) + { + if (cardParameterFromId.IsFoil) + { + if (_premiumShader == null) + { + _premiumShader = Shader.Find("Wizard/VariantCardShader"); + } + if (material.shader != _premiumShader) + { + material.shader = _premiumShader; + material.color = Color.white; + } + } + else + { + if (_normalShader == null) + { + _normalShader = Shader.Find("Wizard/Card/Basic_Front0_Back0_Normal"); + } + if (material.shader != _normalShader) + { + material.shader = _normalShader; + material.color = Color.white; + } + } + } + if (_cardMaterial != null) + { + UnityEngine.Object.Destroy(_cardMaterial); + } + Material cardMaterial = ((material != null) ? UnityEngine.Object.Instantiate(material) : null); + Material[] sharedMaterials = new Material[3] + { + UIManager.GetInstance().getUIBase_CardManager()._3dCardFrameManager.GetFrameMaterial(cardParameterFromId.IsPhantomCard, charType, rarity), + _cardMaterial = cardMaterial, + CardCreatorBase.GetSharedClassIconMaterial(CardData.Clan) + }; + LOD[] lODs = gameObject.GetComponent().GetLODs(); + for (int i = 0; i < lODs.Length; i++) + { + lODs[i].renderers[0].sharedMaterials = sharedMaterials; + } + AttachShadow(gameObject, CardShadow.gameObject); + bool active = UIManager.GetInstance().GetCurrentScene() == UIManager.ViewScene.CardAllList && GetPossessionCardNum(isIncludingSpotCard: true) <= 0; + CardShadow.SetActive(active); + } + + private static void AttachShadow(GameObject parentObj, GameObject shadowObj) + { + Transform parent = parentObj.transform; + Transform obj = shadowObj.transform; + obj.parent = parent; + obj.localPosition = new Vector3(0f, 0f, kCARD_POS_Z - 1f); + obj.localRotation = Quaternion.identity; + obj.localScale = new Vector3(1f / kCARD_SCALE, 1f / kCARD_SCALE, 1f); + shadowObj.layer = parentObj.layer; + } + + private void UpdateCardNum(GameObject card2dObj = null) + { + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + if (_isOwnCardNum || card2dObj == null) + { + int possessionCardNum = GetPossessionCardNum(); + if (dataMgr.SpotCardData.ExistsSpotCard(CardData.CardId)) + { + int spotCardNum = dataMgr.SpotCardData.GetSpotCardNum(CardData.CardId); + SetCardNumLabel(possessionCardNum, spotCardNum); + } + else + { + SetCardNumLabel(possessionCardNum); + } + return; + } + CardListTemplate component = card2dObj.GetComponent(); + if (component != null && component.IsShowNum()) + { + if (component.IsIncludingSpotCard) + { + SetCardNumLabel(component.GetNum(), component.GetSpotCardNum()); + } + else + { + SetCardNumLabel(component.GetNum()); + } + } + else + { + SetCardNumLabel(0); + } + } + + private static bool IsTokenId(int cardId) + { + return cardId / 100000000 == 9; + } + + private int GetPossessionCardNumOnRelationCard(bool isIncludingSpotCard) + { + if (IsTokenId(CardData.CardId)) + { + return GetPosessionCardNum(_originalCardId, isIncludingSpotCard); + } + int posessionCardNum = GetPosessionCardNum(_originalCardId, isIncludingSpotCard); + int posessionCardNum2 = GetPosessionCardNum(CardData.CardId, isIncludingSpotCard); + if (posessionCardNum > 0 || posessionCardNum2 > 0) + { + return 1; + } + return 0; + } + + private int GetPosessionCardNum(int cardId, bool isIncludingSpotCard) + { + if (_formatBehaviorForCardPoolChange != null) + { + return _formatBehaviorForCardPoolChange.GetPossessionCardNum(cardId, isIncludingSpotCard); + } + return GameMgr.GetIns().GetDataMgr().GetPossessionCardNum(cardId, isIncludingSpotCard); + } + + private int GetPossessionCardNum(bool isIncludingSpotCard = false) + { + if (IsRelationCardViewing) + { + return GetPossessionCardNumOnRelationCard(isIncludingSpotCard); + } + return GetPosessionCardNum(CardData.CardId, isIncludingSpotCard); + } + + private void SetCardNumLabel(int num) + { + SetCardNumActive(num > 0); + _cardNumLabel.text = num.ToString(); + } + + private void SetCardNumLabel(int cardNum, int spotCardNum) + { + SetCardNumActive(cardNum + spotCardNum > 0); + _cardNumLabel.text = $"{cardNum}[fcd24a]+{spotCardNum}"; + } + + private void SetCardNumActive(bool isEnabled) + { + if (IsRelationCardViewing) + { + CardNum.SetActive(value: false); + } + else + { + CardNum.SetActive(isEnabled); + } + } + + private void UpdateCardText() + { + if (_isShowCardAblityText) + { + UpdateCardAbilityText(); + StartCoroutine(DelayResetScrollViewPosition()); + _shouldResetTextScrollView = true; + } + else + { + UpdateCardFlavorText(); + if (_shouldResetTextScrollView) + { + ResetScrollViewPosition(); + _shouldResetTextScrollView = false; + } + } + CardBasePrm.CharaType charType = CardData.CharType; + bool flag = CardBasePrm.IsFollowerCard(charType); + bool flag2 = CardBasePrm.IsSpellCard(charType); + bool flag3 = CardBasePrm.IsAmuletCard(charType); + UnitCardTextScrollView.gameObject.SetActive(flag && !flag2 && !flag3); + if (UnitCardTextScrollView.gameObject.activeSelf) + { + UnitCardStatusObj.gameObject.SetActive(_isShowCardAblityText); + UnitCardIntroductionObj.gameObject.SetActive(!_isShowCardAblityText); + } + SpellCardTextScrollView.gameObject.SetActive(!flag && flag2 && !flag3); + if (SpellCardTextScrollView.gameObject.activeSelf) + { + SpellCardStatusObj.gameObject.SetActive(_isShowCardAblityText); + SpellCardIntroductionObj.gameObject.SetActive(!_isShowCardAblityText); + } + SettingCardTextScrollView.gameObject.SetActive(!flag && !flag2 && flag3); + if (SettingCardTextScrollView.gameObject.activeSelf) + { + SettingCardStatusObj.gameObject.SetActive(_isShowCardAblityText); + SettingCardIntroductionObj.gameObject.SetActive(!_isShowCardAblityText); + } + _cardVoiceLabelRoot.gameObject.SetActive(!_isShowCardAblityText && CardData.CardVoice != string.Empty); + _cardSetLabelRoot.gameObject.SetActive(!_isShowCardAblityText); + } + + private void UpdateCardAbilityText() + { + CardBasePrm.CharaType charType = CardData.CharType; + string convertedSkillDescription = CardData.ConvertedSkillDescription; + if (CardBasePrm.IsFollowerCard(charType)) + { + FollowerCardAbilityTexActive(); + } + else if (CardBasePrm.IsSpellCard(charType)) + { + SpellCardSkill.SetWrapText(convertedSkillDescription); + SpellCardSkill.gameObject.SetActive(value: false); + SpellCardSkill.gameObject.SetActive(value: true); + _cardSpellTextLineCreater.ShowLines(GetLineNumber(SpellCardSkill), isOriginalActive: true); + } + else if (CardBasePrm.IsAmuletCard(charType)) + { + SettingCardSkill.SetWrapText(convertedSkillDescription); + SettingCardSkill.gameObject.SetActive(value: false); + SettingCardSkill.gameObject.SetActive(value: true); + _cardAmuletTextLineCreater.ShowLines(GetLineNumber(SettingCardSkill), isOriginalActive: true); + } + } + + private void FollowerCardAbilityTexActive() + { + bool isEvolveChoiceCard = CardData.IsEvolveChoiceCard; + UILabel normalTitleLavel = _normalTitleLavel; + string text3; + if (!isEvolveChoiceCard) + { + string text = (_normalTitleLavel.text = Data.SystemText.Get("Card_0037")); + text3 = text; + } + else + { + text3 = Data.SystemText.Get("Card_0038"); + } + normalTitleLavel.text = text3; + _evolveInfoObjectRoot.gameObject.SetActive(!isEvolveChoiceCard); + UnitCardSkill.SetWrapText(isEvolveChoiceCard ? CardData.ConvertedEvoSkillDescription : CardData.ConvertedSkillDescription); + UnitCardEvoSkill.SetWrapText(isEvolveChoiceCard ? string.Empty : CardData.ConvertedEvoSkillDescription); + UnitCardAtkRight.text = (isEvolveChoiceCard ? CardData.EvoAtk.ToString() : CardData.Atk.ToString()); + UnitCardLifeRight.text = (isEvolveChoiceCard ? CardData.EvoLife.ToString() : CardData.Life.ToString()); + UnitCardEvoAtkRight.text = (isEvolveChoiceCard ? string.Empty : CardData.EvoAtk.ToString()); + UnitCardEvoLifeRight.text = (isEvolveChoiceCard ? string.Empty : CardData.EvoLife.ToString()); + UnitCardSkill.gameObject.SetActive(value: false); + UnitCardSkill.gameObject.SetActive(value: true); + UnitCardEvoSkill.gameObject.SetActive(value: false); + UnitCardEvoSkill.gameObject.SetActive(!isEvolveChoiceCard); + _cardSkillTextLineCreater.ShowLines(GetLineNumber(UnitCardSkill)); + _cardEvoSkillTextLineCreater.ShowLines(GetLineNumber(UnitCardEvoSkill)); + } + + private int GetLineNumber(UILabel uILabel) + { + return Global.GetTextLineCount(uILabel.text); + } + + private void UpdateCardFlavorText() + { + string wrapText = "???"; + NGUIText.Alignment alignment = NGUIText.Alignment.Center; + if (IsPopularityVote || GetPossessionCardNum(isIncludingSpotCard: true) > 0) + { + wrapText = (_isEvolCard ? CardData.EvoDescription : CardData.Description); + alignment = NGUIText.Alignment.Left; + } + CardBasePrm.CharaType charType = CardData.CharType; + UILabel uILabel = null; + if (CardBasePrm.IsFollowerCard(charType)) + { + uILabel = UnitCardIntroduction; + } + else if (CardBasePrm.IsSpellCard(charType)) + { + uILabel = SpellCardIntroduction; + } + else if (CardBasePrm.IsAmuletCard(charType)) + { + uILabel = SettingCardIntroduction; + } + uILabel.SetWrapText(wrapText); + uILabel.alignment = alignment; + _cardVoiceValueLabel.text = CardData.CardVoice; + _cardSetValueLabel.text = Data.Master.CardSetNameMgr.Get(CardData.CardSetId).LongName; + } + + private void UpdateButtonState() + { + UpdateFavoriteButton(); + UpdateVoiceButton(); + CardIntroductionButton.SetActive(IsShowFlavorTextButton); + UpdateEvolutionButton(); + UpdatePremiumCardConversionButton(); + QuestionMark.SetActive(_isShowCardAblityText && BattlePlayerView.HasKeyword(CardData)); + } + + private void OnSwipeCard(GameObject g, Vector2 dir) + { + if (IsRelationCardViewing) + { + if (_relationCardIds.Count > 1) + { + if (dir.x >= 70f) + { + OnPushLeftButton(LeftButton); + } + if (dir.x <= -70f) + { + OnPushRightButton(RightButton); + } + } + } + else if (!IsAnimationPlaying && (!(_craftDialog != null) || !_craftDialog.IsOpen())) + { + OnDragCard.Call(dir); + } + } + + private void ParseIdsFunc(List allParams, int cardId) + { + foreach (CardParameter allParam in allParams) + { + if (allParam.CardId == cardId) + { + ParseIds(allParams, allParam.Skill, cardId); + ParseIds(allParams, allParam.SkillCondition, cardId); + ParseIds(allParams, allParam.SkillOption, cardId, RELATION_CARD_SKILLOPTION_EXCLUDED_OPTIONS, RELATION_CARD_SKILLOPTION_SEPARATORS); + ParseIds(allParams, allParam.SkillPreprocess, cardId); + ParseIds(allParams, allParam.SkillTarget, cardId); + break; + } + } + } + + private void ParseIds(List allParams, string str, int cardId, List excludedOptions = null, char[] separators = null) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId); + string normalSkillText = Global.ConvertToWithoutBBCode(cardParameterFromId.SkillDescription); + string evolSkillText = Global.ConvertToWithoutBBCode(cardParameterFromId.EvoSkillDescription); + if (excludedOptions != null && separators != null) + { + string[] sub = str.Split(separators, StringSplitOptions.RemoveEmptyEntries); + int i; + for (i = 0; i < sub.Length; i++) + { + if (excludedOptions.Any((string x) => sub[i].Contains(x))) + { + continue; + } + foreach (Match item in Regex.Matches(sub[i], "\\d{9}")) + { + int validateCardId = int.Parse(item.Value); + ValidateAddId(validateCardId, cardParameterFromId, normalSkillText, evolSkillText, allParams); + } + } + } + else + { + foreach (Match item2 in Regex.Matches(str, "\\d{9}")) + { + int validateCardId2 = int.Parse(item2.Value); + ValidateAddId(validateCardId2, cardParameterFromId, normalSkillText, evolSkillText, allParams); + } + } + if (_relationCardIds.Count > 0) + { + RelationCardButton.SetActive(value: true); + UpdateRelationCount(); + } + else + { + RelationCardButton.SetActive(value: false); + } + } + + private void ValidateAddId(int validateCardId, CardParameter refRootCardParam, string normalSkillText, string evolSkillText, List allParams) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(_originalCardId); + CardParameter cardParameterFromId2 = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(validateCardId); + int validateBaseCardId = cardParameterFromId2.BaseCardId; + if ((validateBaseCardId == cardParameterFromId.BaseCardId && !cardParameterFromId2.IsEvolveChoiceCard) || validateCardId == 0 || _relationCardIds.Contains(validateCardId) || validateCardId == refRootCardParam.CardId || validateCardId == refRootCardParam.NormalCardId) + { + return; + } + if (refRootCardParam.CardId != _originalCardId) + { + int num = _relationCardIds.FindIndex((int cardId) => CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(cardId).BaseCardId == validateBaseCardId); + if (num >= 0) + { + CardParameter cardParameterFromId3 = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(_relationCardIds[num]); + if (cardParameterFromId3.BaseCardId == cardParameterFromId3.CardId || validateBaseCardId != validateCardId) + { + return; + } + _relationCardIds.RemoveAt(num); + } + } + if (validateCardId == 100011010) + { + string value = Global.ConvertToWithoutBBCode(CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(validateCardId).CardName); + if (!normalSkillText.Contains(value) && !evolSkillText.Contains(value)) + { + return; + } + } + if (!validateCardId.ToString().StartsWith(RELATION_CARD_DISABLE_CARD_ID_HEADER, StringComparison.Ordinal)) + { + _relationCardIds.Add(validateCardId); + if (!_relationCardParentDict.TryGetValue(refRootCardParam.CardId, out var value2)) + { + value2 = new List(); + _relationCardParentDict.Add(refRootCardParam.CardId, value2); + } + value2.Add(validateCardId); + } + ParseIdsFunc(allParams, validateCardId); + } + + private void OnPushRelationCardButton(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + if (!IsAnimationPlaying) + { + IsAnimationPlaying = true; + RelationCardButton.SetActive(value: false); + RelationWrapperObj.SetActive(value: true); + _relationIndex = 0; + RereshRelation(g); + } + } + + private void OnPushRelationBackButton(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SWITCH_MENU); + if (!IsAnimationPlaying) + { + RelationWrapperObj.SetActive(value: false); + IsAnimationPlaying = true; + _relationIndex = 0; + SetCardDetail(_originalCardId, _relationCardBaseGameObject); + OpenCardAnimation(); + DialogTitleLabel.text = Data.SystemText.Get("Card_0135"); + } + } + + private void OnPushRightButton(GameObject g) + { + if (IsRelationCardViewing) + { + if (!IsAnimationPlaying) + { + IsAnimationPlaying = true; + _relationIndex++; + if (_relationIndex >= _relationCardIds.Count) + { + _relationIndex = 0; + } + RereshRelation(g); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + else + { + OnDragCard.Call(new Vector2(-70f, 0f)); + } + } + + private void OnPushLeftButton(GameObject g) + { + if (IsRelationCardViewing) + { + if (!IsAnimationPlaying) + { + IsAnimationPlaying = true; + _relationIndex--; + if (_relationIndex < 0) + { + _relationIndex = _relationCardIds.Count - 1; + } + RereshRelation(g); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_SLIDE_BTN); + } + } + else + { + OnDragCard.Call(new Vector2(70f, 0f)); + } + } + + private void UpdateRelationCount() + { + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(_originalCardId); + DialogTitleLabel.text = string.Format(Data.SystemText.Get("Card_0217") + "\u3000({1}/{2})", cardParameterFromId.CardName, _relationIndex + 1, _relationCardIds.Count); + } + + private void RereshRelation(GameObject g) + { + UpdateRelationCount(); + if (IsRelationCardViewing) + { + bool active = _relationCardIds.Count > 1; + RightButton.SetActive(active); + LeftButton.SetActive(active); + } + Toolbox.ResourcesManager.RemoveAssetGroup(_assetTokenPathList); + _assetTokenPathList.Clear(); + CardParameter cardParameterFromId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(_originalCardId); + int id = _relationCardIds[_relationIndex]; + CardParameter cardParameterFromId2 = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(id); + if (cardParameterFromId.IsFoil) + { + id = cardParameterFromId2.FoilCardId; + } + AddResourceList(cardParameterFromId2); + CardTexture.SetActive(value: false); + SetEnableButtons(isEnable: false); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(_assetTokenPathList, delegate + { + CardTexture.SetActive(value: true); + SetCardDetail(id, g, isUpdateRelation: false); + OpenCardAnimation(); + SetEnableButtons(isEnable: true); + }); + } + + private void AddResourceList(CardParameter CardPrm) + { + int resourceCardId = CardMaster.GetInstance(_cardMasterId).GetCardParameterFromId(CardPrm.NormalCardId).ResourceCardId; + switch (CardPrm.CharType) + { + case CardBasePrm.CharaType.NORMAL: + { + string assetTypePath3 = Toolbox.ResourcesManager.GetAssetTypePath(resourceCardId.ToString(), ResourcesManager.AssetLoadPathType.UnitCardMaterial); + _assetTokenPathList.Add(assetTypePath3); + break; + } + case CardBasePrm.CharaType.SPELL: + { + string assetTypePath2 = Toolbox.ResourcesManager.GetAssetTypePath(resourceCardId.ToString(), ResourcesManager.AssetLoadPathType.SpellCardMaterial); + _assetTokenPathList.Add(assetTypePath2); + break; + } + default: + { + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath(resourceCardId.ToString(), ResourcesManager.AssetLoadPathType.SpellCardMaterial); + _assetTokenPathList.Add(assetTypePath); + break; + } + } + } + + private void OnOpenCardViewMode(GameObject g) + { + if (_isAbleTapDialogObject && !IsAnimationPlaying && !isAnimation && !isCardViewMode && (UIManager.GetInstance().GetCurrentScene() != UIManager.ViewScene.CardAllList || GetPossessionCardNum(isIncludingSpotCard: true) > 0)) + { + isCardViewMode = true; + IsAnimationPlaying = true; + CardViewBG.SetActive(value: true); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_INFO); + CardBasePrm.CharaType charType = CardData.CharType; + if (CardBasePrm.IsSpellCard(charType)) + { + ViewCardObject = NGUITools.AddChild(base.gameObject, SpellCardObject); + } + else if (CardBasePrm.IsAmuletCard(charType)) + { + ViewCardObject = NGUITools.AddChild(base.gameObject, FieldCardObject); + } + else if (CardBasePrm.IsFollowerCard(charType)) + { + ViewCardObject = NGUITools.AddChild(base.gameObject, UnitCardObject); + } + iTween.ScaleTo(ViewCardObject, iTween.Hash("Scale", CardViewScale, "time", 0.3f)); + iTween.RotateTo(ViewCardObject, iTween.Hash("z", 0f, "time", 0.3f, "oncompletetarget", base.gameObject, "oncomplete", "OnAnimationOver")); + ViewCardObject.transform.localPosition = new Vector3(0f, 0f, -100f); + } + } + + private void OnCloseCardViewMode() + { + if (!IsAnimationPlaying && isCardViewMode) + { + IsAnimationPlaying = true; + RemoveCardViewMode(); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL); + CardBasePrm.CharaType charType = CardData.CharType; + GameObject target = null; + if (CardBasePrm.IsSpellCard(charType)) + { + target = SpellCardObject; + } + else if (CardBasePrm.IsAmuletCard(charType)) + { + target = FieldCardObject; + } + else if (CardBasePrm.IsFollowerCard(charType)) + { + target = UnitCardObject; + } + iTween.MoveTo(target, iTween.Hash("islocal", true, "z", kCARD_POS_Z, "time", 0.3f, "oncompletetarget", base.gameObject, "oncomplete", "OnAnimationOver")); + } + } + + private void RemoveCardViewMode() + { + if (isCardViewMode) + { + UnityEngine.Object.Destroy(ViewCardObject); + CardViewBG.SetActive(value: false); + isCardViewMode = false; + } + } + + private void OnCloseCardViewMode(GameObject g) + { + OnCloseCardViewMode(); + } + + private void UpdateFavoriteButton() + { + _isFavorite = GameMgr.GetIns().GetDataMgr().FavoriteCardList.Contains(CardData.CardId); + _favoriteButton.gameObject.SetActive(IsShowFavoriteButton && GetPossessionCardNum() > 0 && CardData.IsEnableFavorite && !IsRelationCardViewing); + SetFavoriteButtonSprite(_isFavorite); + } + + private void SetFavoriteButtonSprite(bool isFavorite) + { + string text = "btn_favorite_"; + string text2 = "off"; + string text3 = "on"; + _favoriteButton.normalSprite = text + (isFavorite ? text3 : text2); + _favoriteButton.pressedSprite = text + (isFavorite ? text2 : text3); + } + + private void OnClickFavoriteButton(GameObject g) + { + if (_isFavoriteButtonEnabled && GetPossessionCardNum() > 0) + { + _isFavoriteButtonEnabled = false; + StartCoroutine(Timer.DelayMethod(0.9f, delegate + { + _isFavoriteButtonEnabled = true; + })); + bool flag = !_isFavorite; + GameMgr.GetIns().GetSoundMgr().PlaySe(flag ? Se.TYPE.SYS_TOGGLE_ON : Se.TYPE.SYS_TOGGLE_OFF); + ChangeFavoriteState(); + } + } + + private void ChangeFavoriteState() + { + bool is_protected = !_isFavorite; + CardProtectTask cardProtectTask = new CardProtectTask(); + cardProtectTask.SetParameter(CardData.CardId, is_protected); + StartCoroutine(Toolbox.NetworkManager.Connect(cardProtectTask, OnSuccessProtectCard, null, OnErrorProtectCard)); + } + + private void OnSuccessProtectCard(NetworkTask.ResultCode code) + { + UpdateButtonState(); + UpdateCreateLiquefyButton(); + OnChangeCardFavoriteState.Call(); + } + + private void OnErrorProtectCard(int code) + { + UpdateButtonState(); + UpdateCreateLiquefyButton(); + } + + private void UpdateVoiceButton() + { + CardVoiceData cardVoiceData = new CardVoiceData(CardData, _cardMasterId); + bool flag = (!_isEvolCard && cardVoiceData._voiceListBeforeEvo.Count > 0) || (_isEvolCard && cardVoiceData._voiceListAfterEvo.Count > 0); + _voiceButton.gameObject.SetActive(flag && IsShowVoiceButton && (IsPopularityVote || GetPossessionCardNum(isIncludingSpotCard: true) > 0)); + } + + private void OnClickVoiceButton(GameObject g) + { + _cardVoiceManager.SequentiallyPlay(CardData, _isEvolCard, _cardMasterId); + } + + private void OnClickChangeCardTextTypeButton(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON); + _isShowCardAblityText = !_isShowCardAblityText; + UpdateCardText(); + UpdateButtonState(); + } + + private void UpdateEvolutionButton() + { + if (CardBasePrm.IsFollowerCard(CardData.CharType) && !CardData.IsEvolveChoiceCard) + { + CardEvolButton.gameObject.SetActive(IsShowEvolutionButton && (IsPopularityVote || GetPossessionCardNum(isIncludingSpotCard: true) > 0)); + _evolutionButtonLabel.text = Data.SystemText.Get(_isEvolCard ? "Card_0067" : "Card_0030"); + } + else + { + CardEvolButton.gameObject.SetActive(value: false); + } + } + + private void OnClickEvolutionButton(GameObject g) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_MYPAGE_EVOLVE); + _isEvolCard = !_isEvolCard; + UpdateCardImage(); + UpdateCardText(); + UpdateButtonState(); + _cardVoiceManager.Stop(); + if (_evolEffect != null) + { + _evolEffect.Play(); + return; + } + string assetTypePath = Toolbox.ResourcesManager.GetAssetTypePath("cmn_deckedit_evo_1", ResourcesManager.AssetLoadPathType.Effect2D); + _assetPathList.Add(assetTypePath); + StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(assetTypePath, delegate + { + GameObject gameObject = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_deckedit_evo_1", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)) as GameObject; + if (gameObject != null) + { + ParticleSystem component = gameObject.GetComponent(); + ParticleSystem.MainModule main = component.main; + main.playOnAwake = false; + _evolEffect = UnityEngine.Object.Instantiate(component); + _evolEffect.transform.parent = CardTexture.transform; + _evolEffect.transform.localPosition = Vector3.back * 10f; + _evolEffect.transform.localRotation = Quaternion.identity; + _evolEffect.transform.localScale = Vector3.one * 600f; + _evolEffect.gameObject.layer = base.gameObject.layer; + Transform[] componentsInChildren = _evolEffect.GetComponentsInChildren(); + for (int i = 0; i < componentsInChildren.Length; i++) + { + componentsInChildren[i].gameObject.layer = base.gameObject.layer; + } + GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(new List { _evolEffect.gameObject }, delegate + { + if ((bool)_evolEffect) + { + _evolEffect.gameObject.SetActive(value: true); + _evolEffect.Play(); + } + }, isBattle: true); + } + })); + } + + private void UpdatePremiumCardConversionButton() + { + GameObject gameObject = _premiumCardConversionButton.gameObject; + UIManager.SetObjectToGrey(gameObject, PlayerStaticData.UserOrbNum <= 0); + if (!IsShowPremiumCardConversionButton || IsRelationCardViewing || GetPossessionCardNum() <= 0 || CardData.IsFoil || (CardData.IsNotCraftDestruct && !CardData.IsPreReleaseCard)) + { + gameObject.SetActive(value: false); + } + else + { + gameObject.SetActive(value: true); + } + } + + private void OnClickPremiumCardConversionButton(GameObject g) + { + if (GetPossessionCardNum() <= 0) + { + return; + } + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (isAnimation) + { + return; + } + SystemText systemText = Data.SystemText; + if (PlayerStaticData.UserOrbNum <= 0) + { + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + dialogBase.SetTitleLabel(systemText.Get("Card_0163_1")); + dialogBase.SetText(systemText.Get("Card_0163_2")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + } + else if (GameMgr.GetIns().GetDataMgr().GetPossessionCardNum(CardData.FoilCardId, isIncludingSpotCard: true) >= 3) + { + DialogBase dialogBase2 = UIManager.GetInstance().CreateDialogClose(); + dialogBase2.SetTitleLabel(systemText.Get("Card_0164_1")); + dialogBase2.SetText(systemText.Get("Card_0164_2")); + dialogBase2.SetButtonLayout(DialogBase.ButtonLayout.OkBtn); + } + else if (_isFavorite) + { + DialogBase dialogBase3 = UIManager.GetInstance().CreateDialogClose(); + dialogBase3.SetTitleLabel(systemText.Get("Card_0165_1")); + dialogBase3.SetText(systemText.Get("Card_0165_2")); + dialogBase3.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase3.SetButtonText(systemText.Get("Card_0165_3")); + dialogBase3.onPushButton1 = delegate + { + CreatePremiumCardConversionDialog(); + }; + } + else + { + CreatePremiumCardConversionDialog(); + } + } + + private void CreatePremiumCardConversionDialog() + { + SystemText systemText = Data.SystemText; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(); + PremiumCardConversionDialogParts premiumCardConversionDialogParts = UnityEngine.Object.Instantiate(_premiumCardConversionDialogPrefab); + premiumCardConversionDialogParts.Initialize(CardData); + dialogBase.SetObj(premiumCardConversionDialogParts.gameObject); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(systemText.Get("Card_0162_1")); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + dialogBase.SetButtonText(systemText.Get("Card_0162_7")); + dialogBase.onPushButton1 = delegate + { + if (!_isFavorite) + { + ConvertPremiumCard(); + } + else + { + ChangeFavoriteState(); + OnChangeCardFavoriteState = (Action)Delegate.Combine(OnChangeCardFavoriteState, new Action(ConvertPremiumCard)); + } + }; + } + + private void ConvertPremiumCard() + { + OnChangeCardFavoriteState = (Action)Delegate.Remove(OnChangeCardFavoriteState, new Action(ConvertPremiumCard)); + PremiumCardConversionTask premiumCardConversionTask = new PremiumCardConversionTask(); + premiumCardConversionTask.SetParameter(CardData.CardId, GetPossessionCardNum()); + StartCoroutine(Toolbox.NetworkManager.Connect(premiumCardConversionTask, OnSuccessPremiumCardConversion)); + } + + private void OnSuccessPremiumCardConversion(NetworkTask.ResultCode code) + { + OnConvertedPremiumCard.Call(CardData); + StartCoroutine(StartPremiumCardConversionAnimation()); + } + + private IEnumerator StartPremiumCardConversionAnimation() + { + isAnimation = true; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_USE_RED_ETHER); + yield return StartCoroutine(PlayCardCreateEffect(PREMIUM_CARD_CONVERSION_PARTICLE_COLOR, _premiumCardConversionButton.transform.position, _cardNumLabel.transform.position, 4)); + SetCardDetail(CardData.FoilCardId); + isAnimation = false; + } + + private void UpdateCreateLiquefyButton(bool isUpdateHaveRedether = true) + { + if (IsShowCraftButtons && !IsRelationCardViewing) + { + _craftPanel.gameObject.SetActive(value: true); + _craftPanel.UpdateCraftPanel(CardData, isUpdateHaveRedether); + } + else + { + _craftPanel.gameObject.SetActive(value: false); + } + } + + private void StartCardDestruct() + { + if (!IsAbleToDestruct) + { + return; + } + CardMake component = base.gameObject.GetComponent(); + component.OnCardSell = delegate + { + if (GetPossessionCardNum() <= 0) + { + OnLiquefyAllCard.Call(CardData); + } + StartCoroutine(RunCardDestruct()); + }; + component.StartCardDestruct(CardData.CardId); + } + + private IEnumerator RunCardDestruct() + { + isAnimation = true; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GET_RED_ETHER); + yield return StartCoroutine(PlayCardLiquefyEffect(CARD_LIQUEFY_PARTICLE_COLOR, _cardNumLabel.transform.position, RedEtherIcon.transform.position, CardData.Rarity)); + iTween.ValueTo(base.gameObject, iTween.Hash("from", int.Parse(_redEtherHaveValueLabel.text), "to", PlayerStaticData.UserRedEtherCount, "time", 0.5f, "onupdate", "OnUpdateRedEther", "oncomplete", "OnCompleteRedEther", "easetype", iTween.EaseType.easeOutQuad)); + UpdateCardNum(); + CardShadow.gameObject.SetActive(GetPossessionCardNum(isIncludingSpotCard: true) <= 0 && !IsShortageUI); + UpdateCardText(); + UpdateButtonState(); + OnCardNumChange.Call(); + UpdateCreateLiquefyButton(isUpdateHaveRedether: false); + OnCardSellId.Call(CardData.CardId); + yield return new WaitForSeconds(0.2f); + isAnimation = false; + } + + private IEnumerator PlayCardLiquefyEffect(Color particleColor, Vector3 particleStartPos, Vector3 particleEndPos, int particleNum) + { + particleStartPos += CARD_DESTROY_PARTICLE_OFFSET; + particleEndPos += CARD_DESTROY_PARTICLE_OFFSET; + EffectMgr effectMgr = GameMgr.GetIns().GetEffectMgr(); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_CARD_1); + for (int i = 0; i < CardData.Rarity; i++) + { + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_TRACK_1); + } + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_ICON_1); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_1); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_2); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_3); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_4); + effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_CARD_1, CardTexture.transform.position).ChangeParticleColor(particleColor); + for (int j = 0; j < particleNum; j++) + { + Effect effect = effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_TRACK_1, particleStartPos); + effect.ChangeParticleColor(particleColor); + Vector3 vector = new Vector3(UnityEngine.Random.value * 3f - 1.5f, UnityEngine.Random.value * 3f - 1.5f, -1f); + Vector3[] bezierQuad = MotionUtils.GetBezierQuad(particleStartPos, particleStartPos + vector, particleEndPos, 10); + iTween.MoveTo(effect.GetGameObjIns(), iTween.Hash("path", bezierQuad, "time", 0.5f, "movetopath", false, "easetype", iTween.EaseType.linear)); + } + yield return new WaitForSeconds(0.5f); + effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_ICON_1, particleEndPos).ChangeParticleColor(particleColor); + EffectMgr.EffectType type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_1; + switch (particleNum) + { + case 1: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_1; + break; + case 2: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_2; + break; + case 3: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_3; + break; + case 4: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_4; + break; + } + effectMgr.Start(type, particleEndPos).ChangeParticleColor(particleColor); + } + + private void StartCardCraft() + { + if (!IsAbleToCraft) + { + return; + } + CardMake component = base.gameObject.GetComponent(); + component.OnCardBuy = delegate + { + if (GetPossessionCardNum(isIncludingSpotCard: true) == 1) + { + OnCreateFirstCard.Call(); + } + StartCoroutine(RunCardCraft()); + }; + component.StartCardCraft(CardData.CardId); + } + + private IEnumerator RunCardCraft() + { + isAnimation = true; + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_USE_RED_ETHER); + yield return StartCoroutine(PlayCardCreateEffect(CARD_CREATE_PARTICLE_COLOR, RedEtherIcon.transform.position, _cardNumLabel.transform.position, CardData.Rarity)); + iTween.ValueTo(base.gameObject, iTween.Hash("from", int.Parse(_redEtherHaveValueLabel.text), "to", PlayerStaticData.UserRedEtherCount, "time", 0.5f, "onupdate", "OnUpdateRedEther", "oncomplete", "OnCompleteRedEther", "easetype", iTween.EaseType.easeOutQuad)); + UpdateCardNum(); + CardShadow.gameObject.SetActive(value: false); + UpdateCardText(); + UpdateButtonState(); + UpdateCreateLiquefyButton(isUpdateHaveRedether: false); + OnCardNumChange.Call(); + OnCardBuy.Call(); + yield return new WaitForSeconds(0.2f); + isAnimation = false; + } + + private IEnumerator PlayCardCreateEffect(Color particleColor, Vector3 particleStartPos, Vector3 particleEndPos, int particleNum) + { + EffectMgr effectMgr = GameMgr.GetIns().GetEffectMgr(); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_ICON_1); + for (int i = 0; i < particleNum; i++) + { + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_TRACK_1); + } + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_CARD_2); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_1); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_2); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_3); + effectMgr.Stop(EffectMgr.EffectType.CMN_CRAFT_SPLASH_4); + effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_ICON_1, particleStartPos).ChangeParticleColor(particleColor); + for (int j = 0; j < particleNum; j++) + { + Effect effect = effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_TRACK_1, particleStartPos); + effect.ChangeParticleColor(particleColor); + Vector3 vector = new Vector3(UnityEngine.Random.value * 3f - 1.5f, UnityEngine.Random.value * 3f - 1.5f, -1f); + Vector3[] bezierQuad = MotionUtils.GetBezierQuad(particleStartPos, particleStartPos + vector, particleEndPos, 10); + iTween.MoveTo(effect.GetGameObjIns(), iTween.Hash("path", bezierQuad, "time", 0.5f, "movetopath", false, "easetype", iTween.EaseType.linear)); + } + yield return new WaitForSeconds(0.5f); + effectMgr.Start(EffectMgr.EffectType.CMN_CRAFT_CARD_2, CardTexture.transform.position + Vector3.back); + EffectMgr.EffectType type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_1; + switch (particleNum) + { + case 1: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_1; + break; + case 2: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_2; + break; + case 3: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_3; + break; + case 4: + type = EffectMgr.EffectType.CMN_CRAFT_SPLASH_4; + break; + } + effectMgr.Start(type, particleEndPos).ChangeParticleColor(particleColor); + } + + private void OnUpdateRedEther(int value) + { + _redEtherHaveValueLabel.text = value.ToString(); + } + + private void OnCompleteRedEther() + { + _redEtherHaveValueLabel.text = PlayerStaticData.UserRedEtherCount.ToString(); + } + + private void CreateDialog(Action onOk, bool buy) + { + if (!isAnimation) + { + _craftDialog = UIManager.GetInstance().CreateDialogClose(); + _craftDialog.onPushButton1 = onOk; + PurchaseConfirm purchaseConfirm = UnityEngine.Object.Instantiate(PurchaseConfirmPrefab); + _craftDialog.SetObj(purchaseConfirm.gameObject); + int userRedEtherCount = PlayerStaticData.UserRedEtherCount; + SystemText systemText = Data.SystemText; + if (buy) + { + _craftDialog.SetTitleLabel(systemText.Get("Card_0081")); + _craftDialog.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn); + _craftDialog.SetButtonText(systemText.Get("Dia_CardList_003_Button")); + int useRedEther = CardData.UseRedEther; + purchaseConfirm.SetCardBuy(systemText.Get("Common_0205"), userRedEtherCount, useRedEther, CardData); + } + else + { + _craftDialog.SetTitleLabel(systemText.Get("Card_0080")); + _craftDialog.SetButtonLayout(DialogBase.ButtonLayout.RedBtn_CancelBtn); + _craftDialog.SetButtonText(systemText.Get("Dia_CardList_002_Button")); + int getRedEther = CardData.GetRedEther; + purchaseConfirm.SetCardSell(systemText.Get("Common_0205"), userRedEtherCount, getRedEther, CardData.CardName, CardData.IsFoil); + } + } + } + + private IEnumerator DelayResetScrollViewPosition() + { + yield return null; + ResetScrollViewPosition(); + } + + private void ResetScrollViewPosition() + { + UnitCardTextScrollView.ResetPosition(); + SpellCardTextScrollView.ResetPosition(); + SettingCardTextScrollView.ResetPosition(); + UnitCardTextScrollView.UpdateScrollbars(recalculateBounds: true); + SpellCardTextScrollView.UpdateScrollbars(recalculateBounds: true); + SettingCardTextScrollView.UpdateScrollbars(recalculateBounds: true); + } + + private void ChangeLayer(GameObject o, int layer) + { + o.layer = layer; + for (int i = 0; i < o.transform.childCount; i++) + { + ChangeLayer(o.transform.GetChild(i).gameObject, layer); + } + } + + public bool GetIsDetailOn() + { + return isDetailOn; + } + + public void SetDisableArrowButton() + { + OnDetailCardUpdate = delegate + { + RightButtonVisible = false; + LeftButtonVisible = false; + }; + } + + public void SetEnableButtons(bool isEnable) + { + for (int i = 0; i < _enableButtonList.Length; i++) + { + _enableButtonList[i].isEnabled = isEnable; + } + _isAbleTapDialogObject = isEnable; + if (isEnable) + { + UpdateButtonState(); + UpdateCreateLiquefyButton(); + } + } + + private void LateUpdate() + { + if (!UIManager.GetInstance().IsCurrentScene(UIManager.ViewScene.QuestSelectionPage)) + { + return; + } + for (int i = 0; i < base.transform.childCount; i++) + { + Transform child = base.transform.GetChild(i); + if (child.name != "CardTexture" && child.name != "CardText") + { + AllLabelColorChanger.ChangeAllLabel(child.gameObject, AllLabelColorChanger.COLOR_TABLE_DETAIL); + } + } + } + + public void SetSortOrder(int sortOrder) + { + for (int i = 0; i < _allPanel.Length; i++) + { + _allPanel[i].sortingOrder = sortOrder + i; + } + } +} diff --git a/SVSim.BattleEngine/Engine/CardFilterKeyWordMaster.cs b/SVSim.BattleEngine/Engine/CardFilterKeyWordMaster.cs new file mode 100644 index 0000000..5ac21d9 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardFilterKeyWordMaster.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +public class CardFilterKeyWordMaster +{ + private Dictionary> _allData = new Dictionary>(); + + public List CategoryList { get; private set; } + + public CardFilterKeyWordMaster() + { + CategoryList = new List(); + } + + public void Add(string[] line) + { + string item = line[0]; + string text = line[1]; + if (!CategoryList.Contains(text)) + { + CategoryList.Add(text); + _allData[text] = new List(); + } + _allData[text].Add(item); + } + + public List GetCategory(string category) + { + return _allData[category]; + } +} diff --git a/SVSim.BattleEngine/Engine/CardKeyWordCache.cs b/SVSim.BattleEngine/Engine/CardKeyWordCache.cs new file mode 100644 index 0000000..6201e88 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardKeyWordCache.cs @@ -0,0 +1,68 @@ +using System.Collections.Generic; +using System.Text.RegularExpressions; +using Wizard; + +public class CardKeyWordCache +{ + public enum Option + { + None, + OnlyCardNames, + OnlyCardNamesHiranaga + } + + private Dictionary> _cache = new Dictionary>(); + + private Option _option; + + public CardKeyWordCache(Option option = Option.None) + { + _option = option; + } + + public IList Get(CardParameter param, CardKeyWordCommonCache commonCache) + { + if (_cache.TryGetValue(param.CardId, out var value)) + { + return value; + } + IList cloneList = commonCache.GetCloneList(param); + if (_option == Option.OnlyCardNames) + { + foreach (string item in new List(cloneList)) + { + if (Data.Master.BattleKeyWordDic.ContainsKey(item) && commonCache.GetCardListFromKeyWord(item).Count == 0) + { + cloneList.Remove(item); + } + } + } + else if (_option == Option.OnlyCardNamesHiranaga) + { + foreach (string item2 in new List(cloneList)) + { + if (!Data.Master.BattleKeyWordDic.ContainsKey(item2)) + { + continue; + } + if (commonCache.GetCardListFromKeyWord(item2).Count == 0) + { + cloneList.Remove(item2); + continue; + } + cloneList.Remove(item2); + foreach (int item3 in commonCache.GetCardListFromKeyWord(item2)) + { + CardParameter cardParameterFromId = CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(item3); + if (Regex.Replace(cardParameterFromId.CardName, "(\\[[a-zA-Z0-9\\/\\-]*(rub\\<[^\\>]*\\>)*\\])", "") == item2) + { + cloneList.Add(cardParameterFromId.CardHiragana); + break; + } + } + } + } + _cache[param.CardId] = cloneList; + return cloneList; + } +} diff --git a/SVSim.BattleEngine/Engine/CardPack.cs b/SVSim.BattleEngine/Engine/CardPack.cs new file mode 100644 index 0000000..e3131ae --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardPack.cs @@ -0,0 +1,22 @@ +public class CardPack : HeaderData +{ + public int card_id; + + public int base_card_id; + + public int rarity; + + public string create_time; + + public string update_time; + + public string delete_time; + + public string affected_rows; + + public int SleeveId { get; set; } = 3000011; + + public bool IsSpecialCard { get; set; } + + public bool IsFreePackLeaderSkin { get; set; } +} diff --git a/SVSim.BattleEngine/Engine/CardPackManager.cs b/SVSim.BattleEngine/Engine/CardPackManager.cs new file mode 100644 index 0000000..7874f08 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardPackManager.cs @@ -0,0 +1,1179 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; + +public class CardPackManager : MonoBehaviour +{ + public class GachaMaskDark + { + public int PackId; + + public Rect UvRect; + + public Color Color; + + public GachaMaskDark(string[] columns) + { + int num = 0; + PackId = int.Parse(columns[num]); + num++; + UvRect = new Rect(float.Parse(columns[num]), float.Parse(columns[num + 1]), float.Parse(columns[num + 2]), float.Parse(columns[num + 3])); + num += 4; + Color = new Color(float.Parse(columns[num]), float.Parse(columns[num + 1]), float.Parse(columns[num + 2]), float.Parse(columns[num + 3])); + } + } + + private InputMgr m_InputMgrIns; + + private EffectMgr m_EfcMgrIns; + + private const int DRAW_NUM = 8; + + private const int ANIM_CNT_NONE = 100; + + private const int CARD_TOUCH_POS_DIV_CNT = 10; + + private const float DELAY_FADEOUT_SE = 1.5f; + + private const float WAIT_FADEOUT_FOR_DISPOSE = 1f; + + private const float SCALE_3D_OBJECT = 0.003125f; + + private const string PACK_BOX_NAME = "md_gachabox_{0}"; + + private const string PACK_EFFECT_IDLE_1 = "gch_box_idle_1_{0}"; + + private const string PACK_EFFECT_TAP_1 = "gch_box_tap_1_{0}"; + + private const string PACK_EFFECT_SHINE_1 = "gch_box_shine_1_{0}"; + + private const string PACK_EFFECT_SPECIAL_1 = "gch_box_special_1"; + + private const string PACK_EFFECT_SPECIAL_2 = "gch_box_special_2"; + + private const string CUESHEETNAME_GACHA_SE = "se_gacha"; + + private const string CUENAME_SE_GACHA_APPEAR = "se_sys_gacha_appear_{0}"; + + private const string CUENAME_SE_GACHA_OPEN = "se_sys_gacha_open_{0}"; + + private const int EFFECT_LAYER = 30; + + private const float FOV_ASPECT_BORDER = 1.5f; + + private const int FOV_UNDER_BORDER_SIZE = 70; + + private const int FOV_OVER_BORDER_SIZE = 64; + + private readonly Vector3 POSITION_CARDVIEW_CAMERA = new Vector3(9600f, 92f, -2900f); + + [HideInInspector] + public GameObject CardPackParent; + + private IList m_CardPackList; + + private IList m_CardAnimList; + + private Queue m_openCardQueue = new Queue(); + + private IList m_CardOpenList; + + private IList m_CardPosList; + + private IList m_CardRotList; + + private IList m_RarityList; + + private IList m_CostIconList; + + private IList m_LifeIconList; + + private IList m_AtkIconList; + + private IList m_NameLabelList; + + private int layer_Gacha = 18; + + private int animCnt = 100; + + private int currentCnt; + + private int packOpenCnt = 1; + + private bool _isAutoOpen; + + private bool _isCoutainSpecialCard; + + private Camera GachaCamera; + + private GameObject GachaLight; + + private GameObject GachaBox; + + private Animation GachaBoxAnim; + + private GameObject ClanLabels; + + private IList ClanLabelList = new List(); + + private UITexture DarkSideTex; + + private UITexture BgBlackTex; + + private GameObject PackEffectIdle1; + + private GameObject PackEffectTap1; + + private GameObject PackEffectShine1; + + private GameObject PackEffectSpecial1; + + private GameObject PackEffectSpecial2; + + private GameObject CardBefore; + + private Vector3 GachaObjScale = new Vector3(250f, 250f, 50f); + + private int cardPackSize; + + private int cardPackNum; + + private int lastLoadedCardIndex; + + private Vector3 mousePosPrev = Vector3.zero; + + private const int PAGE_CARD_COUNT = 8; + + private float m_BackupBgmVolume; + + private List PackAssetNameList = new List(); + + private List EffectAssetPathList; + + private GameObject GachaStay1Pool; + + private GameObject GachaStay2Pool; + + private GameObject GachaStay3Pool; + + private GameObject GachaSpecialStay1Pool; + + private GameObject GachaTwinkle1Pool; + + private bool m_IsNextCardCreated = true; + + private bool m_IsHideCardFinish = true; + + private const float DelayOpenCard = 0.05f; + + [SerializeField] + private UIButton SkipBtn; + + [SerializeField] + private UIButton OkBtn; + + [SerializeField] + private UILabel LabelPackNum; + + [SerializeField] + private UILabel LabelPackUnit; + + [SerializeField] + private NguiObjs TouchObj; + + private CardDetailUI _cardDetail; + + private UIManager.ViewScene _nextScene; + + private List _boxEffectList = new List(); + + private bool _isNextCardAnim; + + private bool _isDispose; + + private string _seNameGachaAppear = ""; + + private string _seNameGachaOpen = ""; + + private bool _isSpecialCardPackSet; + + public bool IsSkipped { get; private set; } + + public void Init(bool isAutoOpen, CardDetailUI cardDetail, UIManager.ViewScene nextScene, bool isCoutainSpecialCard, Action callback) + { + _isAutoOpen = isAutoOpen; + _isCoutainSpecialCard = isCoutainSpecialCard; + _cardDetail = cardDetail; + _nextScene = nextScene; + IsSkipped = false; + GameMgr.GetIns().GetPrefabMgr().Load("Gacha/GachaObj"); + m_InputMgrIns = GameMgr.GetIns().GetInputMgr(); + m_EfcMgrIns = GameMgr.GetIns().GetEffectMgr(); + CardPackParent = GameMgr.GetIns().GetGameObjMgr().AddUIManagerChildPrefab(GameMgr.GetIns().GetPrefabMgr().GetObj("Gacha/GachaObj") as GameObject); + CardPackParent.layer = layer_Gacha; + CardPackParent.transform.localScale = new Vector3(0.003125f, 0.003125f, 0.003125f); + GachaObj component = CardPackParent.GetComponent(); + CardPackParent.SetActive(value: false); + GachaCamera = component.GachaCamera; + GachaLight = component.GachaLight; + GachaBox = component.GachaBox; + ClanLabels = component.ClanLabels; + DarkSideTex = component.DarkSideTex; + BgBlackTex = component.BgBlackTex; + ClanLabelList.Clear(); + for (int i = 0; i < ClanLabels.transform.childCount; i++) + { + ClanLabelList.Add(ClanLabels.transform.GetChild(i).GetComponent()); + } + OkBtn.onClick.Clear(); + OkBtn.onClick.Add(new EventDelegate(delegate + { + OnClickNextBtn(); + })); + SkipBtn.onClick.Clear(); + SkipBtn.onClick.Add(new EventDelegate(delegate + { + if (!_cardDetail.GetIsDetailOn()) + { + OnClickSkipBtn(); + } + })); + TouchObj.labels[0].text = Data.SystemText.Get("Common_0146"); + EffectAssetPathList = GameMgr.GetIns().GetEffectMgr().InitCommonEffect("Json/CardPackEffectData", isBattle: false, isField: false, isBattleEffect: false, delegate + { + callback.Call(); + }); + } + + public void StartInstantiateCardPack(PackConfig packConfig) + { + _isDispose = false; + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + m_BackupBgmVolume = soundMgr.GetBgmVolume(); + soundMgr.FadeBgmVolume(0f); + animCnt = 0; + currentCnt = 0; + packOpenCnt = 1; + m_CardPackList = new List(); + m_CardAnimList = new List(); + m_CardOpenList = new List(); + m_CardPosList = new List(); + m_CardRotList = new List(); + m_RarityList = new List(); + m_CostIconList = new List(); + m_LifeIconList = new List(); + m_AtkIconList = new List(); + m_NameLabelList = new List(); + CardBefore = null; + GachaCamera.transform.localPosition = new Vector3(0f, 360f, -840f); + GachaCamera.transform.localRotation = Quaternion.Euler(new Vector3(0f, 0f, 0f)); + GachaCamera.fieldOfView = ((GameMgr.GetIns().ScreenAspect < 1.5f) ? 70 : 64); + GachaBox.SetActive(value: true); + LabelPackNum.gameObject.SetActive(value: false); + OkBtn.gameObject.SetActive(value: true); + OkBtn.isEnabled = false; + SkipBtn.gameObject.SetActive(value: true); + ClanLabels.SetActive(value: false); + DarkSideTex.alpha = 1f; + DarkSideTex.transform.localScale = Vector3.one * 2f; + BgBlackTex.alpha = 0f; + CardPackParent.SetActive(value: true); + lastLoadedCardIndex = 0; + GachaCamera.gameObject.SetActive(value: true); + _isSpecialCardPackSet = packConfig.IsSpecialCardPack; + GameMgr.GetIns().GetSoundMgr().LoadSe("se_gacha", delegate + { + InstantiateCardPack(packConfig.GetGachaIdForEffectResource()); + }); + } + + private IEnumerator loadNextPage(Action onFinish) + { + m_IsNextCardCreated = false; + int b = cardPackSize - lastLoadedCardIndex; + int takeNum = Mathf.Min(8, b); + List targetCardList = Data.PackOpen.data.pack_list.Skip(lastLoadedCardIndex).Take(takeNum).ToList(); + List assetList = Toolbox.ResourcesManager.CardListAssetPathList; + Dictionary> cardObjectDic = new Dictionary>(); + foreach (IGrouping item in from x in targetCardList + group x by x.SleeveId) + { + PackAssetNameList.AddRange(assetList); + assetList.Clear(); + int sleeveId = item.Key; + yield return CreateGachaCardPack(item.Select((CardPack x) => x.card_id).ToList(), sleeveId); + cardObjectDic.Add(sleeveId, UIManager.GetInstance().getSelectCardListObjs()); + } + List SetShaderList = new List(); + List specialEffectList = new List(); + for (int num = 0; num < takeNum; num++) + { + CardPack cardPack = targetCardList[num]; + int card_id = cardPack.card_id; + List list = cardObjectDic[cardPack.SleeveId]; + UIBase_CardManager.CardObjData cardObjData = list[0]; + list.RemoveAt(0); + GameObject gameObject = cardObjData.CardObj.gameObject; + gameObject.SetActive(value: true); + Transform transform = gameObject.transform; + AttachCardDetailButton(gameObject); + if (CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(card_id).CharType == CardBasePrm.CharaType.NORMAL) + { + GameObject gameObject2 = transform.Find("Life(Clone)").gameObject; + gameObject2.transform.localPosition = Global.POSITION_LIFE_ICON; + m_LifeIconList.Add(gameObject2); + GameObject gameObject3 = transform.Find("Atk(Clone)").gameObject; + gameObject3.transform.localPosition = Global.POSITION_ATK_ICON; + m_AtkIconList.Add(gameObject3); + } + else + { + m_LifeIconList.Add(null); + m_AtkIconList.Add(null); + } + GameObject gameObject4 = transform.Find("Cost(Clone)").gameObject; + gameObject4.transform.localPosition = Global.POSITION_COST_ICON; + m_CostIconList.Add(gameObject4); + GameObject gameObject5 = transform.Find("Name(Clone)").gameObject; + gameObject5.SetActive(value: false); + m_NameLabelList.Add(gameObject5); + Transform transform2 = transform.Find("CardBase"); + GameObject gameObject6 = null; + if (transform2 != null) + { + gameObject6 = transform2.Find("CardBase_Specular").gameObject; + gameObject6.layer = layer_Gacha; + gameObject6.SetActive(value: true); + } + if (!Data.Master.PackRarityEffectOverrideDic.TryGetValue(card_id, out var value)) + { + value = CardMaster.GetInstance(CardMaster.CardMasterId.Default).GetCardParameterFromId(card_id).Rarity; + } + m_RarityList.Add(value); + if (value > 1) + { + GameObject gobj = null; + switch (value) + { + case 2: + gobj = GachaStay1Pool; + break; + case 3: + gobj = GachaStay2Pool; + break; + case 4: + gobj = GachaStay3Pool; + break; + } + GameObject gameObject7 = GameMgr.GetIns().GetGameObjMgr().AddUIManagerChildPrefab(gobj); + gameObject7.transform.parent = transform; + gameObject7.name = "cmn_gacha_stay"; + gameObject7.transform.localPosition = Vector3.zero; + gameObject7.transform.localScale = Vector3.one; + gameObject7.layer = 30; + SetShaderList.Add(gameObject7); + } + GameObject gameObject8 = GameMgr.GetIns().GetGameObjMgr().AddUIManagerChildPrefab(GachaTwinkle1Pool); + gameObject8.transform.parent = transform; + gameObject8.name = "cmn_gacha_move"; + gameObject8.transform.localPosition = Vector3.back * 0.2f; + gameObject8.transform.localScale = Vector3.one; + gameObject8.layer = 30; + SetShaderList.Add(gameObject8); + if (cardPack.IsSpecialCard || cardPack.IsFreePackLeaderSkin) + { + gameObject6?.SetActive(value: false); + GameObject gameObject9 = GameMgr.GetIns().GetGameObjMgr().AddUIManagerChildPrefab(GachaSpecialStay1Pool); + gameObject9.transform.parent = transform; + gameObject9.name = "cmn_gacha_special"; + gameObject9.transform.localPosition = Vector3.forward * 0.1f; + gameObject9.transform.localScale = Vector3.one; + gameObject9.layer = 30; + SetShaderList.Add(gameObject9); + specialEffectList.Add(gameObject9); + } + gameObject.GetComponent().SetIdx(lastLoadedCardIndex + num); + transform.parent = CardPackParent.transform; + gameObject.layer = layer_Gacha; + transform.localScale = GachaObjScale; + m_CardPackList.Add(gameObject); + } + lastLoadedCardIndex += takeNum; + List collection = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(SetShaderList, delegate + { + for (int i = 0; i < SetShaderList.Count; i++) + { + SetShaderList[i].SetActive(value: false); + } + specialEffectList.ForEach(delegate(GameObject effect) + { + effect.SetActive(value: true); + }); + m_IsNextCardCreated = true; + onFinish?.Invoke(); + }); + EffectAssetPathList.AddRange(collection); + } + + private IEnumerator CreateGachaCardPack(IList cardPackList, int sleeveId) + { + UIManager.GetInstance().CardLoadGachaPack(base.gameObject, cardPackList, layer_Gacha, is2D: false, sleeveId); + while (UIManager.GetInstance().getSelectCardListObjs() == null) + { + yield return null; + } + while (UIManager.GetInstance().getSelectCardListObjs().Count < cardPackList.Count) + { + yield return null; + } + while (!UIManager.GetInstance().getUIBase_CardManager().getCreateEndFlag() || !UIManager.GetInstance().getUIBase_CardManager().isAssetAllReady) + { + yield return null; + } + } + + private void AttachCardDetailButton(GameObject cardObject) + { + cardObject.GetComponentInChildren().gameObject.AddComponent().onClick.Add(new EventDelegate(delegate + { + OnClickCard(cardObject); + })); + } + + private void InstantiateCardPack(int parent_id) + { + _seNameGachaAppear = $"se_sys_gacha_appear_{parent_id}"; + _seNameGachaOpen = $"se_sys_gacha_open_{parent_id}"; + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_2", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_3", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_4", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_move_1", ResourcesManager.AssetLoadPathType.Effect2D)); + bool isExistFreePackLeaderSkin = false; + foreach (CardPack item in Data.PackOpen.data.pack_list) + { + if (item.IsFreePackLeaderSkin) + { + isExistFreePackLeaderSkin = true; + break; + } + } + if (_isSpecialCardPackSet || isExistFreePackLeaderSkin) + { + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_special_1", ResourcesManager.AssetLoadPathType.Effect2D)); + } + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_idle_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_tap_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_shine_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("gch_box_special_1", ResourcesManager.AssetLoadPathType.Effect2D)); + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath("gch_box_special_2", ResourcesManager.AssetLoadPathType.Effect2D)); + string packBoxName = $"md_gachabox_{parent_id}"; + PackAssetNameList.Add(Toolbox.ResourcesManager.GetAssetTypePath(packBoxName, ResourcesManager.AssetLoadPathType.PackBox)); + StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(PackAssetNameList, delegate + { + GameObject prefab = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath(packBoxName, ResourcesManager.AssetLoadPathType.PackBox, isfetch: true)) as GameObject; + GameObject gameObject = NGUITools.AddChild(GachaBox, prefab); + GachaBoxAnim = gameObject.GetComponent(); + GachaBoxAnim[GachaBoxAnim.clip.name].speed = -1f; + GachaBoxAnim.Play(); + GameObject original = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_idle_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GameObject original2 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_tap_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GameObject original3 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath($"gch_box_shine_1_{parent_id}", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + PackEffectIdle1 = UnityEngine.Object.Instantiate(original); + PackEffectIdle1.transform.position = Vector3.zero; + PackEffectIdle1.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectIdle1.SetActive(value: false); + PackEffectTap1 = UnityEngine.Object.Instantiate(original2); + PackEffectTap1.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectTap1.transform.position = Vector3.zero; + PackEffectTap1.SetActive(value: false); + PackEffectShine1 = UnityEngine.Object.Instantiate(original3); + PackEffectShine1.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectShine1.transform.position = Vector3.zero; + PackEffectShine1.SetActive(value: false); + _boxEffectList.Add(PackEffectIdle1); + _boxEffectList.Add(PackEffectTap1); + _boxEffectList.Add(PackEffectShine1); + if (_isCoutainSpecialCard) + { + GameObject original4 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("gch_box_special_1", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GameObject original5 = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("gch_box_special_2", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + PackEffectSpecial1 = UnityEngine.Object.Instantiate(original4); + PackEffectSpecial1.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectSpecial1.transform.position = Vector3.zero; + PackEffectSpecial1.SetActive(value: false); + PackEffectSpecial2 = UnityEngine.Object.Instantiate(original5); + PackEffectSpecial2.transform.parent = m_EfcMgrIns.EffectContainer.transform; + PackEffectSpecial2.transform.position = Vector3.zero; + PackEffectSpecial2.SetActive(value: false); + _boxEffectList.Add(PackEffectSpecial1); + _boxEffectList.Add(PackEffectSpecial2); + } + GachaStay1Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_2", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GachaStay2Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_3", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GachaStay3Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_stay_4", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + GachaTwinkle1Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_move_1", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + if (_isSpecialCardPackSet || isExistFreePackLeaderSkin) + { + GachaSpecialStay1Pool = Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("cmn_gacha_special_1", ResourcesManager.AssetLoadPathType.Effect2D, isfetch: true)); + } + cardPackSize = Data.PackOpen.data.pack_list.Count; + cardPackNum = (cardPackSize - 1) / 8 + 1; + LabelPackUnit.text = Data.SystemText.Get("Shop_0089", cardPackNum.ToString()); + List collection = GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(_boxEffectList, delegate + { + StartCoroutine(loadNextPage(delegate + { + for (int i = 0; i < m_CardPackList.Count; i++) + { + if (m_CardPackList[i] != null) + { + m_CardPackList[i].SetActive(value: false); + } + } + ToolboxGame.UIManager.closeInSceneLoading(); + UIManager.GetInstance().CreatFadeOpen(); + SetLabelPackOpenCount(); + RunGachaAnim(); + })); + }); + EffectAssetPathList.AddRange(collection); + SetDarkSideParameter(parent_id); + })); + } + + private void SetDarkSideParameter(int packId) + { + if (Data.Master.GachaMaskDarkDic.TryGetValue(packId, out var value)) + { + DarkSideTex.color = value.Color; + DarkSideTex.uvRect = value.UvRect; + } + } + + private IEnumerator DisposeCardPackSecen() + { + _isDispose = true; + yield return new WaitForSeconds(1f); + while (_isNextCardAnim) + { + yield return null; + } + animCnt = 100; + StartCoroutine(WaitForCreateCards(delegate + { + for (int i = 0; i < m_CardPackList.Count; i++) + { + UnityEngine.Object.Destroy(m_CardPackList[i]); + } + m_CardPackList.Clear(); + m_EfcMgrIns.DisposeLatestMadeEffects(); + UnityEngine.Object.Destroy(PackEffectIdle1); + UnityEngine.Object.Destroy(PackEffectTap1); + UnityEngine.Object.Destroy(PackEffectShine1); + if (_isCoutainSpecialCard) + { + UnityEngine.Object.Destroy(PackEffectSpecial1); + UnityEngine.Object.Destroy(PackEffectSpecial2); + } + _boxEffectList.Clear(); + UnityEngine.Object.Destroy(CardPackParent); + SkipBtn.gameObject.SetActive(value: false); + OkBtn.gameObject.SetActive(value: false); + LabelPackNum.gameObject.SetActive(value: false); + TouchObj.gameObject.SetActive(value: false); + GameMgr.GetIns().GetSoundMgr().FadeBgmVolume(m_BackupBgmVolume); + RemoveAssets(); + MyPageMenu.SetEnableReloadCard(); + UIManager instance = UIManager.GetInstance(); + UIBase uIBase = instance.GetUIBase(_nextScene); + if (uIBase != null) + { + uIBase.Open(); + } + else + { + instance.ChangeViewScene(_nextScene); + } + })); + } + + private IEnumerator WaitForCreateCards(Action callback, bool isCenterLoading = false) + { + if (isCenterLoading && !m_IsNextCardCreated) + { + UIManager.GetInstance().createInSceneCenterLoading(notBlack: false, notCollider: true); + } + while (true) + { + if (!m_IsNextCardCreated) + { + yield return null; + continue; + } + if (m_IsHideCardFinish) + { + break; + } + yield return null; + } + callback.Call(); + } + + private void OnClickNextBtn() + { + SoundMgr soundMgr = GameMgr.GetIns().GetSoundMgr(); + if (currentCnt < cardPackSize) + { + packOpenCnt++; + SetLabelPackOpenCount(); + RunGachaAnim(); + soundMgr.PlaySe(Se.TYPE.SYS_BTN_DECIDE); + soundMgr.PlaySe(Se.TYPE.SYS_GACHA_CARD_OUT); + } + else + { + soundMgr.PlaySe(Se.TYPE.SYS_BTN_CANCEL_TRANS); + animCnt = 100; + UIManager.GetInstance().CreatFadeClose(); + StartCoroutine(DisposeCardPackSecen()); + } + } + + private void OnClickSkipBtn() + { + UIManager.GetInstance().createInSceneCenterLoading(); + GameMgr.GetIns().GetSoundMgr().StopSeAll(1.5f); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL_TRANS); + IsSkipped = true; + UIManager.GetInstance().CreatFadeClose(); + StartCoroutine(DisposeCardPackSecen()); + } + + private void RemoveAssets() + { + PackAssetNameList.AddRange(EffectAssetPathList); + PackAssetNameList.AddRange(Toolbox.ResourcesManager.CardListAssetPathList); + Toolbox.ResourcesManager.RemoveAssetGroup(PackAssetNameList); + PackAssetNameList.Clear(); + EffectAssetPathList.Clear(); + Toolbox.ResourcesManager.CardListAssetPathList.Clear(); + GameMgr.GetIns().GetPrefabMgr().UnLoad("Gacha/GachaObj"); + GameMgr.GetIns().GetSoundMgr().UnloadSe("se_gacha"); + } + + private void Update() + { + if (animCnt == 100) + { + return; + } + switch (animCnt) + { + case 2: + if (m_InputMgrIns.IsDown()) + { + RunGachaAnim(); + } + break; + case 6: + if (m_InputMgrIns.IsDown() || m_InputMgrIns.IsPress()) + { + CheckPressCardOpen(); + mousePosPrev = Input.mousePosition; + } + else + { + mousePosPrev = Vector3.zero; + } + break; + case 8: + if (!_cardDetail.GetIsDetailOn() && GameMgr.GetIns().GetInputMgr().isBackKeyEnable) + { + GameMgr.GetIns().GetInputMgr().isBackKeyEnable = false; + } + break; + } + } + + private void OnClickCard(GameObject cardObject) + { + if (animCnt == 8 && !_isDispose && !_cardDetail.GetIsDetailOn()) + { + GameMgr.GetIns().GetInputMgr().isBackKeyEnable = true; + _cardDetail.OnPushCardDetailOn(cardObject); + } + } + + private void RunGachaAnim() + { + animCnt++; + switch (animCnt) + { + default: + _ = 100; + break; + case 1: + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(_seNameGachaAppear, "se_gacha", 0f, 0L); + GachaLight.transform.localRotation = Quaternion.Euler(Vector3.up * 45f); + iTween.RotateBy(GachaLight, iTween.Hash("z", -1f, "time", 2f, "looptype", iTween.LoopType.loop, "easetype", iTween.EaseType.linear)); + PackEffectIdle1.SetActive(value: true); + if (_isCoutainSpecialCard) + { + PackEffectSpecial1.SetActive(value: true); + } + iTween.MoveTo(GachaCamera.gameObject, iTween.Hash("position", new Vector3(0f, -1200f, -2000f), "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.RotateTo(GachaCamera.gameObject, iTween.Hash("rotation", Vector3.left * 30f, "time", 2f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.ScaleTo(DarkSideTex.gameObject, iTween.Hash("scale", Vector3.one, "time", 2f, "easetype", iTween.EaseType.easeInOutExpo)); + Invoke("RunGachaAnim", 2f); + break; + case 2: + TouchObj.gameObject.SetActive(value: true); + DarkSideTex.transform.localScale = Vector3.one; + iTween.ScaleTo(DarkSideTex.gameObject, iTween.Hash("scale", Vector3.one * 1.1f, "time", 1f, "looptype", iTween.LoopType.pingPong, "easetype", iTween.EaseType.easeInOutQuad)); + break; + case 3: + PackEffectIdle1.SetActive(value: false); + PackEffectTap1.SetActive(value: true); + if (_isCoutainSpecialCard) + { + PackEffectSpecial1.SetActive(value: false); + PackEffectSpecial2.SetActive(value: true); + } + iTween.Stop(DarkSideTex.gameObject); + GameMgr.GetIns().GetSoundMgr().PlaySeByStr(_seNameGachaOpen, "se_gacha", 0f, 0L); + TouchObj.gameObject.SetActive(value: false); + Invoke("RunGachaAnim", 1f); + break; + case 4: + GachaBoxAnim[GachaBoxAnim.clip.name].speed = 1f; + GachaBoxAnim.Play(); + PackEffectShine1.SetActive(value: true); + iTween.ScaleTo(DarkSideTex.gameObject, iTween.Hash("scale", Vector3.one * 1.5f, "time", 1f, "delay", 2.5f, "easetype", iTween.EaseType.easeInOutExpo)); + Invoke("RunGachaAnim", 3.5f); + break; + case 5: + { + for (int num2 = 0; num2 < m_CardPackList.Count; num2++) + { + if (!(m_CardPackList[num2] == null)) + { + m_CardPackList[num2].transform.localPosition = Vector3.back * 200f; + m_CardPackList[num2].transform.localRotation = Quaternion.Euler(Vector3.up * 180f); + m_CardPackList[num2].SetActive(value: true); + } + } + if (m_CardPackList.Count <= 8) + { + iTween.MoveTo(GachaCamera.gameObject, iTween.Hash("position", POSITION_CARDVIEW_CAMERA, "time", 2.5f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + iTween.RotateTo(GachaCamera.gameObject, iTween.Hash("rotation", Vector3.zero, "time", 2.5f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + TweenAlpha.Begin(DarkSideTex.gameObject, 2.5f, 0f); + TweenAlpha.Begin(BgBlackTex.gameObject, 2.5f, 0.8f); + iTween.RotateTo(GachaLight, iTween.Hash("x", -45f, "y", 0f, "time", 2.5f, "islocal", true, "easetype", iTween.EaseType.easeInOutExpo)); + } + SetCardAnimList(); + if (_isAutoOpen) + { + SetCardPosResult(); + for (int num3 = 0; num3 < m_CardAnimList.Count; num3++) + { + StartCoroutine(AlignCardFirst(num3)); + } + animCnt = 7; + Invoke("OpenCardAuto", 1.5f); + } + else + { + SetCardPosFirst(); + for (int num4 = 0; num4 < m_CardAnimList.Count; num4++) + { + StartCoroutine(AlignCardFirst(num4)); + } + } + float time = 0.1f; + float time2 = 1.6f; + if (m_CardPackList.Count <= 8) + { + time = 1.1f; + time2 = 2.6f; + } + else if (_isAutoOpen) + { + for (int num5 = 0; num5 < m_CardAnimList.Count; num5++) + { + int idx2 = m_CardAnimList[num5].GetComponent().m_Idx; + if (m_NameLabelList[idx2] != null) + { + m_NameLabelList[idx2].SetActive(value: true); + } + } + } + Invoke("drawSound", time); + Invoke("RunGachaAnim", time2); + m_openCardQueue.Clear(); + break; + } + case 6: + mousePosPrev = Vector3.zero; + _isNextCardAnim = false; + LabelPackNum.gameObject.SetActive(value: true); + m_CardOpenList.Clear(); + m_EfcMgrIns.Start(EffectMgr.EffectType.CMN_GACHA_CURSOR_1, new Vector3(30f, 0f, -1.5f)); + StartCoroutine("OpenCardList_Coroutine"); + break; + case 7: + SetCardPosResult(); + AlignCard(0.5f, 0.5f); + Invoke("RunGachaAnim", 1.1f); + break; + case 8: + _isNextCardAnim = false; + SetClanLabels(flg: true); + if (currentCnt < cardPackSize) + { + StartCoroutine(loadNextPage(null)); + } + if (_isAutoOpen) + { + for (int num = 0; num < m_CardAnimList.Count; num++) + { + int idx = m_CardAnimList[num].GetComponent().m_Idx; + if (m_LifeIconList[idx] != null) + { + m_LifeIconList[idx].SetActive(value: true); + } + if (m_AtkIconList[idx] != null) + { + m_AtkIconList[idx].SetActive(value: true); + } + if (m_CostIconList[idx] != null) + { + m_CostIconList[idx].SetActive(value: true); + } + if (m_NameLabelList[idx] != null) + { + m_NameLabelList[idx].SetActive(value: true); + } + } + LabelPackNum.gameObject.SetActive(value: true); + } + OkBtn.isEnabled = true; + break; + case 9: + _isNextCardAnim = true; + SetClanLabels(flg: false); + OkBtn.isEnabled = false; + HideCard(); + RunGachaAnim(); + break; + case 10: + StartCoroutine(WaitForCreateCards(delegate + { + animCnt = 4; + RunGachaAnim(); + UIManager.GetInstance().closeInSceneCenterLoading(); + }, isCenterLoading: true)); + break; + } + } + + private void SetCardAnimList() + { + foreach (GameObject cardAnim in m_CardAnimList) + { + UnityEngine.Object.Destroy(cardAnim); + } + m_CardAnimList.Clear(); + for (int i = 0; i < currentCnt; i++) + { + m_CardPackList[i] = null; + } + for (int j = 0; j < m_CardPackList.Count; j++) + { + if (m_CardAnimList.Count >= 8) + { + break; + } + if (currentCnt >= m_CardPackList.Count) + { + break; + } + m_CardAnimList.Add(m_CardPackList[currentCnt]); + currentCnt++; + } + } + + private void CheckPressCardOpen() + { + Vector3 mousePosition = Input.mousePosition; + if (mousePosPrev != Vector3.zero) + { + Vector3 vector = (mousePosition - mousePosPrev) / 10f; + for (int i = 1; i <= 10; i++) + { + RaycastHit[] array = Physics.RaycastAll(GachaCamera.ScreenPointToRay(vector * i + mousePosPrev)); + for (int j = 0; j < array.Length; j++) + { + SetOpenCardQueue(array[j].collider.transform.parent.gameObject); + } + } + } + else + { + RaycastHit[] array = Physics.RaycastAll(GachaCamera.ScreenPointToRay(mousePosition)); + for (int k = 0; k < array.Length; k++) + { + SetOpenCardQueue(array[k].collider.transform.parent.gameObject); + } + } + } + + private void SetOpenCardQueue(GameObject obj) + { + if (obj.CompareTag("Card") && !m_openCardQueue.Contains(obj) && !IsOpenedCard(obj)) + { + m_openCardQueue.Enqueue(obj); + } + } + + private IEnumerator OpenCardList_Coroutine() + { + while (animCnt == 6) + { + if (m_openCardQueue.Count > 0) + { + OpenCard(m_openCardQueue.Dequeue()); + yield return new WaitForSeconds(0.05f); + } + else + { + yield return null; + } + } + } + + private void AppearCardComplete(int cnt) + { + m_CardPackList[cnt].SetActive(value: false); + } + + private bool IsOpenedCard(GameObject obj) + { + for (int i = 0; i < m_CardOpenList.Count; i++) + { + if (m_CardOpenList[i] == obj.GetComponent().m_Idx) + { + return true; + } + } + return false; + } + + private void OpenCard(GameObject obj) + { + if (!IsOpenedCard(obj)) + { + m_EfcMgrIns.Stop(EffectMgr.EffectType.CMN_GACHA_CURSOR_1); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_COMMON); + float num = 0f; + int idx = obj.GetComponent().m_Idx; + switch (m_RarityList[idx]) + { + case 1: + num = 0.3f; + iTween.MoveTo(obj, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.95f + 30f, "y", obj.transform.position.y * 0.95f, "z", obj.transform.position.z - 0.5f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + break; + case 2: + { + GameMgr.GetIns().GetSoundMgr().StopSe(Se.TYPE.SYS_GACHA_COMMON); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_RARE); + num = 0.3f; + GameObject gameObjIns = m_EfcMgrIns.Start(EffectMgr.EffectType.CMN_GACHA_OPEN_2, obj.transform.position).GetGameObjIns(); + iTween.MoveTo(obj, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.9f + 30f, "y", obj.transform.position.y * 0.9f, "z", obj.transform.position.z - 1f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(gameObjIns, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.9f + 30f, "y", obj.transform.position.y * 0.9f, "z", obj.transform.position.z - 1f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + break; + } + case 3: + { + GameMgr.GetIns().GetSoundMgr().StopSe(Se.TYPE.SYS_GACHA_COMMON); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_EPIC); + num = 0.5f; + GameObject gameObjIns = m_EfcMgrIns.Start(EffectMgr.EffectType.CMN_GACHA_OPEN_3, obj.transform.position).GetGameObjIns(); + iTween.MoveTo(obj, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.5f + 30f, "y", obj.transform.position.y * 0.5f, "z", obj.transform.position.z - 4f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(gameObjIns, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.5f + 30f, "y", obj.transform.position.y * 0.5f, "z", obj.transform.position.z - 4f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.ShakePosition(GachaCamera.gameObject, iTween.Hash("amount", Vector3.one * 0.1f, "time", num, "oncomplete", "InitCameraPos", "oncompletetarget", base.gameObject)); + break; + } + case 4: + { + GameMgr.GetIns().GetSoundMgr().StopSe(Se.TYPE.SYS_GACHA_COMMON); + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_LEGEND); + num = 0.7f; + GameObject gameObjIns = m_EfcMgrIns.Start(EffectMgr.EffectType.CMN_GACHA_OPEN_4, obj.transform.position).GetGameObjIns(); + iTween.MoveTo(obj, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.25f + 30f, "y", obj.transform.position.y * 0.25f, "z", obj.transform.position.z - 6f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.MoveTo(gameObjIns, iTween.Hash("x", (obj.transform.position.x - 30f) * 0.25f + 30f, "y", obj.transform.position.y * 0.25f, "z", obj.transform.position.z - 6f, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + iTween.ShakePosition(GachaCamera.gameObject, iTween.Hash("amount", Vector3.one * 0.2f, "time", num, "oncomplete", "InitCameraPos", "oncompletetarget", base.gameObject)); + break; + } + } + iTween.MoveTo(obj, iTween.Hash("position", obj.transform.position, "time", num, "delay", num, "easetype", iTween.EaseType.easeInExpo)); + float num2 = ((CardBefore != null) ? ((!(obj.transform.localPosition.x > CardBefore.transform.localPosition.x)) ? 180f : (-180f)) : ((!(obj.transform.localPosition.x - 9600f < 0f)) ? 180f : (-180f))); + iTween.RotateAdd(obj, iTween.Hash("y", num2, "time", num, "easetype", iTween.EaseType.easeOutExpo)); + CardBefore = obj; + m_CardOpenList.Add(idx); + if (m_CardOpenList.Count >= m_CardAnimList.Count) + { + Invoke("RunGachaAnim", 2f); + } + OpenCardSetting(obj); + } + } + + private void InitCameraPos() + { + GachaCamera.transform.localPosition = POSITION_CARDVIEW_CAMERA; + } + + private void OpenCardSetting(GameObject obj) + { + int idx = obj.GetComponent().m_Idx; + if (m_RarityList[idx] > 1) + { + obj.transform.Find("cmn_gacha_stay").gameObject.SetActive(value: true); + } + if (_isSpecialCardPackSet) + { + obj.transform.Find("cmn_gacha_special")?.gameObject.SetActive(value: false); + } + m_CostIconList[idx].SetActive(value: true); + if (m_LifeIconList[idx] != null) + { + m_LifeIconList[idx].SetActive(value: true); + } + if (m_AtkIconList[idx] != null) + { + m_AtkIconList[idx].SetActive(value: true); + } + if (m_NameLabelList[idx] != null) + { + m_NameLabelList[idx].SetActive(value: true); + } + } + + private void OpenCardAuto() + { + if (!_isDispose) + { + for (int i = 0; i < m_CardAnimList.Count; i++) + { + OpenCardSetting(m_CardAnimList[i]); + } + } + } + + private IEnumerator AlignCardFirst(int idx) + { + iTween.Stop(m_CardAnimList[idx]); + yield return new WaitForSeconds((float)idx / ((float)m_CardAnimList.Count - 1f) * 0.5f); + if (_isDispose) + { + yield break; + } + if (m_CardPackList.Count <= 8) + { + iTween.MoveTo(m_CardAnimList[idx], iTween.Hash("z", -1000f, "time", 1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + yield return new WaitForSeconds(1f); + if (_isDispose) + { + yield break; + } + } + else + { + m_CardAnimList[idx].transform.localPosition += Vector3.back * 1000f; + } + m_CardAnimList[idx].transform.Find("cmn_gacha_move").gameObject.SetActive(value: true); + iTween.MoveTo(m_CardAnimList[idx], iTween.Hash("position", m_CardPosList[idx], "time", 1f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.RotateTo(m_CardAnimList[idx], iTween.Hash("rotation", m_CardRotList[idx], "time", 1f, "easetype", iTween.EaseType.easeOutExpo)); + } + + private void drawSound() + { + if (currentCnt != 8) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_CARD_IN); + } + } + + private void AlignCard(float time, float delay) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_GACHA_MOVE); + for (int i = 0; i < m_CardAnimList.Count; i++) + { + iTween.MoveTo(m_CardAnimList[i], iTween.Hash("position", m_CardPosList[i], "time", time, "delay", (float)i / ((float)m_CardAnimList.Count - 1f) * delay, "islocal", true, "easetype", iTween.EaseType.easeOutExpo)); + iTween.RotateTo(m_CardAnimList[i], iTween.Hash("rotation", m_CardRotList[i], "time", time, "delay", (float)i / ((float)m_CardAnimList.Count - 1f) * delay, "easetype", iTween.EaseType.easeOutExpo)); + } + } + + private void HideCard() + { + m_IsHideCardFinish = false; + for (int i = 0; i < m_CardAnimList.Count; i++) + { + iTween.MoveTo(m_CardAnimList[i], iTween.Hash("x", 14400f, "time", 0.3f, "delay", (float)i / ((float)m_CardAnimList.Count - 1f) * 0.2f, "islocal", true, "easetype", iTween.EaseType.easeInExpo)); + } + Invoke("HideCardFinish", 0.6f); + } + + private void HideCardFinish() + { + m_IsHideCardFinish = true; + } + + private void SetCardPosFirst() + { + m_CardPosList.Clear(); + m_CardRotList.Clear(); + for (int i = 0; i < m_CardAnimList.Count; i++) + { + float num = (float)i / ((float)m_CardAnimList.Count - 1f); + float num2 = ((!(num < 0.5f)) ? (MotionUtils.GetEase(num * 2f - 1f, MotionUtils.EaseType.easeInQuad) * 0.5f + 0.5f) : (MotionUtils.GetEase(num * 2f, MotionUtils.EaseType.easeOutQuad) * 0.5f)); + Vector3 item = new Vector3(num * 4000f - 2000f + 9600f, Mathf.Abs(num2 - 0.5f) * -500f + 250f, (float)i * -10f - 100f); + Vector3 item2 = new Vector3(0f, -185f, num * 10f - 5f); + m_CardPosList.Add(item); + m_CardRotList.Add(item2); + } + } + + private void SetCardPosResult() + { + float num = 5000f; + float num2 = 2800f; + m_CardPosList.Clear(); + m_CardRotList.Clear(); + int num3 = ((m_CardAnimList.Count <= 5) ? m_CardAnimList.Count : ((int)Mathf.Ceil((float)m_CardAnimList.Count / 2f))); + int num4 = (int)Mathf.Ceil((float)m_CardAnimList.Count / (float)num3); + for (int i = 0; i < m_CardAnimList.Count; i++) + { + int num5 = ((i >= m_CardAnimList.Count - m_CardAnimList.Count % num3) ? (m_CardAnimList.Count % num3) : num3); + float num6 = num / (float)num5; + float num7 = num2 / (float)num4; + float x = (float)(i % num3) * num6 + num6 / 2f - num / 2f + 9600f; + float y = Mathf.Floor((float)i / (float)num3) * (0f - num7) - num7 / 2f + num2 / 2f + 220f; + m_CardPosList.Add(new Vector3(x, y, -100f)); + m_CardRotList.Add(Vector3.zero); + } + } + + private void SetLabelPackOpenCount() + { + LabelPackNum.text = packOpenCnt + "/" + cardPackNum; + } + + private void SetClanLabels(bool flg) + { + } +} diff --git a/SVSim.BattleEngine/Engine/CardTemplate.cs b/SVSim.BattleEngine/Engine/CardTemplate.cs new file mode 100644 index 0000000..c431be2 --- /dev/null +++ b/SVSim.BattleEngine/Engine/CardTemplate.cs @@ -0,0 +1,319 @@ +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle.Resource; + +public class CardTemplate : MonoBehaviour +{ + public GameObject CardWrapObjTemp; + + public Transform CardNormalTemp; + + public LODGroup CardNormalLodGroup; + + public MeshRenderer FieldNormalMeshTemp; + + public MeshRenderer FieldEvolMeshTemp; + + public MeshRenderer NormalCardBaseMeshTemp; + + public MeshRenderer EvolCardBaseMeshTemp; + + public UISprite SkillIconTemp; + + public UILabel SkillIconLabelTemp; + + public UILabel LifeLabelTemp; + + public UILabel AtkLabelTemp; + + public UILabel NormalCostLabelTemp; + + public UILabel NormalZeroCostLabelTemp; + + public UILabel NormalSignLabelTemp; + + public UILabel NormalSignedCostLabelTemp; + + public UILabel NormalLifeLabelTemp; + + public UILabel NormalAtkLabelTemp; + + public UILabel NormalNameLabelTemp; + + public UILabel NormalChoiceBraveNameLabelTemp; + + public GameObject FrameEffectNormal; + + public GameObject FrameEffectEvolve; + + public GameObject FrameEffectHandCard; + + public ParticleSystemRenderer[] FrameEffectHandRenderer; + + public GameObject _spellBoostFrameEffect; + + public BoxCollider Collider; + + public BoxCollider NotCancelCollider; + + private bool isPlayer = true; + + private bool _isChoiceBrave; + + public void DynamicSetupMaterials(BattleCardBase card, IBattleResourceMgr resourceMgr) + { + isPlayer = card.IsPlayer; + if (card.IsUnit) + { + DynamicSetupNormalObjMaterials(card.BaseParameter, resourceMgr); + } + else if (card.IsSpell) + { + DynamicSetupSpellObjMaterials(card.BaseParameter, resourceMgr); + } + else if (card.IsField) + { + DynamicSetupFieldObjMaterials(card.BaseParameter, resourceMgr); + } + } + + public void DynamicSetupNormalObjMaterials(CardParameter cardParameter, IBattleResourceMgr resourceMgr) + { + Material CTexNormal = null; + try + { + CardParameter cardParameterFromId = CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardParameter.NormalCardId); + string materialPath = Toolbox.ResourcesManager.GetAssetTypePath(cardParameterFromId.ResourceCardId.ToString(), ResourcesManager.AssetLoadPathType.UnitCardMaterial); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(materialPath, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(materialPath); + if (!(CardWrapObjTemp == null)) + { + CTexNormal = Toolbox.ResourcesManager.FindCardMaterial(cardParameter.ResourceCardId, ResourcesManager.AssetLoadPathType.UnitCardMaterial); + CardShaderDefine.ReplaceShader(CTexNormal); + UnitCardCreator.SetupUnitCardMaterialToCardMesh(CardWrapObjTemp.transform, cardParameter, CTexNormal); + } + }); + NormalCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + EvolCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + AtkLabelTemp.text = cardParameter.Atk.ToString(); + NormalAtkLabelTemp.text = cardParameter.Atk.ToString(); + LifeLabelTemp.text = cardParameter.Life.ToString(); + NormalLifeLabelTemp.text = cardParameter.Life.ToString(); + NormalCostLabelTemp.text = cardParameter.Cost.ToString(); + NormalNameLabelTemp.text = cardParameter.CardName; + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(NormalCostLabelTemp, cardParameter.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(NormalNameLabelTemp, cardParameter.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(NormalAtkLabelTemp, cardParameter.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(NormalLifeLabelTemp, cardParameter.IsFoil); + Global.SetRepositionNameLabel(NormalNameLabelTemp, cardParameter.CardName, is2D: false); + } + catch + { + CTexNormal = null; + } + } + + public void DynamicSetupSpellObjMaterials(CardParameter cardParameter, IBattleResourceMgr resourceMgr) + { + CardMaster cardMaster = CardMaster.GetInstanceForBattle(); + Material[] MaterialArrayNormal = new Material[3]; + Material CTexNormal = null; + try + { + string materialPath = Toolbox.ResourcesManager.GetAssetTypePath(cardMaster.GetCardParameterFromId(cardParameter.NormalCardId).ResourceCardId.ToString(), ResourcesManager.AssetLoadPathType.SpellCardMaterial); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(materialPath, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(materialPath); + if (!(CardWrapObjTemp == null)) + { + bool flag2 = CardMaster.IsChoiceBraveCardCheck(cardParameter.BaseCardId); + CTexNormal = Toolbox.ResourcesManager.FindCardMaterial(cardParameter.ResourceCardId, ResourcesManager.AssetLoadPathType.SpellCardMaterial, isEvol: false, CardMaster.IsMutationCardCheck(cardParameter.BaseCardId), cardMaster.GetCardParameterFromId((cardParameter.ResourceCardId / 1000000000 == 1) ? (cardParameter.ResourceCardId / 10) : cardParameter.ResourceCardId).CharType, flag2); + CardShaderDefine.ReplaceShader(CTexNormal); + UIManager.GetInstance().SetLayerRecursive(CardNormalTemp, 10); + if (flag2) + { + BattleManagerBase.GetIns().BattleResourceMgr.LoadChoiceBraveCardMesh(); + MeshFilter[] componentsInChildren = CardNormalTemp.GetComponentsInChildren(); + componentsInChildren[0].sharedMesh = resourceMgr.GetChoiceBraveCardMesh(isLow: false); + componentsInChildren[1].sharedMesh = resourceMgr.GetChoiceBraveCardMesh(isLow: true); + } + Material rerityMaterial = resourceMgr.GetRerityMaterial(isHand: true, isSpell: true, cardParameter.Rarity, flag2); + if (rerityMaterial != null) + { + rerityMaterial.shader = Shader.Find(rerityMaterial.shader.name); + } + MaterialArrayNormal[0] = rerityMaterial; + MaterialArrayNormal[1] = CTexNormal; + MaterialArrayNormal[2] = CardCreatorBase.GetSharedClassIconMaterial(cardParameter.Clan); + LOD[] lODs = CardNormalLodGroup.GetLODs(); + for (int i = 0; i < lODs.Length; i++) + { + lODs[i].renderers[0].sharedMaterials = MaterialArrayNormal; + } + } + }); + NormalCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + if (CardMaster.IsChoiceBraveCardCheck(cardParameter.NormalCardId)) + { + SetEffectColor(Global.CARD_HBP_LABEL_COST_COLOR); + } + bool flag = cardParameter.NormalCardId / 1000000 == 930; + if (cardParameter.IsVariableCost) + { + NormalSignLabelTemp.text = "-"; + NormalSignedCostLabelTemp.text = "X"; + ShowSignedCostLabel(); + NormalChoiceBraveNameLabelTemp.text = cardParameter.CardName; + ShowChoiceBraveNameLabel(); + } + else if (flag) + { + if (cardParameter.Cost != 0) + { + NormalSignLabelTemp.text = ((cardParameter.Cost > 0) ? "-" : "+"); + NormalSignedCostLabelTemp.text = Mathf.Abs(cardParameter.Cost).ToString(); + ShowSignedCostLabel(); + } + else + { + NormalZeroCostLabelTemp.text = "0"; + ShowZeroCostLabel(); + } + NormalChoiceBraveNameLabelTemp.text = cardParameter.CardName; + ShowChoiceBraveNameLabel(); + } + else + { + NormalCostLabelTemp.text = cardParameter.Cost.ToString(); + NormalNameLabelTemp.text = cardParameter.CardName; + } + SetNumberLabelStyle(cardParameter.IsFoil); + SetNameLabelStyle(cardParameter.IsFoil, flag); + SetRepositionNameLabel(cardParameter.CardName, flag); + } + catch + { + CTexNormal = null; + } + } + + public void DynamicSetupFieldObjMaterials(CardParameter cardParameter, IBattleResourceMgr resourceMgr) + { + CardMaster cardMaster = CardMaster.GetInstanceForBattle(); + Material CTexNormal = null; + try + { + string materialPath = Toolbox.ResourcesManager.GetAssetTypePath(CardMaster.GetInstanceForBattle().GetCardParameterFromId(cardParameter.NormalCardId).ResourceCardId.ToString(), ResourcesManager.AssetLoadPathType.SpellCardMaterial); + Toolbox.ResourcesManager.StartCoroutine_LoadAssetGroupAsync(materialPath, delegate + { + Toolbox.ResourcesManager.BattleListAssetPathList.Add(materialPath); + if (!(CardWrapObjTemp == null)) + { + CTexNormal = Toolbox.ResourcesManager.FindCardMaterial(cardParameter.ResourceCardId, ResourcesManager.AssetLoadPathType.SpellCardMaterial, isEvol: false, CardMaster.IsMutationCardCheck(cardParameter.BaseCardId), cardMaster.GetCardParameterFromId(cardParameter.ResourceCardId).CharType); + CardShaderDefine.ReplaceShader(CTexNormal); + FieldCardCreator.SetupFieldCardMaterialToCardMesh(CardWrapObjTemp.transform, cardParameter, CTexNormal); + } + }); + NormalCardBaseMeshTemp.sharedMaterial = resourceMgr.GetSleeveMaterial(isPlayer); + NormalCostLabelTemp.text = cardParameter.Cost.ToString(); + NormalNameLabelTemp.text = cardParameter.CardName; + UIManager.GetInstance().getUIBase_CardManager().SetNumberLabelStyle(NormalCostLabelTemp, cardParameter.IsFoil); + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(NormalNameLabelTemp, cardParameter.IsFoil); + Global.SetRepositionNameLabel(NormalNameLabelTemp, cardParameter.CardName, is2D: false); + } + catch + { + CTexNormal = null; + } + } + + public void ShowNameLabel() + { + if (_isChoiceBrave) + { + NormalChoiceBraveNameLabelTemp.alpha = 1f; + } + else + { + NormalNameLabelTemp.alpha = 1f; + } + } + + public void HideNameLabel() + { + if (_isChoiceBrave) + { + NormalChoiceBraveNameLabelTemp.alpha = 0f; + } + else + { + NormalNameLabelTemp.alpha = 0f; + } + } + + public void SetEffectStyle(UILabel.Effect effectStyle) + { + NormalCostLabelTemp.effectStyle = effectStyle; + NormalZeroCostLabelTemp.effectStyle = effectStyle; + NormalSignLabelTemp.effectStyle = effectStyle; + NormalSignedCostLabelTemp.effectStyle = effectStyle; + } + + public void SetEffectColor(Color color) + { + NormalCostLabelTemp.effectColor = color; + NormalZeroCostLabelTemp.effectColor = color; + NormalSignLabelTemp.effectColor = color; + NormalSignedCostLabelTemp.effectColor = color; + } + + public void ShowZeroCostLabel() + { + NormalZeroCostLabelTemp.gameObject.SetActive(value: true); + NormalCostLabelTemp.gameObject.SetActive(value: false); + NormalSignLabelTemp.gameObject.SetActive(value: false); + NormalSignedCostLabelTemp.gameObject.SetActive(value: false); + } + + public void ShowSignedCostLabel() + { + NormalSignLabelTemp.gameObject.SetActive(value: true); + NormalSignedCostLabelTemp.gameObject.SetActive(value: true); + NormalCostLabelTemp.gameObject.SetActive(value: false); + NormalZeroCostLabelTemp.gameObject.SetActive(value: false); + } + + public void SetNumberLabelStyle(bool isFoil) + { + UIBase_CardManager uIBase_CardManager = UIManager.GetInstance().getUIBase_CardManager(); + uIBase_CardManager.SetNumberLabelStyle(NormalCostLabelTemp, isFoil); + uIBase_CardManager.SetNumberLabelStyle(NormalZeroCostLabelTemp, isFoil); + uIBase_CardManager.SetNumberLabelStyle(NormalSignLabelTemp, isFoil); + uIBase_CardManager.SetNumberLabelStyle(NormalSignedCostLabelTemp, isFoil); + } + + public void ShowChoiceBraveNameLabel() + { + NormalNameLabelTemp.gameObject.SetActive(value: false); + NormalChoiceBraveNameLabelTemp.gameObject.SetActive(value: true); + _isChoiceBrave = true; + } + + public void SetNameLabelStyle(bool isFoil, bool isChoiceBrave) + { + UIManager.GetInstance().getUIBase_CardManager().SetNameLabelStyle(isChoiceBrave ? NormalChoiceBraveNameLabelTemp : NormalNameLabelTemp, isFoil); + } + + public void SetRepositionNameLabel(string cardName, bool isChoiceBrave) + { + Global.SetRepositionNameLabel(isChoiceBrave ? NormalChoiceBraveNameLabelTemp : NormalNameLabelTemp, cardName, is2D: false); + } + + public void SetNormalLabelEnable(bool isEnable) + { + NormalNameLabelTemp.enabled = isEnable; + NormalChoiceBraveNameLabelTemp.enabled = isEnable; + } +} diff --git a/SVSim.BattleEngine/Engine/CausedDamageCardParameterModifier.cs b/SVSim.BattleEngine/Engine/CausedDamageCardParameterModifier.cs new file mode 100644 index 0000000..5afa38b --- /dev/null +++ b/SVSim.BattleEngine/Engine/CausedDamageCardParameterModifier.cs @@ -0,0 +1,9 @@ +public class CausedDamageCardParameterModifier : TurnAndIntValue +{ + public int Damage => base.Value; + + public CausedDamageCardParameterModifier(int damage, int turn, bool isSelfTurn) + : base(damage, turn, isSelfTurn) + { + } +} diff --git a/SVSim.BattleEngine/Engine/ClassCharaPrm.cs b/SVSim.BattleEngine/Engine/ClassCharaPrm.cs new file mode 100644 index 0000000..913f624 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassCharaPrm.cs @@ -0,0 +1,332 @@ +using System.Collections.Generic; +using Cute; +using LitJson; +using UnityEngine; +using Wizard; + +public class ClassCharaPrm +{ + public enum MotionType + { + idle = 1, + positive, + negative, + extra, + damage, + think, + greet, + shock, + positive_2, + negative_2, + extra_2, + extra_3, + negative_2_a, + damege_a, + extra_1_a, + extra_1_b, + extra_1_c, + extra_2_a, + extra_2_b, + extra_2_c, + z_extra_2, + z_damage, + z_greet, + z_idle, + z_negative, + z_negative_2, + z_negative_2_a, + z_positive, + z_positive_2, + z_shock, + z_think + } + + public enum FaceType + { + skin_01 = 1, + skin_02, + skin_03, + skin_04, + skin_05, + skin_06, + skin_07, + skin_08, + skin_09, + skin_10 + } + + public enum EmotionType + { + NULL, + GREET, + THANK, + APOLOGY, + PRAISE, + SURPRISE, + CONFUSE, + WORRY, + PROVOCATION, + EXTRA1, + EXTRA2, + EXTRA3, + BATTLESTART_DIFF, + BATTLESTART_SAME, + WIN, + LOSE, + SURRENDER_LOSE, + EVOLUTION_1, + EVOLUTION_2, + EVOLUTION_3, + DAMAGE_S_1, + DAMAGE_S_2, + DAMAGE_S_3, + DAMAGE_L_1, + DAMAGE_L_2, + IDLE_1, + IDLE_2, + IDLE_3, + SELECT, + STORY_LOSE, + LEADER_SELECT, + NEGOTIATION_1, + NEGOTIATION_2, + NEGOTIATION_3, + PLAYER_TURN_START_1 + } + + private static readonly Dictionary OUTLINE_COLOR = new Dictionary + { + { + CardBasePrm.ClanType.MIN, + eColorCodeId.CLASS_ELF_OUTLINE + }, + { + CardBasePrm.ClanType.ROYAL, + eColorCodeId.CLASS_ROYAL_OUTLINE + }, + { + CardBasePrm.ClanType.WITCH, + eColorCodeId.CLASS_WITCH_OUTLINE + }, + { + CardBasePrm.ClanType.DRAGON, + eColorCodeId.CLASS_DRAGON_OUTLINE + }, + { + CardBasePrm.ClanType.NECRO, + eColorCodeId.CLASS_NECROMANCER_OUTLINE + }, + { + CardBasePrm.ClanType.VAMPIRE, + eColorCodeId.CLASS_VANPIRE_OUTLINE + }, + { + CardBasePrm.ClanType.BISHOP, + eColorCodeId.CLASS_BISHOP_OUTLINE + }, + { + CardBasePrm.ClanType.NEMESIS, + eColorCodeId.CLASS_NEMESIS_OUTLINE + }, + { + CardBasePrm.ClanType.SHADOW, + eColorCodeId.CLASS_SHADOW_OUTLINE + } + }; + + private int _defaultCharaId; + + private int _currentCharaId; + + private int ClassCharaLv; + + private int ClassCharaExp; + + private int ClassCharaBattleCount; + + private int ClassCharaWin; + + public ClassCharacterMasterData DefaultCharaData => GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(_defaultCharaId); + + public ClassCharacterMasterData CurrentCharaData + { + get + { + ClassCharacterMasterData classCharacterMasterData = GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(_currentCharaId); + if (classCharacterMasterData == null) + { + classCharacterMasterData = DefaultCharaData; + } + return classCharacterMasterData; + } + } + + public bool IsRandomLeaderSkin { get; set; } + + public List LeaderSkinIdList { get; private set; } = new List(); + + public string EmoteNameGreet { get; set; } + + public string TextIdGreet { get; set; } + + public string VoiceIdGreet { get; set; } + + public string EmoteNameThank { get; set; } + + public string TextIdThank { get; set; } + + public string VoiceIdThank { get; set; } + + public string EmoteNameApology { get; set; } + + public string TextIdApology { get; set; } + + public string VoiceIdApology { get; set; } + + public string EmoteNamePraise { get; set; } + + public string TextIdPraise { get; set; } + + public string VoiceIdPraise { get; set; } + + public string EmoteNameSurprise { get; set; } + + public string TextIdSurprise { get; set; } + + public string VoiceIdSurprise { get; set; } + + public string EmoteNameConfuse { get; set; } + + public string TextIdConfuse { get; set; } + + public string VoiceIdConfuse { get; set; } + + public string EmoteNameWorry { get; set; } + + public string TextIdWorry { get; set; } + + public string VoiceIdWorry { get; set; } + + public string EmoteNameProvocation { get; set; } + + public string TextIdProvocation { get; set; } + + public string VoiceIdProvocation { get; set; } + + public void SetDefaultCharaId(int charaId) + { + _defaultCharaId = charaId; + } + + public void SetCurrentCharaId(int charaId) + { + _currentCharaId = charaId; + } + + public void SetClassCharaLv(int classlv) + { + ClassCharaLv = classlv; + } + + public void SetClassCharaExp(int classexp) + { + ClassCharaExp = classexp; + } + + public void SetClassCharaBattleCount(int classbattlecnt) + { + ClassCharaBattleCount = classbattlecnt; + } + + public void AddClassCharaBattleCount() + { + ClassCharaBattleCount++; + } + + public void SetClassCharaWin(int classwin) + { + ClassCharaWin = classwin; + } + + public void AddClassCharaWin() + { + ClassCharaWin++; + } + + public void SetLeaderRandomSkinIdList(JsonData skinIdList) + { + LeaderSkinIdList.Clear(); + for (int i = 0; i < skinIdList.Count; i++) + { + LeaderSkinIdList.Add(skinIdList[i].ToInt()); + } + } + + public int GetClassCharaLv() + { + return ClassCharaLv; + } + + public int GetClassCharaExp() + { + return ClassCharaExp; + } + + public int GetClassCharaBattleCount() + { + return ClassCharaBattleCount; + } + + public int GetClassCharaWin() + { + return ClassCharaWin; + } + + public static Texture GetClassIconTexture(int clan_id) + { + return Toolbox.ResourcesManager.LoadObject(Toolbox.ResourcesManager.GetAssetTypePath("class_card_" + clan_id.ToString("00"), ResourcesManager.AssetLoadPathType.CardFrameClassIcon, isfetch: true)) as Texture; + } + + public static bool IsEvolutionEmotionType(EmotionType type) + { + if ((uint)(type - 17) <= 2u) + { + return true; + } + return false; + } + + public static string GetIconSpriteName(CardBasePrm.ClanType inClassId) + { + int num = (int)inClassId; + return "icon_class_color_" + num.ToString("00"); + } + + public static string GetLargeIconSpriteName(CardBasePrm.ClanType inClassId) + { + int num = (int)inClassId; + return "icon_class_color_large_" + num.ToString("00"); + } + + public static string GetNameText(CardBasePrm.ClanType inClassId) + { + return Data.SystemText.Get("Common_" + ((int)(104 + inClassId)).ToString("0000")); + } + + public static void SetClassLabelSetting(UILabel inLabel, CardBasePrm.ClanType inClassId) + { + inLabel.effectStyle = LabelDefine.OUTLINE_STYLE_CLASS_NAME; + inLabel.effectDistance = LabelDefine.OUTLINE_DISTANCE_CLASS_NAME; + inLabel.effectColor = ColorCode.Get(OUTLINE_COLOR[inClassId]); + } + + public void SetParamWithUserClassJson(JsonData classJson) + { + IsRandomLeaderSkin = classJson["is_random_leader_skin"].ToBoolean(); + SetClassCharaLv(classJson["level"].ToInt()); + SetClassCharaExp(classJson["exp"].ToInt()); + SetCurrentCharaId(classJson["leader_skin_id"].ToInt()); + SetDefaultCharaId(classJson["default_leader_skin_id"].ToInt()); + SetLeaderRandomSkinIdList(classJson["leader_skin_id_list"]); + } +} diff --git a/SVSim.BattleEngine/Engine/ClassInformationUIController.cs b/SVSim.BattleEngine/Engine/ClassInformationUIController.cs new file mode 100644 index 0000000..b07d341 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ClassInformationUIController.cs @@ -0,0 +1,226 @@ +using System.Collections.Generic; +using UnityEngine; +using Wizard.Battle.UI; +using Wizard.Battle.View.Vfx; + +public class ClassInformationUIController +{ + private List _classInformationUIList; + + public ClassInformationUIController(List classInformationUIList) + { + _classInformationUIList = classInformationUIList; + } + + public void SetUpEvent(BattlePlayerBase player) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].SetUpEvent(player); + } + } + } + + public VfxBase LoadResources(Transform parent, bool isPlayer) + { + ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create(); + for (int i = 0; i < _classInformationUIList.Count; i++) + { + parallelVfxPlayer.Register(_classInformationUIList[i].LoadResources(parent, isPlayer)); + } + return parallelVfxPlayer; + } + + public void ShowInfomation(bool playEffect = true) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].ShowInfomation(playEffect); + } + } + } + + public void NewReplayUpdateInfomation(NetworkBattleReceiver.ClassInfoUiInfo classInfo) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].NewReplayUpdateInfomation(classInfo); + } + } + } + + public bool HaveSpecificClassInformationUi(CardBasePrm.ClanType clanType) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + switch (clanType) + { + case CardBasePrm.ClanType.MIN: + if (_classInformationUIList[i] is ElfInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.ROYAL: + if (_classInformationUIList[i] is RoyalInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.WITCH: + if (_classInformationUIList[i] is WitchInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.DRAGON: + if (_classInformationUIList[i] is DragonInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.NECRO: + if (_classInformationUIList[i] is NecromanceInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.VAMPIRE: + if (_classInformationUIList[i] is VampireInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.BISHOP: + if (_classInformationUIList[i] is BishopInfomationUI) + { + return true; + } + break; + case CardBasePrm.ClanType.NEMESIS: + if (_classInformationUIList[i] is NemesisInfomationUI) + { + return true; + } + break; + } + } + return false; + } + + public void HideInfomation() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].HideInfomation(); + } + } + } + + public void HideOtherInfomation() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].HideOtherInfomation(); + } + } + } + + public void HideAllInfomation() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].HideAllInfomation(); + } + } + } + + public void Recovery() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].Recovery(); + } + } + } + + public void SetIsSelect(bool isSelect) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].SetIsSelect(isSelect); + } + } + } + + public void SetInCardFocus(bool inCardFocus) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].SetInCardFocus(inCardFocus); + } + } + } + + public void SetTouchable(bool isTouchable) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + _classInformationUIList[i].SetTouchable(isTouchable); + } + } + } + + public void SetClassInformationUiPosition(bool isPlayer) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + (_classInformationUIList[i] as ClassInfomationUIBase).SetClassInformationUiPosition(isPlayer); + } + } + } + + public void UpdateStatusPanelOnBattle(bool isPlayer) + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + (_classInformationUIList[i] as ClassInfomationUIBase).UpdateStatusPanelOnBattle(isPlayer); + } + } + } + + public void UpdateInfomation() + { + for (int i = 0; i < _classInformationUIList.Count; i++) + { + if (_classInformationUIList[i] != null) + { + (_classInformationUIList[i] as ClassInfomationUIBase).UpdateInfomation(); + } + } + } +} diff --git a/SVSim.BattleEngine/Engine/ConditionSkillFilterCollection.cs b/SVSim.BattleEngine/Engine/ConditionSkillFilterCollection.cs new file mode 100644 index 0000000..b6e7e9c --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConditionSkillFilterCollection.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Wizard; + +public class ConditionSkillFilterCollection : SkillFilterCollectionBase +{ + private const int CAP_CONDITION = 8; + + public List ConditionCheckerFilterList { get; set; } + + public List VariableCompareFilter { get; set; } + + public List AnyConditionFilter { get; set; } + + public ConditionSkillFilterCollection() + { + ConditionCheckerFilterList = new List(8); + VariableCompareFilter = new List(); + AnyConditionFilter = new List(); + } + + public bool Filtering(BattlePlayerReadOnlyInfoPair playerInfoPair, BattleCardBase ownerCard, SkillConditionCheckerOption checkerOption, SkillOptionValue optionValue, bool isPrePlay, SkillBase skill, bool isSkipTargetAiSelect = false) + { + SkillCollectionBase.SetupOptionValue(optionValue, playerInfoPair, ownerCard, skill, checkerOption, isPrePlay); + bool flag = true; + bool flag2 = true; + bool flag3 = true; + bool flag4 = true; + if (VariableCompareFilter.Count() != 0) + { + bool flag5 = VariableCompareFilter.All((SkillVariableComareFilter s) => s.Filtering(optionValue)); + if (isSkipTargetAiSelect && VariableCompareFilter.FirstOrDefault().Lhs.Contains("hand_other_self") && ownerCard.SelfBattlePlayer.HandCardList.Count > 0) + { + flag5 = true; + } + bool flag6 = ConditionCheckerFilterList.Where((ISkillConditionChecker f) => f is SkillPreprocessBase).All((ISkillConditionChecker f) => f.IsRight(playerInfoPair, checkerOption)); + flag = flag5 && flag6; + } + Func> checkRightFunc; + if (isPrePlay) + { + checkRightFunc = (ISkillConditionChecker f) => f.IsRightPrePlay; + } + else + { + checkRightFunc = (ISkillConditionChecker f) => f.IsRight; + } + if (ConditionCheckerFilterList.Count() != 0) + { + flag2 = ConditionCheckerFilterList.All((ISkillConditionChecker c) => checkRightFunc(c)(playerInfoPair, checkerOption, arg3: false)); + } + if (AnyConditionFilter.Count > 0) + { + flag3 = AnyConditionFilter.All((SkillAnyConditionFilter c) => c.Filtering(playerInfoPair, ownerCard, checkerOption, optionValue, isPrePlay, skill, isSkipTargetAiSelect)); + } + if (base.BattlePlayerFilter != null) + { + flag4 = FilteringBase(playerInfoPair, checkerOption, optionValue, isSkipTargetAiSelect).Any(); + } + return flag && flag2 && flag4 && flag3; + } +} diff --git a/SVSim.BattleEngine/Engine/ConventionInfo.cs b/SVSim.BattleEngine/Engine/ConventionInfo.cs new file mode 100644 index 0000000..9d0c7b8 --- /dev/null +++ b/SVSim.BattleEngine/Engine/ConventionInfo.cs @@ -0,0 +1,41 @@ +using System; +using LitJson; +using Wizard; + +public class ConventionInfo +{ + public enum ConventionStatus + { + DeckEntry = 1, + GameStart + } + + public ConventionStatus Status { get; private set; } + + public string Id { get; private set; } + + public string Name { get; private set; } + + public string DeckEntryLimitText { get; private set; } + + public string StartTime { get; private set; } + + public BattleParameter BattleParameterInstance { get; set; } + + public bool IsSelectableTurn { get; private set; } + + public ConventionInfo(JsonData data) + { + Id = data["tournament_id"].ToString(); + Name = data["name"].ToString(); + BattleParameterInstance = BattleParameter.JsonToBattleParameter(data); + Status = (ConventionStatus)data["status"].ToInt(); + DeckEntryLimitText = ConvertTime.ToLocal(DateTime.Parse(data["tournament_start_date"].ToString())).ToString(); + IsSelectableTurn = data["is_selectable_turn"].ToInt() == 1; + } + + public ConventionInfo(string id) + { + Id = id; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetErrorState.cs b/SVSim.BattleEngine/Engine/Cute/AssetErrorState.cs new file mode 100644 index 0000000..8dd5fd6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetErrorState.cs @@ -0,0 +1,93 @@ +using System.Collections.Generic; + +namespace Cute; + +public class AssetErrorState +{ + public enum Code + { + NONE = 0, + SERVER_TIMEOUT = 1, + SERVER_UNDEFINED_ERROR = 2, + LOCAL_CAPACITY_OVER = 4, + CANCELED = 8, + FILE_READ_ERROR = 0x10, + SERVER_NOT_FOUND_ERROR = 0x20 + } + + public enum DialogDecision + { + UNDECIDED, + RETRY, + TERMINATE + } + + private Dictionary errors = new Dictionary(); + + public DialogDecision lastDialogDecision; + + public int errorFlag { get; private set; } + + public bool canceled { get; private set; } + + public bool HasError() + { + return errorFlag != 0; + } + + public bool HasError(Code code) + { + return ((uint)errorFlag & (uint)code) != 0; + } + + public void SetCanceled() + { + canceled = true; + } + + public int ErrorCount() + { + return errors.Count; + } + + public AssetErrorState() + { + Reset(); + } + + public void Report(string filename, Code errorCode) + { + if (errorCode != Code.NONE) + { + errorFlag |= (int)errorCode; + errors[filename] = errorCode; + } + } + + public Code Query(string filename) + { + if (!errors.TryGetValue(filename, out var value)) + { + return Code.NONE; + } + return value; + } + + public void Reset() + { + errorFlag = 0; + lastDialogDecision = DialogDecision.UNDECIDED; + errors.Clear(); + canceled = false; + } + + public List GatherErrorFilenames() + { + List list = new List(); + foreach (KeyValuePair error in errors) + { + list.Add(error.Key); + } + return list; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetHandle.cs b/SVSim.BattleEngine/Engine/Cute/AssetHandle.cs new file mode 100644 index 0000000..9b29998 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetHandle.cs @@ -0,0 +1,1231 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using UnityEngine; +using UnityEngine.Networking; +using Wizard; + +namespace Cute; + +public class AssetHandle +{ + public enum AssetType + { + Manifests, + AssetBundle, + Sound, + TemporarySound, + Movie, + Font + } + + private enum RequestType + { + None, + Download, + Load + } + + private AssetRequestContext requestContext; + + private static SHA1CryptoServiceProvider sha1; + + private static UTF8Encoding utf8; + + private string _cryptFilename; + + private const byte MultipleHandleIgnor = 2; + + private const byte SubManifest = 4; + + private byte _HandleAttribute; + + private const float BACKGROUND_DOWNLOAD_WAIT_BEFORE_RETRY_SECONDS = 5f; + + private Action phase; + + private RequestType requestType; + + public const int MANIFEST_INDEX_FILE_NAME = 0; + + public const int MANIFEST_INDEX_DATA_HASH = 1; + + private const int MANIFEST_INDEX_CATEGORY = 2; + + private const int MANIFEST_INDEX_FILE_SIZE = 3; + + private const int MANIFEST_INDEX_SMALL_HASH = 4; + + private const int MANIFEST_INDEX_SMALL_SIZE = 5; + + public string manifestDataHash { get; set; } + + public string SmallDataHash { get; private set; } + + public float manifestDataSize { get; protected set; } + + public float ManifestSmallDataSize { get; private set; } + + private string SelectedHash + { + get + { + if (!CustomPreference.IsNormalResource) + { + return SmallDataHash; + } + return manifestDataHash; + } + } + + public AssetType assetType { get; private set; } + + public string directory { get; private set; } + + public string filename { get; private set; } + + public string AssetName { get; private set; } + + public string dataHash => Toolbox.AssetManager.GetLocalDatahash(directory + filename); + + public int reference { get; set; } + + public bool isPreDownload { get; set; } + + public bool isTutorialDownload { get; set; } + + public bool unloadCommon { get; set; } + + public bool unloadTemporary { get; set; } + + public string cryptFilename + { + get + { + if (_cryptFilename == null) + { + string extension = Path.GetExtension(filename); + string name = ((!(extension != "")) ? "" : filename.Replace(extension, "")); + _cryptFilename = GenCryptoAssetFileName(name); + } + return _cryptFilename; + } + } + + public bool useStreamingAsset { get; set; } + + public bool isMultipleHandleIgnorAsset + { + get + { + if ((_HandleAttribute & 2) != 2) + { + return false; + } + return true; + } + set + { + if (value) + { + _HandleAttribute |= 2; + } + else + { + _HandleAttribute = (byte)(_HandleAttribute & -3); + } + } + } + + public bool isSubManifest + { + get + { + return (_HandleAttribute & 4) == 4; + } + set + { + if (value) + { + _HandleAttribute |= 4; + } + else + { + _HandleAttribute = (byte)(_HandleAttribute & -5); + } + } + } + + public string GetHash(bool isNormalSizeResource) + { + if (!isNormalSizeResource) + { + return SmallDataHash; + } + return manifestDataHash; + } + + public float GetSize(bool isNormalSizeResource) + { + if (!isNormalSizeResource) + { + return ManifestSmallDataSize; + } + return manifestDataSize; + } + + public bool isReDownloadAsset(bool isNormalSizeResource) + { + bool flag = false; + if (!flag && !dataHash.Equals(GetHash(isNormalSizeResource))) + { + flag = true; + } + return flag; + } + + public string BuildURL() + { + if (assetType == AssetType.Manifests) + { + if (!filename.Contains("manifest")) + { + return CustomPreference.GetAssetBundleURL() + filename; + } + if (filename.Equals("soundmanifest")) + { + return CustomPreference.GetSubManifestURL() + filename; + } + if (filename.StartsWith("moviemanifest")) + { + return CustomPreference.GetManifestURL() + filename; + } + if (filename.StartsWith("fontmanifest")) + { + return CustomPreference.GetManifestURL() + filename; + } + if (!isSubManifest) + { + return CustomPreference.GetManifestURL() + filename; + } + return CustomPreference.GetSubManifestURL() + filename; + } + if (IsSound()) + { + return CustomPreference.GetSoundResourceURL() + manifestDataHash; + } + if (assetType == AssetType.Movie) + { + return CustomPreference.GetMoiveResourceURL() + manifestDataHash; + } + return CustomPreference.GetAssetBundleURL() + SelectedHash; + } + + public string BuildLocalCachePath() + { + AssetManager assetManager = Toolbox.AssetManager; + bool isCryptAssetFileName = AssetManager.isCryptAssetFileName; + return assetType switch + { + AssetType.Manifests => assetManager.getAssetSavePath(assetType) + filename, + AssetType.Sound => assetManager.getAssetSavePath(assetType) + directory + filename, + AssetType.TemporarySound => assetManager.getAssetSavePath(assetType) + directory + filename, + AssetType.Movie => assetManager.getAssetSavePath(assetType) + directory + filename, + AssetType.Font => assetManager.getAssetSavePath(assetType) + directory + filename, + _ => assetManager.getAssetSavePath(assetType) + (isCryptAssetFileName ? cryptFilename : filename), + }; + } + + public AssetHandle(string _name, string expectedDataHash, string category, string size, string smallHash, string smallSize, bool isManifest = false, bool isUseStreaming = false) + { + directory = ""; + string[] array = _name.Split('/'); + for (int i = 0; i < array.Length - 1; i++) + { + directory = directory + array[i] + "/"; + } + filename = Path.GetFileName(_name); + AssetName = _name; + useStreamingAsset = isUseStreaming; + string extension = Path.GetExtension(filename); + if (extension.Equals(".mp4") || extension.Equals(".ogg") || extension.Equals(".usm")) + { + assetType = AssetType.Movie; + } + else if (extension.Equals(".unity3d") || extension.Equals(".lz4")) + { + assetType = AssetType.AssetBundle; + } + else if (extension.Equals(".acb") || extension.Equals(".awb")) + { + assetType = (_name.Contains("/t/") ? AssetType.TemporarySound : AssetType.Sound); + } + else if (extension.Equals(".otf") || extension.Equals(".ttf") || extension.Equals(".TTF")) + { + assetType = AssetType.Font; + } + else + { + if (!isManifest) + { + Debug.LogError("error invalid asset name : " + filename); + return; + } + assetType = AssetType.Manifests; + } + string.IsNullOrEmpty(expectedDataHash); + isPreDownload = category != null && Toolbox.AssetManager.predownloadCategories.Contains(category); + isTutorialDownload = category != null && Toolbox.AssetManager.tutorialdownloadCategories.Contains(category); + phase = PhaseIdle; + requestType = RequestType.None; + unloadCommon = false; + unloadTemporary = false; + manifestDataHash = expectedDataHash; + SmallDataHash = smallHash; + if (string.IsNullOrEmpty(size)) + { + manifestDataSize = 0f; + } + else + { + float result; + bool flag = float.TryParse(size, out result); + manifestDataSize = ((!flag) ? 0.1f : result); + } + if (string.IsNullOrEmpty(smallSize)) + { + ManifestSmallDataSize = 0f; + return; + } + float result2; + bool flag2 = float.TryParse(smallSize, out result2); + ManifestSmallDataSize = ((!flag2) ? 0.1f : result2); + } + + private void PhaseNone() + { + if (requestType != RequestType.None) + { + Debug.LogError("need initialize"); + } + } + + private void PhaseIdle() + { + if (requestType == RequestType.Download) + { + phase = PhaseDownloading; + Toolbox.AssetManager.AddDownloadJob(_Download(), _DownloadCancel); + } + if (requestType == RequestType.Load) + { + phase = PhaseLoading; + Toolbox.AssetManager.AddLoadJob(_PlatformDependentLoad(), _LoadCancel); + } + } + + private IEnumerator _PlatformDependentLoad() + { + return _Load(); + } + + private void PhaseDownloading() + { + } + + private void PhaseLoading() + { + } + + private void LoadManifestOfManifest(string text) + { + ArrayList arrayList = null; + arrayList = Utility.ConvertCSV(text, removeTitle: false); + for (int i = 0; i < arrayList.Count; i++) + { + string[] array = (string[])((ArrayList)arrayList[i]).ToArray(typeof(string)); + string text2 = array[0]; + string text3 = array[1]; + AssetHandle handle = new AssetHandle(text2, text3, array[2], null, text3, null, isManifest: true); + Toolbox.AssetManager.RegistHandle(text2, handle); + } + } + + public void LoadMergeManifestOfManifest(string main_manifest, string overwrite_manifest) + { + if (string.IsNullOrEmpty(main_manifest) || string.IsNullOrEmpty(overwrite_manifest)) + { + return; + } + ArrayList arrayList = null; + ArrayList arrayList2 = null; + arrayList = Utility.ConvertCSV(main_manifest, removeTitle: false); + arrayList2 = Utility.ConvertCSV(overwrite_manifest, removeTitle: false); + string text = Toolbox.AssetManager.MovieManifesHeadtName + "_" + CustomPreference.GetSoundMovieLanguage().ToLower(); + for (int i = 0; i < arrayList.Count; i++) + { + string[] array = (string[])((ArrayList)arrayList[i]).ToArray(typeof(string)); + ArrayList arrayList3 = null; + if (Toolbox.AssetManager.SoundManifesHeadtName.Contains(array[0])) + { + int num = 0; + for (num = 0; num < arrayList2.Count; num++) + { + arrayList3 = (ArrayList)arrayList2[num]; + if (arrayList3[0].ToString() == array[0].ToString()) + { + array = (string[])arrayList3.ToArray(typeof(string)); + break; + } + } + } + if (!array[0].Contains(Toolbox.AssetManager.MovieManifesHeadtName) || !(text != array[0])) + { + string text2 = array[0]; + AssetHandle handle = new AssetHandle(text2, array[1], array[2], array[3], array[1], array[3], isManifest: true); + Toolbox.AssetManager.RegistHandle(text2, handle); + } + } + } + + private void LoadManifest(string text) + { + List list = Utility.ConvertCSV_Array(text, removeTitle: false); + int count = list.Count; + for (int i = 0; i < count; i++) + { + string[] array = list[i]; + string text2 = array[0]; + if (!(text2 == "master_card_master.unity3d")) + { + bool isUseStreaming = false; + AssetHandle handle = new AssetHandle(text2, array[1], array[2], array[3], array[4], array[5], isManifest: false, isUseStreaming); + if (!Toolbox.AssetManager.RegistHandle(text2, handle)) + { + handle = null; + } + } + } + } + + private IEnumerator _Download() + { + if (requestContext != null) + { + Utility.LeanSemaphore semaphore = requestContext.semaphore; + if (semaphore != null) + { + AssetErrorState errorState = requestContext.errorState; + while (!semaphore.TryWait()) + { + yield return 0; + } + if (errorState != null && errorState.canceled) + { + errorState.Report(filename, AssetErrorState.Code.CANCELED); + Fin(); + yield break; + } + } + } + string url = BuildURL(); + int QuickRetryCount_Cache = 0; + int QuickRetryCount_Hash = 0; + while (true) + { + string errorMessage = ""; + string errorCode = ""; + if (!isReDownloadAsset(CustomPreference.IsNormalResource)) + { + break; + } + using (UnityWebRequest www = UnityWebRequest.Get(url)) + { + if (www == null) + { + break; + } + yield return www.SendWebRequest(); + bool isTimeOut = false; + float noProgressTime = Time.realtimeSinceStartup; + float oldProgress = 0f; + float timeOut = 30f; + while (!www.isDone) + { + float downloadProgress = www.downloadProgress; + if (downloadProgress <= oldProgress) + { + oldProgress = downloadProgress; + if (Time.realtimeSinceStartup - noProgressTime > timeOut) + { + isTimeOut = true; + break; + } + } + else + { + oldProgress = downloadProgress; + noProgressTime = Time.realtimeSinceStartup; + } + yield return null; + } + if (!string.IsNullOrEmpty(www.error) || isTimeOut) + { + if (isTimeOut) + { + Debug.LogError("download timeout error:" + url); + errorMessage = Data.SystemText.Get("System_0004"); + } + else + { + if (www.GetResponseHeaders() == null || !www.GetResponseHeaders().TryGetValue("STATUS", out var _)) + { + } + Debug.LogError($"download error: {www.error} ({url}) ({filename})"); + if (www.error.StartsWith("Failed to initialize cache for the AssetBundle") && QuickRetryCount_Cache < 5) + { + QuickRetryCount_Cache++; + continue; + } + if (www.error.StartsWith("Failed to decompress data for the AssetBundle") && QuickRetryCount_Cache < 5) + { + QuickRetryCount_Cache++; + continue; + } + yield return new WaitForSeconds(0.1f); + errorMessage = Data.SystemText.Get("System_0005"); + } + UIManager.GetInstance().isErrorProc = false; + if (!Toolbox.AssetManager.IsBackgroundDownload) + { + string titleLabel = Data.SystemText.Get("System_0003"); + string text = errorMessage; + QuickRetryCount_Cache = 0; + DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose(isSystem: true); + if (dialogBase != null) + { + dialogBase.SetFadeButtonEnabled(flag: false); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.SetTitleLabel(titleLabel); + dialogBase.SetText((text == "") ? Data.SystemText.Get("Battle_0300") : (text + Environment.NewLine + Data.SystemText.Get("Battle_0300"))); + dialogBase.SetReturnMsg(UIManager.GetInstance().gameObject, "CommonRetry", "CommonResetGame"); + dialogBase.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_GrayBtn); + dialogBase.SetButtonText(Data.SystemText.Get("Battle_0301"), Data.SystemText.Get("System_0006")); + dialogBase.ClickSe_Btn2 = Se.TYPE.SYS_BTN_CANCEL_TRANS; + dialogBase.SetPanelDepth(6000); + } + UIManager.GetInstance().isNoAvailMemory = true; + } + UIManager.GetInstance().isRetryProc = false; + if (Toolbox.AssetManager.IsBackgroundDownload) + { + yield return new WaitForSeconds(5f); + UIManager.GetInstance().CommonRetry(); + } + while (!UIManager.GetInstance().isErrorProc) + { + yield return 0; + } + UIManager.GetInstance().isNoAvailMemory = false; + if (UIManager.GetInstance().isRetryProc) + { + disposeWebRequest(www); + yield return 0; + continue; + } + disposeWebRequest(www); + yield break; + } + Toolbox.AssetManager.AddDownloadCompletedSize(GetSize(CustomPreference.IsNormalResource)); + string localCachePath = BuildLocalCachePath(); + if (assetType == AssetType.Manifests) + { + try + { + string text2 = www.downloadHandler.text; + if (filename == "manifest_assetmanifest") + { + if (!isSubManifest) + { + Toolbox.AssetManager.manifestOfManifests = text2; + } + else + { + Toolbox.AssetManager.manifestOfManifests_sub = text2; + } + goto IL_0684; + } + string text3 = Utility.CreateHash(text2).ToString(); + if (!string.IsNullOrEmpty(manifestDataHash) && !text3.Equals(manifestDataHash) && QuickRetryCount_Hash < 5) + { + QuickRetryCount_Hash++; + disposeWebRequest(www); + continue; + } + manifestDataHash = text3; + File.WriteAllText(localCachePath, text2, Encoding.UTF8); + Toolbox.AssetManager.SaveLocalDatahash(filename, text3); + goto IL_0684; + IL_0684: + Toolbox.AssetManager.AddManifestCount(); + goto IL_08bd; + } + catch (Exception ex) + { + errorMessage = ex.Message; + Debug.LogError(errorMessage); + errorCode = "ERROR_CAPACITY_OVER"; + goto IL_08bd; + } + } + Exception e = null; + byte[] bytes = www.downloadHandler.data; + string dataHash = null; + ParallelJob threadJob = ParallelJob.Dispatch(delegate + { + dataHash = Utility.CreateHash(bytes).ToString(); + }); + while (!threadJob.isDone) + { + yield return null; + } + if (!string.IsNullOrEmpty(SelectedHash) && !dataHash.Equals(SelectedHash) && QuickRetryCount_Hash < 5) + { + QuickRetryCount_Hash++; + disposeWebRequest(www); + continue; + } + if (CustomPreference.IsNormalResource) + { + manifestDataHash = dataHash; + } + else + { + SmallDataHash = dataHash; + } + int num = 0; + while (num < 5) + { + e = TryWriteAllBytes(localCachePath, bytes); + if (e == null) + { + break; + } + num++; + Debug.LogError("error System.IO.File.WriteAllBytes ct " + num); + } + while (!threadJob.isDone) + { + yield return null; + } + if (e == null) + { + Toolbox.AssetManager.SaveLocalDatahash(directory + filename, dataHash.ToString()); + } + else + { + manifestDataHash = (dataHash = null); + errorMessage = e.Message; + Debug.LogError(errorMessage); + errorCode = "ERROR_CAPACITY_OVER"; + } + goto IL_08bd; + IL_08bd: + QuickRetryCount_Hash = 0; + if (errorCode.Contains("ERROR")) + { + Debug.LogError("download error:" + errorMessage + " : " + filename); + if (requestContext != null && requestContext.errorState != null) + { + AssetErrorState errorState2 = requestContext.errorState; + errorState2.Report(filename, AssetErrorState.Code.LOCAL_CAPACITY_OVER); + errorState2.lastDialogDecision = AssetErrorState.DialogDecision.TERMINATE; + } + LocalLog.AccumulateTraceLog("Not enough available storage."); + UIManager.GetInstance().isErrorProc = false; + string titleLabel2 = Data.SystemText.Get("System_0020"); + DialogBase dialogBase2 = UIManager.GetInstance().CreateDialogClose(isSystem: true); + if (dialogBase2 != null) + { + dialogBase2.SetFadeButtonEnabled(flag: false); + dialogBase2.SetTitleLabel(titleLabel2); + dialogBase2.SetText(Data.SystemText.Get("System_0021")); + dialogBase2.SetReturnMsg(UIManager.GetInstance().gameObject, "CommonResetGame", "CommonResetGame", "CommonResetGame", "CommonResetGame"); + dialogBase2.SetButtonLayout(DialogBase.ButtonLayout.GrayBtn); + dialogBase2.SetButtonText(Data.SystemText.Get("System_0006")); + dialogBase2.ClickSe_Btn1 = Se.TYPE.SYS_BTN_CANCEL_TRANS; + dialogBase2.SetPanelDepth(6000); + } + UIManager.GetInstance().isNoAvailMemory = true; + UIManager.GetInstance().isRetryProc = false; + while (!UIManager.GetInstance().isErrorProc) + { + yield return 0; + } + UIManager.GetInstance().isNoAvailMemory = false; + UIManager.GetInstance().isNoAvailMemory = false; + if (!UIManager.GetInstance().isRetryProc) + { + SoftwareResetBase.SoftwareReset(null, null); + } + } + disposeWebRequest(www); + } + break; + } + Fin(); + } + + private Exception TryWriteAllBytes(string localCachePath, byte[] bytes) + { + try + { + File.WriteAllBytes(localCachePath, bytes); + return null; + } + catch (Exception ex) + { + Debug.LogError("error System.IO.File.WriteAllBytes " + localCachePath + "," + ex.GetType().FullName + "," + ex.Message); + return ex; + } + } + + private void _DownloadCancel() + { + phase = PhaseIdle; + requestType = RequestType.None; + Fin(); + } + + private void _LoadPostProcess() + { + switch (assetType) + { + case AssetType.AssetBundle: + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + break; + case AssetType.Sound: + case AssetType.TemporarySound: + if (filename.Substring(filename.Length - 4).Equals(".awb")) + { + Toolbox.AudioManager.RemoveCueSheet(filename); + } + else + { + Toolbox.AudioManager.AddCueSheet(filename, Path.GetFileName(filename), directory); + } + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + break; + case AssetType.Movie: + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + break; + case AssetType.Font: + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + break; + case AssetType.Manifests: + if (filename == "manifest_assetmanifest") + { + string manifestOfManifests = Toolbox.AssetManager.manifestOfManifests; + if (manifestOfManifests == null) + { + Debug.LogError("Failed to load manifest of manifests"); + } + else if (Toolbox.AssetManager.manifestOfManifests_sub != null) + { + LoadMergeManifestOfManifest(manifestOfManifests, Toolbox.AssetManager.manifestOfManifests_sub); + } + else + { + LoadManifestOfManifest(manifestOfManifests); + } + } + else + { + string text = File.ReadAllText(BuildLocalCachePath(), Encoding.UTF8); + LoadManifest(text); + } + break; + } + } + + private IEnumerator _Load() + { + if (requestContext != null) + { + Utility.LeanSemaphore semaphore = requestContext.semaphore; + if (semaphore != null) + { + AssetErrorState errorState = requestContext.errorState; + while (!semaphore.TryWait()) + { + yield return 0; + } + if (errorState != null && errorState.canceled) + { + errorState.Report(filename, AssetErrorState.Code.CANCELED); + Fin(); + yield break; + } + } + } + if (assetType == AssetType.AssetBundle && ++reference == 1) + { + string errorMessage = ""; + string localCachePath = BuildLocalCachePath(); + AssetBundle unityAssetBundle; + if (requestContext != null && requestContext.preferSynchronousLoad) + { + unityAssetBundle = AssetBundle.LoadFromFile(localCachePath); + } + else + { + AssetBundleCreateRequest acr = AssetBundle.LoadFromFileAsync(localCachePath); + yield return acr; + unityAssetBundle = acr.assetBundle; + } + if (unityAssetBundle == null) + { + string text = errorMessage + " : " + localCachePath; + Debug.LogError("_DownloadCancel load error:" + text); + if (requestContext != null && requestContext.errorState != null) + { + requestContext.errorState.Report(filename, AssetErrorState.Code.FILE_READ_ERROR); + } + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + Fin(); + if (UIManager.GetInstance() != null) + { + UIManager.GetInstance().CreateAssetFileErrorDialog(); + } + yield break; + } + Toolbox.AssetManager.SetAssetBundle(filename, unityAssetBundle, isMultipleHandleIgnorAsset); + string[] pathlist = unityAssetBundle.GetAllAssetNames(); + AssetBundleRequest request = unityAssetBundle.LoadAllAssetsAsync(); + yield return request; + UnityEngine.Object[] allAssets = request.allAssets; + bool flag = false; + for (int i = 0; i < Toolbox.AssetManager.NoUnloadAssetName.Count; i++) + { + if (filename.StartsWith(Toolbox.AssetManager.NoUnloadAssetName[i])) + { + flag = true; + } + } + if (!unloadCommon && !flag && unityAssetBundle != null) + { + unityAssetBundle.Unload(unloadAllLoadedObjects: false); + } + int num = pathlist.Length; + int num2 = allAssets.Length; + List list = new List(); + for (int j = 0; j < num2; j++) + { + for (int k = 0; k < num; k++) + { + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(pathlist[k]); + if (allAssets[j].name.ToLower().Equals(fileNameWithoutExtension.ToLower())) + { + string path = Path.ChangeExtension(pathlist[k], ".any"); + list.Add(new AssetObject(path, allAssets[j])); + break; + } + } + } + Toolbox.AssetManager.SetObjectList(filename, list); + } + _LoadPostProcess(); + Fin(); + } + + private IEnumerator _LoadStreamingAsset() + { + if (requestContext != null) + { + Utility.LeanSemaphore semaphore = requestContext.semaphore; + if (semaphore != null) + { + AssetErrorState errorState = requestContext.errorState; + while (!semaphore.TryWait()) + { + yield return 0; + } + if (errorState != null && errorState.canceled) + { + errorState.Report(filename, AssetErrorState.Code.CANCELED); + Fin(); + yield break; + } + } + } + if (assetType == AssetType.Manifests) + { + _LoadPostProcess(); + Fin(); + yield break; + } + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + if (assetType == AssetType.AssetBundle && ++reference == 1) + { + int RetryCount = 0; + while (true) + { + string errorMessage = ""; + string localCachePath = BuildLocalCachePath(); + using (UnityWebRequest www = UnityWebRequest.Get(localCachePath)) + { + if (www == null) + { + break; + } + yield return www.SendWebRequest(); + bool isTimeOut = false; + float noProgressTime = Time.realtimeSinceStartup; + float oldProgress = 0f; + float timeOut = 30f; + while (!www.isDone) + { + float downloadProgress = www.downloadProgress; + if (downloadProgress <= oldProgress) + { + if (Time.realtimeSinceStartup - noProgressTime > timeOut) + { + isTimeOut = true; + break; + } + } + else + { + oldProgress = downloadProgress; + noProgressTime = Time.realtimeSinceStartup; + } + yield return null; + } + if (!string.IsNullOrEmpty(www.error) || isTimeOut) + { + string text = errorMessage + " : " + localCachePath; + Debug.LogError("_LoadStreamingAsset 01 load error:" + text); + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + if (RetryCount > 5) + { + Fin(); + disposeWebRequest(www); + yield break; + } + RetryCount++; + disposeWebRequest(www); + continue; + } + AssetBundle content = DownloadHandlerAssetBundle.GetContent(www); + if (content == null) + { + string text2 = errorMessage + " : " + localCachePath; + Debug.LogError("_LoadStreamingAsset02 load error:" + text2); + Toolbox.AssetManager.AddLoadingCurrentCount(filename); + Fin(); + disposeWebRequest(www); + yield break; + } + Toolbox.AssetManager.SetAssetBundle(filename, content, isMultipleHandleIgnorAsset); + AssetBundle assetBundle = Toolbox.AssetManager.GetAssetBundleObject(filename).assetBundle; + string[] allAssetNames = assetBundle.GetAllAssetNames(); + UnityEngine.Object[] array = assetBundle.LoadAllAssets(); + int num = allAssetNames.Length; + int num2 = array.Length; + List list = new List(); + for (int i = 0; i < num2; i++) + { + for (int j = 0; j < num; j++) + { + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(allAssetNames[j]); + if (array[i].name.ToLower().Equals(fileNameWithoutExtension.ToLower())) + { + string path = Path.ChangeExtension(allAssetNames[j], ".any"); + list.Add(new AssetObject(path, array[i])); + break; + } + } + } + Toolbox.AssetManager.SetObjectList(filename, list); + disposeWebRequest(www); + } + break; + } + } + _LoadPostProcess(); + Fin(); + } + + private void _LoadCancel() + { + } + + private bool _Unload() + { + if (--reference == 0) + { + if (assetType == AssetType.AssetBundle) + { + if (!unloadCommon && !unloadTemporary) + { + Toolbox.AssetManager.UnloadAssetBundle(filename); + } + else + { + int num = reference + 1; + reference = num; + } + } + } + else if (reference < 0) + { + reference = 0; + } + if (IsSound()) + { + Toolbox.AudioManager.RemoveCueSheet(filename); + } + return true; + } + + private bool _UnloadTemporary() + { + if (--reference == 0) + { + if (assetType == AssetType.AssetBundle) + { + if (unloadTemporary) + { + Toolbox.AssetManager.UnloadAssetBundle(filename); + unloadTemporary = false; + } + else + { + int num = reference + 1; + reference = num; + } + } + } + else if (reference < 0) + { + reference = 0; + } + if (IsSound()) + { + Toolbox.AudioManager.RemoveCueSheet(filename); + } + return true; + } + + private bool _UnloadCommon() + { + if (--reference == 0) + { + if (assetType == AssetType.AssetBundle) + { + if (unloadCommon) + { + Toolbox.AssetManager.UnloadAssetBundle(filename); + } + else + { + int num = reference + 1; + reference = num; + } + } + } + else if (reference < 0) + { + reference = 0; + } + return true; + } + + private void Fin() + { + Action action = null; + if (requestContext != null) + { + requestContext.semaphore?.Post(); + action = requestContext.callback; + } + phase = PhaseIdle; + requestContext = null; + action?.Invoke(this); + } + + public bool Download(AssetRequestContext requestContext) + { + requestType = RequestType.Download; + this.requestContext = requestContext; + phase(); + return true; + } + + public bool Download(Action callback) + { + return Download(new AssetRequestContext(callback)); + } + + public void Unload() + { + if (_Unload()) + { + phase = PhaseIdle; + } + requestType = RequestType.None; + } + + public void UnloadCommon() + { + if (_UnloadCommon()) + { + phase = PhaseIdle; + } + requestType = RequestType.None; + } + + public void UnloadTemporary() + { + if (_UnloadTemporary()) + { + phase = PhaseIdle; + } + requestType = RequestType.None; + } + + public bool Load(AssetRequestContext requestContext) + { + requestType = RequestType.Load; + this.requestContext = requestContext; + phase(); + return true; + } + + public bool Load(Action callback) + { + return Load(new AssetRequestContext(callback)); + } + + public bool QuickLoadIfPossible() + { + if (phase != new Action(PhaseIdle)) + { + return false; + } + bool flag = false; + switch (assetType) + { + case AssetType.Manifests: + flag = false; + break; + case AssetType.AssetBundle: + flag = reference > 0 && Toolbox.AssetManager.HasObjectList(filename); + if (flag) + { + int num = reference + 1; + reference = num; + } + break; + case AssetType.Movie: + flag = !isReDownloadAsset(CustomPreference.IsNormalResource); + break; + case AssetType.Font: + flag = !isReDownloadAsset(CustomPreference.IsNormalResource); + break; + case AssetType.Sound: + case AssetType.TemporarySound: + flag = !isReDownloadAsset(CustomPreference.IsNormalResource); + break; + default: + flag = false; + break; + } + if (flag) + { + _LoadPostProcess(); + } + return flag; + } + + public bool IsAssetBundle() + { + if (assetType != AssetType.AssetBundle) + { + return false; + } + return true; + } + + public bool IsManifests() + { + if (assetType != AssetType.Manifests) + { + return false; + } + return true; + } + + public bool IsSound() + { + if (assetType != AssetType.Sound && assetType != AssetType.TemporarySound) + { + return false; + } + return true; + } + + public bool IsSoundVoice() + { + if (IsSound() && (filename.Substring(0, 1).Equals("v") || filename.Substring(0, 1).Equals("c"))) + { + return true; + } + return false; + } + + public bool IsMovie() + { + if (assetType != AssetType.Movie) + { + return false; + } + return true; + } + + public static string GenCryptoAssetFileName(string name) + { + if (sha1 == null) + { + sha1 = new SHA1CryptoServiceProvider(); + } + if (utf8 == null) + { + utf8 = new UTF8Encoding(); + } + byte[] bytes = utf8.GetBytes(name); + byte[] array = sha1.ComputeHash(bytes); + StringBuilder stringBuilder = new StringBuilder(); + int num = array.Length; + for (int i = 0; i < num; i++) + { + stringBuilder.Append(Convert.ToString(array[i], 16).PadLeft(2, '0')); + } + return stringBuilder.ToString(); + } + + private void disposeWebRequest(UnityWebRequest www) + { + www.Dispose(); + } + + public void CopyWithCatchException(AssetHandle src) + { + manifestDataHash = src.manifestDataHash; + SmallDataHash = src.SmallDataHash; + isPreDownload = src.isPreDownload; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/AssetRequestContext.cs b/SVSim.BattleEngine/Engine/Cute/AssetRequestContext.cs new file mode 100644 index 0000000..09fc9b5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/AssetRequestContext.cs @@ -0,0 +1,22 @@ +using System; + +namespace Cute; + +public class AssetRequestContext +{ + public Action callback { get; set; } + + public AssetErrorState errorState { get; set; } + + public Utility.LeanSemaphore semaphore { get; set; } + + public bool preferSynchronousLoad { get; set; } + + public AssetRequestContext(Action callback = null, Utility.LeanSemaphore semaphore = null, AssetErrorState errorState = null, bool preferSynchronousLoad = false) + { + this.callback = callback; + this.semaphore = semaphore; + this.errorState = errorState; + this.preferSynchronousLoad = preferSynchronousLoad; + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/Certification.cs b/SVSim.BattleEngine/Engine/Cute/Certification.cs new file mode 100644 index 0000000..4620b63 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/Certification.cs @@ -0,0 +1,375 @@ +using System; +using System.Collections; +using System.Text; +using Steamworks; +using UnityEngine; +using Wizard; +using Wizard.Title; + +namespace Cute; + +public class Certification : MonoBehaviour +{ + public static bool CheckUrlScheme; + + private const int ERROR_CODE_ACCOUNT_REMOVED = 5607; + + private static string udid; + + private static int viewer_id; + + private static int short_udid; + + private static string sessionId; + + private const float DELAY_TIME = 0.02f; + + protected Callback m_GetAuthSessionTicketResponse; + + public static string Udid + { + get + { + if (string.IsNullOrEmpty(udid)) + { + udid = Cryptographer.decode(Toolbox.SavedataManager.GetString("UDID")); + } + return udid; + } + } + + public static int ViewerId + { + get + { + if (viewer_id == 0) + { + viewer_id = Toolbox.SavedataManager.GetInt("VIEWER_ID"); + } + return viewer_id; + } + set + { + Toolbox.SavedataManager.SetInt("VIEWER_ID", value); + Toolbox.SavedataManager.Save(); + viewer_id = value; + } + } + + public static int ShortUdid + { + get + { + if (short_udid == 0) + { + short_udid = Toolbox.SavedataManager.GetInt("SHORT_UDID"); + } + return short_udid; + } + set + { + Toolbox.SavedataManager.SetInt("SHORT_UDID", value); + short_udid = value; + } + } + + public static string SessionId + { + get + { + if (string.IsNullOrEmpty(sessionId)) + { + sessionId = ViewerId + Udid; + } + return Cryptographer.MakeMd5(sessionId); + } + set + { + sessionId = value; + } + } + + public static string dmmViewerId { get; private set; } + + public static string dmmOnetimeToken { get; private set; } + + public static ulong SteamID { get; private set; } + + public static string SteamSessionTicket { get; private set; } + + public static bool IsExistsViewerId() + { + if (ViewerId != 0) + { + return true; + } + return false; + } + + public static string GetEncodedViewerId() + { + string s = CryptAES.encrypt(ViewerId.ToString()); + return Convert.ToBase64String(Encoding.UTF8.GetBytes(s)); + } + + public static string GetEncodedSessionId() + { + return Convert.ToBase64String(Encoding.UTF8.GetBytes(SessionId)); + } + + public static string GetEncodedShortUdid() + { + return Convert.ToBase64String(Encoding.UTF8.GetBytes(ShortUdid.ToString())); + } + + public static string GetKeyChainViewerId() + { + return ""; + } + + public static string GetIDFA() + { + return ""; + } + + public static void SetKeyChainViewerId(string viewerId) + { + } + + public static void DeleteKeyChainViewerId() + { + } + + public static void InitializeFileds() + { + sessionId = null; + udid = null; + viewer_id = 0; + short_udid = 0; + Toolbox.SavedataManager.SetInt("VIEWER_ID", 0); + Toolbox.SavedataManager.SetInt("SHORT_UDID", 0); + Toolbox.SavedataManager.SetString("UDID", ""); + } + + public IEnumerator Login() + { + if (ViewerId == 0) + { + GenerateUdid(); + SignUpTask signUpTask = new SignUpTask(); + signUpTask.SetParameter(); + yield return StartCoroutine(Toolbox.NetworkManager.Connect(signUpTask, delegate + { + StartCoroutine(GameStartCheckTaskExec()); + }, delegate + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + OutOfService.ShowServiceEndedDialogIfNeeded(); + }, delegate + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + })); + } + else + { + yield return StartCoroutine(GameStartCheckTaskExec()); + } + } + + public static bool IsiCloudAvailable() + { + return false; + } + + public static void SetiCloudUser() + { + } + + public static void EraseiCloudUser() + { + } + + public static string GetiCloudUser() + { + return ""; + } + + public void CheckiCloudUserData(Action callback) + { + GetiCloudUserDataTask.VerifiediCloudUserData.Reset(); + string text = GetiCloudUser(); + if (string.IsNullOrEmpty(text)) + { + callback(NetworkTask.ResultCode.Success); + return; + } + GenerateUdid(); + GetiCloudUserDataTask getiCloudUserDataTask = new GetiCloudUserDataTask(); + getiCloudUserDataTask.SetParameter(text); + StartCoroutine(Toolbox.NetworkManager.Connect(getiCloudUserDataTask, callback)); + } + + public void MigrateiCloudUserData(Action callback) + { + string parameter = GetiCloudUser(); + UpdateiCloudUserDataTask updateiCloudUserDataTask = new UpdateiCloudUserDataTask(); + updateiCloudUserDataTask.SetParameter(parameter); + StartCoroutine(Toolbox.NetworkManager.Connect(updateiCloudUserDataTask, callback)); + } + + public void FirstTimeSaveiCloudUserData() + { + if (IsiCloudAvailable() && string.IsNullOrEmpty(GetiCloudUser())) + { + SetiCloudUser(); + } + } + + public IEnumerator GameStartCheckTaskExec() + { + GameStartCheckTask gameStartCheckTask = new GameStartCheckTask(); + gameStartCheckTask.AddSkipCuteCheckResultCode(5607); + gameStartCheckTask.SetParameter(); + bool isRemoveAccount = false; + yield return StartCoroutine(Toolbox.NetworkManager.Connect(gameStartCheckTask, delegate + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = true; + } + URLScheme.ClearCampaignData(); + }, delegate + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + OutOfService.ShowServiceEndedDialogIfNeeded(); + }, delegate(int resultCode) + { + if (Toolbox.BootNetwork != null) + { + Toolbox.BootNetwork.IsDoneGameStartCheck = false; + } + URLScheme.ClearCampaignData(); + if (resultCode == 5607) + { + isRemoveAccount = true; + OnRemoveAccount(); + } + })); + if (isRemoveAccount) + { + while (true) + { + yield return null; + } + } + } + + private void OnRemoveAccount() + { + DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("MyPage_0097")); + dialogBase.SetTitleLabel(Data.SystemText.Get("ErrorHeader_0001")); + dialogBase.SetSize(DialogBase.Size.M); + dialogBase.OnClose = delegate + { + UserInfoRequest.DeleteUserData(); + }; + } + + public void GenerateUdid() + { + udid = Cryptographer.decode(Toolbox.SavedataManager.GetString("UDID")); + if (string.IsNullOrEmpty(udid)) + { + Toolbox.SavedataManager.SetString("UDID", Cryptographer.encode(Guid.NewGuid().ToString())); + Toolbox.SavedataManager.Save(); + } + } + + public static bool IsLogined() + { + return !string.IsNullOrEmpty(sessionId); + } + + private IEnumerator Start() + { + while (Toolbox.BootSystem == null) + { + yield return 0; + } + SessionId = ""; + setDmmPlatformData(); + setSTEAMPlatformData(); + URLSchemeStart(); + } + + private void OnApplicationFocus(bool focus) + { + if (focus) + { + URLSchemeStart(); + } + } + + private void URLSchemeStart() + { + if (CheckUrlScheme) + { + StartCoroutine(Delay(0.02f, delegate + { + })); + } + } + + private IEnumerator Delay(float waitTime, Action action) + { + yield return new WaitForSeconds(waitTime); + action(); + } + + private void setSTEAMPlatformData() + { + try + { + SteamID = SteamUser.GetSteamID().m_SteamID; + m_GetAuthSessionTicketResponse = Callback.Create(OnGetAuthSessionTicketResponse); + byte[] array = new byte[1024]; + SteamNetworkingIdentity pSteamNetworkingIdentity = default(SteamNetworkingIdentity); + SteamUser.GetAuthSessionTicket(array, array.Length, out var pcbTicket, ref pSteamNetworkingIdentity); + Array.Resize(ref array, (int)pcbTicket); + StringBuilder stringBuilder = new StringBuilder(); + for (int i = 0; i < pcbTicket; i++) + { + stringBuilder.AppendFormat("{0:x2}", array[i]); + } + SteamSessionTicket = stringBuilder.ToString(); + } + catch (Exception ex) + { + Debug.LogError("steam client が起動していない。steamの機能を使えません。"); + Debug.LogError(ex.Message); + Debug.LogError(ex.StackTrace); + } + } + + private void OnGetAuthSessionTicketResponse(GetAuthSessionTicketResponse_t pCallback) + { + } + + private void setDmmPlatformData() + { + } + + public void URLSchemeStartiOS(string message) + { + URLScheme.URLSchemeStartiOS(message); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/INetworkUI.cs b/SVSim.BattleEngine/Engine/Cute/INetworkUI.cs new file mode 100644 index 0000000..0c5c44d --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/INetworkUI.cs @@ -0,0 +1,54 @@ +namespace Cute; + +public interface INetworkUI +{ + string GetText(string code); + + void StartLoading(bool notEditor = false); + + void StopLoading(); + + void GoToMypage(); + + void SoftwareRest(); + + bool IsKeepLastRequest(); + + void SetKeepLastRequest(bool flag); + + void OpenRetryAndToTitleErrorPopUp(string title, string message, string code); + + void OpenGoToMypageErrorPopUp(string title, string message, string code); + + void OpenGoToTitleErrorPopUp(string title, string message, string code); + + void OpenGotoStoreErrorPopup(); + + void OpenRetryFailErrorPopup(); + + void OpenTimeOutErrorPopUp(); + + void OpenHttpStatusErrorPopUp(); + + void OpenResourceVersionUpPopUp(); + + void OpenSessionErrorPopUp(); + + bool isCloseDialogGroupError(int resultCode); + + void OpenCloseOnlyErrorPopUp(int resultCode); + + void OpenStrictServerErrorPopUp(int resultCode); + + void OpenAccountBlockErrorPopUp(int resultCode); + + void OpenAccountLimitedBlockErrorPopUp(int resultCode, string endTimeText); + + void OpenAllMaintenancePopUp(int resultCode, string endTime); + + void OpenEachFunctionMaintenancePopUp(int resultCode); + + void OpenOtherServerErrorPopUp(int resultCode); + + void OpenSocialServiceNoResponseErrorPopup(); +} diff --git a/SVSim.BattleEngine/Engine/Cute/NetworkManager.cs b/SVSim.BattleEngine/Engine/Cute/NetworkManager.cs new file mode 100644 index 0000000..a4283a0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/NetworkManager.cs @@ -0,0 +1,406 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using LitJson; +using MessagePack; +using UnityEngine; +using UnityEngine.Networking; +using Wizard; +using Wizard.Battle.Phase; +using Wizard.Bingo; +using Wizard.Scripts.Network.Data.TaskData.BuildDeckPurchase; +using Wizard.Scripts.Network.Data.TaskData.ItemPurchase; +using Wizard.Scripts.Network.Data.TaskData.SkinPurchase; +using Wizard.Scripts.Network.Data.TaskData.SpotCardExchange; + +namespace Cute; + +public class NetworkManager : MonoBehaviour, IManager +{ + public const float TimeOut = 30f; + + public const float TimeOutShort = 2f; + + protected NetworkTask lastRequestTask; + + public bool isConnect; + + public bool isTimeOut; + + public bool isError; + + private bool isEncrypt = true; + + private bool isUseJson; + + private bool _showLoadingIcon = true; + + private IEnumerator connectCoroutine; + + [SerializeField] + public Certification _certification; + + public INetworkUI NetworkUI { get; set; } + + private void Start() + { + Toolbox.NetworkManager = this; + } + + public bool IsReachability() + { + if (Application.internetReachability != NetworkReachability.NotReachable) + { + return true; + } + return false; + } + + public IEnumerator Connect(NetworkTask task, Action callbackOnSuccess = null, Action callbackOnFailure = null, Action callbackOnResultCodeError = null, bool encrypt = true, bool useJson = false, bool showLoadingIcon = true, bool showErrorDialog = true) + { + while (isConnect) + { + yield return 0; + } + isEncrypt = encrypt; + isUseJson = useJson; + _showLoadingIcon = showLoadingIcon; + if (true) + { + if (IsBattle()) + { + LocalLog.AccumulateLastTraceLog("taskStart " + task); + } + lastRequestTask = task; + lastRequestTask.Initialize(); + lastRequestTask.CallbackOnSuccess = callbackOnSuccess; + lastRequestTask.CallbackOnFailure = callbackOnFailure; + lastRequestTask.CallbackOnResultCodeError = callbackOnResultCodeError; + lastRequestTask.PrepareHeaders(); + lastRequestTask.PreparePostData(isEncrypt, isUseJson); + connectCoroutine = Connect(showErrorDialog); + yield return StartCoroutine(connectCoroutine); + } + } + + private IEnumerator Connect(bool showErrorDialog) + { + while (isConnect) + { + yield return 0; + } + isConnect = true; + isTimeOut = false; + isError = false; + if (NetworkUI != null && _showLoadingIcon) + { + NetworkUI.StartLoading(); + } + bool isLogTraceCheckUri = false; + if (lastRequestTask is DoMatchingBase || lastRequestTask is FinishTaskBase) + { + isLogTraceCheckUri = true; + } + string url = lastRequestTask.Url; + _ = lastRequestTask; + if (isLogTraceCheckUri) + { + LogTraceCheck("1"); + } + using UnityWebRequest unityWebRequest = GetUnityWebRequestInstance(url); + yield return unityWebRequest.SendWebRequest(); + if (isLogTraceCheckUri) + { + LogTraceCheck("2"); + } + float endTime = Time.realtimeSinceStartup + 30f; + if (lastRequestTask.GetType().Equals(typeof(CheckSpecialTitleTask))) + { + endTime = Time.realtimeSinceStartup + 2f; + } + while (!unityWebRequest.isDone && Time.realtimeSinceStartup < endTime) + { + yield return 0; + } + if (isLogTraceCheckUri) + { + LogTraceCheck("3"); + } + if (NetworkUI != null) + { + NetworkUI.StopLoading(); + } + if (!unityWebRequest.isDone) + { + isTimeOut = true; + LocalLog.AccumulateTraceLog("Connect is TimeOut"); + disposeUnityWebRequest(unityWebRequest); + if (!lastRequestTask.isSkipCommonTimeOutPopUp()) + { + if (lastRequestTask.GetType().Equals(typeof(PackOpenTask)) || lastRequestTask.GetType().Equals(typeof(BuildDeckBuyTask)) || lastRequestTask.GetType().Equals(typeof(SleeveBuyTask)) || lastRequestTask.GetType().Equals(typeof(SkinBuyMultiRewardTask)) || lastRequestTask.GetType().Equals(typeof(SkinBuyMultiTask)) || lastRequestTask.GetType().Equals(typeof(SkinBuySingleTask)) || lastRequestTask.GetType().Equals(typeof(ItemPurchaseBuyTask)) || lastRequestTask.GetType().Equals(typeof(SpotCardExchangeTask)) || lastRequestTask.GetType().Equals(typeof(CardCreateTask)) || lastRequestTask.GetType().Equals(typeof(CardDestructTask)) || lastRequestTask.GetType().Equals(typeof(StoryFinishTask)) || lastRequestTask.GetType().Equals(typeof(PracticeFinishTask)) || lastRequestTask.GetType().Equals(typeof(BingoDrawTask)) || lastRequestTask.GetType().Equals(typeof(MypageTreasureBoxCpOpenTask)) || lastRequestTask.GetType().Equals(typeof(MypageReceiveSpecialTreasureTask)) || lastRequestTask.GetType().Equals(typeof(FreeCardPackCampaignFinishTask))) + { + NetworkUI.OpenGoToTitleErrorPopUp(Data.SystemText.Get("ErrorHeader_0012"), Data.SystemText.Get("Error_0012"), ""); + } + else + { + NetworkUI.OpenTimeOutErrorPopUp(); + } + } + if (lastRequestTask.CallbackOnFailure != null) + { + if (lastRequestTask.GetType().Equals(typeof(PaymentPCFinishTask))) + { + NetworkUI.OpenGoToTitleErrorPopUp(Data.SystemText.Get("ErrorHeader_0012"), Data.SystemText.Get("Error_0012"), ""); + } + else + { + lastRequestTask.CallbackOnFailure(NetworkTask.ResultCode.TimeOut); + } + } + Toolbox.DeviceManager.ClearIpAddress(); + } + else if (!string.IsNullOrEmpty(unityWebRequest.error)) + { + LocalLog.AccumulateTraceLog("Connect is Error!" + unityWebRequest.error + " responseCode:" + unityWebRequest.responseCode); + isError = true; + if (showErrorDialog && !lastRequestTask.isSkipCommonHttpStatusErrorPopUp()) + { + if (lastRequestTask.GetType().Equals(typeof(PackOpenTask)) || lastRequestTask.GetType().Equals(typeof(PaymentPCFinishTask))) + { + NetworkUI.OpenGoToTitleErrorPopUp(Data.SystemText.Get("ErrorHeader_0012"), Data.SystemText.Get("Error_0012"), ""); + } + else + { + NetworkUI.OpenHttpStatusErrorPopUp(); + } + } + disposeUnityWebRequest(unityWebRequest); + if (lastRequestTask.CallbackOnFailure != null) + { + lastRequestTask.CallbackOnFailure(NetworkTask.ResultCode.Error); + } + Toolbox.DeviceManager.ClearIpAddress(); + } + else if (unityWebRequest.isDone) + { + if (lastRequestTask.CallbackOnUnityWebRequestDone != null) + { + lastRequestTask.CallbackOnUnityWebRequestDone(unityWebRequest); + } + else if (unityWebRequest.downloadHandler.text != null && unityWebRequest.downloadHandler.text != "") + { + try + { + byte[] bytes = ((!isEncrypt) ? Convert.FromBase64String(unityWebRequest.downloadHandler.text) : CryptAES.decrypt(unityWebRequest.downloadHandler.text)); + string json = (isUseJson ? MessagePackSerializer.ToJson(bytes) : MessagePackSerializer.ToJson(bytes)); + lastRequestTask.SetResponseData(JsonMapper.ToObject(json)); + } + catch (Exception ex) + { + string text = unityWebRequest.downloadHandler.text; + disposeUnityWebRequest(unityWebRequest); + if (!lastRequestTask.GetType().Equals(typeof(CheckSpecialTitleTask))) + { + if (!isEncrypt) + { + LocalLog.AccumulateTraceLog(ex.ToString()); + throw ex; + } + Debug.LogError(text); + Debug.LogError(ex.Message); + Debug.LogError(ex.StackTrace); + if (text.Contains("php")) + { + if (text.Length > 1800) + { + throw new Exception(text.Substring(1, 1800)); + } + throw new Exception(text); + } + HandleDeserializeException(ex); + } + } + try + { + if (lastRequestTask != null) + { + if (lastRequestTask.GetType().Equals(typeof(CheckSpecialTitleTask))) + { + ((CheckSpecialTitleTask)lastRequestTask).ParseTitleCheckData(); + } + else + { + NetworkTask.ERROR_CODE_STATUS num = lastRequestTask.CheckResultCodeToPopupCreate_ReturnStatus(); + if (num == NetworkTask.ERROR_CODE_STATUS.ERROR) + { + isError = true; + } + if (num == NetworkTask.ERROR_CODE_STATUS.ERROR_TO_MAINTENANCE_POPUP && lastRequestTask.CallbackOnFailure != null) + { + lastRequestTask.CallbackOnFailure(NetworkTask.ResultCode.Maintenance); + } + if (num == NetworkTask.ERROR_CODE_STATUS.ERROR && lastRequestTask.CallbackOnFailure != null) + { + lastRequestTask.CallbackOnFailure(NetworkTask.ResultCode.Title); + } + } + } + } + catch (Exception ex2) + { + disposeUnityWebRequest(unityWebRequest); + if (!lastRequestTask.GetType().Equals(typeof(CheckSpecialTitleTask))) + { + LocalLog.AccumulateTraceLog("NetworkManager Connect Error 2:" + ex2); + throw ex2; + } + } + } + else + { + LocalLog.AccumulateTraceLog("NetworkManager Connect Error 3"); + } + } + ClearLastRequestTask(); + disposeUnityWebRequest(unityWebRequest); + isConnect = false; + } + + private void LogTraceCheck(string logMsg) + { + LocalLog.AccumulateLastTraceLog("NetworkTrace msg " + logMsg); + LocalLog.SubmitAccumulateLastTraceLog(); + } + + private bool IsBattle() + { + if (ToolboxGame.RealTimeNetworkAgent != null && BattleManagerBase.GetIns() != null && BattleManagerBase.GetIns().GetCurrentPhase() is MainPhase) + { + return true; + } + return false; + } + + private UnityWebRequest GetUnityWebRequestInstance(string serverUrl) + { + try + { + UnityWebRequest unityWebRequest = new UnityWebRequest(serverUrl, "POST"); + unityWebRequest.uploadHandler = new UploadHandlerRaw(lastRequestTask.Body); + unityWebRequest.downloadHandler = new DownloadHandlerBuffer(); + foreach (KeyValuePair item in lastRequestTask.Header) + { + unityWebRequest.SetRequestHeader(item.Key, item.Value); + } + return unityWebRequest; + } + catch (Exception ex) + { + string text = ""; + foreach (KeyValuePair item2 in lastRequestTask.Header) + { + text += string.Format("header==={0} : {1}" + Environment.NewLine, item2.Key, item2.Value); + } + Debug.LogError(ex?.ToString() + ":" + text); + return null; + } + } + + private void HandleDeserializeException(Exception e) + { + SoftwareReset.exec(); + throw new Exception("復号化に失敗しました。" + e); + } + + public void ClearLastRequestTask() + { + if ((NetworkUI != null && !NetworkUI.IsKeepLastRequest()) || lastRequestTask.isServerResultCodeOK()) + { + if (IsBattle()) + { + LocalLog.AccumulateLastTraceLog("ClearLastRequestTask " + lastRequestTask); + } + lastRequestTask = null; + } + } + + public IEnumerator Retry() + { + if (lastRequestTask == null) + { + NetworkUI.OpenRetryFailErrorPopup(); + yield break; + } + if (connectCoroutine != null) + { + StopConnectCoroutine(); + } + connectCoroutine = Connect(showErrorDialog: true); + yield return StartCoroutine(connectCoroutine); + } + + public void Certification() + { + _certification.GenerateUdid(); + } + + public void ReturnToTitle() + { + NetworkUI.SetKeepLastRequest(flag: false); + ClearLastRequestTask(); + NetworkUI.SoftwareRest(); + } + + public void GoToMypage() + { + NetworkUI.SetKeepLastRequest(flag: false); + ClearLastRequestTask(); + NetworkUI.GoToMypage(); + } + + public void GoToStore() + { + lastRequestTask.GotoStore(); + NetworkUI.SetKeepLastRequest(flag: false); + ClearLastRequestTask(); + NetworkUI.SoftwareRest(); + } + + public void QuitApplication() + { + NetworkUI.SetKeepLastRequest(flag: false); + ClearLastRequestTask(); + if (Toolbox.mute != null) + { + Toolbox.mute.Close(); + Toolbox.mute = null; + } + Application.Quit(); + } + + private void disposeUnityWebRequest(UnityWebRequest unityWebRequest) + { + unityWebRequest.Dispose(); + } + + public void StopConnectCoroutine() + { + if (connectCoroutine != null) + { + if (RealTimeNetworkAgent.IsNormalNetworkBattle()) + { + LocalLog.AccumulateLastTraceLog("NetworkManager_StopConnectCoroutine " + StackTraceUtility.ExtractStackTrace()); + } + StopCoroutine(connectCoroutine); + isConnect = false; + } + } + + private void OnDestroy() + { + if (RealTimeNetworkAgent.IsNormalNetworkBattle()) + { + LocalLog.AccumulateLastTraceLog("NetworkManager_Destroy"); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/NetworkTask.cs b/SVSim.BattleEngine/Engine/Cute/NetworkTask.cs new file mode 100644 index 0000000..52c6d72 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/NetworkTask.cs @@ -0,0 +1,570 @@ +using System; +using System.Collections.Generic; +using System.Text; +using LitJson; +using MessagePack; +using UnityEngine.Networking; +using Wizard; +using Wizard.Battle.Recovery; + +namespace Cute; + +public class NetworkTask +{ + public enum ResultCode + { + Success, + Error, + TimeOut, + Title, + Maintenance + } + + public enum ERROR_CODE_STATUS + { + NONE, + ERROR, + ERROR_TO_MAINTENANCE_POPUP + } + + protected Dictionary header = new Dictionary(); + + protected byte[] body; + + protected int resultCode; + + private SkipCuteCheckResultCodes skipCuteCheckResultCodes; + + private bool skipCommonTimeOutPopUp; + + private bool skipCommonHttpStatusErrorPopUp; + + public virtual string Url { get; set; } + + public Action CallbackOnSuccess { get; set; } + + public Action CallbackOnFailure { get; set; } + + public Action CallbackOnResultCodeError { get; set; } + + public Action CallbackOnUnityWebRequestDone { get; set; } + + public Dictionary Header => header; + + public byte[] Body => body; + + public PostParams Params { get; set; } + + public JsonData ResponseData { get; private set; } + + public bool IsResourceVersionUpError { get; private set; } + + public bool IsResultSuccess => resultCode == 1; + + public NetworkTask() + { + skipCuteCheckResultCodes = new SkipCuteCheckResultCodes(); + Params = new PostParams(); + } + + public void Initialize() + { + ResponseData = null; + resultCode = 0; + } + + public Dictionary PrepareHeaders() + { + AddHeaderUdid(); + AddHeaderShortUdid(); + AddHeaderSessionId(); + AddHeaderParam(); + AddHeaderDevice(); + AddHeaderAppVersion(); + AddHeaderResVersion(); + AddHeaderDeviceId(); + AddHeaderDeviceName(); + AddHeaderGraphicsDeviceName(); + AddHeaderIpAddress(); + AddHeaderPlatformOsVersion(); + AddHeaderKeyChain(); + AddHeaderIDFA(); + AddHeaderLocale(); + AddHeaderLanguage(); + AddHeaderCountryCode(); + AddHeaderPlatform(); + AddHeaderIsWSS(); + AddHeaderIsIpv6(); + AddHeaderDevAccessSecretKey(); + AddCardMasterHash(); + return header; + } + + public byte[] PreparePostData(bool encrypt = true, bool isUseJson = false) + { + return CreateBody(encrypt, isUseJson); + } + + public void SetResponseData(JsonData data) + { + ResponseData = data; + resultCode = getDataHeader()["result_code"].ToInt(); + } + + public int GetResultCode() + { + return resultCode; + } + + public ERROR_CODE_STATUS CheckResultCodeToPopupCreate_ReturnStatus(int rc = 0) + { + INetworkUI networkUI = Toolbox.NetworkManager.NetworkUI; + if (isAppVersionUP()) + { + RecoveryRecordManagerBase.DeleteRecoveryFile(); + networkUI.OpenGotoStoreErrorPopup(); + return ERROR_CODE_STATUS.ERROR; + } + if (isResourceVersionUp()) + { + IsResourceVersionUpError = true; + setResourceVersion(); + if (!Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.GameStartCheck])) + { + RecoveryRecordManagerBase.DeleteRecoveryFile(); + networkUI.OpenResourceVersionUpPopUp(); + Parse(); + return ERROR_CODE_STATUS.ERROR; + } + } + if (isSessionError()) + { + networkUI.OpenSessionErrorPopUp(); + return ERROR_CODE_STATUS.ERROR; + } + setSession(); + if (isUnknownServerError() || isServerProcessedError() || isServerDataBaseError()) + { + networkUI.OpenStrictServerErrorPopUp(resultCode); + return ERROR_CODE_STATUS.ERROR; + } + if (isAccountBlockError()) + { + networkUI.OpenAccountBlockErrorPopUp(resultCode); + return ERROR_CODE_STATUS.ERROR; + } + if (isNeteaseAccountBlockError()) + { + NtDataTranslateManager.GetInstance().ShowRejectLogin(); + return ERROR_CODE_STATUS.ERROR; + } + if (isAccountLimitedBlockError()) + { + string accountLimitedBlockEndTime = getAccountLimitedBlockEndTime(); + networkUI.OpenAccountLimitedBlockErrorPopUp(resultCode, accountLimitedBlockEndTime); + return ERROR_CODE_STATUS.ERROR; + } + if (IsAllMaintenanceError()) + { + string maintenanceEndTime = getMaintenanceEndTime(); + networkUI.OpenAllMaintenancePopUp(resultCode, maintenanceEndTime); + return ERROR_CODE_STATUS.ERROR_TO_MAINTENANCE_POPUP; + } + if (IsEachFunctionMaintenanceError()) + { + networkUI.OpenEachFunctionMaintenancePopUp(resultCode); + return ERROR_CODE_STATUS.ERROR_TO_MAINTENANCE_POPUP; + } + if (IsCardMaintenanceError()) + { + if (CallbackOnResultCodeError != null) + { + CallbackOnResultCodeError(resultCode); + } + return ERROR_CODE_STATUS.ERROR_TO_MAINTENANCE_POPUP; + } + if (!skipCuteCheckResultCodes.isSkipAll() && !skipCuteCheckResultCodes.Contains(resultCode)) + { + cuteCheckResultCode(); + } + Parse(); + if (isServerResultCodeOK()) + { + if (CallbackOnSuccess != null) + { + CallbackOnSuccess(ResultCode.Success); + } + return ERROR_CODE_STATUS.NONE; + } + if (CallbackOnResultCodeError != null) + { + CallbackOnResultCodeError(resultCode); + return ERROR_CODE_STATUS.ERROR; + } + return ERROR_CODE_STATUS.NONE; + } + + private void cuteCheckResultCode() + { + INetworkUI networkUI = Toolbox.NetworkManager.NetworkUI; + if (networkUI.isCloseDialogGroupError(resultCode)) + { + networkUI.OpenCloseOnlyErrorPopUp(resultCode); + } + else if (!isServerResultCodeOK()) + { + networkUI.OpenOtherServerErrorPopUp(resultCode); + } + } + + protected virtual string getAccountLimitedBlockEndTime() + { + return ResponseData["data"]["account_block_end_time"].ToString(); + } + + protected virtual string getMaintenanceEndTime() + { + if (ResponseData["data"].Count > 0 && ResponseData["data"].Keys.Contains("maintenance_end_time") && ResponseData["data"]["maintenance_end_time"].ToString().Length > 0) + { + return ResponseData["data"]["maintenance_end_time"].ToString(); + } + return ""; + } + + protected virtual string getUdid() + { + return Certification.Udid; + } + + protected virtual byte[] CreateBody(bool encrypt = true, bool isUseJson = false) + { + if (isUseJson) + { + body = _createBodyJson(Params, encrypt); + } + else + { + body = _createBodyMsgpack(Params, encrypt); + } + return body; + } + + protected byte[] _createBodyJson(PostParams Params, bool encrypt = true) + { + byte[] bytes = Encoding.ASCII.GetBytes(JsonMapper.ToJson(Params)); + if (!encrypt) + { + return bytes; + } + return CryptAES.encrypt(bytes); + } + + protected byte[] _createBodyMsgpack(PostParams Params, bool encrypt = true) + { + byte[] array = MessagePackSerializer.FromJson(JsonMapper.ToJson(Params)); + if (!encrypt) + { + return array; + } + return CryptAES.encrypt(array); + } + + protected virtual int Parse() + { + return resultCode; + } + + private void AddHeaderUdid() + { + if (Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.SignUp]) || Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.CheckSpecialTitle]) || Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.CheckiCloudUser]) || Url.Contains(CuteNetworkDefine.ApiUrlList[CuteNetworkDefine.ApiType.MigrateiCloudUser])) + { + string value = Cryptographer.encode(getUdid()); + header["UDID"] = value; + } + } + + private void AddHeaderShortUdid() + { + string value = Cryptographer.encode(Certification.ShortUdid.ToString()); + header["SHORT_UDID"] = value; + } + + private void AddHeaderSessionId() + { + header["SID"] = Certification.SessionId; + } + + private void AddHeaderParam() + { + string udid = getUdid(); + string viewer_id = CryptAES.encrypt(Certification.ViewerId.ToString()); + Params.viewer_id = viewer_id; + Params.steam_id = Certification.SteamID; + Params.steam_session_ticket = Certification.SteamSessionTicket; + string text = Convert.ToBase64String(MessagePackSerializer.FromJson(JsonMapper.ToJson(Params))); + Uri uri = new Uri(Url.Trim()); + string text2 = udid + uri.AbsolutePath + text; + if (Certification.ViewerId != 0) + { + text2 += Certification.ViewerId; + } + string value = Cryptographer.ComputeHash(text2); + header["PARAM"] = value; + } + + private void AddHeaderDevice() + { + header["DEVICE"] = Toolbox.DeviceManager.GetDeviceType().ToString(); + } + + private void AddHeaderAppVersion() + { + header["APP_VER"] = Toolbox.DeviceManager.GetAppVersionName(); + } + + private void AddHeaderResVersion() + { + header["RES_VER"] = Toolbox.SavedataManager.GetResourceVersion(); + } + + private void AddHeaderDeviceId() + { + header["DEVICE_ID"] = Toolbox.DeviceManager.GetDeviceUniqueIdentifier(); + } + + private void AddHeaderDeviceName() + { + header["DEVICE_NAME"] = Uri.EscapeDataString(Toolbox.DeviceManager.GetDeviceName()); + } + + private void AddHeaderGraphicsDeviceName() + { + header["GRAPHICS_DEVICE_NAME"] = Uri.EscapeDataString(Toolbox.DeviceManager.GetGraphicsDeviceName(textureCheck: true)); + } + + private void AddHeaderIpAddress() + { + header["IP_ADDRESS"] = Toolbox.DeviceManager.GetIpAddress(); + } + + private void AddHeaderPlatformOsVersion() + { + header["PLATFORM_OS_VERSION"] = Uri.EscapeDataString(Toolbox.DeviceManager.GetOsVersion()); + } + + private void AddHeaderPlatform() + { + header["PLATFORM"] = CustomPreference.GetPlatform().ToString(); + } + + private void AddHeaderIsWSS() + { + header["WSS"] = (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_SELECT_WSS) ? "1" : "0"); + } + + private void AddHeaderIsIpv6() + { + header["IPV6_CONNECTION"] = (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_SELECT_IPV6) ? "1" : "0"); + } + + private void AddCardMasterHash() + { + string cardMasterHash = CardMasterLocalFileUtility.GetCardMasterHash(); + if (!string.IsNullOrEmpty(cardMasterHash)) + { + header["CARD_MASTER_HASH"] = cardMasterHash; + } + } + + private void AddHeaderDevAccessSecretKey() + { + } + + private void AddHeaderCarrier() + { + header["CARRIER"] = Toolbox.DeviceManager.GetCarrier(); + } + + private void AddHeaderKeyChain() + { + header["KEYCHAIN"] = Certification.GetKeyChainViewerId(); + } + + private void AddHeaderIDFA() + { + header["IDFA"] = Certification.GetIDFA(); + } + + private void AddHeaderLocale() + { + header["LOCALE"] = Toolbox.DeviceManager.GetLocale(); + } + + private void AddHeaderLanguage() + { + string textLanguage = CustomPreference.GetTextLanguage(); + header["LANGUAGE"] = textLanguage; + } + + private void AddHeaderCountryCode() + { + header["REGION_CODE"] = PlayerStaticData.UserRegionCode; + } + + private bool isSessionError() + { + return resultCode == 201; + } + + private bool isUnknownServerError() + { + return resultCode == 102; + } + + private bool isAccountBlockError() + { + return resultCode == 203; + } + + private bool isNeteaseAccountBlockError() + { + return resultCode == 330; + } + + private bool isAccountLimitedBlockError() + { + return resultCode == 217; + } + + private bool isServerProcessedError() + { + return resultCode == 213; + } + + private bool isServerDataBaseError() + { + return resultCode == 100; + } + + public bool isServerResultCodeOK() + { + if (resultCode != 1 && resultCode != 3502) + { + return resultCode == 1768; + } + return true; + } + + private bool IsAllMaintenanceError() + { + return resultCode == 101; + } + + private bool IsEachFunctionMaintenanceError() + { + if (resultCode >= 2000) + { + return resultCode <= 2999; + } + return false; + } + + private bool IsCardMaintenanceError() + { + if (resultCode != 1710) + { + return resultCode == 5013; + } + return true; + } + + private void setSession() + { + JsonData dataHeader = getDataHeader(); + if (dataHeader.Keys.Contains("sid") && dataHeader["sid"] != null && !string.IsNullOrEmpty(dataHeader["sid"].ToString())) + { + Certification.SessionId = dataHeader["sid"].ToString(); + } + } + + private bool isAppVersionUP() + { + if (resultCode == 204) + { + return true; + } + return false; + } + + public void GotoStore() + { + BrowserURL.Open(getDataHeader()["store_url"].ToString()); + } + + private bool isResourceVersionUp() + { + if (getDataHeader().Keys.Contains("required_res_ver")) + { + return true; + } + return false; + } + + private JsonData getDataHeader() + { + return ResponseData["data_headers"]; + } + + private void setResourceVersion() + { + string resourceVersion = getDataHeader()["required_res_ver"].ToString(); + Toolbox.SavedataManager.SetResourceVersion(resourceVersion); + } + + public void AddSkipCuteCheckResultCode(int resultCode) + { + skipCuteCheckResultCodes.Add(resultCode); + } + + public void AddSkipCuteCheckResultCode(List resultCodes) + { + skipCuteCheckResultCodes.Add(resultCodes); + } + + public void SkipAllCuteResultCodeCheckErrorPopup() + { + skipCuteCheckResultCodes.setSkipAll(pSkipAll: true); + } + + public void SkipCuteTimeOutPopup() + { + skipCommonTimeOutPopUp = true; + } + + public bool isSkipCommonTimeOutPopUp() + { + return skipCommonTimeOutPopUp; + } + + public void SkipCuteHttpStatusErrorPopup() + { + skipCommonHttpStatusErrorPopUp = true; + } + + public bool isSkipCommonHttpStatusErrorPopUp() + { + return skipCommonHttpStatusErrorPopUp; + } + + public void ClearSkipCuteCheckResultCode() + { + skipCuteCheckResultCodes.Clear(); + } + + public void SkipAllNetworkChecks() + { + SkipAllCuteResultCodeCheckErrorPopup(); + SkipCuteTimeOutPopup(); + SkipCuteHttpStatusErrorPopup(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/PostParams.cs b/SVSim.BattleEngine/Engine/Cute/PostParams.cs new file mode 100644 index 0000000..a0a0da5 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/PostParams.cs @@ -0,0 +1,10 @@ +namespace Cute; + +public class PostParams +{ + public string viewer_id = ""; + + public ulong steam_id; + + public string steam_session_ticket; +} diff --git a/SVSim.BattleEngine/Engine/Cute/ResourcesManager.cs b/SVSim.BattleEngine/Engine/Cute/ResourcesManager.cs new file mode 100644 index 0000000..79c04a0 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/ResourcesManager.cs @@ -0,0 +1,1707 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Wizard; + +namespace Cute; + +public class ResourcesManager : MonoBehaviour, IManager +{ + public enum AssetLoadPathType + { + Master, + MasterEtc, + CharaMaster, + Tutorial, + StoryTutorial, + StoryParam, + StoryParamDiff, + StoryText, + StoryMovieSubtitles, + StoryCharacter, + StoryBackground, + StoryEndingStill, + StorySubChapterBtnTexture, + StoryChapterHeader, + StorySelectWorldPanel, + HandCard, + HandCardSpecular, + CardFrame, + CardFrameClassIcon, + CardDeco, + SleeveTexture, + SleeveTextureMask, + SleeveTextureBasePath, + SleeveTextureAORefSpec, + SleeveTextureNormalMap, + SleeveMaterial, + SleeveMesh, + SleeveSpecular, + CardFrameMesh, + CardFrameMaterial, + CardFrameMaterialPlus, + CardFrameTextureCommon, + FoilTextures, + UnitCardMaterial, + UnitCardTextures, + SpellCardMaterial, + SpellCardTextures, + Effect2D, + Effect2DMaterials, + Effect3D, + Effect3DAnim, + Effect3DMat, + Emblem_S, + Emblem_M, + Degree_S, + Degree_M, + DegreeMaterial_S, + DegreeMaterial_M, + DegreeMask, + RankIcon_S, + RankIcon_L, + Country_S, + Country_M, + Font, + DeckListTexture, + DeckEditBGTexture, + ClassCharaSpine, + ClassCharaBase, + ClassCharaBaseWin, + ClassCharaBaseLose, + ClassCharaEvolve, + ClassCharaEvolveWin, + ClassCharaEvolveLose, + ClassCharaHeader, + ClassCharaSkinThumbnail, + ClassCharaWideThumbnail, + ClassCharaButton, + ClassCharaIconLevel, + ClassCharaEncampment, + ClassCharaMesh, + ClassCharaMaterial, + ClassCharaMaterialMain, + ClassCharaTexture, + ClassCharaFrameTexture, + ClassCharaProfile, + ClassCharaStory, + ClassChara3D, + AreaSelectTexture, + GachaTexture, + ShopCardPack, + ShopBuildDeckThumbnail, + ShopBuildDeck, + ShopSleeve, + ShopClassSkin, + ShopItem, + BattleTexture, + BattleLangTexture, + Field3D, + Background, + CardMenu, + BossRushSpecialCard, + FirstTips, + Arena, + Item, + Lottery, + UiOtherTexture, + UilangOtherTexture, + UiStory, + UiStorySectionSummary, + PackBox, + UnitHeader, + OtherHeader, + UiDownLoad, + UiDownLoadInfo, + SpecialCrystal, + GrandPrixSpecialAtlas, + QuestAtlas, + Stamp, + Uilang3DField, + BattlePass, + BattleStage, + Bingo, + PracticePuzzleThumbnail, + NeutralVote, + NeutralVoteThumbnail_S, + NeutralVoteThumbnail_M, + LeaderVote, + LeaderVoteThumbnail_S, + UISpine, + FlowChart, + MyPageBackGround, + MyPageCharacter, + MyPageCharacterMask, + MyPageBackGroundIcon, + MyPageBackGroundRandomSelectIcon, + Competition, + FreeCardPack, + SpecialTitle + } + + private enum ProgressDebugType + { + Progress_NONE, + Progress_DOWNLOAD, + Progress_LOAD + } + + public enum BackgroundDownloadState + { + None, + Init, + Download, + StopRequest + } + + public enum StopResult + { + Paused, + Stopped, + Finished + } + + public List Card3DAssetPathList = new List(); + + public List Card2DAssetPathList = new List(); + + public List CardListAssetPathList = new List(); + + public List SleeveListAssetPathList = new List(); + + public List BattleListAssetPathList = new List(); + + private bool downloadSemaphore; + + private AssetRequestContext downloadRequestContext = new AssetRequestContext(null, new Utility.LeanSemaphore(0), new AssetErrorState()); + + private bool loadSemaphore; + + private AssetRequestContext loadRequestContext = new AssetRequestContext(null, new Utility.LeanSemaphore(0), new AssetErrorState()); + + private bool useAssetBundle = true; + + public static int fixedParallelTasks; + + private int _preferredParallelLoadTasks = -1; + + private int _preferredParallelDownloadTasks = -1; + + private List downloadList; + + public BackgroundDownloadState BgDownloadState; + + private bool _stopForMovie; + + public static float TextureScaleRatio + { + get + { + if (QualityManager.GetAssetQualityLevel() == QualityManager.AssetQualityLevel.Level_1) + { + return 2f; + } + return 1f; + } + } + + public static float AtlasValueRatio + { + get + { + if (QualityManager.GetAssetQualityLevel() == QualityManager.AssetQualityLevel.Level_1) + { + return 0.5f; + } + return 1f; + } + } + + public string GetAssetTypePath(string path, AssetLoadPathType type, bool isfetch = false) + { + if (string.IsNullOrEmpty(path)) + { + return ""; + } + string result = ""; + int result2 = 0; + if (isfetch) + { + switch (type) + { + case AssetLoadPathType.Master: + result = "Master/" + path; + break; + case AssetLoadPathType.MasterEtc: + result = "Master/etc/" + path; + break; + case AssetLoadPathType.CharaMaster: + result = "Master/chara/" + path; + break; + case AssetLoadPathType.Tutorial: + result = "Tutorial/TutorialTextureAtlas/" + path; + break; + case AssetLoadPathType.StoryTutorial: + result = "Storylang/StoryTutorialTextureAtlas/" + path; + break; + case AssetLoadPathType.StoryParam: + result = "Story/Param/" + path; + break; + case AssetLoadPathType.StoryParamDiff: + result = "Storylang/ParamDiff/" + path; + break; + case AssetLoadPathType.StoryText: + result = "Storylang/Text/" + path; + break; + case AssetLoadPathType.StoryMovieSubtitles: + result = "Storylang/MovieSubtitles/" + path; + break; + case AssetLoadPathType.StoryCharacter: + result = "Story/Character/" + path; + break; + case AssetLoadPathType.StoryBackground: + result = "Story/Background/" + path; + break; + case AssetLoadPathType.StoryEndingStill: + result = "Story/EndingStill/" + path; + break; + case AssetLoadPathType.HandCard: + result = "Card/CardFrame/HandCard/" + path; + break; + case AssetLoadPathType.HandCardSpecular: + result = "Card/CardFrame/HandCardSpecular/" + path; + break; + case AssetLoadPathType.CardFrame: + result = "Card/CardFrame/" + path; + break; + case AssetLoadPathType.CardFrameClassIcon: + result = "Card/CardFrame/ClassIcon/" + path; + break; + case AssetLoadPathType.CardFrameMesh: + result = "Card/Common/Frame/Meshes/" + path; + break; + case AssetLoadPathType.CardFrameMaterial: + result = "Card/Common/Frame/" + path + "/" + path; + break; + case AssetLoadPathType.CardFrameMaterialPlus: + result = "Card/Common/Frame/Materials/" + path; + break; + case AssetLoadPathType.CardFrameTextureCommon: + result = "Card/Common/Frame/Textures/" + path; + break; + case AssetLoadPathType.FoilTextures: + result = "Card/Common/Foil/Textures/" + path; + break; + case AssetLoadPathType.UnitCardMaterial: + result = "Card/Field/Materials/" + path; + break; + case AssetLoadPathType.UnitCardTextures: + result = "Card/Field/Textures/" + path; + break; + case AssetLoadPathType.SpellCardMaterial: + result = "Card/Spell/Materials/" + path; + break; + case AssetLoadPathType.SpellCardTextures: + result = "Card/Spell/Textures/" + path; + break; + case AssetLoadPathType.UnitHeader: + result = "Card/Field/Header/log_" + path; + break; + case AssetLoadPathType.OtherHeader: + result = "Card/Spell/Header/log_" + path; + break; + case AssetLoadPathType.Effect2D: + result = "Effect/Effects/" + path; + break; + case AssetLoadPathType.Effect2DMaterials: + result = "Effect/Images/Materials/" + path; + break; + case AssetLoadPathType.Effect3D: + result = "Effect/FBX/" + path; + break; + case AssetLoadPathType.Effect3DAnim: + result = "Effect/FBX/" + path + "/Motions/"; + break; + case AssetLoadPathType.Effect3DMat: + result = "Effect/FBX/" + path + "/Materials/"; + break; + case AssetLoadPathType.Emblem_S: + result = "Ui/Emblem/S/" + Data.Master.EmblemMgr.GetResourcePath(long.Parse(path)) + "_s"; + break; + case AssetLoadPathType.Emblem_M: + result = "Ui/Emblem/M/" + Data.Master.EmblemMgr.GetResourcePath(long.Parse(path)) + "_m"; + break; + case AssetLoadPathType.Degree_S: + result = "Uilang/Degree/S/" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_s"; + break; + case AssetLoadPathType.DegreeMaterial_S: + result = "Uilang/Degree/Materials/" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_s_M"; + break; + case AssetLoadPathType.Degree_M: + result = "Uilang/Degree/M/" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_m"; + break; + case AssetLoadPathType.DegreeMaterial_M: + result = "Uilang/Degree/Materials/" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_m_M"; + break; + case AssetLoadPathType.DegreeMask: + result = "Uilang/Degree/Masks/" + Data.Master.DegreeMgr.GetMaskTexturePath(int.Parse(path)); + break; + case AssetLoadPathType.RankIcon_S: + result = "Uilang/RankIcon/S/icon_rank_" + path + "_s"; + break; + case AssetLoadPathType.RankIcon_L: + result = "Uilang/RankIcon/L/icon_rank_" + path + "_l"; + break; + case AssetLoadPathType.Country_S: + result = "Ui/Country/S/country_" + path + "_s"; + break; + case AssetLoadPathType.Country_M: + result = "Ui/Country/M/country_" + path + "_m"; + break; + case AssetLoadPathType.DeckListTexture: + result = $"Ui/TextureAtlas/DeckListTextureAtlas/btn_deck_{int.Parse(path):D2}"; + break; + case AssetLoadPathType.DeckEditBGTexture: + result = "Ui/TextureAtlas/DeckListTextureAtlas/" + path; + break; + case AssetLoadPathType.ClassCharaSpine: + result = "Ui/ClassChar/Prefab/class_" + path; + break; + case AssetLoadPathType.ClassCharaBase: + result = ((!int.TryParse(path, out result2)) ? $"Ui/ClassChar/Textures/Base/class_{path}_base" : $"Ui/ClassChar/Textures/Base/class_{result2:D2}_base"); + break; + case AssetLoadPathType.ClassCharaBaseWin: + result = "Ui/ClassChar/Textures/Base/class_" + path + "_base_win"; + break; + case AssetLoadPathType.ClassCharaBaseLose: + result = "Ui/ClassChar/Textures/Base/class_" + path + "_base_lose"; + break; + case AssetLoadPathType.ClassCharaEvolve: + result = ((!int.TryParse(path, out result2)) ? $"Ui/ClassChar/Textures/Base/class_{path}_base_evolve" : $"Ui/ClassChar/Textures/Base/class_{result2:D2}_base_evolve"); + break; + case AssetLoadPathType.ClassCharaEvolveWin: + result = "Ui/ClassChar/Textures/Base/class_" + path + "_base_evolve_win"; + break; + case AssetLoadPathType.ClassCharaEvolveLose: + result = "Ui/ClassChar/Textures/Base/class_" + path + "_base_evolve_lose"; + break; + case AssetLoadPathType.ClassCharaHeader: + result = "Ui/ClassChar/Textures/Header/" + path; + break; + case AssetLoadPathType.ClassCharaSkinThumbnail: + result = $"Ui/ClassChar/Textures/SkinThumbnail/class_skin_{int.Parse(path):D2}"; + break; + case AssetLoadPathType.ClassCharaWideThumbnail: + { + int result5 = 0; + result = ((!int.TryParse(path, out result5)) ? $"Ui/ClassChar/Textures/WideThumbnail/chara_select_thumbnail_wide_class_{path}" : $"Ui/ClassChar/Textures/WideThumbnail/chara_select_thumbnail_wide_class_{result5:D2}"); + break; + } + case AssetLoadPathType.ClassCharaButton: + { + int result4 = 0; + result = ((!int.TryParse(path, out result4)) ? $"Ui/ClassChar/Textures/Button/class_select_thumbnail_{path}" : $"Ui/ClassChar/Textures/Button/class_select_thumbnail_{result4:D2}"); + break; + } + case AssetLoadPathType.PracticePuzzleThumbnail: + { + result = ((!int.TryParse(path, out var result3)) ? $"Ui/Puzzle/Thumbnail/puzzle_thumbnail_{path}" : $"Ui/Puzzle/Thumbnail/puzzle_thumbnail_{result3:D2}"); + break; + } + case AssetLoadPathType.ClassCharaIconLevel: + result = "Ui/ClassChar/Textures/Icon/class_" + path + "_level"; + break; + case AssetLoadPathType.ClassCharaEncampment: + result = "Ui/ClassChar/Textures/Encampment/class_" + path + "_encampment"; + break; + case AssetLoadPathType.ClassCharaMesh: + result = "Ui/ClassChar/Meshes/" + path; + break; + case AssetLoadPathType.ClassCharaMaterial: + result = "Ui/ClassChar/Materials/" + path; + break; + case AssetLoadPathType.ClassCharaMaterialMain: + result = "Ui/ClassChar/Materials/Main/" + path; + break; + case AssetLoadPathType.ClassCharaTexture: + result = "Ui/ClassChar/Textures/" + path; + break; + case AssetLoadPathType.ClassCharaFrameTexture: + result = "Ui/ClassChar/Textures/Frame/" + path; + break; + case AssetLoadPathType.ClassCharaProfile: + result = "Ui/ClassChar/Textures/Profile/" + path; + break; + case AssetLoadPathType.ClassCharaStory: + result = $"Ui/ClassChar/Textures/Story/class_{int.Parse(path):D2}_story"; + break; + case AssetLoadPathType.ClassChara3D: + result = "Ui/Class3dChar/Prehab/" + path + "/chr" + path; + break; + case AssetLoadPathType.AreaSelectTexture: + result = "Ui/TextureAtlas/AreaSelectTextureAtlas/" + path; + break; + case AssetLoadPathType.GachaTexture: + result = "Ui/TextureAtlas/GachaTextureAtlas/" + path; + break; + case AssetLoadPathType.ShopCardPack: + result = "Uilang/Shop/CardPack/" + path; + break; + case AssetLoadPathType.ShopBuildDeck: + result = "Uilang/Shop/BuildDeck/" + path; + break; + case AssetLoadPathType.ShopBuildDeckThumbnail: + result = "Uilang/Shop/BuildDeck/build_deck_thumbnail_" + path; + break; + case AssetLoadPathType.ShopSleeve: + result = "Uilang/Shop/Sleeve/" + path; + break; + case AssetLoadPathType.ShopClassSkin: + result = "Uilang/Shop/ClassSkin/" + path; + break; + case AssetLoadPathType.ShopItem: + result = "Uilang/Shop/Ticket/" + path; + break; + case AssetLoadPathType.CardDeco: + result = "Sleeve/CardDeco/" + path; + break; + case AssetLoadPathType.SleeveTexture: + result = "Sleeve/Textures/" + Data.Master.SleeveMgr.GetResourcePath(long.Parse(path)).ToString(); + break; + case AssetLoadPathType.SleeveTextureMask: + { + Sleeve sleeve = Data.Master.SleeveMgr.Get(long.Parse(path)); + result = ((!sleeve.IsPremiumSleeve) ? string.Empty : ("Sleeve/Masks/sleeve_mask_" + sleeve.sleeve_id)); + break; + } + case AssetLoadPathType.SleeveTextureBasePath: + result = "Sleeve/Textures/" + path; + break; + case AssetLoadPathType.SleeveTextureAORefSpec: + result = "Sleeve/Textures/sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_a"; + break; + case AssetLoadPathType.SleeveTextureNormalMap: + result = "Sleeve/Textures/sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_n"; + break; + case AssetLoadPathType.SleeveMaterial: + result = "Sleeve/Materials/sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_M"; + break; + case AssetLoadPathType.SleeveMesh: + result = "Sleeve/Meshes/" + path; + break; + case AssetLoadPathType.SleeveSpecular: + result = "Sleeve/Meshes/Materials/" + path; + break; + case AssetLoadPathType.BattleTexture: + result = "Ui/TextureAtlas/BattleTextureAtlas/" + path; + break; + case AssetLoadPathType.BattleLangTexture: + result = "Uilang/TextureAtlas/BattleLangTextureAtlas/" + path; + break; + case AssetLoadPathType.Field3D: + result = "Bg/" + path + "/_Battle" + path; + break; + case AssetLoadPathType.Font: + result = "Ui/Fonts/" + path; + break; + case AssetLoadPathType.Background: + result = "Ui/Background/" + path; + break; + case AssetLoadPathType.CardMenu: + result = "Ui/CardMenu/" + path; + break; + case AssetLoadPathType.BossRushSpecialCard: + result = "Ui/BossRush/boss_rush_" + path; + break; + case AssetLoadPathType.FirstTips: + result = "Uilang/FirstTips/" + path; + break; + case AssetLoadPathType.Arena: + result = "Ui/TextureAtlas/ArenaTextureAtlas/" + path; + break; + case AssetLoadPathType.Item: + result = "Ui/Item/" + path; + break; + case AssetLoadPathType.Lottery: + result = "Ui/Lottery/" + path; + break; + case AssetLoadPathType.UiOtherTexture: + result = "Ui/Other/" + path; + break; + case AssetLoadPathType.UilangOtherTexture: + result = "Uilang/Other/" + path; + break; + case AssetLoadPathType.UiStory: + result = "Ui/Story/" + path; + break; + case AssetLoadPathType.UiStorySectionSummary: + result = "Ui/Story/SectionSummary/" + path; + break; + case AssetLoadPathType.StorySubChapterBtnTexture: + result = "Ui/Story/StorySelect/" + path; + break; + case AssetLoadPathType.StoryChapterHeader: + result = "Ui/Story/ChapterHeader/" + path; + break; + case AssetLoadPathType.StorySelectWorldPanel: + result = "Ui/Story/StorySelectWorldPanel/" + path; + break; + case AssetLoadPathType.BattlePass: + result = "Ui/BattlePass/" + path; + break; + case AssetLoadPathType.BattleStage: + result = "Ui/BattleStage/" + path; + break; + case AssetLoadPathType.PackBox: + result = "PackBox/prefab/" + path; + break; + case AssetLoadPathType.UiDownLoad: + result = "UiDownload/" + path; + break; + case AssetLoadPathType.UiDownLoadInfo: + result = "UiDownload/Info/" + path; + break; + case AssetLoadPathType.SpecialCrystal: + result = "Uilang/LegendCrystal/" + path; + break; + case AssetLoadPathType.GrandPrixSpecialAtlas: + result = "Ui/TextureAtlas/GrandPrixSpecial/" + path; + break; + case AssetLoadPathType.QuestAtlas: + result = "Ui/TextureAtlas/Quest/Quest"; + break; + case AssetLoadPathType.Stamp: + result = "Uilang/Stamp/stamp_" + path; + break; + case AssetLoadPathType.Uilang3DField: + result = "Uilang/3DField/" + path; + break; + case AssetLoadPathType.Bingo: + result = "Ui/Bingo/" + path; + break; + case AssetLoadPathType.NeutralVote: + result = "Ui/PopularityVote/Neutral/neutral_vote_" + path; + break; + case AssetLoadPathType.NeutralVoteThumbnail_S: + result = "Ui/PopularityVote/Neutral/Thumbnail_S/neutral_vote_thumb_" + path + "_s"; + break; + case AssetLoadPathType.NeutralVoteThumbnail_M: + result = "Ui/PopularityVote/Neutral/Thumbnail_M/neutral_vote_thumb_" + path + "_m"; + break; + case AssetLoadPathType.LeaderVote: + result = "Ui/PopularityVote/Leader/leader_vote_" + path; + break; + case AssetLoadPathType.LeaderVoteThumbnail_S: + result = "Ui/PopularityVote/Leader/Thumbnail_S/leader_vote_thumb_" + path + "_s"; + break; + case AssetLoadPathType.UISpine: + result = "Ui/UISpine/Prefab/" + path.Replace("_body", "") + "/" + path; + break; + case AssetLoadPathType.FlowChart: + result = "Ui/FlowChart/" + path; + break; + case AssetLoadPathType.MyPageBackGround: + result = "Ui/MyPageBackGround/bg_mypage_" + path; + break; + case AssetLoadPathType.MyPageCharacter: + result = "Ui/MyPageCharacter/" + path + "/" + path + "_mypage"; + break; + case AssetLoadPathType.MyPageCharacterMask: + result = "Ui/MyPageCharacter/" + path + "/" + path + "_mypage_mask"; + break; + case AssetLoadPathType.MyPageBackGroundIcon: + result = "Ui/MyPageBackGroundIcon/mypage_bg_icon_" + path; + break; + case AssetLoadPathType.MyPageBackGroundRandomSelectIcon: + result = "Ui/MyPageBackGroundIcon/mypage_bg_random_icon_" + path; + break; + case AssetLoadPathType.Competition: + result = "Ui/Competition/" + path; + break; + case AssetLoadPathType.FreeCardPack: + result = "Ui/FreeCardPack/" + path; + break; + case AssetLoadPathType.SpecialTitle: + result = "Ui/SpecialTitle/" + path + "/special_title_" + path; + break; + } + } + else + { + switch (type) + { + case AssetLoadPathType.Master: + case AssetLoadPathType.MasterEtc: + case AssetLoadPathType.CharaMaster: + result = "master_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.StoryParam: + case AssetLoadPathType.StoryCharacter: + case AssetLoadPathType.StoryBackground: + case AssetLoadPathType.StoryEndingStill: + result = "story_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.StoryTutorial: + case AssetLoadPathType.StoryParamDiff: + case AssetLoadPathType.StoryText: + case AssetLoadPathType.StoryMovieSubtitles: + result = "storylang_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.HandCard: + case AssetLoadPathType.HandCardSpecular: + case AssetLoadPathType.CardFrame: + case AssetLoadPathType.CardFrameClassIcon: + case AssetLoadPathType.CardDeco: + case AssetLoadPathType.SleeveTextureBasePath: + case AssetLoadPathType.SleeveMesh: + case AssetLoadPathType.SleeveSpecular: + case AssetLoadPathType.CardFrameMesh: + case AssetLoadPathType.CardFrameMaterial: + case AssetLoadPathType.CardFrameMaterialPlus: + case AssetLoadPathType.CardFrameTextureCommon: + case AssetLoadPathType.FoilTextures: + case AssetLoadPathType.UnitHeader: + case AssetLoadPathType.OtherHeader: + result = "card_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.SleeveMaterial: + result = "card_sleeve_" + Data.Master.SleeveMgr.Get(long.Parse(path)).sleeve_id + "_m.unity3d"; + break; + case AssetLoadPathType.SleeveTexture: + result = "card_sleeve_" + Data.Master.SleeveMgr.Get(long.Parse(path)).sleeve_id + ".unity3d"; + break; + case AssetLoadPathType.SleeveTextureMask: + { + Sleeve sleeve2 = Data.Master.SleeveMgr.Get(long.Parse(path)); + result = ((!sleeve2.IsPremiumSleeve) ? string.Empty : ("card_sleeve_mask_" + sleeve2.sleeve_id + ".unity3d")); + break; + } + case AssetLoadPathType.SleeveTextureAORefSpec: + result = "card_sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_a.unity3d"; + break; + case AssetLoadPathType.SleeveTextureNormalMap: + result = "card_sleeve_" + DataMgr.GetAbleSleeveId(long.Parse(path)) + "_n.unity3d"; + break; + case AssetLoadPathType.UnitCardMaterial: + case AssetLoadPathType.UnitCardTextures: + case AssetLoadPathType.SpellCardMaterial: + case AssetLoadPathType.SpellCardTextures: + result = "card_" + path.ToLower() + "0.unity3d"; + break; + case AssetLoadPathType.Effect2D: + case AssetLoadPathType.Effect2DMaterials: + case AssetLoadPathType.Effect3D: + case AssetLoadPathType.Effect3DAnim: + case AssetLoadPathType.Effect3DMat: + result = "effect_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.Emblem_S: + result = "ui_" + Data.Master.EmblemMgr.GetResourcePath(long.Parse(path)) + "_s.unity3d"; + break; + case AssetLoadPathType.Emblem_M: + result = "ui_" + Data.Master.EmblemMgr.GetResourcePath(long.Parse(path)) + "_m.unity3d"; + break; + case AssetLoadPathType.Degree_S: + result = "uilang_" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_s.unity3d"; + break; + case AssetLoadPathType.DegreeMaterial_S: + result = "uilang_" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_s_m.unity3d"; + break; + case AssetLoadPathType.Degree_M: + result = "uilang_" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_m.unity3d"; + break; + case AssetLoadPathType.DegreeMaterial_M: + result = "uilang_" + Data.Master.DegreeMgr.GetResourcePath(int.Parse(path)) + "_m_m.unity3d"; + break; + case AssetLoadPathType.DegreeMask: + result = "uilang_" + Data.Master.DegreeMgr.GetMaskTexturePath(int.Parse(path)) + ".unity3d"; + break; + case AssetLoadPathType.RankIcon_S: + result = "uilang_icon_rank_" + path + "_s.unity3d"; + break; + case AssetLoadPathType.RankIcon_L: + result = "uilang_icon_rank_" + path + "_l.unity3d"; + break; + case AssetLoadPathType.Country_S: + result = "ui_country_" + path.ToLower() + "_s.unity3d"; + break; + case AssetLoadPathType.Country_M: + result = "ui_country_" + path.ToLower() + "_m.unity3d"; + break; + case AssetLoadPathType.DeckListTexture: + result = $"ui_btn_deck_{int.Parse(path):D2}.unity3d"; + break; + case AssetLoadPathType.DeckEditBGTexture: + result = "ui_" + path + ".unity3d"; + break; + case AssetLoadPathType.ClassCharaSpine: + result = "ui_class_" + path + ".unity3d"; + break; + case AssetLoadPathType.ClassCharaBase: + result = ((!int.TryParse(path, out result2)) ? $"ui_class_{path}_base.unity3d" : $"ui_class_{result2:D2}_base.unity3d"); + break; + case AssetLoadPathType.ClassCharaBaseWin: + result = "ui_class_" + path + "_base_win.unity3d"; + break; + case AssetLoadPathType.ClassCharaBaseLose: + result = "ui_class_" + path + "_base_lose.unity3d"; + break; + case AssetLoadPathType.ClassCharaEvolve: + result = ((!int.TryParse(path, out result2)) ? $"ui_class_{path}_base_evolve.unity3d" : $"ui_class_{result2:D2}_base_evolve.unity3d"); + break; + case AssetLoadPathType.ClassCharaEvolveWin: + result = "ui_class_" + path + "_base_evolve_win.unity3d"; + break; + case AssetLoadPathType.ClassCharaEvolveLose: + result = "ui_class_" + path + "_base_evolve_lose.unity3d"; + break; + case AssetLoadPathType.ClassCharaHeader: + result = "ui_" + path + ".unity3d"; + break; + case AssetLoadPathType.ClassCharaSkinThumbnail: + result = $"ui_class_skin_{int.Parse(path):D2}.unity3d"; + break; + case AssetLoadPathType.PracticePuzzleThumbnail: + result = $"ui_puzzle_thumbnail_{int.Parse(path):D2}.unity3d"; + break; + case AssetLoadPathType.ClassCharaWideThumbnail: + { + int result7 = 0; + result = ((!int.TryParse(path, out result7)) ? $"ui_chara_select_thumbnail_wide_class_{path}.unity3d" : $"ui_chara_select_thumbnail_wide_class_{result7:D2}.unity3d"); + break; + } + case AssetLoadPathType.ClassCharaButton: + { + int result6 = 0; + result = ((!int.TryParse(path, out result6)) ? $"ui_class_select_thumbnail_{path}.unity3d" : $"ui_class_select_thumbnail_{result6:D2}.unity3d"); + break; + } + case AssetLoadPathType.ClassCharaStory: + result = $"ui_class_{int.Parse(path):D2}_story.unity3d"; + break; + case AssetLoadPathType.ClassChara3D: + result = $"ui_chr{path}.unity3d"; + break; + case AssetLoadPathType.ClassCharaIconLevel: + result = "ui_class_" + path + "_level.unity3d"; + break; + case AssetLoadPathType.ClassCharaEncampment: + result = "ui_class_" + path + "_encampment.unity3d"; + break; + case AssetLoadPathType.Field3D: + result = "bg_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.Tutorial: + result = "tutorial_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.BossRushSpecialCard: + result = "ui_boss_rush_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.StorySubChapterBtnTexture: + case AssetLoadPathType.StoryChapterHeader: + case AssetLoadPathType.StorySelectWorldPanel: + case AssetLoadPathType.Font: + case AssetLoadPathType.ClassCharaMesh: + case AssetLoadPathType.ClassCharaMaterial: + case AssetLoadPathType.ClassCharaMaterialMain: + case AssetLoadPathType.ClassCharaTexture: + case AssetLoadPathType.ClassCharaFrameTexture: + case AssetLoadPathType.ClassCharaProfile: + case AssetLoadPathType.AreaSelectTexture: + case AssetLoadPathType.GachaTexture: + case AssetLoadPathType.BattleTexture: + case AssetLoadPathType.Background: + case AssetLoadPathType.CardMenu: + case AssetLoadPathType.Arena: + case AssetLoadPathType.UiOtherTexture: + case AssetLoadPathType.UiStory: + case AssetLoadPathType.UiStorySectionSummary: + case AssetLoadPathType.GrandPrixSpecialAtlas: + case AssetLoadPathType.BattlePass: + case AssetLoadPathType.BattleStage: + case AssetLoadPathType.Bingo: + case AssetLoadPathType.FlowChart: + case AssetLoadPathType.Competition: + case AssetLoadPathType.FreeCardPack: + result = "ui_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.MyPageBackGround: + result = "ui_bg_mypage_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.MyPageCharacter: + result = "ui_" + path.ToLower() + "_mypage.unity3d"; + break; + case AssetLoadPathType.MyPageCharacterMask: + result = "ui_" + path.ToLower() + "_mypage_mask.unity3d"; + break; + case AssetLoadPathType.MyPageBackGroundIcon: + result = "ui_mypage_bg_icon_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.MyPageBackGroundRandomSelectIcon: + result = "ui_mypage_bg_random_icon_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.QuestAtlas: + result = "ui_quest.unity3d"; + break; + case AssetLoadPathType.UilangOtherTexture: + result = "uilang_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.ShopBuildDeckThumbnail: + result = "uilang_build_deck_thumbnail_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.SpecialTitle: + result = "ui_special_title_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.ShopCardPack: + case AssetLoadPathType.ShopBuildDeck: + case AssetLoadPathType.ShopSleeve: + case AssetLoadPathType.ShopClassSkin: + case AssetLoadPathType.ShopItem: + case AssetLoadPathType.BattleLangTexture: + result = "uilang_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.FirstTips: + result = "uilang_" + path + ".unity3d"; + break; + case AssetLoadPathType.SpecialCrystal: + result = "uilang_" + path.ToLower() + ".unity3d"; + break; + case AssetLoadPathType.Item: + case AssetLoadPathType.Lottery: + result = "ui_" + path + ".unity3d"; + break; + case AssetLoadPathType.PackBox: + result = "packbox_" + path + ".unity3d"; + break; + case AssetLoadPathType.UiDownLoad: + case AssetLoadPathType.UiDownLoadInfo: + result = "uidownload_" + path + ".unity3d"; + break; + case AssetLoadPathType.Stamp: + result = "uilang_stamp_" + path + ".unity3d"; + break; + case AssetLoadPathType.Uilang3DField: + result = "uilang_" + path + ".unity3d"; + break; + case AssetLoadPathType.NeutralVote: + result = "ui_neutral_vote_" + path + ".unity3d"; + break; + case AssetLoadPathType.NeutralVoteThumbnail_S: + result = "ui_neutral_vote_thumb_" + path + "_s.unity3d"; + break; + case AssetLoadPathType.NeutralVoteThumbnail_M: + result = "ui_neutral_vote_thumb_" + path + "_m.unity3d"; + break; + case AssetLoadPathType.LeaderVote: + result = "ui_leader_vote_" + path + ".unity3d"; + break; + case AssetLoadPathType.LeaderVoteThumbnail_S: + result = "ui_leader_vote_thumb_" + path + "_s.unity3d"; + break; + case AssetLoadPathType.UISpine: + result = "ui_" + path + ".unity3d"; + break; + } + } + return result; + } + + public long GetExistingSleeveId(long sleeveId) + { + string path = sleeveId.ToString(); + string assetTypePath = GetAssetTypePath(path, AssetLoadPathType.SleeveMaterial); + if (!ExistsAssetBundleManifest(assetTypePath)) + { + AddAssetNotFoundLog(assetTypePath); + return 3000011L; + } + string assetTypePath2 = GetAssetTypePath(path, AssetLoadPathType.SleeveTexture); + if (!ExistsAssetBundleManifest(assetTypePath2)) + { + AddAssetNotFoundLog(assetTypePath2); + return 3000011L; + } + if (Data.Master.SleeveMgr.Get(sleeveId).IsPremiumSleeve) + { + string assetTypePath3 = GetAssetTypePath(path, AssetLoadPathType.SleeveTextureMask); + if (!ExistsAssetBundleManifest(assetTypePath3)) + { + AddAssetNotFoundLog(assetTypePath3); + return 3000011L; + } + } + return sleeveId; + } + + public bool IsExistSleeveNormalMap(long sleeveId) + { + string assetTypePath = GetAssetTypePath(sleeveId.ToString(), AssetLoadPathType.SleeveTextureNormalMap); + return ExistsAssetBundleManifest(assetTypePath); + } + + private void AddAssetNotFoundLog(string path) + { + string text = "asset not found : " + path; + Debug.LogError(text); + LocalLog.AccumulateTraceLog(text); + } + + public string GetLoadFontFilePath(string fileName) + { + return "f/" + fileName; + } + + public Material FindCardMaterial(int cardId, AssetLoadPathType type, bool isEvol = false, bool isMutation = false, CardBasePrm.CharaType originalType = CardBasePrm.CharaType.NORMAL, bool isChoiceBrave = false) + { + string text = ((cardId / 1000000000 == 1) ? GetAssetTypePath($"{cardId}_M", AssetLoadPathType.UnitCardMaterial, isfetch: true) : ((isEvol && type == AssetLoadPathType.UnitCardMaterial) ? GetAssetTypePath($"{cardId}1_M", type, isfetch: true) : ((!(isMutation || isChoiceBrave)) ? GetAssetTypePath($"{cardId}0_M", type, isfetch: true) : ((originalType != CardBasePrm.CharaType.NORMAL) ? GetAssetTypePath($"{cardId}0_M", AssetLoadPathType.SpellCardMaterial, isfetch: true) : GetAssetTypePath($"{cardId}0_M", AssetLoadPathType.UnitCardMaterial, isfetch: true))))); + Material obj = LoadObject(text) as Material; + if (obj == null) + { + AddAssetNotFoundLog(text); + } + return obj; + } + + public int GetPreferredParallelDownloadNum() + { + if (fixedParallelTasks > 0) + { + return fixedParallelTasks; + } + if (_preferredParallelDownloadTasks < 0) + { + _preferredParallelDownloadTasks = 4; + } + return _preferredParallelDownloadTasks; + } + + public int GetPreferredParallelLoadNum() + { + if (fixedParallelTasks > 0) + { + return fixedParallelTasks; + } + if (_preferredParallelLoadTasks < 0) + { + _preferredParallelLoadTasks = 8; + } + return _preferredParallelLoadTasks; + } + + private void Awake() + { + } + + private void Start() + { + downloadList = new List(); + Toolbox.ResourcesManager = this; + } + + public void RequestDownloadStopForMovie() + { + if (BgDownloadState == BackgroundDownloadState.Download) + { + BgDownloadState = BackgroundDownloadState.StopRequest; + _stopForMovie = true; + } + } + + public void RequestDownloadStopForMainDownload() + { + if (BgDownloadState == BackgroundDownloadState.Download) + { + BgDownloadState = BackgroundDownloadState.StopRequest; + } + } + + private IEnumerator WaitBgDownloadStopRequestFulfilled() + { + while (!Toolbox.AssetManager.IsDownloadJobIdle()) + { + yield return null; + } + BgDownloadState = BackgroundDownloadState.None; + } + + public StopResult Stop() + { + if (BgDownloadState == BackgroundDownloadState.StopRequest) + { + BgDownloadState = BackgroundDownloadState.None; + if (_stopForMovie) + { + _stopForMovie = false; + return StopResult.Paused; + } + return StopResult.Stopped; + } + if (BgDownloadState == BackgroundDownloadState.Download) + { + BgDownloadState = BackgroundDownloadState.None; + return StopResult.Finished; + } + return StopResult.Stopped; + } + + public bool CanStartBgDownload() + { + if (CanStartDownload()) + { + return !Toolbox.MovieManager.IsPlaying(); + } + return false; + } + + public bool CanStartDownload() + { + if (BgDownloadState == BackgroundDownloadState.None && !downloadSemaphore) + { + return Toolbox.AssetManager.IsDownloadJobIdle(); + } + return false; + } + + public IEnumerator DownloadAssetGroupBackground(List assetList, Action callback, bool isProgress = true, bool isSavePlayerPrefs = true) + { + if (BgDownloadState == BackgroundDownloadState.Init) + { + BgDownloadState = BackgroundDownloadState.Download; + yield return _DownloadAssetGroup(assetList, callback, isProgress, isSavePlayerPrefs); + } + } + + public IEnumerator DownloadAssetGroup(List assetList, Action callback, bool isProgress = true, bool isSavePlayerPrefs = true) + { + while (BgDownloadState == BackgroundDownloadState.Init) + { + yield return null; + } + if (BgDownloadState == BackgroundDownloadState.Download) + { + BgDownloadState = BackgroundDownloadState.StopRequest; + } + while (BgDownloadState == BackgroundDownloadState.StopRequest) + { + yield return WaitBgDownloadStopRequestFulfilled(); + } + Action callback2 = delegate + { + if (callback != null) + { + callback(); + } + }; + yield return _DownloadAssetGroup(assetList, callback2, isProgress, isSavePlayerPrefs); + } + + private IEnumerator _DownloadAssetGroup(List assetList, Action callback, bool isProgress = true, bool isSavePlayerPrefs = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + yield break; + } + while (downloadSemaphore) + { + yield return null; + } + SetDownloadProcessLock(enable_lock: true); + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = 60; + if (downloadList.Count > 0) + { + downloadList.Clear(); + } + bool isDownloadVoiceUse = Toolbox.AudioManager.isDownloadVoiceUse; + for (int i = 0; i < assetList.Count; i++) + { + AssetHandle assetHandle = Toolbox.AssetManager.GetAssetHandle(assetList[i]); + if (assetHandle != null && (!assetHandle.IsSoundVoice() || isDownloadVoiceUse) && assetHandle.isReDownloadAsset(CustomPreference.IsNormalResource)) + { + downloadList.Add(assetList[i]); + } + } + if (downloadList.Count > 0) + { + Toolbox.AssetManager.AddDownloadMaxCount(downloadList.Count); + yield return StartCoroutine(DownloadAssetGroupSub(downloadList, isProgress)); + yield return new WaitForFixedUpdate(); + if (isSavePlayerPrefs) + { + Toolbox.SavedataManager.Save(); + } + } + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = Toolbox.QualityManager.GetFrameRate(); + SetDownloadProcessLock(enable_lock: false); + callback?.Invoke(); + } + + private IEnumerator DownloadAssetGroupSub(List assetList, bool isProgress = true) + { + if (isProgress) + { + UIManager.GetInstance().LoadingViewManager.UpdateLoadingNum(0); + } + if (BgDownloadState != BackgroundDownloadState.StopRequest) + { + downloadRequestContext.callback = null; + yield return StartCoroutine(ParallelAssetListExec(assetList, GetPreferredParallelDownloadNum(), downloadRequestContext, DownloadAssetSub, isProgress ? ProgressDebugType.Progress_DOWNLOAD : ProgressDebugType.Progress_NONE)); + UIManager.GetInstance().LoadingViewManager.UpdateLoadingNum(100); + } + } + + public IEnumerator DownloadAsset(string assetName, Action callback, bool isSavePlayerPrefs = true) + { + List assetList = new List { assetName }; + yield return StartCoroutine(DownloadAssetGroup(assetList, callback, isProgress: true, isSavePlayerPrefs)); + } + + private void DownloadAssetSub(string assetName, AssetRequestContext requestContext) + { + Toolbox.AssetManager.DownloadAsset(assetName, requestContext); + } + + private List FilterAssetList(List assetList, ref List duplicateList) + { + if (assetList.Count < 2) + { + return assetList; + } + List list = new List(new HashSet(assetList)); + if (list.Count != assetList.Count) + { + duplicateList = assetList; + for (int i = 0; i < list.Count; i++) + { + duplicateList.Remove(list[i]); + } + } + return list; + } + + private IEnumerator ParallelAssetListExec(List assetList, int numParallelTasks, AssetRequestContext requestContext, Action exec, ProgressDebugType Progress = ProgressDebugType.Progress_NONE, bool preferSynchornousLoad = false) + { + if (BgDownloadState == BackgroundDownloadState.StopRequest) + { + yield break; + } + List duplist = null; + assetList = FilterAssetList(assetList, ref duplist); + int totalJobs = assetList.Count; + int finishedJobs = 0; + if (requestContext == null) + { + requestContext = new AssetRequestContext(null, new Utility.LeanSemaphore(0), new AssetErrorState()); + } + requestContext.callback = delegate(AssetHandle handle) + { + if (handle == null || string.IsNullOrEmpty(handle.AssetName) || assetList == null) + { + finishedJobs++; + } + else if (assetList.Contains(handle.AssetName)) + { + finishedJobs++; + } + }; + requestContext.semaphore.Reset(numParallelTasks); + requestContext.preferSynchronousLoad = preferSynchornousLoad; + requestContext.errorState.Reset(); + AssetErrorState errorState = requestContext.errorState; + LocalLog.UpdateLoadResourceLog("JustBeforeExec"); + do + { + if (BgDownloadState == BackgroundDownloadState.StopRequest) + { + yield break; + } + int count = assetList.Count; + for (int num = 0; num < count; num++) + { + exec(assetList[num], requestContext); + } + while (finishedJobs < totalJobs && BgDownloadState != BackgroundDownloadState.StopRequest) + { + if (errorState.HasError()) + { + errorState.SetCanceled(); + } + yield return 0; + } + if (errorState.HasError()) + { + if (errorState.lastDialogDecision != AssetErrorState.DialogDecision.RETRY) + { + LocalLog.RecordResouseLoadError(errorState.errorFlag); + while (true) + { + yield return 0; + } + } + assetList = errorState.GatherErrorFilenames(); + finishedJobs = totalJobs - assetList.Count; + } + if (BgDownloadState == BackgroundDownloadState.StopRequest) + { + Toolbox.AssetManager.CancelDownloadAsyncJob(); + break; + } + } + while (errorState.HasError()); + requestContext.callback = null; + if (duplist == null) + { + yield break; + } + for (int num2 = 0; num2 < duplist.Count; num2++) + { + AssetHandle assetHandle = Toolbox.AssetManager.GetAssetHandle(duplist[num2]); + if (assetHandle != null && assetHandle.reference >= 1) + { + assetHandle.reference++; + } + } + } + + public IEnumerator LoadAssetGroupAsync(List rogueAssetList, Action callback, bool isProgress = true) + { + return LoadAssetGroup(rogueAssetList, callback, isProgress); + } + + public IEnumerator LoadAssetGroupSync(List rogueAssetList, Action callback, bool isProgress = true) + { + return LoadAssetGroup(rogueAssetList, callback, isProgress, preferSynchronousLoad: true); + } + + public IEnumerator LoadAssetGroup(List rogueAssetList, Action callback, bool isProgress = true, bool preferSynchronousLoad = false) + { + List filteredAssetList = QuickLoadAssetGroup(rogueAssetList); + if (filteredAssetList == null || filteredAssetList.Count == 0) + { + callback?.Invoke(); + yield break; + } + LocalLog.UpdateLoadResourceLog("BeforeSemaphore"); + while (loadSemaphore) + { + yield return null; + } + SetLoadProcessLock(enable_lock: true); + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = 60; + _ = isProgress; + LocalLog.UpdateLoadResourceLog("BeforeParallelAssetListExec"); + Toolbox.AssetManager.AddLoadingMaxCount(rogueAssetList.Count); + yield return StartCoroutine(ParallelAssetListExec(filteredAssetList, GetPreferredParallelLoadNum(), loadRequestContext, LoadAssetSub, isProgress ? ProgressDebugType.Progress_LOAD : ProgressDebugType.Progress_NONE, preferSynchronousLoad)); + LocalLog.UpdateLoadResourceLog("AfterParallelAssetListExec"); + yield return new WaitForFixedUpdate(); + QualitySettings.vSyncCount = 0; + Application.targetFrameRate = Toolbox.QualityManager.GetFrameRate(); + SetLoadProcessLock(enable_lock: false); + callback?.Invoke(); + LocalLog.UpdateLoadResourceLog("FinishLoad"); + } + + public IEnumerator DownloadAssetGroupWithLoadAsset(List assetList, Action callback, bool isProgress = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + yield break; + } + yield return StartCoroutine(DownloadAssetGroup(assetList, null, isProgress)); + yield return StartCoroutine(LoadAssetGroupAsync(assetList, null, isProgress)); + } + + private bool QuickLoadAsset(string assetName) + { + AssetHandle assetHandle = Toolbox.AssetManager.GetAssetHandle(assetName); + bool result = false; + if (assetHandle != null) + { + result = assetHandle.QuickLoadIfPossible(); + } + return result; + } + + private List QuickLoadAssetGroup(List assetList) + { + if (assetList == null || assetList.Count == 0) + { + return null; + } + List list = null; + int count = assetList.Count; + if (count == 1) + { + string text = assetList[0]; + if (!QuickLoadAsset(text)) + { + list = new List(1); + list.Add(text); + } + } + else + { + HashSet hashSet = null; + for (int i = 0; i < count; i++) + { + string text2 = assetList[i]; + if (string.IsNullOrEmpty(text2)) + { + continue; + } + if (hashSet != null && hashSet.Contains(text2)) + { + AssetHandle assetHandle = Toolbox.AssetManager.GetAssetHandle(text2); + if (assetHandle != null && assetHandle.reference >= 1) + { + assetHandle.reference++; + } + } + else if (QuickLoadAsset(text2)) + { + if (hashSet == null) + { + hashSet = new HashSet(); + } + hashSet.Add(text2); + } + else + { + if (list == null) + { + list = new List(); + } + list.Add(text2); + } + } + } + return list; + } + + public IEnumerator LoadAssetAsync(string assetName, Action callback) + { + List rogueAssetList = new List { assetName }; + yield return StartCoroutine(LoadAssetGroupAsync(rogueAssetList, null)); + callback?.Invoke(); + } + + private void LoadAssetSub(string assetName, AssetRequestContext requestContext) + { + Toolbox.AssetManager.CacheAsset(assetName, requestContext); + } + + public void StartCoroutine_DownloadAssetGroupWithLoadAsset(List assetList, Action callback, bool isProgress = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + } + else + { + StartCoroutine(DownloadAssetGroupWithLoadAsset(assetList, callback, isProgress)); + } + } + + public void StartCoroutine_DownloadAssetGroupWithLoadAsset(string asset, Action callback, bool isProgress = true) + { + StartCoroutine_DownloadAssetGroupWithLoadAsset(new List { asset }, callback, isProgress); + } + + public void StartCoroutine_LoadAssetGroupAsync(List assetList, Action callback, bool isProgress = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + } + else + { + StartCoroutine(LoadAssetGroupAsync(assetList, callback, isProgress)); + } + } + + public void StartCoroutine_LoadAssetGroupAsync(string asset, Action callback, bool isProgress = true) + { + StartCoroutine(LoadAssetGroupAsync(new List { asset }, callback, isProgress)); + } + + public void StartCoroutine_LoadAssetGroupSync(List assetList, Action callback, bool isProgress = true) + { + if (assetList == null || assetList.Count == 0) + { + callback?.Invoke(); + } + else + { + StartCoroutine(LoadAssetGroupSync(assetList, callback, isProgress)); + } + } + + public void StartCoroutine_LoadAssetGroupSync(string asset, Action callback, bool isProgress = true) + { + StartCoroutine(LoadAssetGroupSync(new List { asset }, callback, isProgress)); + } + + public void RemoveAssetGroup(List assetList) + { + for (int i = 0; i < assetList.Count; i++) + { + RemoveAsset(assetList[i]); + } + } + + public void RemoveAsset(string assetName) + { + Toolbox.AssetManager.UnloadAsset(assetName); + } + + public void RemoveAssetForceCommon() + { + Toolbox.AssetManager.UnloadCommonAssetAll(); + } + + public void RemoveAssetCommon(string assetName) + { + Toolbox.AssetManager.UnloadCommonAsset(assetName); + } + + public void RegistCommonAsset(List assetList) + { + for (int i = 0; i < assetList.Count; i++) + { + Toolbox.AssetManager.RegistCommonAsset(assetList[i]); + } + } + + public void RemoveAssetForceTemporary() + { + Toolbox.AssetManager.UnloadTemporaryAssetAll(); + } + + public void RemoveAssetTemporary(string assetName) + { + Toolbox.AssetManager.UnloadTemporaryAsset(assetName); + } + + public void RegistTemporaryAsset(string assetName) + { + Toolbox.AssetManager.RegistTemporaryAsset(assetName); + } + + public bool ExistsAssetBundleManifest(string assetName) + { + if (Toolbox.AssetManager.GetAssetHandle(assetName) != null) + { + return true; + } + return false; + } + + public bool CheckBeforeFileRequeset(string assetName) + { + return Toolbox.AssetManager.IsEnableAssetName(assetName); + } + + public bool IsLoadedAssetBundle(string assetName) + { + if (Toolbox.AssetManager == null) + { + return false; + } + if (Toolbox.AssetManager.GetAssetBundleObject(assetName) != null) + { + return true; + } + return false; + } + + public bool IsLoadedAssetBundleAndObjectArrayExist(string assetName) + { + if (IsLoadedAssetBundle(assetName)) + { + return Toolbox.AssetManager.GetAssetBundleObject(assetName).objectArray.Count > 0; + } + return false; + } + + public void UseAssetBundle(bool bEnabled) + { + useAssetBundle = bEnabled; + } + + public bool IsUseAssetBundle() + { + return useAssetBundle; + } + + public UnityEngine.Object LoadObject(string objectName, bool isServerResources = true, bool isIfFindLoad = false) + { + return LoadObject(objectName, isServerResources); + } + + public T LoadObject(string objectName, bool isServerResources = true, bool isIfFindLoad = false) where T : UnityEngine.Object + { + if (!isServerResources) + { + return Resources.Load(objectName); + } + AssetManager assetManager = Toolbox.AssetManager; + if (assetManager != null) + { + UnityEngine.Object obj = assetManager.LoadObject(objectName, typeof(T), isIfFindLoad); + if (obj != null) + { + return (T)obj; + } + } + return Resources.Load(objectName); + } + + public UnityEngine.Object LoadObject(string assetName, string objectName, bool isServerResources = true) + { + return LoadObject(assetName, objectName, isServerResources); + } + + public T LoadObject(string assetName, string objectName, bool isServerResources = true) where T : UnityEngine.Object + { + if (!isServerResources) + { + return Resources.Load(objectName); + } + AssetManager assetManager = Toolbox.AssetManager; + if (assetManager != null) + { + UnityEngine.Object obj = assetManager.LoadObject(assetName, objectName, typeof(T)); + if (obj != null) + { + return (T)obj; + } + } + return Resources.Load(objectName); + } + + private void SetDownloadProcessLock(bool enable_lock) + { + downloadSemaphore = enable_lock; + } + + private void SetLoadProcessLock(bool enable_lock) + { + loadSemaphore = enable_lock; + } + + public IEnumerator GameInitialize() + { + Toolbox.BootNetwork.SetupNetwork(); + while (!Toolbox.BootNetwork.IsDoneGameStartCheck) + { + yield return 0; + } + yield return StartCoroutine(Toolbox.AssetManager.InitializeManifest(null, !Data.Load.data._userTutorial.NeedAllResource)); + } + + public static int calcTextureSize(int x) + { + return (int)(TextureScaleRatio * (float)x); + } + + public static Vector2 calcTextureSize(Vector2 vec) + { + return vec * TextureScaleRatio; + } + + public static int calcAtlasValue(int x, float rate) + { + return (int)(rate * (float)x + 0.5f); + } + + public static void ResizeUISprite(UISprite _sprite) + { + _sprite.MakePixelPerfect(); + int w = calcTextureSize(_sprite.width); + int h = calcTextureSize(_sprite.height); + _sprite.SetDimensions(w, h); + } + + public static void ResizeUISpriteSliced(UISprite _sprite) + { + } + + public static void resizeUIAtlas(UIAtlas atlas, GameObject parentObject, Material material = null) + { + if (atlas == null || atlas.replacement != null || QualityManager.GetAssetQualityLevel() != QualityManager.AssetQualityLevel.Level_1) + { + return; + } + string text = atlas.name; + UIAtlas uIAtlas = UnityEngine.Object.Instantiate(atlas); + uIAtlas.transform.parent = parentObject.transform; + uIAtlas.name = text + "_half"; + atlas.replacement = uIAtlas; + if (material != null) + { + uIAtlas.spriteMaterial = material; + } + List spriteList = uIAtlas.spriteList; + if (spriteList != null) + { + for (int i = 0; i < spriteList.Count; i++) + { + UISpriteData uISpriteData = spriteList[i]; + int width = uISpriteData.width; + int height = uISpriteData.height; + uISpriteData.x = calcAtlasValue(uISpriteData.x, AtlasValueRatio); + uISpriteData.y = calcAtlasValue(uISpriteData.y, AtlasValueRatio); + uISpriteData.width = calcAtlasValue(uISpriteData.width, AtlasValueRatio); + uISpriteData.height = calcAtlasValue(uISpriteData.height, AtlasValueRatio); + uISpriteData.borderLeft = uISpriteData.width - calcAtlasValue(width - uISpriteData.borderLeft, AtlasValueRatio); + uISpriteData.borderRight = calcAtlasValue(uISpriteData.borderRight, AtlasValueRatio); + uISpriteData.borderTop = calcAtlasValue(uISpriteData.borderTop, AtlasValueRatio); + uISpriteData.borderBottom = uISpriteData.height - calcAtlasValue(height - uISpriteData.borderBottom, AtlasValueRatio); + uISpriteData.paddingLeft = calcAtlasValue(uISpriteData.paddingLeft, AtlasValueRatio); + uISpriteData.paddingRight = calcAtlasValue(uISpriteData.paddingRight, AtlasValueRatio); + uISpriteData.paddingTop = calcAtlasValue(uISpriteData.paddingTop, AtlasValueRatio); + uISpriteData.paddingBottom = calcAtlasValue(uISpriteData.paddingBottom, AtlasValueRatio); + } + } + } + + public void ClearLoadCount() + { + Toolbox.AssetManager.ResetDownloadCount(); + } + + public int GetDownLoadMax() + { + return Toolbox.AssetManager.GetDownloadMaxCount(); + } + + public int GetDownLoadCompleted() + { + return Toolbox.AssetManager.GetDownloadCurrentCount(); + } + + public float GetDownloadCompletedSize() + { + return Toolbox.AssetManager.GetDownloadCompletedSize(); + } + + public float GetDownloadMaxSize() + { + return Toolbox.AssetManager.GetDownloadSize(CustomPreference.IsNormalResource); + } + + public int GetLoadingMax() + { + return Toolbox.AssetManager.GetLoadingMaxCount(); + } + + public int GetLoadingCompleted() + { + return Toolbox.AssetManager.GetLoadingCurrentCount(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/SkipCuteCheckResultCodes.cs b/SVSim.BattleEngine/Engine/Cute/SkipCuteCheckResultCodes.cs new file mode 100644 index 0000000..3f70b2c --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/SkipCuteCheckResultCodes.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; + +namespace Cute; + +internal class SkipCuteCheckResultCodes +{ + private List resultCodes = new List(); + + private bool skipAll; + + public void setSkipAll(bool pSkipAll) + { + skipAll = pSkipAll; + } + + public bool isSkipAll() + { + return skipAll; + } + + public void Add(int resultCode) + { + resultCodes.Add(resultCode); + } + + public void Add(List pResultCodes) + { + resultCodes.AddRange(pResultCodes); + } + + public bool Contains(int resultCode) + { + return resultCodes.Contains(resultCode); + } + + public void Clear() + { + resultCodes.Clear(); + } +} diff --git a/SVSim.BattleEngine/Engine/Cute/Utility.cs b/SVSim.BattleEngine/Engine/Cute/Utility.cs new file mode 100644 index 0000000..d33ae52 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Cute/Utility.cs @@ -0,0 +1,731 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Security.Cryptography; +using System.Text; +using System.Text.RegularExpressions; +using UnityEngine; + +namespace Cute; + +public class Utility +{ + private enum CSVParserState + { + BEGIN_FIELD, + PLAIN, + QUOTE, + END_FIELD + } + + public class EzCrypt + { + private const string characters = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"; + + private int numScale; + + private int[] table; + + private int key; + + public EzCrypt(int key) + { + numScale = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-".Length; + this.key = key; + table = new int[128]; + for (int i = 0; i < 128; i++) + { + table[i] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-".IndexOf((char)i); + } + } + + public char[] Encode(char[] src) + { + int num = key; + for (int i = 0; i < src.Length; i++) + { + num = new System.Random(num + src[i]).Next(); + } + int num2 = num % (numScale - 1) + 1; + int num3 = num / (numScale - 1) % (numScale - 1) + 1; + int num4 = num2 * numScale + num3; + int num5 = src.Length + 2; + char[] array = new char[num5]; + array[0] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"[num2]; + array[num5 - 1] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"[num3]; + int num6 = num4; + for (int j = 0; j < src.Length; j++) + { + int num7 = table[(uint)src[j]]; + if (num7 < 0) + { + return null; + } + array[j + 1] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"[(num7 + num6) % numScale]; + num6 += num4 + array[j + 1]; + } + return array; + } + + public char[] Decode(char[] src) + { + int num = table[(uint)src[0]] * numScale + table[(uint)src[src.Length - 1]]; + int num2 = num; + char[] array = new char[src.Length - 2]; + for (int i = 0; i < src.Length - 2; i++) + { + int num3 = table[(uint)src[i + 1]]; + for (num3 = num3 + numScale - num2; num3 < 0; num3 += numScale) + { + } + array[i] = ".SWK2hm4sVd8fOxZr0tqBncwX6P5k3HTCL_IzGYeMlyQFEbNvDjio9J7paRUAg1u-"[num3 % numScale]; + num2 += num + src[i + 1]; + } + return array; + } + } + + public class LeanSemaphore + { + private int max; + + public int value { get; private set; } + + public LeanSemaphore(int maxAcquire) + { + max = maxAcquire; + Reset(); + } + + public bool TryWait() + { + if (value > 0) + { + value--; + return true; + } + return false; + } + + public void Post() + { + value++; + } + + public void Reset() + { + value = max; + } + + public void Reset(int maxAcquire) + { + max = maxAcquire; + Reset(); + } + } + + private static DateTime UNIX_EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, 0); + + private static readonly string LangTypeKorString = Global.LANG_TYPE.Kor.ToString(); + + private static string[,] ArraySymbolCode = new string[33, 2] + { + { " ", "\u3000" }, + { "", "!" }, + { "\"", "”" }, + { "#", "#" }, + { "$", "$" }, + { "%", "%" }, + { "&", "&" }, + { "'", "’" }, + { "(", "(" }, + { ")", ")" }, + { "*", "*" }, + { "+", "+" }, + { ",", "," }, + { "-", "-" }, + { ".", "." }, + { "/", "/" }, + { ":", ":" }, + { ";", ";" }, + { "<", "<" }, + { "=", "=" }, + { ">", ">" }, + { "?", "?" }, + { "@", "@" }, + { "[", "[" }, + { "\\", "■" }, + { "]", "]" }, + { "^", "\uff3e" }, + { "_", "\uff3f" }, + { "`", "’" }, + { "{", "{" }, + { "|", "|" }, + { "}", "}" }, + { "~", "~" } + }; + + public static long GetUnixTime(DateTime targetTime) + { + return GetUnixTimeMilliSeconds(targetTime) / 1000; + } + + public static long GetUnixTimeMilliSeconds(DateTime targetTime) + { + targetTime = targetTime.ToUniversalTime(); + return (long)(targetTime - UNIX_EPOCH).TotalMilliseconds; + } + + public static string LongToTimeSpanString(long unixTime) + { + TimeSpan timeSpan = TimeSpan.FromSeconds(unixTime); + if (timeSpan.Hours > 0) + { + return timeSpan.Hours + "時間" + timeSpan.Minutes.ToString("{0:D2}") + "分"; + } + if (timeSpan.Minutes > 0) + { + return timeSpan.Hours + "分" + timeSpan.Seconds.ToString("{0:D2}") + "秒"; + } + return timeSpan.Seconds + "秒"; + } + + public static ArrayList ConvertCSV(string csvText, bool removeTitle = true) + { + if (CustomPreference.GetTextLanguage() == LangTypeKorString) + { + HangulManager.ConvertRule(csvText); + } + int length = csvText.Length; + int i; + for (i = 0; Convert.ToInt32(csvText[i]) == 65279 && i < length; i++) + { + } + ArrayList arrayList = new ArrayList(); + ArrayList arrayList2 = new ArrayList(); + int num = i; + int num2 = i; + bool flag = removeTitle; + bool flag2 = false; + CSVParserState cSVParserState = CSVParserState.BEGIN_FIELD; + for (int j = i; j < length; j++) + { + switch (csvText[j]) + { + case ',': + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + arrayList2.Add(""); + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + { + string text = csvText.Substring(num, num2 + 1 - num); + arrayList2.Add(flag2 ? text.Replace("\"\"", "\"") : text); + flag2 = false; + cSVParserState = CSVParserState.BEGIN_FIELD; + break; + } + case CSVParserState.QUOTE: + num2 = j; + break; + } + break; + case '\t': + case ' ': + switch (cSVParserState) + { + case CSVParserState.QUOTE: + num2 = j; + break; + } + break; + case '\r': + if (j < length - 1 && csvText[j + 1] == '\n') + { + j++; + } + goto case '\n'; + case '\n': + switch (cSVParserState) + { + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + { + string text2 = csvText.Substring(num, num2 + 1 - num); + arrayList2.Add(flag2 ? text2.Replace("\"\"", "\"") : text2); + flag2 = false; + if (!flag) + { + arrayList2.TrimToSize(); + arrayList.Add(arrayList2); + } + else + { + flag = false; + } + arrayList2 = new ArrayList(arrayList2.Count); + cSVParserState = CSVParserState.BEGIN_FIELD; + break; + } + case CSVParserState.BEGIN_FIELD: + if (arrayList2.Count > 0) + { + arrayList2.Add(""); + if (!flag) + { + arrayList2.TrimToSize(); + arrayList.Add(arrayList2); + } + else + { + flag = false; + } + arrayList2 = new ArrayList(arrayList2.Count); + } + break; + case CSVParserState.QUOTE: + num2 = j; + break; + } + break; + case '"': + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + num = j + 1; + num2 = j; + cSVParserState = CSVParserState.QUOTE; + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + throw new ApplicationException("不正なCSV"); + case CSVParserState.QUOTE: + if (j < length - 1) + { + if (csvText[j + 1] == '"') + { + j++; + flag2 = true; + num2 = j; + } + else + { + cSVParserState = CSVParserState.END_FIELD; + } + } + else + { + cSVParserState = CSVParserState.END_FIELD; + } + break; + } + break; + default: + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + num = j; + num2 = j; + cSVParserState = CSVParserState.PLAIN; + break; + case CSVParserState.END_FIELD: + throw new ApplicationException("Could not parse CSV: extra character found outside quotation."); + case CSVParserState.PLAIN: + case CSVParserState.QUOTE: + num2 = j; + break; + } + break; + } + } + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + if (arrayList2.Count > 0 && !flag) + { + arrayList2.Add(""); + arrayList2.TrimToSize(); + arrayList.Add(arrayList2); + } + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + if (!flag) + { + arrayList2.Add(csvText.Substring(num, num2 + 1 - num)); + arrayList2.TrimToSize(); + arrayList.Add(arrayList2); + } + break; + case CSVParserState.QUOTE: + throw new ApplicationException("不正なCSV"); + } + return arrayList; + } + + public static List ConvertCSV_Array(string csvText, bool removeTitle = true) + { + if (CustomPreference.GetTextLanguage() == LangTypeKorString) + { + HangulManager.ConvertRule(csvText); + } + int length = csvText.Length; + int i; + for (i = 0; Convert.ToInt32(csvText[i]) == 65279 && i < length; i++) + { + } + int num = 1; + for (int j = i; j < length; j++) + { + switch (csvText[j]) + { + case ',': + num++; + continue; + default: + continue; + case '\n': + break; + } + break; + } + List list = new List(); + string[] array = new string[num]; + int num2 = 0; + int num3 = i; + int num4 = i; + bool flag = removeTitle; + bool flag2 = false; + CSVParserState cSVParserState = CSVParserState.BEGIN_FIELD; + for (int k = i; k < length; k++) + { + switch (csvText[k]) + { + case ',': + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + array[num2++] = ""; + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + { + string text = csvText.Substring(num3, num4 + 1 - num3); + array[num2++] = (flag2 ? text.Replace("\"\"", "\"") : text); + flag2 = false; + cSVParserState = CSVParserState.BEGIN_FIELD; + break; + } + case CSVParserState.QUOTE: + num4 = k; + break; + } + break; + case '\t': + case ' ': + switch (cSVParserState) + { + case CSVParserState.QUOTE: + num4 = k; + break; + } + break; + case '\r': + if (k < length - 1 && csvText[k + 1] == '\n') + { + k++; + } + goto case '\n'; + case '\n': + switch (cSVParserState) + { + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + { + string text2 = csvText.Substring(num3, num4 + 1 - num3); + array[num2++] = (flag2 ? text2.Replace("\"\"", "\"") : text2); + flag2 = false; + if (!flag) + { + list.Add(array); + } + else + { + flag = false; + } + array = new string[num]; + num2 = 0; + cSVParserState = CSVParserState.BEGIN_FIELD; + break; + } + case CSVParserState.BEGIN_FIELD: + if (num2 > 0) + { + array[num2++] = ""; + if (!flag) + { + list.Add(array); + } + else + { + flag = false; + } + array = new string[num]; + num2 = 0; + } + break; + case CSVParserState.QUOTE: + num4 = k; + break; + } + break; + case '"': + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + num3 = k + 1; + num4 = k; + cSVParserState = CSVParserState.QUOTE; + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + throw new ApplicationException("不正なCSV"); + case CSVParserState.QUOTE: + if (k < length - 1) + { + if (csvText[k + 1] == '"') + { + k++; + flag2 = true; + num4 = k; + } + else + { + cSVParserState = CSVParserState.END_FIELD; + } + } + else + { + cSVParserState = CSVParserState.END_FIELD; + } + break; + } + break; + default: + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + num3 = k; + num4 = k; + cSVParserState = CSVParserState.PLAIN; + break; + case CSVParserState.END_FIELD: + throw new ApplicationException("Could not parse CSV: extra character found outside quotation."); + case CSVParserState.PLAIN: + case CSVParserState.QUOTE: + num4 = k; + break; + } + break; + } + } + switch (cSVParserState) + { + case CSVParserState.BEGIN_FIELD: + if (num2 > 0 && !flag) + { + array[num2] = ""; + list.Add(array); + } + break; + case CSVParserState.PLAIN: + case CSVParserState.END_FIELD: + if (!flag) + { + array[num2] = csvText.Substring(num3, num4 + 1 - num3); + list.Add(array); + } + break; + case CSVParserState.QUOTE: + throw new ApplicationException("不正なCSV"); + } + return list; + } + + public static int CountString(string strInput, string strFind) + { + int num = 0; + for (int num2 = strInput.IndexOf(strFind); num2 > -1; num2 = strInput.IndexOf(strFind, num2 + 1)) + { + num++; + } + return num; + } + + public static StringBuilder CreateHash(byte[] data) + { + MD5CryptoServiceProvider mD5CryptoServiceProvider = new MD5CryptoServiceProvider(); + byte[] array = mD5CryptoServiceProvider.ComputeHash(data); + mD5CryptoServiceProvider.Clear(); + StringBuilder stringBuilder = new StringBuilder(); + byte[] array2 = array; + foreach (byte b in array2) + { + stringBuilder.Append(b.ToString("x2")); + } + return stringBuilder; + } + + public static StringBuilder CreateHash(string data) + { + return CreateHash(Encoding.UTF8.GetBytes(data)); + } + + public static string GetRegionString() + { + return "JP"; + } + + public static void LogString(string message) + { + string text = ""; + foreach (char c in message) + { + text += $"{(int)c:X2} "; + } + } + + public static string GetRuntimePlatform() + { + string result = "Windows"; + if (Application.platform == RuntimePlatform.Android) + { + result = "Android"; + } + else if (Application.platform == RuntimePlatform.IPhonePlayer) + { + result = "iOS"; + } + else if (Application.platform == RuntimePlatform.OSXPlayer || Application.platform == RuntimePlatform.OSXEditor) + { + result = "Mac"; + } + return result; + } + + public static string ConvertInputText(string srcText) + { + srcText = StripColorTag(srcText); + StringInfo stringInfo = new StringInfo(srcText); + string text = ""; + int lengthInTextElements = stringInfo.LengthInTextElements; + for (int i = 0; i < lengthInTextElements; i++) + { + string text2 = stringInfo.SubstringByTextElements(i, 1); + if (IsEnableCharSet2(text2)) + { + text2 = ConvertSymbolCode(text2); + text += text2; + } + else + { + text += "■"; + } + } + return text; + } + + private static string ConvertSymbolCode(string srcText) + { + for (int i = 0; i < ArraySymbolCode.GetLength(0); i++) + { + if (srcText.Equals(ArraySymbolCode[i, 0])) + { + srcText = ArraySymbolCode[i, 1]; + break; + } + } + return srcText; + } + + private static string StripColorTag(string srcText) + { + return new Regex("[[][a-zA-Z0-9]{6}[]]").Replace(srcText, ""); + } + + private static bool IsEnableCharSet2(string checkChar) + { + byte[] bytes = Encoding.GetEncoding("UTF-8").GetBytes(checkChar); + if (bytes.Length == 1) + { + int num = bytes[0]; + if (num >= 32 && num <= 126) + { + return true; + } + } + if ("\u3000、。,.・:;?!\u309b\u309c\u00b4\uff40\u00a8\uff3e\uffe3\uff3fヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈〉《》「」『』【】+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓∈∋⊆⊇⊂⊃∪∩∧∨¬⇒⇔∀∃∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬ʼn♯♭♪†‡¶◯\t0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω\tАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя".IndexOf(checkChar) >= 0) + { + return true; + } + if ("亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕".IndexOf(checkChar) >= 0) + { + return true; + } + if ("弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙".IndexOf(checkChar) >= 0) + { + return true; + } + if (new Regex("[\\uFF61-\\uFF9F]").IsMatch(checkChar)) + { + return true; + } + return false; + } + + private static bool IsEnableCharSet(string checkChar) + { + if (GetRegionString().Contains("JP")) + { + byte[] array = ToShiftJisByte(checkChar); + switch (array.Length) + { + case 1: + if (Encoding.GetEncoding("UTF-8").GetBytes(checkChar).Length != 1) + { + return false; + } + return true; + case 2: + { + int num = 256 * array[0] + array[1]; + if ((num >= 33088 && num <= 34716) || (num >= 34975 && num <= 39055) || (num >= 39056 && num <= 40959) || (num >= 57408 && num <= 60159)) + { + return true; + } + break; + } + } + } + return false; + } + + private static byte[] ToShiftJisByte(string str) + { + Encoding encoding = Encoding.GetEncoding("UTF-8"); + Encoding encoding2 = Encoding.GetEncoding("shift_jis"); + byte[] bytes = encoding.GetBytes(str); + try + { + return Encoding.Convert(encoding, encoding2, bytes); + } + catch (Exception ex) + { + Debug.LogError(ex.Message + " text = " + str); + return bytes; + } + } +} diff --git a/SVSim.BattleEngine/Engine/DamageCardParameterModifier.cs b/SVSim.BattleEngine/Engine/DamageCardParameterModifier.cs new file mode 100644 index 0000000..8cb5027 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageCardParameterModifier.cs @@ -0,0 +1,23 @@ +public class DamageCardParameterModifier : TurnAndIntValue, ICardLifeModifier +{ + public int Damage => base.Value; + + public bool IsClearBeforeModifier => false; + + public bool IsChangeMaxLife => false; + + public DamageCardParameterModifier(int damage, int turn, bool isSelfTurn) + : base(damage, turn, isSelfTurn) + { + } + + public int CalcLife(int baseLife) + { + return baseLife - Damage; + } + + public int CalcMaxLife(int baseMaxLife) + { + return baseMaxLife; + } +} diff --git a/SVSim.BattleEngine/Engine/DamageClippingInfo.cs b/SVSim.BattleEngine/Engine/DamageClippingInfo.cs new file mode 100644 index 0000000..52b956e --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageClippingInfo.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +public class DamageClippingInfo +{ + private ISkillParameterSelectFilter _maxFilter; + + private ISkillParameterSelectFilter _minFilter; + + private int _clippingMaxRange = -1; + + private int _clippingMinRange = -1; + + public int ClippingMax { get; private set; } + + public int LifeLowerLimit { get; private set; } = -1; + + public int ClippingRangeMax(List cards) + { + if (_maxFilter != null) + { + return _maxFilter.Filtering(cards).FirstOrDefault(); + } + return _clippingMaxRange; + } + + public int ClippingRangeMin(List cards) + { + if (_minFilter != null) + { + return _minFilter.Filtering(cards).FirstOrDefault(); + } + return _clippingMaxRange; + } + + public bool IsClipping(BattleCardBase card, int value) + { + bool flag = _maxFilter != null || _clippingMaxRange != -1; + bool flag2 = _minFilter != null || _clippingMinRange != -1; + if (!flag && !flag2) + { + return true; + } + List cards = new List { card }; + if (!flag || value <= ClippingRangeMax(cards)) + { + if (flag2) + { + return ClippingRangeMin(cards) <= value; + } + return true; + } + return false; + } + + public DamageClippingInfo(int clippingMax, string maxRange, string minRange, int lifeLowerLimit) + { + ClippingMax = clippingMax; + LifeLowerLimit = lifeLowerLimit; + if (maxRange == null) + { + goto IL_0054; + } + if (!(maxRange == "self_life")) + { + if (maxRange == null || maxRange.Length != 0) + { + goto IL_0054; + } + } + else + { + _maxFilter = new SkillParameterSelectLifeFilter(); + } + goto IL_0060; + IL_0060: + if (minRange != null) + { + if (minRange == "self_life") + { + _minFilter = new SkillParameterSelectLifeFilter(); + return; + } + if (minRange != null && minRange.Length == 0) + { + return; + } + } + _clippingMinRange = int.Parse(minRange); + return; + IL_0054: + _clippingMaxRange = int.Parse(maxRange); + goto IL_0060; + } + + public bool CheckMaxFilter(Type filterType) + { + if (_maxFilter != null) + { + return filterType == _maxFilter.GetType(); + } + return false; + } +} diff --git a/SVSim.BattleEngine/Engine/DamageCutInfo.cs b/SVSim.BattleEngine/Engine/DamageCutInfo.cs new file mode 100644 index 0000000..4bfe328 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageCutInfo.cs @@ -0,0 +1,24 @@ +public class DamageCutInfo +{ + public enum DamageType + { + ALL, + SKILL + } + + public int CutAmount { get; private set; } + + public DamageType Type { get; private set; } + + public BattleCardBase OwnerCard { get; private set; } + + public string DuplicateBanSkillNum { get; private set; } + + public DamageCutInfo(int amount, DamageType type, BattleCardBase ownerCard, string _duplicateBanSkillNum) + { + CutAmount = amount; + Type = type; + OwnerCard = ownerCard; + DuplicateBanSkillNum = _duplicateBanSkillNum; + } +} diff --git a/SVSim.BattleEngine/Engine/DamageInfo.cs b/SVSim.BattleEngine/Engine/DamageInfo.cs new file mode 100644 index 0000000..8829b5c --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageInfo.cs @@ -0,0 +1,44 @@ +public class DamageInfo +{ + public const string DAMAGE_BATTLE = "battle"; + + public const string DAMAGE_UNIT = "unit"; + + public const string DAMAGE_SPELL = "spell"; + + public const string DAMAGE_FIELD = "field"; + + public SkillBase Skill { get; private set; } + + public int Damage { get; private set; } + + public string DamageKind + { + get + { + if (Skill == null) + { + return "battle"; + } + if (Skill.SkillPrm.ownerCard.IsUnit) + { + return "unit"; + } + if (Skill.SkillPrm.ownerCard.IsSpell) + { + return "spell"; + } + if (Skill.SkillPrm.ownerCard.IsField) + { + return "field"; + } + return ""; + } + } + + public DamageInfo(SkillBase skill, int damage) + { + Skill = skill; + Damage = damage; + } +} diff --git a/SVSim.BattleEngine/Engine/DamageModifier.cs b/SVSim.BattleEngine/Engine/DamageModifier.cs new file mode 100644 index 0000000..6cdc8d4 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DamageModifier.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; + +public class DamageModifier +{ + public List DamageType { get; protected set; } + + public List DamageClan { get; protected set; } + + public bool IsUseClass { get; protected set; } + + public int OrderCount { get; protected set; } + + public virtual int Calc(int damage) + { + return 0; + } + + public bool IsEffective(string damageType, CardBasePrm.ClanType damageClan, bool isUseClass) + { + if (isUseClass != IsUseClass) + { + return false; + } + if (IsUseClass) + { + if (DamageType.Contains(damageType) || DamageType.Contains("_OPT_NULL_")) + { + if (!DamageClan.Contains(damageClan)) + { + return DamageClan.Contains(CardBasePrm.ClanType.NONE); + } + return true; + } + return false; + } + return true; + } +} diff --git a/SVSim.BattleEngine/Engine/DataMgr.cs b/SVSim.BattleEngine/Engine/DataMgr.cs new file mode 100644 index 0000000..4562aab --- /dev/null +++ b/SVSim.BattleEngine/Engine/DataMgr.cs @@ -0,0 +1,1381 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cute; +using LitJson; +using Wizard; +using Wizard.AutoTest; +using Wizard.Battle.Recovery; + +public class DataMgr +{ + public enum SpecialBattleResultType + { + None, + Belphomet, + Nerva + } + + public class SpecialBattleSetting + { + public string Id { get; private set; } + + public bool? IsPlayerFirstTurn { get; private set; } + + public string PlayerAttachSkillText { get; private set; } + + public string[] PlayerAttachSkills { get; private set; } + + public string EnemyAttachSkillText { get; private set; } + + public string[] EnemyAttachSkills { get; private set; } + + public int PlayerStartPp { get; private set; } + + public int EnemyStartPp { get; private set; } + + public int PlayerStartLife { get; set; } + + public int PlayerStartMaxLife { get; private set; } + + public int EnemyStartMaxLife { get; private set; } + + public string IdOverrideInBattleLogText { get; private set; } + + public Dictionary IdOverridePairDict { get; private set; } + + public string BanishEffectOverRideText { get; private set; } + + public string[] BanishEffectOverRideIds { get; private set; } + + public string TokenDrawEffectOverrideText { get; private set; } + + public Dictionary TokenDrawOverrideEffectPair { get; private set; } + + public string SpecialTokenDrawEffectOverrideText { get; private set; } + + public Dictionary SpecialTokenDrawOverrideEffectPair { get; private set; } + + public bool IsVsEffectOverride { get; private set; } + + public int ClassDestroyEffectOverride { get; private set; } + + public SpecialBattleSetting(string id, bool? isPlayerFirst, string playerSkill, string enemySkill, int playerPp, int enemyPp, int playerLife, int playerMaxLife, int enemyMaxLife, string idOverrideBattleLogText, string banishEffectOverride, string tokenDrawEffectOverride, string specialTokenDrawEffectOverride, bool isVsEffectOverride, int classDestroyEffectOverride) + { + Id = id; + IsPlayerFirstTurn = isPlayerFirst; + PlayerAttachSkillText = playerSkill; + PlayerAttachSkills = SplitSpecialBattleDataText(PlayerAttachSkillText); + EnemyAttachSkillText = enemySkill; + EnemyAttachSkills = SplitSpecialBattleDataText(EnemyAttachSkillText); + PlayerStartPp = playerPp; + EnemyStartPp = enemyPp; + PlayerStartLife = playerLife; + PlayerStartMaxLife = playerMaxLife; + EnemyStartMaxLife = enemyMaxLife; + IdOverrideInBattleLogText = idOverrideBattleLogText; + IdOverridePairDict = ParseIdOverrideText(IdOverrideInBattleLogText); + BanishEffectOverRideText = banishEffectOverride; + BanishEffectOverRideIds = SplitSpecialBattleDataText(BanishEffectOverRideText); + TokenDrawEffectOverrideText = tokenDrawEffectOverride; + TokenDrawOverrideEffectPair = SplitSpecialBattleDataPair(TokenDrawEffectOverrideText); + SpecialTokenDrawEffectOverrideText = specialTokenDrawEffectOverride; + SpecialTokenDrawOverrideEffectPair = SplitSpecialBattleDataPair(SpecialTokenDrawEffectOverrideText); + IsVsEffectOverride = isVsEffectOverride; + ClassDestroyEffectOverride = classDestroyEffectOverride; + } + } + + public enum BattleType + { + FreeBattle = 0, + RankBattle = 1, + TwoPick = 2, + RoomBattle = 3, + Story = 4, + Practice = 5, + RoomTwoPick = 6, + TwoPickBackdraft = 7, + ColosseumNormal = 8, + ColosseumTwoPick = 9, + ColosseumHof = 31, + Sealed = 32, + ColosseumWindFall = 33, + Gathering = 34, + Quest = 37, + OfflineEvent = 40, + CompetitionNormal = 42, + BossRushQuest = 45, + SecretBossQuest = 46, + CompetitionTwoPick = 47, + Avatar = 48, + ColosseumAvatar = 49, + None = 100 + } + + private int _selectDeckId; + + private Format _selectDeckFormat; + + private IList _currentDeckCardIdList; + + private int _deckMaxCardCount; + + private int _enemyDeckMaxCardCount; + + private IList _currentEnemyDeckData; + + private int _playerCharaId; + + private int _playerSubClassId; + + private long _playerSleeveId; + + private string _playerEmotionId = ""; + + private int _enemyCharaId; + + private int _enemySubClassId; + + private long _enemySleeveId; + + private string _enemyEmotionId = ""; + + public AIDataLibrary m_AIDataLibrary; + + private int _soroPlay3DFieldId = 1; + + private string _storyBgmId = "NONE"; + + public int m_EnemyAIDifficulty; + + public int m_EnemyAILogicLevel; + + public int m_EnemyAIDeckId; + + public int m_EnemyAIStyleId; + + public int m_EnemyAIEmoteId; + + public int m_EnemyAIMaxLife; + + public bool m_EnemyAIUseInnerEmote = true; + + private IDictionary _possessionCardDict; + + private IDictionary _possessionCardDictIncludingSpotCard; + + private IDictionary _isNewCardDict = new Dictionary(); + + private int[] _maintenanceCardIds; + + private IDictionary _classPrmDict; + + private bool _isDirtyPossessionCardDict; + + public const int PRACTICE_DIFFICULTY_DEGREE_EASY = 400001; + + public BattleType m_BattleType = BattleType.None; + + public TwoPickFormat TwoPickFormat; + + public string BattleId = ""; + + private static string[] ClanNameTextIdList = new string[9] { "Common_0104", "Common_0105", "Common_0106", "Common_0107", "Common_0108", "Common_0109", "Common_0110", "Common_0111", "Common_0112" }; + + public static readonly string[] TribeNameTextIdList = new string[18] + { + "TN_ALL", "TN_指揮官", "TN_兵士", "TN_土の印", "TN_マナリア", "TN_アーティファクト", "TN_財宝", "TN_機械", "TN_料理", "TN_レヴィオン", + "TN_自然", "TN_宴楽", "TN_ヒーロー", "TN_武装", "TN_チェス", "TN_八獄", "TN_学園", "" + }; + + public DeckAttributeType LastSelectDeckAttributeType { private get; set; } + + public int PracticeDifficultyDegreeId { get; set; } + + public int Practice3DfieldId { get; set; } + + public DeckData _roomTwoPickDeckData { get; set; } + + public List FavoriteCardList { get; private set; } + + public DeckGroupListData CurrentDeckListParamData { get; set; } + + public SpecialBattleSetting SpecialBattleSettingInfo { get; set; } + + public BattleManagerBase.MissionNecessaryInformation MissionNecessaryInformation { get; set; } = new BattleManagerBase.MissionNecessaryInformation(new Dictionary()); + + private MyRotationInfo _playerMyRotationInfo { get; set; } + + private MyRotationInfo _enemyMyRotationInfo { get; set; } + + private AvatarBattleInfo _playerAvatarBattleInfo { get; set; } + + private AvatarBattleInfo _enemyAvatarBattleInfo { get; set; } + + public QuestBattleData QuestBattleData { get; private set; } + + public BossRushBattleData BossRushBattleData { get; private set; } + + public int PracticePuzzleGroupId { get; set; } + + public int PuzzleQuestId { get; set; } + + public int PuzzleDifficulty { get; set; } + + public int PuzzleEnemyClass { get; set; } + + public QuestSelectionPage.FirstSelectType QuestFirstSelectType { get; set; } + + public int StoryEnemyClassId { get; set; } + + public JsonData RecoveryData { get; private set; } + + public SpecialBattleResultType SkipStorySpecialBattleResult { get; private set; } + + public SpotCardData SpotCardData { get; set; } + + public string TitleId { get; set; } = "0"; + + public bool IsLastSelectDeckAttributeType(DeckAttributeType deckAttributeType) + { + return deckAttributeType == LastSelectDeckAttributeType; + } + + public void SetMissionNecessaryInformation(JsonData data) + { + Dictionary dictionary = new Dictionary(); + if (data.Count > 0) + { + foreach (string key in data.Keys) + { + dictionary.Add(key, data.ToStringOrDefault(key, string.Empty)); + } + } + MissionNecessaryInformation = new BattleManagerBase.MissionNecessaryInformation(dictionary); + } + + public void SetQuestBattleData(QuestBattleData battleData) + { + QuestBattleData = battleData; + } + + public void SetBossRushBattleData(BossRushBattleData battleData) + { + BossRushBattleData = battleData; + } + + public void SetRecoveryData(JsonData recoveryData) + { + RecoveryData = recoveryData; + } + + public void CacheSingleRecovryData() + { + if (RecoveryRecordManagerBase.IsExistsSingleRecoveryFile()) + { + RecoveryData = RecoveryOperationInfo.ReadRecoveryFile(OperationRecorderBase.RecordDirectoryPath + "recovery_single.json"); + } + } + + public static bool IsNetworkBattleType(BattleType battleType) + { + switch (battleType) + { + case BattleType.FreeBattle: + case BattleType.RankBattle: + case BattleType.TwoPick: + case BattleType.RoomBattle: + case BattleType.RoomTwoPick: + case BattleType.TwoPickBackdraft: + case BattleType.ColosseumNormal: + case BattleType.ColosseumTwoPick: + case BattleType.ColosseumHof: + case BattleType.Sealed: + case BattleType.ColosseumWindFall: + case BattleType.Gathering: + case BattleType.CompetitionNormal: + case BattleType.CompetitionTwoPick: + return true; + default: + return false; + } + } + + public bool IsColosseumBattleType() + { + BattleType battleType = m_BattleType; + if ((uint)(battleType - 8) <= 1u || battleType == BattleType.ColosseumHof || battleType == BattleType.ColosseumWindFall) + { + return true; + } + return false; + } + + public bool IsCompetitionBattleType() + { + BattleType battleType = m_BattleType; + if (battleType == BattleType.CompetitionNormal || battleType == BattleType.CompetitionTwoPick) + { + return true; + } + return false; + } + + public static bool IsTwoPickBattleType(BattleType battleType) + { + switch (battleType) + { + case BattleType.TwoPick: + case BattleType.RoomTwoPick: + case BattleType.TwoPickBackdraft: + case BattleType.ColosseumTwoPick: + case BattleType.CompetitionTwoPick: + return true; + default: + return false; + } + } + + public static bool IsEnableFormatIconBattleType(BattleType battleType) + { + switch (battleType) + { + case BattleType.FreeBattle: + case BattleType.RankBattle: + case BattleType.RoomBattle: + case BattleType.ColosseumNormal: + case BattleType.CompetitionNormal: + return true; + default: + return false; + } + } + + public bool IsDipslayHighRankFormat() + { + switch (m_BattleType) + { + case BattleType.TwoPick: + case BattleType.Story: + case BattleType.Practice: + case BattleType.RoomTwoPick: + case BattleType.TwoPickBackdraft: + case BattleType.ColosseumTwoPick: + case BattleType.ColosseumHof: + case BattleType.Sealed: + case BattleType.ColosseumWindFall: + case BattleType.Quest: + case BattleType.BossRushQuest: + case BattleType.SecretBossQuest: + case BattleType.CompetitionTwoPick: + case BattleType.Avatar: + return true; + default: + if (Data.CurrentFormat != Format.Max && Data.CurrentFormat != Format.Windfall && Data.CurrentFormat != Format.MyRotation) + { + return Data.CurrentFormat == Format.Avatar; + } + return true; + } + } + + public bool IsTwoPickBattleType() + { + return IsTwoPickBattleType(m_BattleType); + } + + public bool IsQuestBattleType() + { + return IsQuestBattleType(m_BattleType); + } + + public static bool IsQuestBattleType(BattleType battleType) + { + if (battleType == BattleType.Quest || (uint)(battleType - 45) <= 1u) + { + return true; + } + return false; + } + + public bool IsFormatEnableBattleType() + { + switch (m_BattleType) + { + case BattleType.TwoPick: + case BattleType.Story: + case BattleType.Practice: + case BattleType.ColosseumTwoPick: + case BattleType.ColosseumHof: + case BattleType.Sealed: + case BattleType.ColosseumWindFall: + case BattleType.Quest: + case BattleType.BossRushQuest: + case BattleType.SecretBossQuest: + return false; + default: + if (Data.CurrentFormat == Format.Avatar) + { + return false; + } + if (IsTwoPickBattleType() || Data.CurrentFormat == Format.Max || Data.CurrentFormat == Format.PreRotation || Data.CurrentFormat == Format.Windfall || Data.CurrentFormat == Format.MyRotation || Data.CurrentFormat == Format.TwoPick) + { + return false; + } + return true; + } + } + + public bool IsRoomBattleType() + { + BattleType battleType = m_BattleType; + if (battleType == BattleType.RoomBattle || (uint)(battleType - 6) <= 1u) + { + return true; + } + return false; + } + + public static bool IsSingleBattleType(BattleType battleType) + { + if ((uint)(battleType - 4) <= 1u || battleType == BattleType.Quest || (uint)(battleType - 45) <= 1u) + { + return true; + } + return false; + } + + public DataMgr() + { + _possessionCardDict = new Dictionary(); + _possessionCardDictIncludingSpotCard = new Dictionary(); + _maintenanceCardIds = null; + m_AIDataLibrary = new AIDataLibrary(); + FavoriteCardList = new List(); + PracticeDifficultyDegreeId = 400001; + } + + public void PrintAIDataLibraryOnlyDebug() + { + } + + public void Load() + { + LoadClassData(); + } + + public void LoadEnemy() + { + LoadEnemyClassData(); + } + + public void LoadClassData() + { + if (_playerCharaId == 0) + { + SetPlayerCharaId(1); + } + SetPlayerSleeveId(_playerSleeveId); + } + + public void ResetEnemyData() + { + _currentEnemyDeckData = null; + } + + public void LoadEnemyClassData() + { + if (_enemyCharaId == 0) + { + SetEnemyCharaId(1); + } + SetEnemySleeveId(_enemySleeveId); + } + + public void RegisterAICommonData() + { + for (int i = 0; i < Data.Master.AIBasicDataList.Set.Count; i++) + { + AICardDataAsset asset = Data.Master.AIBasicDataList.Set[i]; + m_AIDataLibrary.RegisterBasicData(asset); + } + for (int j = 0; j < Data.Master.AICommonDataList.Set.Count; j++) + { + AICardDataAsset asset2 = Data.Master.AICommonDataList.Set[j]; + m_AIDataLibrary.RegisterCommonData(asset2); + } + for (int k = 0; k < Data.Master.AIAllyCommonDataList.Set.Count; k++) + { + AICardDataAsset asset3 = Data.Master.AIAllyCommonDataList.Set[k]; + m_AIDataLibrary.RegisterAllyCommonData(asset3); + } + m_AIDataLibrary.RegisterCommonStyle(Data.Master.AIStyleCommonDataList); + } + + public void RegisterAIDeckData() + { + if (Data.Master.AIDeckDic == null) + { + return; + } + foreach (KeyValuePair item in Data.Master.AIDeckDic) + { + m_AIDataLibrary.RegisterDeckToDeckDic(item.Key, item.Value.Set); + } + } + + public void RegisterAIStyleData() + { + foreach (KeyValuePair> item in Data.Master.AIStyleDic) + { + m_AIDataLibrary.RegisterDeckStyle(item.Key, item.Value); + } + } + + public void RegisterAIEmoteData() + { + foreach (KeyValuePair> item in Data.Master.AIEmoteDic) + { + AIEmoteSet aIEmoteSet = new AIEmoteSet(); + aIEmoteSet.CreateFromAsset(item.Value); + m_AIDataLibrary.RegisterEmoteSet(item.Key, aIEmoteSet); + } + } + + public void RegisterAllAIData() + { + m_AIDataLibrary.Clear(); + RegisterAICommonData(); + RegisterAIDeckData(); + RegisterAIStyleData(); + RegisterAIEmoteData(); + } + + public void SetPlayerCharaId(int charaId) + { + _playerCharaId = charaId; + SetPlayerSubClassID(10); + SetPlayerMyRotationInfo(""); + } + + public void SetPlayerSubClassID(int subClassId) + { + _playerSubClassId = subClassId; + } + + public void SetPlayerMyRotationInfo(string myRotationId) + { + _playerMyRotationInfo = Data.MyRotationAllInfo.Get(myRotationId); + } + + public void SetPlayerAvatarBattleInfo(string id) + { + _playerAvatarBattleInfo = Data.AvatarBattleAllInfo.Get(id); + } + + public void SetPlayerCharaIdByClassId(int classId, bool isCurrentChara = true) + { + SetPlayerCharaId(GetCharaPrmByClassId(classId, isCurrentChara).chara_id); + } + + public void SetPlayerCharaIdBySkinId(int skinId) + { + SetPlayerCharaId(GetCharaPrmBySkinId(skinId).chara_id); + } + + public void SetPlayerSleeveId(long sleeveId) + { + _playerSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(GetAbleSleeveId(sleeveId)); + } + + public void SetEnemyCharaId(int charaId) + { + _enemyCharaId = charaId; + SetEnemySubClassID(10); + SetEnemyMyRotationInfo(""); + } + + public void SetEnemySubClassID(int classId) + { + _enemySubClassId = classId; + } + + public void SetEnemyMyRotationInfo(string myRotationId) + { + _enemyMyRotationInfo = Data.MyRotationAllInfo.Get(myRotationId); + } + + public void SetEnemyAvatarBattleInfo(string id) + { + _enemyAvatarBattleInfo = Data.AvatarBattleAllInfo.Get(id); + } + + public void ClearEnemyAvatarBattleInfo() + { + _enemyAvatarBattleInfo = null; + } + + public void SetEnemySleeveId(long sleeveId) + { + _enemySleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(GetAbleSleeveId(sleeveId)); + } + + public bool GetSelectDefDeck() + { + if (_selectDeckId == 0) + { + return PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.LAST_BATTLE_IS_DEFDECK); + } + return IsLastSelectDeckAttributeType(DeckAttributeType.DefaultDeck); + } + + public void SetSelectDeckId(int id) + { + _selectDeckId = id; + } + + public void SetSelectDeckFormat(Format format) + { + _selectDeckFormat = format; + } + + public Format GetSelectDeckFormat() + { + return _selectDeckFormat; + } + + public void SetCurrentDeckData(IList deckdata) + { + _currentDeckCardIdList = deckdata; + } + + public void SetCurrentEnemyDeckData(IList deckdata) + { + _currentEnemyDeckData = deckdata; + } + + public void SetDeckMaxCount(int count, bool isSelf) + { + if (count != -1 && count != 0) + { + if (isSelf) + { + _deckMaxCardCount = count; + } + else + { + _enemyDeckMaxCardCount = count; + } + } + } + + public void SetStoryAILogicAndDeckData(int classId, int enemyAiId) + { + StoryAISettingData settingData = Data.Master.StoryAISettingList.GetSettingData(enemyAiId); + SetCurrentEnemyDeckDataFromAIDeck(classId, -1, settingData.LogicLevel, 20, settingData.DeckId, settingData.StyleId, settingData.EmoteId, settingData.UseInnerEmote, enemyAiId); + } + + public void SetQuestAILogicAndDeckData(int classId, int enemyAiId) + { + StoryAISettingData settingData = Data.Master.QuestAISettingList.GetSettingData(enemyAiId); + SetCurrentEnemyDeckDataFromAIDeck(classId, -1, settingData.LogicLevel, 20, settingData.DeckId, settingData.StyleId, settingData.EmoteId, settingData.UseInnerEmote, enemyAiId); + } + + public void SetRankMatchAILogicAndDeckData(int enemyAiId) + { + RankMatchAISettingData settingData = Data.Master.RankMatchAISettingList.GetSettingData(enemyAiId); + SetCurrentEnemyDeckDataFromAIDeck(settingData.ClassId, -1, 2, 20, settingData.DeckId, settingData.StyleId, -1, useInnerEmote: false, enemyAiId); + } + + public void SetCurrentEnemyDeckDataFromAIDeck(int classID, int difficulty, int logicLevel, int maxLife, int deckId, int styleId, int emoteId, bool useInnerEmote, int enemyAiID = -1, List specialAbilityIdList = null) + { + if (classID == 0) + { + classID = 8; + } + m_EnemyAIDifficulty = difficulty; + m_EnemyAIDeckId = deckId; + m_EnemyAIStyleId = styleId; + m_EnemyAIEmoteId = emoteId; + m_EnemyAILogicLevel = logicLevel; + m_EnemyAIMaxLife = maxLife; + m_EnemyAIUseInnerEmote = useInnerEmote; + AITestGlobal.AI_MAX_LIFE = maxLife; + AI_LOGIC_LV logicLv = AI_LOGIC_LV.STRONG; + switch (logicLevel) + { + case 0: + logicLv = AI_LOGIC_LV.WEAK; + break; + case 1: + logicLv = AI_LOGIC_LV.MIDDLE; + break; + case 2: + logicLv = AI_LOGIC_LV.STRONG; + break; + } + string text = "ai/" + Data.Master.AIDeckFileNameList.GetFileName(deckId); + string styleName = "ai/" + Data.Master.AIStyleFileNameList.GetFileName(styleId); + string emoteName = "ai/" + Data.Master.AIEmoteFileNameList.GetFileName(emoteId); + m_AIDataLibrary.SaveBattleSetUpInfo(classID, logicLv, text, styleName, emoteName, useEmote: true, useInnerEmote, enemyAiID, specialAbilityIdList); + SetCurrentEnemyDeckDataFromAIDeck(text); + } + + public void SetEnemyAIDeckFromCustomDeck(int classId, IList deck, int difficulty = 2, int logicLevel = 2, int maxLife = 20, int styleId = 0, int emoteId = 0, bool useInnerEmote = true, int enemyAiID = -1) + { + m_EnemyAIDifficulty = difficulty; + m_EnemyAIDeckId = int.MinValue; + m_EnemyAIStyleId = styleId; + m_EnemyAIEmoteId = emoteId; + m_EnemyAILogicLevel = logicLevel; + m_EnemyAIMaxLife = maxLife; + m_EnemyAIUseInnerEmote = useInnerEmote; + AITestGlobal.AI_MAX_LIFE = m_EnemyAIMaxLife; + AI_LOGIC_LV logicLv = AI_LOGIC_LV.STRONG; + switch (logicLevel) + { + case 0: + logicLv = AI_LOGIC_LV.WEAK; + break; + case 1: + logicLv = AI_LOGIC_LV.MIDDLE; + break; + case 2: + logicLv = AI_LOGIC_LV.STRONG; + break; + } + string styleName = "ai/" + Data.Master.AIStyleFileNameList.GetFileName(styleId); + string emoteName = "ai/" + Data.Master.AIEmoteFileNameList.GetFileName(emoteId); + m_AIDataLibrary.SaveBattleSetUpInfo(classId, logicLv, "", styleName, emoteName, useEmote: true, m_EnemyAIUseInnerEmote, enemyAiID, null); + SetCurrentEnemyDeckData(deck); + } + + public void SetCurrentEnemyDeckDataFromAIDeck(string deckName) + { + AIDeckData aIDeckData = m_AIDataLibrary.SearchDeckData(deckName); + if (aIDeckData == null) + { + return; + } + _currentEnemyDeckData = new List(); + foreach (KeyValuePair item in aIDeckData.CardDic) + { + for (int i = 0; i < item.Value.CardNum; i++) + { + _currentEnemyDeckData.Add(item.Key); + } + } + } + + public void SetUserOwnCardData(IDictionary userowncarddata) + { + _possessionCardDict = userowncarddata; + SetDirtyPossessionCardDict(); + } + + public void SetClassPrm(JsonData userClassCharaList, JsonData userRankMatchList) + { + Dictionary dictionary = new Dictionary(); + for (int i = 0; i < userClassCharaList.Count; i++) + { + JsonData jsonData = userClassCharaList[i]; + int num = jsonData["class_id"].ToInt(); + if (num < 1 || 9 <= num) + { + continue; + } + ClassCharaPrm classCharaPrm = new ClassCharaPrm(); + classCharaPrm.SetParamWithUserClassJson(jsonData); + for (int j = 0; j < userRankMatchList.Count; j++) + { + JsonData jsonData2 = userRankMatchList[j]; + if (jsonData2["class_id"].ToInt() == num) + { + classCharaPrm.SetClassCharaWin(jsonData2["win"].ToInt()); + classCharaPrm.SetClassCharaBattleCount(jsonData2["match_count"].ToInt()); + } + } + dictionary.Add(num, classCharaPrm); + } + _classPrmDict = dictionary; + } + + public void SetSoroPlay3DFieldID(int fieldID) + { + _soroPlay3DFieldId = fieldID; + } + + public void SetStoryBgmID(string bgmID) + { + _storyBgmId = bgmID; + } + + public void SetSpecialBattleSetting(bool? isPlayerFirst, string playerSkill, string enemySkill, int playerPp, int enemyPp, int playerLife, int playerMaxLife, int enemyMaxLife, string idOverrideBattleLogText, string id = "", string banishEffectOverride = "", string tokenDrawEffectOverride = "", string specialTokenDrawEffectOverride = "", int skipResult = 0, bool isVsEffectOverride = false, int classDestroyEffectOverride = 0) + { + SpecialBattleSettingInfo = new SpecialBattleSetting(id, isPlayerFirst, playerSkill, enemySkill, playerPp, enemyPp, playerLife, playerMaxLife, enemyMaxLife, idOverrideBattleLogText, banishEffectOverride, tokenDrawEffectOverride, specialTokenDrawEffectOverride, isVsEffectOverride, classDestroyEffectOverride); + SkipStorySpecialBattleResult = (SpecialBattleResultType)skipResult; + } + + public void ClearSpecialBattleSettingInfo() + { + SpecialBattleSettingInfo = null; + } + + public void ResetStorySpecialBattleResultSkipFlag() + { + SkipStorySpecialBattleResult = SpecialBattleResultType.None; + } + + private static Dictionary ParseIdOverrideText(string idOverrideText) + { + if (string.IsNullOrEmpty(idOverrideText)) + { + return null; + } + Dictionary dictionary = new Dictionary(); + string[] array = SplitSpecialBattleDataText(idOverrideText); + for (int i = 0; i < array.Length; i++) + { + string[] array2 = array[i].Split('='); + dictionary.Add(int.Parse(array2[0]), int.Parse(array2[1])); + dictionary.Add(int.Parse(array2[0]) + 1, int.Parse(array2[1]) + 1); + } + return dictionary; + } + + private static string[] SplitSpecialBattleDataText(string text) + { + return text.Split(','); + } + + private static Dictionary SplitSpecialBattleDataPair(string text) + { + string[] array = text.Split(','); + Dictionary dictionary = new Dictionary(); + for (int i = 0; i < array.Count(); i++) + { + string[] array2 = array[i].Split('='); + if (array2.Length == 2) + { + int key = int.Parse(array2[0]); + dictionary[key] = array2[1]; + } + } + return dictionary; + } + + public string GetClanNameByKey(int intclantype) + { + if (intclantype < ClanNameTextIdList.Length) + { + return Data.SystemText.Get(ClanNameTextIdList[intclantype]); + } + return ""; + } + + public static string GetTribeNameByKey(int tribeType) + { + if (tribeType >= TribeNameTextIdList.Length) + { + return ""; + } + string text = TribeNameTextIdList[tribeType]; + if (string.IsNullOrEmpty(text)) + { + return ""; + } + return Data.Master.GetTribeNameText(text); + } + + public IDictionary GetClassPrmDictionary() + { + return _classPrmDict; + } + + public ClassCharaPrm GetClassPrm(int classId) + { + return _classPrmDict[classId]; + } + + public ClassCharacterMasterData GetCharaPrmByClassId(int classId, bool isCurrentChara = true) + { + ClassCharaPrm classPrm = GetClassPrm(classId); + if (!isCurrentChara) + { + return classPrm.DefaultCharaData; + } + return classPrm.CurrentCharaData; + } + + public ClassCharacterMasterData GetCharaPrmByCharaId(int charaId) + { + return Data.Master.ClassCharacterList.Find((ClassCharacterMasterData x) => x.chara_id == charaId); + } + + public ClassCharacterMasterData GetCharaPrmBySkinId(int skinId) + { + return Data.Master.ClassCharacterList.Find((ClassCharacterMasterData x) => x.skin_id == skinId && x.is_usable); + } + + public int GetPlayerCharaId() + { + if (_playerCharaId == 0) + { + return PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_BATTLE_LEADER_ID); + } + return _playerCharaId; + } + + public int GetPlayerSubClassId() + { + return _playerSubClassId; + } + + public bool TryGetPlayerSubClassId(out int subClassId) + { + subClassId = GetPlayerSubClassId(); + return IsValidSubClass(subClassId); + } + + private static bool IsValidSubClass(int subClassId) + { + if (subClassId > 0) + { + return subClassId != 10; + } + return false; + } + + public bool TryGetPlayerMyRotationInfo(out MyRotationInfo myRotationInfo) + { + myRotationInfo = _playerMyRotationInfo; + return myRotationInfo != null; + } + + public bool TryGetPlayerAvatarBattleInfo(out AvatarBattleInfo avatarBattleInfo) + { + avatarBattleInfo = _playerAvatarBattleInfo; + return avatarBattleInfo != null; + } + + public ClassCharacterMasterData GetPlayerCharaData() + { + return GetCharaPrmByCharaId(GetPlayerCharaId()); + } + + public ClassCharacterMasterData GetPlayerSubCharaData() + { + return GetCharaPrmByCharaId(GetPlayerSubClassId()); + } + + public int GetPlayerClassId() + { + return GetPlayerCharaData().class_id; + } + + public int GetPlayerSkinId() + { + return GetPlayerCharaData().skin_id; + } + + public long GetPlayerSleeveId() + { + return GetAbleSleeveId(_playerSleeveId); + } + + public int GetPlayerBattleSkillReverse() + { + return GetPlayerCharaData().battle_skin_reverse; + } + + public Dictionary GetPlayerEmotionData() + { + return Data.Master._emotionDic[GetPlayerEmotionId()]; + } + + public string GetPlayerEmotionId() + { + if (!(_playerEmotionId == "")) + { + return _playerEmotionId; + } + return GetPlayerSkinId().ToString(); + } + + public void SetPlayerEmotionId(string id) + { + _playerEmotionId = id; + } + + public Dictionary GetEnemyEmotionData() + { + return Data.Master._emotionDic[GetEnemyEmotionId()]; + } + + public string GetEnemyEmotionId() + { + if (!(_enemyEmotionId == "")) + { + return _enemyEmotionId; + } + return GetEnemySkinId().ToString(); + } + + public void SetEnemyEmotionId(string id) + { + _enemyEmotionId = id; + } + + public int GetEnemyCharaId() + { + if (_enemyCharaId == 0) + { + return 1; + } + return _enemyCharaId; + } + + public int GetEnemySubClassId() + { + return _enemySubClassId; + } + + public bool TryGetEnemySubClassId(out int subClassId) + { + subClassId = GetEnemySubClassId(); + return IsValidSubClass(subClassId); + } + + public ClassCharacterMasterData GetEnemyCharaData() + { + return GetCharaPrmByCharaId(GetEnemyCharaId()); + } + + public ClassCharacterMasterData GetEnemySubCharaData() + { + return GetCharaPrmByCharaId(GetEnemySubClassId()); + } + + public int GetEnemyClassId() + { + if (GameMgr.GetIns().IsPuzzleQuest) + { + return PuzzleEnemyClass; + } + if (m_BattleType == BattleType.Story) + { + return StoryEnemyClassId; + } + return GetEnemyCharaData().class_id; + } + + public int GetEnemySkinId() + { + return GetEnemyCharaData().skin_id; + } + + public bool TryGetEnemyMyRotationInfo(out MyRotationInfo myRotationInfo) + { + myRotationInfo = _enemyMyRotationInfo; + return myRotationInfo != null; + } + + public bool TryGetEnemyAvatarBattleInfo(out AvatarBattleInfo avatarBattleInfo) + { + avatarBattleInfo = _enemyAvatarBattleInfo; + return avatarBattleInfo != null; + } + + public long GetEnemySleeveId() + { + return GetAbleSleeveId(_enemySleeveId); + } + + public int GetEnemyBattleSkillReverse() + { + return GetEnemyCharaData().battle_skin_reverse; + } + + public bool IsHighRankSkinPlayer() + { + return GetPlayerCharaData().IsHighRank; + } + + public bool IsHighRankSkinEnemy() + { + return GetEnemyCharaData().IsHighRank; + } + + public bool Is3DSkin(bool isPlayer) + { + if (isPlayer) + { + return GetPlayerCharaData().Is3d; + } + return GetEnemyCharaData().Is3d; + } + + public bool IsEvolveSkin(bool isPlayer) + { + if (isPlayer) + { + return GetPlayerCharaData().IsEvolveSkin; + } + return GetEnemyCharaData().IsEvolveSkin; + } + + public int GetEvolutionDelayFrame(bool isPlayer) + { + if (isPlayer) + { + return GetPlayerCharaData().EvolutionDelayFrame; + } + return GetEnemyCharaData().EvolutionDelayFrame; + } + + public bool IsSelectEmptyDeck() + { + if (_selectDeckId != -1) + { + return false; + } + return true; + } + + public int GetSelectDeckId() + { + if (_selectDeckId == 0) + { + return PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_BATTLE_DECK_ID); + } + return _selectDeckId; + } + + public IList GetCurrentDeckData() + { + return _currentDeckCardIdList; + } + + public IList GetCurrentEnemyDeckData() + { + return _currentEnemyDeckData; + } + + public int GetDeckMaxCount(bool isSelf) + { + if (!isSelf) + { + return _enemyDeckMaxCardCount; + } + return _deckMaxCardCount; + } + + public IDictionary GetUserOwnCardData(bool isIncludingSpotCard) + { + if (isIncludingSpotCard) + { + if (_isDirtyPossessionCardDict) + { + UpdatePossessionCardDictIncludingSpotCard(); + _isDirtyPossessionCardDict = false; + } + return _possessionCardDictIncludingSpotCard; + } + return _possessionCardDict; + } + + public Dictionary ClonePossessionCardDictionary(bool isIncludingSpotCard) + { + return new Dictionary(GetUserOwnCardData(isIncludingSpotCard)); + } + + public bool HasPossesionCardInfo(int cardId, bool isIncludingSpotCard) + { + return GetUserOwnCardData(isIncludingSpotCard).ContainsKey(cardId); + } + + public int GetPossessionCardNum(int cardId, bool isIncludingSpotCard) + { + int value = 0; + GetUserOwnCardData(isIncludingSpotCard).TryGetValue(cardId, out value); + return value; + } + + public static int GetPossessionBaseCardNum(int baseCardId, IDictionary cardPool, CardMaster.CardMasterId cardMasterId) + { + CardMaster instance = CardMaster.GetInstance(cardMasterId); + int num = 0; + foreach (KeyValuePair item in cardPool) + { + if (instance.GetCardParameterFromId(item.Key).BaseCardId == baseCardId) + { + try + { + num = checked(num + item.Value); + } + catch (OverflowException) + { + return int.MaxValue; + } + } + } + return num; + } + + public int GetPossessionBaseCardNum(int baseCardId, bool isIncludingSpotCard, CardMaster.CardMasterId cardMasterId) + { + return GetPossessionBaseCardNum(baseCardId, GetUserOwnCardData(isIncludingSpotCard), cardMasterId); + } + + public void UpdatePossessionCardNum(int cardId, int num) + { + GetUserOwnCardData(isIncludingSpotCard: false)[cardId] = num; + SetDirtyPossessionCardDict(); + } + + public void RemovePossessionCard(int cardId) + { + IDictionary userOwnCardData = GetUserOwnCardData(isIncludingSpotCard: false); + if (userOwnCardData.ContainsKey(cardId)) + { + userOwnCardData[cardId] = 0; + SetDirtyPossessionCardDict(); + } + } + + public List GetPossessionCardIdList(bool isIncludingSpotCard) + { + return GetUserOwnCardData(isIncludingSpotCard).Keys.ToList(); + } + + public Dictionary GetPossessionBaseCardDictionary(bool isIncludingSpotCard, CardMaster.CardMasterId cardMasterId) + { + CardMaster instance = CardMaster.GetInstance(cardMasterId); + Dictionary dictionary = new Dictionary(); + foreach (KeyValuePair userOwnCardDatum in GetUserOwnCardData(isIncludingSpotCard)) + { + int baseCardId = instance.GetCardParameterFromId(userOwnCardDatum.Key).BaseCardId; + int value = 0; + if (dictionary.TryGetValue(baseCardId, out value)) + { + try + { + dictionary[baseCardId] = checked(value + userOwnCardDatum.Value); + } + catch (OverflowException) + { + dictionary[baseCardId] = int.MaxValue; + } + } + else + { + dictionary.Add(baseCardId, userOwnCardDatum.Value); + } + } + return dictionary; + } + + private void UpdatePossessionCardDictIncludingSpotCard() + { + _possessionCardDictIncludingSpotCard = SpotCardData.CreateDictionaryIncludingSpotCard(_possessionCardDict); + } + + public void SetDirtyPossessionCardDict() + { + _isDirtyPossessionCardDict = true; + } + + public void UpdateUserOwnCardData(int cardid, int num) + { + bool isNew = !HasPossesionCardInfo(cardid, isIncludingSpotCard: false); + SetIsNewCard(cardid, isNew); + if (_possessionCardDict.ContainsKey(cardid)) + { + _possessionCardDict[cardid] = num; + } + else + { + _possessionCardDict.Add(cardid, num); + } + SetDirtyPossessionCardDict(); + } + + public bool IsNewCard(int cardId) + { + if (!_isNewCardDict.TryGetValue(cardId, out var value)) + { + return false; + } + return value; + } + + public void SetIsNewCard(int cardId, bool isNew) + { + _isNewCardDict[cardId] = isNew; + } + + public void RegisterUserOwnCardData(int cardId, int num) + { + _possessionCardDict.Add(cardId, num); + SetDirtyPossessionCardDict(); + } + + public void UnregisterUserOwnCardData(int cardId) + { + _possessionCardDict.Remove(cardId); + SetDirtyPossessionCardDict(); + } + + public int GetSoroPlay3DFieldID() + { + return _soroPlay3DFieldId; + } + + public string GetStoryBgmID() + { + return _storyBgmId; + } + + public void SetMaintenanceCardIds(JsonData responseData) + { + if (responseData == null) + { + _maintenanceCardIds = null; + return; + } + _maintenanceCardIds = new int[responseData.Count]; + for (int i = 0; i < responseData.Count; i++) + { + _maintenanceCardIds[i] = responseData[i]["card_id"].ToInt(); + } + } + + public void SetMaintenanceCardIds(int[] ids) + { + _maintenanceCardIds = ids; + } + + public bool IsMaintenanceCard(int id) + { + if (_maintenanceCardIds != null) + { + return _maintenanceCardIds.Contains(id); + } + return false; + } + + public Dictionary GetEmotionDataBySkinId(string skinId) + { + if (!Data.Master._emotionDic.ContainsKey(skinId)) + { + LocalLog.AccumulateTraceLog("Not contain key given. skinId : " + skinId + " emotionMasterKeyCount : " + Data.Master._emotionDic.Keys.Count); + } + return Data.Master._emotionDic[skinId]; + } + + public static long GetAbleSleeveId(long sleeveId) + { + return Data.Master.SleeveMgr.Get(sleeveId).sleeve_id; + } +} diff --git a/SVSim.BattleEngine/Engine/DeckData.cs b/SVSim.BattleEngine/Engine/DeckData.cs new file mode 100644 index 0000000..f3015bb --- /dev/null +++ b/SVSim.BattleEngine/Engine/DeckData.cs @@ -0,0 +1,577 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using LitJson; +using Wizard; + +public class DeckData +{ + public enum UnusableReason + { + None, + MaintenanceCard, + FormatRestrictCard, + TooLittleCards, + TooMuchCards, + NonPossessionCard, + ShortageMainClassCards, + ShortageSubClassCards, + ShortageBothClassCards, + Unknown + } + + public const int DEFAULT_DECK_ID_OFFSET = 90; + + private const string LEADER_SKIN_ID_KEY = "leader_skin_id"; + + public const string CARD_ID_ARRAY_KEY = "card_id_array"; + + public const int DEFAULT_SLEEVE_ID = 3000011; + + public const int UNSET_SKIN_ID = 0; + + private int _deckId; + + private string _deckName; + + private bool _isComplete; + + private int _deckClassId; + + private int _deckSubClassId = 10; + + private long _sleeveId; + + private int _skinId; + + private List _cardIdList; + + public Format Format { get; private set; } + + public bool IsFormatRestrictError { get; set; } + + public bool IsMaintenanceDeck { get; set; } + + public Format DeckCopyFormat { get; private set; } + + public bool IsRecommend { get; private set; } + + public bool IsContainsNonPossessionCard { get; private set; } + + public bool IsSkinRandom { get; set; } + + public List SelectRandomSkinIdList { get; set; } + + public bool IsReplaceDeckSkin { get; set; } + + public DeckAttributeType DeckAttributeType { get; private set; } + + public DateTime? CreatedTime { get; private set; } + + public string MyRotationId { get; set; } + + public string RotationId { get; set; } + + public bool IsRentalDeck + { + get + { + DeckAttributeType deckAttributeType = DeckAttributeType; + if ((uint)(deckAttributeType - 2) <= 3u) + { + return true; + } + return false; + } + } + + public bool IsOutOfRotationFormat + { + get + { + if (Format == Format.Rotation || Format == Format.PreRotation) + { + return DeckCopyFormat == Format.Unlimited; + } + return false; + } + } + + public DeckData(Format format = Format.Max, DeckAttributeType deckAttributeType = DeckAttributeType.Invalid) + { + _skinId = 0; + Format = format; + DeckCopyFormat = format; + DeckAttributeType = deckAttributeType; + } + + public DeckData Clone() + { + return (DeckData)MemberwiseClone(); + } + + public void SetDeckID(int deckId) + { + _deckId = deckId; + } + + public void SetDeckName(string deckName) + { + _deckName = deckName; + } + + public void SetDeckIsComplete(bool isComplete) + { + _isComplete = isComplete; + } + + public void SetDeckClassID(int deckClassId) + { + _deckClassId = deckClassId; + } + + public void SetDeckSubClassID(int deckSubClassId) + { + _deckSubClassId = deckSubClassId; + } + + public void SetDeckSleeveID(long sleeveId) + { + _sleeveId = DataMgr.GetAbleSleeveId(sleeveId); + } + + public void SetCardIdList(List cardIdList) + { + _cardIdList = cardIdList; + } + + public void SetEmptyCardIdList() + { + _cardIdList = new List(); + } + + public void SetSkinId(int skinId) + { + _skinId = skinId; + } + + public int GetDeckID() + { + return _deckId; + } + + public string GetDeckName() + { + return _deckName; + } + + public bool GetDeckIsComplete() + { + return _isComplete; + } + + private UnusableReason GetUnusableReason() + { + if (IsMaintenanceDeck) + { + return UnusableReason.MaintenanceCard; + } + if (IsFormatRestrictError) + { + return UnusableReason.FormatRestrictCard; + } + if (!_isComplete) + { + int num = ((_cardIdList != null) ? _cardIdList.Count : 0); + if (num < 40) + { + return UnusableReason.TooLittleCards; + } + if (num > 40) + { + return UnusableReason.TooMuchCards; + } + if (Format == Format.Crossover && _cardIdList != null) + { + CardMaster cardMaster = CardMaster.GetInstance(FormatBehaviorManager.GetDefaultBehaviour(Format).CardMasterId); + CardBasePrm.ClanType mainClass = (CardBasePrm.ClanType)_deckClassId; + CardBasePrm.ClanType subClass = (CardBasePrm.ClanType)_deckSubClassId; + bool num2 = _cardIdList.Count((int cardId) => cardMaster.GetCardParameterFromId(cardId).Clan == mainClass) < 24; + bool flag = _cardIdList.Count((int cardId) => cardMaster.GetCardParameterFromId(cardId).Clan == subClass) < 9; + if (num2) + { + if (!flag) + { + return UnusableReason.ShortageMainClassCards; + } + return UnusableReason.ShortageBothClassCards; + } + if (flag) + { + return UnusableReason.ShortageSubClassCards; + } + } + return UnusableReason.Unknown; + } + if (IsContainsNonPossessionCard) + { + return UnusableReason.NonPossessionCard; + } + return UnusableReason.None; + } + + public static bool ContainsNonPossessionCard(IEnumerable cardIdList, IFormatBehavior formatBehavior) + { + return cardIdList.Distinct().Any((int id) => cardIdList.Count((int i) => i == id) > formatBehavior.GetPossessionCardNum(id, isIncludingSpotCard: true)); + } + + public bool IsUsable(out UnusableReason reason, bool canUseNonPossessionCard = false) + { + reason = GetUnusableReason(); + if (canUseNonPossessionCard && reason == UnusableReason.NonPossessionCard) + { + reason = UnusableReason.None; + } + return reason == UnusableReason.None; + } + + public bool IsUsable(bool canUseNonPossessionCard = false) + { + UnusableReason reason; + return IsUsable(out reason, canUseNonPossessionCard); + } + + public bool IsDisplayable() + { + if (!IsUsable()) + { + return false; + } + Dictionary cardNumDict = GetCardNumDict(); + DataMgr dataMgr = GameMgr.GetIns().GetDataMgr(); + foreach (KeyValuePair item in cardNumDict) + { + int possessionCardNum = dataMgr.GetPossessionCardNum(item.Key, isIncludingSpotCard: true); + if (possessionCardNum == 0) + { + return false; + } + if (item.Value > possessionCardNum) + { + return false; + } + } + return true; + } + + public bool HasResurgentCard() + { + foreach (int cardId in _cardIdList) + { + if (CardMaster.GetInstance(FormatBehaviorManager.GetDefaultBehaviour(Format).CardMasterId).GetCardParameterFromId(cardId).IsResurgentCard) + { + return true; + } + } + return false; + } + + public int GetDeckClassID() + { + return _deckClassId; + } + + public int GetDeckSubClassID() + { + return _deckSubClassId; + } + + public long GetDeckSleeveID() + { + return DataMgr.GetAbleSleeveId(_sleeveId); + } + + public List GetCardIdList() + { + return _cardIdList; + } + + public void ExtractMainClassAndNeutralCards() + { + CardMaster instance = CardMaster.GetInstance(FormatBehaviorManager.GetDefaultBehaviour(Format).CardMasterId); + CardBasePrm.ClanType deckClassId = (CardBasePrm.ClanType)_deckClassId; + List list = new List(); + foreach (int cardId in _cardIdList) + { + CardBasePrm.ClanType clan = instance.GetCardParameterFromId(cardId).Clan; + if (clan == deckClassId || clan == CardBasePrm.ClanType.ALL) + { + list.Add(cardId); + } + } + _cardIdList = list; + } + + public Dictionary GetCardNumDict() + { + Dictionary dictionary = new Dictionary(); + if (IsNoCard()) + { + return dictionary; + } + for (int i = 0; i < _cardIdList.Count; i++) + { + int key = _cardIdList[i]; + if (dictionary.ContainsKey(key)) + { + dictionary[key]++; + } + else + { + dictionary.Add(key, 1); + } + } + return dictionary; + } + + public bool IsNoCard() + { + return _cardIdList == null; + } + + public bool IsDefaultDeck() + { + return IsDeckAttributeMatch(DeckAttributeType.DefaultDeck); + } + + public bool IsDeckAttributeMatch(DeckAttributeType deckAttributeType) + { + return deckAttributeType == DeckAttributeType; + } + + public int GetRawSkinId() + { + return _skinId; + } + + public int GetSkinId(bool isDefaultSkin = false) + { + if (isDefaultSkin) + { + return GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(GetDeckClassID(), isCurrentChara: false) + .skin_id; + } + if (_skinId == 0) + { + return GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(GetDeckClassID()) + .skin_id; + } + return _skinId; + } + + private int GetJsonInt(JsonData deckData, string key, int defaultValue) + { + if (deckData.Keys.Contains(key)) + { + return deckData[key].ToInt(); + } + return defaultValue; + } + + private string GetJsonString(JsonData deckData, string key, string defaultValue) + { + if (deckData.Keys.Contains(key)) + { + return deckData[key].ToString(); + } + return defaultValue; + } + + private bool GetJsonBool(JsonData deckData, string key, bool defaultValue) + { + if (deckData.Keys.Contains(key)) + { + return deckData[key].ToBoolean(); + } + return defaultValue; + } + + public void Initialize(JsonData deckData) + { + SetDeckID(GetJsonInt(deckData, "deck_no", 0)); + if (deckData.Keys.Contains("format")) + { + Format = Data.ParseApiFormat(deckData["format"].ToInt()); + } + SetDeckName(deckData["deck_name"].ToString()); + SetDeckIsComplete(GetJsonBool(deckData, "is_complete_deck", defaultValue: true)); + IsContainsNonPossessionCard = GetJsonBool(deckData, "is_include_un_possession_card", defaultValue: false); + SetDeckClassID(deckData["class_id"].ToInt()); + if (FormatBehaviorManager.GetDefaultBehaviour(Format).UseSubClass) + { + int valueOrDefault = deckData.GetValueOrDefault("sub_class_id", 10); + _deckSubClassId = ((valueOrDefault == 0) ? 10 : valueOrDefault); + } + if (deckData.TryGetValue("sleeve_id", out var value)) + { + SetDeckSleeveID(value.ToLong()); + } + else + { + _sleeveId = 3000011L; + } + if (deckData.Keys.Contains("leader_skin_id")) + { + SetSkinId(deckData["leader_skin_id"].ToInt()); + } + if (deckData.Keys.Contains("restricted_card_exists")) + { + IsFormatRestrictError = deckData["restricted_card_exists"].ToBoolean(); + } + if (deckData.Keys.Contains("current_format")) + { + DeckCopyFormat = Data.ParseApiFormat(deckData["current_format"].ToInt()); + } + else + { + DeckCopyFormat = Format; + } + if (deckData.Keys.Contains("is_recommend")) + { + IsRecommend = deckData["is_recommend"].ToInt() == 1; + } + else + { + IsRecommend = false; + } + if (deckData.TryGetValue("create_deck_time", out var value2) && value2 != null) + { + CreatedTime = DateTime.Parse($"{value2}"); + } + ParseCardIdList(deckData); + MyRotationId = deckData.GetValueOrDefault("rotation_id", null); + RotationId = MyRotationId; + if (Data.MyRotationAllInfo.Get(MyRotationId) == null) + { + MyRotationId = null; + } + IsSkinRandom = deckData.GetValueOrDefault("is_random_leader_skin", 0) == 1; + SelectRandomSkinIdList = new List(); + if (deckData.Keys.Contains("leader_skin_id_list")) + { + JsonData jsonData = deckData["leader_skin_id_list"]; + for (int i = 0; i < jsonData.Count; i++) + { + SelectRandomSkinIdList.Add(jsonData[i].ToInt()); + } + SelectRandomSkinIdList.Sort(); + } + MaintenanceCardCheack(); + } + + public void ParseCardIdList(JsonData deckData) + { + JsonData jsonData = deckData["card_id_array"]; + List cardIdList = null; + int count = jsonData.Count; + if (count > 0) + { + cardIdList = new List(); + for (int i = 0; i < count; i++) + { + cardIdList.Add(jsonData[i].ToInt()); + } + cardIdList = UIManager.GetInstance().getUIBase_CardManager().SortIDList(cardIdList, FormatBehaviorManager.GetDefaultBehaviour(Format).CardMasterId); + } + SetCardIdList(cardIdList); + } + + public void MaintenanceCardCheack() + { + IsMaintenanceDeck = false; + if (_cardIdList != null) + { + IsMaintenanceDeck = _cardIdList.Any((int c) => GameMgr.GetIns().GetDataMgr().IsMaintenanceCard(c)); + } + } + + public string GetMyRotationClassName() + { + MyRotationInfo info = Data.MyRotationAllInfo.Get(MyRotationId); + return CreateMyRotationClassName(_deckClassId, info); + } + + public static string GetClassName(int classType, string rotationId) + { + MyRotationInfo myRotationInfo = Data.MyRotationAllInfo.Get(rotationId); + if (myRotationInfo != null) + { + return CreateMyRotationClassName(classType, myRotationInfo); + } + return GameMgr.GetIns().GetDataMgr().GetClanNameByKey(classType); + } + + public static string CreateMyRotationClassName(int classType, MyRotationInfo info) + { + return Data.SystemText.Get("MyRotation_ID_02", GameMgr.GetIns().GetDataMgr().GetClanNameByKey(classType), info.LastPackText); + } + + public bool IsVisibleRandomIcon() + { + if (IsReplaceDeckSkin) + { + return false; + } + if (IsSkinRandom) + { + return true; + } + if (GameMgr.GetIns().GetDataMgr().GetClassPrm(GetDeckClassID()) + .IsRandomLeaderSkin) + { + return _skinId == 0; + } + return false; + } + + public MyRotationInfo GetMyRotationInfoFromCardList() + { + int num = int.MinValue; + MyRotationInfo result = null; + CardMaster instance = CardMaster.GetInstance(FormatBehaviorManager.GetDefaultBehaviour(Format.MyRotation).CardMasterId); + foreach (int cardId in GetCardIdList()) + { + CardParameter cardParameterFromId = instance.GetCardParameterFromId(cardId); + MyRotationInfo myRotationInfoFromPack = GetMyRotationInfoFromPack(cardParameterFromId.CardSetId); + if (myRotationInfoFromPack != null && int.Parse(myRotationInfoFromPack.Id) >= num) + { + result = myRotationInfoFromPack; + num = int.Parse(myRotationInfoFromPack.Id); + } + } + return result; + } + + public MyRotationInfo GetMyRotationInfoFromPack(string packId) + { + int num = int.MinValue; + MyRotationInfo myRotationInfo = null; + foreach (MyRotationInfo myRotationInfo2 in Data.MyRotationAllInfo.MyRotationInfoList) + { + if (!(packId != myRotationInfo2.LastPackId) && int.Parse(myRotationInfo2.Id) >= num) + { + num = int.Parse(myRotationInfo2.Id); + myRotationInfo = myRotationInfo2; + } + } + if (myRotationInfo == null) + { + if (GetDeckClassID() != 8) + { + return Data.MyRotationAllInfo.FirstPackInfo; + } + return Data.MyRotationAllInfo.FirstPackInfoNemesis; + } + return myRotationInfo; + } +} diff --git a/SVSim.BattleEngine/Engine/DetailMgr.cs b/SVSim.BattleEngine/Engine/DetailMgr.cs new file mode 100644 index 0000000..b0b7384 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DetailMgr.cs @@ -0,0 +1,105 @@ +using UnityEngine; + +public class DetailMgr +{ + public GameObject DetailNormal; + + public LODGroup DetailNormalLodGroup; + + public MeshRenderer DetailNormalBaseMesh; + + public UILabel DetailNormalCostLabel; + + public UILabel DetailNormalAtkLabel; + + public UILabel DetailNormalLifeLabel; + + public UILabel DetailNormalNameLabel; + + public GameObject DetailSkill; + + public MeshRenderer DetailSkillBaseMesh; + + public LODGroup DetailSkillLodGroup; + + public UILabel DetailSkillCostLabel; + + public UILabel DetailSkillNameLabel; + + public GameObject DetailField; + + public MeshRenderer DetailFieldBaseMesh; + + public LODGroup DetailFieldLodGroup; + + public UILabel DetailFieldCostLabel; + + public UILabel DetailFieldNameLabel; + + public GameObject DetailPanel; + + public IDetailPanelControl DetailPanelControl; + + public GameObject SubDetailPanel; + + public DetailPanelControl SubDetailPanelControl; + + public DetailMgr() + { + DetailNormal = null; + DetailNormalLodGroup = null; + DetailNormalBaseMesh = null; + DetailNormalCostLabel = null; + DetailNormalAtkLabel = null; + DetailNormalLifeLabel = null; + DetailNormalNameLabel = null; + DetailSkill = null; + DetailSkillBaseMesh = null; + DetailSkillLodGroup = null; + DetailSkillCostLabel = null; + DetailSkillNameLabel = null; + DetailField = null; + DetailFieldBaseMesh = null; + DetailFieldLodGroup = null; + DetailFieldCostLabel = null; + DetailFieldNameLabel = null; + DetailPanel = null; + DetailPanelControl = null; + } + + public void Dispose() + { + DetailPanel = null; + DetailPanelControl = null; + } + + public static Camera GetCamera() + { + return UIManager.GetInstance().UIRootLoadingCamera; + } + + public void HideDetailPanel(BattleCardBase card) + { + if (card.IsSpell) + { + DetailSkill.SetActive(value: false); + } + else if (card.IsField) + { + DetailField.SetActive(value: false); + } + else + { + DetailNormal.SetActive(value: false); + } + DetailPanelControl.Hide(); + DetailPanelControl.SetScreenPosition(right: false); + card = null; + } + + public void HideSubDetailPanel(BattleCardBase card) + { + SubDetailPanelControl.Hide(); + SubDetailPanelControl.SetScreenPosition(right: false); + } +} diff --git a/SVSim.BattleEngine/Engine/DetailPanelControl.cs b/SVSim.BattleEngine/Engine/DetailPanelControl.cs new file mode 100644 index 0000000..5363221 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DetailPanelControl.cs @@ -0,0 +1,2261 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.Battle; +using Wizard.Battle.Touch; +using Wizard.Battle.UI; +using Wizard.Battle.View; +using Wizard.Battle.View.Vfx; + +public class DetailPanelControl : CardDetailBase, IDetailPanelControl +{ + public enum ShowRequest + { + NORMAL, + MULLIGAN, + EVOLUTION_SELECT, + BATTLELOG, + DESTROYLOG, + CHOICE, + BUFF_DETAIL, + DECK_SUMMON_CARD_LIST, + FUSION_INFO_CARD_LIST, + CHOICE_BRAVE, + CHOICE_BRAVE_AND_BUFF + } + + private class CoroutineActions + { + public Coroutine _coroutine; + + public List _actions; + + public CoroutineActions(Action a) + { + _coroutine = null; + _actions = new List { a }; + } + } + + public struct ItemCursor + { + private const float ITEM_MARGIN = 3f; + + private float _offset; + + public float Height { get; private set; } + + public ItemCursor(float offset) + { + _offset = offset; + Height = 0f; + } + + public ItemCursor Clone() + { + ItemCursor result = new ItemCursor(0f); + result.Height = Height; + result._offset = _offset; + return result; + } + + public float AddAndGetCenterOffset(float height) + { + float result = _offset - 3f - height / 2f; + float num = 6f + height; + _offset -= num; + Height += num; + return result; + } + + public float AddAndGetTopOffset(float height) + { + float result = _offset - 3f; + float num = 6f + height; + _offset -= num; + Height += num; + return result; + } + } + + [SerializeField] + private BattleButtonControl battleButtonControl; + + [SerializeField] + private UIPanel MainPanel; + + [SerializeField] + private GameObject Window; + + [SerializeField] + private GameObject FollowerPanel; + + [SerializeField] + private UILabel FollowerAtkLabel; + + [SerializeField] + private UILabel FollowerLifeLabel; + + [SerializeField] + private GameObject EvoPanel; + + [SerializeField] + private UILabel EvoTitleLabel; + + [SerializeField] + private UILabel EvoAtkLabel; + + [SerializeField] + private UILabel EvoLifeLabel; + + [SerializeField] + private UISprite Underline; + + [SerializeField] + private UIButton EvolutionButton; + + [SerializeField] + private UILabel EvolutionComment; + + private UILabel _evolutionButtonUiLabel; + + [SerializeField] + private UIButton FusionButton; + + private UILabel _fusionButtonUiLabel; + + [SerializeField] + private UIButton NonFollowerFusionButton; + + private UILabel _nonFollowerFusionButtonUiLabel; + + [SerializeField] + private UISprite NonFollowerFusionUnderline; + + [SerializeField] + private UIWidget _buffRootWidget; + + [SerializeField] + private UISprite _buffPanelSprite; + + [SerializeField] + private UIPanel _buffPanel; + + [SerializeField] + private UIPanel _buffContentsPanel; + + [SerializeField] + private Transform _buffContentsParent; + + [SerializeField] + private UIScrollBar _buffScrollBar; + + [SerializeField] + private UIScrollView _buffScrollView; + + [SerializeField] + private UIDragScrollView _bgDragScrollView; + + [SerializeField] + private UILabel _buffTitleLabel; + + [SerializeField] + private UILabel _myRotationBonusTitleLabel; + + [SerializeField] + private UIPanel _myRotationBonusContentsPanel; + + [SerializeField] + private Transform _myRotationBonusContentsParent; + + [SerializeField] + private UISprite _myRotationBonusBorderLine; + + [SerializeField] + private UIPanel _avatarBattleBonusContentsPanel; + + [SerializeField] + private Transform _avatarBattleBonusContentsParent; + + [SerializeField] + private UIScrollBar _avatarBattleBonusScrollBar; + + [SerializeField] + private UIScrollView _avatarBattleBonusScrollView; + + [SerializeField] + private Transform _avatarBattleBonusBPIconParent; + + [SerializeField] + private UISprite _avatarBattleBonusBPSprite; + + [SerializeField] + private UILabel _avatarBattleBonusBPLabel; + + [SerializeField] + private UILabel _avatarBattleBonusBPDescriptionLabel; + + [SerializeField] + private UILabel _bossRushSpecialSkillTitleLabel; + + [SerializeField] + private UIPanel _bossRushSpecialSkillContentsPanel; + + [SerializeField] + private Transform _bossRushSpecialSkillContentsParent; + + [SerializeField] + public GameObject EvoTargetPanel; + + private GameObject _normalLightFrame; + + private GameObject _evoLightFrame; + + private Vector3 DefaultPanelPos; + + private Vector3 DefaultNorPanelPos; + + private Vector3 DefaultEvoPanelPos; + + [SerializeField] + private BoxCollider _buffPanelCollider; + + private BattleManagerBase _battleMgr; + + private OperateMgr _operateMgr; + + private SystemText _text; + + private BuffInfo _buff; + + private string _divergenceId = string.Empty; + + private int _logTextureId; + + private bool _isToGreyTextEnabled; + + private readonly string[] GREY_TEXT_PATTERNS = new string[2] { "\\[u\\]\\[524522\\]", "\\[555555\\]-?\\[b\\]" }; + + private const float LabelColliderSizeZ = 500f; + + private readonly float NONFOLOWER_SCROLLVIEW_POS_Y = -143.7f; + + private readonly float NONFOLOWER_DETAILLABEL_POS_Y = 37.7f; + + private const int CLASS_BUFF_CORRECTION_COEFFICIENT = 47; + + private const int CLASS_BUFF_ADVANCED_INFO_COEFFICIENT = 44; + + private const int MY_ROTATION_INFO_COEFFICIENT = 54; + + private const int CACHE_BUFF_LOG_MAX = 50; + + private const float BETWEEN_BUFF_AND_BUFF = 6f; + + private const float BETWEEN_BUFF_AND_BG_BOTTOM = 8f; + + private readonly Vector3 BATTLELOG_DETAIL = new Vector3(675f, -150f, 0f); + + private readonly Vector3 MULLIGAN_DETAIL = new Vector3(0f, 0f, -350f); + + private readonly Vector3 BUFF_LOG_DETAIL_LEFT = new Vector3(-434f, -106f, 0f); + + private readonly Vector3 BUFF_LOG_DETAIL_RIGHT = new Vector3(434f, -106f, 0f); + + private readonly Vector3 BATTLELOG_BUFF_SAME_BOTTOM_OFFSET = new Vector3(0f, 147f, 0f); + + private const float RIGHT_REL_OFFSET = -0.44f; + + private const float RIGHT_REL_OFFSET_MIN = -0.222f; + + private const float TOP_PIXEL_OFFSET = 34f; + + private const float TOP_PIXEL_OFFSET_MIN = -30f; + + private const float MIN_SCALE = 0.4f; + + private const float HIDE_DISTANCE = 10000f; + + private const float MAX_HEIGHT = 598f; + + private List _cacheLogList = new List(); + + private List _cacheMyRotationLogList = new List(); + + private List _cachePlayerBossRushSkillList = new List(); + + private List _cacheEnemyBossRushSkillList = new List(); + + private List _cacheAvatarBattleTitleList = new List(); + + private List _cacheAvatarBattlePassiveBonusList = new List(); + + private List _cacheAvatarBattleBonusList = new List(); + + private List _drawLogList = new List(); + + private GameObject _copiedLabel; + + private GameObject _saveBurialRiteLabel; + + private GameObject _getonCardLabel; + + private BuffDetailInfoUI _buffDetailInfoUI; + + private Vector3 _currentBuffWindowOffset = Vector3.zero; + + private const int CARD_ID_CLASS = 0; + + private static Dictionary loadHeaderCoroutine = new Dictionary(); + + private bool _hasKeyword; + + public const string PREFAB_PATH = "Prefab/UI/DetailPanel"; + + private DetailPanelControl _nextPanel; + + private DetailPanelControl _parentPanel; + + private const float LONG_PRESS_TIME = 0.2f; + + private float? _predictionWaitTime; + + private const string HBP_ICON_SPRITE_NAME = "icon_hbp"; + + private const string PP_ICON_SPRITE_NAME = "icon_pp"; + + public bool forceEvolutionConfirm { get; set; } + + public GameObject EvoTargetPanelColliderGameObject => EvoTargetPanel.GetComponent().gameObject; + + public bool IsShow { get; private set; } + + public UIButton EvolveButton => EvolutionButton; + + public EvolutionConfirmation _evolutionConfirmation { get; private set; } + + public bool IsUpdateCardDescription { get; private set; } + + public BattleCardBase _card { get; private set; } + + public ShowRequest CurrentShowRequest { get; private set; } + + private bool IsEvolveToOtherCardLog => _logTextureId / 1000000 == 910; + + public event Action OnHideOneTime; + + public static bool IsDestroyOrDeckCardList(ShowRequest showRequest) + { + if (ShowRequest.DESTROYLOG != showRequest) + { + return ShowRequest.DECK_SUMMON_CARD_LIST == showRequest; + } + return true; + } + + public static bool IsChoiceBraveRequest(ShowRequest showRequest) + { + if (showRequest != ShowRequest.CHOICE_BRAVE) + { + return showRequest == ShowRequest.CHOICE_BRAVE_AND_BUFF; + } + return true; + } + + public void ResetUpdateCardDescriptionFlag() + { + IsUpdateCardDescription = false; + } + + public void SetBuff(BuffInfo buff) + { + _buff = buff; + } + + private void Start() + { + _evolutionConfirmation = new EvolutionConfirmation(base.transform); + _evolutionButtonUiLabel = EvolutionButton.transform.Find("Label").GetComponent(); + _evolutionButtonUiLabel.text = Data.SystemText.Get("Battle_0117"); + EvolutionButton.defaultColor = new Color(1f, 1f, 1f); + EvolutionButton.onClick.Clear(); + EvolutionButton.onClick.Add(new EventDelegate(delegate + { + if (!GameMgr.GetIns().IsWatchBattle && _battleMgr != null && _operateMgr != null && _card != null) + { + BattleCardBase evoCard = _card; + if (_card.IsInplay) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE); + if (PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.CONFIRM_EVOLVE) || forceEvolutionConfirm) + { + _battleMgr.BattlePlayer.PlayerBattleView.CallOnOpenEvolveDialoguePanel(); + _evolutionConfirmation.Show(_battleMgr.BattlePlayer).onPushButton1 = delegate + { + OnTouchEvolutionButton(evoCard); + }; + } + else + { + OnTouchEvolutionButton(evoCard); + } + } + } + })); + EventDelegate item = new EventDelegate(delegate + { + if (!GameMgr.GetIns().IsWatchBattle && _battleMgr != null && _operateMgr != null && _card != null && _card.IsInHand && _card.SelfBattlePlayer.IsSelfTurn) + { + OnTouchFusionButton(_card); + } + }); + FusionButton.defaultColor = new Color(1f, 1f, 1f); + FusionButton.onClick.Clear(); + FusionButton.onClick.Add(item); + _fusionButtonUiLabel = FusionButton.transform.Find("Label").GetComponent(); + _fusionButtonUiLabel.text = Data.SystemText.Get("Battle_0506"); + NonFollowerFusionButton.defaultColor = new Color(1f, 1f, 1f); + NonFollowerFusionButton.onClick.Clear(); + NonFollowerFusionButton.onClick.Add(item); + _nonFollowerFusionButtonUiLabel = NonFollowerFusionButton.transform.Find("Label").GetComponent(); + _nonFollowerFusionButtonUiLabel.text = Data.SystemText.Get("Battle_0506"); + _predictionWaitTime = null; + UIEventListener.Get(EvolutionButton.gameObject).onPress = delegate(GameObject obj, bool isPress) + { + if (isPress) + { + _predictionWaitTime = Time.realtimeSinceStartup; + } + else + { + _predictionWaitTime = null; + _battleMgr.Prediction.Clear(); + } + }; + UIEventListener.Get(EvolutionButton.gameObject).onDragOut = delegate + { + _predictionWaitTime = null; + _battleMgr.Prediction.Clear(); + }; + _normalLightFrame = FollowerPanel.transform.Find("LightFrame").gameObject; + _evoLightFrame = EvoPanel.transform.Find("LightFrame").gameObject; + DefaultPanelPos = MainPanel.transform.localPosition; + MainPanel.transform.localPosition = DefaultPanelPos + Vector3.left * 10000f; + MainPanel.alpha = 0f; + IsShow = false; + ResetUpdateCardDescriptionFlag(); + DefaultNorPanelPos = FollowerPanel.transform.localPosition; + DefaultEvoPanelPos = EvoPanel.transform.localPosition; + SystemText systemText = Data.SystemText; + EvoTargetPanel.transform.Find("Label").GetComponent().text = systemText.Get("Battle_0117"); + List list = new List(); + list.Add(base.gameObject); + list.Add(FollowerPanel); + list.Add(EvoPanel); + list.Add(_buffPanelSprite.gameObject); + list.Add(EvoTargetPanel); + UIManager.GetInstance().AttachAtlas(list); + SetSize(OptionSettingWindow.GetBattleDetailPanelSizePercent()); + _followerPanel.Initialize(); + _followerEvoPanel.Initialize(); + _nonFollowerPanel.Initialize(); + } + + private void Update() + { + if (EvolutionButton.state == UIButtonColor.State.Pressed) + { + if (_predictionWaitTime.HasValue && _predictionWaitTime.Value + 0.2f < Time.realtimeSinceStartup) + { + _battleMgr.Prediction.Evolve(_card); + _predictionWaitTime = null; + } + } + else + { + _predictionWaitTime = null; + } + } + + private void OnTouchEvolutionButton(BattleCardBase card) + { + Hide(); + if (!_battleMgr.BattlePlayer.IsSelfTurn) + { + LocalLog.AccumulateLastTraceLog("OnTouchEvolutionButton selfTurn"); + return; + } + BattleLogManager instance = BattleLogManager.GetInstance(); + if (instance._clickSubLogItem != null) + { + instance._clickSubLogItem.OnUnClickLog(); + } + _battleMgr.BattlePlayer.PlayerBattleView._isEvolutionSkillSelect = true; + TouchControl touchControl = _battleMgr.TouchControl; + touchControl.RegisterTouchProcessor(touchControl.CreateEvolutionSimpleProcessor(card)); + _battleMgr.BattleUIContainer.DisableMenu(); + } + + private void OnTouchFusionButton(BattleCardBase card) + { + Hide(); + BattleLogManager instance = BattleLogManager.GetInstance(); + if (instance._clickSubLogItem != null) + { + instance._clickSubLogItem.OnUnClickLog(); + } + if (!_battleMgr.BattlePlayer.IsSelfTurn) + { + LocalLog.AccumulateLastTraceLog("OnTouchFusionButton selfTurn"); + return; + } + _battleMgr.TouchControl.RegisterTouchProcessor(new FusionSimpleProcessor(fusionSkill: card.Skills.FirstOrDefault((SkillBase s) => s is Skill_fusion), fusionMetamorphoseSkill: card.Skills.FirstOrDefault((SkillBase s) => s is Skill_fusion_metamorphose) as Skill_fusion_metamorphose, battleMgr: _battleMgr, card: card)); + _battleMgr.BattleUIContainer.DisableMenu(); + } + + public void Show(BattleManagerBase battleMgrBase, OperateMgr operateMgr, BattleCardBase card, ShowRequest showRequest) + { + BattleCoroutine.GetInstance().StartCoroutine(StartShow(battleMgrBase, operateMgr, card, showRequest)); + } + + public void ShowList(BattleManagerBase battleMgrBase, OperateMgr operateMgr, List cards, ShowRequest showRequest, BuffInfo buff, BattleLogItem.CardTextureOption textureOption = BattleLogItem.CardTextureOption.Null, string divergenceId = "", int logTextureId = 0) + { + BattleCoroutine.GetInstance().StartCoroutine(StartShow(battleMgrBase, operateMgr, cards[0], showRequest, textureOption, buff, divergenceId, logTextureId)); + if ((bool)_nextPanel && cards.Count > 1) + { + _nextPanel.SetParent(this); + List cards2 = new List(cards.GetRange(1, cards.Count - 1)); + _nextPanel.ShowList(battleMgrBase, operateMgr, cards2, showRequest, buff); + } + } + + public void CreateNextPanel() + { + GameMgr ins = GameMgr.GetIns(); + BattleManagerBase ins2 = BattleManagerBase.GetIns(); + GameObject gameObject = ins.GetGameObjMgr().AddUIContainerChildPrefab("Prefab/UI/DetailPanel"); + gameObject.transform.parent = ins2.BtlUIContainer.transform; + _nextPanel = gameObject.GetComponent(); + _nextPanel.SetParent(this); + } + + public void UpdateCardDescription() + { + if (!IsShow || _card == null || (_card.IsInHand && !_card.IsPlayer && !GameMgr.GetIns().IsAdminWatch && (CurrentShowRequest != ShowRequest.FUSION_INFO_CARD_LIST || !_isToGreyTextEnabled))) + { + return; + } + bool isSkipOption = CurrentShowRequest == ShowRequest.BATTLELOG || CurrentShowRequest == ShowRequest.DESTROYLOG || (CurrentShowRequest == ShowRequest.FUSION_INFO_CARD_LIST && !_isToGreyTextEnabled); + if (!_card.IsClass) + { + if (_card.IsUnit) + { + bool flag = GameMgr.GetIns().IsNewReplayBattle && _buff != null && _buff.IsCopied; + string skillDisc = (flag ? _card.CopiedSkillDescriptionInReplay(_buff, _buff.CopiedSkillDescriptionValueList) : _card.SkillDescription(null, isSkipOption, _buff, _divergenceId)); + string evoSkillDisc = ((IsEvolveToOtherCardLog || (_card.IsChoiceEvolutionCard && _logTextureId != 0)) ? CardMaster.GetInstanceForBattle().GetCardParameterFromId(_logTextureId).EvoSkillDescription : (flag ? _card.CopiedEvoSkillDescriptionInReplay(_buff, _buff.CopiedEvoSkillDescriptionValueList) : _card.EvoSkillDescription(null, isSkipOption, _buff))); + SetFollowerDetailLabel(skillDisc, evoSkillDisc, Underline.gameObject.activeSelf, resetScrollPosition: false); + } + else + { + SetDescLabelText(_nonFollowerPanel, _card.SkillDescription(null, isSkipOption, _buff, _divergenceId), NonFollowerFusionUnderline.gameObject.activeSelf, resetScrollPosition: false); + } + Window.SetActive(value: false); + Window.SetActive(value: true); + IsUpdateCardDescription = true; + } + } + + private void UpdateAvatarBattleBonusPanel() + { + if (!IsChoiceBraveRequest(CurrentShowRequest) || _card == null) + { + return; + } + _avatarBattleBonusBPLabel.text = _card.SelfBattlePlayer.Bp.ToString(); + BattlePlayerBase.AvatarBattleDescInfo passiveSkillDescInfo = (_card.IsPlayer ? _battleMgr.BattlePlayer.AvatarBattlePassiveSkillDescInfo : _battleMgr.BattleEnemy.AvatarBattlePassiveSkillDescInfo); + AvatarBattlePassiveBonusItem avatarBattlePassiveBonusItem = _cacheAvatarBattlePassiveBonusList.FirstOrDefault((AvatarBattlePassiveBonusItem cache) => cache.SkillDescInfo == passiveSkillDescInfo); + if (avatarBattlePassiveBonusItem != null) + { + avatarBattlePassiveBonusItem.SetText(_card); + } + List choiceBraveDescInfoList = (_card.IsPlayer ? _battleMgr.BattlePlayer.ChoiceBraveSkillDescInfoList : _battleMgr.BattleEnemy.ChoiceBraveSkillDescInfoList); + int i; + for (i = 0; i < choiceBraveDescInfoList.Count; i++) + { + AvatarBattleBonusItem avatarBattleBonusItem = _cacheAvatarBattleBonusList.FirstOrDefault((AvatarBattleBonusItem cache) => cache.SkillDescInfo == choiceBraveDescInfoList[i]); + if (avatarBattleBonusItem != null) + { + bool isNeedSeparator = _battleMgr.BattlePlayer.BattleView.IsShowCantChoiceBraveText || passiveSkillDescInfo.DescText != string.Empty || i != 0; + avatarBattleBonusItem.SetText(_card, isNeedSeparator); + } + } + } + + public void UpdateCardDescriptionOnEvent() + { + UpdateCardDescription(); + BattleManagerBase.GetIns().DetailMgr.SubDetailPanelControl.UpdateCardDescription(); + UpdateAvatarBattleBonusPanel(); + } + + public void UpdateCardDescriptionOnEvolutionEvent() + { + if (_card != null && !_card.IsChoiceEvolutionCard) + { + UpdateCardDescriptionOnEvent(); + } + } + + private IEnumerator StartShow(BattleManagerBase battleMgrBase, OperateMgr operateMgr, BattleCardBase card, ShowRequest showRequest, BattleLogItem.CardTextureOption textureOption = BattleLogItem.CardTextureOption.Null, BuffInfo buff = null, string divergenceId = "", int logTextureId = 0) + { + base.gameObject.SetActive(value: true); + RemoveCardEvent(card); + _card = card; + _battleMgr = battleMgrBase; + _operateMgr = operateMgr; + _text = Data.SystemText; + CurrentShowRequest = showRequest; + _buff = buff; + _divergenceId = divergenceId; + _logTextureId = logTextureId; + _isToGreyTextEnabled = GREY_TEXT_PATTERNS.Any((string pattern) => Regex.IsMatch(_card.BaseParameter.SkillDescription, pattern)); + if (IsEvolveToOtherCardLog || (card.IsChoiceEvolutionCard && logTextureId == 0)) + { + textureOption = BattleLogItem.CardTextureOption.ForceEvolution; + } + else if ((card.IsChoiceEvolutionCard || card.IsChoiceEvolutionCardBeforeUpdateBuildInfo) && logTextureId != 0) + { + textureOption = BattleLogItem.CardTextureOption.ForceNormal; + } + CardParameter baseParameter = ((IsEvolveToOtherCardLog || ((card.IsChoiceEvolutionCard || card.IsChoiceEvolutionCardBeforeUpdateBuildInfo) && logTextureId != 0)) ? CardMaster.GetInstanceForBattle().GetCardParameterFromId(logTextureId) : card.BaseParameter); + DetailPanelInfo currentPanel = _followerPanel; + if (!card.IsUnit) + { + currentPanel = _nonFollowerPanel; + currentPanel._classLabel.gameObject.SetActive(value: true); + currentPanel._myRotationInfo.SetActive(value: false); + } + GameMgr gameMgr = GameMgr.GetIns(); + DataMgr dataMgr = gameMgr.GetDataMgr(); + bool isSkipOption = showRequest == ShowRequest.BATTLELOG || showRequest == ShowRequest.DESTROYLOG || (CurrentShowRequest == ShowRequest.FUSION_INFO_CARD_LIST && !_isToGreyTextEnabled); + string text = string.Format("battle_card_info_{0}", ((dataMgr.m_BattleType != DataMgr.BattleType.Story && !GameMgr.GetIns().IsPuzzleQuest) ? (card.IsClass ? dataMgr.GetCharaPrmByCharaId((card as ClassBattleCardBase).CharaId).class_id : ((int)card.BaseParameter.Clan)) : ((!card.IsPlayer) ? (card.IsClass ? dataMgr.GetEnemyClassId() : ((int)card.BaseParameter.Clan)) : (card.IsClass ? dataMgr.GetCharaPrmByCharaId((card as ClassBattleCardBase).CharaId).class_id : ((int)card.BaseParameter.Clan)))).ToString("00")); + if (currentPanel._classBG.spriteName != text) + { + currentPanel._classBG.spriteName = text; + } + bool loaded = false; + Action cbOnLoaded = delegate + { + loaded = true; + }; + if (card.IsClass) + { + bool isSkinEvolved = battleMgrBase.GetBattlePlayer(card.IsPlayer).IsSkinEvolved; + LoadClassHeaderTexture((card as ClassBattleCardBase).CharaId, currentPanel._logImage, cbOnLoaded, isSkinEvolved); + } + else if (IsDestroyOrDeckCardList(showRequest) || textureOption == BattleLogItem.CardTextureOption.ForceNormal) + { + LoadCardHeaderTexture(baseParameter.NormalCardId, card.IsUnit, currentPanel._logImage, isEvolution: false, isBattleLogHeader: false, cbOnLoaded); + } + else if (textureOption == BattleLogItem.CardTextureOption.ForceEvolution) + { + LoadCardHeaderTexture(baseParameter.NormalCardId, card.IsUnit, currentPanel._logImage, isEvolution: true, isBattleLogHeader: false, cbOnLoaded); + } + else + { + LoadCardHeaderTexture(baseParameter.NormalCardId, card.IsUnit || (card.IsSpecialSkill && card.BaseParameter.CharType == CardBasePrm.CharaType.NORMAL), currentPanel._logImage, card.IsEvolution, isBattleLogHeader: false, cbOnLoaded); + } + while (!loaded) + { + yield return null; + } + ResetDetailPosition(); + if (!card.IsUnit) + { + FollowerPanel.SetActive(value: true); + EvoPanel.SetActive(value: false); + if (card.IsClass) + { + _nonFollowerPanel._costSprite.gameObject.SetActive(value: false); + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel.DiscLabel.gameObject.SetActive(value: false); + } + else if (card.IsSpecialSkill) + { + _nonFollowerPanel._costSprite.gameObject.SetActive(value: false); + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel.DiscLabel.gameObject.SetActive(value: true); + } + else + { + _nonFollowerPanel._costSprite.gameObject.SetActive(value: true); + bool flag = CardMaster.IsChoiceBraveCardCheck(baseParameter.CardId); + _nonFollowerPanel._costSprite.spriteName = (flag ? "icon_hbp" : "icon_pp"); + if (baseParameter.IsVariableCost) + { + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._signLabel.text = "-"; + _nonFollowerPanel._signedCostLabel.text = "X"; + } + else if (flag) + { + if (baseParameter.Cost == 0) + { + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.text = baseParameter.Cost.ToString(); + } + else + { + _nonFollowerPanel._costLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._signLabel.text = ((baseParameter.Cost > 0) ? "-" : "+"); + _nonFollowerPanel._signedCostLabel.text = Mathf.Abs(baseParameter.Cost).ToString(); + } + } + else + { + _nonFollowerPanel._costLabel.gameObject.SetActive(value: true); + _nonFollowerPanel._signLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._zeroCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._signedCostLabel.gameObject.SetActive(value: false); + _nonFollowerPanel._costLabel.text = baseParameter.Cost.ToString(); + } + _nonFollowerPanel.DiscLabel.gameObject.SetActive(value: true); + } + _normalLightFrame.SetActive(value: true); + _nonFollowerPanel._root.SetActive(value: true); + _followerPanel._root.SetActive(value: false); + _followerEvoPanel._root.SetActive(value: false); + } + else + { + FollowerPanel.SetActive(value: true); + _followerPanel._costLabel.text = baseParameter.Cost.ToString(); + FollowerAtkLabel.text = baseParameter.Atk.ToString(); + FollowerLifeLabel.text = baseParameter.Life.ToString(); + EvoPanel.SetActive(value: true); + EvoTitleLabel.text = _text.Get("Card_0038"); + EvoAtkLabel.text = baseParameter.EvoAtk.ToString(); + EvoLifeLabel.text = baseParameter.EvoLife.ToString(); + if (IsDestroyOrDeckCardList(showRequest)) + { + _normalLightFrame.SetActive(value: false); + _evoLightFrame.SetActive(value: false); + } + else + { + bool flag2 = card.IsEvolution; + switch (textureOption) + { + case BattleLogItem.CardTextureOption.ForceNormal: + flag2 = false; + break; + case BattleLogItem.CardTextureOption.ForceEvolution: + flag2 = true; + break; + } + _normalLightFrame.SetActive(!flag2); + _evoLightFrame.SetActive(flag2); + } + if (card.SelfBattlePlayer.IsSelfTurn && card.IsPlayer && card.IsInplay && card.AttackableCount <= 0) + { + _battleMgr.VfxMgr.RegisterImmediateVfx(card.BattleCardView.ShowAttackFinished()); + } + } + _avatarBattleBonusBPIconParent.gameObject.SetActive(IsChoiceBraveRequest(showRequest)); + AddCardEvent(card); + EvolutionConfigSetup(card, _text, showRequest); + if (card.IsUnit) + { + bool flag3 = GameMgr.GetIns().IsNewReplayBattle && buff != null && buff.IsCopied; + string skillDisc = (flag3 ? card.CopiedSkillDescriptionInReplay(buff, buff.CopiedSkillDescriptionValueList) : card.SkillDescription(null, isSkipOption, buff)); + string evoSkillDisc = ((IsEvolveToOtherCardLog || (card.IsChoiceEvolutionCard && logTextureId != 0)) ? baseParameter.EvoSkillDescription : (flag3 ? card.CopiedEvoSkillDescriptionInReplay(buff, buff.CopiedEvoSkillDescriptionValueList) : card.EvoSkillDescription(null, isSkipOption, buff))); + SetFollowerDetailLabel(skillDisc, evoSkillDisc, Underline.gameObject.activeSelf); + _buffRootWidget.topAnchor.target = _followerEvoPanel._bg.transform; + } + else if (card.IsClass) + { + SetDescLabelText(_nonFollowerPanel, card.SkillDescription(null, isSkipOption, divergenceId: _divergenceId, buff: _buff), needEvolutionOrFusionButton: false, resetScrollPosition: true, isClass: true); + _buffRootWidget.topAnchor.target = _nonFollowerPanel._bg.transform; + } + else + { + SetDescLabelText(_nonFollowerPanel, card.SkillDescription(null, isSkipOption, buff, _divergenceId), NonFollowerFusionUnderline.gameObject.activeSelf); + _buffRootWidget.topAnchor.target = _nonFollowerPanel._bg.transform; + } + _buffRootWidget.ResetAnchors(); + _buffRootWidget.UpdateAnchors(); + if (!card.IsUnit) + { + _nonFollowerPanel._scrollView.transform.localPosition = new Vector3(_nonFollowerPanel._scrollView.transform.localPosition.x, NONFOLOWER_SCROLLVIEW_POS_Y, _nonFollowerPanel._scrollView.transform.localPosition.z); + _nonFollowerPanel.DiscLabel.transform.localPosition = new Vector3(_nonFollowerPanel.DiscLabel.transform.localPosition.x, NONFOLOWER_DETAILLABEL_POS_Y, _nonFollowerPanel.DiscLabel.transform.localPosition.z); + } + if (card.IsClass) + { + ClassCharacterMasterData charaPrmByCharaId = dataMgr.GetCharaPrmByCharaId((card as ClassBattleCardBase).CharaId); + currentPanel._nameLabel.text = charaPrmByCharaId.chara_name; + if (charaPrmByCharaId.hide_class_name) + { + currentPanel._classLabel.text = ""; + } + else + { + currentPanel._classLabel.text = dataMgr.GetClanNameByKey((int)charaPrmByCharaId.clan); + if (card.IsPlayer) + { + if (dataMgr.GetPlayerSubClassId() != 10) + { + UILabel classLabel = currentPanel._classLabel; + classLabel.text = classLabel.text + "/" + dataMgr.GetClanNameByKey(dataMgr.GetPlayerSubClassId()); + } + if (dataMgr.TryGetPlayerMyRotationInfo(out var myRotationInfo)) + { + SetMyRotationLabel(currentPanel, dataMgr.GetPlayerCharaData(), myRotationInfo); + } + } + else + { + if (dataMgr.GetEnemySubClassId() != 10) + { + UILabel classLabel2 = currentPanel._classLabel; + classLabel2.text = classLabel2.text + "/" + dataMgr.GetClanNameByKey(dataMgr.GetEnemySubClassId()); + } + if (dataMgr.TryGetEnemyMyRotationInfo(out var myRotationInfo2)) + { + SetMyRotationLabel(currentPanel, dataMgr.GetEnemyCharaData(), myRotationInfo2); + } + } + } + } + else + { + currentPanel._nameLabel.text = (card.IsSpecialSkill ? Data.SystemText.Get("BossRush_0011", baseParameter.CardName) : baseParameter.CardName); + int clan = (int)baseParameter.Clan; + if (card.IsSpecialSkill) + { + currentPanel._classLabel.text = dataMgr.GetClanNameByKey(clan); + } + else + { + string tribeName = baseParameter.TribeName; + if (tribeName != null && tribeName == "ALL") + { + currentPanel._classLabel.text = dataMgr.GetClanNameByKey(clan); + } + else + { + currentPanel._classLabel.text = dataMgr.GetClanNameByKey(clan) + " / " + baseParameter.TribeName; + } + } + } + gameMgr.GetSoundMgr().PlaySe(Se.TYPE.SYS_CARD_INFO_SMALL); + List myRotationBonusConditionList = new List(); + List bossRushSpecialSkillList = new List(); + AvatarBattleInfo avatarBattleInfo = null; + if (card.IsClass) + { + myRotationBonusConditionList.AddRange(card.SelfBattlePlayer.BonusConditionList); + bossRushSpecialSkillList = card.SelfBattlePlayer.BossRushSpecialSkillList.Distinct().ToList(); + avatarBattleInfo = ((!card.SelfBattlePlayer.IsPlayer) ? _battleMgr.BattleEnemy.AvatarBattleInfo : _battleMgr.BattlePlayer.AvatarBattleInfo); + } + bool isShowBuffList = ((((!GameMgr.GetIns().IsNewReplayBattle) ? (card.BuffInfoList.Count > 0) : (card.ReplayBuffInfoList.Count > 0 || card.ReplayNoConsumeEpBuffInfoNameList.Count > 0 || card.ReplayBuffInfoLabelList.Count > 0)) || IsNeedNoConsumeEp(card)) && showRequest != ShowRequest.EVOLUTION_SELECT && ((showRequest != ShowRequest.BATTLELOG && showRequest != ShowRequest.FUSION_INFO_CARD_LIST) || card.IsClass) && !IsDestroyOrDeckCardList(showRequest) && showRequest != ShowRequest.BUFF_DETAIL) || myRotationBonusConditionList.Count > 0 || bossRushSpecialSkillList.Count > 0 || avatarBattleInfo != null; + bool isShowAnimation = !IsShow; + if (!IsShow) + { + IsShow = true; + iTween.Stop(MainPanel.gameObject); + yield return null; + if (IsShow) + { + MainPanel.alpha = 0f; + TweenAlpha.Begin(MainPanel.gameObject, 0.1f, 1f); + if (!isShowBuffList) + { + _buffRootWidget.gameObject.SetActive(value: false); + } + else + { + _buffRootWidget.gameObject.SetActive(value: true); + AddBuffInfo(card, showRequest, myRotationBonusConditionList, bossRushSpecialSkillList, avatarBattleInfo); + } + } + } + else if (!isShowBuffList) + { + _buffRootWidget.gameObject.SetActive(value: false); + } + SetupPanelTouchEvent(showRequest, baseParameter); + Window.SetActive(value: false); + Window.SetActive(value: true); + _buffScrollView.RestrictWithinBounds(instant: true); + _buffScrollView.ResetPosition(); + MainPanel.transform.localPosition = GetShowPos(showRequest); + if (card.IsClass && (showRequest == ShowRequest.BATTLELOG || showRequest == ShowRequest.FUSION_INFO_CARD_LIST)) + { + MainPanel.transform.position = new Vector3(MainPanel.transform.position.x, BattleLogManager.GetInstance()._logWindow.transform.position.y, MainPanel.transform.position.z); + MainPanel.transform.localPosition += BATTLELOG_BUFF_SAME_BOTTOM_OFFSET; + } + if (isShowAnimation) + { + iTween.MoveFrom(MainPanel.gameObject, iTween.Hash("x", MainPanel.transform.localPosition.x, "y", MainPanel.transform.localPosition.y - 5f, "z", MainPanel.transform.localPosition.z, "islocal", true, "time", 0.1f, "easetype", iTween.EaseType.easeOutCubic)); + } + UpdateParentAnchor(); + BattleLogManager.GetInstance()._logWindow.HideCardListPanel(); + } + + private void SetMyRotationLabel(DetailPanelInfo currentPanel, ClassCharacterMasterData classCharaData, MyRotationInfo myRotationInfo) + { + currentPanel._myRotationClassLabel.text = DeckData.CreateMyRotationClassName(classCharaData.class_id, myRotationInfo); + currentPanel._classLabel.gameObject.SetActive(value: false); + currentPanel._myRotationInfo.SetActive(value: true); + currentPanel._myRotationBonusIconOriginal.SetActive(value: false); + currentPanel._myRotationBonusIconGrid.transform.DestroyChildren(); + foreach (MyRotationInfo.MyRotationBonus ability in myRotationInfo.Abilities) + { + GameObject obj = NGUITools.AddChild(currentPanel._myRotationBonusIconGrid.gameObject, currentPanel._myRotationBonusIconOriginal); + obj.GetComponent().spriteName = ability.IconName; + obj.SetActive(value: true); + } + currentPanel._myRotationBonusIconGrid.Reposition(); + currentPanel._myRotationInfoGrid.Reposition(); + StartCoroutine(currentPanel._myRotationInfoGrid.RepositionNextFrame()); + } + + private Vector3 GetShowPos(ShowRequest showRequest) + { + return DefaultPanelPos + GetBuffWindowOffset(showRequest); + } + + private Vector3 GetBuffWindowOffset(ShowRequest showRequest) + { + switch (showRequest) + { + case ShowRequest.MULLIGAN: + _currentBuffWindowOffset = MULLIGAN_DETAIL; + break; + case ShowRequest.BATTLELOG: + case ShowRequest.DESTROYLOG: + case ShowRequest.DECK_SUMMON_CARD_LIST: + case ShowRequest.FUSION_INFO_CARD_LIST: + _currentBuffWindowOffset = BATTLELOG_DETAIL; + break; + case ShowRequest.BUFF_DETAIL: + if (BattleManagerBase.GetIns().DetailMgr.DetailPanelControl.IsDisplayedRight()) + { + SetScreenPosition(right: true); + _currentBuffWindowOffset = BUFF_LOG_DETAIL_LEFT; + } + else + { + _currentBuffWindowOffset = BUFF_LOG_DETAIL_RIGHT; + } + break; + default: + _currentBuffWindowOffset = Vector3.zero; + break; + } + return _currentBuffWindowOffset; + } + + public bool IsDisplayedRight() + { + UIAnchor component = base.transform.Find("AnchorL").GetComponent(); + if (component != null) + { + return component.side == UIAnchor.Side.TopRight; + } + return false; + } + + private void SetupPanelTouchEvent(ShowRequest showRequest, CardParameter baseParameter) + { + SetDetailKeywordEvents(null, _card, baseParameter, this); + UIEventListener.Get(_buffPanelCollider.gameObject).onClick = null; + if (ShowRequest.EVOLUTION_SELECT != showRequest && _hasKeyword) + { + SetDetailKeywordEvents(battleButtonControl.OnPressKeyBtn, _card, baseParameter, this); + } + } + + public VfxBase ShowEvolutionButton(BattleCardBase card) + { + return InstantVfx.Create(delegate + { + EvoTargetPanel.transform.parent = card.BattleCardView.Transform; + EvoTargetPanel.transform.localPosition = new Vector3(0f, 18.5f, -1f); + EvoTargetPanel.SetActive(value: true); + GameMgr.GetIns().GetEffectMgr().StartBuff(EffectMgr.EffectType.CMN_FRAME_BTN_2, EvoTargetPanel); + EvoTargetPanel.transform.localScale = new Vector3(1.6f, 1.6f, 1.6f); + EvoTargetPanel.transform.localEulerAngles = new Vector3(0f, 0f, 0f); + }); + } + + private void EvolutionConfigSetup(BattleCardBase targetCard, SystemText text, ShowRequest showRequest) + { + UIButton uIButton = (targetCard.IsUnit ? FusionButton : NonFollowerFusionButton); + UILabel uILabel = (targetCard.IsUnit ? _fusionButtonUiLabel : _nonFollowerFusionButtonUiLabel); + UISprite uISprite = (targetCard.IsUnit ? Underline : NonFollowerFusionUnderline); + if (GameMgr.GetIns().IsWatchBattle) + { + uISprite.gameObject.SetActive(value: false); + uIButton.gameObject.SetActive(value: false); + uILabel.gameObject.SetActive(value: false); + EvolutionButton.gameObject.SetActive(value: false); + EvolutionComment.gameObject.SetActive(value: false); + return; + } + if (showRequest == ShowRequest.NORMAL && targetCard.IsInHand && targetCard.SelfBattlePlayer.IsSelfTurn && targetCard.HasFusionSkill) + { + uISprite.gameObject.SetActive(value: true); + uIButton.isEnabled = targetCard.IsFusionable; + uIButton.UpdateColor(instant: true); + uIButton.gameObject.SetActive(value: true); + EvolutionButton.gameObject.SetActive(value: false); + EvolutionComment.gameObject.SetActive(value: false); + return; + } + if (showRequest == ShowRequest.EVOLUTION_SELECT || showRequest == ShowRequest.BATTLELOG || IsDestroyOrDeckCardList(showRequest) || showRequest == ShowRequest.BUFF_DETAIL || showRequest == ShowRequest.FUSION_INFO_CARD_LIST || targetCard.IsEvolution || !targetCard.IsUnit || !targetCard.IsInplay || !targetCard.SelfBattlePlayer.IsSelfTurn || !targetCard.IsPlayer) + { + uISprite.gameObject.SetActive(value: false); + EvolutionButton.gameObject.SetActive(value: false); + EvolutionComment.gameObject.SetActive(value: false); + uIButton.gameObject.SetActive(value: false); + return; + } + EvolutionButton.UpdateColor(instant: true); + uIButton.gameObject.SetActive(value: false); + if (!targetCard.SelfBattlePlayer.NowTurnEvol) + { + uISprite.gameObject.SetActive(value: true); + EvolutionButton.isEnabled = false; + EvolutionButton.gameObject.SetActive(value: true); + EvolutionComment.gameObject.SetActive(value: false); + } + else if (targetCard.SelfBattlePlayer.EvolveWaitTurnCount > 0) + { + uISprite.gameObject.SetActive(value: true); + EvolutionComment.text = text.Get("Battle_0114", targetCard.SelfBattlePlayer.EvolveWaitTurnCount.ToString()); + EvolutionComment.gameObject.SetActive(value: true); + EvolutionButton.gameObject.SetActive(value: false); + } + else if (targetCard.CanEvolution(isSkill: false, isSelfBattlePlayer: true) && targetCard.IsInplay && !_battleMgr.IsStopOperate) + { + uISprite.gameObject.SetActive(value: true); + EvolutionButton.isEnabled = targetCard.AreCanEvolveConditionsFulfilled; + EvolutionButton.gameObject.SetActive(value: true); + EvolutionComment.gameObject.SetActive(value: false); + } + else + { + uISprite.gameObject.SetActive(value: true); + EvolutionButton.isEnabled = false; + EvolutionButton.gameObject.SetActive(value: true); + EvolutionComment.gameObject.SetActive(value: false); + } + } + + public void Hide() + { + StartHide(); + } + + private void StartHide() + { + SetSize(OptionSettingWindow.GetBattleDetailPanelSizePercent()); + if (_battleMgr != null) + { + _battleMgr.BattlePlayer.IsShowBuffDetail = false; + _battleMgr.BattleEnemy.IsShowBuffDetail = false; + if (_card != null) + { + _card.IsShowBuffDetail = false; + } + } + IsShow = false; + _isToGreyTextEnabled = false; + ResetUpdateCardDescriptionFlag(); + this.OnHideOneTime.Call(); + this.OnHideOneTime = null; + RemoveCardEvent(_card); + EvoTargetPanel.SetActive(value: false); + GameMgr.GetIns().GetEffectMgr().Stop(EffectMgr.EffectType.CMN_FRAME_BTN_2); + MainPanel.alpha = 0f; + MainPanel.transform.localPosition = DefaultPanelPos + Vector3.left * 10000f; + iTween.Stop(MainPanel.gameObject); + _buffScrollView.currentMomentum = Vector3.zero; + _card = null; + base.gameObject.SetActive(value: false); + _nonFollowerPanel._scrollView.currentMomentum = new Vector3(0f, 0f, 0f); + _nonFollowerPanel._scrollView.DisableSpring(); + _followerEvoPanel._root.SetActive(value: false); + _nonFollowerPanel._root.SetActive(value: false); + _followerEvoPanel._root.SetActive(value: false); + if ((bool)_nextPanel) + { + _nextPanel.StartHide(); + } + BattleManagerBase.GetIns().DetailMgr.SubDetailPanel.gameObject.SetActive(value: false); + battleButtonControl.HideKeyWordDialog(isNotCloseEvent: false); + } + + private void ResetDetailPosition() + { + FollowerPanel.transform.localPosition = DefaultNorPanelPos; + EvoPanel.transform.localPosition = DefaultEvoPanelPos; + } + + private void AddBuffInfo(BattleCardBase targetCard, ShowRequest request, List myRotationBonusList, List bossRushSpecialSkillList, AvatarBattleInfo avatarBattleInfo) + { + if (_card != null) + { + SetupAllBuffPanel(targetCard, GetBuffWindowOffset(request).y, myRotationBonusList, bossRushSpecialSkillList, avatarBattleInfo, isUpdate: false, IsChoiceBraveRequest(request)); + } + } + + public void UpdateBuffInfo(BattleCardBase targetCard, List myRotationBonusList) + { + if (!IsShow) + { + return; + } + List bossRushSkillList = new List(); + AvatarBattleInfo avatarBattleInfo = null; + if (targetCard.IsClass) + { + bossRushSkillList = targetCard.SelfBattlePlayer.BossRushSpecialSkillList.Distinct().ToList(); + avatarBattleInfo = ((!targetCard.SelfBattlePlayer.IsPlayer) ? _battleMgr.BattleEnemy.AvatarBattleInfo : _battleMgr.BattlePlayer.AvatarBattleInfo); + } + if ((GameMgr.GetIns().IsNewReplayBattle ? (targetCard.ReplayBuffInfoList.Count == 0) : (targetCard.BuffInfoList.Count == 0)) && myRotationBonusList.Count == 0 && avatarBattleInfo == null) + { + _buffRootWidget.gameObject.SetActive(value: false); + return; + } + if (!_buffRootWidget.gameObject.activeSelf) + { + _buffRootWidget.gameObject.SetActive(value: true); + } + SetupAllBuffPanel(targetCard, _currentBuffWindowOffset.y, myRotationBonusList, bossRushSkillList, avatarBattleInfo, isUpdate: true, avatarBattleInfo != null); + } + + public void UpdateLogItemBuffInfo(BattleCardBase targetCard) + { + List list = targetCard.ReplayBuffInfoList.Where((BuffInfo b) => b.IsCopied).ToList(); + for (int num = 0; num < list.Count; num++) + { + BuffInfo buffInfo = list[num]; + BattleLogItem logFromCacheLogList = GetLogFromCacheLogList(buffInfo, (!buffInfo.IsCopiedEvolutionSkill) ? BattleLogItem.CardTextureOption.ForceNormal : BattleLogItem.CardTextureOption.ForceEvolution, buffInfo.DivergenceId, checkActive: false); + if (logFromCacheLogList != null) + { + logFromCacheLogList.SetBuff(buffInfo); + } + } + } + + private void MakeCardLogItem(BuffInfo buff, Transform contentsParent, ref ItemCursor itemCursor) + { + if (buff.IsHiddenClassLogSkill) + { + return; + } + BattleCardBase battleCardBase = buff.OwnerCard; + bool flag = (buff.IsCopied && buff.IsCopiedEvolutionSkill) || (!buff.IsCopied && buff.IsEvolutionSkill); + if (battleCardBase.IsClass) + { + flag = battleCardBase.SelfBattlePlayer.IsSkinEvolved; + } + BattleLogItem.CardTextureOption textureOption = ((!flag) ? BattleLogItem.CardTextureOption.ForceNormal : BattleLogItem.CardTextureOption.ForceEvolution); + string divergenceId = string.Empty; + if (buff.SkillFrom != null || GameMgr.GetIns().IsNewReplayBattle) + { + divergenceId = buff.DivergenceId; + } + BattleLogItem battleLogItem = GetLogFromCacheLogList(buff, textureOption, divergenceId); + if (battleLogItem == null) + { + if (_cacheLogList.Count > 50) + { + for (int num = _cacheLogList.Count - 1; num >= 0; num--) + { + BattleLogItem battleLogItem2 = _cacheLogList[num]; + if (!battleLogItem2.gameObject.activeSelf) + { + UnityEngine.Object.Destroy(battleLogItem2.gameObject); + _cacheLogList.RemoveAt(num); + } + } + } + bool? isPlayer = null; + if (buff.IsCopied && buff.SkillFrom != null) + { + isPlayer = buff.IsPlayer; + } + if (buff.PreviousOwner != null) + { + battleCardBase = buff.PreviousOwner; + } + if (buff.IsSaveBurialRiteSkill || buff.IsGetonSkill || buff.IsReserveTokenDrawSkill) + { + battleCardBase = ((!GameMgr.GetIns().IsNewReplayBattle) ? battleCardBase.SelfBattlePlayer.BattleMgr.CreateTransformCardRegisterVfx(battleCardBase, buff.BaseCardIDFrom, _card.IsPlayer) : buff.TargetCard); + } + battleLogItem = BattleLogManager.CreateBuffLogItem(battleCardBase, battleCardBase, buff, isPlayer, buff.IsReserveTokenDrawSkill, textureOption, buff.CardIDFrom); + if (buff.IsReserveTokenDrawSkill) + { + battleLogItem.UpdateLogType(Wizard.Battle.UI.LogType.ReserveToken); + } + battleLogItem.SetLogSkill(buff.SkillFrom); + _cacheLogList.Add(battleLogItem); + } + else if (GameMgr.GetIns().IsNewReplayBattle && buff.IsCopied) + { + battleLogItem.SetBuff(buff); + } + battleLogItem.transform.SetParent(contentsParent); + battleLogItem.transform.localScale = Vector3.one; + battleLogItem.SetDivergenceId(divergenceId); + float y = itemCursor.AddAndGetCenterOffset(47f); + battleLogItem.transform.localPosition = new Vector3(buff.IsReserveTokenDrawSkill ? battleLogItem.GetPosX() : 0f, y, 0f); + battleLogItem.gameObject.SetActive(value: true); + _drawLogList.Add(battleLogItem.gameObject); + battleLogItem.SetSelectSpriteActive(setActive: false); + } + + private BattleLogItem GetLogFromCacheLogList(BuffInfo buff, BattleLogItem.CardTextureOption textureOption, string divergenceId, bool checkActive = true) + { + return _cacheLogList.FirstOrDefault(delegate(BattleLogItem cache) + { + if (cache.gameObject.activeSelf && checkActive) + { + return false; + } + bool flag = cache.IsCopiedBuff(); + if (buff.IsCopied != flag) + { + return false; + } + BattleCardBase card = cache.GetCard(); + if (buff.IsCopied && buff.PreviousOwner != null && buff.PreviousOwner == card && _card.IsPlayer != cache.IsPlayer && cache.GetTextureOption() == textureOption && buff.OwnerCard == cache.Buff.OwnerCard) + { + return true; + } + bool flag2 = (buff.IsGetonSkill || buff.IsSaveBurialRiteSkill || buff.IsReserveTokenDrawSkill) && cache.GetLogSkill() == buff.SkillFrom && card.BaseParameter.CardId == buff.BaseCardIDFrom && cache.GetTextureOption() == textureOption; + if (GameMgr.GetIns().IsNewReplayBattle) + { + if (buff.IsReserveTokenDrawSkill) + { + flag2 &= buff.TargetCard != null && buff.TargetCard == card; + } + else if (buff.IsGetonSkill || buff.IsSaveBurialRiteSkill) + { + flag2 &= buff.IsPlayer == cache.IsPlayer; + } + } + if (flag2) + { + return true; + } + if (buff.IsReserveTokenDrawSkill) + { + return false; + } + return !buff.IsCopied && card == buff.OwnerCard && card.IsPlayer == cache.IsPlayer && cache.GetTextureOption() == textureOption && cache.DivergenceId == divergenceId && cache.GetBuffMomentCardId() == buff.CardIDFrom; + }); + } + + private void MakeCardLogItemNoConsumeEp(BattleCardBase card, Transform contentsParent, ref ItemCursor itemCursor) + { + BattleLogItem.CardTextureOption textureOption = ((!card.IsEvolution) ? BattleLogItem.CardTextureOption.ForceNormal : BattleLogItem.CardTextureOption.ForceEvolution); + BattleLogItem battleLogItem = BattleLogManager.CreateBuffLogItem(card, card, null, card.IsPlayer, useSmall: false, textureOption); + battleLogItem.UpdateLogType(Wizard.Battle.UI.LogType.NotConsumeEp); + battleLogItem.transform.SetParent(contentsParent); + battleLogItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(47f); + battleLogItem.transform.localPosition = new Vector3(0f, y, 0f); + battleLogItem.gameObject.SetActive(value: true); + _drawLogList.Add(battleLogItem.gameObject); + battleLogItem.SetSelectSpriteActive(setActive: false); + } + + private void MakeMyRotationBonusItem(BattleCardBase classCard, BattlePlayerBase.MyRotationBonusCondition myRotationBonusCondition, bool needSeparator, ref ItemCursor itemCursor) + { + MyRotationBonusItem myRotationBonusItem = _cacheMyRotationLogList.FirstOrDefault(delegate(MyRotationBonusItem cache) + { + if (cache.gameObject.activeSelf) + { + return false; + } + return myRotationBonusCondition.MyRotationBonus.AbilityId == cache.MyRotationBonusCondition.MyRotationBonus.AbilityId && classCard.IsPlayer == cache.IsPlayer; + }); + if (myRotationBonusItem == null) + { + if (_cacheLogList.Count > 50) + { + for (int num = _cacheLogList.Count - 1; num >= 0; num--) + { + BattleLogItem battleLogItem = _cacheLogList[num]; + if (!battleLogItem.gameObject.activeSelf) + { + UnityEngine.Object.Destroy(battleLogItem.gameObject); + _cacheLogList.RemoveAt(num); + } + } + } + myRotationBonusItem = BattleLogManager.CreateMyRotationBonusItem(myRotationBonusCondition, classCard.IsPlayer, needSeparator); + _cacheMyRotationLogList.Add(myRotationBonusItem); + } + else + { + myRotationBonusItem.setIconActive(); + } + myRotationBonusItem.transform.SetParent(_myRotationBonusContentsParent); + myRotationBonusItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(54f); + myRotationBonusItem.transform.localPosition = new Vector3(0f, y, 0f); + myRotationBonusItem.gameObject.SetActive(value: true); + _drawLogList.Add(myRotationBonusItem.gameObject); + } + + private bool IsSameBuffLog(BuffInfo buffA, BuffInfo buffB) + { + if (buffA.IsCopied != buffB.IsCopied) + { + return false; + } + if (buffA.IsCopied) + { + return buffA.PreviousOwner == buffB.PreviousOwner; + } + BattleCardBase ownerCard = buffA.SkillFrom.SkillPrm.ownerCard; + BattleCardBase ownerCard2 = buffB.SkillFrom.SkillPrm.ownerCard; + if (!ownerCard.EquelsID(ownerCard2)) + { + return false; + } + if (ownerCard.CardId != buffA.CardIDFrom && buffA.CardIDFrom != buffB.CardIDFrom) + { + return false; + } + if (ownerCard.IsChoiceBraveSkillCard || ownerCard2.IsChoiceBraveSkillCard) + { + return ownerCard == ownerCard2; + } + if (buffA.PreviousOwner != null && buffB.PreviousOwner != null) + { + return buffA.PreviousOwner.CardId == buffB.PreviousOwner.CardId; + } + return buffA.PreviousOwner == buffB.PreviousOwner; + } + + private float SetupBuffContent(BattleCardBase targetCard, Transform contentsParent, ref ItemCursor itemCursor) + { + List buffInfoList = targetCard.BuffInfoList; + List source = ((!GameMgr.GetIns().IsNewReplayBattle) ? GetDistinctBuffList(buffInfoList) : targetCard.ReplayBuffInfoList); + if (GameMgr.GetIns().IsNewReplayBattle) + { + for (int i = 0; i < targetCard.ReplayNoConsumeEpBuffInfoNameList.Count; i++) + { + MakeCardLogItemNoConsumeEp(targetCard.ReplayNoConsumeEpBuffInfoNameList[i], contentsParent, ref itemCursor); + } + } + else if (IsNeedNoConsumeEp(targetCard)) + { + IEnumerable source2 = targetCard.SelfBattlePlayer.InPlayCards.Where((BattleCardBase c) => c.SkillApplyInformation.NotConsumeEpModifierInfoList.Any((NotConsumeEpModifierInfo b) => b.TargetCard == null && b.CheckNotConsumedCard(targetCard))); + for (int num = 0; num < source2.Count(); num++) + { + MakeCardLogItemNoConsumeEp(source2.ElementAt(num), contentsParent, ref itemCursor); + } + } + List list = source.Where((BuffInfo b) => !b.IsCopied && !b.IsSaveBurialRiteSkill && !b.IsGetonSkill && b.SpecialSkillInfo == null).ToList(); + for (int num2 = 0; num2 < list.Count; num2++) + { + MakeCardLogItem(list[num2], contentsParent, ref itemCursor); + } + List list2 = source.Where((BuffInfo b) => b.IsCopied).ToList(); + if (list2.Count > 0) + { + MakeHeadlineLabel(ref _copiedLabel, Data.SystemText.Get("BattleLog_0266"), contentsParent, ref itemCursor); + MakeLogItems(list2, contentsParent, ref itemCursor); + } + List list3 = source.Where((BuffInfo b) => b.IsSaveBurialRiteSkill).ToList(); + if (list3.Count > 0) + { + MakeHeadlineLabel(ref _saveBurialRiteLabel, Data.SystemText.Get("BattleLog_0269"), contentsParent, ref itemCursor); + MakeLogItems(list3, contentsParent, ref itemCursor); + } + List list4 = source.Where((BuffInfo b) => b.IsGetonSkill).ToList(); + if (list4.Count > 0) + { + MakeHeadlineLabel(ref _getonCardLabel, Data.SystemText.Get("BattleLog_0272"), contentsParent, ref itemCursor); + MakeLogItems(list4, contentsParent, ref itemCursor); + } + if ((!GameMgr.GetIns().IsNewReplayBattle) ? BuffDetailInfoUI.NeedBuffDetailText(targetCard) : (targetCard.ReplayBuffInfoLabelList.Count > 0)) + { + if (_buffDetailInfoUI == null) + { + _buffDetailInfoUI = (UnityEngine.Object.Instantiate(Resources.Load("Prefab/UI/Log/SkillDetailLabel")) as GameObject).GetComponent(); + _buffDetailInfoUI.Initialize(); + } + _buffDetailInfoUI.gameObject.SetActive(value: true); + _buffDetailInfoUI.transform.SetParent(contentsParent); + _buffDetailInfoUI.transform.localScale = Vector3.one; + _drawLogList.Add(_buffDetailInfoUI.gameObject); + if (GameMgr.GetIns().IsNewReplayBattle) + { + _buffDetailInfoUI.SetBuffDetailLabelInReplay(targetCard.ReplayBuffInfoLabelList, targetCard); + } + else + { + _buffDetailInfoUI.SetBuffDetailLabel(targetCard); + } + float y = itemCursor.AddAndGetTopOffset(_buffDetailInfoUI.Height); + _buffDetailInfoUI.transform.localPosition = new Vector3(0f, y, 0f); + } + return itemCursor.Height; + } + + public List GetDistinctBuffList(List buffInfoList) + { + List list = new List(); + int i; + for (i = 0; i < buffInfoList.Count; i++) + { + if (buffInfoList[i].IsReserveTokenDrawSkill) + { + BuffInfo buffInfo = list.LastOrDefault(); + if (buffInfo == null || buffInfoList[i].SkillFrom.GetAttachSkill == null || buffInfo.SkillFrom.SkillPrm.ownerCard.Index == buffInfoList[i].SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index || (buffInfo.SkillFrom.GetAttachSkill != null && buffInfo.SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index == buffInfoList[i].SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index && buffInfo.SkillFrom.HasIndividualId)) + { + list.Add(buffInfoList[i]); + continue; + } + BuffInfo buffInfo2 = list.LastOrDefault((BuffInfo b) => b.SkillFrom.SkillPrm.ownerCard.Index == buffInfoList[i].SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index || (b.SkillFrom.GetAttachSkill != null && b.SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index == buffInfoList[i].SkillFrom.GetAttachSkill.SkillPrm.ownerCard.Index && b.SkillFrom.HasIndividualId)); + if (buffInfo2 == null) + { + buffInfo2 = list.LastOrDefault((BuffInfo b) => b.IsReserveTokenDrawSkill || b.SkillFrom.SkillPrm.ownerCard.BaseParameter.BaseCardId == buffInfoList[i].SkillFrom.SkillPrm.ownerCard.BaseParameter.BaseCardId); + } + list.Insert(list.IndexOf(buffInfo2) + 1, buffInfoList[i]); + } + else if ((!(buffInfoList[i].SkillFrom is Skill_token_draw_modifier) || !list.Any((BuffInfo b) => b.BaseCardIDFrom == buffInfoList[i].BaseCardIDFrom)) && !list.Any((BuffInfo b) => IsSameBuffLog(b, buffInfoList[i]))) + { + list.Add(buffInfoList[i]); + } + } + return list; + } + + public List GetBuffDetailLabel(BattleCardBase card) + { + List list = new List(); + if (!BuffDetailInfoUI.NeedBuffDetailText(card)) + { + return list; + } + List allBuffSkills = BuffDetailInfoUI.GetAllBuffSkills(card, card.BuffInfoList.Select((BuffInfo b) => b.SkillFrom).ToList()); + if (card.Cost != card.BaseCost) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Cost)); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_powerup || s is Skill_power_down) && (card.GetCurrentAtkBuff() != 0 || card.GetCurrentLifeBuff() != 0)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.StatusBuff)); + } + bool flag = false; + if (allBuffSkills.Any((SkillBase s) => s is Skill_quick && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Quick)); + flag = true; + } + bool flag2 = false; + if (allBuffSkills.Any((SkillBase s) => s is Skill_rush && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Rush)); + flag2 = true; + } + bool flag3 = false; + if (allBuffSkills.Any((SkillBase s) => s is Skill_killer && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Killer)); + flag3 = true; + } + bool flag4 = false; + if (allBuffSkills.Any((SkillBase s) => s is Skill_drain && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Drain)); + flag4 = true; + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_attack_count && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.AttackCount, card.MaxAttackableCount)); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_ignore_guard && (!card.IsInHand || s.OnWhenPlayStart == 0))) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.IgnoreGuard)); + } + if (allBuffSkills.Any((SkillBase s) => s is Skill_consume_ep_modifier && (!card.IsInHand || s.OnWhenPlayStart == 0)) || BuffDetailInfoUI.NeedNoConsumeEpText(card)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.ConsumeEpModifier)); + } + if (BuffDetailInfoUI.ExistCopiedSkillNeedDetailText(card)) + { + IEnumerable source = card.BuffInfoList.Where((BuffInfo b) => b.IsCopied); + for (int num = 0; num < source.Count(); num++) + { + if (!(source.ElementAt(num).SkillFrom is SkillBaseCopy skillBaseCopy)) + { + continue; + } + switch (skillBaseCopy.SkillType) + { + case "rush": + if (!flag2) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Rush)); + } + break; + case "quick": + if (!flag) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Quick)); + } + break; + case "killer": + if (!flag3) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Killer)); + } + break; + case "drain": + if (!flag4) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.Drain)); + } + break; + } + } + } + IEnumerable source2 = from s in allBuffSkills + where s is Skill_shield && (!card.IsInHand || s.OnWhenPlayStart == 0) + select (Skill_shield)s; + if (source2.Any()) + { + if (source2.Any((Skill_shield s) => s.IsAllDamageShield)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageShield)); + } + if (source2.Any((Skill_shield s) => s.IsNextDamageShield)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageShield)); + } + if (source2.Any((Skill_shield s) => s.IsSkillDamageShield)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageShield)); + } + if (source2.Any((Skill_shield s) => s.IsSpellDamageShield)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.SpellDamageShield)); + } + } + List source3 = (from s in allBuffSkills + where s is Skill_damage_cut && (!card.IsInHand || s.OnWhenPlayStart == 0) + select (Skill_damage_cut)s).ToList(); + if (source3.Any()) + { + if (source3.Any((Skill_damage_cut s) => s.IsAllDamageCut)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.AllDamageCut, source3.Where((Skill_damage_cut s) => s.IsAllDamageCut).Sum((Skill_damage_cut s) => s.CutAmount))); + } + if (source3.Any((Skill_damage_cut s) => s.IsNextDamageCut)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.NextDamageCut, source3.Where((Skill_damage_cut s) => s.IsNextDamageCut).Sum((Skill_damage_cut s) => s.CutAmount))); + } + if (source3.Any((Skill_damage_cut s) => s.IsSkillDamageCut)) + { + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.SkillDamageCut, source3.Where((Skill_damage_cut s) => s.IsSkillDamageCut).Sum((Skill_damage_cut s) => s.CutAmount))); + } + if (source3.Any((Skill_damage_cut s) => s.IsDamageClipping)) + { + List list2 = (from s in source3 + where s.ClippingMax != int.MaxValue + select s.ClippingMax).ToList(); + list2.AddRange(from s in source3 + where s.LifeLowerLimit != -1 + select s.SkillPrm.ownerCard.Life - 1); + list.Add(new NetworkBattleReceiver.ReplayBuffInfoLabel(NetworkBattleReceiver.ReplayBuffInfoTextType.DamageClipping, list2.Min())); + } + } + return list; + } + + private float SetupMyRotationBonusContent(BattleCardBase targetCard, List myRotationBonusList) + { + ItemCursor itemCursor = new ItemCursor(0f); + if (myRotationBonusList != null) + { + for (int i = 0; i < myRotationBonusList.Count; i++) + { + MakeMyRotationBonusItem(targetCard, myRotationBonusList[i], i > 0, ref itemCursor); + } + } + return itemCursor.Height; + } + + private float SetupAvatarBattleBonusContent(BattleCardBase targetCard, AvatarBattleInfo avatarBattleInfo) + { + ItemCursor itemCursor = new ItemCursor(0f); + if (avatarBattleInfo == null) + { + return itemCursor.Height; + } + MakeAvatarBattleBonusTitleLogItem(Data.SystemText.Get("Battle_0522"), isBuffTitle: false, ref itemCursor); + AvatarBattleInfo.AvatarBattleBonus bonus = avatarBattleInfo.Bonus; + string allAbilityDesc = bonus.PassiveAbilityDesc + string.Join("", bonus.AbilityDesc); + MakeAvatarBattlePassiveBonusLogItem(targetCard, allAbilityDesc, ref itemCursor); + for (int i = 0; i < targetCard.SelfBattlePlayer.ChoiceBraveSkillDescInfoList.Count(); i++) + { + bool isNeedSeparator = _battleMgr.BattlePlayer.BattleView.IsShowCantChoiceBraveText || bonus.PassiveAbilityDesc != string.Empty || i != 0; + MakeAvatarBattleBonusLogItem(targetCard.SelfBattlePlayer.ChoiceBraveSkillDescInfoList[i], allAbilityDesc, isNeedSeparator, targetCard, ref itemCursor); + } + if (CurrentShowRequest == ShowRequest.CHOICE_BRAVE_AND_BUFF) + { + string buffTitleText = Data.SystemText.Get("Battle_0495"); + ItemCursor itemCursor2 = itemCursor.Clone(); + MakeAvatarBattleBonusTitleLogItem(buffTitleText, isBuffTitle: true, ref itemCursor); + float height = itemCursor.Height; + SetupBuffContent(targetCard, _avatarBattleBonusContentsParent, ref itemCursor); + if (itemCursor.Height - height <= 0f) + { + _cacheAvatarBattleTitleList.FirstOrDefault((AvatarBattleTitleItem cache) => cache.TitleText == buffTitleText).gameObject.SetActive(value: false); + itemCursor = itemCursor2; + } + } + return itemCursor.Height; + } + + private float MakeAvatarBattleBonusTitleLogItem(string titleText, bool isBuffTitle, ref ItemCursor itemCursor) + { + AvatarBattleTitleItem avatarBattleTitleItem = _cacheAvatarBattleTitleList.FirstOrDefault((AvatarBattleTitleItem cache) => cache.TitleText == titleText); + if (avatarBattleTitleItem == null) + { + avatarBattleTitleItem = ((!isBuffTitle) ? BattleLogManager.CreateAvatarBattleBonusTitleItem(titleText, _avatarBattleBonusScrollView) : BattleLogManager.CreateAvatarBattleBuffTitleItem(titleText, _avatarBattleBonusScrollView)); + _cacheAvatarBattleTitleList.Add(avatarBattleTitleItem); + } + avatarBattleTitleItem.transform.SetParent(_avatarBattleBonusContentsParent); + avatarBattleTitleItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(avatarBattleTitleItem.Height); + avatarBattleTitleItem.transform.localPosition = new Vector3(0f, y, 0f); + avatarBattleTitleItem.gameObject.SetActive(value: true); + _drawLogList.Add(avatarBattleTitleItem.gameObject); + return itemCursor.Height; + } + + private float MakeAvatarBattleBonusLogItem(BattlePlayerBase.AvatarBattleDescInfo skillDescInfo, string allAbilityDesc, bool isNeedSeparator, BattleCardBase targetCard, ref ItemCursor itemCursor) + { + AvatarBattleBonusItem avatarBattleBonusItem = _cacheAvatarBattleBonusList.FirstOrDefault((AvatarBattleBonusItem cache) => cache.SkillDescInfo == skillDescInfo); + if (avatarBattleBonusItem == null) + { + avatarBattleBonusItem = BattleLogManager.CreateAvatarBattleBonusItem(skillDescInfo, _avatarBattleBonusScrollView, isNeedSeparator, targetCard); + if (BattleKeywordInfoListMgr.GetKeywords(allAbilityDesc).Any((string word) => Data.Master.BattleKeyWordDic.ContainsKey(word))) + { + UIEventListener.Get(avatarBattleBonusItem.DescLabel.gameObject).onClick = delegate(GameObject obj) + { + battleButtonControl.OnPressKeyBtn(allAbilityDesc, obj); + }; + BattlePlayerView.SetKeyWordColor(avatarBattleBonusItem.DescLabel.gameObject, avatarBattleBonusItem.DescLabel); + } + _cacheAvatarBattleBonusList.Add(avatarBattleBonusItem); + } + else + { + avatarBattleBonusItem.SetText(targetCard, isNeedSeparator); + } + avatarBattleBonusItem.transform.SetParent(_avatarBattleBonusContentsParent); + avatarBattleBonusItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(avatarBattleBonusItem.Height); + avatarBattleBonusItem.transform.localPosition = new Vector3(0f, y, 0f); + avatarBattleBonusItem.gameObject.SetActive(value: true); + _drawLogList.Add(avatarBattleBonusItem.gameObject); + return itemCursor.Height; + } + + private float MakeAvatarBattlePassiveBonusLogItem(BattleCardBase targetCard, string allAbilityDesc, ref ItemCursor itemCursor) + { + BattlePlayerBase.AvatarBattleDescInfo passiveSkillDescInfo = targetCard.SelfBattlePlayer.AvatarBattlePassiveSkillDescInfo; + if (!_battleMgr.BattlePlayer.BattleView.IsShowCantChoiceBraveText && (passiveSkillDescInfo == null || passiveSkillDescInfo.DescText == string.Empty)) + { + return itemCursor.Height; + } + AvatarBattlePassiveBonusItem avatarBattlePassiveBonusItem = _cacheAvatarBattlePassiveBonusList.FirstOrDefault((AvatarBattlePassiveBonusItem cache) => cache.SkillDescInfo == passiveSkillDescInfo); + if (avatarBattlePassiveBonusItem == null) + { + avatarBattlePassiveBonusItem = BattleLogManager.CreateAvatarBattlePassiveBonusItem(passiveSkillDescInfo, targetCard, _avatarBattleBonusScrollView); + if (BattleKeywordInfoListMgr.GetKeywords(allAbilityDesc).Any((string word) => Data.Master.BattleKeyWordDic.ContainsKey(word))) + { + UIEventListener.Get(avatarBattlePassiveBonusItem.DescLabel.gameObject).onClick = delegate(GameObject obj) + { + battleButtonControl.OnPressKeyBtn(allAbilityDesc, obj); + }; + BattlePlayerView.SetKeyWordColor(avatarBattlePassiveBonusItem.DescLabel.gameObject, avatarBattlePassiveBonusItem.DescLabel); + } + _cacheAvatarBattlePassiveBonusList.Add(avatarBattlePassiveBonusItem); + } + else + { + avatarBattlePassiveBonusItem.SetText(targetCard); + } + avatarBattlePassiveBonusItem.transform.SetParent(_avatarBattleBonusContentsParent); + avatarBattlePassiveBonusItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(avatarBattlePassiveBonusItem.DescLabel.height); + avatarBattlePassiveBonusItem.transform.localPosition = new Vector3(0f, y, 0f); + avatarBattlePassiveBonusItem.gameObject.SetActive(value: true); + _drawLogList.Add(avatarBattlePassiveBonusItem.gameObject); + return itemCursor.Height; + } + + private float SetupBossRushSpecialSkillContent(BattleCardBase targetCard, List bossRushSpecialSkillList) + { + ItemCursor itemCursor = new ItemCursor(0f); + for (int i = 0; i < bossRushSpecialSkillList.Count(); i++) + { + if (targetCard.SelfBattlePlayer.IsPlayer) + { + MakePlayerBossRushSpecialSkillLogItem(targetCard, bossRushSpecialSkillList.ElementAt(i), ref itemCursor); + } + else + { + MakeEnemyBossRushSpecialSkillLogItem(targetCard, bossRushSpecialSkillList.ElementAt(i), ref itemCursor); + } + } + return itemCursor.Height; + } + + private void MakePlayerBossRushSpecialSkillLogItem(BattleCardBase classCard, BossRushSpecialSkill bossRushSpecialSkill, ref ItemCursor itemCursor) + { + BattleLogItem battleLogItem = _cachePlayerBossRushSkillList.FirstOrDefault((BattleLogItem cache) => cache.BossRushSpecialSkill != null && cache.BossRushSpecialSkill.OriginalCardId == bossRushSpecialSkill.OriginalCardId); + if (battleLogItem == null) + { + if (_cacheLogList.Count + _cachePlayerBossRushSkillList.Count > 50) + { + for (int num = _cachePlayerBossRushSkillList.Count - 1; num >= 0; num--) + { + BattleLogItem battleLogItem2 = _cachePlayerBossRushSkillList[num]; + if (!battleLogItem2.gameObject.activeSelf) + { + UnityEngine.Object.Destroy(battleLogItem2.gameObject); + _cacheLogList.RemoveAt(num); + } + } + } + BuffInfo buffInfo = classCard.BuffInfoList.FirstOrDefault((BuffInfo b) => b.SpecialSkillInfo.OriginalCardId == bossRushSpecialSkill.OriginalCardId); + if (buffInfo != null) + { + battleLogItem = BattleLogManager.CreateBossRushPlayerSpecialSkillLogItem(buffInfo.SkillFrom.SkillPrm.ownerCard, bossRushSpecialSkill); + } + _cachePlayerBossRushSkillList.Add(battleLogItem); + } + battleLogItem.transform.SetParent(_bossRushSpecialSkillContentsParent); + battleLogItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(47f); + battleLogItem.transform.localPosition = new Vector3(0f, y, 0f); + battleLogItem.gameObject.SetActive(value: true); + _drawLogList.Add(battleLogItem.gameObject); + battleLogItem.SetSelectSpriteActive(setActive: false); + } + + private void MakeEnemyBossRushSpecialSkillLogItem(BattleCardBase classCard, BossRushSpecialSkill bossRushSpecialSkill, ref ItemCursor itemCursor) + { + BossRushEnemySpecialSkillItem bossRushEnemySpecialSkillItem = _cacheEnemyBossRushSkillList.FirstOrDefault((BossRushEnemySpecialSkillItem cache) => cache.BossRushSpecialSkill != null && cache.BossRushSpecialSkill.OriginalCardId == bossRushSpecialSkill.OriginalCardId); + if (bossRushEnemySpecialSkillItem == null) + { + BuffInfo buffInfo = classCard.BuffInfoList.FirstOrDefault((BuffInfo b) => b.SpecialSkillInfo.OriginalCardId == bossRushSpecialSkill.OriginalCardId); + if (buffInfo != null) + { + bossRushEnemySpecialSkillItem = BattleLogManager.CreateEnemyBossRushSpecialSkillLogItem(buffInfo.SkillFrom.SkillPrm.ownerCard, bossRushSpecialSkill); + if (BattleKeywordInfoListMgr.GetKeywords(bossRushSpecialSkill.SkillDescText).Any((string word) => Data.Master.BattleKeyWordDic.ContainsKey(word))) + { + UIEventListener.Get(bossRushEnemySpecialSkillItem.DescLabel.gameObject).onClick = delegate(GameObject obj) + { + battleButtonControl.OnPressKeyBtn(bossRushSpecialSkill.SkillDescText, obj); + }; + BattlePlayerView.SetKeyWordColor(bossRushEnemySpecialSkillItem.DescLabel.gameObject, bossRushEnemySpecialSkillItem.DescLabel); + } + } + _cacheEnemyBossRushSkillList.Add(bossRushEnemySpecialSkillItem); + } + bossRushEnemySpecialSkillItem.transform.SetParent(_bossRushSpecialSkillContentsParent); + bossRushEnemySpecialSkillItem.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetCenterOffset(bossRushEnemySpecialSkillItem.DescLabel.height); + bossRushEnemySpecialSkillItem.transform.localPosition = new Vector3(0f, y, 0f); + bossRushEnemySpecialSkillItem.gameObject.SetActive(value: true); + _drawLogList.Add(bossRushEnemySpecialSkillItem.gameObject); + } + + public static bool IsNeedNoConsumeEp(BattleCardBase targetCard) + { + if (targetCard.SelfBattlePlayer.CheckNotConsumeEpCard(targetCard)) + { + return targetCard.SelfBattlePlayer.InPlayCards.Any((BattleCardBase c) => c.SkillApplyInformation.NotConsumeEpModifierInfoList.Any((NotConsumeEpModifierInfo b) => b.TargetCard == null && b.CheckNotConsumedCard(targetCard))); + } + return false; + } + + private void MakeHeadlineLabel(ref GameObject labelObject, string labelText, Transform contentsParent, ref ItemCursor itemCursor) + { + if (labelObject == null) + { + labelObject = UnityEngine.Object.Instantiate(Resources.Load("Prefab/UI/Log/AdvancedSkillLabel")) as GameObject; + labelObject.GetComponentInChildren().text = labelText; + } + labelObject.SetActive(value: true); + labelObject.transform.SetParent(contentsParent); + labelObject.transform.localScale = Vector3.one; + float y = itemCursor.AddAndGetTopOffset(44f); + labelObject.transform.localPosition = new Vector3(0f, y, 0f); + _drawLogList.Add(labelObject); + } + + private void MakeLogItems(List buffList, Transform contentsParent, ref ItemCursor itemCursor) + { + for (int i = 0; i < buffList.Count; i++) + { + MakeCardLogItem(buffList[i], contentsParent, ref itemCursor); + } + } + + private float SetupMyRotationBonusPanel(BattleCardBase targetCard, List myRotationBonusList, bool hasLowerContents) + { + float num = SetupMyRotationBonusContent(targetCard, myRotationBonusList); + bool flag = num > 0f; + _myRotationBonusContentsPanel.gameObject.SetActive(flag); + _myRotationBonusBorderLine.gameObject.SetActive(hasLowerContents); + if (!flag) + { + return num; + } + _myRotationBonusTitleLabel.text = Data.SystemText.Get("Battle_0518"); + num -= _myRotationBonusContentsParent.localPosition.y; + if (hasLowerContents) + { + _myRotationBonusBorderLine.transform.localPosition = new Vector3(0f, 0f - num - 6f); + num += (float)_myRotationBonusBorderLine.height + 6f; + } + return num; + } + + private float SetupAvatarBattleBonusPanel(BattleCardBase targetCard, AvatarBattleInfo avatarBattleInfo, bool isShowAvatarBattleBonus) + { + float num = SetupAvatarBattleBonusContent(targetCard, avatarBattleInfo); + bool num2 = num > 0f; + _avatarBattleBonusContentsPanel.gameObject.SetActive(isShowAvatarBattleBonus); + if (!num2 || !isShowAvatarBattleBonus) + { + return 0f; + } + _avatarBattleBonusBPDescriptionLabel.text = Data.SystemText.Get("Battle_0523"); + Vector3 localPosition = _avatarBattleBonusBPDescriptionLabel.transform.localPosition; + Vector3 localPosition2 = _avatarBattleBonusBPSprite.transform.localPosition; + _avatarBattleBonusBPDescriptionLabel.transform.localPosition = new Vector3((float)_avatarBattleBonusBPDescriptionLabel.width / 2f, localPosition.y, localPosition.z); + _avatarBattleBonusBPSprite.transform.localPosition = new Vector3((float)_avatarBattleBonusBPDescriptionLabel.width + (float)_avatarBattleBonusBPSprite.width / 2f, localPosition2.y, localPosition2.z); + _avatarBattleBonusBPLabel.text = targetCard.SelfBattlePlayer.Bp.ToString(); + return num; + } + + private float SetupBossRushSkillPanel(BattleCardBase targetCard, List bossRushSpecialSkillList, float upperContentsHeight, bool hasLowerContents) + { + float num = SetupBossRushSpecialSkillContent(targetCard, bossRushSpecialSkillList); + bool flag = num > 0f; + _bossRushSpecialSkillContentsPanel.gameObject.SetActive(flag); + if (!flag) + { + return num; + } + _bossRushSpecialSkillTitleLabel.text = Data.SystemText.Get(_card.SelfBattlePlayer.IsPlayer ? "BossRush_0029" : "BossRush_0028"); + num -= _bossRushSpecialSkillContentsParent.localPosition.y; + _bossRushSpecialSkillContentsPanel.transform.localPosition = new Vector3(0f, 0f - upperContentsHeight); + if (hasLowerContents) + { + num += 6f; + } + return num; + } + + private float SetupBuffSkillPanel(BattleCardBase targetCard, float upperContentsHeight, bool isShowAvatarBattleBonus) + { + if (isShowAvatarBattleBonus) + { + _buffPanel.gameObject.SetActive(value: false); + return 0f; + } + ItemCursor itemCursor = new ItemCursor(0f); + float num = SetupBuffContent(targetCard, _buffContentsParent, ref itemCursor); + bool active = num > 0f; + _buffPanel.gameObject.SetActive(active); + if (num <= 0f) + { + return num; + } + _buffTitleLabel.text = Data.SystemText.Get(_card.IsClass ? "Battle_0495" : "Battle_0443"); + num -= _buffContentsParent.transform.localPosition.y; + _buffPanel.transform.localPosition = new Vector3(0f, -(int)upperContentsHeight); + _buffPanel.topAnchor.absolute = -(int)upperContentsHeight; + return num; + } + + private void SetupAllBuffPanel(BattleCardBase targetCard, float heightOffset, List myRotationBonusList, List bossRushSkillList, AvatarBattleInfo avatarBattleInfo, bool isUpdate, bool isShowAvatarBattleBonus = false) + { + for (int i = 0; i < _drawLogList.Count; i++) + { + _drawLogList[i].SetActive(value: false); + } + _drawLogList.Clear(); + bool flag = bossRushSkillList.Count > 0; + bool flag2 = NeedBuffSkillPanel(targetCard); + float num = 0f; + num += SetupMyRotationBonusPanel(targetCard, myRotationBonusList, flag || flag2); + num += SetupBossRushSkillPanel(targetCard, bossRushSkillList, num, flag2); + num += SetupAvatarBattleBonusPanel(targetCard, avatarBattleInfo, isShowAvatarBattleBonus); + num += SetupBuffSkillPanel(targetCard, num, isShowAvatarBattleBonus); + num += 8f; + _buffPanelSprite.gameObject.SetActive(flag2 || myRotationBonusList.Count > 0 || bossRushSkillList.Count > 0 || isShowAvatarBattleBonus); + float num2 = 598f + heightOffset; + num2 = ((!_card.IsUnit) ? (num2 - _nonFollowerPanel._bg.localSize.y) : (num2 - (_followerEvoPanel._bg.localSize.y + _followerPanel._bg.localSize.y))); + bool active = num2 < num; + UIScrollView component = _buffContentsPanel.GetComponent(); + component.InvalidateBounds(); + component.ResetPosition(); + component.enabled = active; + _buffScrollBar.gameObject.SetActive(active); + float num3 = Mathf.Min(num, num2); + _buffPanelSprite.height = (int)num3; + _buffPanelCollider.center = new Vector3(_buffPanelCollider.center.x, (0f - num3) / 2f); + _buffPanelCollider.size = new Vector3(_buffPanelCollider.size.x, num3); + _buffScrollView.UpdateScrollbars(); + _buffScrollView.RestrictWithinBounds(instant: true); + _buffScrollView.ResetPosition(); + if (isShowAvatarBattleBonus) + { + _bgDragScrollView.scrollView = _avatarBattleBonusScrollView; + } + else + { + _bgDragScrollView.scrollView = _buffScrollView; + } + _avatarBattleBonusScrollView.InvalidateBounds(); + _avatarBattleBonusScrollView.enabled = active; + _avatarBattleBonusScrollBar.gameObject.SetActive(active); + _avatarBattleBonusScrollView.UpdateScrollbars(); + if (!isUpdate) + { + _avatarBattleBonusScrollView.RestrictWithinBounds(instant: true); + _avatarBattleBonusScrollView.ResetPosition(); + } + } + + private bool NeedBuffSkillPanel(BattleCardBase card) + { + if (GameMgr.GetIns().IsNewReplayBattle) + { + if (card.ReplayNoConsumeEpBuffInfoNameList.Count <= 0 && card.ReplayBuffInfoList.Count() <= 0) + { + return card.ReplayBuffInfoLabelList.Count > 0; + } + return true; + } + bool num = IsNeedNoConsumeEp(card) && card.SelfBattlePlayer.InPlayCards.Where((BattleCardBase c) => c.SkillApplyInformation.NotConsumeEpModifierInfoList.Any((NotConsumeEpModifierInfo b) => b.TargetCard == null && b.CheckNotConsumedCard(card))).Count() > 0; + bool flag = (from b in GetDistinctBuffList(card.BuffInfoList) + where b.SpecialSkillInfo == null && !BuffDetailInfoUI.IsNotShowDamageCutLifeLowerLimitBuffDetail(b.SkillFrom) + select b).Count() > 0; + bool flag2 = BuffDetailInfoUI.NeedBuffDetailText(card); + return num || flag || flag2; + } + + private IEnumerator RepositionBuffContent() + { + yield return null; + _buffScrollView.ResetPosition(); + _buffScrollView.UpdateScrollbars(); + } + + private string GetBuffFromName(int baseCardID) + { + if (baseCardID == 0) + { + return Data.SystemText.Get("BattleLog_0097"); + } + return CardMaster.GetInstanceForBattle().GetCardParameterFromId(baseCardID).CardName; + } + + private void AddCardEvent(BattleCardBase card) + { + if (card != null) + { + card.OnDestroy += OnDestroyCard; + card.OnBanish += OnDestroyCard; + card.OnReturnCard += OnDestroyCard; + card.OnMetamorphose += OnDestroyCard; + card.OnGetOn += OnDestroyCard; + if (card.IsClass) + { + ((ClassBattleCardBase)card).OnRetire += OnDestroyCard; + } + } + } + + private void RemoveCardEvent(BattleCardBase card) + { + if (card != null) + { + card.OnDestroy -= OnDestroyCard; + card.OnBanish -= OnDestroyCard; + card.OnReturnCard -= OnDestroyCard; + card.OnMetamorphose -= OnDestroyCard; + card.OnGetOn -= OnDestroyCard; + if (card.IsClass) + { + ((ClassBattleCardBase)card).OnRetire -= OnDestroyCard; + } + } + } + + private VfxBase OnDestroyCard(BattleCardBase card, SkillProcessor skill) + { + if (_card == card) + { + return InstantVfx.Create(Hide); + } + return NullVfx.GetInstance(); + } + + public void ShowKeySubPanel(int page) + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + } + + public void HideKeySubPanel() + { + GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON); + } + + public void SetKeyBtnActive(List hasKeyword) + { + if (hasKeyword.Count != 0) + { + _hasKeyword = hasKeyword[0]; + if (hasKeyword.Count > 1 && (bool)_nextPanel) + { + List keyBtnActive = new List(hasKeyword.GetRange(1, hasKeyword.Count - 1)); + _nextPanel.SetKeyBtnActive(keyBtnActive); + } + } + } + + public static void LoadCardHeaderTexture(int cardId, bool isUnit, UITexture headerUITexture, bool isEvolution = false, bool isBattleLogHeader = false, Action cbOnLoaded = null, List battleLogTextureInfo = null) + { + CardMaster instanceForBattle = CardMaster.GetInstanceForBattle(); + CardParameter cardParameterFromId = instanceForBattle.GetCardParameterFromId(cardId); + ResourcesManager resMgr = Toolbox.ResourcesManager; + string text = cardParameterFromId.ResourceCardId.ToString(); + ResourcesManager.AssetLoadPathType assetLoadPathType = ResourcesManager.AssetLoadPathType.UnitHeader; + ResourcesManager.AssetLoadPathType assetLoadPathType2 = ResourcesManager.AssetLoadPathType.UnitCardMaterial; + if (text.Length > 9) + { + assetLoadPathType = ResourcesManager.AssetLoadPathType.UnitHeader; + assetLoadPathType2 = ResourcesManager.AssetLoadPathType.UnitCardMaterial; + } + else if (isUnit || ((CardMaster.IsMutationCardCheck(instanceForBattle.GetCardParameterFromId(cardId).BaseCardId) || CardMaster.IsChoiceBraveCardCheck(cardId)) && instanceForBattle.GetCardParameterFromId(cardParameterFromId.ResourceCardId).CharType == CardBasePrm.CharaType.NORMAL)) + { + assetLoadPathType = ResourcesManager.AssetLoadPathType.UnitHeader; + text = (isEvolution ? (text + "1") : (text + "0")); + assetLoadPathType2 = ResourcesManager.AssetLoadPathType.UnitCardMaterial; + } + else + { + assetLoadPathType = ResourcesManager.AssetLoadPathType.OtherHeader; + text += "0"; + assetLoadPathType2 = ResourcesManager.AssetLoadPathType.SpellCardMaterial; + } + string cardAssetPath = resMgr.GetAssetTypePath(cardParameterFromId.ResourceCardId.ToString(), assetLoadPathType2); + string logHeaderAssetPath = resMgr.GetAssetTypePath(text, assetLoadPathType, isfetch: true); + if (resMgr.IsLoadedAssetBundleAndObjectArrayExist(cardAssetPath)) + { + Texture texture = resMgr.LoadObject(logHeaderAssetPath); + headerUITexture.mainTexture = texture; + cbOnLoaded.Call(texture); + return; + } + if (!isBattleLogHeader && loadHeaderCoroutine.ContainsKey(cardAssetPath)) + { + Coroutine coroutine = loadHeaderCoroutine[cardAssetPath]._coroutine; + BattleCoroutine.GetInstance().StopCoroutine(coroutine); + loadHeaderCoroutine.Remove(cardAssetPath); + } + Action action = delegate + { + Texture texture2 = resMgr.LoadObject(logHeaderAssetPath); + headerUITexture.mainTexture = texture2; + cbOnLoaded.Call(texture2); + }; + if (loadHeaderCoroutine.ContainsKey(cardAssetPath)) + { + loadHeaderCoroutine[cardAssetPath]._actions.Add(action); + return; + } + if (battleLogTextureInfo != null) + { + battleLogTextureInfo.Add(new NewReplayBattleMgr.BattleLogTextureInfo(cardAssetPath, logHeaderAssetPath, headerUITexture, cbOnLoaded)); + return; + } + CoroutineActions coroutineActions = new CoroutineActions(action); + coroutineActions._coroutine = BattleCoroutine.GetInstance().StartCoroutine(resMgr.LoadAssetAsync(cardAssetPath, delegate + { + foreach (Action action2 in coroutineActions._actions) + { + action2(); + } + loadHeaderCoroutine.Remove(cardAssetPath); + })); + Toolbox.ResourcesManager.BattleListAssetPathList.Add(cardAssetPath); + loadHeaderCoroutine.Add(cardAssetPath, coroutineActions); + } + + public static void LoadClassHeaderTexture(int cardId, UITexture headerUITexture, Action cbOnLoaded = null, bool isEvolve = false) + { + ResourcesManager resMgr = Toolbox.ResourcesManager; + ResourcesManager.AssetLoadPathType resourceType = ResourcesManager.AssetLoadPathType.UnitHeader; + resourceType = ResourcesManager.AssetLoadPathType.ClassCharaHeader; + int skin_id = GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(cardId) + .skin_id; + string cardNameBgPath = ((skin_id < 10) ? ("log_class_0" + skin_id) : ("log_class_" + skin_id)); + if (isEvolve) + { + cardNameBgPath += "_evolve"; + } + string cardAssetName = resMgr.GetAssetTypePath(cardNameBgPath, resourceType); + BattleCoroutine.GetInstance().StartCoroutine(resMgr.LoadAssetAsync(cardAssetName, delegate + { + Texture texture = resMgr.LoadObject(resMgr.GetAssetTypePath(cardNameBgPath, resourceType, isfetch: true)); + headerUITexture.mainTexture = texture; + cbOnLoaded.Call(texture); + Toolbox.ResourcesManager.BattleListAssetPathList.Add(cardAssetName); + })); + } + + public void SetScreenPosition(bool right) + { + UIAnchor component = base.transform.Find("AnchorL").GetComponent(); + if ((bool)component) + { + if (right) + { + float num = -0.3633333f; + float num2 = -0.222f - num * 0.4f; + component.relativeOffset.x = num * base.transform.localScale.x + num2; + } + else + { + component.relativeOffset.x = 0f; + } + component.side = (right ? UIAnchor.Side.TopRight : UIAnchor.Side.TopLeft); + component.enabled = true; + } + } + + private void SetParent(DetailPanelControl parent) + { + _parentPanel = parent; + GameObject obj = base.transform.Find("AnchorL").gameObject; + UIAnchor component = obj.GetComponent(); + if ((bool)component) + { + UnityEngine.Object.Destroy(component); + } + UIWidget uIWidget = obj.AddMissingComponent(); + uIWidget.height = 1; + uIWidget.width = 1; + UIWidget lastBottomWidget = _parentPanel.GetLastBottomWidget(); + uIWidget.topAnchor.target = lastBottomWidget.transform; + uIWidget.topAnchor.absolute = 1; + } + + private UIWidget GetLastBottomWidget() + { + if (_buffPanelSprite.gameObject.activeInHierarchy) + { + return _buffPanelSprite; + } + if (_nonFollowerPanel._bg.gameObject.activeInHierarchy) + { + return _nonFollowerPanel._bg; + } + if (_followerEvoPanel._bg.gameObject.activeInHierarchy) + { + return _followerEvoPanel._bg; + } + return _followerPanel._bg; + } + + private void UpdateParentAnchor() + { + if ((bool)_parentPanel) + { + GameObject gameObject = base.transform.Find("AnchorL").gameObject; + UIWidget uIWidget = gameObject.AddMissingComponent(); + UIWidget lastBottomWidget = _parentPanel.GetLastBottomWidget(); + if (lastBottomWidget != uIWidget.topAnchor.target) + { + uIWidget.height = 1; + uIWidget.width = 1; + uIWidget.topAnchor.target = lastBottomWidget.transform; + uIWidget.ResetAndUpdateAnchors(); + uIWidget.topAnchor.absolute = 0; + uIWidget.topAnchor.relative = 0f; + Vector3 localPosition = gameObject.transform.localPosition; + localPosition.x = _parentPanel.transform.Find("AnchorL").localPosition.x; + gameObject.transform.localPosition = localPosition; + } + } + } + + public void SetSize(float percent) + { + float num = percent / 100f; + base.transform.localScale = new Vector3(num, num, num); + UIAnchor component = base.transform.Find("AnchorL").GetComponent(); + if ((bool)component) + { + float num2; + float num3; + if (component.side == UIAnchor.Side.TopRight) + { + num2 = -0.3633333f; + num3 = -0.222f - num2 * 0.4f; + component.relativeOffset.x = num2 * base.transform.localScale.x + num3; + } + component.relativeOffset.y = 0f; + num2 = 106.666664f; + num3 = -30f - num2 * 0.4f; + component.pixelOffset.y = num2 * num + num3; + component.enabled = true; + } + if ((bool)_nextPanel) + { + _nextPanel.SetSize(percent); + } + } +} diff --git a/SVSim.BattleEngine/Engine/DialogBase.cs b/SVSim.BattleEngine/Engine/DialogBase.cs new file mode 100644 index 0000000..abb1fb6 --- /dev/null +++ b/SVSim.BattleEngine/Engine/DialogBase.cs @@ -0,0 +1,1689 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Cute; +using UnityEngine; +using Wizard; +using Wizard.UI.Dialog.ImageSelection; + +public class DialogBase : MonoBehaviour +{ + public enum DialogScene + { + OPEN, + WAIT, + CLOSE, + END, + ERASE + } + + public enum Size + { + S, + M, + L, + XL, + BATTLE_LOG + } + + public enum ButtonLayout + { + NONE, + OkBtn, + DecisionBtn, + CloseBtn, + BackToTitleBtn, + GrayBtn, + RedBtn, + YellowBtn, + BlueBtn_CancelBtn, + RedBtn_CancelBtn, + BlueBtn_GrayBtn, + BlueBtn_RedBtn, + GrayBtn_GrayBtn, + BlueBtn_RedBtn_GrayBtn, + GrayBtn_CancelBtn_BlueBtn, + GrayBtn_GrayBtn_BlueBtn, + BattleEvolveConfirm, + BlueButton, + BlueButton_BlueButton, + BlueButton_BlueButton_BlueButton + } + + private enum ButtonSprite + { + BLUE, + GRAY, + RED, + YELLOW, + BLUE_S, + RED_S + } + + public enum ButtonType + { + Blue, + Red, + Gray, + Yellow, + OK, + Decision, + Close, + Cancel, + Retry, + BackToTitle, + BackToHome, + QuitApplication, + VersionUp, + RecommendedList + } + + private class UIPanelAlphaController + { + private UIPanel _panel; + + private float _originalAlpha; + + public UIPanelAlphaController(UIPanel panel) + { + _panel = panel; + _originalAlpha = _panel.alpha; + } + + public void SetAlpha(float alpha) + { + _panel.alpha = alpha; + } + + public void ResetAlpha() + { + _panel.alpha = _originalAlpha; + } + } + + public enum KeyboardDialogSelect + { + Button1, + Button2, + Button3, + CloseButton + } + + private class Button + { + private ButtonType Type { get; set; } + + public ButtonSprite Sprite { get; private set; } + + public string Text { get; private set; } + + public Se.TYPE SE { get; private set; } + + public Action OnClick { get; private set; } + + public Action OnDestroy { get; private set; } + + public Button(ButtonType type, string text) + { + Type = type; + SystemText systemText = Data.SystemText; + switch (type) + { + case ButtonType.Blue: + Sprite = ButtonSprite.BLUE; + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.Red: + Sprite = ButtonSprite.RED; + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.Gray: + Sprite = ButtonSprite.GRAY; + SE = Se.TYPE.SYS_BTN_CANCEL; + break; + case ButtonType.Yellow: + Sprite = ButtonSprite.YELLOW; + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.OK: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0004"); + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.Decision: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0003"); + SE = Se.TYPE.SYS_BTN_DECIDE; + break; + case ButtonType.Close: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0008"); + SE = Se.TYPE.SYS_BTN_CANCEL; + break; + case ButtonType.Cancel: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0005"); + SE = Se.TYPE.SYS_BTN_CANCEL; + break; + case ButtonType.Retry: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0133"); + SE = Se.TYPE.SYS_BTN_DECIDE; + OnClick = delegate + { + UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Retry()); + }; + NetworkUI.GetInstance().SetKeepLastRequest(flag: true); + OnDestroy = delegate + { + NetworkUI.GetInstance().SetKeepLastRequest(flag: false); + }; + break; + case ButtonType.BackToTitle: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0131"); + SE = Se.TYPE.SYS_BTN_CANCEL_TRANS; + OnClick = delegate + { + SoftwareReset.exec(); + }; + break; + case ButtonType.BackToHome: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0132"); + SE = Se.TYPE.SYS_BTN_CANCEL_TRANS; + OnClick = delegate + { + UIManager.GetInstance().closeInSceneCenterLoading(); + if (UIManager.GetInstance().GetCurrentScene() == UIManager.ViewScene.Battle && GameMgr.GetIns().GetBattleCtrl() != null) + { + UIManager.GetInstance().StartCoroutine(BattleEndCoroutine()); + } + else + { + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.MyPage); + } + }; + break; + case ButtonType.QuitApplication: + Sprite = ButtonSprite.GRAY; + Text = systemText.Get("Common_0135"); + SE = Se.TYPE.SYS_BTN_CANCEL; + OnClick = delegate + { + if (Toolbox.mute != null) + { + Toolbox.mute.Close(); + Toolbox.mute = null; + } + UIManager.ApplicationQuit(); + }; + break; + case ButtonType.VersionUp: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0136"); + SE = Se.TYPE.SYS_BTN_DECIDE; + OnClick = delegate + { + Toolbox.NetworkManager.GoToStore(); + }; + NetworkUI.GetInstance().SetKeepLastRequest(flag: true); + break; + case ButtonType.RecommendedList: + Sprite = ButtonSprite.BLUE; + Text = systemText.Get("Common_0134"); + SE = Se.TYPE.SYS_BTN_DECIDE; + OnClick = delegate + { + UIManager.GetInstance().WebViewHelper.CreateOpenURLWindow(WebViewHelper.UrlType.RECOMMENDED_DEVICE); + }; + break; + } + if (text != null) + { + Text = text; + } + } + + private IEnumerator BattleEndCoroutine() + { + yield return null; + SBattleLoad battleLoad = BattleManagerBase.GetIns().SBattleLoad; + while (!battleLoad.isLoadEnd) + { + yield return null; + } + yield return GameMgr.GetIns().GetBattleCtrl().BattleEnd(); + UIManager.ChangeViewSceneParam changeViewSceneParam = new UIManager.ChangeViewSceneParam(); + changeViewSceneParam.OnChange = delegate + { + UIManager.GetInstance().CloseInSceneLoadingBattle(); + }; + UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.MyPage, changeViewSceneParam); + } + } + + private const int ONE_BUTTON_1BUTTON_LEFT_ANCHOR = -128; + + private const int ONE_BUTTON_1BUTTON_RIGHT_ANCHOR = 128; + + private const int TWO_BUTTON_1BUTTON_LEFT_ANCHOR = 8; + + private const int TWO_BUTTON_1BUTTON_RIGHT_ANCHOR = 264; + + private const int TWO_BUTTON_2BUTTON_LEFT_ANCHOR = -264; + + private const int TWO_BUTTON_2BUTTON_RIGHT_ANCHOR = -8; + + private const int THREE_BUTTON_1BUTTON_LEFT_ANCHOR = -128; + + private const int THREE_BUTTON_1BUTTON_RIGHT_ANCHOR = 128; + + private const int THREE_BUTTON_2BUTTON_LEFT_ANCHOR = -398; + + private const int THREE_BUTTON_2BUTTON_RIGHT_ANCHOR = -142; + + private const int THREE_BUTTON_3BUTTON_LEFT_ANCHOR = 142; + + private const int THREE_BUTTON_3BUTTON_RIGHT_ANCHOR = 398; + + private const int WEBVIEW_ANCHOR_LEFT = 6; + + private const int WEBVIEW_ANCHOR_BOTTOM = 18; + + private const int WEBVIEW_ANCHOR_RIGHT = -6; + + private const int WEBVIEW_ANCHOR_TOP = -17; + + private const float START_ALPHA = 0.01f; + + public const float BACKVIEW_ALPHA = 0.8f; + + private const float OPEN_TIME = 0.3f; + + public const int DELTA_PANEL_DEPTH = 5; + + public static readonly Vector3 BATTLELOG_TITLELABEL_POS = new Vector3(0f, 16f, 0f); + + public static readonly Vector3 BATTLELOG_WINDOWSPRITE_POS = new Vector3(-250f, 0f, 0f); + + private const int BATTLELOG_WINDOW_W = 600; + + private const int BATTLELOG_WINDOW_H = 600; + + private const int FAQ_DEAPTH = 6100; + + public const int FRIEND_DIALOG_DEPTH = 1000; + + public const int ERROR_DIALOG_BATTLE = 5000; + + public const int ERROR_DIALOG_MATCHING_DEPTH = 5400; + + public const int ERROR_DIALOG_DEPTH = 5500; + + public const int ERROR_ASSETHANDLE_DIALOG_DEPTH = 6000; + + public const int HOME_LOGIN_BONUS_DEPTH = 10; + + public const int HOME_BATTLE_RESULT_DEPTH = 15; + + public const int QUIT_DIALOG_DEPTH = 7000; + + public const int GATHERING_STATE_CHANGE_DIALOG_DEPTH = 4000; + + public const int SCROLL_BOTTOM_ANCHOR_WINDOW = 8; + + public const int SCROLL_BOTTOM_ANCHOR_BUTTON_LINE = -2; + + private const int WEBVIEW_DISPLAY_MARGIN = 35; + + private const int WEBVIEW_Y_OFFSET = 2; + + private const string spriteButtonBlue = "btn_common_02_m_off"; + + private const string spriteButtonBluePush = "btn_common_02_m_on"; + + private const string spriteButtonGray = "btn_common_01_m_off"; + + private const string spriteButtonGrayPush = "btn_common_01_m_on"; + + private const string spriteButtonRed = "btn_common_04_m_off"; + + private const string spriteButtonRedPush = "btn_common_04_m_on"; + + private const string spriteButtonYellow = "btn_common_03_m_off"; + + private const string spriteButtonYellowPush = "btn_common_03_m_on"; + + private const string spriteButtonRed_S = "btn_common_04_s_off"; + + private const string spriteButtonRedPush_S = "btn_common_04_s_on"; + + private const string spriteButtonBlue_S = "btn_common_02_s_off"; + + private const string spriteButtonBluePush_S = "btn_common_02_s_on"; + + [HideInInspector] + public NguiObjs InputAreaObjs; + + [SerializeField] + public UISprite WindowSprite; + + [SerializeField] + private UIButton CloseButton; + + [SerializeField] + private GameObject TitleObjs; + + [SerializeField] + private UILabel titleLabel; + + [SerializeField] + private GameObject backViewOriginal; + + [HideInInspector] + public GameObject backView; + + [SerializeField] + private GameObject _collider; + + [SerializeField] + private UIPanel _colliderPanel; + + private float _colliderUpdateTimer; + + private bool _colliderUpdateEnable; + + [SerializeField] + private UILabel DetailMsg; + + [SerializeField] + private GameObject ButtonBase; + + [SerializeField] + public UIButton button1; + + [SerializeField] + private UILabel button1_Label; + + [SerializeField] + private UIButton button2; + + [SerializeField] + private UILabel button2_Label; + + [SerializeField] + private UIButton button3; + + [SerializeField] + private UILabel button3_Label; + + [SerializeField] + private UIButton contactButton; + + [SerializeField] + private UILabel contactButton_Label; + + [SerializeField] + private UIButton webviewBackButton; + + [SerializeField] + private UISprite buttonLine; + + [SerializeField] + public UISprite titleLine; + + [SerializeField] + private UIRect scrollRect; + + [SerializeField] + private UIRect scrollBarRect; + + [SerializeField] + private UISlider vScrollBar; + + [SerializeField] + private UIScrollView scrollView; + + [SerializeField] + public GameObject EscapeDialogPrefab; + + [SerializeField] + private GameObject _button1Select; + + [SerializeField] + private GameObject _button2Select; + + [SerializeField] + private GameObject _button3Select; + + [SerializeField] + private GameObject _closeButtonSelect; + + private DialogScene dialogNowScene; + + private ButtonLayout dialogLayout; + + private static Vector2[] Sizes = new Vector2[5] + { + new Vector2(624f, 360f), + new Vector2(850f, 564f), + new Vector2(1080f, 504f), + new Vector2(1125f, 605f), + new Vector2(600f, 600f) + }; + + private static int[] DETAIL_LABEL_SIZE = new int[5] { 540, 766, 996, 1041, 516 }; + + private GameObject returnObj; + + private string returnMsg_Btn1; + + private string returnMsg_Btn2; + + private string returnMsg_Btn3; + + public Action OnCloseStart; + + public Action OnClose; + + private Action OnClose_ForSystem; + + public Action onPushButton1; + + public Action onPushButton2; + + public Action onPushButton3; + + public Action onCloseWithoutSelect; + + private Action onFirstUpdate; + + private string closeMsg; + + private float timer; + + private bool isOpenAnim = true; + + public bool isNotCloseWindowButton1; + + public bool isNotCloseWindowButton2; + + public bool isNotCloseWindowButton3; + + private int _buttonNum; + + private List