public override void visualUpdate(AlchemyWrapper wrapper) { base.visualUpdate(wrapper); if (Main.rand.Next(20) == 0) { Dust.NewDust(wrapper.cauldronRect.TopLeft() - new Vector2(0, 20), wrapper.cauldronRect.Width, 0, ModContent.DustType <NeedlerDustTwo>(), 0, -2, 120, Color.Black, 0.5f); } }
public override bool UpdateCrafting(AlchemyWrapper wrapper, List <AlchemyIngredient> currentingredients, CauldronDummyAbstract cauldronDummy) { if (wrapper.timeSinceCraftStarted < 60) { for (int i = 0; i < wrapper.timeSinceCraftStarted / 3; i++) { Dust.NewDust(wrapper.cauldronRect.TopLeft() + new Vector2(5, -30), wrapper.cauldronRect.Width - 10, 30, ModContent.DustType <BloodCrystalRecipeDust>(), 0, -10, Scale: 0.3f); } } wrapper.bubbleColor = Color.Red; if (Main.rand.Next(10) == 0) { if (Main.rand.NextBool()) { Dust.NewDust(wrapper.cauldronRect.TopLeft() - new Vector2(0, wrapper.timeSinceCraftStarted / 2), wrapper.cauldronRect.Width, 20, ModContent.DustType <CrystalSparkle>(), 0, 0, newColor: Color.Red); } else { Dust.NewDust(wrapper.cauldronRect.TopLeft() - new Vector2(0, wrapper.timeSinceCraftStarted / 2), wrapper.cauldronRect.Width, 20, ModContent.DustType <CrystalSparkle2>(), 0, 0, newColor: Color.Red); } } if (wrapper.timeSinceCraftStarted > 60) { wrapper.bubbleOpacity = 1f - (wrapper.timeSinceCraftStarted - 60) * 0.025f; } if (wrapper.timeSinceCraftStarted >= 200) { foreach (Item eachOutputItem in outputItemList) { Item.NewItem(wrapper.cauldronRect.Center() - new Vector2(0, 100), Vector2.Zero, eachOutputItem.type, Stack: eachOutputItem.stack, prefixGiven: eachOutputItem.prefix); } foreach (AlchemyIngredient eachIngredient in currentingredients) { Item requiredItem; requiredIngredientsMap.TryGetValue(eachIngredient.storedItem.type, out requiredItem); eachIngredient.storedItem.stack -= requiredItem.stack * wrapper.currentBatchSize; } cauldronDummy.dumpIngredients(); } return(true); }
public override void visualUpdate(AlchemyWrapper wrapper) { base.visualUpdate(wrapper); if (timeSinceAdded == 0) { for (int i = 0; i < 3; i++) { Dust.NewDust(wrapper.cauldronRect.TopLeft() - new Vector2(0, 25), wrapper.cauldronRect.Width, 25, ModContent.DustType <CrystalSparkle>(), 0, 0); Dust.NewDust(wrapper.cauldronRect.TopLeft() - new Vector2(0, 25), wrapper.cauldronRect.Width, 25, ModContent.DustType <CrystalSparkle2>(), 0, 0); } } if (Main.rand.Next(50) == 0) { if (Main.rand.NextBool()) { Dust.NewDust(wrapper.cauldronRect.TopLeft() - new Vector2(0, 25), wrapper.cauldronRect.Width, 25, ModContent.DustType <CrystalSparkle>(), 0, 0); } else { Dust.NewDust(wrapper.cauldronRect.TopLeft() - new Vector2(0, 25), wrapper.cauldronRect.Width, 25, ModContent.DustType <CrystalSparkle2>(), 0, 0); } } }