public override void OnDeserialization(object sender) { SourceMod = new MultiplierMod(SourceType, 1 - Effectiveness); ResultMod = new MultiplierMod(TargetStatType, Effectiveness); Conversion = new Conversion(SourceType, TargetStatType, Converter); }
public override void OnDeserialization(object sender) { targetMod = new MultiplierMod(TargetStatType, Effectiveness); Conversion = new Conversion(SourceType, TargetStatType, source => target => { targetMod.Affect(source); target.AddComponent(source); }); }
public ConversionMod(StatType targetStat, double value, StatType sourceStat) { TargetStatType = targetStat; Effectiveness = value; SourceType = sourceStat; SourceMod = new MultiplierMod(SourceType, 1 - Effectiveness); ResultMod = new MultiplierMod(TargetStatType, Effectiveness); Conversion = new Conversion(SourceType, TargetStatType, Converter); }
public GainMod(StatType targetStat, double value, StatType sourceStat) { TargetStatType = targetStat; Effectiveness = value; SourceType = sourceStat; targetMod = new MultiplierMod(TargetStatType, Effectiveness); Conversion = new Conversion(SourceType, TargetStatType, source => target => { targetMod.Affect(source); target.AddComponent(source); }); }