using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Alexandria.ItemAPI;
using BepInEx;
using Daxmod;
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("Mod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Mod")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d6d7a494-722e-4763-959b-c2d6b6a42b01")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Mod
{
public class ExamplePassive : PassiveItem
{
public static void Register()
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Expected O, but got Unknown
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
string text = "Weird Bell";
string text2 = "Daxmod/Resources/example_item_sprite";
GameObject val = new GameObject(text);
ExamplePassive examplePassive = val.AddComponent<ExamplePassive>();
ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
string text3 = "Example Short Desc.";
string text4 = "Example Long Description\n\nWow this description is really looooooooooong!";
ItemBuilder.SetupItem((PickupObject)(object)examplePassive, text3, text4, "example");
ItemBuilder.AddPassiveStatModifier((PickupObject)(object)examplePassive, (StatType)3, 1f, (ModifyMethod)0);
ItemBuilder.AddPassiveStatModifier((PickupObject)(object)examplePassive, (StatType)4, 1f, (ModifyMethod)0);
((PickupObject)examplePassive).quality = (ItemQuality)2;
}
public override void Pickup(PlayerController player)
{
((PassiveItem)this).Pickup(player);
Module.Log("Player picked up " + ((PickupObject)this).DisplayName);
}
public override void DisableEffect(PlayerController player)
{
Module.Log("Player dropped or got rid of " + ((PickupObject)this).DisplayName);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("fridgenstuffs.etg.dax_custom_character", "Dax Mod", "2.0.0")]
public class Module : BaseUnityPlugin
{
public const string GUID = "fridgenstuffs.etg.dax_custom_character";
public const string NAME = "Dax Mod";
public const string VERSION = "2.0.0";
public const string TEXT_COLOR = "#7b09ed";
public void Start()
{
ETGModMainBehaviour.WaitForGameManagerStart((Action<GameManager>)GMStart);
}
public void GMStart(GameManager g)
{
weirdbell.init();
Log("Dax Mod v2.0.0 started successfully.", "#7b09ed");
}
public static void Log(string text, string color = "#FFFFFF")
{
ETGModConsole.Log((object)("<color=" + color + ">" + text + "</color>"), false);
}
}
}
namespace Daxmod
{
internal class weirdbell : PassiveItem
{
public static int itemID;
public List<string> Wizurds = new List<string>
{
"4d37ce3d666b4ddda8039929225b7ede", "abfb454340294a0992f4173d6e5898a8", "c4fba8def15e47b297865b18e36cbef8", "9b2cf2949a894599917d4d391a0b7394", "56fb939a434140308b8f257f0f447829", "14ea47ff46b54bb4a98f91ffcffb656d", "78eca975263d4482a4bfa4c07b32e252", "c182a5cb704d460d9d099a47af49c913", "479556d05c7c44f3b6abb3b2067fc778", "a9cc6a4e9b3d46ea871e70a03c9f77d4",
"fc809bd43a4d41738a62d7565456622c", "ed37fa13e0fa4fcf8239643957c51293", "116d09c26e624bca8cca09fc69c714b3", "8bb5578fba374e8aae8e10b754e61d62", "7f665bd7151347e298e4d366f8818284", "3e98ccecf7334ff2800188c417e67c15", "475c20c1fd474dfbad54954e7cba29c1", "d8d651e3484f471ba8a2daa4bf535ce6", "a400523e535f41ac80a43ff6b06dc0bf", "02a14dec58ab45fb8aacde7aacd25b01",
"699cd24270af4cd183d671090d8323a1", "43426a2e39584871b287ac31df04b544", "df7fb62405dc4697b7721862c7b6b3cd", "05891b158cd542b1a5f3df30fb67a7ff", "6b7ef9e5d05b4f96b04f05ef4a0d1b18", "b5e699a0abb94666bda567ab23bd91c4", "31a3ea0c54a745e182e22ea54844a82d", "b1540990a4f1480bbcb3bea70d67f60d", "37340393f97f41b2822bc02d14654172", "ec8ea75b557d4e7b8ceeaacdf6f8238c",
"21dd14e5ca2a4a388adab5b11b69a1e1", "1398aaccb26d42f3b998c367b7800b85", "9044d8e4431f490196ba697927a4e3d4", "c0260c286c8d4538a697c5bf24976ccf", "6ad1cafc268f4214a101dca7af61bc91", "eeb33c3a5a8e4eaaaaf39a743e8767bc", "d1c9781fdac54d9e8498ed89210a0238", "af84951206324e349e1f13f9b7b60c1a", "1386da0f42fb4bcabc5be8feb16a7c38", "6450d20137994881aff0ddd13e3d40c8",
"d8fd592b184b4ac9a3be217bc70912a2"
};
public static void init()
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Expected O, but got Unknown
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
string text = "Weird Bell";
string text2 = "Daxmod/Resources/weirdbellsprite";
GameObject val = new GameObject(text);
weirdbell weirdbell2 = val.AddComponent<weirdbell>();
ItemBuilder.AddSpriteToObject(text, text2, val, (Assembly)null);
string text3 = "Makes faces at you";
string text4 = "A weird silver bell. Don't drop it!\n\nA strange bauble brought to the Gungeon by a yet stranger blue creature that channels transmogrification into bullets. It seems to look at you with remorse.";
ItemBuilder.SetupItem((PickupObject)(object)weirdbell2, text3, text4, "bel");
ItemBuilder.AddPassiveStatModifier((PickupObject)(object)weirdbell2, (StatType)14, 1f, (ModifyMethod)0);
((PickupObject)weirdbell2).quality = (ItemQuality)3;
}
public override void Pickup(PlayerController player)
{
player.PostProcessProjectile += Player_PostProcessProjectile;
((PassiveItem)this).Pickup(player);
}
private void Player_PostProcessProjectile(Projectile projectile, float arg2)
{
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Expected O, but got Unknown
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Unknown result type (might be due to invalid IL or missing references)
int num = Random.Range(1, 17);
if (num == 1)
{
projectile.OnHitEnemy = (Action<Projectile, SpeculativeRigidbody, bool>)Delegate.Combine(projectile.OnHitEnemy, new Action<Projectile, SpeculativeRigidbody, bool>(HandleHitEnemy));
((BraveBehaviour)projectile).sprite.color = Color.blue;
((BraveBehaviour)projectile).sprite.usesOverrideMaterial = true;
Material val = new Material(((BraveBehaviour)((BraveBehaviour)EnemyDatabase.GetOrLoadByName("GunNut")).sprite).renderer.material);
val.SetColor("_EmissiveColor", Color32.op_Implicit(new Color32((byte)30, (byte)30, (byte)197, byte.MaxValue)));
val.SetFloat("_EmissiveColorPower", 6f);
val.SetFloat("_EmissivePower", 4f);
}
}
private void HandleHitEnemy(Projectile arg1, SpeculativeRigidbody arg2, bool arg3)
{
if ((Object)(object)arg2 != (Object)null && (Object)(object)((BraveBehaviour)arg2).aiActor != (Object)null && (!((BraveBehaviour)arg2).healthHaver.IsBoss || ((BraveBehaviour)arg2).aiActor.EnemyGuid != "465da2bb086a4a88a803f79fe3a27677") && !((BraveBehaviour)arg2).aiActor.IsTransmogrified)
{
int num = Random.Range(1, 11);
if (num <= 6)
{
((BraveBehaviour)arg2).aiActor.Transmogrify(EnemyDatabase.GetOrLoadByGuid("76bc43539fc24648bff4568c75c686d1"), (GameObject)null);
}
else
{
((MonoBehaviour)this).StartCoroutine(delayTransmog(((BraveBehaviour)arg2).aiActor));
}
}
}
public override void Update()
{
try
{
if (!((Object)(object)((PassiveItem)this).Owner != (Object)null))
{
}
}
catch
{
}
((PassiveItem)this).Update();
}
private IEnumerator delayTransmog(AIActor aiactor)
{
yield return (object)new WaitForSeconds(0.01f);
int lineitem = Random.Range(0, Wizurds.Count);
string guid = Wizurds[lineitem];
aiactor.Transmogrify(EnemyDatabase.GetOrLoadByGuid(guid), (GameObject)null);
((BraveBehaviour)aiactor).healthHaver.SetHealthMaximum(((BraveBehaviour)aiactor).healthHaver.GetCurrentHealth() * 1.5f, (float?)0f, true);
}
public override DebrisObject Drop(PlayerController Player)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
((BraveBehaviour)Player).healthHaver.Die(Vector2.zero);
return ((PassiveItem)this).Drop(Player);
}
}
}