Example #1
0
            public static bool Prefix(Bloon __instance, ref Model modelToUse)
            {
                //Logger.Log(BloonUtils.GetBloonIdNum(modelToUse.name) + "");
                //camgrow fortified
                if (prevEffect == effects[17])
                {
                    modelToUse = BloonUtils.SetBloonStatus(modelToUse.name, true, true, true);
                }
                //upgrade bloons randomly
                if (prevEffect == effects[18] && voteTimer < 25 && BloonUtils.GetBloonIdNum(modelToUse.name) < 48)
                {
                    modelToUse = GetNextBloon(modelToUse.name);
                }

                return(true);
            }
Example #2
0
            public static bool Prefix(Bloon __instance, ref Model modelToUse)
            {
                //System.Console.WriteLine(BloonUtils.GetBloonIdNum(modelToUse.name) + "");
                //camgrow fortified
                if (prevEffect == effects[17])
                {
                    try
                    {
                        modelToUse = BloonUtils.SetBloonStatus(modelToUse.name, true, true, true);
                    }
                    catch
                    {
                    }
                }
                //upgrade bloons randomly
                if (prevEffect == effects[18] && voteTimer < 25)// && BloonUtils.GetBloonIdNum(modelToUse.name) < 48
                {
                    try
                    {
                        //modelToUse = GetNextBloon(modelToUse.name);
                        //System.Console.WriteLine(modelToUse.name);
                        var name = modelToUse.name;
                        if (random.NextDouble() > 0.8)
                        {
                            name = GetNextBloon(name);
                        }

                        modelToUse = BloonUtils.SetBloonStatus(name, false, false, false);
                    }
                    catch
                    {
                    }
                }

                return(true);
            }