public ClassSaves(SaveBonusType fortitude, SaveBonusType reflex, SaveBonusType will, int level) { FortitudeSave = new Save(_bonusses[fortitude], level); ReflexSave = new Save(_bonusses[reflex], level); WillSave = new Save(_bonusses[will], level); }
private void modifyAbilityTypeBox_SelectedIndexChanged(object sender, EventArgs e) { TypeToModify typeToModify; Enum.TryParse <TypeToModify>(this.modifyAbilityTypeBox.SelectedValue.ToString(), out typeToModify); this.statisticBox.Visible = false; switch (typeToModify) { case TypeToModify.Attack: this.bonusTypeBox.DataSource = AttackBonusType.GetValues(typeof(AttackBonusType)); break; case TypeToModify.Damage: this.bonusTypeBox.DataSource = DamageBonusType.GetValues(typeof(DamageBonusType)); break; case TypeToModify.Skill: this.bonusTypeBox.DataSource = SkillCheckBonusType.GetValues(typeof(SkillCheckBonusType)); break; case TypeToModify.Save: this.bonusTypeBox.DataSource = SaveBonusType.GetValues(typeof(SaveBonusType)); break; case TypeToModify.ArmorCheckPenalty: this.bonusTypeBox.Enabled = false; break; case TypeToModify.CasterLevel: this.bonusTypeBox.DataSource = DCBonusType.GetValues(typeof(DCBonusType)); break; case TypeToModify.CMB: this.bonusTypeBox.DataSource = CombatManeuverTypes.GetValues(typeof(CombatManeuverTypes)); break; case TypeToModify.CMD: this.bonusTypeBox.DataSource = CombatManeuverTypes.GetValues(typeof(CombatManeuverTypes)); break; case TypeToModify.ArmorClass: this.bonusTypeBox.DataSource = ArmorBonusType.GetValues(typeof(ArmorBonusType)); break; case TypeToModify.Resist: this.bonusTypeBox.Enabled = false; break; case TypeToModify.Bonus: this.bonusTypeBox.DataSource = AllBonusType.GetValues(typeof(AllBonusType)); break; case TypeToModify.SaveVSpell: this.bonusTypeBox.DataSource = SaveBonusType.GetValues(typeof(SaveBonusType)); break; case TypeToModify.SaveVSLA: this.bonusTypeBox.Enabled = false; break; case TypeToModify.SaveVPoison: this.bonusTypeBox.Enabled = false; break; case TypeToModify.SaveVFear: this.bonusTypeBox.Enabled = false; break; case TypeToModify.SaveVDisease: this.bonusTypeBox.Enabled = false; break; case TypeToModify.Immunities: this.bonusTypeBox.DataSource = ImmunityTypes.GetValues(typeof(ImmunityTypes)); break; case TypeToModify.DamageReduction: this.bonusTypeBox.DataSource = DamageReductionTypes.GetValues(typeof(DamageReductionTypes)); break; case TypeToModify.SpellResistance: this.bonusTypeBox.Enabled = false; break; case TypeToModify.Statistic: this.statisticBox.Visible = true; this.bonusTypeBox.DataSource = AbilityScoreBonusType.GetValues(typeof(AbilityScoreBonusType)); this.statisticBox.DataSource = StatType.GetValues(typeof(StatType)); break; default: break; } }