Ejemplo n.º 1
0
        public DefensiveEquipments(DefenseModules defensiveModules, DefenseModuleGrades defensiveWeaponGrades)
        {
            Name = defensiveModules.ToString();
            Size = defensiveWeaponGrades;
            if (defensiveModules == DefenseModules.ShieldAmplifier)
            {
                switch (Size)
                {
                case DefenseModuleGrades.Medium:
                    Bonus = 20;
                    break;

                case DefenseModuleGrades.Large:
                    Bonus = 50;
                    break;

                case DefenseModuleGrades.XLarge:
                    Bonus = 100;
                    break;

                case DefenseModuleGrades.XXLagre:
                    Bonus = 500;
                    break;

                case DefenseModuleGrades.Doomsday:
                    Bonus = 500;
                    break;

                case DefenseModuleGrades.Small:
                default:
                    Bonus = 5;
                    break;
                }
            }
            else if (defensiveModules == DefenseModules.HullPlate)
            {
                switch (Size)
                {
                case DefenseModuleGrades.Medium:
                    Bonus = 20;
                    break;

                case DefenseModuleGrades.Large:
                    Bonus = 50;
                    break;

                case DefenseModuleGrades.XLarge:
                    Bonus = 100;
                    break;

                case DefenseModuleGrades.XXLagre:
                    Bonus = 500;
                    break;

                case DefenseModuleGrades.Doomsday:
                    Bonus = 500;
                    break;

                case DefenseModuleGrades.Small:

                default:
                    Bonus = 10;
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        public DefenseModule(DefenseModules defenseModules, DefenseModuleGrades defenseModuleGrades)
        {
            Name = defenseModules.ToString();
            Size = defenseModuleGrades;

            if (defenseModules == DefenseModules.ShieldAmplifier)
            {
                switch (defenseModuleGrades)
                {
                case DefenseModuleGrades.Medium:
                    Bonus = 20;
                    break;

                case DefenseModuleGrades.Large:
                    Bonus = 50;
                    break;

                case DefenseModuleGrades.XLarge:
                    Bonus = 100;
                    break;

                case DefenseModuleGrades.XXLagre:
                    Bonus = 500;
                    break;

                case DefenseModuleGrades.Small:
                    Bonus = 5;
                    break;

                case DefenseModuleGrades.Doomsday:
                    Bonus = 0;
                    break;

                default:
                    throw new InvalidOperationException("Invalid Size");
                }
            }
            else if (defenseModules == DefenseModules.ArmorPlate)
            {
                Bonus = 0;
            }
            else if (defenseModules == DefenseModules.HullPlate)
            {
                switch (Size)
                {
                case DefenseModuleGrades.Small:
                    Bonus = 10;
                    break;

                case DefenseModuleGrades.Medium:
                    Bonus = 20;
                    break;

                case DefenseModuleGrades.Large:
                    Bonus = 50;
                    break;

                case DefenseModuleGrades.XLarge:
                    Bonus = 100;
                    break;

                case DefenseModuleGrades.XXLagre:
                    Bonus = 500;
                    break;

                case DefenseModuleGrades.Doomsday:
                    Bonus = 0;
                    break;

                default:
                    throw new InvalidOperationException("Invalid size");
                }
            }
            else
            {
                throw new InvalidOperationException("Invalid defensive module");
            }
        }