using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using AddWatermark;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using HarmonyLib;
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.Battle.Interactions;
using LBoL.Core.Cards;
using LBoL.Core.StatusEffects;
using LBoL.Core.Units;
using LBoL.EntityLib.Exhibits;
using LBoL.Presentation.UI.Widgets;
using LBoL.Presentation.Units;
using LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.BattleModifiers.Actions;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using ShiningExhibitsPlus.StatusEffects;
using UnityEngine;
[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("ShiningExhibitsPlus")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ShiningExhibitsPlus")]
[assembly: AssemblyTitle("ShiningExhibitsPlus")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace ShiningExhibitsPlus
{
[BepInPlugin("cyaneko.lbol.mods.shiningexhibitsplus", "ShiningExhibitsPlus", "0.2.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInProcess("LBoL.exe")]
public class BepinexPlugin : BaseUnityPlugin
{
private static readonly Harmony harmony = PInfo.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("cyaneko.lbol.mods.shiningexhibitsplus", "");
internal static BatchLocalization exhibitLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(ExhibitTemplate), "Exhibits_", (Locale)0, false);
internal static BatchLocalization statusLoc = new BatchLocalization((IResourceSource)(object)directorySource, typeof(StatusEffectTemplate), "StatusEffects_", (Locale)0, false);
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 PInfo
{
public const string GUID = "cyaneko.lbol.mods.shiningexhibitsplus";
public const string Name = "ShiningExhibitsPlus";
public const string version = "0.2.0";
public static readonly Harmony harmony = new Harmony("cyaneko.lbol.mods.shiningexhibitsplus");
}
internal class WatermarkWrapper
{
[MethodImpl(MethodImplOptions.NoInlining)]
internal static void ActivateWatermark()
{
API.ActivateWatermark();
}
}
}
namespace ShiningExhibitsPlus.StatusEffects
{
public sealed class AliceShieldProtectionDef : StatusEffectTemplate
{
public override IdContainer GetId()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return IdContainer.op_Implicit("AliceShieldProtection");
}
public override StatusEffectConfig MakeConfig()
{
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
return new StatusEffectConfig(0, "", 7, (StatusEffectType)0, false, true, (int?)null, true, (StackType?)(StackType)1, false, (StackType?)(StackType)1, (DurationDecreaseTiming)0, false, (StackType?)(StackType)3, (StackType?)(StackType)3, false, (Keyword)0, (IReadOnlyList<string>)new List<string>(), "BuffWhite", "DroneBlockLoop", "Buff");
}
public override Sprite LoadSprite()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null);
}
public override LocalizationOption LoadLocalization()
{
return (LocalizationOption)(object)BepinexPlugin.statusLoc.AddEntity((EntityDefinition)(object)this);
}
}
[EntityLogic(typeof(AliceShieldProtectionDef))]
public sealed class AliceShieldProtection : StatusEffect
{
protected override void OnAdded(Unit unit)
{
((StatusEffect)this).HandleOwnerEvent<UnitEventArgs>(unit.TurnStarting, (GameEventHandler<UnitEventArgs>)OnTurnStarting);
((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)OnDamageReceiving);
}
private void OnTurnStarting(UnitEventArgs args)
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected O, but got Unknown
((GameEntity)this).React(Reactor.op_Implicit((BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)this, true, 0.1f)));
}
private void OnDamageReceiving(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_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Invalid comparison between I4 and Unknown
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
DamageInfo damageInfo = args.DamageInfo;
if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
{
args.DamageInfo = ((DamageInfo)(ref damageInfo)).ReduceBy(((StatusEffect)this).Level);
((GameEventArgs)args).AddModifier((GameEntity)(object)this);
}
}
}
public sealed class MomijiSwordFocusDef : StatusEffectTemplate
{
public override IdContainer GetId()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return IdContainer.op_Implicit("MomijiSwordFocus");
}
public override StatusEffectConfig MakeConfig()
{
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Expected O, but got Unknown
return new StatusEffectConfig(0, "", 7, (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>(), "Lockon", "Default", "Debuff");
}
public override Sprite LoadSprite()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
return ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null);
}
public override LocalizationOption LoadLocalization()
{
return (LocalizationOption)(object)BepinexPlugin.statusLoc.AddEntity((EntityDefinition)(object)this);
}
}
[EntityLogic(typeof(MomijiSwordFocusDef))]
public sealed class MomijiSwordFocus : StatusEffect
{
protected override void OnAdded(Unit unit)
{
((StatusEffect)this).HandleOwnerEvent<DamageEventArgs>(unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)OnDamageReceiving);
}
private void OnDamageReceiving(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_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Invalid comparison between I4 and Unknown
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
DamageInfo damageInfo = args.DamageInfo;
if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
{
args.DamageInfo = ((DamageInfo)(ref damageInfo)).IncreaseBy(((StatusEffect)this).Level);
((GameEventArgs)args).AddModifier((GameEntity)(object)this);
}
}
}
}
namespace ShiningExhibitsPlus.Exhibits
{
public sealed class AliceShieldDef : ExhibitTemplate
{
public override IdContainer GetId()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return IdContainer.op_Implicit("AliceShield");
}
public override ExhibitConfig MakeConfig()
{
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Expected O, but got Unknown
return new ExhibitConfig(0, "", 10, false, false, false, true, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)2, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)1, 1, false, (int?)null, (Keyword)1536, (IReadOnlyList<string>)new List<string> { "AliceShieldProtection" }, (IReadOnlyList<string>)new List<string>());
}
public override ExhibitSprites LoadSprite()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: 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_003e: Expected O, but got Unknown
return new ExhibitSprites
{
main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null)
};
}
public override LocalizationOption LoadLocalization()
{
return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this);
}
}
[EntityLogic(typeof(AliceShieldDef))]
public sealed class AliceShield : ShiningExhibit
{
[CompilerGenerated]
private sealed class <OnBlockShieldGained>d__8 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private BlockShieldEventArgs args;
public BlockShieldEventArgs <>3__args;
public AliceShield <>4__this;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnBlockShieldGained>d__8(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (!((Exhibit)<>4__this).Active || !<>4__this.MyTurn)
{
return false;
}
if (!<>4__this.GainedBlock && 0f < args.Block)
{
<>4__this.GainedBlock = true;
}
if (!<>4__this.GainedShield && 0f < args.Shield)
{
<>4__this.GainedShield = true;
}
if (<>4__this.GainedBlock && <>4__this.GainedShield)
{
((Exhibit)<>4__this).NotifyActivating();
((Exhibit)<>4__this).Active = false;
<>2__current = (BattleAction)(object)new ApplyStatusEffectAction<AliceShieldProtection>((Unit)(object)((Exhibit)<>4__this).Owner, (int?)((Exhibit)<>4__this).Value1, (int?)null, (int?)null, (int?)null, 0.1f, true);
<>1__state = 1;
return true;
}
break;
case 1:
<>1__state = -1;
break;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnBlockShieldGained>d__8 <OnBlockShieldGained>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnBlockShieldGained>d__ = this;
}
else
{
<OnBlockShieldGained>d__ = new <OnBlockShieldGained>d__8(0)
{
<>4__this = <>4__this
};
}
<OnBlockShieldGained>d__.args = <>3__args;
return <OnBlockShieldGained>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
private bool GainedBlock = false;
private bool GainedShield = false;
private bool MyTurn = false;
protected override string GetBaseDescription()
{
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append(((Exhibit)this).GetBaseDescription());
if (GainedBlock || GainedShield)
{
stringBuilder.AppendLine();
if (GainedBlock)
{
stringBuilder.Append(((GameEntity)this).LocalizeProperty("GainedBlock", true, true));
}
if (GainedShield)
{
stringBuilder.Append(((GameEntity)this).LocalizeProperty("GainedShield", true, true));
}
}
return stringBuilder.ToString();
}
protected override void OnEnterBattle()
{
((Exhibit)this).HandleBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarting, (GameEventHandler<UnitEventArgs>)OnTurnStarting);
((Exhibit)this).HandleBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnEnded, (GameEventHandler<UnitEventArgs>)OnTurnEnded);
((Exhibit)this).ReactBattleEvent<BlockShieldEventArgs>(((Unit)((Exhibit)this).Owner).BlockShieldGained, (EventSequencedReactor<BlockShieldEventArgs>)OnBlockShieldGained);
}
protected override void OnLeaveBattle()
{
GainedBlock = false;
GainedShield = false;
((Exhibit)this).Active = false;
}
private void OnTurnStarting(UnitEventArgs args)
{
GainedBlock = false;
GainedShield = false;
((Exhibit)this).Active = true;
MyTurn = true;
}
private void OnTurnEnded(UnitEventArgs args)
{
MyTurn = false;
}
[IteratorStateMachine(typeof(<OnBlockShieldGained>d__8))]
private IEnumerable<BattleAction> OnBlockShieldGained(BlockShieldEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnBlockShieldGained>d__8(-2)
{
<>4__this = this,
<>3__args = args
};
}
}
public sealed class BrickManualDef : ExhibitTemplate
{
public override IdContainer GetId()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return IdContainer.op_Implicit("BrickManual");
}
public override ExhibitConfig MakeConfig()
{
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Expected O, but got Unknown
return new ExhibitConfig(0, "", 12, false, false, false, true, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)2, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
}
public override ExhibitSprites LoadSprite()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: 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_003e: Expected O, but got Unknown
return new ExhibitSprites
{
main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null)
};
}
public override LocalizationOption LoadLocalization()
{
return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this);
}
}
[EntityLogic(typeof(BrickManualDef))]
public sealed class BrickManual : ShiningExhibit
{
[CompilerGenerated]
private sealed class <OnTurnStarted>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private UnitEventArgs args;
public UnitEventArgs <>3__args;
public BrickManual <>4__this;
private List<Card> <hand>5__1;
private List<Card>.Enumerator <>s__2;
private Card <c>5__3;
private SelectHandInteraction <int>5__4;
private IEnumerator<Card> <>s__5;
private Card <c>5__6;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnTurnStarted>d__3(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
switch (<>1__state)
{
case -3:
case 1:
try
{
}
finally
{
<>m__Finally1();
}
break;
case -4:
case 3:
try
{
}
finally
{
<>m__Finally2();
}
break;
}
<hand>5__1 = null;
<>s__2 = default(List<Card>.Enumerator);
<c>5__3 = null;
<int>5__4 = null;
<>s__5 = null;
<c>5__6 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_0179: Expected O, but got Unknown
//IL_0181: Unknown result type (might be due to invalid IL or missing references)
//IL_018b: Expected O, but got Unknown
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Expected O, but got Unknown
//IL_01db: Unknown result type (might be due to invalid IL or missing references)
//IL_01e5: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (((Exhibit)<>4__this).Battle.BattleShouldEnd)
{
return false;
}
((Exhibit)<>4__this).NotifyActivating();
if (((Exhibit)<>4__this).Value1 >= ((Exhibit)<>4__this).Battle.HandZone.Count)
{
<hand>5__1 = ((Exhibit)<>4__this).Battle.HandZone.ToList();
<>s__2 = <hand>5__1.GetEnumerator();
<>1__state = -3;
goto IL_010d;
}
<int>5__4 = new SelectHandInteraction(((Exhibit)<>4__this).Value1, ((Exhibit)<>4__this).Value1, (IEnumerable<Card>)((Exhibit)<>4__this).Battle.HandZone)
{
Source = (GameEntity)(object)<>4__this
};
<>2__current = (BattleAction)new InteractionAction((Interaction)(object)<int>5__4, false);
<>1__state = 2;
return true;
case 1:
<>1__state = -3;
<c>5__3 = null;
goto IL_010d;
case 2:
<>1__state = -1;
<>s__5 = <int>5__4.SelectedCards.GetEnumerator();
<>1__state = -4;
goto IL_0200;
case 3:
{
<>1__state = -4;
<c>5__6 = null;
goto IL_0200;
}
IL_0200:
if (<>s__5.MoveNext())
{
<c>5__6 = <>s__5.Current;
<>2__current = (BattleAction)new MoveCardToDrawZoneAction(<c>5__6, (DrawZoneTarget)2);
<>1__state = 3;
return true;
}
<>m__Finally2();
<>s__5 = null;
<int>5__4 = null;
break;
IL_010d:
if (<>s__2.MoveNext())
{
<c>5__3 = <>s__2.Current;
<>2__current = (BattleAction)new MoveCardToDrawZoneAction(<c>5__3, (DrawZoneTarget)2);
<>1__state = 1;
return true;
}
<>m__Finally1();
<>s__2 = default(List<Card>.Enumerator);
<hand>5__1 = null;
break;
}
return false;
}
catch
{
//try-fault
((IDisposable)this).Dispose();
throw;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
((IDisposable)<>s__2).Dispose();
}
private void <>m__Finally2()
{
<>1__state = -1;
if (<>s__5 != null)
{
<>s__5.Dispose();
}
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnTurnStarted>d__3 <OnTurnStarted>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnTurnStarted>d__ = this;
}
else
{
<OnTurnStarted>d__ = new <OnTurnStarted>d__3(0)
{
<>4__this = <>4__this
};
}
<OnTurnStarted>d__.args = <>3__args;
return <OnTurnStarted>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
protected override void OnEnterBattle()
{
((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
}
protected override void OnAdded(PlayerUnit player)
{
GameRunController gameRun = ((GameEntity)this).GameRun;
gameRun.DrawCardCount += ((Exhibit)this).Value1;
if (((Exhibit)this).Battle != null)
{
BattleController battle = ((Exhibit)this).Battle;
battle.DrawCardCount += ((Exhibit)this).Value1;
}
}
protected override void OnRemoved(PlayerUnit player)
{
GameRunController gameRun = ((GameEntity)this).GameRun;
gameRun.DrawCardCount -= ((Exhibit)this).Value1;
if (((Exhibit)this).Battle != null)
{
BattleController battle = ((Exhibit)this).Battle;
battle.DrawCardCount -= ((Exhibit)this).Value1;
}
}
[IteratorStateMachine(typeof(<OnTurnStarted>d__3))]
private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnTurnStarted>d__3(-2)
{
<>4__this = this,
<>3__args = args
};
}
}
public sealed class KanakoOnbashiraDef : ExhibitTemplate
{
public override IdContainer GetId()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return IdContainer.op_Implicit("KanakoOnbashira");
}
public override ExhibitConfig MakeConfig()
{
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Expected O, but got Unknown
return new ExhibitConfig(0, "", 10, false, false, false, true, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)2, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)5, 1, false, (int?)null, (Keyword)4, (IReadOnlyList<string>)new List<string> { "Firepower", "Spirit" }, (IReadOnlyList<string>)new List<string>());
}
public override ExhibitSprites LoadSprite()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: 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_003e: Expected O, but got Unknown
return new ExhibitSprites
{
main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null)
};
}
public override LocalizationOption LoadLocalization()
{
return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this);
}
}
[EntityLogic(typeof(KanakoOnbashiraDef))]
public sealed class KanakoOnbashira : ShiningExhibit
{
[CompilerGenerated]
private sealed class <OnCardUsed>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private CardUsingEventArgs args;
public CardUsingEventArgs <>3__args;
public KanakoOnbashira <>4__this;
private int <philoMult>5__1;
private List<StatusEffect> <debuffs>5__2;
private List<StatusEffect>.Enumerator <>s__3;
private StatusEffect <debuff>5__4;
private List<Card> <badCards>5__5;
private Card[] <picked>5__6;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnCardUsed>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
int num = <>1__state;
if (num == -3 || num == 4)
{
try
{
}
finally
{
<>m__Finally1();
}
}
<debuffs>5__2 = null;
<>s__3 = default(List<StatusEffect>.Enumerator);
<debuff>5__4 = null;
<badCards>5__5 = null;
<picked>5__6 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Invalid comparison between I4 and Unknown
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Unknown result type (might be due to invalid IL or missing references)
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_016d: Unknown result type (might be due to invalid IL or missing references)
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
//IL_0348: Unknown result type (might be due to invalid IL or missing references)
//IL_034d: Unknown result type (might be due to invalid IL or missing references)
//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Expected O, but got Unknown
//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
//IL_0278: Unknown result type (might be due to invalid IL or missing references)
//IL_0282: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
//IL_0484: Unknown result type (might be due to invalid IL or missing references)
//IL_048e: Expected O, but got Unknown
//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_010e: Expected O, but got Unknown
try
{
ManaGroup consumingMana;
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (4 != (int)args.Card.CardType)
{
break;
}
consumingMana = args.ConsumingMana;
if (2 > ((ManaGroup)(ref consumingMana)).ColorCount)
{
break;
}
consumingMana = args.ConsumingMana;
<philoMult>5__1 = ((!((ManaGroup)(ref consumingMana)).HasColor((ManaColor)7)) ? 1 : 2);
((Exhibit)<>4__this).NotifyActivating();
consumingMana = args.ConsumingMana;
if (((ManaGroup)(ref consumingMana)).HasColor((ManaColor)1))
{
<>2__current = (BattleAction)new CastBlockShieldAction((Unit)(object)((Exhibit)<>4__this).Owner, new ShieldInfo(5 * <philoMult>5__1, (BlockShieldType)2), true);
<>1__state = 1;
return true;
}
goto IL_0124;
case 1:
<>1__state = -1;
goto IL_0124;
case 2:
<>1__state = -1;
goto IL_0167;
case 3:
<>1__state = -1;
<>s__3 = <debuffs>5__2.GetEnumerator();
<>1__state = -3;
goto IL_02a0;
case 4:
<>1__state = -3;
<debuff>5__4 = null;
goto IL_02a0;
case 5:
<>1__state = -1;
goto IL_0342;
case 6:
<>1__state = -1;
goto IL_03b9;
case 7:
{
<>1__state = -1;
<picked>5__6 = null;
goto IL_04a8;
}
IL_02a0:
if (<>s__3.MoveNext())
{
<debuff>5__4 = <>s__3.Current;
<>2__current = (BattleAction)new RemoveStatusEffectAction(<debuff>5__4, true, 0.1f);
<>1__state = 4;
return true;
}
<>m__Finally1();
<>s__3 = default(List<StatusEffect>.Enumerator);
goto IL_02c1;
IL_0124:
consumingMana = args.ConsumingMana;
if (((ManaGroup)(ref consumingMana)).HasColor((ManaColor)2))
{
<>2__current = (BattleAction)new DrawManyCardAction(<philoMult>5__1);
<>1__state = 2;
return true;
}
goto IL_0167;
IL_02c9:
consumingMana = args.ConsumingMana;
if (((ManaGroup)(ref consumingMana)).HasColor((ManaColor)4))
{
<>2__current = (BattleAction)(object)new ApplyStatusEffectAction<TempFirepower>((Unit)(object)((Exhibit)<>4__this).Owner, (int?)(3 * <philoMult>5__1), (int?)null, (int?)null, (int?)null, 0f, true);
<>1__state = 5;
return true;
}
goto IL_0342;
IL_0167:
consumingMana = args.ConsumingMana;
if (((ManaGroup)(ref consumingMana)).HasColor((ManaColor)3))
{
<debuffs>5__2 = CollectionsExtensions.SampleManyOrAll<StatusEffect>(((Unit)((Exhibit)<>4__this).Owner).StatusEffects.Where((StatusEffect se) => (int)se.Type == 1), <philoMult>5__1, ((GameEntity)<>4__this).GameRun.BattleRng).ToList();
if (<debuffs>5__2.Count > 0)
{
<>2__current = (BattleAction)(object)PerformAction.Effect((Unit)(object)((Exhibit)<>4__this).Owner, "JingHua", 0f, "JingHua", 0f, (EffectBehavior)0, 0f);
<>1__state = 3;
return true;
}
goto IL_02c1;
}
goto IL_02c9;
IL_0342:
consumingMana = args.ConsumingMana;
if (((ManaGroup)(ref consumingMana)).HasColor((ManaColor)5))
{
<>2__current = (BattleAction)(object)new ApplyStatusEffectAction<Graze>((Unit)(object)((Exhibit)<>4__this).Owner, (int?)<philoMult>5__1, (int?)null, (int?)null, (int?)null, 0f, true);
<>1__state = 6;
return true;
}
goto IL_03b9;
IL_03b9:
consumingMana = args.ConsumingMana;
if (!((ManaGroup)(ref consumingMana)).HasColor((ManaColor)6))
{
break;
}
<badCards>5__5 = (from c in ((Exhibit)<>4__this).Battle.HandZone.Concat(((Exhibit)<>4__this).Battle.DrawZone).Concat(((Exhibit)<>4__this).Battle.DiscardZone)
where (int)c.CardType == 7 || (int)c.CardType == 8
select c).ToList();
if (<badCards>5__5.Count > 0)
{
<picked>5__6 = CollectionsExtensions.SampleManyOrAll<Card>((IEnumerable<Card>)<badCards>5__5, <philoMult>5__1, ((GameEntity)<>4__this).GameRun.BattleRng);
<>2__current = (BattleAction)new ExileManyCardAction((IEnumerable<Card>)<picked>5__6);
<>1__state = 7;
return true;
}
goto IL_04a8;
IL_04a8:
<badCards>5__5 = null;
break;
IL_02c1:
<debuffs>5__2 = null;
goto IL_02c9;
}
return false;
}
catch
{
//try-fault
((IDisposable)this).Dispose();
throw;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
((IDisposable)<>s__3).Dispose();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnCardUsed>d__1 <OnCardUsed>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnCardUsed>d__ = this;
}
else
{
<OnCardUsed>d__ = new <OnCardUsed>d__1(0)
{
<>4__this = <>4__this
};
}
<OnCardUsed>d__.args = <>3__args;
return <OnCardUsed>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
protected override void OnEnterBattle()
{
((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
}
[IteratorStateMachine(typeof(<OnCardUsed>d__1))]
private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnCardUsed>d__1(-2)
{
<>4__this = this,
<>3__args = args
};
}
}
public sealed class KeikiToolsDef : ExhibitTemplate
{
public override IdContainer GetId()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return IdContainer.op_Implicit("KeikiTools");
}
public override ExhibitConfig MakeConfig()
{
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Expected O, but got Unknown
return new ExhibitConfig(0, "", 10, false, false, false, true, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)1, (int?)null, (int?)null, (ManaGroup?)ManaGroup.Single((ManaColor)7), (ManaColor?)null, (ManaColor?)(ManaColor)7, 1, false, (int?)null, (Keyword)2048, (IReadOnlyList<string>)new List<string>(), (IReadOnlyList<string>)new List<string>());
}
public override ExhibitSprites LoadSprite()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: 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_003e: Expected O, but got Unknown
return new ExhibitSprites
{
main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null)
};
}
public override LocalizationOption LoadLocalization()
{
return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this);
}
}
[EntityLogic(typeof(KeikiToolsDef))]
public sealed class KeikiTools : ShiningExhibit
{
[CompilerGenerated]
private sealed class <OnTurnStarted>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private UnitEventArgs args;
public UnitEventArgs <>3__args;
public KeikiTools <>4__this;
private ManaGroup <conv>5__1;
private ManaGroup <currentMana>5__2;
private int <m>5__3;
private ManaColor <maxColor>5__4;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnTurnStarted>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_017a: Unknown result type (might be due to invalid IL or missing references)
//IL_018a: Unknown result type (might be due to invalid IL or missing references)
//IL_0190: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Expected O, but got Unknown
//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)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Unknown result type (might be due to invalid IL or missing references)
//IL_0136: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<conv>5__1 = ManaGroup.Empty;
<currentMana>5__2 = ((Exhibit)<>4__this).Battle.BattleMana;
<m>5__3 = 0;
while (<m>5__3 < ((Exhibit)<>4__this).Value1)
{
<maxColor>5__4 = ((ManaGroup)(ref <currentMana>5__2)).MaxTrivialColor;
if (((ManaGroup)(ref <currentMana>5__2))[<maxColor>5__4] <= ((ManaGroup)(ref <currentMana>5__2))[(ManaColor)6])
{
<maxColor>5__4 = (ManaColor)6;
}
if (0 >= ((ManaGroup)(ref <currentMana>5__2))[<maxColor>5__4])
{
break;
}
ref ManaGroup reference = ref <conv>5__1;
ManaColor val = <maxColor>5__4;
((ManaGroup)(ref reference))[val] = ((ManaGroup)(ref reference))[val] + 1;
reference = ref <currentMana>5__2;
val = <maxColor>5__4;
((ManaGroup)(ref reference))[val] = ((ManaGroup)(ref reference))[val] - 1;
int num = <m>5__3 + 1;
<m>5__3 = num;
}
if (<conv>5__1 != ManaGroup.Empty)
{
((Exhibit)<>4__this).NotifyActivating();
<>2__current = (BattleAction)(object)PerformAction.Sfx("FairySupport", 0f);
<>1__state = 1;
return true;
}
break;
case 1:
<>1__state = -1;
<>2__current = (BattleAction)new ConvertManaAction(<conv>5__1, ManaGroup.Philosophies(((ManaGroup)(ref <conv>5__1)).Amount), true);
<>1__state = 2;
return true;
case 2:
<>1__state = -1;
break;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnTurnStarted>d__1 <OnTurnStarted>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnTurnStarted>d__ = this;
}
else
{
<OnTurnStarted>d__ = new <OnTurnStarted>d__1(0)
{
<>4__this = <>4__this
};
}
<OnTurnStarted>d__.args = <>3__args;
return <OnTurnStarted>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
protected override void OnEnterBattle()
{
((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
}
[IteratorStateMachine(typeof(<OnTurnStarted>d__1))]
private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnTurnStarted>d__1(-2)
{
<>4__this = this,
<>3__args = args
};
}
}
public sealed class MomijiSwordDef : ExhibitTemplate
{
public override IdContainer GetId()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return IdContainer.op_Implicit("MomijiSword");
}
public override ExhibitConfig MakeConfig()
{
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Expected O, but got Unknown
return new ExhibitConfig(0, "", 69, false, false, false, true, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)4, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string> { "MomijiSwordFocus" }, (IReadOnlyList<string>)new List<string>());
}
public override ExhibitSprites LoadSprite()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: 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_003e: Expected O, but got Unknown
return new ExhibitSprites
{
main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null)
};
}
public override LocalizationOption LoadLocalization()
{
return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this);
}
}
[EntityLogic(typeof(MomijiSwordDef))]
public sealed class MomijiSword : ShiningExhibit
{
[CompilerGenerated]
private sealed class <>c__DisplayClass3_0
{
public Unit target;
internal bool <OnStatisticalDamageDealt>b__0(EnemyUnit tgt)
{
return tgt != target;
}
}
[CompilerGenerated]
private sealed class <CleanseSE>d__1 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private IEnumerable<EnemyUnit> enemies;
public IEnumerable<EnemyUnit> <>3__enemies;
public MomijiSword <>4__this;
private IEnumerator<EnemyUnit> <>s__1;
private EnemyUnit <e>5__2;
private MomijiSwordFocus <focus>5__3;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <CleanseSE>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
int num = <>1__state;
if (num == -3 || num == 1)
{
try
{
}
finally
{
<>m__Finally1();
}
}
<>s__1 = null;
<e>5__2 = null;
<focus>5__3 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Expected O, but got Unknown
try
{
int num = <>1__state;
if (num != 0)
{
if (num != 1)
{
return false;
}
<>1__state = -3;
goto IL_009d;
}
<>1__state = -1;
<>s__1 = enemies.GetEnumerator();
<>1__state = -3;
goto IL_00ac;
IL_009d:
<focus>5__3 = null;
<e>5__2 = null;
goto IL_00ac;
IL_00ac:
if (<>s__1.MoveNext())
{
<e>5__2 = <>s__1.Current;
<focus>5__3 = ((Unit)<e>5__2).GetStatusEffect<MomijiSwordFocus>();
if (<focus>5__3 != null)
{
<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<focus>5__3, true, 0.06f);
<>1__state = 1;
return true;
}
goto IL_009d;
}
<>m__Finally1();
<>s__1 = null;
return false;
}
catch
{
//try-fault
((IDisposable)this).Dispose();
throw;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>s__1 != null)
{
<>s__1.Dispose();
}
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<CleanseSE>d__1 <CleanseSE>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<CleanseSE>d__ = this;
}
else
{
<CleanseSE>d__ = new <CleanseSE>d__1(0)
{
<>4__this = <>4__this
};
}
<CleanseSE>d__.enemies = <>3__enemies;
return <CleanseSE>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
[CompilerGenerated]
private sealed class <OnStatisticalDamageDealt>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private StatisticalDamageEventArgs args;
public StatisticalDamageEventArgs <>3__args;
public MomijiSword <>4__this;
private IEnumerable<EnemyUnit> <otherEnemies>5__1;
private <>c__DisplayClass3_0 <>8__2;
private IReadOnlyList<DamageEventArgs> <dmg>5__3;
private int <num>5__4;
private IEnumerator<BattleAction> <>s__5;
private BattleAction <ba>5__6;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnStatisticalDamageDealt>d__3(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
int num = <>1__state;
if (num == -3 || num == 2)
{
try
{
}
finally
{
<>m__Finally1();
}
}
<otherEnemies>5__1 = null;
<>8__2 = null;
<dmg>5__3 = null;
<>s__5 = null;
<ba>5__6 = null;
<>1__state = -2;
}
private bool MoveNext()
{
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (((Exhibit)<>4__this).Battle.BattleShouldEnd)
{
return false;
}
<otherEnemies>5__1 = ((Exhibit)<>4__this).Battle.AllAliveEnemies;
if (1 == args.ArgsTable.Count)
{
<>8__2 = new <>c__DisplayClass3_0();
args.ArgsTable.First().Deconstruct(out var key, out var value);
<>8__2.target = key;
<dmg>5__3 = value;
<otherEnemies>5__1 = <otherEnemies>5__1.Where((EnemyUnit tgt) => tgt != <>8__2.target);
if (<>8__2.target.IsAlive)
{
<num>5__4 = <dmg>5__3.Count(delegate(DamageEventArgs dmg)
{
//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_000f: Invalid comparison between I4 and Unknown
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
DamageInfo damageInfo = dmg.DamageInfo;
int result;
if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
{
damageInfo = dmg.DamageInfo;
result = ((0f < ((DamageInfo)(ref damageInfo)).Amount) ? 1 : 0);
}
else
{
result = 0;
}
return (byte)result != 0;
});
if (0 < <num>5__4)
{
((Exhibit)<>4__this).NotifyActivating();
<>2__current = (BattleAction)(object)new ApplyStatusEffectAction<MomijiSwordFocus>(<>8__2.target, (int?)(<num>5__4 * ((Exhibit)<>4__this).Value1), (int?)null, (int?)null, (int?)null, 0f, true);
<>1__state = 1;
return true;
}
}
goto IL_01b1;
}
goto IL_01c0;
case 1:
<>1__state = -1;
goto IL_01b1;
case 2:
{
<>1__state = -3;
<ba>5__6 = null;
break;
}
IL_01c0:
<>s__5 = <>4__this.CleanseSE(<otherEnemies>5__1).GetEnumerator();
<>1__state = -3;
break;
IL_01b1:
<>8__2 = null;
<dmg>5__3 = null;
goto IL_01c0;
}
if (<>s__5.MoveNext())
{
<ba>5__6 = <>s__5.Current;
<>2__current = <ba>5__6;
<>1__state = 2;
return true;
}
<>m__Finally1();
<>s__5 = null;
return false;
}
catch
{
//try-fault
((IDisposable)this).Dispose();
throw;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>s__5 != null)
{
<>s__5.Dispose();
}
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnStatisticalDamageDealt>d__3 <OnStatisticalDamageDealt>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnStatisticalDamageDealt>d__ = this;
}
else
{
<OnStatisticalDamageDealt>d__ = new <OnStatisticalDamageDealt>d__3(0)
{
<>4__this = <>4__this
};
}
<OnStatisticalDamageDealt>d__.args = <>3__args;
return <OnStatisticalDamageDealt>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
[CompilerGenerated]
private sealed class <OnTurnEnded>d__2 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private UnitEventArgs args;
public UnitEventArgs <>3__args;
public MomijiSword <>4__this;
private IEnumerator<BattleAction> <>s__1;
private BattleAction <ba>5__2;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnTurnEnded>d__2(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
int num = <>1__state;
if (num == -3 || num == 1)
{
try
{
}
finally
{
<>m__Finally1();
}
}
<>s__1 = null;
<ba>5__2 = null;
<>1__state = -2;
}
private bool MoveNext()
{
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (((Exhibit)<>4__this).Battle.BattleShouldEnd)
{
return false;
}
<>s__1 = <>4__this.CleanseSE(((Exhibit)<>4__this).Battle.AllAliveEnemies).GetEnumerator();
<>1__state = -3;
break;
case 1:
<>1__state = -3;
<ba>5__2 = null;
break;
}
if (<>s__1.MoveNext())
{
<ba>5__2 = <>s__1.Current;
<>2__current = <ba>5__2;
<>1__state = 1;
return true;
}
<>m__Finally1();
<>s__1 = null;
return false;
}
catch
{
//try-fault
((IDisposable)this).Dispose();
throw;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>s__1 != null)
{
<>s__1.Dispose();
}
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnTurnEnded>d__2 <OnTurnEnded>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnTurnEnded>d__ = this;
}
else
{
<OnTurnEnded>d__ = new <OnTurnEnded>d__2(0)
{
<>4__this = <>4__this
};
}
<OnTurnEnded>d__.args = <>3__args;
return <OnTurnEnded>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
protected override void OnEnterBattle()
{
((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnEnded, (EventSequencedReactor<UnitEventArgs>)OnTurnEnded);
((Exhibit)this).ReactBattleEvent<StatisticalDamageEventArgs>(((Unit)((Exhibit)this).Owner).StatisticalTotalDamageDealt, (EventSequencedReactor<StatisticalDamageEventArgs>)OnStatisticalDamageDealt);
}
[IteratorStateMachine(typeof(<CleanseSE>d__1))]
private IEnumerable<BattleAction> CleanseSE(IEnumerable<EnemyUnit> enemies)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <CleanseSE>d__1(-2)
{
<>4__this = this,
<>3__enemies = enemies
};
}
[IteratorStateMachine(typeof(<OnTurnEnded>d__2))]
private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnTurnEnded>d__2(-2)
{
<>4__this = this,
<>3__args = args
};
}
[IteratorStateMachine(typeof(<OnStatisticalDamageDealt>d__3))]
private IEnumerable<BattleAction> OnStatisticalDamageDealt(StatisticalDamageEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnStatisticalDamageDealt>d__3(-2)
{
<>4__this = this,
<>3__args = args
};
}
}
public sealed class SeigaHairpinDef : ExhibitTemplate
{
public override IdContainer GetId()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
return IdContainer.op_Implicit("SeigaHairpin");
}
public override ExhibitConfig MakeConfig()
{
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Expected O, but got Unknown
return new ExhibitConfig(0, "", 1, false, false, false, true, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)1, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)3, 1, false, (int?)null, (Keyword)0, (IReadOnlyList<string>)new List<string> { "Weak", "Vulnerable" }, (IReadOnlyList<string>)new List<string>());
}
public override ExhibitSprites LoadSprite()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0005: 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_003e: Expected O, but got Unknown
return new ExhibitSprites
{
main = ResourceLoader.LoadSprite(IdContainer.op_Implicit(((EntityDefinition)this).GetId()) + ".png", (IResourceSource)(object)BepinexPlugin.directorySource, (Rect?)null, 1, (Vector2?)null)
};
}
public override LocalizationOption LoadLocalization()
{
return (LocalizationOption)(object)BepinexPlugin.exhibitLoc.AddEntity((EntityDefinition)(object)this);
}
}
[EntityLogic(typeof(SeigaHairpinDef))]
public sealed class SeigaHairpin : ShiningExhibit
{
[CompilerGenerated]
private sealed class <OnEnemySpawned>d__2 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private UnitEventArgs args;
public UnitEventArgs <>3__args;
public SeigaHairpin <>4__this;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnEnemySpawned>d__2(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (((Unit)((Exhibit)<>4__this).Owner).HasStatusEffect<Weak>())
{
((Exhibit)<>4__this).NotifyActivating();
<>2__current = <>4__this.ApplyPhantomSE<Weak>(args.Unit);
<>1__state = 1;
return true;
}
goto IL_007c;
case 1:
<>1__state = -1;
goto IL_007c;
case 2:
{
<>1__state = -1;
break;
}
IL_007c:
if (((Unit)((Exhibit)<>4__this).Owner).HasStatusEffect<Vulnerable>())
{
((Exhibit)<>4__this).NotifyActivating();
<>2__current = <>4__this.ApplyPhantomSE<Vulnerable>(args.Unit);
<>1__state = 2;
return true;
}
break;
}
((Exhibit)<>4__this).HandleBattleEvent<StatusEffectEventArgs>(args.Unit.StatusEffectRemoving, (GameEventHandler<StatusEffectEventArgs>)<>4__this.OnEnemyStatusEffectRemoving);
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnEnemySpawned>d__2 <OnEnemySpawned>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnEnemySpawned>d__ = this;
}
else
{
<OnEnemySpawned>d__ = new <OnEnemySpawned>d__2(0)
{
<>4__this = <>4__this
};
}
<OnEnemySpawned>d__.args = <>3__args;
return <OnEnemySpawned>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
[CompilerGenerated]
private sealed class <OnStatusEffectAdding>d__3 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private StatusEffectApplyEventArgs args;
public StatusEffectApplyEventArgs <>3__args;
public SeigaHairpin <>4__this;
private IEnumerator<EnemyUnit> <>s__1;
private EnemyUnit <e>5__2;
private IEnumerator<EnemyUnit> <>s__3;
private EnemyUnit <e>5__4;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnStatusEffectAdding>d__3(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
switch (<>1__state)
{
case -3:
case 1:
try
{
}
finally
{
<>m__Finally1();
}
break;
case -4:
case 2:
try
{
}
finally
{
<>m__Finally2();
}
break;
}
<>s__1 = null;
<e>5__2 = null;
<>s__3 = null;
<e>5__4 = null;
<>1__state = -2;
}
private bool MoveNext()
{
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (args.Effect is Weak)
{
if (!((Exhibit)<>4__this).Active)
{
((Exhibit)<>4__this).NotifyActivating();
((Exhibit)<>4__this).Active = true;
}
<>s__1 = ((Exhibit)<>4__this).Battle.AllAliveEnemies.Where((EnemyUnit enemy) => !((Unit)enemy).HasStatusEffect<Weak>()).GetEnumerator();
<>1__state = -3;
goto IL_010f;
}
goto IL_012b;
case 1:
<>1__state = -3;
<e>5__2 = null;
goto IL_010f;
case 2:
{
<>1__state = -4;
<e>5__4 = null;
goto IL_0205;
}
IL_0205:
if (<>s__3.MoveNext())
{
<e>5__4 = <>s__3.Current;
<>2__current = <>4__this.ApplyPhantomSE<Vulnerable>((Unit)(object)<e>5__4);
<>1__state = 2;
return true;
}
<>m__Finally2();
<>s__3 = null;
break;
IL_010f:
if (<>s__1.MoveNext())
{
<e>5__2 = <>s__1.Current;
<>2__current = <>4__this.ApplyPhantomSE<Weak>((Unit)(object)<e>5__2);
<>1__state = 1;
return true;
}
<>m__Finally1();
<>s__1 = null;
goto IL_012b;
IL_012b:
if (!(args.Effect is Vulnerable))
{
break;
}
if (!((Exhibit)<>4__this).Active)
{
((Exhibit)<>4__this).NotifyActivating();
((Exhibit)<>4__this).Active = true;
}
<>s__3 = ((Exhibit)<>4__this).Battle.AllAliveEnemies.Where((EnemyUnit enemy) => !((Unit)enemy).HasStatusEffect<Vulnerable>()).GetEnumerator();
<>1__state = -4;
goto IL_0205;
}
return false;
}
catch
{
//try-fault
((IDisposable)this).Dispose();
throw;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>s__1 != null)
{
<>s__1.Dispose();
}
}
private void <>m__Finally2()
{
<>1__state = -1;
if (<>s__3 != null)
{
<>s__3.Dispose();
}
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnStatusEffectAdding>d__3 <OnStatusEffectAdding>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnStatusEffectAdding>d__ = this;
}
else
{
<OnStatusEffectAdding>d__ = new <OnStatusEffectAdding>d__3(0)
{
<>4__this = <>4__this
};
}
<OnStatusEffectAdding>d__.args = <>3__args;
return <OnStatusEffectAdding>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
[CompilerGenerated]
private sealed class <OnStatusEffectRemoved>d__4 : IEnumerable<BattleAction>, IEnumerable, IEnumerator<BattleAction>, IEnumerator, IDisposable
{
private int <>1__state;
private BattleAction <>2__current;
private int <>l__initialThreadId;
private StatusEffectEventArgs args;
public StatusEffectEventArgs <>3__args;
public SeigaHairpin <>4__this;
private IEnumerator<EnemyUnit> <>s__1;
private EnemyUnit <e>5__2;
private Weak <w>5__3;
private IEnumerator<EnemyUnit> <>s__4;
private EnemyUnit <e>5__5;
private Vulnerable <v>5__6;
BattleAction IEnumerator<BattleAction>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <OnStatusEffectRemoved>d__4(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Environment.CurrentManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
switch (<>1__state)
{
case -3:
case 1:
try
{
}
finally
{
<>m__Finally1();
}
break;
case -4:
case 2:
try
{
}
finally
{
<>m__Finally2();
}
break;
}
<>s__1 = null;
<e>5__2 = null;
<w>5__3 = null;
<>s__4 = null;
<e>5__5 = null;
<v>5__6 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Expected O, but got Unknown
//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
//IL_01e2: Expected O, but got Unknown
try
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (args.Effect is Weak)
{
<>s__1 = ((Exhibit)<>4__this).Battle.AllAliveEnemies.GetEnumerator();
<>1__state = -3;
goto IL_010b;
}
if (!(args.Effect is Vulnerable))
{
break;
}
<>s__4 = ((Exhibit)<>4__this).Battle.AllAliveEnemies.GetEnumerator();
<>1__state = -4;
goto IL_0205;
case 1:
<>1__state = -3;
goto IL_00fc;
case 2:
{
<>1__state = -4;
goto IL_01f6;
}
IL_010b:
if (<>s__1.MoveNext())
{
<e>5__2 = <>s__1.Current;
<w>5__3 = ((Unit)<e>5__2).GetStatusEffect<Weak>();
if (<w>5__3 != null && (!((StatusEffect)<w>5__3).IsAutoDecreasing || 0 >= ((StatusEffect)<w>5__3).Duration))
{
<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<w>5__3, true, 0f);
<>1__state = 1;
return true;
}
goto IL_00fc;
}
<>m__Finally1();
<>s__1 = null;
break;
IL_01f6:
<v>5__6 = null;
<e>5__5 = null;
goto IL_0205;
IL_00fc:
<w>5__3 = null;
<e>5__2 = null;
goto IL_010b;
IL_0205:
if (<>s__4.MoveNext())
{
<e>5__5 = <>s__4.Current;
<v>5__6 = ((Unit)<e>5__5).GetStatusEffect<Vulnerable>();
if (<v>5__6 != null && (!((StatusEffect)<v>5__6).IsAutoDecreasing || 0 >= ((StatusEffect)<v>5__6).Duration))
{
<>2__current = (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)<v>5__6, true, 0f);
<>1__state = 2;
return true;
}
goto IL_01f6;
}
<>m__Finally2();
<>s__4 = null;
break;
}
((Exhibit)<>4__this).Active = ((Unit)((Exhibit)<>4__this).Owner).HasStatusEffect<Weak>() || ((Unit)((Exhibit)<>4__this).Owner).HasStatusEffect<Vulnerable>();
return false;
}
catch
{
//try-fault
((IDisposable)this).Dispose();
throw;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
private void <>m__Finally1()
{
<>1__state = -1;
if (<>s__1 != null)
{
<>s__1.Dispose();
}
}
private void <>m__Finally2()
{
<>1__state = -1;
if (<>s__4 != null)
{
<>s__4.Dispose();
}
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<BattleAction> IEnumerable<BattleAction>.GetEnumerator()
{
<OnStatusEffectRemoved>d__4 <OnStatusEffectRemoved>d__;
if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
{
<>1__state = 0;
<OnStatusEffectRemoved>d__ = this;
}
else
{
<OnStatusEffectRemoved>d__ = new <OnStatusEffectRemoved>d__4(0)
{
<>4__this = <>4__this
};
}
<OnStatusEffectRemoved>d__.args = <>3__args;
return <OnStatusEffectRemoved>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<BattleAction>)this).GetEnumerator();
}
}
protected override void OnEnterBattle()
{
((Exhibit)this).ReactBattleEvent<StatusEffectApplyEventArgs>(((Unit)((Exhibit)this).Owner).StatusEffectAdding, (EventSequencedReactor<StatusEffectApplyEventArgs>)OnStatusEffectAdding);
((Exhibit)this).ReactBattleEvent<StatusEffectEventArgs>(((Unit)((Exhibit)this).Owner).StatusEffectRemoved, (EventSequencedReactor<StatusEffectEventArgs>)OnStatusEffectRemoved);
((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Exhibit)this).Battle.EnemySpawned, (EventSequencedReactor<UnitEventArgs>)OnEnemySpawned);
foreach (EnemyUnit allAliveEnemy in ((Exhibit)this).Battle.AllAliveEnemies)
{
((Exhibit)this).HandleBattleEvent<StatusEffectEventArgs>(((Unit)allAliveEnemy).StatusEffectRemoving, (GameEventHandler<StatusEffectEventArgs>)OnEnemyStatusEffectRemoving);
}
}
private BattleAction ApplyPhantomSE<T>(Unit target) where T : StatusEffect
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Expected O, but got Unknown
Type typeFromHandle = typeof(T);
int? num = 0;
ApplySEnoTriggers val = new ApplySEnoTriggers(typeFromHandle, target, (int?)null, num, (int?)null, (int?)null, 0f, true);
((EventBattleAction<StatusEffectApplyEventArgs>)(object)val).Args.Effect.ForceNotShowDownText = true;
((EventBattleAction<StatusEffectApplyEventArgs>)(object)val).Args.Effect.IsAutoDecreasing = false;
return (BattleAction)(object)val;
}
[IteratorStateMachine(typeof(<OnEnemySpawned>d__2))]
private IEnumerable<BattleAction> OnEnemySpawned(UnitEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnEnemySpawned>d__2(-2)
{
<>4__this = this,
<>3__args = args
};
}
[IteratorStateMachine(typeof(<OnStatusEffectAdding>d__3))]
private IEnumerable<BattleAction> OnStatusEffectAdding(StatusEffectApplyEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnStatusEffectAdding>d__3(-2)
{
<>4__this = this,
<>3__args = args
};
}
[IteratorStateMachine(typeof(<OnStatusEffectRemoved>d__4))]
private IEnumerable<BattleAction> OnStatusEffectRemoved(StatusEffectEventArgs args)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <OnStatusEffectRemoved>d__4(-2)
{
<>4__this = this,
<>3__args = args
};
}
private void OnEnemyStatusEffectRemoving(StatusEffectEventArgs args)
{
if ((!(args.Effect is Weak) || !((Unit)((Exhibit)this).Owner).HasStatusEffect<Weak>()) && (!(args.Effect is Vulnerable) || !((Unit)((Exhibit)this).Owner).HasStatusEffect<Vulnerable>()))
{
return;
}
args.Effect.ForceNotShowDownText = true;
args.Effect.IsAutoDecreasing = false;
UnitView view = args.Unit.GetView<UnitView>();
if ((Object)null != (Object)(object)view)
{
StatusEffectWidget val = view._statusWidget.FindStatusEffect(args.Effect);
if (val != null)
{
val.TextRefresh();
}
}
((GameEventArgs)args).CanCancel = true;
((GameEventArgs)args).CancelBy((GameEntity)(object)this);
}
}
[HarmonyPatch(typeof(StatusEffect))]
internal class StatusEffect_Stack_Patch
{
[HarmonyPatch("Stack", new Type[] { typeof(StatusEffect) })]
private static void Postfix(StatusEffect __instance, StatusEffect other)
{
if (__instance is Weak || __instance is Vulnerable)
{
__instance.ForceNotShowDownText &= other.ForceNotShowDownText;
__instance.IsAutoDecreasing |= other.IsAutoDecreasing;
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
internal IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}