コード例 #1
0
ファイル: MinerHelmet.cs プロジェクト: blazeykat/prismatism
 private void AWholeNewWorld(PlayerController player)
 {
     ThanksGame = !ThanksGame;
     if (ThanksGame && player)
     {
         LootEngine.GivePrefabToPlayer(PickupObjectDatabase.GetRandomGun().gameObject, player);
     }
 }
コード例 #2
0
        private void ShootRandomProjectile(PlayerController player)
        {
            Gun randomGun;
            int pickupObjectId;

            do
            {
                randomGun      = PickupObjectDatabase.GetRandomGun();
                pickupObjectId = randomGun.PickupObjectId;
            }while (randomGun.HasShootStyle(ProjectileModule.ShootStyle.Beam));
            Projectile bullet = randomGun.DefaultModule.projectiles[0];

            player.HandleProjectile(bullet.baseData.speed, bullet.baseData.damage, pickupObjectId, false, Vector2.zero);
        }
コード例 #3
0
ファイル: Bugun.cs プロジェクト: Some-Bunny/BunnyMod-1.15
        public static void ThisIsBasicallyCelsRNGUNButTakenToASillyLevel()
        {
            Gun randomGun = PickupObjectDatabase.GetRandomGun();

            Bugun.bugun.muzzleFlashEffects = randomGun.muzzleFlashEffects;
            Bugun.bugun.gunSwitchGroup     = randomGun.gunSwitchGroup;
            //GunExt.AddProjectileModuleFrom(randomGun, PickupObjectDatabase.GetRandomGun(), true, false);
            Material material     = bugun.sprite.renderer.material;
            float    fuckedupness = UnityEngine.Random.Range(0.07f, 0.35f);

            material.shader = ShaderCache.Acquire("Brave/Internal/Glitch");
            material.SetFloat("_GlitchInterval", fuckedupness);
            material.SetFloat("_DispProbability", fuckedupness);
            material.SetFloat("_DispIntensity", fuckedupness);
            material.SetFloat("_ColorProbability", fuckedupness);
            material.SetFloat("_ColorIntensity", fuckedupness);
        }
コード例 #4
0
ファイル: RGG.cs プロジェクト: UnstableStrafe/CelsItems
        public static void RandomizeStats()
        {
            RGG.rng_gun.reloadTime                 = (Random.Range(.5f, 1.3f));
            RGG.rng_gun.DefaultModule.ammoCost     = Random.Range(1, 4);
            RGG.rng_gun.DefaultModule.cooldownTime = (Random.Range(.08f, 0.65f));
            RGG.rng_gun.SetBaseMaxAmmo((Random.Range(100, 651)));
            RGG.rng_gun.DefaultModule.numberOfShotsInClip = (Random.Range(6, 101));
            RGG.Dmg = (Random.Range(5.5f, 12f));
            RGG.rng_gun.DefaultModule.projectiles[0].baseData.damage *= (RGG.Dmg / 5.5f);
            RGG.PspD = (Random.Range(12f, 50f));
            RGG.rng_gun.DefaultModule.projectiles[0].baseData.speed *= (RGG.PspD / 23f);
            RGG.Frc = (Random.Range(4f, 69f));
            RGG.rng_gun.DefaultModule.projectiles[0].baseData.force *= (RGG.Frc / 9f);
            RGG.GltInt   = (Random.Range(0.03f, 0.1f));
            RGG.DisProb  = (Random.Range(0.15f, 0.5f));
            RGG.DisInten = (Random.Range(0.01f, 0.05f));
            RGG.ClrProb  = (Random.Range(0.15f, 0.5f));
            RGG.ClrInten = (Random.Range(0.01f, 0.05f));
            Gun gun2 = PickupObjectDatabase.GetRandomGun() as Gun;

            RGG.rng_gun.muzzleFlashEffects = gun2.muzzleFlashEffects;
        }
コード例 #5
0
        private void StartEffect(PlayerController user)
        {
            this.CanBeDropped = false;
            this.CanBeSold    = false;
            Gun Gun;
            int attempts = 10;

            do
            {
                Gun = PickupObjectDatabase.GetRandomGun();
                attempts--;
            } while (attempts > 0 && user.HasGun(Gun.PickupObjectId));

            if (attempts == 0)
            {
                Gun = PickupObjectDatabase.GetById(734) as Gun;
            }

            this.m_extantGun = user.inventory.AddGunToInventory(Gun, true);
            this.m_extantGun.CanBeDropped = false;
            this.m_extantGun.CanBeSold    = false;
            user.inventory.GunLocked.SetOverride("acme gun", true, null);
        }
