private void OnEnemyDamaged(float damage, bool fatal, HealthHaver enemy) { XP += (int)damage; if (XP >= 1000 && Level < 5) { XP = 0; BoxOTools.Notify("LEVEL UP!", $"{Level + 1} => {Level + 2}", "katmod/Resources/Swarm/beeswarm", UINotificationController.NotificationColor.PURPLE); Level++; } if (enemy.specRigidbody != null && enemy.aiActor != null && base.Owner != null) { if (fatal) { //if (BoxOTools.BasicRandom(.9f - (Level / 100))) { int pick = UnityEngine.Random.Range(1, 4 + Drone.Level); switch (pick) { default: ETGModConsole.Log($"Unknown number {pick} appeared at {Level}, oopsy daisies"); LootEngine.SpawnItem(Gungeon.Game.Items["psm:whitesplode"].gameObject, enemy.specRigidbody.UnitCenter, Vector2.zero, 1f); break; case 1: LootEngine.SpawnItem(Gungeon.Game.Items["psm:whitesplode"].gameObject, enemy.specRigidbody.UnitCenter, Vector2.zero, 1f); break; case 2: LootEngine.SpawnItem(Gungeon.Game.Items["psm:redsplode"].gameObject, enemy.specRigidbody.UnitCenter, Vector2.zero, 1f); break; case 3: LootEngine.SpawnItem(Gungeon.Game.Items["psm:bluesplode"].gameObject, enemy.specRigidbody.UnitCenter, Vector2.zero, 1f); break; case 4: LootEngine.SpawnItem(Gungeon.Game.Items["psm:beesneak"].gameObject, enemy.specRigidbody.UnitCenter, Vector2.zero, 1f); break; case 5: LootEngine.SpawnItem(Gungeon.Game.Items["psm:whiteup"].gameObject, enemy.specRigidbody.UnitCenter, Vector2.zero, 1f); break; case 6: LootEngine.SpawnItem(Gungeon.Game.Items["psm:yvswarm"].gameObject, enemy.specRigidbody.UnitCenter, Vector2.zero, 1f); break; } } } } }
public override void Pickup(PlayerController player) { if (player.GetComponent <NuclearPlayerController>()) { NuclearPlayerController heSucks = player.GetComponent <NuclearPlayerController>(); if (heSucks.Shells + 8 > Mathf.FloorToInt(55 * player.stats.GetStatValue(PlayerStats.StatType.AmmoCapacityMultiplier))) { BoxOTools.Notify("AMMO BOX", "Max Shells", "katmod/Resources/V3MiscItems/ammocrate"); heSucks.Shells = Mathf.FloorToInt(55 * player.stats.GetStatValue(PlayerStats.StatType.AmmoCapacityMultiplier)); } else { BoxOTools.Notify("AMMO BOX", "+8 Shells", "katmod/Resources/V3MiscItems/ammocrate"); heSucks.Shells += 8; } } player.BloopItemAboveHead(this.sprite); AkSoundEngine.PostEvent("Play_OBJ_ammo_pickup_01", base.gameObject); UnityEngine.Object.Destroy(base.gameObject); }
public static void BasicPositiveEffectShit(string name, string lowerText, PlayerController player) { BoxOTools.Notify(name, lowerText, "katmod/Resources/Candies/happypilldude"); AkSoundEngine.PostEvent("Play_OBJ_metronome_jingle_01", player.gameObject); }
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()); } }