Ejemplo n.º 1
0
        /// <summary>
        /// Sets the Weapon type for a WeaponInfo, as well as the default damage modifiers.
        /// </summary>
        public static void SetWeaponType(this WeaponInfo xInfo, WeaponInfo.WeaponCategory enHands, bool bMagic)
        {
            xInfo.enWeaponCategory  = enHands;
            xInfo.enAutoAttackSpell = WeaponInfo.AutoAttackSpell.None;
            xInfo.sWeaponCategory   = "Bow";

            if (enHands == WeaponInfo.WeaponCategory.OneHanded)
            {
                if (bMagic)
                {
                    xInfo.enAutoAttackSpell = WeaponInfo.AutoAttackSpell.Generic1H;
                }
                xInfo.iDamageMultiplier = 90;
                xInfo.sWeaponCategory   = "OneHanded";
            }
            else if (enHands == WeaponInfo.WeaponCategory.TwoHanded)
            {
                if (bMagic)
                {
                    xInfo.enAutoAttackSpell = WeaponInfo.AutoAttackSpell.Generic2H;
                }
                xInfo.iDamageMultiplier = 125;
                xInfo.sWeaponCategory   = "TwoHanded";
            }
        }
Ejemplo n.º 2
0
 public WeaponInfo(string p_sResourceName, ItemCodex.ItemTypes p_enItemType, WeaponInfo.WeaponCategory p_enWeaponCategory, string sPalette = "blueish")
     : base(p_sResourceName, p_enItemType)
 {
     PlayerPalette.PaletteData x = new PlayerPalette.PaletteData("Standard", Program.game.Content.Load<Texture2D>("Items/WeaponPalettes/" + sPalette));
     this.av4WeaponPalette = x.av4Palette;
     this.enWeaponCategory = p_enWeaponCategory;
     if (this.enWeaponCategory == WeaponInfo.WeaponCategory.OneHanded)
     {
         this.sWeaponCategory = "OneHanded";
         return;
     }
     if (this.enWeaponCategory == WeaponInfo.WeaponCategory.TwoHanded)
     {
         this.sWeaponCategory = "TwoHanded";
         return;
     }
     if (this.enWeaponCategory == WeaponInfo.WeaponCategory.Bow)
     {
         this.sWeaponCategory = "Bow";
     }
 }