using System.Diagnostics;
using System.Linq;
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++;
if (sexPistolsEffect.stacks == 4)
{
gun.damage *= 0.5f;
gun.reloadTime *= 2f;
}
else if (sexPistolsEffect.stacks == 5)
{
gun.damage *= 2.5f;
gun.reloadTime *= 0.5f;
}
}
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 "Press E to kick bullets toward your CURSOR! Every kick increases speed. BEWARE OF 4!";
}
protected override GameObject GetCardArt()
{
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: 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)
GameObject val = GameObject.CreatePrimitive((PrimitiveType)1);
Component[] components = val.GetComponents<Component>();
Component[] array = components;
foreach (Component val2 in array)
{
if (((object)val2).GetType().Name.Contains("Collider"))
{
Object.Destroy((Object)(object)val2);
}
}
val.transform.localScale = new Vector3(0.4f, 0.4f, 0.4f);
val.transform.localRotation = Quaternion.Euler(0f, 0f, 45f);
Renderer component = val.GetComponent<Renderer>();
if ((Object)(object)component != (Object)null)
{
component.material.color = Color.yellow;
}
return val;
}
protected override Rarity GetRarity()
{
return (Rarity)0;
}
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
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
return (CardInfoStat[])(object)new CardInfoStat[3]
{
new CardInfoStat
{
positive = true,
stat = "Ability",
amount = "Press E"
},
new CardInfoStat
{
positive = true,
stat = "Power",
amount = "Stacking Speed"
},
new CardInfoStat
{
positive = false,
stat = "Luck",
amount = "Bad on 4"
}
};
}
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.2")]
[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;
public int stacks = 0;
private float cooldownTimer = 0f;
private float baseCooldown = 0.35f;
private void Awake()
{
player = ((Component)this).GetComponent<Player>();
}
private void Update()
{
if (cooldownTimer > 0f)
{
cooldownTimer -= Time.deltaTime;
}
if (Input.GetKeyDown((KeyCode)101) && cooldownTimer <= 0f && stacks > 0)
{
ActivatePistols();
}
}
private void ActivatePistols()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
Vector3 val = MainCam.instance.cam.ScreenToWorldPoint(Input.mousePosition);
val.z = 0f;
MoveTransform[] array = (from b in Object.FindObjectsOfType<MoveTransform>()
where (Object)(object)((Component)b).GetComponent<ProjectileHit>()?.ownPlayer == (Object)(object)player
select b).ToArray();
if (array.Length != 0)
{
MoveTransform[] array2 = array;
foreach (MoveTransform val2 in array2)
{
Vector2 val3 = Vector2.op_Implicit(val) - Vector2.op_Implicit(((Component)val2).transform.position);
Vector2 normalized = ((Vector2)(ref val3)).normalized;
float num = 1.3f + 0.05f * (float)stacks;
val2.velocity = Vector2.op_Implicit(normalized * (((Vector3)(ref val2.velocity)).magnitude * num));
ApplyVisuals(val2);
}
cooldownTimer = baseCooldown;
}
}
private void ApplyVisuals(MoveTransform bullet)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Expected O, but got Unknown
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
if (((Component)bullet).transform.localScale.x < 3f)
{
Transform transform = ((Component)bullet).transform;
transform.localScale *= 1.15f;
}
SpriteRenderer componentInChildren = ((Component)bullet).GetComponentInChildren<SpriteRenderer>();
if (Object.op_Implicit((Object)(object)componentInChildren))
{
componentInChildren.color = Color.yellow;
}
TrailRenderer val = ((Component)bullet).GetComponent<TrailRenderer>();
if ((Object)(object)val == (Object)null)
{
val = ((Component)bullet).gameObject.AddComponent<TrailRenderer>();
val.time = 0.4f;
((Renderer)val).material = new Material(Shader.Find("Sprites/Default"));
val.startColor = Color.yellow;
val.endColor = new Color(1f, 0.5f, 0f, 0f);
}
val.startWidth = ((Component)bullet).transform.localScale.x * 0.4f;
}
}