public static void triggerAlchemistReactionEffects(AlchemistHiddenReactionRecipe recipe, Mod mod, Player player, OrchidModPlayer modPlayer)
        {
            recipe.recipeEffect(player, modPlayer);

            if (recipe.dust != 0)
            {
                for (int i = 0; i < 10; i++)
                {
                    int dust = Dust.NewDust(player.Center, 10, 10, recipe.dust);
                    Main.dust[dust].noGravity = true;
                    Main.dust[dust].velocity *= 2f;
                    Main.dust[dust].scale    *= 1.5f;
                }
            }

            if (recipe.buff != 0 && recipe.buffDuration != 0)
            {
                player.AddBuff(recipe.buff, 60 * recipe.buffDuration);
            }

            if (recipe.debuffDuration != 0)
            {
                player.AddBuff((BuffType <Alchemist.Buffs.Debuffs.ReactionCooldown>()), 60 * recipe.debuffDuration);
            }

            if (recipe.soundID != 0 && recipe.soundType != 0)
            {
                Main.PlaySound(recipe.soundType, (int)player.position.X, (int)player.position.Y, recipe.soundID);
            }
        }
        public static void addAlchemistHint(Player player, OrchidModPlayer modPlayer, int hintLevel, bool negativeMessage = true)
        {
            Color  floatingTextColor = new Color(0, 0, 0);
            string floatingTextStr   = "";
            List <AlchemistHiddenReactionRecipe> validHints = new List <AlchemistHiddenReactionRecipe>();

            foreach (AlchemistHiddenReactionRecipe recipe in OrchidMod.alchemistReactionRecipes)
            {
                if (recipe.level == hintLevel)
                {
                    if (!(modPlayer.alchemistKnownReactions.Contains(recipe.typeName) || modPlayer.alchemistKnownHints.Contains(recipe.typeName)))
                    {
                        validHints.Add(recipe);
                    }
                }
            }

            if (validHints.Count == 0)
            {
                if (negativeMessage)
                {
                    floatingTextColor = new Color(255, 92, 0);
                    floatingTextStr   = "No hints left for this tier";
                    CombatText.NewText(player.Hitbox, floatingTextColor, floatingTextStr);
                }
            }
            else
            {
                int rand = Main.rand.Next(validHints.Count);
                AlchemistHiddenReactionRecipe hint = validHints[rand];
                modPlayer.alchemistKnownHints.Add(hint.typeName);
                if (!modPlayer.alchemistEntryTextCooldown)
                {
                    floatingTextColor = new Color(255, 187, 0);
                    floatingTextStr   = "New Hidden Reaction Hint";
                    CombatText.NewText(player.Hitbox, floatingTextColor, floatingTextStr);
                    modPlayer.alchemistEntryTextCooldown = true;
                }
            }
        }
Ejemplo n.º 3
0
 public static void PotionBuilder(AlchemistHiddenReactionRecipe recipe, Player player, OrchidModPlayer modPlayer)
 {
 }
 public static void BlankEffect(AlchemistHiddenReactionRecipe recipe, Player player, OrchidModPlayer modPlayer)
 {
 }