Пример #1
0
        public override void SetupShop(Chest shop, ref int nextSlot)
        {
            Player          player    = Main.player[Main.myPlayer];
            OrchidModPlayer modPlayer = player.GetModPlayer <OrchidModPlayer>();

            shop.item[nextSlot].SetDefaults(ItemType <Gambler.GamblerDummy>());
            nextSlot++;
            shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Chips.GamblingChip>());
            nextSlot++;
            shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Dice.GamblingDie>());
            nextSlot++;
            shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.ShuffleCard>());
            nextSlot++;

            if (!player.ZoneBeach && !player.ZoneCorrupt && !player.ZoneSkyHeight && !player.ZoneCrimson && !player.ZoneHoly && !player.ZoneJungle && !player.ZoneSnow && !player.ZoneDesert && !player.ZoneGlowshroom && player.ZoneOverworldHeight)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.ForestCard>());
                nextSlot++;
            }
            if (player.ZoneSnow)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.SnowCard>());
                nextSlot++;
            }
            if (player.ZoneDesert)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.DesertCard>());
                nextSlot++;
            }
            if (player.ZoneBeach)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.OceanCard>());
                nextSlot++;
            }
            if (player.ZoneJungle)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.JungleCard>());
                nextSlot++;
            }
            if (player.ZoneGlowshroom)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.MushroomCard>());
                nextSlot++;
            }
            if (player.ZoneUnderworldHeight)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.HellCard>());
                nextSlot++;
            }
            if (player.ZoneSkyHeight)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.SkyCard>());
                nextSlot++;
            }
            if (Main.slimeRain)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Weapons.Cards.SlimeRainCard>());
                nextSlot++;
            }

            if (OrchidModGamblerHelper.checkSetCardsInDeck(modPlayer, "Slime") > 2)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Accessories.SlimyLollipop>());
                nextSlot++;
            }
            if (OrchidModGamblerHelper.checkSetCardsInDeck(modPlayer, "Biome") > 2)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Accessories.LuckySprout>());
                nextSlot++;
            }
            if (OrchidModGamblerHelper.checkSetCardsInDeck(modPlayer, "Boss") > 2)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Accessories.ConquerorsPennant>());
                nextSlot++;
            }
            if (OrchidModGamblerHelper.checkSetCardsInDeck(modPlayer, "Elemental") > 2)
            {
                shop.item[nextSlot].SetDefaults(ItemType <Gambler.Accessories.ElementalLens>());
                nextSlot++;
            }
        }