Exemplo n.º 1
0
        public static void AbsoluteZero(TowerModel model)
        {
            var realSlow = model.GetBehavior <SlowBloonsZoneModel>();

            var totem = Game.instance.model.GetTowerFromId("NaturesWardTotem");

            var slow = totem.GetBehaviors <SlowBloonsZoneModel>().First(b => !b.name.Contains("NonMoabs")).Duplicate();

            slow.zoneRadius             = realSlow.zoneRadius;
            slow.bindRadiusToTowerRange = true;
            slow.radiusOffset           = realSlow.radiusOffset;
            slow.mutator.Cast <SlowBloonsZoneModel.Mutator>().speedScale -= .1f;


            model.AddBehavior(slow);

            var buff = new RateSupportModel("RateSupportZoneModel_AbilityChoice", 2f / 3f, true, "AbsoluteZeroRateBuff2", false, 1,
                                            new Il2CppReferenceArray <TowerFilterModel>(
                                                new TowerFilterModel[]
            {
                new FilterInBaseTowerIdModel("FilterInBaseTowerIdModel_",
                                             new Il2CppStringArray(new [] { IceMonkey }))
            }
                                                )
                                            , "", "");

            buff.showBuffIcon         = false;
            buff.appliesToOwningTower = true;
            model.AddBehavior(buff);
        }
Exemplo n.º 2
0
        public static void HomelandDefense(TowerModel model)
        {
            var ability       = model.GetAbilites()[0];
            var c2a           = ability.GetBehavior <CallToArmsModel>();
            var buffIndicator = c2a.Mutator.buffIndicator;

            var buff = new RateSupportModel("RateSupportModel_HomelandDefense", .5f, true, "Village:HomelandDefense",
                                            true, 1,
                                            new Il2CppReferenceArray <TowerFilterModel>(0), buffIndicator.buffName, buffIndicator.iconName)
            {
                onlyShowBuffIfMutated = true,
                isUnique = true
            };

            model.AddBehavior(buff);
        }