Пример #1
0
		public override void UpdateAccessory(Player player, bool hideVisual)
		{
			ClickerCompat.EnableClickEffect(player, "ClickerClass:StickyKeychain");
			player.fireWalk = true;
			player.armorPenetration += 10; 
			player.GetModPlayer<ClickerAddonPlayer>().bigRedButton = true;
			player.GetModPlayer<ClickerAddonPlayer>().bandOfClicking = true;
			player.GetModPlayer<ClickerAddonPlayer>().diceEffect = true;
		}
Пример #2
0
 public void MotherboardEnch(bool IfConfig = true)
 {
     if (ClickerAddonConfigClient.Instance.MotherboardEnch || !IfConfig)
     {
         //player.GetModPlayer<ClickerAddonPlayer>().cloneMotherboard = true;
         ClickerCompat.ClickerClass.GetItem("MotherboardHelmet").UpdateArmorSet(player);
     }
     if (ClickerAddonConfigClient.Instance.StickyKeychain)
     {
         ClickerCompat.EnableClickEffect(player, "ClickerClass:StickyKeychain");
     }
 }
Пример #3
0
 public void AllClickerAcc(bool hideVisual)
 {
     //ClickerCompat.ClickerClass.GetItem("ChocolateMilkCookies").UpdateAccessory(player, hideVisual);
     ClickerCompat.SetAccessory(player, "GlassOfMilk");
     ClickerCompat.SetAccessory(player, "HandCream");
     if (ClickerAddonConfigClient.Instance.Cookie)
     {
         ClickerCompat.SetAccessory(player, "Cookie2");
     }
     if (ClickerAddonConfigClient.Instance.ChocolateChip)
     {
         ClickerCompat.EnableClickEffect(player, "ClickerClass:ChocolateChip");
     }
     if (ClickerAddonConfigClient.Instance.ShowEnchLED || !hideVisual)
     {
         ClickerCompat.SetAccessory(player, "EnchantedLED");
         ClickerCompat.SetAccessory(player, "EnchantedLED2");
     }
 }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            //Use these methods to adjust clicker class related variables (treat them like player.meleeDamage etc.)
            //Only a small sample here
            //If you use VS, just mouseover the method name to see what it does
            ClickerCompat.SetDamageAdd(player, 0.2f);
            ClickerCompat.SetClickerBonusAdd(player, 1);

            //Enables the special effect of the "Glass Of Milk" accessory
            ClickerCompat.SetAccessory(player, "GlassOfMilk");

            //Enabled the click effect given by Chocolate Chip
            //You can use Clicker Classes base effects (you can find them in the source code), or your own ones
            ClickerCompat.EnableClickEffect(player, "ClickerClass:ChocolateChip");

            //How to check if an effect is enabled for the player
            bool hasChocolateChip = ClickerCompat.HasClickEffect(player, "ClickerClass:ChocolateChip");

            //Makes the radius go in a wave motion from 0 to 100 additional pixels
            float fluct = 1f + (float)Math.Sin(2 * Math.PI * (Main.GameUpdateCount % 60) / 60f);

            ClickerCompat.SetClickerRadiusAdd(player, fluct / 2);
        }
Пример #5
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ClickerCompat.EnableClickEffect(player, "ClickerClass:StickyKeychain");
     player.fireWalk          = true;
     player.armorPenetration += 5;
 }
Пример #6
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ClickerCompat.SetAccessory(player, "Cookie2");
     ClickerCompat.EnableClickEffect(player, "ClickerClass:ChocolateChip");
 }
Пример #7
0
 public override void Update(Player player, ref int buffIndex)
 {
     ClickerCompat.EnableClickEffect(player, "ClickerAddon:Carbonated");
 }
Пример #8
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ClickerCompat.EnableClickEffect(player, "ClickerClass:PhaseReach");
 }
