示例#1
0
        public static void AllPowerToThrusters(TowerModel model)
        {
            var heliMovementModel = model.GetDescendant <HeliMovementModel>();

            heliMovementModel.maxSpeed               *= 5;
            heliMovementModel.brakeForce             *= 5;
            heliMovementModel.movementForceStart     *= 5;
            heliMovementModel.movementForceEnd       *= 5;
            heliMovementModel.movementForceEndSquared =
                heliMovementModel.movementForceEnd * heliMovementModel.movementForceEnd;
            heliMovementModel.strafeDistance       *= 5;
            heliMovementModel.strafeDistanceSquared =
                heliMovementModel.strafeDistance * heliMovementModel.strafeDistance;
        }
示例#2
0
        public static void Oktoberfest(TowerModel model)
        {
            var brew = model.GetDescendant <AddBerserkerBrewToProjectileModel>();

            if (brew != null)
            {
                brew.cap = (int)(brew.cap * 1.5);
                //brew.rebuffBlockTime = 0;
                //brew.rebuffBlockTimeFrames = 0;
                var brewCheck = brew.towerBehaviors[0].Cast <BerserkerBrewCheckModel>();
                brewCheck.maxCount = (int)(brewCheck.maxCount * 1.5);
            }

            var dip = model.GetDescendant <AddAcidicMixtureToProjectileModel>();

            if (dip != null)
            {
                dip.cap = (int)(dip.cap * 1.5);
                //brew.rebuffBlockTime = 0;
                //brew.rebuffBlockTimeFrames = 0;
                var dipCheck = dip.towerBehaviors[0].Cast <AcidicMixtureCheckModel>();
                dipCheck.maxCount = (int)(dipCheck.maxCount * 1.5);
            }
        }
示例#3
0
        public static void SpikeEmpowerment(TowerModel towerModel)
        {
            var mortar = Game.instance.model.GetTowerFromId(MortarMonkey);

            towerModel.towerSelectionMenuThemeId = "MortarMonkey";

            towerModel.targetTypes = new Il2CppReferenceArray <TargetType>(mortar.targetTypes);

            if (towerModel.targetTypes.Length > 1)
            {
                while (towerModel.targetTypes.Length > 1)
                {
                    towerModel.targetTypes = towerModel.targetTypes.RemoveItemOfType <TargetType, TargetType>();
                }

                towerModel.targetTypes[0].id             = "TargetSelectedPoint";
                towerModel.targetTypes[0].intID          = -1;
                towerModel.targetTypes[0].actionOnCreate = true;
                towerModel.targetTypes[0].isActionable   = true;
            }


            towerModel.GetAttackModel().RemoveBehavior <TargetTrackModel>();
            towerModel.GetAttackModel().RemoveBehavior <SmartTargetTrackModel>();
            towerModel.GetAttackModel().RemoveBehavior <CloseTargetTrackModel>();
            towerModel.GetAttackModel().RemoveBehavior <FarTargetTrackModel>();


            var targetSelectedPointModel = towerModel.GetAttackModel().GetBehavior <TargetSelectedPointModel>();

            if (targetSelectedPointModel == null)
            {
                var tspm = new TargetSelectedPointModel("TargetSelectedPointModel_", true,
                                                        false, "4e88dd78c6e800d41a6df5b02d592082", .5f, "");
                towerModel.GetAttackModel().AddBehavior(tspm);
            }

            towerModel.UpdateTargetProviders();


            towerModel.GetDescendant <ArriveAtTargetModel>().filterCollisionWhileMoving = false;
        }