using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnboundLib;
using UnityEngine;
using UnityEngine.Events;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: SecurityPermission((SecurityAction)8, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(/*Could not decode attribute arguments.*/)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace ScavengerFix
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.scipplaystaff.rounds.scavengerfix", "Scavenger Fix", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class ScavengerFix : BaseUnityPlugin
{
private const string modId = "com.scipplaystaff.rounds.scavengerfix";
private const string modName = "Scavenger Fix";
private void Start()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_0091: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Expected O, but got Unknown
new Harmony("com.scipplaystaff.rounds.scavengerfix").PatchAll();
bool flag = false;
CardInfo[] cards = CardChoice.instance.cards;
foreach (CardInfo val in cards)
{
if (val.cardName == "SCAVENGER")
{
GameObject addObjectToPlayer = ((Component)val).gameObject.GetComponent<CharacterStatModifiers>().AddObjectToPlayer;
SpawnObjectOnDealDamage orAddComponent = ExtensionMethods.GetOrAddComponent<SpawnObjectOnDealDamage>(addObjectToPlayer, false);
DealtDamageTrigger component = addObjectToPlayer.GetComponent<DealtDamageTrigger>();
orAddComponent.triggerEvent = component.triggerEvent;
orAddComponent.allowSelfDmg = true;
orAddComponent.cd = 0.1f;
orAddComponent.damageNeeded = 0f;
((Behaviour)component).enabled = false;
component.triggerEvent = new UnityEvent();
Debug.Log((object)"Scavenger SpawnObjectOnDealDamage component added. DealtDamageTrigger is disabled.");
flag = true;
}
}
if (!flag)
{
Debug.LogWarning((object)"Scavenger was not patched successfully.");
}
}
}
}