public override void ProcessTriggers(TriggersSet triggersSet)
        {
            if (OrchidMod.AlchemistCatalystHotKey.JustPressed && player.itemAnimation == 0)
            {
                for (int i = 0; i < Main.maxInventory; i++)
                {
                    Item item = Main.LocalPlayer.inventory[i];
                    if (item.type != 0)
                    {
                        OrchidModGlobalItem orchidItem = item.GetGlobalItem <OrchidModGlobalItem>();
                        if (orchidItem.alchemistCatalyst)
                        {
                            this.originalSelectedItem   = player.selectedItem;
                            this.autoRevertSelectedItem = true;
                            player.selectedItem         = i;
                            player.controlUseItem       = true;
                            player.ItemCheck(player.whoAmI);
                            return;
                        }
                    }
                }
            }

            if (OrchidMod.AlchemistReactionHotKey.JustPressed)
            {
                if (this.alchemistNbElements < 2 || player.FindBuffIndex(mod.BuffType("ReactionCooldown")) > -1)
                {
                    return;
                }
                else
                {
                    AlchemistHiddenReactionHelper.triggerAlchemistReaction(mod, player, this);
                }
            }
        }
Exemple #2
0
        public override bool UseItem(Player player)
        {
            OrchidModPlayer modPlayer = player.GetModPlayer <OrchidModPlayer>();

            AlchemistHiddenReactionHelper.triggerAlchemistReaction(mod, player, modPlayer);
            return(true);
        }
Exemple #3
0
        public string checkUniqueHints(Player player, OrchidModPlayer modPlayer, bool buttonClicked)
        {
            List <string> reactions = new List <string>(modPlayer.alchemistKnownReactions);

            reactions.AddRange(modPlayer.alchemistKnownHints);

            if (!reactions.Contains("RecipeFireSpores") ||
                !reactions.Contains("RecipeWaterSpores") ||
                !reactions.Contains("RecipeAirSpores"))
            {
                if (buttonClicked)
                {
                    AlchemistHiddenReactionHelper.addAlchemistHint(player, modPlayer, -3, false);
                    AlchemistHiddenReactionHelper.addAlchemistHint(player, modPlayer, -3, false);
                    AlchemistHiddenReactionHelper.addAlchemistHint(player, modPlayer, -3, false);
                }
                return("Since this is your first time asking, here are three hints for the price of one! I'd highly advise getting your hands on a hidden reactions codex, now...");
            }

            if (!reactions.Contains("RecipeMushroomThread") &&
                (player.HasItem(183) || player.HasItem(ModContent.ItemType <Alchemist.Weapons.Nature.GlowingMushroomVial>())))
            {
                if (buttonClicked)
                {
                    AlchemistHiddenReactionHelper.addAlchemistHint(player, modPlayer, -2, false);
                }
                return("I see you found some glowing mushrooms. Did you know that you can make a pretty good thread with them? Here's the recipe.");
            }

            if (!reactions.Contains("RecipeJungleLilyPurification") &&
                (player.HasItem(ModContent.ItemType <Content.Items.Materials.JungleLily>()) || player.HasItem(ModContent.ItemType <Alchemist.Weapons.Nature.JungleLilyFlask>())))
            {
                if (buttonClicked)
                {
                    AlchemistHiddenReactionHelper.addAlchemistHint(player, modPlayer, -4, false);
                }
                return("Jungle lilies, I love these flowers! I bet you're wondering how to make them bloom ain't you? Here's the solution.");
            }

            return("");
        }