コード例 #6
0
        // Token: 0x060001C4 RID: 452 RVA: 0x00012A0C File Offset: 0x00010C0C
        public static void Accept(PlayerController player, GameObject shrine)
        {
            AkSoundEngine.PostEvent("Play_VO_lichA_cackle_01", shrine);
            string header = "Chaos has consumed you!";

            shrine.GetComponent <ShrineFactory.CustomShrineController>().numUses++;
            int  num3  = UnityEngine.Random.Range(0, 4);
            bool flag3 = num3 == 0;

            if (flag3)
            {
                AkSoundEngine.PostEvent("Play_OBJ_weapon_pickup_01", shrine);
                ApplyStat(player, PlayerStats.StatType.Damage, UnityEngine.Random.Range(1.15f, 1.35f), StatModifier.ModifyMethod.MULTIPLICATIVE);
                ApplyStat(player, PlayerStats.StatType.Health, 1f, StatModifier.ModifyMethod.ADDITIVE);
                if (player.characterIdentity == PlayableCharacters.Robot)
                {
                    player.healthHaver.Armor += 2f;
                }
                int num = 2;
                Gun gun;
                do
                {
                    gun = PickupObjectDatabase.GetRandomGun();
                    num--;
                }while (num > 0 && player.HasGun(gun.PickupObjectId));
                bool flag = num == 0;
                if (flag)
                {
                    gun = (Game.Items["bny:chaos_malice"] as Gun);
                }
                ChaosCorruptionShrine.m_extantGun = player.inventory.AddGunToInventory(gun, true);
                ChaosCorruptionShrine.m_extantGun.CanBeDropped = false;
                ChaosCorruptionShrine.m_extantGun.CanBeSold    = false;
                bool modualrpog = player.HasPickupID(Game.Items["bny:modular_weapon_chip"].PickupObjectId);
                if (!modualrpog)
                {
                    player.inventory.GunLocked.SetOverride("chaos curse", true, null);
                }
                player.gameObject.AddComponent <DeathHowl>();
                string text = "The Gungeon roars...";
                ChaosCorruptionShrine.Notify(header, text);
            }
            bool flag4 = num3 == 1;

            if (flag4)
            {
                ApplyStat(player, PlayerStats.StatType.Curse, -2f, StatModifier.ModifyMethod.ADDITIVE);
                ApplyStat(player, PlayerStats.StatType.Coolness, 2f, StatModifier.ModifyMethod.ADDITIVE);
                if (!GameManager.HasInstance || !GameManager.Instance.BestActivePlayer || GameManager.Instance.BestActivePlayer.CurrentRoom == null)
                {
                    return;
                }
                GameObject           superReaper = PrefabDatabase.Instance.SuperReaper;
                Vector2              vector      = GameManager.Instance.BestActivePlayer.CurrentRoom.GetRandomVisibleClearSpot(2, 2).ToVector2();
                SpeculativeRigidbody component   = superReaper.GetComponent <SpeculativeRigidbody>();
                if (component)
                {
                    PixelCollider primaryPixelCollider = component.PrimaryPixelCollider;
                    Vector2       a       = PhysicsEngine.PixelToUnit(new IntVector2(primaryPixelCollider.ManualOffsetX, primaryPixelCollider.ManualOffsetY));
                    Vector2       vector2 = PhysicsEngine.PixelToUnit(new IntVector2(primaryPixelCollider.ManualWidth, primaryPixelCollider.ManualHeight));
                    Vector2       vector3 = new Vector2((float)Mathf.CeilToInt(vector2.x), (float)Mathf.CeilToInt(vector2.y));
                    Vector2       b       = new Vector2((vector3.x - vector2.x) / 2f, 0f).Quantize(0.0625f);
                    vector -= a - b;
                }
                UnityEngine.Object.Instantiate <GameObject>(superReaper, vector.ToVector3ZUp(0f), Quaternion.identity);
                string text = "The Gungeon cackles...";
                ChaosCorruptionShrine.Notify(header, text);
            }
            bool flag5 = num3 == 2;

            if (flag5)
            {
                float num = 0f;
                ApplyStat(player, PlayerStats.StatType.Damage, 1.25f, StatModifier.ModifyMethod.MULTIPLICATIVE);
                ApplyStat(player, PlayerStats.StatType.DamageToBosses, 1.25f, StatModifier.ModifyMethod.MULTIPLICATIVE);
                num = (player.stats.GetStatValue(PlayerStats.StatType.Health));
                ApplyStat(player, PlayerStats.StatType.Health, (-num) + 1, StatModifier.ModifyMethod.ADDITIVE);
                player.gameObject.AddComponent <OopsAllMasterRounds>();
                string text = "The Gungeon trembles...";
                ChaosCorruptionShrine.Notify(header, text);
            }
            bool flag6 = num3 == 3;

            if (flag6)
            {
                string text = "The Gungeon shifts...";
                ChaosCorruptionShrine.Notify(header, text);
                if (GameManager.Instance.Dungeon.IsGlitchDungeon)
                {
                    GameManager.Instance.InjectedFlowPath = "Core Game Flows/Secret_DoubleBeholster_Flow";
                }
                if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.CASTLEGEON)
                {
                    GameManager.Instance.LoadCustomLevel("tt_castle");
                }
                else if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.SEWERGEON)
                {
                    GameManager.Instance.LoadCustomLevel("tt_sewer");
                }
                else if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.GUNGEON)
                {
                    GameManager.Instance.LoadCustomLevel("tt5");
                }
                else if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.CATHEDRALGEON)
                {
                    GameManager.Instance.LoadCustomLevel("tt_cathedral");
                }
                else if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.MINEGEON)
                {
                    GameManager.Instance.LoadCustomLevel("tt_mines");
                }
                else if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.CATACOMBGEON)
                {
                    GameManager.Instance.LoadCustomLevel("tt_catacombs");
                }
                else if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.FORGEGEON)
                {
                    GameManager.Instance.LoadCustomLevel("tt_forge");
                }
                else if (GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.HELLGEON)
                {
                    GameManager.Instance.LoadCustomLevel("tt_bullethell");
                }
                else
                {
                    IntVector2 bestRewardLocation = player.CurrentRoom.GetBestRewardLocation(IntVector2.One * 3, RoomHandler.RewardLocationStyle.PlayerCenter, true);
                    Chest      rainbow_Chest      = GameManager.Instance.RewardManager.Rainbow_Chest;
                    rainbow_Chest.IsLocked = false;
                    Chest.Spawn(rainbow_Chest, bestRewardLocation);
                    //f**k you im not changing the reward lol
                }
            }
            bool flag7 = num3 == 4;

            if (flag7)
            {
                string text = "The Gungeon screeches...";
                ChaosCorruptionShrine.Notify(header, text);
            }
        }
