Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of ArthursCommandoTweaks v1.1.1
ArthursCommandoTweaks.dll
Decompiled 3 weeks agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using ArthursCommandoTweaks.Skills; using BepInEx; using EntityStates; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using On.EntityStates; using On.EntityStates.Commando; using On.EntityStates.Commando.CommandoWeapon; using R2API; using RoR2; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("ArthursCommandoTweaks")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ArthursCommandoTweaks")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("adb1c7b9-72cc-48d3-b74f-a6c4185de018")] [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 ArthursCommandoTweaks { [BepInPlugin("com.asteristired.commandotweaks", "Arthurs Commando Tweaks", "1.1.0")] public class ArthurCommandoTweaks : BaseUnityPlugin { public void Awake() { RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad)); } public void OnLoad() { FragGrenade.Apply(); TacticalDive.Apply(); PhaseRound.Apply(); SuppressiveFire.Apply(); } } } namespace ArthursCommandoTweaks.Skills { internal class PhaseRound { public static void Apply() { ChangeSkillDef(); Hook(); } protected static void Hook() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown GenericProjectileBaseState.OnEnter += new hook_OnEnter(OnShoot); } private static void OnShoot(orig_OnEnter orig, GenericProjectileBaseState self) { if (self is FireFMJ) { self.damageCoefficient = 3.6f; } orig.Invoke(self); } protected static void ChangeSkillDef() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject allBodyPrefab in BodyCatalog.allBodyPrefabs) { if (((Object)allBodyPrefab).name != "CommandoBody") { continue; } Variant[] variants = allBodyPrefab.GetComponent<SkillLocator>().secondary.skillFamily.variants; for (int i = 0; i < variants.Length; i++) { SkillDef skillDef = variants[i].skillDef; if (skillDef.skillNameToken == "COMMANDO_SECONDARY_NAME") { LanguageAPI.Add(skillDef.skillDescriptionToken, "Fire a <style=cIsDamage>piercing</style> bullet for <style=cIsDamage>360% damage</style>. Deals <style=cIsDamage>40%</style> more damage every time it passes through an enemy."); } } } } } internal class SuppressiveFire { public static void Apply() { Hook(); } protected static void Hook() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown FireBarrage.OnEnter += new hook_OnEnter(FireBarrage_OnEnter); } private static void FireBarrage_OnEnter(orig_OnEnter orig, FireBarrage self) { FireBarrage.baseBulletCount = 8; orig.Invoke(self); } } internal class TacticalDive { public static void Apply() { ChangeSkillDef(); Hook(); } protected static void Hook() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown DodgeState.OnEnter += new hook_OnEnter(OnDodgeStateEnter); } private static void OnDodgeStateEnter(orig_OnEnter orig, DodgeState self) { ((Component)((EntityState)self).outer).GetComponent<CharacterBody>().AddTimedBuff(Buffs.ArmorBoost, self.duration); orig.Invoke(self); } protected static void ChangeSkillDef() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject allBodyPrefab in BodyCatalog.allBodyPrefabs) { if (((Object)allBodyPrefab).name != "CommandoBody") { continue; } Variant[] variants = allBodyPrefab.GetComponent<SkillLocator>().utility.skillFamily.variants; for (int i = 0; i < variants.Length; i++) { SkillDef skillDef = variants[i].skillDef; if (skillDef.skillNameToken == "COMMANDO_UTILITY_NAME") { LanguageAPI.Add(skillDef.skillDescriptionToken, "<style=cIsUtility>Roll</style> a short distance. You gain <style=cIsUtility>armor while rolling</style>."); skillDef.baseRechargeInterval = 3f; } } } } } internal class FragGrenade { public static void Apply() { ChangeSkillDef(); ChangeProj(); Hook(); } protected static void Hook() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown GenericProjectileBaseState.OnEnter += new hook_OnEnter(GenericProjectileBaseState_OnEnter); } protected static void ChangeSkillDef() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject allBodyPrefab in BodyCatalog.allBodyPrefabs) { if (((Object)allBodyPrefab).name != "CommandoBody") { continue; } Variant[] variants = allBodyPrefab.GetComponent<SkillLocator>().special.skillFamily.variants; for (int i = 0; i < variants.Length; i++) { SkillDef skillDef = variants[i].skillDef; if (skillDef.skillNameToken == "COMMANDO_SPECIAL_ALT1_NAME") { skillDef.keywordTokens = new string[1] { "KEYWORD_IGNITE" }; LanguageAPI.Add(skillDef.skillDescriptionToken, "<style=cIsDamage>Ignite</style>. Throw a grenade that explodes for <style=cIsDamage>600% damage</style>. Explodes on enemy contact. Can hold up to 2."); } } } } protected static void GenericProjectileBaseState_OnEnter(orig_OnEnter orig, GenericProjectileBaseState self) { if (self is ThrowGrenade) { self.damageCoefficient = 6f; } orig.Invoke(self); } protected static void ChangeProj() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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) GameObject projectilePrefab = ProjectileCatalog.GetProjectilePrefab(ProjectileCatalog.FindProjectileIndex("CommandoGrenadeProjectile")); ProjectileImpactExplosion component = projectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).falloffModel = (FalloffModel)0; component.destroyOnEnemy = true; component.detonateOnEnemy = true; projectilePrefab.GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)128); SphereCollider component2 = projectilePrefab.GetComponent<SphereCollider>(); component2.radius *= 1.5f; } } }