Decompiled source of Aya Shameimaru v0.0.11
AyaShameimaru.dll
Decompiled 2 months 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.PlayerUnits; using AyaShameimaru.StatusEffects; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using Cysharp.Threading.Tasks; using HarmonyLib; using JetBrains.Annotations; using LBoL.Base; using LBoL.Base.Extensions; using LBoL.ConfigData; using LBoL.Core; using LBoL.Core.Battle; using LBoL.Core.Battle.BattleActions; using LBoL.Core.Cards; using LBoL.Core.Intentions; using LBoL.Core.Randoms; using LBoL.Core.StatusEffects; using LBoL.Core.Units; using LBoL.EntityLib.Cards.Enemy; using LBoL.EntityLib.EnemyUnits.Character; using LBoL.EntityLib.Exhibits; using LBoL.EntityLib.StatusEffects.Enemy; using LBoL.EntityLib.StatusEffects.Reimu; using LBoL.Presentation; using LBoL.Presentation.UI; using LBoL.Presentation.UI.Panels; using LBoLEntitySideloader; using LBoLEntitySideloader.Attributes; using LBoLEntitySideloader.Entities; using LBoLEntitySideloader.ExtraFunc; using LBoLEntitySideloader.Resource; using LBoLEntitySideloader.Utils; using UnityEngine; using UnityEngine.Experimental.Rendering; [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 { [BepInPlugin("intoxicatedkid.ayashameimaru", "Aya Shameimaru", "0.0.11")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInProcess("LBoL.exe")] public class BepinexPlugin : BaseUnityPlugin { 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", ""); private void Awake() { log = ((BaseUnityPlugin)this).Logger; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; EntityManager.RegisterSelf(); harmony.PatchAll(); if (Chainloader.PluginInfos.ContainsKey("neo.lbol.tools.watermark")) { WatermarkWrapper.ActivateWatermark(); } } private void OnDestroy() { if (harmony != null) { harmony.UnpatchSelf(); } } } public static class PluginInfo { public const string GUID = "intoxicatedkid.ayashameimaru"; public const string Name = "Aya Shameimaru"; public const string version = "0.0.11"; 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) { int count = (int)Math.Truncate((float)((StatusEffect)this).Level / 4f); ((StatusEffect)this).Count = count; ((StatusEffect)this).HandleOwnerEvent<BlockShieldEventArgs>(((StatusEffect)this).Owner.BlockShieldGaining, (GameEventHandler<BlockShieldEventArgs>)delegate(BlockShieldEventArgs args) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Invalid comparison between Unknown and I4 //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Invalid comparison between Unknown and I4 //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Invalid comparison between Unknown and I4 if ((int)args.Type != 2) { ActionCause cause = ((GameEventArgs)args).Cause; if ((int)cause == 1 || (int)cause == 20 || (int)cause == 4) { if (args.Shield != 0f) { args.Shield = Math.Max(args.Shield - (float)((StatusEffect)this).Level, 0f); } ((GameEventArgs)args).AddModifier((GameEntity)(object)this); } } }); ((StatusEffect)this).HandleOwnerEvent<StatisticalDamageEventArgs>(((StatusEffect)this).Owner.StatisticalTotalDamageReceived, (GameEventHandler<StatisticalDamageEventArgs>)delegate { int count3 = (int)Math.Truncate((float)((StatusEffect)this).Level / 4f); ((StatusEffect)this).Count = count3; }); ((StatusEffect)this).HandleOwnerEvent<StatusEffectApplyEventArgs>(((StatusEffect)this).Owner.StatusEffectAdded, (GameEventHandler<StatusEffectApplyEventArgs>)delegate { int count2 = (int)Math.Truncate((float)((StatusEffect)this).Level / 4f); ((StatusEffect)this).Count = count2; }); ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarting, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarting); ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnEnding, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnEnding); } private IEnumerable<BattleAction> OnOwnerTurnStarting(UnitEventArgs args) { int num = (int)Math.Truncate((float)((StatusEffect)this).Level / 4f); if (num > 0) { int num2 = (((StatusEffect)this).Owner.HasStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe)) ? (num - ((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe)).Level) : num); if (num2 > 0) { yield return (BattleAction)(object)new ApplyStatusEffectAction<AyaEvasionSeDef.AyaEvasionSe>(((StatusEffect)this).Owner, (int?)num2, (int?)null, (int?)null, (int?)null, 0.2f, true); } else if (num2 < 0) { ((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe)).Level = num; } } else if (((StatusEffect)this).Owner.HasStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe))) { yield return (BattleAction)new RemoveStatusEffectAction(((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe)), false, 0.1f); } } private IEnumerable<BattleAction> OnOwnerTurnEnding(UnitEventArgs args) { int num = (int)Math.Truncate((float)((StatusEffect)this).Level / 4f); if (num > 0) { int num2 = (((StatusEffect)this).Owner.HasStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe)) ? (num - ((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe)).Level) : num); if (num2 > 0) { yield return (BattleAction)(object)new ApplyStatusEffectAction<AyaEvasionSeDef.AyaEvasionSe>(((StatusEffect)this).Owner, (int?)num2, (int?)null, (int?)null, (int?)null, 0.2f, true); } else if (num2 < 0) { ((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe)).Level = num; } } else if (((StatusEffect)this).Owner.HasStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe))) { yield return (BattleAction)new RemoveStatusEffectAction(((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaEvasionSeDef.AyaEvasionSe)), false, 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("AyaAccelerationSe"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } 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)), "", 1, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, true, (StackType?)(StackType)0, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "AyaEvasionSe" }, "Default", "Default", "Default"); } } public sealed class AyaEvasionSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaEvasionSeDef))] public sealed class AyaEvasionSe : 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (__instance.HasStatusEffect<AyaEvasionSe>() && (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 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<AyaEvasionSe>()) { if (((DamageInfo)(ref info)).IsGrazed) { __instance.GetStatusEffect<AyaEvasionSe>().Activate(); } else if (((DamageInfo)(ref info)).IsAccuracy) { __instance.GetStatusEffect<AyaEvasionSe>().BeenAccurate(); } } } } [HarmonyPatch(typeof(Graze), "Activate")] private class Graze_Activate_Patch { private static bool Prefix(StatusEffect __instance) { if (__instance.Owner.HasStatusEffect<AyaEvasionSe>()) { return false; } return true; } } [HarmonyPatch(typeof(Graze), "BeenAccurate")] private class Graze_BeenAccurate_Patch { private static bool Prefix(StatusEffect __instance) { if (__instance.Owner.HasStatusEffect<AyaEvasionSe>()) { return false; } return true; } } public override string UnitEffectName => "GrazeLoop"; protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (GameEventHandler<UnitEventArgs>)OnOwnerTurnStarted); } private void OnOwnerTurnStarted(UnitEventArgs args) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown if (!((StatusEffect)this).Owner.HasStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe))) { if (((StatusEffect)this).IsAutoDecreasing) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f))); } else { ((StatusEffect)this).IsAutoDecreasing = true; } } } public void Activate() { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown int level = ((StatusEffect)this).Level; ((StatusEffect)this).Level = level - 1; if (((StatusEffect)this).Owner.HasStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe))) { StatusEffect statusEffect = ((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe)); level = statusEffect.Level; statusEffect.Level = level - 1; if (((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe)).Level == 0) { ((StatusEffect)this).Owner.TryRemoveStatusEffect(((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe))); } } 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 void BeenAccurate() { //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown int level = ((StatusEffect)this).Level; ((StatusEffect)this).Level = level - 1; if (((StatusEffect)this).Owner.HasStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe))) { StatusEffect statusEffect = ((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe)); level = statusEffect.Level; statusEffect.Level = level - 1; if (((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe)).Level == 0) { ((StatusEffect)this).Owner.TryRemoveStatusEffect(((StatusEffect)this).Owner.GetStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe))); } } if (((StatusEffect)this).Level == 0) { ((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("AyaEvasionSe"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaEvasionSe.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)), "", 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> { "Graze" }, "Graze", "Default", "Graze"); } } public sealed class AyaPassiveSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaPassiveSeDef))] public sealed class AyaPassiveSe : StatusEffect { protected override void OnAdded(Unit unit) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Invalid comparison between Unknown and I4 //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown foreach (Card item in ((StatusEffect)this).Battle.EnumerateAllCards()) { if ((int)item.CardType == 7 && ((GameEntity)item).DebugName.Contains("News")) { item.DeltaDamage += 10; item.IsAccuracy = true; item.IsExile = true; item.IsEthereal = true; item.IsReplenish = true; } } ((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToDiscard, (GameEventHandler<CardsEventArgs>)OnAddCard); ((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToHand, (GameEventHandler<CardsEventArgs>)OnAddCard); ((StatusEffect)this).HandleOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddedToExile, (GameEventHandler<CardsEventArgs>)OnAddCard); ((StatusEffect)this).HandleOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddedToDrawZone, (GameEventHandler<CardsAddingToDrawZoneEventArgs>)OnAddCardToDraw); foreach (EnemyUnit allAliveEnemy in ((StatusEffect)this).Battle.AllAliveEnemies) { if (!((Unit)allAliveEnemy).HasStatusEffect<AyaWalletSeDef.AyaWalletSe>()) { RandomGen gameRunEventRng = ((GameEntity)this).GameRun.GameRunEventRng; MinMax powerLoot = allAliveEnemy.Config.PowerLoot; int min = ((MinMax)(ref powerLoot)).Min; powerLoot = allAliveEnemy.Config.PowerLoot; int value = Math.Max(gameRunEventRng.NextInt(min, ((MinMax)(ref powerLoot)).Max), 10); ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new ApplyStatusEffectAction(typeof(AyaWalletSeDef.AyaWalletSe), (Unit)(object)allAliveEnemy, (int?)value, (int?)null, (int?)null, (int?)null, 0f, true))); } } } private void OnAddCard(CardsEventArgs args) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 Card[] cards = args.Cards; foreach (Card val in cards) { if ((int)val.CardType == 7 && ((GameEntity)val).DebugName.Contains("News")) { val.DeltaDamage += 10; val.IsAccuracy = true; val.IsExile = true; val.IsEthereal = true; val.IsReplenish = true; } } } private void OnAddCardToDraw(CardsAddingToDrawZoneEventArgs args) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 Card[] cards = args.Cards; foreach (Card val in cards) { if ((int)val.CardType == 7 && ((GameEntity)val).DebugName.Contains("News")) { val.DeltaDamage += 10; val.IsAccuracy = true; val.IsExile = true; val.IsEthereal = true; val.IsReplenish = true; } } } } 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() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaPassiveSe.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)), "", -1, (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)8912896, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class AyaPerfectEvasionSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaPerfectEvasionSeDef))] public sealed class AyaPerfectEvasionSe : 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<AyaPerfectEvasionSe>() && (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<AyaPerfectEvasionSe>() && ((DamageInfo)(ref info)).IsGrazed) { __instance.GetStatusEffect<AyaPerfectEvasionSe>().Activate(); } } } [HarmonyPatch(typeof(AyaEvasionSeDef.AyaEvasionSe), "Activate")] private class AyaEvasionSe_Activate_Patch { private static bool Prefix(StatusEffect __instance) { if (__instance.Owner.HasStatusEffect<AyaPerfectEvasionSe>()) { return false; } return true; } } [HarmonyPatch(typeof(AyaEvasionSeDef.AyaEvasionSe), "BeenAccurate")] private class AyaEvasionSe_BeenAccurate_Patch { private static bool Prefix(StatusEffect __instance) { if (__instance.Owner.HasStatusEffect<AyaPerfectEvasionSe>()) { return false; } return true; } } [HarmonyPatch(typeof(Graze), "Activate")] private class Graze_Activate_Patch { private static bool Prefix(StatusEffect __instance) { if (__instance.Owner.HasStatusEffect<AyaPerfectEvasionSe>()) { return false; } return true; } } [HarmonyPatch(typeof(Graze), "BeenAccurate")] private class Graze_BeenAccurate_Patch { private static bool Prefix(StatusEffect __instance) { if (__instance.Owner.HasStatusEffect<AyaPerfectEvasionSe>()) { return false; } return true; } } public override string UnitEffectName => "GrazeLoop"; protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (GameEventHandler<UnitEventArgs>)OnOwnerTurnStarted); } private void OnOwnerTurnStarted(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 - 1; ((StatusEffect)this).Level = level; if (((StatusEffect)this).Level == 0) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f))); } } else { ((StatusEffect)this).IsAutoDecreasing = true; } } 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 - 1; ((StatusEffect)this).Level = level; 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("AyaPerfectEvasionSe"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaPerfectEvasionSe.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, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string> { "AyaEvasionSe" }, "Graze", "Default", "Graze"); } } public sealed class AyaWalletSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaWalletSeDef))] public sealed class AyaWalletSe : 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("AyaWalletSe"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaWalletSe.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>(), "Default", "Default", "Default"); } } } namespace AyaShameimaru.PlayerUnits { public sealed class AyaPlayerUnitDef : PlayerUnitTemplate { [EntityLogic(typeof(AyaPlayerUnitDef))] public sealed class AyaPlayerUnit : PlayerUnit { protected override void OnEnterBattle(BattleController battle) { ((Unit)this).ReactBattleEvent<GameEventArgs>(((Unit)this).Battle.BattleStarted, (Func<GameEventArgs, IEnumerable<BattleAction>>)OnBattleStarted); ((Unit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Unit)this).Battle.Player).TurnStarted, (Func<UnitEventArgs, IEnumerable<BattleAction>>)OnPlayerTurnStarted); ((Unit)this).ReactBattleEvent<CardsEventArgs>(((Unit)this).Battle.CardsAddingToDiscard, (Func<CardsEventArgs, IEnumerable<BattleAction>>)OnCardsAddingToDiscard); ((Unit)this).ReactBattleEvent<CardsEventArgs>(((Unit)this).Battle.CardsAddingToHand, (Func<CardsEventArgs, IEnumerable<BattleAction>>)OnCardsAddingToHand); ((Unit)this).ReactBattleEvent<CardsEventArgs>(((Unit)this).Battle.CardsAddingToExile, (Func<CardsEventArgs, IEnumerable<BattleAction>>)OnCardsAddingToExile); ((Unit)this).ReactBattleEvent<CardsAddingToDrawZoneEventArgs>(((Unit)this).Battle.CardsAddingToDrawZone, (Func<CardsAddingToDrawZoneEventArgs, IEnumerable<BattleAction>>)OnCardsAddingToDrawZone); } private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs arg) { yield return (BattleAction)new ApplyStatusEffectAction(typeof(AyaPassiveSeDef.AyaPassiveSe), (Unit)(object)this, (int?)null, (int?)null, (int?)null, (int?)null, 0f, true); } private IEnumerable<BattleAction> OnPlayerTurnStarted(UnitEventArgs arg) { AyaPassiveSeDef.AyaPassiveSe ayaPassiveSe = default(AyaPassiveSeDef.AyaPassiveSe); if (!((Unit)this).TryGetStatusEffect<AyaPassiveSeDef.AyaPassiveSe>(ref ayaPassiveSe)) { yield return (BattleAction)new ApplyStatusEffectAction(typeof(AyaPassiveSeDef.AyaPassiveSe), (Unit)(object)this, (int?)null, (int?)null, (int?)null, (int?)null, 0f, true); } } private IEnumerable<BattleAction> OnCardsAddingToDiscard(CardsEventArgs arg) { if (((GameEventArgs)arg).ActionSource == this || !arg.Cards.Any((Card card) => card is AyaNewsReimuSp)) { yield break; } List<Card> cards = new List<Card>(); Card[] cards2 = arg.Cards; foreach (Card card2 in cards2) { if (card2 is AyaNewsReimuSp) { cards.Add((Card)(object)Library.CreateCard<AyaNewsAyaPlayerUnitSpDef.AyaNewsAyaPlayerUnitSp>()); } else { cards.Add(card2); } } ((GameEventArgs)arg).CancelBy((GameEntity)(object)this); yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)cards, (AddCardsType)0); } private IEnumerable<BattleAction> OnCardsAddingToHand(CardsEventArgs arg) { if (((GameEventArgs)arg).ActionSource == this || !arg.Cards.Any((Card card) => card is AyaNewsReimuSp)) { yield break; } List<Card> cards = new List<Card>(); Card[] cards2 = arg.Cards; foreach (Card card2 in cards2) { if (card2 is AyaNewsReimuSp) { cards.Add((Card)(object)Library.CreateCard<AyaNewsAyaPlayerUnitSpDef.AyaNewsAyaPlayerUnitSp>()); } else { cards.Add(card2); } } ((GameEventArgs)arg).CancelBy((GameEntity)(object)this); yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)cards); } private IEnumerable<BattleAction> OnCardsAddingToExile(CardsEventArgs arg) { if (((GameEventArgs)arg).ActionSource == this || !arg.Cards.Any((Card card) => card is AyaNewsReimuSp)) { yield break; } List<Card> cards = new List<Card>(); Card[] cards2 = arg.Cards; foreach (Card card2 in cards2) { if (card2 is AyaNewsReimuSp) { cards.Add((Card)(object)Library.CreateCard<AyaNewsAyaPlayerUnitSpDef.AyaNewsAyaPlayerUnitSp>()); } else { cards.Add(card2); } } ((GameEventArgs)arg).CancelBy((GameEntity)(object)this); yield return (BattleAction)new AddCardsToExileAction((IEnumerable<Card>)cards); } private IEnumerable<BattleAction> OnCardsAddingToDrawZone(CardsAddingToDrawZoneEventArgs arg) { if (((GameEventArgs)arg).ActionSource == this || !arg.Cards.Any((Card card) => card is AyaNewsReimuSp)) { yield break; } List<Card> cards = new List<Card>(); Card[] cards2 = arg.Cards; foreach (Card card2 in cards2) { if (card2 is AyaNewsReimuSp) { cards.Add((Card)(object)Library.CreateCard<AyaNewsAyaPlayerUnitSpDef.AyaNewsAyaPlayerUnitSp>()); } else { cards.Add(card2); } } ((GameEventArgs)arg).CancelBy((GameEntity)(object)this); yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)cards, arg.DrawZoneTarget, (AddCardsType)0); } } public static DirectorySource dir = new DirectorySource("intoxicatedkid.ayashameimaru", ""); public static string name = "AyaPlayerUnit"; public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("AyaPlayerUnit"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override PlayerImages LoadPlayerImages() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown PlayerImages val = new PlayerImages(); val.AutoLoad("Aya", (Func<string, Sprite>)((string s) => ResourceLoader.LoadSprite(s, (IResourceSource)(object)dir, (Rect?)null, 1, (Vector2?)null)), (Func<string, UniTask<Sprite>>)((string s) => ResourceLoader.LoadSpriteAsync(s, dir, 100, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://")), (UseSame)2, ".png", ""); return val; } public override PlayerUnitConfig MakeConfig() { //IL_001d: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown int? num = 0; ManaGroup val = default(ManaGroup); ((ManaGroup)(ref val)).Red = 2; ((ManaGroup)(ref val)).Green = 2; return new PlayerUnitConfig("", 6, 0, num, "", "#ab9561", true, 65, val, 65, 0, "AyaUltG", "AyaUltG", "AyaR", "AyaG", (IReadOnlyList<string>)new string[9] { "Shoot", "Shoot", "Boundary", "Boundary", "AyaAttackR", "AyaAttackR", "AyaBlockG", "AyaBlockG", "AyaWindWalk" }, (IReadOnlyList<string>)new string[9] { "Shoot", "Shoot", "Boundary", "Boundary", "AyaAttackG", "AyaAttackG", "AyaBlockR", "AyaBlockR", "AyaTakePicture" }, 1, 2); } } public sealed class AyaPlayerUnitUnitModelDef : UnitModelTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return ((EntityDefinition)new AyaPlayerUnitDef()).UniqueId; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles("UnitModel"); return (LocalizationOption)(object)val; } public override ModelOption LoadModelOptions() { //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_0011: Expected O, but got Unknown return new ModelOption(ResourcesHelper.LoadSpineUnitAsync("Aya")); } public override UniTask<Sprite> LoadSpellSprite() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadSpriteAsync("Aya.png", AyaPlayerUnitDef.dir, 1200, (GraphicsFormat)4, 1, (FilterMode)1, (SpriteMeshType)1, (Rect?)null, (Vector2?)null, "file://"); } public override UnitModelConfig MakeConfig() { UnitModelConfig val = ObjectExtensions.Copy<UnitModelConfig>(UnitModelConfig.FromName("Aya")); val.Flip = false; return val; } } public sealed class AyaUltGDef : UltimateSkillTemplate { [EntityLogic(typeof(AyaUltGDef))] public sealed class AyaUltG : UltimateSkill { [UsedImplicitly] public ManaGroup Mana => ManaGroup.Empty; public AyaUltG() { ((UltimateSkill)this).TargetType = (TargetType)1; ((UltimateSkill)this).GunName = "EAyaSpell1"; } protected override IEnumerable<BattleAction> Actions(UnitSelector selector) { yield return (BattleAction)(object)PerformAction.Spell((Unit)(object)((UltimateSkill)this).Battle.Player, "AyaUltG"); GunConfig.FromName("EAyaSpell1").Spell = null; yield return (BattleAction)new DamageAction((Unit)(object)((UltimateSkill)this).Owner, (Unit)(object)selector.GetEnemy(((UltimateSkill)this).Battle), ((UltimateSkill)this).Damage, ((UltimateSkill)this).GunName, (GunType)0); GunConfig.FromName("EAyaSpell1").Spell = "天狗巨暴流"; EnemyUnit target = selector.GetEnemy(((UltimateSkill)this).Battle); List<Card> list = ((UltimateSkill)this).Battle.HandZone.Where((Card card) => (int)card.CardType == 7).ToList(); foreach (Card card2 in list) { if (!((Unit)target).IsAlive) { if (((UltimateSkill)this).Battle.BattleShouldEnd) { yield break; } target = CollectionsExtensions.Sample<EnemyUnit>(((UltimateSkill)this).Battle.AllAliveEnemies, ((GameEntity)this).GameRun.BattleRng); } if (card2 is Bribery || card2 is Payment || card2.IsForbidden) { yield return (BattleAction)new ExileCardAction(card2); } else if ((int)card2.Zone == 2 && card2.Config.TargetType == (TargetType?)0 && !card2.IsForbidden) { yield return (BattleAction)(object)CardHelper.AutoCastAction(card2, UnitSelector.Nobody, Mana, true); } else if ((int)card2.Zone == 2 && card2.Config.TargetType == (TargetType?)1 && !card2.IsForbidden) { UnitSelector unitSelector = new UnitSelector(target); yield return (BattleAction)(object)CardHelper.AutoCastAction(card2, unitSelector, Mana, true); } else if ((int)card2.Zone == 2 && card2.Config.TargetType == (TargetType?)2 && !card2.IsForbidden) { yield return (BattleAction)(object)CardHelper.AutoCastAction(card2, UnitSelector.AllEnemies, Mana, true); } else if ((int)card2.Zone == 2 && card2.Config.TargetType == (TargetType?)3 && !card2.IsForbidden) { yield return (BattleAction)(object)CardHelper.AutoCastAction(card2, UnitSelector.RandomEnemy, Mana, true); } else if ((int)card2.Zone == 2 && card2.Config.TargetType == (TargetType?)4 && !card2.IsForbidden) { yield return (BattleAction)(object)CardHelper.AutoCastAction(card2, UnitSelector.Self, Mana, true); } else if ((int)card2.Zone == 2 && card2.Config.TargetType == (TargetType?)5 && !card2.IsForbidden) { yield return (BattleAction)(object)CardHelper.AutoCastAction(card2, UnitSelector.All, Mana, true); } } } } public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("AyaUltG"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("AyaUltG.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override UltimateSkillConfig MakeConfig() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown return new UltimateSkillConfig("", 10, 100, 100, 2, (UsRepeatableType)1, 24, 0, 0, (Keyword)131328, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>()); } } public sealed class AyaPlayerUnitBgm : BgmTemplate { 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("AyaPlayerUnit"); } public override UniTask<AudioClip> LoadAudioClipAsync() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) return ResourceLoader.LoadAudioClip("The_Youkai_Mountain.ogg", (AudioType)14, BepinexPlugin.directorySource, "file://"); } public override BgmConfig MakeConfig() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown return new BgmConfig("", BepinexPlugin.sequenceTable.Next(typeof(BgmConfig)), true, "", "", "", (float?)0.5f, (float?)278.1f, "The Youkai Mountain ~ Mysterious Mountain", "Demetori", "妖怪の山 ~ Mysterious Mountain", ""); } } } namespace AyaShameimaru.Exhibits { public sealed class AyaGDef : ExhibitTemplate { [EntityLogic(typeof(AyaGDef))] [UsedImplicitly] public sealed class AyaG : ShiningExhibit { protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleStarted, (EventSequencedReactor<GameEventArgs>)OnBattleStarted); ((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed); } private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs args) { ((Exhibit)this).Active = true; if (!((Unit)((Exhibit)this).Owner).HasStatusEffect<AyaPassiveSeDef.AyaPassiveSe>()) { yield return (BattleAction)new ApplyStatusEffectAction(typeof(AyaPassiveSeDef.AyaPassiveSe), (Unit)(object)((Exhibit)this).Owner, (int?)null, (int?)null, (int?)null, (int?)null, 0f, true); } } private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args) { if (((Exhibit)this).Active && args.Card is AyaNews) { ((Exhibit)this).NotifyActivating(); ((Exhibit)this).Active = false; yield return (BattleAction)new GainMoneyAction(((Exhibit)this).Value1, (SpecialSourceType)0); } } protected override void OnLeaveBattle() { ((Exhibit)this).Active = false; } } 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("AyaG"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, false, false, false, (AppearanceType)0, "AyaPlayerUnit", (ExhibitLosableType)1, (Rarity)3, (int?)10, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)5, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "AyaNews" }); } } public sealed class AyaRDef : ExhibitTemplate { [EntityLogic(typeof(AyaRDef))] [UsedImplicitly] public sealed class AyaR : ShiningExhibit { protected override void OnEnterBattle() { ((Exhibit)this).ReactBattleEvent<GameEventArgs>(((Exhibit)this).Battle.BattleStarted, (EventSequencedReactor<GameEventArgs>)OnBattleStarted); } private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs args) { if (!((Unit)((Exhibit)this).Owner).HasStatusEffect<AyaPassiveSeDef.AyaPassiveSe>()) { yield return (BattleAction)new ApplyStatusEffectAction(typeof(AyaPassiveSeDef.AyaPassiveSe), (Unit)(object)((Exhibit)this).Owner, (int?)null, (int?)null, (int?)null, (int?)null, 0f, true); } yield return (BattleAction)new ApplyStatusEffectAction(typeof(AyaAccelerationSeDef.AyaAccelerationSe), (Unit)(object)((Exhibit)this).Owner, (int?)((Exhibit)this).Value1, (int?)null, (int?)null, (int?)null, 0f, true); } } 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("AyaR"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override ExhibitSprites LoadSprite() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown string folder = ""; ExhibitSprites val = new ExhibitSprites(); Func<string, Sprite> func = (string s) => ResourceLoader.LoadSprite(folder + IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + s + ".png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); val.main = func(""); return val; } public override ExhibitConfig MakeConfig() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown return new ExhibitConfig(BepinexPlugin.sequenceTable.Next(typeof(ExhibitConfig)), "", 10, false, false, false, false, (AppearanceType)0, "AyaPlayerUnit", (ExhibitLosableType)1, (Rarity)3, (int?)4, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)4, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string> { "AyaAccelerationSe" }, (IReadOnlyList<string>)new List<string> { "AyaNews" }); } } } namespace AyaShameimaru.EnemyUnits { public sealed class AyaBossDef : EnemyUnitTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("AyaBoss"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override EnemyUnitConfig MakeConfig() { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown return new EnemyUnitConfig("AyaBoss", true, false, (IReadOnlyList<ManaColor>)(object)new ManaColor[2] { (ManaColor)4, (ManaColor)5 }, 10, "Aya", "#ab9561", (EnemyType)3, false, (float?)null, (int?)null, 170, (int?)9, (int?)12, (int?)15, (int?)25, (int?)1, (int?)15, (int?)8, (int?)8, (int?)180, (int?)10, (int?)14, (int?)18, (int?)30, (int?)1, (int?)17, (int?)8, (int?)8, (int?)190, (int?)11, (int?)16, (int?)21, (int?)35, (int?)2, (int?)19, (int?)8, (int?)8, new MinMax(100, 100), new MinMax(100, 100), (IReadOnlyList<string>)new string[1] { "EAyaShoot1" }, (IReadOnlyList<string>)new string[1] { "Simple1" }, (IReadOnlyList<string>)new string[1] { "Simple1" }, (IReadOnlyList<string>)new string[1] { "Simple1" }); } } [EntityLogic(typeof(AyaBossDef))] public sealed class AyaBoss : EnemyUnit { private enum MoveType { ShootAccuracy, DoubleShoot, AyaNews } private MoveType Next { get; set; } private int AyaNewsHappenCount { get; set; } private int AyaNewsCountDown { get; set; } private int ShootCountDown { get; set; } private Type SpecialReport { get; set; } private bool AyaIsDamaged { get; set; } protected override void OnEnterBattle(BattleController battle) { Next = MoveType.AyaNews; AyaNewsHappenCount = 0; AyaNewsCountDown = 3; ShootCountDown = 2; switch (((GameEntity)((GameEntity)this).GameRun.Player).Id) { default: SpecialReport = typeof(AyaNewsReimuSp); Debug.LogWarning((object)"This character needs a new special report in Aya battle."); break; case "Alice": SpecialReport = typeof(AyaNewsAliceSp); break; case "Koishi": SpecialReport = typeof(AyaNewsKoishiSp); break; case "Cirno": SpecialReport = typeof(AyaNewsCirnoSp); break; case "Sakuya": SpecialReport = typeof(AyaNewsSakuyaSp); break; case "Marisa": SpecialReport = typeof(AyaNewsMarisaSp); break; case "Reimu": SpecialReport = typeof(AyaNewsReimuSp); break; } ((Unit)this).ReactBattleEvent<GameEventArgs>(((Unit)this).Battle.BattleStarted, (Func<GameEventArgs, IEnumerable<BattleAction>>)OnBattleStarted); ((Unit)this).ReactBattleEvent<DamageEventArgs>(((Unit)this).DamageReceived, (Func<DamageEventArgs, IEnumerable<BattleAction>>)OnDamageReceived); AyaIsDamaged = false; } private IEnumerable<BattleAction> OnBattleStarted(GameEventArgs arg) { yield return (BattleAction)(object)PerformAction.Chat((Unit)(object)this, LocalizationExtensions.Localize("Chat.Aya1", true), 3.5f, 0.5f, 0f, true); yield return (BattleAction)(object)new ApplyStatusEffectAction<WindGirl>((Unit)(object)this, (int?)((EnemyUnit)this).Count1, (int?)null, (int?)null, (int?)null, 0f, true); } private IEnumerable<BattleAction> OnDamageReceived(DamageEventArgs arg) { if (!AyaIsDamaged) { yield return (BattleAction)(object)PerformAction.Chat((Unit)(object)this, LocalizationExtensions.Localize("Chat.Aya2", true), 3f, 0f, 0f, true); AyaIsDamaged = true; } } private IEnumerable<BattleAction> AyaNewsActions() { int num = AyaNewsHappenCount + 1; AyaNewsHappenCount = num; AyaNewsCountDown = 3; if (AyaNewsHappenCount == 3) { string text = LocalizationExtensions.LocalizeFormat("Chat.Aya3", new object[1] { ((Unit)((Unit)this).Battle.Player).GetName() }); yield return (BattleAction)(object)PerformAction.Chat((Unit)(object)this, text, 3f, 1f, 0f, true); yield return (BattleAction)(object)new ApplyStatusEffectAction<InterviewDone>((Unit)(object)this, (int?)null, (int?)null, (int?)null, (int?)null, 0f, true); } List<Card> cards = new List<Card> { Library.CreateCard(typeof(AyaNews)), ((Unit)this).HasStatusEffect<InterviewDone>() ? Library.CreateCard(SpecialReport) : Library.CreateCard(typeof(AyaNews)), Library.CreateCard(typeof(AyaNews)) }; yield return (BattleAction)new EnemyMoveAction((EnemyUnit)(object)this, ((EnemyUnit)this).GetMove(3), true); yield return (BattleAction)(object)PerformAction.Animation((Unit)(object)this, "skill1", 1f, (string)null, 0f, -1); yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)cards, (AddCardsType)0); } protected override IEnumerable<IEnemyMove> GetTurnMoves() { switch (Next) { case MoveType.ShootAccuracy: yield return ((EnemyUnit)this).AttackMove(((EnemyUnit)this).GetMove(0), ((EnemyUnit)this).Gun2, ((EnemyUnit)this).Damage2 + ((EnemyUnit)this).EnemyBattleRng.NextInt(0, 2), 1, true, "Instant", true); break; case MoveType.DoubleShoot: yield return ((EnemyUnit)this).AttackMove(((EnemyUnit)this).GetMove(1), ((EnemyUnit)this).Gun1, ((EnemyUnit)this).Damage1 + ((EnemyUnit)this).EnemyBattleRng.NextInt(0, 1), 2, false, "Instant", true); break; case MoveType.AyaNews: yield return (IEnemyMove)new SimpleEnemyMove(Intention.AddCard().WithMoveName(((EnemyUnit)this).GetMove(2)), AyaNewsActions()); break; default: throw new ArgumentOutOfRangeException(); } } protected override void UpdateMoveCounters() { int ayaNewsCountDown = AyaNewsCountDown - 1; AyaNewsCountDown = ayaNewsCountDown; if (AyaNewsCountDown <= 0) { Next = MoveType.AyaNews; return; } if (!((Unit)this).HasStatusEffect<InterviewDone>() && !AyaIsDamaged) { Next = MoveType.AyaNews; return; } ayaNewsCountDown = ShootCountDown - 1; ShootCountDown = ayaNewsCountDown; if (ShootCountDown <= 0) { Next = MoveType.ShootAccuracy; ShootCountDown = ((EnemyUnit)this).EnemyMoveRng.NextInt(2, 3); } else { Next = MoveType.DoubleShoot; } } } } namespace AyaShameimaru.EnemyGroups { public sealed class AyaBossEnemyGroupDef : EnemyGroupTemplate { public override IdContainer GetId() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) return IdContainer.op_Implicit("AyaBossEnemyGroupDef"); } public override EnemyGroupConfig MakeConfig() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown return new EnemyGroupConfig("", "AyaBossNOTIMPLEMENTED", "Single", (IReadOnlyList<string>)new List<string> { "AyaBoss" }, (EnemyType)3, 1f, true, new Vector2(-4f, 0.5f), "", ""); } } } namespace AyaShameimaru.Cards { public sealed class AyaAnythingisNewsworthyDef : CardTemplate { [EntityLogic(typeof(AyaAnythingisNewsworthyDef))] public sealed class AyaAnythingisNewsworthy : Card { protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) yield return ((Card)this).BuffAction<AyaAnythingisNewsworthySeDef.AyaAnythingisNewsworthySe>(0, 0, 0, 0, 0.2f); } } 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("AyaAnythingisNewsworthy"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)4; List<ManaColor> obj = new List<ManaColor> { (ManaColor)3 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 2; ((ManaGroup)(ref val2)).Black = 1; ManaGroup val3 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 2; ((ManaGroup)(ref val2)).Black = 1; return new CardConfig(num, "", 10, true, array, "Simple1", "Simple1", 0, false, true, false, true, (Rarity)1, (CardType)4, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)1048576, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string> { "AyaNews" }, (IReadOnlyList<string>)new List<string> { "AyaNews" }, "AyaPlayerUnit", "", "", false, "shiromiso", (IReadOnlyList<string>)new List<string>()); } } public sealed class AyaAnythingisNewsworthySeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaAnythingisNewsworthySeDef))] public sealed class AyaAnythingisNewsworthySe : StatusEffect { protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddingToDiscard, (EventSequencedReactor<CardsEventArgs>)OnCardsAddingToDiscard); ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddingToHand, (EventSequencedReactor<CardsEventArgs>)OnCardsAddingToHand); ((StatusEffect)this).ReactOwnerEvent<CardsEventArgs>(((StatusEffect)this).Battle.CardsAddingToExile, (EventSequencedReactor<CardsEventArgs>)OnCardsAddingToExile); ((StatusEffect)this).ReactOwnerEvent<CardsAddingToDrawZoneEventArgs>(((StatusEffect)this).Battle.CardsAddingToDrawZone, (EventSequencedReactor<CardsAddingToDrawZoneEventArgs>)OnCardsAddingToDrawZone); } private IEnumerable<BattleAction> OnCardsAddingToDiscard(CardsEventArgs args) { if (((GameEventArgs)args).ActionSource == this || !args.Cards.Any((Card card) => (int)card.CardType == 7)) { yield break; } ((StatusEffect)this).NotifyActivating(); List<Card> cards = new List<Card>(); Card[] cards2 = args.Cards; foreach (Card card2 in cards2) { if ((int)card2.CardType == 7 && !((GameEntity)card2).DebugName.Contains("News")) { cards.Add((Card)(object)Library.CreateCard<AyaNews>()); } else { cards.Add(card2); } } ((GameEventArgs)args).CancelBy((GameEntity)(object)this); yield return (BattleAction)new AddCardsToDiscardAction((IEnumerable<Card>)cards, (AddCardsType)0); } private IEnumerable<BattleAction> OnCardsAddingToHand(CardsEventArgs args) { if (((GameEventArgs)args).ActionSource == this || !args.Cards.Any((Card card) => (int)card.CardType == 7)) { yield break; } ((StatusEffect)this).NotifyActivating(); List<Card> cards = new List<Card>(); Card[] cards2 = args.Cards; foreach (Card card2 in cards2) { if ((int)card2.CardType == 7 && !((GameEntity)card2).DebugName.Contains("News")) { cards.Add((Card)(object)Library.CreateCard<AyaNews>()); } else { cards.Add(card2); } } ((GameEventArgs)args).CancelBy((GameEntity)(object)this); yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)cards); } private IEnumerable<BattleAction> OnCardsAddingToExile(CardsEventArgs args) { if (((GameEventArgs)args).ActionSource == this || !args.Cards.Any((Card card) => (int)card.CardType == 7)) { yield break; } ((StatusEffect)this).NotifyActivating(); List<Card> cards = new List<Card>(); Card[] cards2 = args.Cards; foreach (Card card2 in cards2) { if ((int)card2.CardType == 7 && !((GameEntity)card2).DebugName.Contains("News")) { cards.Add((Card)(object)Library.CreateCard<AyaNews>()); } else { cards.Add(card2); } } ((GameEventArgs)args).CancelBy((GameEntity)(object)this); yield return (BattleAction)new AddCardsToExileAction((IEnumerable<Card>)cards); } private IEnumerable<BattleAction> OnCardsAddingToDrawZone(CardsAddingToDrawZoneEventArgs args) { if (((GameEventArgs)args).ActionSource == this || !args.Cards.Any((Card card) => (int)card.CardType == 7)) { yield break; } ((StatusEffect)this).NotifyActivating(); List<Card> cards = new List<Card>(); Card[] cards2 = args.Cards; foreach (Card card2 in cards2) { if ((int)card2.CardType == 7 && !((GameEntity)card2).DebugName.Contains("News")) { cards.Add((Card)(object)Library.CreateCard<AyaNews>()); } else { cards.Add(card2); } } ((GameEventArgs)args).CancelBy((GameEntity)(object)this); yield return (BattleAction)new AddCardsToDrawZoneAction((IEnumerable<Card>)cards, args.DrawZoneTarget, (AddCardsType)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("AyaAnythingisNewsworthySe"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaAnythingisNewsworthySe.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 AyaArmoredRavenDef : CardTemplate { 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("AyaArmoredRaven"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)4; List<ManaColor> obj = new List<ManaColor> { (ManaColor)4, (ManaColor)5 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 1; ((ManaGroup)(ref val2)).Red = 2; ((ManaGroup)(ref val2)).Green = 2; ManaGroup val3 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 1; ((ManaGroup)(ref val2)).Red = 2; ((ManaGroup)(ref val2)).Green = 2; return new CardConfig(num, "", 10, true, array, "Simple1", "Simple1", 0, false, true, false, true, (Rarity)2, (CardType)4, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)1, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)524288, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Weak" }, (IReadOnlyList<string>)new List<string> { "Weak" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "AyaPlayerUnit", "", "", false, "vandana", (IReadOnlyList<string>)new List<string>()); } } [EntityLogic(typeof(AyaArmoredRavenDef))] public sealed class AyaArmoredRaven : Card { protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) yield return (BattleAction)(object)PerformAction.Sfx("DroneSummon", 0f); yield return ((Card)this).BuffAction<AyaArmoredRavenSeDef.AyaArmoredRavenSe>(((Card)this).Value1, 0, 0, 0, 0.2f); } } public sealed class AyaArmoredRavenSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaArmoredRavenSeDef))] public sealed class AyaArmoredRavenSe : StatusEffect { private bool attacked; [UsedImplicitly] public float latestDamage; [UsedImplicitly] public int Value => 30; protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<DamageDealingEventArgs>(((StatusEffect)this).Owner.DamageDealing, (GameEventHandler<DamageDealingEventArgs>)OnDamageDealing); ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(((StatusEffect)this).Owner.DamageDealt, (GameEventHandler<DamageEventArgs>)OnDamageDealt); ((StatusEffect)this).HandleOwnerEvent<StatisticalDamageEventArgs>(((StatusEffect)this).Owner.StatisticalTotalDamageDealt, (GameEventHandler<StatisticalDamageEventArgs>)OnStatisticalTotalDamageDealt); ((StatusEffect)this).HandleOwnerEvent<StatusEffectApplyEventArgs>(((StatusEffect)this).Owner.StatusEffectAdding, (GameEventHandler<StatusEffectApplyEventArgs>)OnStatusEffectAdding); } private void OnDamageDealing(DamageDealingEventArgs args) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_003b: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = args.DamageInfo; if ((int)((DamageInfo)(ref damageInfo)).DamageType == 2) { ((DamageInfo)(ref damageInfo)).Damage = ((DamageInfo)(ref damageInfo)).Amount * (1f - (float)Value / 100f); args.DamageInfo = damageInfo; ((GameEventArgs)args).AddModifier((GameEntity)(object)this); } } private void OnDamageDealt(DamageEventArgs args) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) DamageInfo damageInfo = args.DamageInfo; if ((int)((DamageInfo)(ref damageInfo)).DamageType == 2 && args.Target != ((StatusEffect)this).Battle.Player) { attacked = true; damageInfo = args.DamageInfo; latestDamage = Math.Max(((DamageInfo)(ref damageInfo)).Amount, latestDamage); } } private void OnStatisticalTotalDamageDealt(StatisticalDamageEventArgs args) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown if (!attacked) { return; } for (int i = 0; i < ((StatusEffect)this).Level; i++) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new DamageAction(((StatusEffect)this).Owner, args.ArgsTable.Keys.Where((Unit unit) => unit != ((StatusEffect)this).Battle.Player), new DamageInfo(latestDamage, (DamageType)1, false, false, false), "Instant", (GunType)0))); foreach (EnemyUnit item in args.ArgsTable.Keys.Where((Unit enemy) => enemy.HasStatusEffect<Graze>())) { EnemyUnit val = item; ((Unit)val).GetStatusEffect<Graze>().BeenAccurate(); } } attacked = false; latestDamage = 0f; } private void OnStatusEffectAdding(StatusEffectApplyEventArgs args) { if (args.Effect is Weak) { ((GameEventArgs)args).CancelBy((GameEntity)(object)this); ((StatusEffect)this).NotifyActivating(); } } } 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("AyaArmoredRavenSe"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaArmoredRavenSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 9, (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> { "Weak" }, "Default", "Default", "Default"); } } public sealed class AyaArsenalBirdDef : CardTemplate { 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("AyaArsenalBird"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)4; List<ManaColor> obj = new List<ManaColor> { (ManaColor)2, (ManaColor)4 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 3; ((ManaGroup)(ref val2)).Blue = 1; ((ManaGroup)(ref val2)).Red = 1; ManaGroup val3 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 3; ((ManaGroup)(ref val2)).Blue = 1; ((ManaGroup)(ref val2)).Red = 1; ManaGroup? val4 = val2; int? num2 = 18; int? num3 = 24; int? num4 = 0; int? num5 = 1; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 1; ManaGroup? val5 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 1; return new CardConfig(num, "", 10, true, array, "Simple1", "Simple1", 0, false, true, false, true, (Rarity)2, (CardType)4, val, (IReadOnlyList<ManaColor>)obj, false, val3, val4, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, num2, num3, num4, num5, (int?)null, (int?)null, val5, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)1024, (Keyword)1024, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "AyaAccelerationSe" }, (IReadOnlyList<string>)new List<string> { "AyaAccelerationSe" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "AyaPlayerUnit", "", "", false, "igneous25", (IReadOnlyList<string>)new List<string>()); } } [EntityLogic(typeof(AyaArsenalBirdDef))] public sealed class AyaArsenalBird : Card { protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (((Unit)((Card)this).Battle.Player).HasStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe))) { yield return (BattleAction)new RemoveStatusEffectAction(((Unit)((Card)this).Battle.Player).GetStatusEffect(typeof(AyaAccelerationSeDef.AyaAccelerationSe)), false, 0.1f); } yield return (BattleAction)(object)PerformAction.Sfx("DroneSummon", 0f); yield return ((Card)this).DefenseAction(true); yield return ((Card)this).BuffAction<AyaArsenalBirdSeDef.AyaArsenalBirdSe>(0, 0, ((Card)this).IsUpgraded ? 1 : 0, 0, 0.2f); } } public sealed class AyaArsenalBirdSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaArsenalBirdSeDef))] public sealed class AyaArsenalBirdSe : StatusEffect { [UsedImplicitly] public ManaGroup Mana => ManaGroup.Anys(1); protected override void OnAdded(Unit unit) { ((StatusEffect)this).ReactOwnerEvent<UnitEventArgs>(((StatusEffect)this).Owner.TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnOwnerTurnStarted); } private IEnumerable<BattleAction> OnOwnerTurnStarted(UnitEventArgs args) { if (((StatusEffect)this).Battle.BattleShouldEnd) { yield break; } ((StatusEffect)this).NotifyActivating(); List<Card> list = new List<Card>(); if (((StatusEffect)this).Battle.HandZone.Where((Card card) => (int)card.CardType == 1).Count() < ((StatusEffect)this).Battle.HandZone.Where((Card card) => (int)card.CardType == 2).Count()) { Card[] defense = ((StatusEffect)this).Battle.RollCards(new CardWeightTable((((StatusEffect)this).Limit == 0) ? RarityWeightTable.OnlyCommon : RarityWeightTable.OnlyUncommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 1)); list.AddRange(defense); } else { Card[] attack = ((StatusEffect)this).Battle.RollCards(new CardWeightTable((((StatusEffect)this).Limit == 0) ? RarityWeightTable.OnlyCommon : RarityWeightTable.OnlyUncommon, OwnerWeightTable.Valid, CardTypeWeightTable.CanBeLoot), 1, (Predicate<CardConfig>)((CardConfig config) => (int)config.Type == 2)); list.AddRange(attack); } foreach (Card card2 in list) { card2.SetTurnCost(Mana); card2.IsExile = true; card2.IsEthereal = true; } BattleController battle = ((StatusEffect)this).Battle; battle.MaxHand += 1; yield return (BattleAction)new AddCardsToHandAction((IEnumerable<Card>)list); BattleController battle2 = ((StatusEffect)this).Battle; battle2.MaxHand -= 1; } } 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("AyaArsenalBirdSe"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaArsenalBirdSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 11, (StatusEffectType)0, false, true, (int?)null, false, (StackType?)(StackType)0, false, (StackType?)(StackType)0, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)1, true, (Keyword)1099512283136L, (IReadOnlyList<string>)new List<string>(), "Default", "Default", "Default"); } } public sealed class AyaAttackGDef : CardTemplate { 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("AyaAttackG"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)1; List<ManaColor> obj = new List<ManaColor> { (ManaColor)5 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 1; ((ManaGroup)(ref val2)).Green = 1; ManaGroup val3 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 2; return new CardConfig(num, "", 10, true, array, "飞刀弹射", "飞刀弹射B", 0, false, false, false, true, (Rarity)0, (CardType)1, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)10, (int?)14, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)2, (Keyword)2, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "AyaPlayerUnit", "", "", false, "", (IReadOnlyList<string>)new List<string> { "My_Computer" }); } } [EntityLogic(typeof(AyaAttackGDef))] public sealed class AyaAttackG : Card { } public sealed class AyaAttackRDef : CardTemplate { 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("AyaAttackR"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)1; List<ManaColor> obj = new List<ManaColor> { (ManaColor)4 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 1; ((ManaGroup)(ref val2)).Red = 1; ManaGroup val3 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 2; return new CardConfig(num, "", 10, true, array, "飞刀弹射", "飞刀弹射B", 0, false, false, false, true, (Rarity)0, (CardType)1, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)10, (int?)14, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)2, (Keyword)2, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "AyaPlayerUnit", "", "", false, "", (IReadOnlyList<string>)new List<string> { "My_Computer" }); } } [EntityLogic(typeof(AyaAttackRDef))] public sealed class AyaAttackR : Card { } internal class AyaBirdsEyeViewDef { } public sealed class AyaBlackmailDef : CardTemplate { 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("AyaBlackmail"); } public override CardImages LoadCardImages() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown CardImages val = new CardImages(BepinexPlugin.embeddedSource); val.AutoLoad((CardTemplate)(object)this, ".png", "Resources.", false); return val; } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override CardConfig MakeConfig() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown int num = BepinexPlugin.sequenceTable.Next(typeof(CardConfig)); string[][] array = new string[0][]; TargetType? val = (TargetType)4; List<ManaColor> obj = new List<ManaColor> { (ManaColor)4, (ManaColor)5 }; ManaGroup val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Red = 1; ((ManaGroup)(ref val2)).Green = 1; ManaGroup val3 = val2; val2 = default(ManaGroup); ((ManaGroup)(ref val2)).Any = 1; return new CardConfig(num, "", 10, true, array, "Simple1", "Simple1", 0, false, true, false, true, (Rarity)1, (CardType)4, val, (IReadOnlyList<ManaColor>)obj, false, val3, (ManaGroup?)val2, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)10, (int?)null, (int?)1, (int?)null, (ManaGroup?)null, (ManaGroup?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (int?)null, (Keyword)0, (Keyword)0, false, (Keyword)0, (Keyword)0, (IReadOnlyList<string>)new List<string> { "AyaWalletSe", "FirepowerNegative" }, (IReadOnlyList<string>)new List<string> { "AyaWalletSe", "FirepowerNegative" }, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>(), "AyaPlayerUnit", "", "", false, "red13", (IReadOnlyList<string>)new List<string>()); } } [EntityLogic(typeof(AyaBlackmailDef))] public sealed class AyaBlackmail : Card { protected override IEnumerable<BattleAction> Actions(UnitSelector selector, ManaGroup consumingMana, Interaction precondition) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) yield return ((Card)this).BuffAction<AyaBlackmailSeDef.AyaBlackmailSe>(((Card)this).Value2, 0, 0, ((Card)this).Value1, 0.2f); } } public sealed class AyaBlackmailSeDef : StatusEffectTemplate { [EntityLogic(typeof(AyaBlackmailSeDef))] public sealed class AyaBlackmailSe : StatusEffect { private Unit target; private bool Commented; [UsedImplicitly] public string Blackmail1 => LocalizationExtensions.LocalizeFormat("Blackmail1", new object[1] { target.GetName() }); [UsedImplicitly] public string Blackmail2 => ((GameEntity)this).LocalizeProperty("Blackmail2", true, true); [UsedImplicitly] public string Blackmail3 => ((GameEntity)this).LocalizeProperty("Blackmail3", true, true); [UsedImplicitly] public string Blackmail4 => ((GameEntity)this).LocalizeProperty("Blackmail4", true, true); [UsedImplicitly] public string BlackmailMegumu1 => ((GameEntity)this).LocalizeProperty("BlackmailMegumu1", true, true); [UsedImplicitly] public string BlackmailMegumu2 => ((GameEntity)this).LocalizeProperty("BlackmailMegumu2", true, true); protected override void OnAdded(Unit unit) { ((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(((StatusEffect)this).Owner.DamageReceived, (GameEventHandler<DamageEventArgs>)OnDamageReceived); } private void OnDamageReceived(DamageEventArgs args) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Invalid comparison between Unknown and I4 //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Expected O, but got Unknown //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Expected O, but got Unknown //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Expected O, but got Unknown if (args.Source == ((StatusEffect)this).Owner || !args.Source.IsAlive) { return; } DamageInfo damageInfo = args.DamageInfo; if ((int)((DamageInfo)(ref damageInfo)).DamageType != 2 || !(((DamageInfo)(ref damageInfo)).Amount < 1f)) { return; } ((StatusEffect)this).NotifyActivating(); if (((GameEntity)((StatusEffect)this).Battle.Player).Id == "AyaPlayerUnit" && !Commented) { target = args.Source; switch (Random.Range(0, 4)) { case 0: ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)PerformAction.Chat(((StatusEffect)this).Owner, Blackmail1, 3f, 0f, 0f, true))); break; case 1: ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)PerformAction.Chat(((StatusEffect)this).Owner, Blackmail1, 3f, 0f, 0f, true))); break; case 2: ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)PerformAction.Chat(((StatusEffect)this).Owner, Blackmail1, 3f, 0f, 0f, true))); break; case 3: ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)PerformAction.Chat(((StatusEffect)this).Owner, Blackmail1, 3f, 0f, 0f, true))); break; } if (args.Source is Long) { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)PerformAction.Chat(args.Source, BlackmailMegumu1, 3f, 0f, 3f, true))); ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)(object)PerformAction.Chat(args.Source, BlackmailMegumu2, 3f, 0f, 3f, true))); ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new ApplyStatusEffectAction(typeof(ExtraTurn), args.Source, (int?)9, (int?)null, (int?)null, (int?)null, 0f, true))); } Commented = true; } AyaWalletSeDef.AyaWalletSe ayaWalletSe = default(AyaWalletSeDef.AyaWalletSe); if (args.Source.TryGetStatusEffect<AyaWalletSeDef.AyaWalletSe>(ref ayaWalletSe) && ((StatusEffect)ayaWalletSe).Level > 0) { int num = Math.Min(((StatusEffect)this).Count, ((StatusEffect)ayaWalletSe).Level); AyaWalletSeDef.AyaWalletSe ayaWalletSe2 = ayaWalletSe; ((StatusEffect)ayaWalletSe2).Level = ((StatusEffect)ayaWalletSe2).Level - num; ((StatusEffect)this).Battle.GameRun.GainMoney(num, true, new VisualSourceData { SourceType = (VisualSourceType)7, Source = (GameEntity)(object)args.Source }); } else { ((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new ApplyStatusEffectAction(typeof(FirepowerNegative), args.Source, (int?)((StatusEffect)this).Level, (int?)null, (int?)null, (int?)null, 0f, true))); } } protected override void OnRemoved(Unit unit) { Commented = false; target = null; } } 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("AyaBlackmailSe"); } public override LocalizationOption LoadLocalization() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GlobalLocalization val = new GlobalLocalization((IResourceSource)(object)BepinexPlugin.directorySource); val.DiscoverAndLoadLocFiles((EntityDefinition)(object)this); return (LocalizationOption)(object)val; } public override Sprite LoadSprite() { return ResourceLoader.LoadSprite("Resources.AyaBlackmailSe.png", BepinexPlugin.embeddedSource, (Rect?)null, 1, (Vector2?)null); } public override StatusEffectConfig MakeConfig() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown return new StatusEffectConfig(BepinexPlugin.sequenceTable.Next(typeof(StatusEffectConfig)), "", 10, (StatusEff