コード例 #7
0
 private static void WindowFunction(int windowID)
 {
     if (windowID == 0)
     {
         GUILayout.BeginArea(new Rect(5f, 15f, 290f, 400f));
         GUILayout.Label(string.Format("Current Actor Name: {0}", GameManager.Instance.PrimaryPlayer.ActorName), new GUILayoutOption[0]);
         GUILayout.Label(string.Format("Current Gun Name: {0}", GameManager.Instance.PrimaryPlayer.CurrentGun.name), new GUILayoutOption[0]);
         if (GUILayout.Button(string.Format("Stealthed {0}", GameManager.Instance.PrimaryPlayer.IsStealthed ? "On" : "Off"), new GUILayoutOption[0]))
         {
             if (GameManager.Instance.PrimaryPlayer.IsStealthed)
             {
                 GameManager.Instance.PrimaryPlayer.gameActor.SetIsStealthed(false, "box");
             }
             else
             {
                 GameManager.Instance.PrimaryPlayer.gameActor.SetIsStealthed(true, "box");
             }
         }
         if (GUILayout.Button(string.Format("Clear Floor", new object[0]), new GUILayoutOption[0]))
         {
             GameManager.Instance.Dungeon.FloorCleared();
         }
         if (GUILayout.Button(string.Format("Heal All Players", new object[0]), new GUILayoutOption[0]))
         {
             for (int i = 0; i < GameManager.Instance.AllPlayers.Length; i++)
             {
                 if (GameManager.Instance.AllPlayers[i].healthHaver.IsAlive)
                 {
                     GameManager.Instance.AllPlayers[i].healthHaver.FullHeal();
                 }
             }
         }
         if (GUILayout.Button(string.Format("Change to Random Gun", new object[0]), new GUILayoutOption[0]))
         {
             GameManager.Instance.PrimaryPlayer.inventory.AddGunToInventory(PickupObjectDatabase.GetRandomGun(), true);
         }
         if (GUILayout.Button(string.Format("Add 100 currency", new object[0]), new GUILayoutOption[0]))
         {
             GameStatsManager.Instance.RegisterStatChange(TrackedStats.META_CURRENCY, 100f);
             GameManager.Instance.PrimaryPlayer.carriedConsumables.Currency += 100;
         }
         if (GUILayout.Button(string.Format("Unlimited Ammo {0}", ModMenu.unlimAmmo ? "On" : "Off"), new GUILayoutOption[0]))
         {
             ModMenu.unlimAmmo = !ModMenu.unlimAmmo;
         }
         if (GUILayout.Button(string.Format("Destroy Enemy Bullets", new object[0]), new GUILayoutOption[0]))
         {
             SilencerInstance.DestroyBulletsInRange(GameManager.Instance.PrimaryPlayer.transform.PositionVector2(), 100f, true, false, null, false, null, false, null);
         }
         if (GUILayout.Button(string.Format("Teleport Hax {0}", ModMenu.teleportHax ? "On" : "Off"), new GUILayoutOption[0]))
         {
             ModMenu.teleportHax = !ModMenu.teleportHax;
         }
         if (GUILayout.Button(string.Format("Spawn Currency", new object[0]), new GUILayoutOption[0]))
         {
             LootEngine.SpawnCurrency(GameManager.Instance.PrimaryPlayer.CenterPosition, 1000, false);
         }
         if (GUILayout.Button(string.Format("Can always steal {0}", ModMenu.canAlwaysSteal ? "On" : "Off"), new GUILayoutOption[0]))
         {
             ModMenu.canAlwaysSteal = !ModMenu.canAlwaysSteal;
         }
         if (GUILayout.Button(string.Format("Add Ammo Automatically {0}", ModMenu.addAmmoAutomatically ? "On" : "Off"), new GUILayoutOption[0]))
         {
             ModMenu.addAmmoAutomatically = !ModMenu.addAmmoAutomatically;
         }
         if (GUILayout.Button(string.Format("Auto Heal {0}", ModMenu.autoHeal ? "On" : "Off"), new GUILayoutOption[0]))
         {
             ModMenu.autoHeal = !ModMenu.autoHeal;
         }
         if (GUILayout.Button(string.Format("Increase Base Ammo", new object[0]), new GUILayoutOption[0]))
         {
             GameManager.Instance.PrimaryPlayer.CurrentGun.SetBaseMaxAmmo(10000);
         }
         GUILayout.EndArea();
     }
     if (windowID == 1)
     {
         GUILayout.BeginArea(new Rect(5f, 15f, 290f, 400f));
         ModMenu.scrollViewVector = GUILayout.BeginScrollView(ModMenu.scrollViewVector, new GUILayoutOption[]
         {
             GUILayout.Width(280f),
             GUILayout.Height(380f)
         });
         if (GameManager.Instance.PrimaryPlayer.inventory.AllGuns != null)
         {
             for (int j = 0; j < GameManager.Instance.PrimaryPlayer.inventory.AllGuns.Count; j++)
             {
                 if (GUILayout.Button(string.Format("Get Ammo for {0}", GameManager.Instance.PrimaryPlayer.inventory.AllGuns[j].DisplayName), ModMenu.BtnStyle, new GUILayoutOption[0]))
                 {
                     GameManager.Instance.PrimaryPlayer.inventory.AllGuns[j].GainAmmo(1000);
                 }
                 GUILayout.Label(string.Concat(new object[]
                 {
                     "Gun Name: ",
                     GameManager.Instance.PrimaryPlayer.inventory.AllGuns[j].name,
                     "\nDisplay Name: ",
                     GameManager.Instance.PrimaryPlayer.inventory.AllGuns[j].DisplayName,
                     "\nGun Ammo: ",
                     GameManager.Instance.PrimaryPlayer.inventory.AllGuns[j].ammo,
                     "\n================"
                 }), new GUILayoutOption[0]);
             }
         }
         GUILayout.EndScrollView();
         GUILayout.EndArea();
     }
     if (windowID == 2)
     {
         GUILayout.BeginArea(new Rect(5f, 15f, 490f, 400f));
         ModMenu.scrollViewVector2 = GUILayout.BeginScrollView(ModMenu.scrollViewVector2, new GUILayoutOption[]
         {
             GUILayout.Width(480f),
             GUILayout.Height(380f)
         });
         int count = PickupObjectDatabase.Instance.Objects.Count;
         for (int k = 0; k < PickupObjectDatabase.Instance.Objects.Count; k++)
         {
             if (PickupObjectDatabase.Instance.Objects[k] != null && PickupObjectDatabase.Instance.Objects[k] is Gun)
             {
                 EncounterTrackable component = PickupObjectDatabase.Instance.Objects[k].GetComponent <EncounterTrackable>();
                 if (component && component.PrerequisitesMet())
                 {
                     if (GUILayout.Button(string.Format("Add {0} to your Inventory", PickupObjectDatabase.Instance.Objects[k].DisplayName), ModMenu.BtnStyle, new GUILayoutOption[0]))
                     {
                         GameManager.Instance.PrimaryPlayer.inventory.AddGunToInventory(PickupObjectDatabase.Instance.Objects[k] as Gun, true);
                     }
                     GUILayout.Label(string.Concat(new object[]
                     {
                         "Gun Name: ",
                         PickupObjectDatabase.Instance.Objects[k].name,
                         "\nDisplay Name: ",
                         PickupObjectDatabase.Instance.Objects[k].DisplayName,
                         "\nItem Quality: ",
                         PickupObjectDatabase.Instance.Objects[k].quality.ToString(),
                         "\n================"
                     }), new GUILayoutOption[0]);
                 }
             }
         }
         GUILayout.EndScrollView();
         GUILayout.EndArea();
     }
     if (windowID == 3)
     {
         GUILayout.BeginArea(new Rect(5f, 15f, 490f, 400f));
         ModMenu.scrollViewVector3 = GUILayout.BeginScrollView(ModMenu.scrollViewVector3, new GUILayoutOption[]
         {
             GUILayout.Width(480f),
             GUILayout.Height(380f)
         });
         for (int l = 0; l < PickupObjectDatabase.Instance.Objects.Count; l++)
         {
             if (PickupObjectDatabase.Instance.Objects[l] != null && PickupObjectDatabase.Instance.Objects[l] is PassiveItem)
             {
                 EncounterTrackable component2 = PickupObjectDatabase.Instance.Objects[l].GetComponent <EncounterTrackable>();
                 if (component2 && component2.PrerequisitesMet())
                 {
                     if (GUILayout.Button(string.Format("Add {0} to your Inventory", PickupObjectDatabase.Instance.Objects[l].DisplayName), ModMenu.BtnStyle, new GUILayoutOption[0]))
                     {
                         GameManager.Instance.PrimaryPlayer.AcquirePassiveItem(PickupObjectDatabase.Instance.Objects[l] as PassiveItem);
                     }
                     GUILayout.Label(string.Concat(new object[]
                     {
                         "Item Name: ",
                         PickupObjectDatabase.Instance.Objects[l].name,
                         "\nDisplay Name: ",
                         PickupObjectDatabase.Instance.Objects[l].DisplayName,
                         "\n================"
                     }), new GUILayoutOption[0]);
                 }
             }
         }
         GUILayout.EndScrollView();
         GUILayout.EndArea();
     }
 }
