using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnboundLib.Cards;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("JOJO_SexPistols_Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JOJO_SexPistols_Mod")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("808fb174-0c4a-4d6e-9a98-31462a763eca")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace JOJO_SexPistols_Mod;
public class JOJO_SexPistols_v1 : CustomCard
{
public override void SetupCard(CardInfo cardInfo, Gun gun, ApplyCardStats cardStats, CharacterStatModifiers statModifiers, Block block)
{
}
public override void OnAddCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
SexPistolsEffect sexPistolsEffect = ((Component)player).gameObject.GetComponent<SexPistolsEffect>();
if (!Object.op_Implicit((Object)(object)sexPistolsEffect))
{
sexPistolsEffect = ((Component)player).gameObject.AddComponent<SexPistolsEffect>();
}
sexPistolsEffect.stacks++;
}
public override void OnRemoveCard(Player player, Gun gun, GunAmmo gunAmmo, CharacterData data, HealthHandler health, Gravity gravity, Block block, CharacterStatModifiers characterStats)
{
SexPistolsEffect component = ((Component)player).gameObject.GetComponent<SexPistolsEffect>();
if ((Object)(object)component != (Object)null)
{
component.stacks--;
if (component.stacks <= 0)
{
Object.Destroy((Object)(object)component);
}
}
}
protected override string GetTitle()
{
return "Sex Pistols";
}
protected override string GetDescription()
{
return "При нажатии на БЛОК ваши пули меняют траекторию и летят точно в прицел!";
}
protected override GameObject GetCardArt()
{
return null;
}
protected override Rarity GetRarity()
{
return (Rarity)1;
}
protected override CardInfoStat[] GetStats()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[1]
{
new CardInfoStat
{
positive = true,
stat = "Контроль пуль",
amount = "Блок"
}
};
}
protected override CardThemeColorType GetTheme()
{
return (CardThemeColorType)0;
}
public override string GetModName()
{
return "JOJO";
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.jojo.rounds.sexpistols", "JOJO Sex Pistols", "1.0.0")]
[BepInProcess("Rounds.exe")]
public class Main : BaseUnityPlugin
{
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
Harmony val = new Harmony("com.jojo.rounds.sexpistols");
val.PatchAll();
CustomCard.BuildCard<JOJO_SexPistols_v1>();
}
}
public class SexPistolsEffect : MonoBehaviour
{
private Player player;
private Block block;
public int stacks = 0;
private void Awake()
{
player = ((Component)this).GetComponent<Player>();
block = ((Component)this).GetComponent<Block>();
Block obj = block;
obj.BlockAction = (Action<BlockTriggerType>)Delegate.Combine(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
private void OnDestroy()
{
if ((Object)(object)block != (Object)null)
{
Block obj = block;
obj.BlockAction = (Action<BlockTriggerType>)Delegate.Remove(obj.BlockAction, new Action<BlockTriggerType>(OnBlock));
}
}
private void OnBlock(BlockTriggerType trigger)
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: 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_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
if (stacks <= 0)
{
return;
}
Vector2 val = Vector2.op_Implicit(((Vector3)(ref player.data.input.aimDirection)).normalized);
if (val == Vector2.zero)
{
return;
}
MoveTransform[] array = Object.FindObjectsOfType<MoveTransform>();
MoveTransform[] array2 = array;
foreach (MoveTransform val2 in array2)
{
ProjectileHit component = ((Component)val2).GetComponent<ProjectileHit>();
if ((Object)(object)component != (Object)null && (Object)(object)component.ownPlayer == (Object)(object)player)
{
float magnitude = ((Vector3)(ref val2.velocity)).magnitude;
val2.velocity = Vector2.op_Implicit(val * magnitude);
}
}
}
}