public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { int HDValue = MonSB.HDValue(); if (HDValue < 5) { TemplateCommon.AddResistance(MonSB, "cold ", 5); TemplateCommon.AddResistance(MonSB, "fire ", 5); } else if (HDValue >= 5 && HDValue <= 10) { TemplateCommon.AddDR(MonSB, "good", 5); TemplateCommon.AddResistance(MonSB, "cold ", 10); TemplateCommon.AddResistance(MonSB, "fire ", 10); } else if (HDValue >= 11) { TemplateCommon.AddDR(MonSB, "good", 10); TemplateCommon.AddResistance(MonSB, "cold ", 15); TemplateCommon.AddResistance(MonSB, "fire ", 15); } int CR_Hold; int.TryParse(MonSB.CR, out CR_Hold); MonSB.SR = (CR_Hold + 5).ToString(); return(MonSB); }
public bool UpdateMonster(MonsterStatBlock SB, ref IEnumerable <string> Error) { MonsterService _monsterService = new MonsterService(ConnectionString); Error = _monsterService.UpdateMonster(MapThisToMonsterObject(SB)); return(Error.Any() ? true : false); }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB, List <string> StackableTemplates) { MonSB = ApplyTemplate(MonSB); //base skeleteton return(MonSB); }
public static void AddResistance(MonsterStatBlock MonSB, string Type, int Value) { if (MonSB.Resist.Contains(Type)) { List <string> ResistList = MonSB.Resist.Split(',').ToList(); for (int i = 0; i < ResistList.Count; i++) { if (ResistList[i].Contains(Type)) { string temp = ResistList[i].Replace(Type, string.Empty).Trim(); int NewValue = int.Parse(temp); NewValue += Value; ResistList[i] = Type + PathfinderConstants.SPACE + NewValue.ToString(); } } } else { if (MonSB.Resist.Length == 0) { MonSB.Resist = Type + PathfinderConstants.SPACE + Value.ToString(); } else { MonSB.Resist = MonSB.Resist + "," + Type + PathfinderConstants.SPACE + Value.ToString(); } } }
public override MonsterStatBlock ApplyAdvancedHDTemplate(MonsterStatBlock MonSB, string NewSizeValue, int HighCR, int LowCR) { if (NewSizeValue.Length > 0) { ComputeSizeChange(MonSB, NewSizeValue); } //natural armor change for CR increase List <int> HigherCR = new List <int> { 0, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2 }; //0 for 0th spot int diff = HighCR - LowCR - 1; int lowCRIndex = LowCR + 1; int highCRIndex = diff + lowCRIndex; int total = 0; for (int a = lowCRIndex; a <= highCRIndex; a++) { total += HigherCR[a]; } MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", total, true); return(MonSB); }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { string size = MonSB.Size; int naturalMod = 0; switch (size) { case "Large": naturalMod = 6; break; case "Huge": naturalMod = 7; break; case "Gargantuan": naturalMod = 8; break; case "Colossal": naturalMod = 9; break; } MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", naturalMod, true); return(MonSB); }
public TemplateChecker(StatBlockMessageWrapper _messageXML, MonSBSearch _monSBSearch, RaceBase Race_Base, MonsterStatBlock MonSB, ClassMaster CharacterClasses) { this._messageXML = _messageXML; this._monSBSearch = _monSBSearch; this.Race_Base = Race_Base; this.MonSB = MonSB; this.CharacterClasses = CharacterClasses; }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { TemplateCommon.AddResistance(MonSB, "cold ", 5); TemplateCommon.AddResistance(MonSB, "electricity ", 5); TemplateCommon.ChangeHD(MonSB, StatBlockInfo.HitDiceCategories.d10); return(MonSB); }
public void ApplyTemplatedRaceSB(MonsterStatBlock TemplatedRaceSB, bool use_template_values) { if (TemplatedRaceSB != null) { Race_SB = TemplatedRaceSB; _useTemplateValues = use_template_values; } }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { if (!MonSB.AlternateNameForm.Contains("Human Form")) { TemplateCommon.AddDR(MonSB, "silver", 5); } return(MonSB); }
private void ComputeSizeChange(MonsterStatBlock MonSB, string NewSizeValue) { StatBlockInfo.SizeCategories RaceSize = StatBlockInfo.GetSizeEnum(MonSB.Size); StatBlockInfo.SizeCategories NewSize = StatBlockInfo.GetSizeEnum(NewSizeValue); int diff = NewSize - RaceSize; int naturalArmorChange = 0; int sign = 0; while (diff != 0) { if (diff < 0) //smaller { RaceSize--; sign = -1; } else //bigger { RaceSize++; sign = 1; } //apply new size changes switch (RaceSize) { case StatBlockInfo.SizeCategories.Diminutive: case StatBlockInfo.SizeCategories.Tiny: case StatBlockInfo.SizeCategories.Small: case StatBlockInfo.SizeCategories.Medium: break; case StatBlockInfo.SizeCategories.Large: naturalArmorChange += 2 * sign; break; case StatBlockInfo.SizeCategories.Huge: naturalArmorChange += 3 * sign; break; case StatBlockInfo.SizeCategories.Gargantuan: naturalArmorChange += 4 * sign; break; case StatBlockInfo.SizeCategories.Colossal: naturalArmorChange += 5 * sign; break; } diff = NewSize - RaceSize; } if (naturalArmorChange > 0) { MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", naturalArmorChange, true); } }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { int ChaValue = MonSB.GetAbilityScoreValue(StatBlockInfo.CHA) + 4; int ChaMod = StatBlockInfo.GetAbilityModifier(ChaValue); TemplateCommon.ChangeHD(MonSB, StatBlockInfo.HitDiceCategories.d8); // MonSB.AbilitiyScores // MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "deflection", ChaMod, true); return(MonSB); }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { TemplateCommon.ChangeHD(MonSB, StatBlockInfo.HitDiceCategories.d8); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "ToughnessB"); TemplateCommon.AddDR(MonSB, "slashing", 5); return(MonSB); }
public static void ChangeHD(MonsterStatBlock MonSB, StatBlockInfo.HitDiceCategories NewHDCategory) { if (!MonSB.DontUseRacialHD) { StatBlockInfo.HDBlockInfo tempHDInfo = new StatBlockInfo.HDBlockInfo(); tempHDInfo.ParseHDBlock(MonSB.HD); tempHDInfo.HDType = NewHDCategory; tempHDInfo.Modifier = 0; MonSB.HD = tempHDInfo.ToString(); } }
public SpellChecker(StatBlockMessageWrapper _messageXML, ClassMaster CharacterClasses, IndividualStatBlock_Combat _indvSB, Dictionary <string, SpellList> ClassSpells, MonSBSearch _monSBSearch, MonsterStatBlock MonSB, Dictionary <string, SpellList> SLA) { this._messageXML = _messageXML; this.CharacterClasses = CharacterClasses; this.ClassSpells = ClassSpells; this._monSBSearch = _monSBSearch; this.SLA = SLA; this.MonSB = MonSB; this._indvSB = _indvSB; }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", 5, true); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Perception"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Sense Motive"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Stealth"); TemplateCommon.AddDR(MonSB, "bludgeoning and magic", 15); return(MonSB); }
public SavesChecker(ClassMaster CharacterClasses, IndividualStatBlock_Combat _indvSB, RaceBase Race_Base, List <MagicItemAbilitiesWrapper> MagicItemAbilities, MonSBSearch _monSBSearch, MonsterStatBlock MonSB, AbilityScores.AbilityScores _abilityScores, StatBlockMessageWrapper _messageXML) { this.MagicItemAbilities = MagicItemAbilities; this.CharacterClasses = CharacterClasses; this._indvSB = _indvSB; this.Race_Base = Race_Base; this._monSBSearch = _monSBSearch; this.MonSB = MonSB; this._messageXML = _messageXML; this._abilityScores = _abilityScores; }
public MonSBSearch(MonsterStatBlock MonSB, Dictionary <string, int> WT, Dictionary <IEquipment, int> Armor, List <OnGoingStatBlockModifier> OnGoingModifers, IFeatStatBlockBusiness featStatBlockBusiness) { _featStatBlockBusiness = featStatBlockBusiness; ParseFeats(MonSB.Feats); ParseTraits(MonSB.Traits); ParseSkills(MonSB.Skills); ParseSpecialAttacks(MonSB.SpecialAttacks); ParseArchetypes(MonSB.ClassArchetypes); _specialAttacks = MonSB.SpecialAttacks; ParseHexes(); _defensiveAbilities = MonSB.DefensiveAbilities; _WT = WT; _gear = MonSB.Gear + ", " + MonSB.OtherGear; _templatesApplied = MonSB.TemplatesApplied; _armor = Armor; _classArchetypes = MonSB.ClassArchetypes.ToLower(); _SQ = MonSB.SQ; Utility.ParenCommaFix(ref _SQ); SQ = _SQ.Split(',').ToList(); _onGoingModifers = OnGoingModifers; _domains = MonSB.SpellDomains; _subType = MonSB.SubType; _type = MonSB.Type; _abilityValues = new AbilityScores.AbilityScores(MonSB.AbilityScores); _race = MonSB.Race; _bloodline = MonSB.Bloodline; _mystery = MonSB.Mystery.Replace("*", string.Empty); int Pos = _mystery.IndexOf(PathfinderConstants.PAREN_LEFT); if (Pos > 0) { _mystery = _mystery.Substring(0, Pos).Trim(); } _bloodline = Utility.RemoveSuperScripts(_bloodline); _mystery = Utility.RemoveSuperScripts(_mystery); _bloodline = _bloodline.ToLower(); _onlyClassHitdice = !MonSB.DontUseRacialHD; _isMythic = MonSB.Mythic; _mythicRank = MonSB.MR; _mythicTier = MonSB.MT; _partron = MonSB.Patron; Name = MonSB.name; _isBestirarySB = MonSB.Environment.Length > 0 ? true : false; this._MonSB = MonSB; }
public MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB, string templateName, List <string> stackableTemplates, out List <string> failureList) { failureList = new List <string>(); templateName = templateName.Replace("|", string.Empty); if (LoadAssemlyInfo(templateName)) { object obj = Activator.CreateInstance(ClassInst); TemplateFoundation Template = (TemplateFoundation)obj; return(Template.ApplyTemplate(MonSB, stackableTemplates)); } return(MonSB); }
public SpellChecker(ISBCheckerBaseInput sbCheckerBaseInput, Dictionary <string, SpellList> classSpells, Dictionary <string, SpellList> SLA, ISpellStatBlockBusiness spellStatBlockBusiness) { _sbCheckerBaseInput = sbCheckerBaseInput; _messageXML = _sbCheckerBaseInput.MessageXML; _characterClasses = _sbCheckerBaseInput.CharacterClasses; _classSpells = classSpells; _monSBSearch = _sbCheckerBaseInput.MonsterSBSearch; _sla = SLA; _monsterSB = _sbCheckerBaseInput.MonsterSB; _indvSB = _sbCheckerBaseInput.IndvSB; _spellStatBlockBusiness = spellStatBlockBusiness; }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { TemplateCommon.ChangeHD(MonSB, StatBlockInfo.HitDiceCategories.d8); TemplateCommon.AddDR(MonSB, "-", 10); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "ToughnessB"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Intimidate"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Sense Motive"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Stealth"); return(MonSB); }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", 4, true); TemplateCommon.AddDR(MonSB, "-", 5); TemplateCommon.AddResistance(MonSB, "cold ", 5); TemplateCommon.AddResistance(MonSB, "electricity ", 5); TemplateCommon.AddResistance(MonSB, "acid ", 5); TemplateCommon.AddResistance(MonSB, "fire ", 5); TemplateCommon.AddResistance(MonSB, "sonic ", 5); return(MonSB); }
public MonsterStatBlock ApplyMultipleTemplates(MonsterStatBlock MonSB, List <string> templates, out List <string> failureList) { failureList = new List <string>(); foreach (string template in templates) { bool success; MonSB = ApplyTemplate(MonSB, template, out success); if (!success) { failureList.Add(template); } } return(MonSB); }
public MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB, string templateName, out bool success) { success = false; templateName = templateName.Replace("|", string.Empty); if (LoadAssemlyInfo(templateName)) { object obj = Activator.CreateInstance(ClassInst); TemplateFoundation Template = (TemplateFoundation)obj; success = true; return(Template.ApplyTemplate(MonSB)); } return(MonSB); }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { TemplateCommon.ChangeHD(MonSB, StatBlockInfo.HitDiceCategories.d8); MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", 0, false); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "DiehardB"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Stealth"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Perception"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Sense Motive"); return(MonSB); }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { TemplateCommon.ChangeHD(MonSB, StatBlockInfo.HitDiceCategories.d8); MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", 4, true); TemplateCommon.AddDR(MonSB, "-", 5); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+4 Stealth"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "ToughnessB"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, " Improved Natural AttackB"); return(MonSB); }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { if (!MonSB.DontUseRacialHD) { TemplateCommon.ChangeHD(MonSB, StatBlockInfo.HitDiceCategories.d8); StatBlockInfo.HDBlockInfo tempHDInfo = new StatBlockInfo.HDBlockInfo(); tempHDInfo.ParseHDBlock(MonSB.HD); //tempHDInfo.HDType = StatBlockInfo.HitDiceCategories.d8; //keeps HD, change to d8 //tempHDInfo.Modifier = 0; //MonSB.HD = tempHDInfo.ToString(); CreatureTypeFoundation CreatureType = CreatureTypeDetailsWrapper.GetRaceDetailClass("undead"); int fort = StatBlockInfo.ParseSaveBonues(tempHDInfo.Multiplier, CreatureType.FortSaveType); CreatureTypeMaster CreatureTypeMaster = new CreatureTypeMaster(); CreatureTypeMaster.CreatureTypeInstance = CreatureType; fort += StatBlockInfo.GetAbilityModifier(MonSB.GetAbilityScoreValue(CreatureTypeMaster.CreatureTypeInstance.FortMod())); MonSB.Fort = fort.ToString(); int refValue = StatBlockInfo.ParseSaveBonues(tempHDInfo.Multiplier, CreatureType.RefSaveType); refValue += StatBlockInfo.GetAbilityModifier(MonSB.GetAbilityScoreValue(StatBlockInfo.DEX)); MonSB.Ref = refValue.ToString(); int will = StatBlockInfo.ParseSaveBonues(tempHDInfo.Multiplier, CreatureType.WillSaveType); will += StatBlockInfo.GetAbilityModifier(MonSB.GetAbilityScoreValue(StatBlockInfo.WIS)); MonSB.Will = will.ToString(); } MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", 6, true); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "AlertnessB"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "Combat ReflexesB"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "DodgeB"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "Improved InitiativeB"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "Lightning ReflexesB"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "ToughnessB"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Bluff"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Perception"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Sense Motive"); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Stealth"); TemplateCommon.AddDR(MonSB, "magic and silver", 10); TemplateCommon.AddResistance(MonSB, "cold ", 10); TemplateCommon.AddResistance(MonSB, "electricity ", 10); return(MonSB); }
public override MonsterStatBlock ApplyTemplate(MonsterStatBlock MonSB) { TemplateCommon.ChangeHD(MonSB, StatBlockInfo.HitDiceCategories.d8); MonSB.AC_Mods = StatBlockInfo.ChangeAC_Mod(MonSB.AC_Mods, "natural", 3, true); MonSB.RacialMods = StatBlockInfo.AddRacialMod(MonSB.RacialMods, "+8 Climb"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "Improved InitiativeB"); MonSB.Feats = StatBlockInfo.AddFeat(MonSB.Feats, "ToughnessB"); TemplateCommon.AddDR(MonSB, "magic and slashing", 5); TemplateCommon.AddResistance(MonSB, "fire ", 10); return(MonSB); }
public MonsterStatBlock ApplyAdvancedHDTemplate(MonsterStatBlock MonSB, string templateName, string NewSize, int HighCR, int LowCR) { if (LoadAssemlyInfo(templateName)) { try { object obj = Activator.CreateInstance(ClassInst); TemplateFoundation Template = (TemplateFoundation)obj; return(Template.ApplyAdvancedHDTemplate(MonSB, NewSize, HighCR, LowCR)); } catch (Exception ex) { return(null); } } return(null); }
public static void AddDR(MonsterStatBlock MonSB, string Type, int Value) { if (MonSB.DR.Contains(Type)) { } else { if (MonSB.DR.Length == 0) { MonSB.DR = Value.ToString() + "/" + Type; } else { MonSB.DR = MonSB.DR + "," + Value.ToString() + "/" + Type; } } }