public EventOption(String optionTypeString, String optionTextDescriptionString, String optionRequiredSkillString, String optionRequiredSkillRankingString, String optionRequiredTraitString, String optionAvoidedTraitString, int basesuccessrate, String[] influenceSkills, String[] influenceTraits, EventOptionOutcomes[] eventoutcomes) { thisOptionType = (EventOptionType)Enum.Parse(typeof(EventOptionType), optionTypeString); optionTextDescription = optionTextDescriptionString; optionBaseSuccessRate = basesuccessrate; //skills and traits stuff if (optionRequiredSkillString != "") { requiresSkill = true; requiredSkill = (PersonSkill.SkillType)Enum.Parse(typeof(PersonSkill.SkillType), optionRequiredSkillString); requiredRanking = (PersonSkill.SkillRanking)Enum.Parse(typeof(PersonSkill.SkillRanking), optionRequiredSkillRankingString); } if (optionRequiredTraitString != "") { requiresTrait = true; requiredTraitType = (Person.TraitType)Enum.Parse(typeof(Person.TraitType), optionRequiredTraitString); } if (optionAvoidedTraitString != "") { avoidsTrait = true; avoidedTraitType = (Person.TraitType)Enum.Parse(typeof(Person.TraitType), optionAvoidedTraitString); } foreach (String s in influenceSkills) { influencialSkills.Add((PersonSkill.SkillType)Enum.Parse(typeof(PersonSkill.SkillType), s)); } foreach (String t in influenceTraits) { influencialTraits.Add((Person.TraitType)Enum.Parse(typeof(Person.TraitType), t)); } //outcomes foreach (EventOptionOutcomes o in eventoutcomes) { eventOptionOutcomes.Add(o); } }
public EventOption(string description, EventOptionType optionType, int amount) { Description = description; OptionType = optionType; Amount = amount; }