Ejemplo n.º 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);
            }
Ejemplo n.º 2
0
            public static BloonModel GetNextBloon(string currentBloon)
            {
                var allBloonTypes = BloonUtils.GetAllBloonTypes();
                int num1          = random.Next(0, 5);
                int num2          = num1 == 0 ? 0 : 1;
                int num3          = BloonUtils.GetBloonIdNum(currentBloon);

                //so the bad doesn't turn to an invis bloon
                if (num3 + num2 > allBloonTypes.Count - 2)
                {
                    num3 = allBloonTypes.Count - 2;
                }
                else
                {
                    num3 += num2;
                }
                return(BloonUtils.GetNextStrongestBloon(allBloonTypes[num3], false, false, false, true));
            }
Ejemplo n.º 3
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);
            }