// Creates damage conversion from attribute. public static Converted Create(DamageConversionSource source, KeyValuePair <string, List <float> > attr) { Match m = ReConvertMod.Match(attr.Key); if (m.Success) { return(new Converted(source, attr.Value[0], Types[m.Groups[1].Value], Types[m.Groups[3].Value])); } return(null); }
// Creates damage conversion from attribute. public static Converted Create(DamageConversionSource source, KeyValuePair<string, List<float>> attr) { Match m = ReConvertMod.Match(attr.Key); if (m.Success) { return new Converted(source, attr.Value[0], DamageNature.Types[m.Groups[1].Value], DamageNature.Types[m.Groups[2].Value]); } return null; }
public Converted(DamageConversionSource source, float percent, DamageType from, DamageType to) { Source = source; Percent = percent; From = from; To = to; }