private EmporiumTalent Map(WebTalent talent) { var result = new EmporiumTalent { Activation = talent.Activation != "Passive", Description = talent.Text, Name = talent.Name, Ranked = talent.Ranked == "Yes", Tier = talent.Tier, Turn = ParseTurn(talent.Activation) }; var isRealmsOfTerrinoth = (talent.Source?.Contains("ROT")).GetValueOrDefault(); if (isRealmsOfTerrinoth) { result.Setting = new[] { "Fantasy" }; } var isShadowOfTheBeanstalk = (talent.Source?.Contains("SOTB")).GetValueOrDefault(); if (isShadowOfTheBeanstalk) { result.Setting = new[] { "Steampunk" }; } return(result); }
public void Add(WebTalent talent) { if (talentCount++ > 0) { _json.Append(","); } var formattedName = FormatName(talent.Name); _json.Append($"\"{formattedName}\":"); var emporiumTalent = Map(talent); var jsonObject = JsonSerializer.Serialize(emporiumTalent, _jsonOptions); _json.Append(jsonObject); }
public void Add(WebTalent talent) { _emporiumTalentBuilder.Add(talent); }