private void CheckFeatPreReqCon(FeatFoundation.FeatFoundation feat) { if (feat.Con < 0) { return; } if (feat.BonusFeat) { return; } if (_monSBSearch.HasType("undead")) { if (feat.Con > Cha) { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min Con of " + feat.Con.ToString() + ", but has Cha(undead) of " + Cha.ToString()); } return; } if (feat.Con > Con) { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min Con of " + feat.Con.ToString() + ", but has Con of " + Con.ToString()); } }
private void CheckFeatPreReqInt(FeatFoundation.FeatFoundation feat) { if (feat.Int < 0) { return; } if (feat.BonusFeat) { return; } if (feat.Int > Int) { if (CharacterClasses.HasClass("brawler")) { if (feat.Int > 13 || feat.Type != FeatFoundation.FeatTypes.Combat) { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min Int of " + feat.Int.ToString() + ", but has Int of " + Int.ToString()); } } else { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min Int of " + feat.Int.ToString() + ", but has Int of " + Int.ToString()); } } }
private void CheckFeatPreReqWis(FeatFoundation.FeatFoundation feat) { if (feat.Wis < 0) { return; } if (feat.BonusFeat) { return; } if (feat.Wis > Wis) { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min Wis of " + feat.Wis.ToString() + ", but has Wis of " + Wis.ToString()); } }
private void CheckFeatPreReqCha(FeatFoundation.FeatFoundation feat) { if (feat.Cha < 0) { return; } if (feat.BonusFeat) { return; } if (feat.Cha > Cha) { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min Cha of " + feat.Cha.ToString() + ", but has Cha of " + Cha.ToString()); } }
private void CheckFeatPreReqDex(FeatFoundation.FeatFoundation feat) { if (feat.Dex < 0) { return; } if (feat.BonusFeat) { return; } if (feat.Dex > Dex) { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min Dex of " + feat.Dex.ToString() + ", but has Dex of " + Dex.ToString()); } }
private void CheckFeatPreReqBAB(FeatFoundation.FeatFoundation feat) { if (feat.BAB < 0) { return; } if (feat.BonusFeat) { return; } if (feat.BAB > BAB) { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min BAB of " + feat.BAB.ToString() + ", but has BAB of " + BAB.ToString()); } }
private void ChechPreReqFeats(FeatFoundation.FeatFoundation feat) { List <string> preReqs = null; if (!feat.BonusFeat) { preReqs = feat.PreRequistFeats; foreach (string preReq in preReqs) { bool PreReqOrs = preReq.Contains("|"); List <string> preReqs2 = new List <string>(); bool Fail = false; if (PreReqOrs) { preReqs2 = preReq.Split('|').ToList <string>(); foreach (string preReq2 in preReqs2) { if (CheckOnePreReqFeat(feat, preReq2, out Fail)) { continue; } if (!Fail) { break; } } if (Fail) { _messageXML.AddFail("Feat Pre Req", feat.Name + " is missing prereq feat " + preReq); } } else { if (CheckOnePreReqFeat(feat, preReq, out Fail)) { continue; } if (Fail) { _messageXML.AddFail("Feat Pre Req", feat.Name + " is missing prereq feat " + preReq); } } } } }
private void CheckFeatPreReqStr(FeatFoundation.FeatFoundation feat) { if (feat.Str < 0) { return; } if (feat.BonusFeat) { return; } if (_monSBSearch.HasSubType("incorporeal")) { return; } if (feat.Str > Str) { _messageXML.AddFail("Feat Pre Req", feat.Name + " needs min Str of " + feat.Str.ToString() + ", but has Str of " + Str.ToString()); } }
private bool CheckOnePreReqFeat(FeatFoundation.FeatFoundation feat, string preReq, out bool Fail) { Fail = false; string temp = preReq.Trim(); string selectedItem = null; int Pos = temp.IndexOf("("); if (Pos >= 0) { selectedItem = temp.Substring(Pos); temp = temp.Replace(selectedItem, string.Empty).Trim(); selectedItem = Utility.RemoveParentheses(selectedItem); } if (selectedItem == null) { selectedItem = feat.SelectedItem; } if (selectedItem == "see below") { selectedItem = string.Empty; } if (selectedItem.Contains("see page")) { selectedItem = string.Empty; } if (!Feats.Exists(y => y.Name.ToLower() == temp.ToLower() && y.SelectedItem == selectedItem)) { if (temp == "Weapon Focus" && Feats.Exists(y => y.Name.ToLower() == temp.ToLower())) { return(true); } if (CheckBonusFeats(feat.Name)) { Fail = true; } } return(false); }
private void CheckClassPreReqs(List <FeatData> Feats) { string methodName = "CheckClassPreReqs"; foreach (ClassWrapper wrapper in CharacterClasses.Classes) { List <string> ClassPreReqs = CharacterClasses.GetPrestigePreReqFeats(wrapper.Name); FeatFoundation.FeatFoundation tempFeat = null; foreach (string oneFeat in ClassPreReqs) { string holdFeat = oneFeat; string SelectdItem = string.Empty; List <string> splitFeats = oneFeat.Split(',').ToList <string>(); bool Found = false; foreach (string oneSplitFeat in splitFeats) { if (oneSplitFeat.Contains(" (")) { int Pos = oneSplitFeat.IndexOf(" ("); holdFeat = oneSplitFeat.Substring(0, Pos).Trim(); SelectdItem = oneSplitFeat.Replace(holdFeat, string.Empty); SelectdItem = Utility.RemoveParentheses(SelectdItem); } tempFeat = Feats.Find(p => p.Name == holdFeat && p.SelectedItem == SelectdItem); if (tempFeat != null) { Found = true; break; } } if (!Found) { _messageXML.AddFail(methodName, wrapper.Name + " is missing prereq feat " + oneFeat); } } } }