Terraria.Player.TryGettingDevArmor C# (CSharp) Method

TryGettingDevArmor() private method

private TryGettingDevArmor ( ) : void
return void
        private void TryGettingDevArmor()
        {
            if (Main.rand.Next(20) != 0)
                return;
            Main.rand.Next(7);
            switch (Main.rand.Next(12))
            {
                case 0:
                    this.QuickSpawnItem(666, 1);
                    this.QuickSpawnItem(667, 1);
                    this.QuickSpawnItem(668, 1);
                    this.QuickSpawnItem(665, 1);
                    break;
                case 1:
                    this.QuickSpawnItem(1554, 1);
                    this.QuickSpawnItem(1555, 1);
                    this.QuickSpawnItem(1556, 1);
                    this.QuickSpawnItem(1586, 1);
                    break;
                case 2:
                    this.QuickSpawnItem(1587, 1);
                    this.QuickSpawnItem(1588, 1);
                    this.QuickSpawnItem(1586, 1);
                    break;
                case 3:
                    this.QuickSpawnItem(1557, 1);
                    this.QuickSpawnItem(1558, 1);
                    this.QuickSpawnItem(1559, 1);
                    this.QuickSpawnItem(1585, 1);
                    break;
                case 4:
                    this.QuickSpawnItem(1560, 1);
                    this.QuickSpawnItem(1561, 1);
                    this.QuickSpawnItem(1562, 1);
                    this.QuickSpawnItem(1584, 1);
                    break;
                case 5:
                    this.QuickSpawnItem(1563, 1);
                    this.QuickSpawnItem(1564, 1);
                    this.QuickSpawnItem(1565, 1);
                    this.QuickSpawnItem(3582, 1);
                    break;
                case 6:
                    this.QuickSpawnItem(1566, 1);
                    this.QuickSpawnItem(1567, 1);
                    this.QuickSpawnItem(1568, 1);
                    break;
                case 7:
                    this.QuickSpawnItem(1580, 1);
                    this.QuickSpawnItem(1581, 1);
                    this.QuickSpawnItem(1582, 1);
                    this.QuickSpawnItem(1583, 1);
                    break;
                case 8:
                    this.QuickSpawnItem(3226, 1);
                    this.QuickSpawnItem(3227, 1);
                    this.QuickSpawnItem(3228, 1);
                    break;
                case 9:
                    this.QuickSpawnItem(3583, 1);
                    this.QuickSpawnItem(3581, 1);
                    this.QuickSpawnItem(3578, 1);
                    this.QuickSpawnItem(3579, 1);
                    this.QuickSpawnItem(3580, 1);
                    break;
                case 10:
                    this.QuickSpawnItem(3585, 1);
                    this.QuickSpawnItem(3586, 1);
                    this.QuickSpawnItem(3587, 1);
                    this.QuickSpawnItem(3588, 1);
                    this.QuickSpawnItem(3024, 4);
                    break;
                case 11:
                    this.QuickSpawnItem(3589, 1);
                    this.QuickSpawnItem(3590, 1);
                    this.QuickSpawnItem(3591, 1);
                    this.QuickSpawnItem(3592, 1);
                    this.QuickSpawnItem(3599, 4);
                    break;
            }
        }

Usage Example

Example #1
0
		public override void OpenBossBag(Player player)
		{
			player.TryGettingDevArmor();
			player.TryGettingDevArmor();
			int choice = Main.rand.Next(7);
			if (choice == 0)
			{
				player.QuickSpawnItem(mod.ItemType("PuritySpiritMask"));
			}
			else if (choice == 1)
			{
				player.QuickSpawnItem(mod.ItemType("BunnyMask"));
			}
			if (choice != 1)
			{
				player.QuickSpawnItem(ItemID.Bunny);
			}
			player.QuickSpawnItem(mod.ItemType("PurityShield"));
		}
All Usage Examples Of Terraria.Player::TryGettingDevArmor
Player