Decompiled source of Aya Shameimaru v0.4.16
AyaShameimaru.dll
Decompiled 2 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AddWatermark; using AyaShameimaru.Cards; using AyaShameimaru.EnemyUnits; using AyaShameimaru.Exhibits; using AyaShameimaru.PlayerUnits; using AyaShameimaru.Stages; using AyaShameimaru.StatusEffects; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.CompilerServices; using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; using HarmonyLib; using JetBrains.Annotations; using LBoL.Base; using LBoL.Base.Extensions; using LBoL.ConfigData; using LBoL.Core; using LBoL.Core.Adventures; using LBoL.Core.Battle; using LBoL.Core.Battle.BattleActions; using LBoL.Core.Battle.Interactions; using LBoL.Core.Cards; using LBoL.Core.Helpers; using LBoL.Core.Intentions; using LBoL.Core.Randoms; using LBoL.Core.Stations; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Adventures.Common; using LBoL.EntityLib.Adventures.FirstPlace; using LBoL.EntityLib.Adventures.Shared23; using LBoL.EntityLib.Adventures.Stage2; using LBoL.EntityLib.Adventures.Stage3; using LBoL.EntityLib.Cards.Enemy; using LBoL.EntityLib.Cards.Neutral.NoColor; using LBoL.EntityLib.EnemyUnits.Character; using LBoL.EntityLib.EnemyUnits.Opponent; using LBoL.EntityLib.Exhibits; using LBoL.EntityLib.Exhibits.Adventure; using LBoL.EntityLib.Exhibits.Shining; using LBoL.EntityLib.StatusEffects.Basic; using LBoL.EntityLib.StatusEffects.Enemy; using LBoL.EntityLib.StatusEffects.Enemy.Seija; using LBoL.EntityLib.StatusEffects.ExtraTurn; using LBoL.Presentation; using LBoL.Presentation.Effect; using LBoL.Presentation.UI; using LBoL.Presentation.UI.ExtraWidgets; using LBoL.Presentation.UI.Panels; using LBoL.Presentation.UI.Widgets; using LBoL.Presentation.Units; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.PersistentValues; using LBoLEntitySideloader.ReflectionHelpers; using LBoLEntitySideloader.Resource; using LBoLEntitySideloader.Utils; using Spine.Unity; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("LBoL.Base")] [assembly: IgnoresAccessChecksTo("LBoL.ConfigData")] [assembly: IgnoresAccessChecksTo("LBoL.Core")] [assembly: IgnoresAccessChecksTo("LBoL.EntityLib")] [assembly: IgnoresAccessChecksTo("LBoL.Presentation")] [assembly: IgnoresAccessChecksTo("Untitled.ConfigDataBuilder.Base")] [assembly: AssemblyCompany("AyaShameimaru")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("AyaShameimaru")] [assembly: AssemblyTitle("AyaShameimaru")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace AyaShameimaru { public sealed class AyaSaveData : CustomGameRunSaveData { public int? AyaStory; public int? FlandreStory; public override void Restore(GameRunController gameRun) { PlayerUnit player = gameRun.Player; if (player is AyaPlayerUnitDef.AyaPlayerUnit ayaPlayerUnit) { ayaPlayerUnit.Story = AyaStory; } else if (player is FlandrePlayerUnitDef.FlandrePlayerUnit flandrePlayerUnit) { flandrePlayerUnit.Story = FlandreStory; } } public override void Save(GameRunController gameRun) { PlayerUnit player = gameRun.Player; if (player is AyaPlayerUnitDef.AyaPlayerUnit ayaPlayerUnit) { AyaStory = ayaPlayerUnit.Story; } else if (player is FlandrePlayerUnitDef.FlandrePlayerUnit flandrePlayerUnit) { FlandreStory = flandrePlayerUnit.Story; } } } [BepInPlugin("intoxicatedkid.ayashameimaru", "Aya Shameimaru", "0.4.16")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("LBoL.exe")] public class BepinexPlugin : BaseUnityPlugin { [HarmonyPatch(typeof(GameMap), "SetAdjacentNodesStatus")] private class GameMap_SetAdjacentNodesStatus_Patch { private static bool Prefix(GameMap __instance) { return !StoryWait; } } private static readonly Harmony harmony = PluginInfo.harmony; internal static ManualLogSource log; internal static TemplateSequenceTable sequenceTable = new TemplateSequenceTable(0); internal static IResourceSource embeddedSource = (IResourceSource)new EmbeddedSource(Assembly.GetExecutingAssembly()); internal static DirectorySource directorySource = new DirectorySource("intoxicatedkid.ayashameimaru", ""); internal static AssetBundle ayaShameimaru; internal static BatchLocalization cardLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(CardTemplate), false); internal static BatchLocalization enemyUnitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(EnemyUnitTemplate), false); internal static BatchLocalization exhibitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(ExhibitTemplate), false); internal static BatchLocalization playerUnitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(PlayerUnitTemplate), false); internal static BatchLocalization ultimateSkillLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UltimateSkillTemplate), false); internal static BatchLocalization statusEffectLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(StatusEffectTemplate), false); internal static BatchLocalization unitModelLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(UnitModelTemplate), false); internal static BatchLocalization intentionLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(IntentionTemplate), false); public static ConfigEntry<bool> AyaPhantasmMode; public static ConfigEntry<string> AyaRecords; public static int LastInput = 0; public static bool StoryWait = false; public static bool NormalAyaPlayerUnit => AyaRecords.Value.Contains("NormalAyaPlayerUnit"); public static bool HardAyaPlayerUnit => AyaRecords.Value.Contains("HardAyaPlayerUnit"); public static bool LunaticAyaPlayerUnit => AyaRecords.Value.Contains("LunaticAyaPlayerUnit"); public static bool PhantasmAyaPlayerUnit => AyaRecords.Value.Contains("PhantasmAyaPlayerUnit"); public static bool Chapter1AyaPlayerUnit => AyaRecords.Value.Contains("Chapter1AyaPlayerUnit"); public static bool NormalFlandrePlayerUnit => AyaRecords.Value.Contains("NormalFlandrePlayerUnit"); public static bool HardFlandrePlayerUnit => AyaRecords.Value.Contains("HardFlandrePlayerUnit"); public static bool LunaticFlandrePlayerUnit => AyaRecords.Value.Contains("LunaticFlandrePlayerUnit"); public static bool PhantasmFlandrePlayerUnit => AyaRecords.Value.Contains("PhantasmFlandrePlayerUnit"); public static bool LunaticFlandrePlayerUnitDefeatMarisa => AyaRecords.Value.Contains("LunaticFlandrePlayerUnitDefeatMarisa"); private void Awake() { log = ((BaseUnityPlugin)this).Logger; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; AyaPhantasmMode = ((BaseUnityPlugin)this).Config.Bind<bool>("Phantasm Mode", "Phantasm Mode", false, "Weakens many cards and exhibits."); AyaRecords = ((BaseUnityPlugin)this).Config.Bind<string>("Records", "Records", "", "May cause an error if edited manually."); EntityManager.RegisterSelf(); harmony.PatchAll(); if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark")) { WatermarkWrapper.ActivateWatermark(); } ayaShameimaru = ResourceLoader.LoadAssetBundle("ayaShameimaru", directorySource); AyaBackgrounds.AddAyaBackgrounds(); cardLoc.DiscoverAndLoadLocFiles("Card"); enemyUnitLoc.DiscoverAndLoadLocFiles("EnemyUnit"); exhibitLoc.DiscoverAndLoadLocFiles("Exhibit"); playerUnitLoc.DiscoverAndLoadLocFiles("PlayerUnit"); ultimateSkillLoc.DiscoverAndLoadLocFiles("UltimateSkill"); statusEffectLoc.DiscoverAndLoadLocFiles("StatusEffect"); unitModelLoc.DiscoverAndLoadLocFiles("UnitModel"); intentionLoc.DiscoverAndLoadLocFiles("Intention"); ((CustomGameRunSaveData)new AyaSaveData()).RegisterSelf("intoxicatedkid.ayashameimaru"); } private void OnDestroy() { Harmony obj = harmony; if (obj != null) { obj.UnpatchSelf(); } AssetBundle obj2 = ayaShameimaru; if (obj2 != null) { obj2.Unload(false); } } private void Update() { if (UnityInput.Current.anyKeyDown) { LastInput = 0; } } } public static class PluginInfo { public const string GUID = "intoxicatedkid.ayashameimaru"; public const string Name = "Aya Shameimaru"; public const string version = "0.4.16"; public static readonly Harmony harmony = new Harmony("intoxicatedkid.ayashameimaru"); } internal class WatermarkWrapper { [MethodImpl(MethodImplOptions.NoInlining)] internal static void ActivateWatermark() { API.ActivateWatermark(); } } } namespace AyaShameimaru.StatusEffects { public sealed class AyaAccelerationSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaAccelerationSeDef))] public sealed class AyaAccelerationSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<StatusEffectApplyEventArgs>(((StatusEffect)this).Owner.StatusEffectAdded, (GameEventHandler<StatusEffectApplyEventArgs>)delegate { int count3 = MathExtensions.RoundToInt(Math.Truncate((float)((StatusEffect)this).Level / 4f)); ((StatusEffect)this).Count = count3; }); ((StatusEffect)this).HandleOwnerEvent<StatusEffectEventArgs>(((StatusEffect)this).Owner.StatusEffectChanged, (GameEventHandler<StatusEffectEventArgs>)delegate { int count2 = MathExtensions.RoundToInt(Math.Truncate((float)((StatusEffect)this).Level / 4f)); ((StatusEffect)this).Count = count2; }); ((StatusEffect)this).HandleOwnerEvent<StatusEffectEventArgs>(((StatusEffect)this).Owner.StatusEffectRemoved, (GameEventHandler<StatusEffectEventArgs>)delegate { int count = MathExtensions.RoundToInt(Math.Truncate((float)((StatusEffect)this).Level / 4f)); ((StatusEffect)this).Count = count; }); ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnding); ((StatusEffect)this).ReactOwnerEvent<DamageEventArgs>(((StatusEffect)this).Owner.DamageReceived, (EventSequencedReactor<DamageEventArgs>)OnOwnerDamageReceived); } private IEnumerable<BattleAction> OnOwnerTurnEnding(GameEventArgs args) { foreach (BattleAction item in Activate()) { yield return item; } } public IEnumerable<BattleAction> Activate() { if (!((StatusEffect)this).Battle.BattleShouldEnd) { Graze statusEffect = ((StatusEffect)this).Owner.GetStatusEffect<Graze>(); int num = ((statusEffect != null) ? ((StatusEffect)statusEffect).Level : 0); int num2 = MathExtensions.RoundToInt(Math.Truncate((float)((StatusEffect)this).Level / 4f)); if (num < num2) { yield return (BattleAction)(object)new ApplyStatusEffectAction<Graze>(((StatusEffect)this).Owner, (int?)(num2 - num), (int?)null, (int?)null, (int?)null, 0f, true); } } } private IEnumerable<BattleAction> OnOwnerDamageReceived(DamageEventArgs args) { DamageInfo damageInfo = args.DamageInfo; if (((DamageInfo)(ref damageInfo)).IsGrazed && !((Unit)((StatusEffect)this).Battle.Player).HasStatusEffect<AyaInstantShotJournalistSeDef.AyaInstantShotJournalistSe>()) { ((StatusEffect)this).Level = Math.Max(((StatusEffect)this).Level - 2, 0); if (((StatusEffect)this).Level <= 0) { yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0f); } } } public OpposeResult Oppose(AyaDecelerationSeDef.AyaDecelerationSe other) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (((StatusEffect)this).Level < ((StatusEffect)other).Level) { ((StatusEffect)other).Level = ((StatusEffect)other).Level - ((StatusEffect)this).Level; return (OpposeResult)1; } if (((StatusEffect)this).Level == ((StatusEffect)other).Level) { return (OpposeResult)2; } ((StatusEffect)this).Level = ((StatusEffect)this).Level - ((StatusEffect)other).Level; return (OpposeResult)0; } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("AyaAccelerationSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaAccelerationSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 0, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, true, (StackType?)(StackType)4, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Graze" }, "Graze", "Default", "Graze"); } } public sealed class AyaDecelerationSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaDecelerationSeDef))] public sealed class AyaDecelerationSe : StatusEffect { public OpposeResult Oppose(AyaAccelerationSeDef.AyaAccelerationSe other) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (((StatusEffect)this).Level < ((StatusEffect)other).Level) { ((StatusEffect)other).Level = ((StatusEffect)other).Level - ((StatusEffect)this).Level; return (OpposeResult)1; } if (((StatusEffect)this).Level == ((StatusEffect)other).Level) { return (OpposeResult)2; } ((StatusEffect)this).Level = ((StatusEffect)this).Level - ((StatusEffect)other).Level; return (OpposeResult)0; } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("AyaDecelerationSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaDecelerationSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 1, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class AyaPassiveSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaPassiveSeDef))] public sealed class AyaPassiveSe : StatusEffect { [HarmonyPatch(typeof(Card), "LocalizeProperty")] private class Card_LocalizeProperty_Patch { private static bool Prefix(Card __instance, ref string key, ref bool decorated, ref bool required, ref string __result) { if (((GameEntity)__instance).Id == "AyaNews" && key == "Description" && Singleton<GameMaster>.Instance.CurrentGameRun != null && (Singleton<GameMaster>.Instance.CurrentGameRun.Player is AyaPlayerUnitDef.AyaPlayerUnit || Singleton<GameMaster>.Instance.CurrentGameRun.Player.HasExhibit<AyaGDef.AyaG>() || Singleton<GameMaster>.Instance.CurrentGameRun.Player.HasExhibit<AyaRDef.AyaR>())) { __result = TypeFactory<Card>.LocalizeProperty("AyaNewsSpecial", "AyaNewsDescription", decorated, required); return false; } return true; } } public int Value1 => 12; public int Value2 => 1; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoving, (EventSequencedReactor<StatusEffectEventArgs>)OnPlayerStatusEffectRemoving); } private IEnumerable<BattleAction> OnPlayerStatusEffectRemoving(StatusEffectEventArgs args) { if (args.Effect == this) { ((GameEventArgs)args).CanCancel = true; ((GameEventArgs)args).CancelBy((GameEntity)(object)this); } yield break; } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("AyaPassiveSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaPassiveSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", -2, (StatusEffectType)2, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)8388608, (IReadOnlyList<string>)new List<string> { "LockedOn" }, "Default", "Default", "Default"); } } public sealed class AyaPerfectGrazeSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaPerfectGrazeSeDef))] public sealed class AyaPerfectGrazeSe : StatusEffect { [HarmonyPatch(typeof(Unit), "MeasureDamage")] private class Unit_MeasureDamage_Patch { private static bool Prefix(Unit __instance, ref DamageInfo info, ref DamageInfo __result) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (__instance.HasStatusEffect<AyaPerfectGrazeSe>() && (int)((DamageInfo)(ref info)).DamageType == 2 && MathExtensions.Round(((DamageInfo)(ref info)).Damage, MidpointRounding.AwayFromZero) > 0f && ((DamageInfo)(ref info)).IsAccuracy) { DamageInfo val = new DamageInfo(0f, ((DamageInfo)(ref info)).DamageType, true, ((DamageInfo)(ref info)).IsAccuracy, false); val = ((DamageInfo)(ref val)).BlockBy(__instance.Block); __result = ((DamageInfo)(ref val)).ShieldBy(__instance.Shield); return false; } return true; } } [HarmonyPatch(typeof(Unit), "TakeDamage")] private class Unit_TakeDamage_Patch { private static int CheckGraze(Unit unit) { return unit.HasStatusEffect<Graze>() ? 2 : (-1); } private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown return new CodeMatcher(instructions, generator).MatchForward(true, (CodeMatch[])(object)new CodeMatch[5] { new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"Taking grazed accurary DamageInfo {0}.", (string)null), CodeMatch.op_Implicit(OpCodes.Ldarg_1), CodeMatch.op_Implicit(OpCodes.Box), CodeMatch.op_Implicit(OpCodes.Call), CodeMatch.op_Implicit(OpCodes.Call) }).Set(OpCodes.Pop, (object)null).MatchForward(true, (CodeMatch[])(object)new CodeMatch[3] { CodeMatch.op_Implicit(OpCodes.Ldarga_S), new CodeMatch((OpCode?)OpCodes.Call, (object)AccessTools.PropertyGetter(typeof(DamageInfo), "DamageType"), (string)null), CodeMatch.op_Implicit(OpCodes.Ldc_I4_2) }) .Set(OpCodes.Call, (object)AccessTools.Method(typeof(Unit_TakeDamage_Patch), "CheckGraze", (Type[])null, (Type[])null)) .Insert((CodeInstruction[])(object)new CodeInstruction[1] { new CodeInstruction(OpCodes.Ldarg_0, (object)null) }) .InstructionEnumeration(); } private static void Postfix(Unit __instance, ref DamageInfo info) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 if ((int)((DamageInfo)(ref info)).DamageType == 2 && __instance.HasStatusEffect<AyaPerfectGrazeSe>() && ((DamageInfo)(ref info)).IsGrazed && ((DamageInfo)(ref info)).IsAccuracy) { __instance.GetStatusEffect<AyaPerfectGrazeSe>().Activate(); } } } public void Activate() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown int level = ((StatusEffect)this).Level; ((StatusEffect)this).Level = level - 1; if (((StatusEffect)this).Level > 0) { ((StatusEffect)this).NotifyActivating(); } else { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f))); } } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("AyaPerfectGrazeSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaPerfectGrazeSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 0, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)256, (IReadOnlyList<string>)new List<string>(), "Graze", "Default", "Graze"); } } public sealed class FlandreDestroySeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandreDestroySeDef))] public sealed class FlandreDestroySe : StatusEffect { } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("FlandreDestroySe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandreDestroySe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 10, (StatusEffectType)0, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class FlandreHellfireSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandreHellfireSeDef))] public sealed class FlandreHellfireSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnded); } private IEnumerable<BattleAction> OnOwnerTurnEnded(UnitEventArgs args) { return TakeEffect(); } public IEnumerable<BattleAction> TakeEffect() { if (((StatusEffect)this).Owner != null && !((StatusEffect)this).Battle.BattleShouldEnd) { ((StatusEffect)this).NotifyActivating(); bool isDefend = ((StatusEffect)this).Owner.Block > 0 || ((StatusEffect)this).Owner.Shield > 0; yield return (BattleAction)(object)PerformAction.Effect(((StatusEffect)this).Owner, "HitFire", 0f, "FlameHit", 0f, (EffectBehavior)0, 0f); yield return (BattleAction)(object)DamageAction.Reaction(((StatusEffect)this).Owner, ((StatusEffect)this).Level, "Instant"); if (isDefend && ((StatusEffect)this).Owner != null && ((StatusEffect)this).Owner.IsAlive) { yield return (BattleAction)(object)DamageAction.Reaction(((StatusEffect)this).Owner, ((StatusEffect)this).Level, "Instant"); } } } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("FlandreHellfireSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandreHellfireSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 11, (StatusEffectType)2, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)1536, (IReadOnlyList<string>)new List<string>(), "DebuffRed", "Default", "FirepowerNegative"); } } public sealed class FlandrePassiveSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandrePassiveSeDef))] public sealed class FlandrePassiveSe : StatusEffect { public int Value => 1; protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<StatusEffectEventArgs>(((Unit)((StatusEffect)this).Battle.Player).StatusEffectRemoving, (EventSequencedReactor<StatusEffectEventArgs>)OnPlayerStatusEffectRemoving); } private IEnumerable<BattleAction> OnPlayerStatusEffectRemoving(StatusEffectEventArgs args) { if (args.Effect == this) { ((GameEventArgs)args).CanCancel = true; ((GameEventArgs)args).CancelBy((GameEntity)(object)this); } yield break; } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("FlandrePassiveSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandrePassiveSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", -2, (StatusEffectType)2, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class FlandrePrismaticSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandrePrismaticSeDef))] public sealed class FlandrePrismaticSe : StatusEffect { } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("FlandrePrismaticSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandrePrismaticSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 10, (StatusEffectType)0, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class FlandreRuinSeDef : StatusEffectTemplate { [EntityLogic(typeof(FlandreRuinSeDef))] public sealed class FlandreRuinSe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarting, (GameEventHandler<UnitEventArgs>)OnOwnerTurnStarting); foreach (EnemyUnit allAliveEnemy in ((StatusEffect)this).Battle.AllAliveEnemies) { ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(((Unit)allAliveEnemy).DamageTaking, (GameEventHandler<DamageEventArgs>)OnEnemyDamageTaking, (GameEventPriority)99); } ((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Battle.EnemySpawned, (GameEventHandler<UnitEventArgs>)OnEnemySpawned); } private void OnOwnerTurnStarting(UnitEventArgs args) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (((StatusEffect)this).IsAutoDecreasing) { int level = ((StatusEffect)this).Level; ((StatusEffect)this).Level = level - 1; if (((StatusEffect)this).Level == 0) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0f))); } } else { ((StatusEffect)this).IsAutoDecreasing = true; } } private void OnEnemyDamageTaking(DamageEventArgs args) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) DamageInfo val = args.DamageInfo; float num = ((DamageInfo)(ref val)).Amount + (float)((StatusEffect)this).Level; val = args.DamageInfo; DamageType damageType = ((DamageInfo)(ref val)).DamageType; val = args.DamageInfo; bool isGrazed = ((DamageInfo)(ref val)).IsGrazed; val = args.DamageInfo; bool isAccuracy = ((DamageInfo)(ref val)).IsAccuracy; val = args.DamageInfo; val = new DamageInfo(num, damageType, isGrazed, isAccuracy, ((DamageInfo)(ref val)).DontBreakPerfect); val = ((DamageInfo)(ref val)).BlockBy(args.Target.Block); args.DamageInfo = ((DamageInfo)(ref val)).ShieldBy(args.Target.Shield); ((GameEventArgs)args).AddModifier((GameEntity)(object)this); } private void OnEnemySpawned(UnitEventArgs args) { ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(args.Unit.DamageTaking, (GameEventHandler<DamageEventArgs>)OnEnemyDamageTaking, (GameEventPriority)99); } } public override IdContainer GetId() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("FlandreRuinSe"); } public override LocalizationOption LoadLocalization() { return (LocalizationOption)(object)BepinexPlugin.statusEffectLoc.AddEntity((EntityDefinition)(object)this); } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.FlandreRuinSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 1, (StatusEffectType)2, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "BuffBlue", "Default", "Firepower"); } } } namespace AyaShameimaru.Stages { internal static class BattleManager { internal static FieldRef<BattleController, PlayerUnit> battlePlayerRef = AccessTools.FieldRefAccess<BattleController, PlayerUnit>(ConfigReflection.BackingWrap("Player")); internal static void SetPlayer(this BattleController battle, PlayerUnit player) { battlePlayerRef.Invoke(battle) = player; } } public class AyaMisc { public static IEnumerator BloodyRemoveDeckCard() { if (Singleton<GameMaster>.Instance.CurrentGameRun != null) { ShowCardsPanel panel = UiManager.GetPanel<ShowCardsPanel>(); yield return panel.ShowAsync(new ShowCardsPayload { Name = LocalizationExtensions.Localize("Game.Deck", true), Description = LocalizationExtensions.Localize("Cards.RemoveTips", true), Cards = Singleton<GameMaster>.Instance.CurrentGameRun.BaseDeckWithoutUnremovable.ToList(), CanCancel = true, InteractionType = (InteractionType)2 }); if (!panel.IsCanceled) { Card selectedCard = panel.SelectedCard; Singleton<GameMaster>.Instance.CurrentGameRun.Damage(10, (DamageType)0, true, true, (Adventure)null); Singleton<GameMaster>.Instance.CurrentGameRun.RemoveDeckCard(selectedCard, true); AudioManager.PlayUi("Jingshen", false); } } } public static UnityAction GetUnityAction(IEnumerator enumerator) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown return (UnityAction)delegate { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(enumerator); }; } public static Button CreateButton(string s, UnityAction unityAction) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) GameObject val = DefaultControls.CreateButton(default(Resources)); Button componentInChildren = val.GetComponentInChildren<Button>(); ((TMP_Text)((Component)((Component)componentInChildren).transform).GetComponentInChildren<TextMeshProUGUI>()).text = s; ((UnityEvent)componentInChildren.onClick).AddListener(unityAction); return componentInChildren; } } public sealed class LongExtraStageDef : StageTemplate { [EntityLogic(typeof(LongExtraStageDef))] public sealed class LongExtraStage : Stage { public LongExtraStage() { ((Stage)this).Level = 666; ((Stage)this).CardUpgradedChance = 1f; UniqueRandomPool<string> obj = new UniqueRandomPool<string>(true); obj.Add("31", 1f); obj.Add("32", 1f); obj.Add("33", 1f); ((Stage)this).EnemyPoolAct1 = obj; UniqueRandomPool<string> obj2 = new UniqueRandomPool<string>(true); obj2.Add("34", 1f); obj2.Add("35", 1f); obj2.Add("36", 1f); ((Stage)this).EnemyPoolAct2 = obj2; UniqueRandomPool<string> obj3 = new UniqueRandomPool<string>(true); obj3.Add("37", 1f); obj3.Add("38", 1f); obj3.Add("39", 1f); ((Stage)this).EnemyPoolAct3 = obj3; UniqueRandomPool<string> obj4 = new UniqueRandomPool<string>(true); obj4.Add("37", 1f); obj4.Add("38", 1f); obj4.Add("39", 1f); ((Stage)this).EliteEnemyPool = obj4; RepeatableRandomPool<string> obj5 = new RepeatableRandomPool<string>(); obj5.Add("LongBossAyaEnemyGroup", 1f); ((Stage)this).BossPool = obj5; UniqueRandomPool<Type> val = new UniqueRandomPool<Type>(false); val.Add(typeof(PatchouliPhilosophy), 1f); val.Add(typeof(JunkoColorless), 1f); val.Add(typeof(ShinmyoumaruForge), 1f); val.Add(typeof(MiyoiBartender), 1f); val.Add(typeof(WatatsukiPurify), 1f); ((Stage)this).FirstAdventurePool = val; val = new UniqueRandomPool<Type>(true); val.Add(typeof(YorigamiSisters), 1f); val.Add(typeof(HatateInterview), 1f); val.Add(typeof(HinaCollect), 1f); val.Add(typeof(KogasaSpook), 1f); val.Add(typeof(KosuzuBookstore), 1f); val.Add(typeof(NarumiOfferCard), 1f); val.Add(typeof(NazrinDetect), 1f); val.Add(typeof(MedicinePoison), 1.2f); val.Add(typeof(BackgroundDancers), 1.2f); val.Add(typeof(SatoriCounseling), 1.2f); ((Stage)this).AdventurePool = val; } public override GameMap CreateMap() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 int num = 24; GameMap val = new GameMap(num + 1, 1, (UiType)0, "LongBossAyaEnemyGroup"); val.Nodes[0, 0] = new MapNode(val, 0, 0, 1) { StationType = (StationType)7, FollowerList = { 0 } }; for (int i = 0; i < num - 1; i++) { StationType stationType = (StationType)1; val.Nodes[i + 1, 0] = new MapNode(val, i + 1, 0, 1) { StationType = stationType, FollowerList = { 0 } }; } val.Nodes[num, 0] = new MapNode(val, num, 0, 1) { StationType = (StationType)10 }; val.StartNode = val.Nodes[0, 0]; val.StartNode.Status = (MapNodeStatus)1; val.EndNode = val.Nodes[num, 0]; if ((int)val.EndNode.StationType == 10) { val.BossNode = val.EndNode; } return val; } } public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("LongExtraStage"); } public override StageConfig MakeConfig() { StageConfig val = ((StageTemplate)this).DefaultConfig(); val.Obj0 = "LongExtraStageBackground"; val.Obj1 = "LongExtraStageBackground"; val.Obj2 = "LongExtraStageBackground"; val.Obj3 = "LongExtraStageBackground"; val.Obj4 = "LongExtraStageBackground"; return val; } } public static class AyaBackgrounds { public const string AyaBackground = "AyaBackground"; public const string AyaBackgroundTransition = "AyaBackgroundTransition"; public const string AyaBossFlandreBackground = "AyaBossFlandreBackground"; public const string AyaGreyBackground = "AyaGreyBackground"; public const string AyaTanukiBackground = "AyaTanukiBackground"; public const string AyaSpellCircleA1 = "AyaSpellCircleA1"; public const string AyaSpellCircleA2 = "AyaSpellCircleA2"; public const string AyaSpellCircleB1 = "AyaSpellCircleB1"; public const string AyaSpellCircleB2 = "AyaSpellCircleB2"; public const string AyaSpellCircleB3 = "AyaSpellCircleB3"; public const string AyaSpellCircleB4 = "AyaSpellCircleB4"; public const string AyaSpellScene = "AyaSpellScene"; public const string FlandreSpellScene1 = "FlandreSpellScene1"; public const string FlandreSpellScene2 = "FlandreSpellScene2"; public const string LongExtraStageBackground = "LongExtraStageBackground"; public static void AddAyaBackgrounds() { StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaBackground", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaBackground.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform15 = self.transform; transform15.position += new Vector3(0f, 0f, -0.1f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaBackgroundTransition", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaBackgroundTransition.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform14 = self.transform; transform14.position += new Vector3(0f, 0f, -0.2f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaBossFlandreBackground", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaBossFlandreBackground.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform13 = self.transform; transform13.position += new Vector3(0f, 0f, -0.1f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaGreyBackground", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaGreyBackground.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform12 = self.transform; transform12.position += new Vector3(0f, 0f, -0.2f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaTanukiBackground", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaTanukiBackground.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform11 = self.transform; transform11.position += new Vector3(0f, 0f, -0.1f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaSpellCircleA1", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaSpellCircleA.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform10 = self.transform; transform10.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaSpellCircleA2", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaSpellCircleA.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform9 = self.transform; transform9.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaSpellCircleB1", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaSpellCircleB.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform8 = self.transform; transform8.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaSpellCircleB2", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaSpellCircleB.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform7 = self.transform; transform7.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaSpellCircleB3", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaSpellCircleB.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform6 = self.transform; transform6.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaSpellCircleB4", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaSpellCircleB.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform5 = self.transform; transform5.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("AyaSpellScene", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaSpellScene.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform4 = self.transform; transform4.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("FlandreSpellScene1", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("FlandreSpellScene1.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform3 = self.transform; transform3.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("FlandreSpellScene2", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("FlandreSpellScene2.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform2 = self.transform; transform2.position += new Vector3(0f, 0f, -0.3f); return self; }, (string)null, (Assembly)null); StageTemplate.AddEvironmentGameobject(StageTemplate.CreateSimpleEnvObject("LongExtraStageBackground", BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("LongExtraStageBackground.png")), false, (Func<GameObject, GameObject>)delegate(GameObject self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) Transform transform = self.transform; transform.position += new Vector3(0f, 0f, -0.1f); return self; }, (string)null, (Assembly)null); } } } namespace AyaShameimaru.PlayerUnits { public sealed class AyaPlayerUnitDef : PlayerUnitTemplate { [EntityLogic(typeof(AyaPlayerUnitDef))] public sealed class AyaPlayerUnit : PlayerUnit { [HarmonyPatch(typeof(SihunYuSe), "OnOwnerTurnEnded")] private class SihunYuSe_OnOwnerTurnEnded_Patch { private static bool Prefix(SihunYuSe __instance) { return FinalBossSequence < 3; } } [HarmonyPatch(typeof(UiManager), "LeaveGameRun")] private class UiManager_LeaveGameRun_Patch { private static void Postfix(UiManager __instance) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) background.SetActive(false); CardConfig.FromId("AyaNews").Damage = 1; CardConfig.FromId("AyaNews").Value1 = null; CardConfig.FromId("AyaNews").TargetType = (TargetType)3; if (((Enum)CardConfig.FromId("AyaNews").Keywords).HasFlag((Enum)(object)(Keyword)8388608)) { CardConfig obj = CardConfig.FromId("AyaNews"); obj.Keywords = (Keyword)(obj.Keywords - 8388608); } if (((Enum)CardConfig.FromId("HatateNews").Keywords).HasFlag((Enum)(object)(Keyword)8388608)) { CardConfig obj2 = CardConfig.FromId("HatateNews"); obj2.Keywords = (Keyword)(obj2.Keywords - 8388608); } CardConfig.FromId("AyaWindGirl").Value1 = 1; } } [HarmonyPatch(typeof(Unit), "Heal")] private class Unit_Heal_Patch { private static void Postfix(Unit __instance) { if (Singleton<GameMaster>.Instance.CurrentGameRun != null && __instance is AyaPlayerUnit && FinalBossSequence < 3 && !FinalBossTransition && !BossStationFinished) { if ((float)__instance.Hp / (float)__instance.MaxHp > 0.66f) { UiManager.GetPanel<SystemBoard>().characterImage.sprite = BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar.png"); } else { UiManager.GetPanel<SystemBoard>().characterImage.sprite = (((float)__instance.Hp / (float)__instance.MaxHp > 0.33f) ? BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar1.png") : BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar2.png")); } } } } [CompilerGenerated] private sealed class <LoadDummyAsync3>d__252 : IAsyncStateMachine { public int <>1__state; public AsyncUniTaskMethodBuilder<UnitView> <>t__builder; public EnemyUnit child; public EnemyUnit parent; private GameObject <gameObject>5__1; private UnitView <unitView>5__2; private Awaiter <>u__1; private void MoveNext() { //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; UnitView result; try { Awaiter awaiter; if (num != 0) { <gameObject>5__1 = ((parent == null) ? Object.Instantiate<GameObject>(Singleton<GameDirector>.Instance.unitPrefab, Singleton<GameDirector>.Instance.playerRoot) : Object.Instantiate<GameObject>(Singleton<GameDirector>.Instance.unitPrefab, ((Component)((Unit)parent).GetView<UnitView>()).transform)); <unitView>5__2 = <gameObject>5__1.GetComponent<UnitView>(); <unitView>5__2.Unit = (Unit)(object)child; <unitView>5__2.IsHidden = false; UniTask val = <unitView>5__2.LoadUnitModelAsync(child.ModelName, true, EnemyUnitConfig.FromId(((GameEntity)child).Id).HpLength); awaiter = ((UniTask)(ref val)).GetAwaiter(); if (!((Awaiter)(ref awaiter)).IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; <LoadDummyAsync3>d__252 <LoadDummyAsync3>d__ = this; <>t__builder.AwaitUnsafeOnCompleted<Awaiter, <LoadDummyAsync3>d__252>(ref awaiter, ref <LoadDummyAsync3>d__); return; } } else { awaiter = <>u__1; <>u__1 = default(Awaiter); num = (<>1__state = -1); } ((Awaiter)(ref awaiter)).GetResult(); ((Unit)child).SetView((IUnitView)(object)<unitView>5__2); Singleton<GameDirector>.Instance.EnemyUnitViews.Add(<unitView>5__2); result = <unitView>5__2; } catch (Exception exception) { <>1__state = -2; <gameObject>5__1 = null; <unitView>5__2 = null; <>t__builder.SetException(exception); return; } <>1__state = -2; <gameObject>5__1 = null; <unitView>5__2 = null; <>t__builder.SetResult(result); } void IAsyncStateMachine.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext this.MoveNext(); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine) { //ILSpy generated this explicit interface implementation from .override directive in SetStateMachine this.SetStateMachine(stateMachine); } } [CompilerGenerated] private sealed class <LoadDummyAsync>d__250 : IAsyncStateMachine { public int <>1__state; public AsyncUniTaskMethodBuilder<UnitView> <>t__builder; public EnemyUnit child; public EnemyUnit parent; public Action clickAction; public int index; public AyaPlayerUnit <>4__this; private UnitView <obj>5__1; private UnitView <>s__2; private Awaiter<UnitView> <>u__1; private void MoveNext() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; UnitView result; try { Awaiter<UnitView> awaiter; if (num != 0) { awaiter = LoadDummyAsync2(child, parent).GetAwaiter(); if (!awaiter.IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter; <LoadDummyAsync>d__250 <LoadDummyAsync>d__ = this; <>t__builder.AwaitUnsafeOnCompleted<Awaiter<UnitView>, <LoadDummyAsync>d__250>(ref awaiter, ref <LoadDummyAsync>d__); return; } } else { awaiter = <>u__1; <>u__1 = default(Awaiter<UnitView>); num = (<>1__state = -1); } <>s__2 = awaiter.GetResult(); <obj>5__1 = <>s__2; <>s__2 = null; <obj>5__1.ClickHandler = clickAction; result = <obj>5__1; } catch (Exception exception) { <>1__state = -2; <obj>5__1 = null; <>t__builder.SetException(exception); return; } <>1__state = -2; <obj>5__1 = null; <>t__builder.SetResult(result); } void IAsyncStateMachine.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext this.MoveNext(); } [DebuggerHidden] private void SetStateMachine(IAsyncStateMachine stateMachine) { } void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine) { //ILSpy generated this explicit interface implementation from .override directive in SetStateMachine this.SetStateMachine(stateMachine); } } public int? Story; public static bool BossStationFinished = false; public static bool LastInputTriggered = false; public static int FinalBossSequence = 0; public static EnemyUnit FinalBoss = null; public static bool FinalBossTransition = false; private static GameObject background = StageTemplate.TryGetEnvObject("AyaBackgroundTransition", (Assembly)null); private bool AyaIntro = false; private List<string> fastAttacks = new List<string>(); private bool fastAttack = false; private bool LastEnemyCommented = false; private bool CirnoLeaved = false; private bool LastEnemy = false; public string AyaFastAttack1Aya => ((GameEntity)this).LocalizeProperty("AyaFastAttack1Aya", true, true); public string AyaFastAttack2Aya => ((GameEntity)this).LocalizeProperty("AyaFastAttack2Aya", true, true); public string AyaFastAttack3Aya => ((GameEntity)this).LocalizeProperty("AyaFastAttack3Aya", true, true); public string AyaChapterSelect => ((GameEntity)this).LocalizeProperty("AyaChapterSelect", true, true); public string AyaChapter1Act1AyaTanukiIntro1AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act1AyaTanukiIntro1AyaTanuki", true, true); public string AyaChapter1Act1AyaTanukiIntro2Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act1AyaTanukiIntro2Aya", true, true); public string AyaChapter1Act1AyaTanukiIntro3Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act1AyaTanukiIntro3Aya", true, true); public string AyaChapter1Act1AyaTanukiIntro4AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act1AyaTanukiIntro4AyaTanuki", true, true); public string AyaChapter1Act21AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act21AyaTanuki", true, true); public string AyaChapter1Act22Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act22Aya", true, true); public string AyaChapter1Act23Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act23Aya", true, true); public string AyaChapter1Act24Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act24Aya", true, true); public string AyaChapter1Act25AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act25AyaTanuki", true, true); public string AyaChapter1Act26AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act26AyaTanuki", true, true); public string AyaChapter1Act27Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act27Aya", true, true); public string AyaChapter1Act28Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act28Aya", true, true); public string AyaChapter1Act29Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act29Aya", true, true); public string AyaChapter1Act210Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act210Aya", true, true); public string AyaChapter1Act211Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act211Aya", true, true); public string AyaChapter1Act212AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act212AyaTanuki", true, true); public string AyaChapter1Act213Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act213Aya", true, true); public string AyaChapter1Act214AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act214AyaTanuki", true, true); public string AyaChapter1Act215Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act215Aya", true, true); public string AyaChapter1Act216AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act216AyaTanuki", true, true); public string AyaChapter1Act217Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act217Aya", true, true); public string AyaChapter1Act218Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act218Aya", true, true); public string AyaChapter1Act219AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act219AyaTanuki", true, true); public string AyaChapter1Act220Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act220Aya", true, true); public string AyaChapter1Act221Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act221Aya", true, true); public string AyaChapter1Act31Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act31Aya", true, true); public string AyaChapter1Act32AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act32AyaTanuki", true, true); public string AyaChapter1Act33Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act33Aya", true, true); public string AyaChapter1Act34Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act34Aya", true, true); public string AyaChapter1Act35AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act35AyaTanuki", true, true); public string AyaChapter1Act36AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act36AyaTanuki", true, true); public string AyaChapter1Act4SeijaPhase11Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase11Seija", true, true); public string AyaChapter1Act4SeijaPhase12Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase12Aya", true, true); public string AyaChapter1Act4SeijaPhase13Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase13Aya", true, true); public string AyaChapter1Act4SeijaPhase14Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase14Seija", true, true); public string AyaChapter1Act4SeijaPhase15Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase15Seija", true, true); public string AyaChapter1Act4SeijaPhase16Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase16Aya", true, true); public string AyaChapter1Act4SeijaPhase2Hidden1Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase2Hidden1Aya", true, true); public string AyaChapter1Act4SeijaPhase2Hidden2Koishi => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase2Hidden2Koishi", true, true); public string AyaChapter1Act4SeijaPhase21Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase21Seija", true, true); public string AyaChapter1Act4SeijaPhase22Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase22Seija", true, true); public string AyaChapter1Act4SeijaPhase23Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase23Aya", true, true); public string AyaChapter1Act4SeijaPhase24Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase24Seija", true, true); public string AyaChapter1Act4SeijaPhase25Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase25Seija", true, true); public string AyaChapter1Act4SeijaPhase26Reimu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase26Reimu", true, true); public string AyaChapter1Act4SeijaPhase27Marisa => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase27Marisa", true, true); public string AyaChapter1Act4SeijaPhase28Sakuya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase28Sakuya", true, true); public string AyaChapter1Act4SeijaPhase29Cirno => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase29Cirno", true, true); public string AyaChapter1Act4SeijaPhase210Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase210Seija", true, true); public string AyaChapter1Act4SeijaPhase211Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase211Aya", true, true); public string AyaChapter1Act4SeijaPhase212Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase212Seija", true, true); public string AyaChapter1Act4SeijaPhase213Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase213Aya", true, true); public string AyaChapter1Act4SeijaPhase214Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase214Seija", true, true); public string AyaChapter1Act4SeijaPhase215Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase215Aya", true, true); public string AyaChapter1Act4SeijaPhase216Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase216Aya", true, true); public string AyaChapter1Act4SeijaPhase217Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase217Aya", true, true); public string AyaChapter1Act4SeijaPhase3Normal1Cirno => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3Normal1Cirno", true, true); public string AyaChapter1Act4SeijaPhase3True1Cirno => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True1Cirno", true, true); public string AyaChapter1Act4SeijaPhase3True2Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True2Aya", true, true); public string AyaChapter1Act4SeijaPhase3True3Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True3Aya", true, true); public string AyaChapter1Act4SeijaPhase3True4Cirno => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True4Cirno", true, true); public string AyaChapter1Act4SeijaPhase3True5Cirno => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True5Cirno", true, true); public string AyaChapter1Act4SeijaPhase3True6Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True6Aya", true, true); public string AyaChapter1Act4SeijaPhase3True7Cirno => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True7Cirno", true, true); public string AyaChapter1Act4SeijaPhase3True8Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True8Aya", true, true); public string AyaChapter1Act4SeijaPhase31Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase31Seija", true, true); public string AyaChapter1Act4SeijaPhase32Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase32Megumu", true, true); public string AyaChapter1Act4SeijaPhase33Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase33Seija", true, true); public string AyaChapter1Act4SeijaPhase34Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase34Seija", true, true); public string AyaChapter1Act4SeijaPhase35Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase35Megumu", true, true); public string AyaChapter1Act4SeijaPhase36Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase36Megumu", true, true); public string AyaChapter1Act4SeijaPhase37Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase37Megumu", true, true); public string AyaChapter1Act4SeijaPhase38Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase38Seija", true, true); public string AyaChapter1Act4SeijaPhase39Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase39Seija", true, true); public string AyaChapter1Act4SeijaPhase310Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase310Seija", true, true); public string AyaChapter1Act4SeijaPhase311Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase311Seija", true, true); public string AyaChapter1Act4SeijaPhase312Seija => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase312Seija", true, true); public string AyaChapter1Act4SeijaPhase3Normal2Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3Normal2Megumu", true, true); public string AyaChapter1Act4SeijaPhase3Normal3Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3Normal3Megumu", true, true); public string AyaChapter1Act4SeijaPhase3Normal4Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3Normal4Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True9Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True9Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True10Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True10Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True11Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True11Aya", true, true); public string AyaChapter1Act4SeijaPhase3True12Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True12Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True13Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True13Aya", true, true); public string AyaChapter1Act4SeijaPhase3True14Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True14Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True15Aya => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True15Aya", true, true); public string AyaChapter1Act4SeijaPhase3True16Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True16Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True17Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True17Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True18Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True18Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True19Megumu => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True19Megumu", true, true); public string AyaChapter1Act4SeijaPhase3True20Okina => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True20Okina", true, true); public string AyaChapter1Act4SeijaPhase3True21AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True21AyaTanuki", true, true); public string AyaChapter1Act4SeijaPhase3True22AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True22AyaTanuki", true, true); public string AyaChapter1Act4SeijaPhase3True23AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True23AyaTanuki", true, true); public string AyaChapter1Act4SeijaPhase3True24AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True24AyaTanuki", true, true); public string AyaChapter1Act4SeijaPhase3True25AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True25AyaTanuki", true, true); public string AyaChapter1Act4SeijaPhase3True26AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True26AyaTanuki", true, true); public string AyaChapter1Act4SeijaPhase3True27AyaTanuki => ((GameEntity)this).LocalizeProperty("AyaChapter1Act4SeijaPhase3True27AyaTanuki", true, true); protected override void OnEnterGameRun(GameRunController gameRun) { //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(Timer()); ((Unit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.StationEntered, (GameEventHandler<StationEventArgs>)delegate { //IL_009e: Unknown result type (might be due to invalid IL or missing references) BossStationFinished = false; if ((float)((Unit)this).Hp / (float)((Unit)this).MaxHp > 0.66f) { UiManager.GetPanel<SystemBoard>().characterImage.sprite = BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar.png"); } else { UiManager.GetPanel<SystemBoard>().characterImage.sprite = (((float)((Unit)this).Hp / (float)((Unit)this).MaxHp > 0.33f) ? BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar1.png") : BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar2.png")); } UnitView view = ((Unit)this).GetView<UnitView>(); if (view == null || ((Component)view).transform.localPosition.x != 0f) { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(Return()); } if (!Story.HasValue && CollectionsExtensions.Empty<JadeBox>((IReadOnlyCollection<JadeBox>)((GameEntity)this).GameRun.JadeBoxes)) { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(ChapterSelect()); } if (Story == 1 && ((GameEntity)this).GameRun.CurrentStage.Level == 2 && ((GameEntity)this).GameRun.CurrentStation is EntryStation) { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(Chapter1Act2Dialogue()); } if (Story == 1 && ((GameEntity)this).GameRun.CurrentStage.Level == 3 && ((GameEntity)this).GameRun.CurrentStation is EntryStation) { ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(Chapter1Act3Dialogue()); } }); ((Unit)this).HandleGameRunEvent<StationEventArgs>(((GameEntity)this).GameRun.StationFinished, (GameEventHandler<StationEventArgs>)delegate(StationEventArgs args) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected I4, but got Unknown //IL_0294: Unknown result type (might be due to invalid IL or missing references) if (args.Station is BossStation) { BossStationFinished = true; UiManager.GetPanel<SystemBoard>().characterImage.sprite = BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar4.png"); if (args.Station.IsNormalEnd) { GameDifficulty difficulty = ((GameEntity)this).GameRun.Difficulty; GameDifficulty val = difficulty; switch (val - 1) { case 0: if (!BepinexPlugin.AyaRecords.Value.Contains("NormalAyaPlayerUnit")) { ConfigEntry<string> ayaRecords7 = BepinexPlugin.AyaRecords; ayaRecords7.Value += (BasicTypeExtensions.IsNullOrEmpty(BepinexPlugin.AyaRecords.Value) ? "NormalAyaPlayerUnit" : ",NormalAyaPlayerUnit"); } break; case 1: if (!BepinexPlugin.AyaRecords.Value.Contains("NormalAyaPlayerUnit")) { ConfigEntry<string> ayaRecords5 = BepinexPlugin.AyaRecords; ayaRecords5.Value += (BasicTypeExtensions.IsNullOrEmpty(BepinexPlugin.AyaRecords.Value) ? "NormalAyaPlayerUnit" : ",NormalAyaPlayerUnit"); } if (!BepinexPlugin.AyaRecords.Value.Contains("HardAyaPlayerUnit")) { ConfigEntry<string> ayaRecords6 = BepinexPlugin.AyaRecords; ayaRecords6.Value += (BasicTypeExtensions.IsNullOrEmpty(BepinexPlugin.AyaRecords.Value) ? "HardAyaPlayerUnit" : ",HardAyaPlayerUnit"); } break; case 2: if (!BepinexPlugin.AyaRecords.Value.Contains("NormalAyaPlayerUnit")) { ConfigEntry<string> ayaRecords = BepinexPlugin.AyaRecords; ayaRecords.Value += (BasicTypeExtensions.IsNullOrEmpty(BepinexPlugin.AyaRecords.Value) ? "NormalAyaPlayerUnit" : ",NormalAyaPlayerUnit"); } if (!BepinexPlugin.AyaRecords.Value.Contains("HardAyaPlayerUnit")) { ConfigEntry<string> ayaRecords2 = BepinexPlugin.AyaRecords; ayaRecords2.Value += (BasicTypeExtensions.IsNullOrEmpty(BepinexPlugin.AyaRecords.Value) ? "HardAyaPlayerUnit" : ",HardAyaPlayerUnit"); } if (!BepinexPlugin.AyaRecords.Value.Contains("LunaticAyaPlayerUnit")) { ConfigEntry<string> ayaRecords3 = BepinexPlugin.AyaRecords; ayaRecords3.Value += (BasicTypeExtensions.IsNullOrEmpty(BepinexPlugin.AyaRecords.Value) ? "LunaticAyaPlayerUnit" : ",LunaticAyaPlayerUnit"); } if (!BepinexPlugin.AyaRecords.Value.Contains("PhantasmAyaPlayerUnit") && BepinexPlugin.AyaPhantasmMode.Value && PuzzleFlags.GetPuzzleLevel(((GameEntity)this).GameRun.Puzzles) == 7) { ConfigEntry<string> ayaRecords4 = BepinexPlugin.AyaRecords; ayaRecords4.Value += (BasicTypeExtensions.IsNullOrEmpty(BepinexPlugin.AyaRecords.Value) ? "PhantasmAyaPlayerUnit" : ",PhantasmAyaPlayerUnit"); } break; } } } }); ((Unit)this).HandleGameRunEvent<DamageEventArgs>(((Unit)((GameEntity)this).GameRun.Player).DamageReceived, (GameEventHandler<DamageEventArgs>)delegate { if (FinalBossSequence < 3 && !FinalBossTransition && !BossStationFinished) { if ((float)((Unit)this).Hp / (float)((Unit)this).MaxHp > 0.66f) { UiManager.GetPanel<SystemBoard>().characterImage.sprite = BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar.png"); } else { UiManager.GetPanel<SystemBoard>().characterImage.sprite = (((float)((Unit)this).Hp / (float)((Unit)this).MaxHp > 0.33f) ? BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar1.png") : BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar2.png")); } } }); GameRunController gameRun2 = ((GameEntity)this).GameRun; int removeBadCardForbidden = gameRun2.RemoveBadCardForbidden; gameRun2.RemoveBadCardForbidden = removeBadCardForbidden + 1; CardConfig.FromId("AyaNews").Damage = 12; CardConfig.FromId("AyaNews").Value1 = 1; CardConfig.FromId("AyaNews").TargetType = (TargetType)1; if (!((Enum)CardConfig.FromId("AyaNews").Keywords).HasFlag((Enum)(object)(Keyword)8388608)) { CardConfig obj = CardConfig.FromId("AyaNews"); obj.Keywords = (Keyword)(obj.Keywords + 8388608); } if (!((Enum)CardConfig.FromId("HatateNews").Keywords).HasFlag((Enum)(object)(Keyword)8388608)) { CardConfig obj2 = CardConfig.FromId("HatateNews"); obj2.Keywords = (Keyword)(obj2.Keywords + 8388608); } CardConfig.FromId("AyaWindGirl").Value1 = 2; } private IEnumerator Chapter1Act2Dialogue() { BepinexPlugin.StoryWait = true; AyaTanuki ayaTanuki = Library.CreateEnemyUnit<AyaTanuki>(); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(UniTaskExtensions.ToCoroutine<UnitView>(LoadDummyAsync((EnemyUnit)(object)ayaTanuki, null, delegate { }), (Action<UnitView>)null, (Action<Exception>)null)); yield return (object)new WaitUntil((Func<bool>)(() => Object.op_Implicit((Object)(object)((Unit)ayaTanuki).GetView<UnitView>()))); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOLocalMove(((Component)((Unit)ayaTanuki).GetView<UnitView>()).transform, new Vector3(-1f, 0f), 0f, false), (Ease)1), true), true)); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOLocalMove(((Component)((Unit)this).GetView<UnitView>()).transform, new Vector3(1f, 0f), 0f, false), (Ease)1), true), true)); yield return (object)new WaitUntil((Func<bool>)(() => ((UiBase)UiManager.GetPanel<MapPanel>()).IsVisible)); UiManager.GetPanel<VnPanel>().SetNextButton(false, (int?)null, (Action)null); ((UiPanelBase)UiManager.GetPanel<MapPanel>()).Hide(); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act21AyaTanuki, 2f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(2f); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOScaleX(((Component)((Unit)this).GetView<UnitView>()).transform, -1f, 0.33f), (Ease)1), true), true)); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act22Aya, 5f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(5f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act23Aya, 5f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(5f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act24Aya, 5f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(5f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act25AyaTanuki, 4f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(4f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act26AyaTanuki, 2f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(2f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act27Aya, 2f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(2f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act28Aya, 4f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(4f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act29Aya, 4f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(4f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act210Aya, 3.5f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(3.5f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act211Aya, 2f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(2f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act212AyaTanuki, 1f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(1f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act213Aya, 2.5f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(2.5f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act214AyaTanuki, 2.5f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(2.5f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act215Aya, 1f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(1f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act216AyaTanuki, 1f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(1f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act217Aya, 2.5f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(2.5f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act218Aya, 2.5f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(2.5f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act219AyaTanuki, 2.5f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(2.5f); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOScaleX(((Component)((Unit)this).GetView<UnitView>()).transform, 1f, 0.33f), (Ease)1), true), true)); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act220Aya, 1.5f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(1.5f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act221Aya, 2.5f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(2.5f); BepinexPlugin.StoryWait = false; ((GameEntity)this).GameRun.CurrentMap.SetAdjacentNodesStatus(((GameEntity)this).GameRun.MapMode); UiManager.GetPanel<VnPanel>().SetNextButton(true, (int?)0, (Action)delegate { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown UiManager.Show<MapPanel>(); if (!((UiManager.GetPanel<VnPanel>().NextButtonStringIndex.GetValueOrDefault() == 0) & UiManager.GetPanel<VnPanel>().NextButtonStringIndex.HasValue) && !((UiManager.GetPanel<VnPanel>().NextButtonStringIndex.GetValueOrDefault() == 1) & UiManager.GetPanel<VnPanel>().NextButtonStringIndex.HasValue) && GameMaster.ShowBriefHint && GameMaster.ShouldShowHint("SkipReward")) { ((UiPanel<HintPayload>)(object)UiManager.GetPanel<HintPanel>()).Show(new HintPayload { HintKey = "SkipReward" }); GameMaster.MarkHintAsShown("SkipReward"); } }); } private IEnumerator Chapter1Act3Dialogue() { BepinexPlugin.StoryWait = true; AyaTanuki ayaTanuki = Library.CreateEnemyUnit<AyaTanuki>(); ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(UniTaskExtensions.ToCoroutine<UnitView>(LoadDummyAsync((EnemyUnit)(object)ayaTanuki, null, delegate { }), (Action<UnitView>)null, (Action<Exception>)null)); yield return (object)new WaitUntil((Func<bool>)(() => Object.op_Implicit((Object)(object)((Unit)ayaTanuki).GetView<UnitView>()))); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOLocalMove(((Component)((Unit)ayaTanuki).GetView<UnitView>()).transform, new Vector3(-1f, 0f), 0f, false), (Ease)1), true), true)); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOLocalMove(((Component)((Unit)this).GetView<UnitView>()).transform, new Vector3(1f, 0f), 0f, false), (Ease)1), true), true)); yield return (object)new WaitUntil((Func<bool>)(() => ((UiBase)UiManager.GetPanel<MapPanel>()).IsVisible)); UiManager.GetPanel<VnPanel>().SetNextButton(false, (int?)null, (Action)null); ((UiPanelBase)UiManager.GetPanel<MapPanel>()).Hide(); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act31Aya, 2f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(2f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act32AyaTanuki, 0.75f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(0.75f); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOScaleX(((Component)((Unit)this).GetView<UnitView>()).transform, -1f, 0.33f), (Ease)1), true), true)); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act33Aya, 3f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(3f); ((Unit)this).GetView<UnitView>().Chat(AyaChapter1Act34Aya, 3f, (CloudType)3, 0f); yield return (object)new WaitForSecondsRealtime(3f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act35AyaTanuki, 1.5f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(1f); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<Sequence>(TweenSettingsExtensions.SetUpdate<Sequence>(TweenSettingsExtensions.SetEase<Sequence>(TweenSettingsExtensions.Append(TweenSettingsExtensions.Append(DOTween.Sequence(), (Tween)(object)ShortcutExtensions.DOScaleX(((Component)((Unit)this).GetView<UnitView>()).transform, 1f, 0.33f)), (Tween)(object)ShortcutExtensions.DOLocalMoveX(((Component)((Unit)this).GetView<UnitView>()).transform, 16f, 1f, false)), (Ease)1), true), true)); yield return (object)new WaitForSecondsRealtime(3f); ((Unit)ayaTanuki).GetView<UnitView>().Chat(AyaChapter1Act36AyaTanuki, 3f, (CloudType)2, 0f); yield return (object)new WaitForSecondsRealtime(1f); TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3, VectorOptions>>(ShortcutExtensions.DOLocalMoveX(((Component)((Unit)ayaTanuki).GetView<UnitView>()).transform, 16f, 3f, false), (Ease)1), true), true)); yield return (object)new WaitForSecondsRealtime(3f); BepinexPlugin.StoryWait = false; ((GameEntity)this).GameRun.CurrentMap.SetAdjacentNodesStatus(((GameEntity)this).GameRun.MapMode); UiManager.GetPanel<VnPanel>().SetNextButton(true, (int?)0, (Action)delegate { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown UiManager.Show<MapPanel>(); if (!((UiManager.GetPanel<VnPanel>().NextButtonStringIndex.GetValueOrDefault() == 0) & UiManager.GetPanel<VnPanel>().NextButtonStringIndex.HasValue) && !((UiManager.GetPanel<VnPanel>().NextButtonStringIndex.GetValueOrDefault() == 1) & UiManager.GetPanel<VnPanel>().NextButtonStringIndex.HasValue) && GameMaster.ShowBriefHint && GameMaster.ShouldShowHint("SkipReward")) { ((UiPanel<HintPayload>)(object)UiManager.GetPanel<HintPanel>()).Show(new HintPayload { HintKey = "SkipReward" }); GameMaster.MarkHintAsShown("SkipReward"); } }); } private IEnumerator ChapterSelect() { List<Card> cards = new List<Card> { (Card)(object)Library.CreateCard<AyaChapter0>(false), (Card)(object)Library.CreateCard<AyaChapter1>(false) }; MiniSelectCardInteraction interaction = new MiniSelectCardInteraction((IEnumerable<Card>)cards, false, false, false) { Description = AyaChapterSelect }; yield return ((GameEntity)this).GameRun.InteractionViewer.View((Interaction)(object)interaction); Card selectedCard = interaction.SelectedCard; Card val = selectedCard; if (!(val is AyaChapter0)) { if (val is AyaChapter1) { Story = 1; ((MonoBehaviour)Singleton<GameMaster>.Instance).StartCoroutine(((GameEntity)this).GameRun.GainExhibitRunner((Exhibit)(object)Library.CreateExhibit<JingjieGanzhiyi>(), false, (VisualSourceData)null)); if (CollectionsExtensions.TryGetValue<Stage>((IReadOnlyList<Stage>)((GameEntity)this).GameRun._stages, 0) != null) { CollectionsExtensions.TryGetValue<Stage>((IReadOnlyList<Stage>)((GameEntity)this).GameRun._stages, 0).EliteEnemyPool.Remove("Aya", false); CollectionsExtensions.TryGetValue<Stage>((IReadOnlyList<Stage>)((GameEntity)this).GameRun._stages, 0).EliteEnemyPool.Add("Aya", float.MaxValue); } } } else { Story = 0; } } private IEnumerator Timer() { yield return (object)new WaitUntil((Func<bool>)(() => Singleton<GameMaster>.Instance.CurrentGameRun != null)); while (Singleton<GameMaster>.Instance.CurrentGameRun != null && Singleton<GameMaster>.Instance.CurrentGameRun.Player == this && FinalBossSequence < 3 && !FinalBossTransition) { if (!BossStationFinished) { if (BepinexPlugin.LastInput >= 90 && !LastInputTriggered) { LastInputTriggered = true; UiManager.GetPanel<SystemBoard>().characterImage.sprite = BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar3.png"); } else if (BepinexPlugin.LastInput < 90 && LastInputTriggered) { LastInputTriggered = false; if ((float)((Unit)this).Hp / (float)((Unit)this).MaxHp > 0.66f) { UiManager.GetPanel<SystemBoard>().characterImage.sprite = BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar.png"); } else { UiManager.GetPanel<SystemBoard>().characterImage.sprite = (((float)((Unit)this).Hp / (float)((Unit)this).MaxHp > 0.33f) ? BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar1.png") : BepinexPlugin.ayaShameimaru.LoadAsset<Sprite>("AyaAvatar2.png")); } } } yield return (object)new WaitForSecondsRealtime(1f); BepinexPlugin.LastInput++; } } private IEnumerator Return() { TweenExtensions.WaitForCompletion((Tween)(object)TweenSettingsExtensions.SetAutoKill<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetUpdate<TweenerCore<Vector3, Vector3, VectorOptions>>(TweenSettingsExtensions.SetEase<TweenerCore<Vector3, Vector3,