private decimal CalcTargetSkillLv(Skills skillInfo)
        {
            if (BlessingTable[this.SelectedFriendBlessing] == 0 && BlessingTable[this.SelectedBlessing] == 0)
            {
                var magna = skillInfo.Magna / 100m;

                var Ans = (magna + 1) * (SynastryTable[this.SelectedSynastry] + (this.BlessingPercent / 100m) + (this.FriendBlessingPercent / 100m));

                var targetup = (SynastryTable[this.SelectedSynastry] + (this.BlessingPercent / 100m) + (this.FriendBlessingPercent / 100m)) * magna + (this.BlessingPercent / 100m);
                var targetdown = 2 * (SynastryTable[this.SelectedSynastry] + this.FriendBlessingPercent / 100m);
                var target = targetup / targetdown;

                this.TargetMagnaVisible = Visibility.Visible;
                return target - (magna);
            }
            else
            {
                this.TargetMagnaVisible = Visibility.Collapsed;
                return -1;
            }
        }
        private void CalcAttack(Skills skillInfo)
        {
            if (skillInfo == null) return;
            //스킬 배율을 저장
            decimal total = skillInfo.BasicAttack;
            this.Total = total;

            decimal baha = skillInfo.Baha / 100m;

            decimal percent = skillInfo.Noramal / 100m;

            decimal Magnapercent = skillInfo.Magna / 100m;

            decimal Unknownpercent = skillInfo.Unknown / 100m;

            decimal Strangthpercent = skillInfo.Str / 100m;

            decimal Savingpercent = skillInfo.Saving / 100m;

            decimal Attributepercent = SynastryTable[this.SelectedSynastry];

            //퍼센트 저장 변수
            decimal pNormal = 1, pMagna = 1, pUnknown = 1, pElement = 0, pChar = 0;

            //자신의 가호
            if (BlessingTable[this.SelectedBlessing] == 3) pChar += this.BlessingPercent / 100m;//캐릭터
            else if (BlessingTable[this.SelectedBlessing] == 2) pMagna += this.BlessingPercent / 100m;//마그나
            else if (BlessingTable[this.SelectedBlessing] == 1) pUnknown += this.BlessingPercent / 100m;//언노운
            else if (BlessingTable[this.SelectedBlessing] == 4) pNormal += this.BlessingPercent / 100m;//제우스 티탄 등 일반공인 부스트
            else if (BlessingTable[this.SelectedBlessing] == 0) pElement += (decimal)this.BlessingPercent / 100m;//속성

            //친구의 가호
            if (BlessingTable[this.SelectedFriendBlessing] == 3) pChar += this.FriendBlessingPercent / 100m;//캐릭터
            else if (BlessingTable[this.SelectedFriendBlessing] == 2) pMagna += this.FriendBlessingPercent / 100m;//마그나
            else if (BlessingTable[this.SelectedFriendBlessing] == 1) pUnknown += this.FriendBlessingPercent / 100m;//언노운
            else if (BlessingTable[this.SelectedFriendBlessing] == 4) pNormal += this.FriendBlessingPercent / 100m;//제우스 티탄 등 일반공인 부스트
            else if (BlessingTable[this.SelectedFriendBlessing] == 0) pElement += (decimal)this.FriendBlessingPercent / 100m;//속성

            this.CalcAtt = Convert.ToInt32(Math.Round(total * (1 + baha + (percent * pNormal) + pChar) * (1 + Magnapercent * pMagna) * (1 + (Unknownpercent * pUnknown) + Strangthpercent + Savingpercent) * (Attributepercent + pElement), 0, MidpointRounding.AwayFromZero));

            StringBuilder stbr = new StringBuilder();

            if (!this.IsvisBaha && !this.IsconcilioBaha) stbr.Append("×" + string.Format("{0:0.##}", 1 + percent * pNormal));
            else
            {
                stbr.Append("×(" + string.Format("{0:0.##}", 1 + percent * pNormal));
                stbr.Append("+" + baha + ")");
            }
            this.NormalWeapon = stbr.ToString();
            stbr.Clear();

            if (Magnapercent > 0) this.MagnaWeapon = "×" + string.Format("{0:0.##}", 1 + Magnapercent * pMagna);

            if (Unknownpercent > 0) this.UnknownWeapon = "×" + string.Format("{0:0.##}", 1 + Unknownpercent * pUnknown);
            this.UnknownWeaponTooltip = "언노운 무기 배율";
            if (Strangthpercent > 0 && Savingpercent == 0)
            {
                this.UnknownWeapon = "×(" + string.Format("{0:F2}", 1 + Unknownpercent * pUnknown) + "+" + string.Format("{0:0.##}", Strangthpercent) + ")";
                this.UnknownWeaponTooltip = "언노운 & 스트렝스 무기 배율";
            }
            else if (Strangthpercent == 0 && Savingpercent > 0)
            {
                this.UnknownWeapon = "×(" + string.Format("{0:F2}", 1 + Unknownpercent * pUnknown) + "+" + string.Format("{0:0.##}", Savingpercent) + ")";
                this.UnknownWeaponTooltip = "언노운 & 세이빙 무기 배율";
            }
            else if (Strangthpercent > 0 && Savingpercent > 0)
            {
                this.UnknownWeapon = "×(" + string.Format("{0:F2}", 1 + Unknownpercent * pUnknown) + "+" + string.Format("{0:0.##}", Strangthpercent) + "+" + string.Format("{0:0.##}", Savingpercent) + ")";
                this.UnknownWeaponTooltip = "언노운 & 스트렝스 & 세이빙 무기 배율";
            }

            if (Attributepercent > 0) this.Attribute = "×" + string.Format("{0:0.##}", Attributepercent + pElement);

            this.CalcAtt += skillInfo.staticAtt;
            if (skillInfo.staticAtt > 0) this.NovelWeapon = "+" + (skillInfo.staticAtt);

            var tempNPC = new List<NpcInfo>(GrandcypherClient.Current.WeaponHooker.NPCList);

            for (int i = 0; i < tempNPC.Count; i++)
            {
                tempNPC[i].CalcAtt = Convert.ToInt32(Math.Round(tempNPC[i].attack * (1 + baha + (percent * pNormal) + pChar) * (1 + Magnapercent * pMagna) * (1 + (Unknownpercent * pUnknown) + Strangthpercent + Savingpercent) * (Attributepercent + pElement), 0, MidpointRounding.AwayFromZero));
            }
            this.NPCList = new List<NpcInfo>(tempNPC);
            if (this.CalcTargetSkillLv(skillInfo) > 0) this.TargetMagna = this.CalcTargetSkillLv(skillInfo).ToString("##0.##%");
            else this.TargetMagna = "조건 달성";

            #region DEBUG
            #if DEBUG
            Debug.WriteLine(this.CalcTargetSkillLv(skillInfo));
            #endif
            #endregion
        }