private IEvaluation ExtractRestriction(string value) { var result = new BaseEvaluation(); result.Tags.Add(value); return(result); }
private IEvaluation ExtractEvaluationFrom(string line) { line = line.ToUpper(); var v = GetValueFrom(line); var item = GetSubjectItem(line.Replace("PLAYER", "")); var result = new BaseEvaluation { Persona = new Persona { Attribute = GetAttributeFrom(item), Characteristic = GetCharacteristicFrom(item), PersonalityTrait = GetPersonalityTraitFrom(item), Skill = GetSkillFrom(item), Subject = line.Contains("NPC") ? Actor.NPC : Actor.PLAYER }, PartyType = GetPartyTypeFrom(line), Time = GetTimeFrom(line), Equipments = new Equipments { Weapon = line.Contains("WEAPON") ? GetWeaponFrom(line) : null, Armor = line.Contains("ARMOR") ? GetArmorFrom(line) : null, Culture = line.Contains("CULTURE") ? GetEquipmentCultureFrom(line) : CultureCode.INVALID, Material = line.Contains("MATERIAL") ? GetEquipmentMaterialFrom(line) : ArmorMaterialTypes.UNKNOWN, Appearance = line.Contains("APPEARANCE") ? GetEquipmentAppearanceFrom(line) : 0.0f }, Numbers = new Numbers { Operator = GetOperatorFrom(line), Value = v.Reformat().Replace("%", string.Empty), ValueIsPercentage = IsThisAPercentageValue(v), RandomStart = GetRandomStartFrom(v), RandomEnd = GetRandomEndFrom(v) }, Outcome = new Outcome { PregnancyRisk = IsAtRiskOfBecomingPregnant(line), Escaping = IsEscapingFromCaptor(line), ShouldUndress = ShouldRemoveClothes(line), ShouldEquip = ShouldEquip(line) } }; if (result.Numbers.RandomEnd > 0) { result.Numbers.Value = result.Numbers.RandomEnd.ToString(); } return(result); }