Beispiel #1
0
 public EmeraldGem(
     GemTypes gemType,
     GemClarities gemClarity)
     : base(
           gemType,
           gemClarity,
           Strength,
           Agility,
           Vitality)
 {
 }
Beispiel #2
0
 public AmethystGem(
     GemTypes gemType,
     GemClarities gemClarity)
     : base(
           gemType,
           gemClarity,
           Strength,
           Agility,
           Vitality)
 {
 }
 public AddGemToSocketCommand(
     IDatabase <Weapon> repository,
     WeaponFactory weaponFactory,
     GemFactory gemFactory,
     string weaponName,
     int socketIndex,
     GemClarities gemClarity,
     GemTypes gemType)
     : base(repository, weaponFactory, gemFactory, weaponName)
 {
     this.socketIndex = socketIndex;
     this.gemClarity  = gemClarity;
     this.gemType     = gemType;
 }
Beispiel #4
0
        public Gem CreateGem(GemTypes gemType, GemClarities gemClarity)
        {
            Gem gem = null;

            switch (gemType)
            {
                case GemTypes.Amethyst:
                    gem = new AmethystGem(gemType, gemClarity);
                    break;
                case GemTypes.Emerald:
                    gem = new EmeraldGem(gemType, gemClarity);
                    break;
                case GemTypes.Ruby:
                    gem = new RubyGem(gemType, gemClarity);
                    break;
            }

            return gem;
        }
Beispiel #5
0
        public Gem(
            GemTypes gemType,
            GemClarities gemClarity,
            int strengthIncrease,
            int agilityIncrease,
            int vitalityIncrease)
        {
            this.gemType = gemType;
            this.gemClarity = gemClarity;

            this.StrengthIncrease = (int)gemClarity + strengthIncrease;
            this.AgilityIncrease = (int)gemClarity + agilityIncrease;
            this.VitalityIncrease = (int)gemClarity + vitalityIncrease;

            this.MinDamageIncrease =
                (StrengthMinDamageIncrease * this.StrengthIncrease) +
                (AgilityhMinDamageIncrease * this.AgilityIncrease);

            this.MaxDamageIncrease =
                (StrengthMaxDamageIncrease * this.StrengthIncrease) +
                (AgilityhMaxDamageIncrease * this.AgilityIncrease);
        }