private AdvancementSelection GetAdvancementSelection(string creatureName, CreatureType creatureType, string originalSize, string originalChallengeRating, TypeAndAmountSelection typeAndAmount) { var selection = new AdvancementSelection(); selection.AdditionalHitDice = typeAndAmount.Amount; var sections = typeAndAmount.Type.Split(','); selection.Size = sections[DataIndexConstants.AdvancementSelectionData.Size]; selection.Space = Convert.ToDouble(sections[DataIndexConstants.AdvancementSelectionData.Space]); selection.Reach = Convert.ToDouble(sections[DataIndexConstants.AdvancementSelectionData.Reach]); selection.StrengthAdjustment = GetStrengthAdjustment(originalSize, selection.Size); selection.ConstitutionAdjustment = GetConstitutionAdjustment(originalSize, selection.Size); selection.DexterityAdjustment = GetDexterityAdjustment(originalSize, selection.Size); selection.NaturalArmorAdjustment = GetNaturalArmorAdjustment(originalSize, selection.Size); if (IsBarghest(creatureName)) { selection.StrengthAdjustment = selection.AdditionalHitDice; selection.ConstitutionAdjustment = selection.AdditionalHitDice; selection.NaturalArmorAdjustment = selection.AdditionalHitDice; selection.CasterLevelAdjustment = selection.AdditionalHitDice; } selection.AdjustedChallengeRating = AdjustChallengeRating(originalSize, selection.Size, originalChallengeRating, selection.AdditionalHitDice, creatureType.Name); return(selection); }
public void Setup() { selection = new AdvancementSelection(); }