Beispiel #1
0
        static SettingLimits InitialiseWeaponPowerLimit(WeaponTypes weaponType)
        {
            if (!SchemeTypes.CanApplyWeaponSetting(weaponType, WeaponSettings.Power))
            {
                return(new SettingLimits(0, 0));
            }

            switch (weaponType)
            {
            case WeaponTypes.JetPack:
            case WeaponTypes.Girder:
                return(new SettingLimits(0, 255));

            case WeaponTypes.Mortar:
            case WeaponTypes.ClusterBomb:
            case WeaponTypes.BananaBomb:
            case WeaponTypes.AirStrike:
            case WeaponTypes.NapalmStrike:
                return(new SettingLimits(0, 14));

            case WeaponTypes.Skunk:
            case WeaponTypes.Longbow:
                return(new SettingLimits(0, 9));

            case WeaponTypes.BattleAxe:
                return(new SettingLimits(0, 4, 241, 255));

            case WeaponTypes.NinjaRope:
                return(new SettingLimits(0, 4));

            default:
                return(new SettingLimits(0, 19));
            }
        }
Beispiel #2
0
 static SettingLimits InitialiseWeaponCrateLimit(WeaponTypes weaponType)
 {
     if (SchemeTypes.CanApplyWeaponSetting(weaponType, WeaponSettings.Crate))
     {
         return(new SettingLimits(0, 255));
     }
     else
     {
         return(new SettingLimits(0, 0));
     }
 }
Beispiel #3
0
        ///////////////////////////////////////////////////////////////////////
        // Initialisation

        public void SetUpDefaults()
        {
            for (int i = 0; i < (int)WeaponTypes.Count; ++i)
            {
                WeaponTypes weaponType = (WeaponTypes)i;
                if (SchemeTypes.CanApplyWeaponSetting(weaponType, WeaponSettings.Power) &&
                    weaponType != WeaponTypes.JetPack)
                {
                    Access(weaponType).Power.SetValue(2);
                }
            }

            //Most of these are taken from Intermediate.
            Access(SettingTypes.HotSeatDelay).SetValue(5);
            Access(SettingTypes.RetreatTime).SetValue(3);
            Access(SettingTypes.RopeRetreatTime).SetValue(5);
            Access(SettingTypes.DisplayTotalRoundTime).SetValue(SchemeTypes.False);
            Access(SettingTypes.AutomaticReplays).SetValue(SchemeTypes.True);
            Access(SettingTypes.FallDamage).SetValue(SchemeTypes.True);
            Access(SettingTypes.ArtilleryMode).SetValue(SchemeTypes.False);
            Access(SettingTypes.StockpilingMode).SetValue((byte)StockpilingModes.Off);
            Access(SettingTypes.WormSelect).SetValue((byte)WormSelectModes.Off);
            Access(SettingTypes.SuddenDeathEvent).SetValue((byte)SuddenDeathEvents.OneHitPoint);
            Access(SettingTypes.WaterRiseRate).SetValue(0x02);
            Access(SettingTypes.DonorCards).SetValue(SchemeTypes.False);
            Access(SettingTypes.HealthCrateEnergy).SetValue(25);
            Access(SettingTypes.HazardousObjectTypes).SetValue(0x05);
            Access(SettingTypes.MineDelay).SetValue(3);
            Access(SettingTypes.DudMines).SetValue(SchemeTypes.True);
            Access(SettingTypes.InitialWormPlacement).SetValue(SchemeTypes.False);
            Access(SettingTypes.InitialWormEnergy).SetValue(100);
            Access(SettingTypes.TurnTime).SetValue(45);
            Access(SettingTypes.RoundTime).SetValue(15);
            Access(SettingTypes.NumberOfRounds).SetValue(1);
            Access(SettingTypes.TeamWeapons).SetValue(SchemeTypes.True);
            Access(SettingTypes.SuperWeapons).SetValue(SchemeTypes.True);

            if (Version < SchemeVersion.Armageddon3)
            {
                return;
            }

            //Set extended option non-zero defaults.
            Access(ExtendedOptionTypes.Wind).SetValue(100);
            Access(ExtendedOptionTypes.WindBias).SetValue(15);
            Access(ExtendedOptionTypes.Gravity).SetValue(0x3D70);
            Access(ExtendedOptionTypes.Friction).SetValue(0xF5C2);
            Access(ExtendedOptionTypes.RopeKnocking).SetValue(255);
            Access(ExtendedOptionTypes.BloodLevel).SetValue(255);
            Access(ExtendedOptionTypes.NoCrateProbability).SetValue(255);
            Access(ExtendedOptionTypes.MaximumCrateCount).SetValue(5);
            Access(ExtendedOptionTypes.SuddenDeathDisablesWormSelect).SetValue(SchemeTypes.True);
            Access(ExtendedOptionTypes.SuddenDeathWormDamagePerTurn).SetValue(5);
            Access(ExtendedOptionTypes.ExplosionsPushAllObjects).SetValue((int)ExtendedOptionsTriState.Default);
            Access(ExtendedOptionTypes.UndeterminedCrates).SetValue((int)ExtendedOptionsTriState.Default);
            Access(ExtendedOptionTypes.UndeterminedFuses).SetValue((int)ExtendedOptionsTriState.Default);
            Access(ExtendedOptionTypes.PauseTimerWhileFiring).SetValue(SchemeTypes.True);
            Access(ExtendedOptionTypes.PneumaticDrillImpartsVelocity).SetValue((int)ExtendedOptionsTriState.Default);
            Access(ExtendedOptionTypes.PetrolTurnDecay).SetValue(0x3332);
            Access(ExtendedOptionTypes.PetrolTouchDecay).SetValue(30);
            Access(ExtendedOptionTypes.MaximumFlameletCount).SetValue(200);
            Access(ExtendedOptionTypes.MaximumProjectileSpeed).SetValue(0x200000);
            Access(ExtendedOptionTypes.MaximumRopeSpeed).SetValue(0x100000);
            Access(ExtendedOptionTypes.MaximumJetPackSpeed).SetValue(0x50000);
            Access(ExtendedOptionTypes.GameEngineSpeed).SetValue(0x10000);
            Access(ExtendedOptionTypes.IndianRopeGlitch).SetValue((int)ExtendedOptionsTriState.Default);
            Access(ExtendedOptionTypes.HerdDoublingGlitch).SetValue((int)ExtendedOptionsTriState.Default);
            Access(ExtendedOptionTypes.JetPackBungeeGlitch).SetValue(SchemeTypes.True);
            Access(ExtendedOptionTypes.HerdDoublingGlitch).SetValue(SchemeTypes.True);
            Access(ExtendedOptionTypes.AngleCheatGlitch).SetValue(SchemeTypes.True);
            Access(ExtendedOptionTypes.GlideGlitch).SetValue(SchemeTypes.True);
            Access(ExtendedOptionTypes.FloatingWeaponGlitch).SetValue(SchemeTypes.True);
            Access(ExtendedOptionTypes.RubberWormGravityStrength).SetValue(0x10000);
            Access(ExtendedOptionTypes.TerrainOverlapPhasingGlitch).SetValue((int)ExtendedOptionsTriState.Default);
            Access(ExtendedOptionTypes.HealthCratesCurePoison).SetValue((int)HealthCratesCurePoisonModes.Team);
            Access(ExtendedOptionTypes.SheepHeavensGate).SetValue(7);
            Access(ExtendedOptionTypes.DoubleTimeStackLimit).SetValue(1);
        }