public static string FullMagicalDisplay(WeaponItemWeaver magicWeapon) { var sb = new StringBuilder(); sb.AppendLine(string.Format("{0}:\t'{1} gp'\t('+{2} value'){12}To Hit: '+{3}'{12}Damage: '{4}{5}{6}' {7}{12}Hardness: '{8}'{12}Hit Points: '{9}'{12}Weight: '{10} pound(s)'{12}{11}", magicWeapon.GetName(), magicWeapon.GetCost(), magicWeapon.GetEnhancementBonusForCost(), magicWeapon.GetEnhancementBonus(), magicWeapon.GetDamage(), magicWeapon.GetThreat(), magicWeapon.GetEnchantmentCriticalDamage(), magicWeapon.GetDamageType(), magicWeapon.GetModifiedHardness(), magicWeapon.GetModifiedHitPoints(), magicWeapon.GetWeight(), magicWeapon.GetDescription(), Environment.NewLine)); sb.Append(string.Format("{5}Creator Caster Level: '{0}'{5}Time to Create: '{1} Days'{5}Creation XP Cost: '{2}'{5}Creation Raw Material Cost: '{3}'{5}{4}", magicWeapon.GetMinimumCasterLevel(), magicWeapon.GetDaysToCreate(), magicWeapon.GetCreationXpCost(), magicWeapon.GetCreationRawMaterialCost(), magicWeapon.GetCreationRequirements(), Environment.NewLine)); return(sb.ToString()); }
public static string BasicDisplay(WeaponItemWeaver weapon) { string damageMod; if (weapon.GetDamageModifier() == 0) { damageMod = ""; } else { damageMod = string.Format(" {0}", weapon.GetDamageModifier()); } return(string.Format("{0}:\t'{1} gp'{9}Weight: '{2} pound(s)'{9}To Hit: '{3}'{9}Damage: '{4}{5}'{9}Hardness: '{6}'{9}Hit Points: '{7}'{9}{8}", weapon.GetName(), weapon.GetCost(), weapon.GetWeight(), weapon.GetToHit(), weapon.GetDamage(), damageMod, weapon.GetHardness(), weapon.GetHitPoints(), weapon.GetDescription(), Environment.NewLine)); }
public MagicWeaponItem(WeaponItemWeaver weapon, int bonus) { if (bonus < 1 || bonus > 5) { throw new ArgumentOutOfRangeException("Bonus", bonus, "The Enhancement Bonus must be between 1 and 5"); } weaponItem = weapon; enhancementBonus = bonus; }
public EnchantedWeaponItem(WeaponItemWeaver magicWeapon, WeaponEnchantment newEnchantment) { if ((magicWeapon.GetEnhancementBonusForCost() + newEnchantment.GetEnhancementBonusForCost()) > MaxEnhancementBonus) { throw new ArgumentOutOfRangeException(string.Format("'{0}' enchantment of '+{1}' value cannot be added to '{2}' of '+{3}' value.{4}Enchantment bonus cannot exceed '+10'", newEnchantment.GetName(), newEnchantment.GetEnhancementBonusForCost(), magicWeapon.GetName(), magicWeapon.GetEnhancementBonusForCost(), Environment.NewLine)); } weaponItem = magicWeapon; enchantment = newEnchantment; }
public static ExtraordinaryQualityWeapon OrderSpecialComponent(WeaponItemWeaver weapon, string materialComponent) { if (weapon == null) { throw new ArgumentNullException(string.Format("There is no weapon to make.{0}Please select a weapon", Environment.NewLine)); } if (string.IsNullOrEmpty(materialComponent)) { throw new ArgumentNullException(string.Format("Material Component Name: '{0}' for '{1}'", materialComponent, weapon.GetName()), "The name of the material must be specified"); } var component = new MaterialComponentOrder(MaterialComponentDictionary.GetComponentData(materialComponent)); return new ExtraordinaryQualityWeapon(weapon, component); }
public static ExtraordinaryQualityWeapon OrderSpecialComponent(WeaponItemWeaver weapon, string materialComponent) { if (weapon == null) { throw new ArgumentNullException(string.Format("There is no weapon to make.{0}Please select a weapon", Environment.NewLine)); } if (string.IsNullOrEmpty(materialComponent)) { throw new ArgumentNullException(string.Format("Material Component Name: '{0}' for '{1}'", materialComponent, weapon.GetName()), "The name of the material must be specified"); } var component = new MaterialComponentOrder(MaterialComponentDictionary.GetComponentData(materialComponent)); return(new ExtraordinaryQualityWeapon(weapon, component)); }
public static string BasicMagicalDisplay(WeaponItemWeaver weapon) { return(string.Format("{0}:\t'{1} gp'\t('+{2} value'){9}Weight: '{3} pound(s)'{9}To Hit: '+{4}'{9}Damage: '{5}'{9}Hardness: '{6}'{9}Hit Points: '{7}'{9}{8}", weapon.GetName(), weapon.GetCost(), weapon.GetEnhancementBonusForCost(), weapon.GetWeight(), weapon.GetEnhancementBonus(), weapon.GetDamage(), weapon.GetModifiedHardness(), weapon.GetModifiedHitPoints(), weapon.GetDescription(), Environment.NewLine)); }
public static EnchantedWeaponItem RequestEnchantment(WeaponItemWeaver magicWeapon, string enchantment) { var newEnchantment = new WeaponEnchantment(new EnchantmentOrder(EnchantmentDictionary.GetEnchantmentData(enchantment))); return new EnchantedWeaponItem(magicWeapon, newEnchantment); }
public ExtraordinaryQualityWeapon(WeaponItemWeaver weaponItem, MaterialComponentOrder materialComponent) { weapon = weaponItem; component = materialComponent; }
public static EnchantedWeaponItem RequestEnchantment(WeaponItemWeaver magicWeapon, string enchantment) { var newEnchantment = new WeaponEnchantment(new EnchantmentOrder(EnchantmentDictionary.GetEnchantmentData(enchantment))); return(new EnchantedWeaponItem(magicWeapon, newEnchantment)); }