Example #1
0
        public override void SetDefaults()
        {
            ClickerCompat.SetClickerWeaponDefaults(item);

            ClickerCompat.SetRadius(item, 1f);
            ClickerCompat.SetColor(item, Color.Red);
            ClickerCompat.SetDust(item, DustID.SomethingRed);

            //Here we use our custom effect, registered as 'modName:internalName'
            ClickerCompat.AddEffect(item, "ClickerClassExampleMod:ExampleEffect");

            //We can add more than one effect aswell! (Here using the IEnumerable overload to make it more compact)
            ClickerCompat.AddEffect(item, new List <string> {
                "ClickerClass:Inferno", "ClickerClass:Embrittle"
            });

            //We can also access all available effects and do stuff with it
            //Here pick the first registered effect (random would be cool but Main.rand shouldn't be used in SetDefaults)
            List <string> allEffects = ClickerCompat.GetAllEffectNames();

            if (allEffects != null && allEffects.Count > 0)
            {
                ClickerCompat.AddEffect(item, allEffects[0]);
                //If this happens to be one we already added, it won't do anything
            }

            //In total, atleast 3 effects

            item.damage    = 10;
            item.width     = 30;
            item.height    = 30;
            item.knockBack = 1f;
            item.value     = 1000;
            item.rare      = ItemRarityID.Green;
        }
Example #2
0
        public override void SetDefaults()
        {
            ClickerCompat.SetClickerWeaponDefaults(item);
            ClickerCompat.SetRadius(item, 6f);
            ClickerCompat.SetColor(item, new Color(190, 60, 70, 0));
            ClickerCompat.SetDust(item, 87);
            //ClickerCompat.SetEffectW(item, "Holy Nova", 9);
            ClickerCompat.AddEffect(item, ClickerCompat.GetAllEffectNames());

            item.damage    = 1;
            item.width     = 30;
            item.height    = 30;
            item.knockBack = 1f;
            item.value     = 0;
            item.rare      = ItemRarityID.Expert;
        }