Beispiel #1
0
        public static void ActivateCheatEquip2()
        {
            if (isEquip2CheatActivated)
            {
                return;
            }

            equippedPrimaryWeapons[0] = new ProximityLaserWeapon(Game);
            equippedPrimaryWeapons[1] = new AdvancedLaserWeapon(Game);
            equippedSecondary         = new TurretWeapon(Game);
            currentPrimaryWeapon      = equippedPrimaryWeapons[0];

            equippedEnergyCell = new AdvancedEnergyCell(Game);
            equippedShield     = new AdvancedShield(Game);

            isEquip2CheatActivated = true;
        }
        public Item GetItemFromSavefile(string section)
        {
            float       quantity = 0;
            ItemVariety var;
            ShipPart    fooItem;

            switch (GetPropertyAsString(section, "name", "error"))
            {
            // Weapons
            case "basic laser":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new BasicLaserWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "beam":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new BeamWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "drill beam":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new DrillBeamWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "flame shot":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new FlameShotWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "multiple shot":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new MultipleShotWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "spread bullet":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new SpreadBulletWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "ballistic laser":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new BallisticLaserWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "minelayer":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new MineLayerWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "advanced laser":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new AdvancedLaserWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "proximity laser":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new ProximityLaserWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "wave beam":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new WaveBeamWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "dual laser":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new DualLaserWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            // Secondary
            case "homingmissile":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new HomingMissileWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "bomb":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new RegularBombWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "sidemissiles":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new SideMissilesWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "fragmentmissile":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new FragmentMissileWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "puny turret":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new PunyTurretWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "turret":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new TurretWeapon(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            // Shields
            case "regular shield":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new RegularShield(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "plasma shield":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new AdvancedShield(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "durable shield":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new BasicShield(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "collision shield":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new CollisionShield(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "bullet shield":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new BulletShield(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            // Energy
            case "regular cell":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new RegularEnergyCell(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "durable cell":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new BasicEnergyCell(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "plasma cell":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new AdvancedEnergyCell(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "weapon boost cell":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new WeaponBoostEnergyCell(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "shield boost cell":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new ShieldBoostEnergyCell(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            // Plating
            case "regular plating":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new RegularPlating(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "light plating":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new LightPlating(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            case "heavy plating":
                var     = (ItemVariety)Enum.Parse(typeof(ItemVariety), GetPropertyAsString(section, "variety", "none"), true);
                fooItem = new HeavyPlating(Game);
                fooItem.SetShipPartVariety(var);
                return(fooItem);

            // Resource
            case "copper":
                quantity = Game.saveFile.GetPropertyAsInt(section, "quantity", 0);
                return(new CopperResource(Game, quantity));

            case "gold":
                quantity = Game.saveFile.GetPropertyAsInt(section, "quantity", 0);
                return(new GoldResource(Game, quantity));

            case "titanium":
                quantity = Game.saveFile.GetPropertyAsInt(section, "quantity", 0);
                return(new TitaniumResource(Game, quantity));

            // Other items
            case "fine whiskey":
                quantity = Game.saveFile.GetPropertyAsInt(section, "quantity", 0);
                return(new FineWhiskey(Game, quantity));

            case "---":
                return(new EmptyItem(Game));

            default:
                throw new ArgumentException("Not implemented!");
            }
        }
Beispiel #3
0
        public static String MapCreatorEquip(int equipNbr)
        {
            equippedEnergyCell = new AdvancedEnergyCell(Game);
            String equipInfo = "";

            switch (equipNbr)
            {
            case 1:
            {
                equippedPrimaryWeapons[0] = new BasicLaserWeapon(Game);
                equippedPrimaryWeapons[1] = new BasicLaserWeapon(Game);
                equippedSecondary         = new HomingMissileWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new RegularEnergyCell(Game);
                equippedPlating    = new BasicPlating(Game);
                equippedShield     = new EmptyShield(Game);

                equipInfo += "Starters kit (mission ~1)";

                break;
            }

            case 2:
            {
                equippedPrimaryWeapons[0] = new DualLaserWeapon(Game);
                equippedPrimaryWeapons[1] = new SpreadBulletWeapon(Game);
                equippedSecondary         = new EmptyWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new BasicEnergyCell(Game);
                equippedPlating    = new BasicPlating(Game);
                equippedShield     = new BasicShield(Game);

                equipInfo += "Past beginner set (mission ~2)";
                break;
            }

            case 3:
            {
                equippedPrimaryWeapons[0] = new MultipleShotWeapon(Game);
                equippedPrimaryWeapons[1] = new WaveBeamWeapon(Game);
                equippedSecondary         = new TurretWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new RegularEnergyCell(Game);
                equippedPlating    = new BasicPlating(Game);
                equippedShield     = new BasicShield(Game);

                equipInfo += "Has reached Fortrun (mission ~3)";
                break;
            }

            case 4:
            {
                equippedPrimaryWeapons[0] = new BeamWeapon(Game);
                equippedPrimaryWeapons[1] = new MultipleShotWeapon(Game);
                equippedSecondary         = new FieldDamageWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new RegularEnergyCell(Game);
                equippedPlating    = new RegularPlating(Game);
                equippedShield     = new RegularShield(Game);

                equipInfo += "A bit more progress at Fortrun (mission ~4)";
                break;
            }

            case 5:
            {
                equippedPrimaryWeapons[0] = new FragmentMissileWeapon(Game);
                equippedPrimaryWeapons[1] = new BeamWeapon(Game);
                equippedSecondary         = new SideMissilesWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new AdvancedEnergyCell(Game);
                equippedPlating    = new RegularPlating(Game);
                equippedShield     = new RegularShield(Game);

                equipInfo += "Has now reached Rebel Station (mission ~5)";
                break;
            }

            case 6:
            {
                equippedPrimaryWeapons[0] = new BallisticLaserWeapon(Game);
                equippedPrimaryWeapons[1] = new BursterWeapon(Game);
                equippedSecondary         = new SideMissilesWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new AdvancedEnergyCell(Game);
                equippedPlating    = new RegularPlating(Game);
                equippedShield     = new RegularShield(Game);

                equipInfo += "Running to Peye (mission ~6+)";
                break;
            }

            case 7:
            {
                equippedPrimaryWeapons[0] = new AdvancedLaserWeapon(Game);
                equippedPrimaryWeapons[1] = new ProximityLaserWeapon(Game);
                equippedSecondary         = new DisruptorWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new AdvancedEnergyCell(Game);
                equippedPlating    = new RegularPlating(Game);
                equippedShield     = new AdvancedShield(Game);

                equipInfo += "Getting inaccurate here (mission >6-7)";
                break;
            }

            case 8:
            {
                equippedPrimaryWeapons[0] = new AdvancedBeamWeapon(Game);
                equippedPrimaryWeapons[1] = new ProximityLaserWeapon(Game);
                equippedSecondary         = new SideMissilesWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new AdvancedEnergyCell(Game);
                equippedPlating    = new AdvancedPlating(Game);
                equippedShield     = new AdvancedShield(Game);

                equipInfo += "Currently highest tier (mission ~10)";
                break;
            }

            case 9:
            {
                equippedPrimaryWeapons[0] = new AdvancedBeamWeapon(Game);
                equippedPrimaryWeapons[1] = new BursterWeapon(Game);
                equippedSecondary         = new BursterWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new AdvancedEnergyCell(Game);
                equippedPlating    = new AdvancedPlating(Game);
                equippedShield     = new AdvancedShield(Game);

                //equippedEnergyCell.Recharge *= 10f;
                //equippedPlating.Speed *= 3f;
                //equippedPlating.Armor *= 10f;
                //equippedShield.Regeneration *= 5f;

                equipInfo += "What's going on here??";
                break;
            }

            case 0:
            {
                equippedPrimaryWeapons[0] = new LongShotWeapon(Game);
                equippedPrimaryWeapons[1] = new FlameShotWeapon(Game);
                equippedSecondary         = new DisruptorWeapon(Game);
                currentPrimaryWeapon      = equippedPrimaryWeapons[0];

                equippedEnergyCell = new AdvancedEnergyCell(Game);
                equippedPlating    = new AdvancedPlating(Game);
                equippedShield     = new AdvancedShield(Game);

                equipInfo += "Jakobs testing slot";
                break;
            }
            }
            equipInfo += "\n" + equippedPrimaryWeapons[0].Name
                         + "\n" + equippedPrimaryWeapons[1].Name
                         + "\n" + equippedSecondary.Name
                         + "\n" + equippedEnergyCell.Name
                         + "\n" + equippedShield.Name
                         + "\n" + equippedPlating.Name;

            return(equipInfo);
        }