Пример #1
0
        public override void OnDeserialization(object sender)
        {
            SourceMod = new MultiplierMod(SourceType, 1 - Effectiveness);
            ResultMod = new MultiplierMod(TargetStatType, Effectiveness);

            Conversion = new Conversion(SourceType, TargetStatType, Converter);
        }
Пример #2
0
        public override void OnDeserialization(object sender)
        {
            targetMod = new MultiplierMod(TargetStatType, Effectiveness);

            Conversion = new Conversion(SourceType, TargetStatType, source => target => {
                targetMod.Affect(source);
                target.AddComponent(source);
            });
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
            });
        }