コード例 #8
0
ファイル: BloodyDice.cs プロジェクト: blazeykat/prismatism
        protected override void DoEffect(PlayerController user)
        {
            try
            {
                base.DoEffect(user);
                if (!user.PlayerHasActiveSynergy("Bloodthirsty") || !BoxOTools.BasicRandom(0.66f))
                {
                    user.healthHaver.ApplyDamage(0.5f, Vector2.zero, "Blood Sacrifice");
                }
                int num = (int)UnityEngine.Random.Range(1, user.PlayerHasActiveSynergy("Bloody D12") ? 13 : 7);
                user.BloopItemAboveHead(base.sprite);
                switch (num)
                {
                default:
                case 1:
                    BoxOTools.Notify("1", "Nothing Happened.", "katmod/Resources/Dice/bloodydie");
                    break;

                case 2:
                    BoxOTools.Notify("2", "+4 Casings.", "katmod/Resources/Dice/bloodydie");
                    user.carriedConsumables.Currency += 4;
                    break;

                case 3:
                    BoxOTools.Notify("3", "+1 Blank.", "katmod/Resources/Dice/bloodydie");
                    user.Blanks += 1;
                    break;

                case 4:
                    BoxOTools.Notify("4", "+1 Key.", "katmod/Resources/Dice/bloodydie");
                    user.carriedConsumables.KeyBullets += 1;
                    break;

                case 5:
                    if (user.specRigidbody.UnitCenter != null)
                    {
                        LootEngine.SpawnItem(PickupObjectDatabase.GetById(GlobalItemIds.SpreadAmmoPickup).gameObject, user.specRigidbody.UnitCenter, Vector2.zero, 1f);
                        BoxOTools.Notify("5", "Free spread ammo box", "katmod/Resources/Dice/bloodydie");
                    }
                    break;

                case 6:
                    if (user.specRigidbody.UnitCenter != null)
                    {
                        LootEngine.SpawnItem(PickupObjectDatabase.GetById(GlobalItemIds.AmmoPickup).gameObject, user.specRigidbody.UnitCenter, Vector2.zero, 1f);
                        BoxOTools.Notify("6", "Free ammo box", "katmod/Resources/Dice/bloodydie");
                    }
                    break;

                case 7:
                    LootEngine.GivePrefabToPlayer(PickupObjectDatabase.GetById(GlobalItemIds.Map).gameObject, user);
                    BoxOTools.Notify("7", "Floor Revealed", "katmod/Resources/Dice/bloodydie");
                    break;

                case 8:
                    LootEngine.GivePrefabToPlayer(LootEngine.GetItemOfTypeAndQuality <PickupObject>(ItemQuality.B, GameManager.Instance.RewardManager.ItemsLootTable, true).gameObject, user);
                    BoxOTools.Notify("8", "Free passive", "katmod/Resources/Dice/bloodydie");
                    break;

                case 9:
                    if (user)
                    {
                        user.inventory.AddGunToInventory(PickupObjectDatabase.GetRandomGun());
                        BoxOTools.Notify("9", "Free Gun", "katmod/Resources/Dice/bloodydie");
                    }
                    break;

                case 10:
                    if (user.CurrentRoom != null)
                    {
                        Chest chest = Chest.Spawn(GameManager.Instance.RewardManager.Synergy_Chest, new IntVector2?(user.CurrentRoom.GetRandomVisibleClearSpot(1, 1)).Value);
                        BoxOTools.Notify("10", "Free synergy chest", "katmod/Resources/Dice/bloodydie");
                    }
                    break;

                case 11:
                    if (user.CurrentRoom != null)
                    {
                        Chest chest = GameManager.Instance.RewardManager.SpawnTotallyRandomChest(new IntVector2?(user.CurrentRoom.GetRandomVisibleClearSpot(1, 1)).Value);
                        BoxOTools.Notify("11", "Free chest", "katmod/Resources/Dice/bloodydie");
                    }
                    break;

                case 12:
                    if (user.CurrentRoom != null)
                    {
                        Chest unlockedChest = GameManager.Instance.RewardManager.SpawnTotallyRandomChest(new IntVector2?(user.CurrentRoom.GetRandomVisibleClearSpot(1, 1)).Value);
                        unlockedChest.ForceUnlock();
                        BoxOTools.Notify("12", "Free unlocked chest", "katmod/Resources/Dice/bloodydie");
                    }
                    break;
                }
                AkSoundEngine.PostEvent("Play_OBJ_power_up_01", base.gameObject);
            }
            catch (Exception lerror)
            {
                ETGModConsole.Log(lerror.ToString());
            }
        }