Example #1
0
 /// <summary>
 /// Use this constructor when the shield is to be made from Dragonhide.
 /// Initializes a new instance of the <see cref="T:Core.Domain.Items.Shields.Paizo.CoreRulebook.HeavyShield"/> class.
 /// </summary>
 /// <param name="size">The size of character this shield is intended to be used by.</param>
 /// <param name="color">The color of dragonhide this shield is crafted from.</param>
 /// <exception cref="System.ComponentModel.InvalidEnumArgumentException">Thrown when an argument is a nonstandard enum.</exception>
 public HeavyShield(SizeCategory size, DragonhideColor color)
     : base(armorClassBonus:           ARMOR_BONUS,
            materialInchesOfThickness: InchesOfThicknessScaledBySize(size, 3f / 2f),
            materialHitPointsPerInch:  Dragonhide.HitPointsPerInch,
            materialHardness:          Dragonhide.Hardness)
 {
     this.IsMasterwork           = true;
     this.MasterworkIsToggleable = false;
     this.ArmorCheckPenalty      = () => this.StandardArmorCheckPenaltyCalculation(BASE_ARMOR_CHECK_PENALTY);
     this.MundaneMarketPrice     = () => Dragonhide.GetShieldBaseMarketPrice(MarketValueScaledBySize(size, WOOD_PRICE), this.Enchantments, color);
     this.Weight      = () => WeightScaledBySize(size, WOOD_WEIGHT);
     this.MundaneName = () => new INameFragment[] {
         new NameFragment($"{ color } Dragonhide", Dragonhide.WebAddress),
         StandardShieldName
     };
 }
Example #2
0
 /// <summary>
 /// Use this constructor when the shield is to be made from Dragonhide.
 /// Initializes a new instance of the <see cref="T:Core.Domain.Items.Shields.Paizo.CoreRulebook.TowerShield"/> class.
 /// </summary>
 /// <param name="size">The size of character this shield is intended to be used by.</param>
 /// <param name="color">The dominant material the shield is crafted from.</param>
 public TowerShield(SizeCategory size, DragonhideColor color)
     : base(armorClassBonus:           ARMOR_BONUS,
            materialInchesOfThickness: InchesOfThicknessScaledBySize(size, INCHES_OF_THICKNESS),
            materialHitPointsPerInch:  Dragonhide.HitPointsPerInch,
            materialHardness:          Dragonhide.Hardness)
 {
     this.IsMasterwork           = true;
     this.MasterworkIsToggleable = false;
     this.ArmorCheckPenalty      = () => this.StandardArmorCheckPenaltyCalculation(BASE_ARMOR_CHECK_PENALTY);
     this.MundaneMarketPrice     = () => Dragonhide.GetShieldBaseMarketPrice(MarketValueScaledBySize(size, WOOD_PRICE), this.Enchantments, color);
     this.Weight      = () => WeightScaledBySize(size, WOOD_WEIGHT);
     this.MundaneName = () => new INameFragment[] {
         new NameFragment($"{ color } Dragonhide", Dragonhide.WebAddress),
         StandardShieldName
     };
     // Tower shields apply a maximum dexterity bonus to AC
     this.OnApplied += (sender, e) => {
         e.Character?.ArmorClass?.MaxKeyAbilityScore?.Add(this.GetMaximumDexterityBonus);
     };
     // Tower shields inflict a -2 penalty to melee attack rolls
     this.OnApplied += (sender, e) => {
         e.Character?.AttackBonuses?.GenericMeleeAttackBonus?.Penalties?.Add(() => 2);
     };
 }