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.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 LBoLEntitySideloader;
using LBoLEntitySideloader.Attributes;
using LBoLEntitySideloader.Entities;
using LBoLEntitySideloader.Resource;
using ShiningExhibitsPlus.StatusEffects;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[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("Release")]
[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", "Shining Exhibits Plus", "0.0.1")]
[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 = "Shining Exhibits Plus";
public const string version = "0.0.1";
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_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Expected O, but got Unknown
return new StatusEffectConfig(0, "", 9, (StatusEffectType)2, 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_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: 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_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: 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_0031: Unknown result type (might be due to invalid IL or missing references)
DamageInfo damageInfo = args.DamageInfo;
if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
{
((DamageInfo)(ref damageInfo)).Damage = ((DamageInfo)(ref damageInfo)).Amount * ((float)(100 - ((StatusEffect)this).Level) / 100f);
args.DamageInfo = damageInfo;
((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_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: 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_001a: 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_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Expected O, but got Unknown
return new ExhibitConfig(0, "", 10, false, false, false, true, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)10, (int?)null, (int?)null, (ManaGroup?)null, (ManaColor?)null, (ManaColor?)(ManaColor)1, 1, false, (int?)null, (Keyword)1536, (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(AliceShieldDef))]
public sealed class AliceShield : ShiningExhibit
{
private bool GainedBlock;
private bool GainedShield;
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).ReactBattleEvent<BlockShieldEventArgs>(((Unit)((Exhibit)this).Owner).BlockShieldGained, (EventSequencedReactor<BlockShieldEventArgs>)OnBlockShieldGained);
}
protected override void OnLeaveBattle()
{
GainedBlock = false;
GainedShield = false;
}
private void OnTurnStarting(UnitEventArgs args)
{
GainedBlock = false;
GainedShield = false;
}
private IEnumerable<BattleAction> OnBlockShieldGained(BlockShieldEventArgs args)
{
bool flag = false;
if (!GainedBlock && 0f < args.Block)
{
flag = true;
GainedBlock = true;
}
if (!GainedShield && 0f < args.Shield)
{
flag = true;
GainedShield = true;
}
if (GainedBlock && GainedShield && flag)
{
<>n__0();
yield return (BattleAction)(object)new ApplyStatusEffectAction<AliceShieldProtection>((Unit)(object)((Exhibit)this).Owner, (int?)((Exhibit)this).Value1, (int?)null, (int?)null, (int?)null, 0.1f, true);
}
}
[CompilerGenerated]
[DebuggerHidden]
private void <>n__0()
{
((Exhibit)this).NotifyActivating();
}
}
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
{
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;
}
}
private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
{
if (((Exhibit)this).Battle.BattleShouldEnd)
{
yield break;
}
<>n__0();
if (((Exhibit)this).Value1 >= ((Exhibit)this).Battle.HandZone.Count)
{
List<Card> list = ((Exhibit)this).Battle.HandZone.ToList();
foreach (Card item in list)
{
yield return (BattleAction)new MoveCardToDrawZoneAction(item, (DrawZoneTarget)2);
}
yield break;
}
SelectHandInteraction @int = new SelectHandInteraction(((Exhibit)this).Value1, ((Exhibit)this).Value1, (IEnumerable<Card>)((Exhibit)this).Battle.HandZone)
{
Source = (GameEntity)(object)this
};
yield return (BattleAction)new InteractionAction((Interaction)(object)@int, false);
IReadOnlyList<Card> selectedCards = @int.SelectedCards;
foreach (Card item2 in selectedCards)
{
yield return (BattleAction)new MoveCardToDrawZoneAction(item2, (DrawZoneTarget)2);
}
}
[CompilerGenerated]
[DebuggerHidden]
private void <>n__0()
{
((Exhibit)this).NotifyActivating();
}
}
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_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
return new ExhibitConfig(0, "", 10, false, false, false, true, (AppearanceType)0, "", (ExhibitLosableType)2, (Rarity)3, (int?)4, (int?)1, (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
{
protected override void OnEnterBattle()
{
((Exhibit)this).ReactBattleEvent<CardUsingEventArgs>(((Exhibit)this).Battle.CardUsed, (EventSequencedReactor<CardUsingEventArgs>)OnCardUsed);
}
private IEnumerable<BattleAction> OnCardUsed(CardUsingEventArgs args)
{
if (4 == (int)args.Card.CardType)
{
int value = ((Exhibit)this).Value1;
ManaGroup consumingMana = args.ConsumingMana;
if (value <= ((ManaGroup)(ref consumingMana)).Amount)
{
<>n__0();
yield return (BattleAction)(object)new ApplyStatusEffectAction<Firepower>((Unit)(object)((Exhibit)this).Owner, (int?)((Exhibit)this).Value2, (int?)null, (int?)null, (int?)null, 0f, true);
yield return (BattleAction)(object)new ApplyStatusEffectAction<Spirit>((Unit)(object)((Exhibit)this).Owner, (int?)((Exhibit)this).Value2, (int?)null, (int?)null, (int?)null, 0f, true);
}
}
}
[CompilerGenerated]
[DebuggerHidden]
private void <>n__0()
{
((Exhibit)this).NotifyActivating();
}
}
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
{
protected override void OnEnterBattle()
{
((Exhibit)this).ReactBattleEvent<UnitEventArgs>(((Unit)((Exhibit)this).Owner).TurnStarted, (EventSequencedReactor<UnitEventArgs>)OnTurnStarted);
}
private IEnumerable<BattleAction> OnTurnStarted(UnitEventArgs args)
{
ManaGroup conv = ManaGroup.Empty;
ManaGroup battleMana = ((Exhibit)this).Battle.BattleMana;
for (int i = 0; i < ((Exhibit)this).Value1; i++)
{
ManaColor val = ((ManaGroup)(ref battleMana)).MaxTrivialColor;
if (((ManaGroup)(ref battleMana))[val] <= ((ManaGroup)(ref battleMana))[(ManaColor)6])
{
val = (ManaColor)6;
}
if (0 >= ((ManaGroup)(ref battleMana))[val])
{
break;
}
ref ManaGroup reference = ref conv;
ManaColor val2 = val;
((ManaGroup)(ref reference))[val2] = ((ManaGroup)(ref reference))[val2] + 1;
reference = ref battleMana;
val2 = val;
((ManaGroup)(ref reference))[val2] = ((ManaGroup)(ref reference))[val2] - 1;
}
if (conv != ManaGroup.Empty)
{
<>n__0();
yield return (BattleAction)(object)PerformAction.Sfx("FairySupport", 0f);
yield return (BattleAction)new ConvertManaAction(conv, ManaGroup.Philosophies(((ManaGroup)(ref conv)).Amount), true);
}
}
[CompilerGenerated]
[DebuggerHidden]
private void <>n__0()
{
((Exhibit)this).NotifyActivating();
}
}
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_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: 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
{
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);
}
private IEnumerable<BattleAction> CleanseSE(IEnumerable<EnemyUnit> enemies)
{
foreach (EnemyUnit enemy in enemies)
{
MomijiSwordFocus statusEffect = ((Unit)enemy).GetStatusEffect<MomijiSwordFocus>();
if (statusEffect != null)
{
yield return (BattleAction)new RemoveStatusEffectAction((StatusEffect)(object)statusEffect, true, 0.06f);
}
}
}
private IEnumerable<BattleAction> OnTurnEnded(UnitEventArgs args)
{
if (((Exhibit)this).Battle.BattleShouldEnd)
{
yield break;
}
foreach (BattleAction item in CleanseSE(((Exhibit)this).Battle.AllAliveEnemies))
{
yield return item;
}
}
private IEnumerable<BattleAction> OnStatisticalDamageDealt(StatisticalDamageEventArgs args)
{
if (((Exhibit)this).Battle.BattleShouldEnd)
{
yield break;
}
IEnumerable<EnemyUnit> otherEnemies = ((Exhibit)this).Battle.AllAliveEnemies;
if (1 == args.ArgsTable.Count)
{
args.ArgsTable.First().Deconstruct(out var key, out var value);
Unit target = key;
IReadOnlyList<DamageEventArgs> source = value;
otherEnemies = otherEnemies.Where((EnemyUnit tgt) => tgt != target);
if (target.IsAlive)
{
int num = source.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;
if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType)
{
damageInfo = dmg.DamageInfo;
return 0f < ((DamageInfo)(ref damageInfo)).Amount;
}
return false;
});
if (0 < num)
{
<>n__0();
yield return (BattleAction)(object)new ApplyStatusEffectAction<MomijiSwordFocus>(target, (int?)(num * ((Exhibit)this).Value1), (int?)null, (int?)null, (int?)null, 0f, true);
}
}
}
foreach (BattleAction item in CleanseSE(otherEnemies))
{
yield return item;
}
}
[CompilerGenerated]
[DebuggerHidden]
private void <>n__0()
{
((Exhibit)this).NotifyActivating();
}
}
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_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: 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?)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
{
private readonly Weak weakInstance = Library.CreateStatusEffect<Weak>();
private readonly Vulnerable vulnInstance = Library.CreateStatusEffect<Vulnerable>();
protected override void OnEnterBattle()
{
((Exhibit)this).HandleBattleEvent<DamageEventArgs>(((Unit)((Exhibit)this).Owner).DamageReceiving, (GameEventHandler<DamageEventArgs>)OnPlayerDamageReceiving);
((Exhibit)this).HandleBattleEvent<UnitEventArgs>(((Exhibit)this).Battle.EnemySpawned, (GameEventHandler<UnitEventArgs>)OnEnemySpawned);
foreach (EnemyUnit allAliveEnemy in ((Exhibit)this).Battle.AllAliveEnemies)
{
((Exhibit)this).HandleBattleEvent<DamageEventArgs>(((Unit)allAliveEnemy).DamageReceiving, (GameEventHandler<DamageEventArgs>)OnEnemyDamageReceiving);
}
}
private void OnEnemySpawned(UnitEventArgs args)
{
((Exhibit)this).HandleBattleEvent<DamageEventArgs>(args.Unit.DamageReceiving, (GameEventHandler<DamageEventArgs>)OnEnemyDamageReceiving);
}
private void OnPlayerDamageReceiving(DamageEventArgs args)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: 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_001c: Invalid comparison between I4 and Unknown
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
if (((Unit)((Exhibit)this).Owner).HasStatusEffect<Weak>())
{
DamageInfo damageInfo = args.DamageInfo;
if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType && !args.Source.HasStatusEffect<Weak>())
{
((StatusEffect)weakInstance).Owner = args.Source;
((GameEntity)weakInstance).GameRun = ((GameEntity)args.Source).GameRun;
((DamageInfo)(ref damageInfo)).Damage = ((DamageInfo)(ref damageInfo)).Amount * ((float)(100 - weakInstance.Value) / 100f);
args.DamageInfo = damageInfo;
((GameEventArgs)args).AddModifier((GameEntity)(object)this);
}
}
}
private void OnEnemyDamageReceiving(DamageEventArgs args)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: 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_001c: Invalid comparison between I4 and Unknown
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
if (((Unit)((Exhibit)this).Owner).HasStatusEffect<Vulnerable>())
{
DamageInfo damageInfo = args.DamageInfo;
if (2 == (int)((DamageInfo)(ref damageInfo)).DamageType && !args.Target.HasStatusEffect<Vulnerable>())
{
((StatusEffect)vulnInstance).Owner = args.Target;
((GameEntity)vulnInstance).GameRun = ((GameEntity)args.Target).GameRun;
((DamageInfo)(ref damageInfo)).Damage = ((DamageInfo)(ref damageInfo)).Amount * ((float)(100 + vulnInstance.Value) / 100f);
args.DamageInfo = damageInfo;
((GameEventArgs)args).AddModifier((GameEntity)(object)this);
}
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
internal IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}