private MonsterStatBlock ApplyAdvancedHDTemplate(TemplateManager.TemplateManager TM, MonsterStatBlock TestMonSB) { try { TestMonSB = TM.ApplyAdvancedHDTemplate(TestMonSB, "Advanced HD", _sbCheckerBaseInput.MonsterSB.Size, Convert.ToInt32(_sbCheckerBaseInput.MonsterSB.CR), Convert.ToInt32(TestMonSB.CR));// _sbCheckerBaseInput.MonsterSB.HD; } catch { } _sbCheckerBaseInput.Race_Base.ApplyTemplatedRaceSB(TestMonSB, false); _sbCheckerBaseInput.MessageXML.AddInfo("Template Applied - Advanced HD"); return(TestMonSB); }
public void CheckTemplates() { if (_sbCheckerBaseInput.Race_Base.RaceBaseType != RaceBase.RaceType.None) { TemplateManager.TemplateManager TM = new TemplateManager.TemplateManager(); MonsterStatBlock TestMonSB = _sbCheckerBaseInput.Race_Base.RaceSB; if (TestMonSB == null) { return; } if (_sbCheckerBaseInput.MonsterSB.TemplatesApplied.Length != 0) { CheckAppliedTemplates(TM, ref TestMonSB); } else { if (_sbCheckerBaseInput.Race_Base.Size() != _sbCheckerBaseInput.MonsterSB.Size) { string temp = _sbCheckerBaseInput.MonsterSB.CR; try { if (temp == "1/2") { return; } string temp2 = TestMonSB.CR; if (temp2 == "1/2") { return; } TestMonSB = TM.ApplyAdvancedHDTemplate(TestMonSB, "Advanced HD", _sbCheckerBaseInput.MonsterSB.Size, Convert.ToInt32(temp), Convert.ToInt32(temp2)); _sbCheckerBaseInput.Race_Base.ApplyTemplatedRaceSB(TestMonSB, false); } catch { } } } } }