Пример #9
0
    public static object Call(params object[] args)
    {
        Mod    clickerAddon = ModLoader.GetMod("ClickerAddon");
        string success      = "Success";

        try
        {
            string mes   = args[0] as string;
            int    index = 1;

            if (mes == "ClickerAddonStat")
            {
                var player = args[index + 0] as Player;
                var type   = args[index + 1] as string;
                if (type == null)
                {
                    throw new Exception($"Call Error: The statName argument for the attempted message, \"{mes}\" has returned null.");
                }
                if (player == null)
                {
                    throw new Exception($"Call Error: The player argument for the attempted message, \"{mes}\" has returned null.");
                }
                ClickerAddonPlayer modPlayer = player.GetModPlayer <ClickerAddonPlayer>();
                if (type == "SetArmorSet")
                {
                    var name = args[index + 2] as string;
                    if (name == null)
                    {
                        throw new Exception($"Call Error: The armorName argument for the attempted message, \"{mes}\" has returned null.");
                    }


                    if (ModLoader.GetMod("CalamityMod") != null)
                    {
                        if (name == "reaver" || name == "Reaver")
                        {
                            modPlayer.reaverCapsuit = true;
                        }
                        else if (name == "hydrothermic" || name == "Hydrothermic")
                        {
                            modPlayer.ataxiaCapsuit = true;
                        }
                        else if (name == "bloodflare" || name == "Bloodflare" || name == "BloodFlare")
                        {
                            modPlayer.bloodflareCapsuit = true;
                        }
                        else if (name == "godslayer" || name == "godSlayer" || name == "GodSlayer")
                        {
                            modPlayer.godSlayerCapsuit = true;
                        }
                        else if (name == "silva" || name == "Silva")
                        {
                            modPlayer.silvaCapsuit = true;
                        }
                    }
                    else
                    {
                        throw new Exception($"Call Error: Calamity Mod is not loaded ");
                    }
                }
                if (type == "SetAccessory")
                {
                    var name = args[index + 2] as string;
                    if (name == null)
                    {
                        throw new Exception($"Call Error: The accName argument for the attempted message, \"{mes}\" has returned null.");
                    }

                    if (name == "magmaChair")
                    {
                        modPlayer.magmaChair = true;
                    }
                    if (name == "bigRedButton")
                    {
                        modPlayer.bigRedButton = true;
                    }
                    if (name == "bandOfClicking")
                    {
                        modPlayer.bandOfClicking = true;
                    }
                    if (name == "dice")
                    {
                        modPlayer.diceEffect = true;
                    }
                }
                if (type == "SetOtherEffect")
                {
                    var name = args[index + 2] as string;
                    if (name == null)
                    {
                        throw new Exception($"Call Error: The otherEffectName argument for the attempted message, \"{mes}\" has returned null.");
                    }

                    if (name == "carbonatedPotion" || name == "CarbonatedPotion")
                    {
                        ClickerCompat.EnableClickEffect(player, "ClickerAddon:Carbonated");
                    }
                    if (name == "cheatautoclick" || name == "cheatAutoClick" || name == "CheatAutoClick")
                    {
                        modPlayer.autoClicker = true;
                    }
                    if (name == "cheatautoclick10x" || name == "cheatAutoClick10x" || name == "CheatAutoClick10x")
                    {
                        modPlayer.autoClicker           = true;
                        modPlayer.autoClickerMultiplier = new float[] { 0.1f, 10f };
                    }
                }
            }
        }
        catch (Exception e)
        {
            clickerAddon.Logger.Error($"Call Error: {e.StackTrace} {e.Message}");
        }
        return(null);
    }
Пример #10
0
 public override void UpdateArmorSet(Player player)
 {
     player.setBonus = "Every 5 clicks to get buff 'Haste'";
     //player.GetModPlayer<ClickerAddonPlayer>().clickerCobaltSet = true;
     ClickerCompat.EnableClickEffect(player, "ClickerClass:Haste");
 }