Ejemplo n.º 1
0
        private void CheckOneWeaponMeleeNatural(NaturalWeapon natural_weapon, ref int weaponBonusComputed,
                                                ref List <string> Bonuses, string MW, bool NaturalMultipleWepons, ref string formula, int MeleeWeaponCount)
        {
            int    BAB             = 0;
            string weaponBonus     = string.Empty;
            string weaponsDamage   = string.Empty;
            string holdMeleeWeapon = string.Empty;
            int    AbilityBonus    = _abilityScores.StrMod;

            BAB = Convert.ToInt32(Utility.GetNonParenValue(BaseAtk));

            if (_monSBSearch.HasDefensiveAbility("incorporeal"))
            {
                AbilityBonus = _abilityScores.DexMod;
            }

            if (_monSBSearch.HasFeat("Weapon Finesse")) //Natural weapons are considered light weapons
            {
                AbilityBonus = _abilityScores.DexMod;
            }

            weaponBonusComputed = BAB + AbilityBonus + SizeMod;
            formula             = BAB.ToString() + " BAB +" + AbilityBonus.ToString() + " AbilityBonus " + Utility.GetStringValue(SizeMod) + " SizeMod";
            int MultiWeaponPenalty = -5;

            if (_monSBSearch.HasFeat("Multiattack"))
            {
                MultiWeaponPenalty = -2;
                formula           += " -2 Multiattack";
            }

            if (!_monSBSearch.HasSQ("multiweapon mastery"))
            {
                if ((natural_weapon.attack_type == "Secondary" && MeleeWeaponCount != 1) || NaturalMultipleWepons)
                {
                    weaponBonusComputed += MultiWeaponPenalty;
                    formula             += " " + MultiWeaponPenalty.ToString() + " Secondary";
                }
            }

            //if (_monSBSearch.HasFeat("Combat Expertise"))
            //{
            //    int mod = -1;
            //    mod -= BAB / 4;
            //    weaponBonusComputed += mod;
            //    formula += " -" + mod.ToString() + "  Combat Expertise";
            //}

            int    WeaponFocusMod = 0;
            string weaponName     = natural_weapon.name.ToLower();

            if (weaponName == "talons")
            {
                weaponName = "talon";
            }

            if (_monSBSearch.HasFeat("Weapon Focus (" + weaponName + ")"))
            {
                weaponBonusComputed++;
                WeaponFocusMod++;
                formula += " +1 Weapon Focus";
            }

            if (_monSBSearch.HasFeat("Greater Weapon Focus (" + weaponName + ")"))
            {
                weaponBonusComputed++;
                WeaponFocusMod++;
                formula += " +1 Greater Weapon Focus";
            }

            if (_monSBSearch.IsMythic)
            {
                if (_monSBSearch.HasMythicFeat("Weapon Focus (" + weaponName + ")"))
                {
                    weaponBonusComputed -= WeaponFocusMod;
                    weaponBonusComputed += WeaponFocusMod * 2;
                    formula             += " +" + ((WeaponFocusMod * 2) - WeaponFocusMod).ToString() + " Mythic Weapon Focus";
                }
            }

            if (_indvSB != null)
            {
                weaponBonusComputed += _indvSB.GetOnGoingStatBlockModValue(OnGoingStatBlockModifier.StatBlockModifierTypes.NaturalAttack,
                                                                           OnGoingStatBlockModifier.StatBlockModifierSubTypes.None, false, ref formula);
            }

            holdMeleeWeapon = MW.Trim();
            _weaponChecker.ParseSingleNaturalWeapon(natural_weapon, ref weaponBonus, ref weaponsDamage, ref holdMeleeWeapon, ref Bonuses);
        }